Metabolomics experiments can employ non-targeted tandem mass spectrometry to detect hundreds to thousands of molecules in a biological sample. Structural annotation of molecules is typically carried out by searching their fragmentation spectra in spectral libraries or, recently, in structure databases. Annotations are limited to structures present in the library or database employed, prohibiting a thorough utilization of the experimental data. We present a computational tool for systematic compound class annotation: CANOPUS uses a deep neural network to predict 1,270 compound classes from fragmentation spectra, and explicitly targets compounds where neither spectral nor structural reference data are available. CANOPUS even predicts classes for which no MS/MS training data are available. We demonstrate the broad utility of CANOPUS by investigating the effect of the microbial colonization in the digestive system in mice, and through analysis of the chemodiversity of different Euphorbia plants; both uniquely revealing biological insights at the compound class level.DNN is trained on 1.11 million compound structures and does not require any MS/MS data. To train the DNN, we have to simulate a "realistic" probabilistic fingerprint for any given molecular structure, although no MS/MS data for this structure is available. This integration of two machine learning techniques allows CANOPUS to reach high-quality predictions for 1,270 compound classes. Because the predictions are now independent from the availability of MS/MS reference data, CANOPUS can predict compound classes even when there are no MS/MS spectra for training the method. Equally important, it can predict classes for which MS/MS training data is missing for a complete subclass.Uniquely, CANOPUS permits a global over view of the compound classes measured in a biological sample, but also the differences between cohorts at the compound class level