  The process of identifying a compound from its mass spectrum is a critical
step in the analysis of complex mixtures. Typical solutions for the mass
spectrum to compound (MS2C) problem involve matching the unknown spectrum
against a library of known spectrum-molecule pairs, an approach that is limited
by incomplete library coverage. Compound to mass spectrum (C2MS) models can
improve retrieval rates by augmenting real libraries with predicted spectra.
Unfortunately, many existing C2MS models suffer from problems with prediction
resolution, scalability, or interpretability. We develop a new probabilistic
method for C2MS prediction, FraGNNet, that can efficiently and accurately
predict high-resolution spectra. FraGNNet uses a structured latent space to
provide insight into the underlying processes that define the spectrum. Our
model achieves state-of-the-art performance in terms of prediction error, and
surpasses existing C2MS models as a tool for retrieval-based MS2C.
