For the IR spectra, we employ a modified ResNet50 , where the size of the input images is 512×512 pixels. We call this model j-IR-vis; 25M parameters total. j-IR-vis embeds each IR spectrum into a 2, 048-dimensional vector ( IR z), which is then processed by a two-layer MLP classification block followed by a sigmoid function. We pretrained j-IR-vis to predict the available 9 functional groups in the dataset using a multi-label classification approach. To address the class imbalance in the dataset (Fig. in the SM) we used the weighted binary cross-entropy loss function, and the weights for each class were calculated based on the inverse of their frequency in the training dataset. See the SM for more details. Notably, j-IR-vis achieved a 94% accuracy in identifying the 9 functional groups, and an overall accuracy of 82%, see Fig. ). However, it struggled with low-intensity signals, particularly in detecting functional groups such as amines and ketones. The learned filters by j-IR-vis indicate that it can detect the peak location of key functional groups, and capture the general contour of the IR absorption spectrum. For instance, Fig. (a) illustrates some of the relevant filters for the 1,2-Dibromoethane and Diethyl 1-methyl-1H-pyrazole-3,4-dicarboxylate molecules. We also found that the other filters capture the box-plot features of the spectra.