Fingerprint analysis is a ubiquitous tool for pattern recognition with applications spanning from geolocation and DNA analysis to facial recognition and forensic identification. Central to its utility is the ability to provide accurate identification without an a priori mathematical model for the pattern. We report a data-driven fingerprint approach for nanoelectromechanical systems mass spectrometry that enables mass measurements of particles and molecules using complex, uncharacterized nanoelectromechanical devices of arbitrary specification. Nanoelectromechanical systems mass spectrometry is based on the frequency shifts of the nanoelectromechanical device vibrational modes that are induced by analyte adsorption. The sequence of frequency shifts constitutes a fingerprint of this adsorption, which is directly amenable to pattern matching. Two current requirements of nanoelectromechanical-based mass spectrometry are: (1) a priori knowledge or measurement of the device mode-shapes, and (2) a mode-shape-based model that connects the induced modal frequency shifts to mass adsorption. This may not be possible for advanced nanoelectromechanical devices with three-dimensional mode-shapes and nanometer-sized features. The advance reported here eliminates this impediment, thereby allowing device designs of arbitrary specification and size to be employed. This enables the use of advanced nanoelectromechanical devices with complex vibrational modes, which offer unprecedented prospects for attaining the ultimate detection limits of nanoelectromechanical mass spectrometry.