One possibility is as an extension of the untargeted analysis: run the analysis over different kinds of samples. The output for each sample is the list of major peaks (and intensities). Use this as the "image" to train a (shallow) network.
You might even get away without specifying pre-identified chemicals. Adding that list would only help.
You might even get away without specifying pre-identified chemicals. Adding that list would only help.