Command Palette
Search for a command to run...
Generating 800 Million Predicted Mass Spectra for Over 100 Million Small Molecules: Cornell University Proposes AIMe, Integrating Chemical Rules/Fragmentation Pathway Reasoning/Neural Network Learning
In metabolomics research, mass spectrometry can capture numerous signals of small molecules from complex biological samples; however, detecting these signals is merely the first step—the true challenge lies in identifying what specific molecules correspond to those signals. Currently, experimental reference spectral libraries available for comparison cover less than 1% of known compounds. Consequently, more than 80% of metabolites in typical complex biological samples remain unidentified. Meanwhile, the structural space of small molecules is far more complex than that of DNA and proteins. A single molecular formula may correspond to many different structures, making it difficult to cover this vast chemical space solely by continuously expanding standards and reference spectral libraries.
To address this issue, a research team at Cornell University developed AIMe (AI Molecule Explorer), an agent-based neural symbolic AI framework designed for small molecule mass spectrometry interpretation. Its core model, DeepMS²Reasoner, integrates chemical rules, fragmentation pathway reasoning, and neural network learning. It simulates fragmentation processes such as bond cleavage and hydrogen transfer starting from molecular structures to predict corresponding MS² spectra. This allows AIMe to move beyond traditional direct matching between "experimental mass spectra" and "reference spectral libraries," enabling the search for relevant candidates within a broader molecular structural space for unknown mass spectra.
To extend this capability into the space of known small molecules, the research team further constructed MS²KOSMOS, generating over 8 billion predicted MS² spectra for more than 100 million small molecules in PubChem, thereby expanding the searchable mass spectrum space by approximately three orders of magnitude compared to existing experimental libraries. For an unknown mass spectrum, AIMe not only returns candidate molecules but also provides associated fragmentation pathways and correlates specific mass spectral peaks with potential fragment formulas and structures. The research team subsequently validated its capabilities in interpreting unknown small molecules and performing database-level annotation using metabolic data related to mouse gut microbiota and large-scale mass spectrometry data from GNPS.
The relevant findings were published under the title "Charting the small-molecule universe from mass spectra with neuro-symbolic AI" on the preprint server bioRxiv.
View Paper:
https://www.biorxiv.org/content/10.64898/2026.08.05.743095v1
From Experimental Mass Spectra to Billion-Scale Small-Molecule Space
The data involved in AIMe primarily supports three tasks:** training the mass spectrum prediction model, constructing a retrievable small-molecule space, and evaluating interpretive performance in real-world samples.**
Training data for DeepMS²Reasoner was sourced from the NIST 2020 tandem mass spectrometry database. The research team retained MS² spectra for protonated ions ([M+H]⁺) and deprotonated ions ([M−H]⁻), excluded metal-containing compounds and samples lacking complete structural information, and standardized processing of mass spectral peaks and molecular structures. Data were divided into 80% training set, 10% validation set, and 10% test set based on full InChIKeys. To mitigate impacts arising from structural redundancy, test molecules exhibiting a Tanimoto similarity of 1.0 with trained molecules in their Morgan fingerprints were excluded during final evaluation.
Model generalization ability was assessed via two independent datasets, CASMI 2022 and MassSpecGym, neither of which participated in training. Structural retrieval experiments added another layer of difficulty: for each experimental mass spectrum, up to 49 interfering items consisting of PubChem molecules with similar masses and structures were included alongside the ground-truth structure. Specifically for CASMI, the researchers designed stricter tests involving all-isomer scenarios, incorporating all PubChem isomers sharing the same molecular formula into the candidates, totaling nearly 2.5 million candidate mass spectra.
After completing model training, the scope expanded to include known small molecules in PubChem. For over 105 million organic compounds with m/z < 1000, AIMe predicted MS² spectra across positive and negative ion modes and four collision energies, generating over 8 billion predicted mass spectra organized into MS²KOSMOS, providing a foundation for subsequent searches against unknown mass spectra.
Real-world applications mainly involved two sets of data. One dataset comprised fecal metabolomes from germ-free (GF) mice and specific-pathogen-free (SPF) mice possessing intact gut microbiotas; from this, 111 abundant microbial-community-dependent signals unable to be identified through current standards and spectral libraries were selected. Another dataset came from the public GNPS mass spectrometry database. After filtering conditions including charge states and molecular weights, a total of 7,144,480 consensus MS² spectra entered large-scale searching.
Teaching Models How Molecules Fragment
AIMe consists of three interconnected modules: DeepMS²Reasoner predicts MS² spectra and fragmentation paths from molecular structures; MS²KOSMOSGenerator invokes this model to perform predictions on large-scale chemical structures and builds the searchable MS²KOSMOS; and MS²KOSMOSMapper handles experimentally derived unknown mass spectra, seeking potentially related molecules and structural neighborhoods within MS²KOSMOS. With large-scale predictions completed beforehand, actual queries require finer computational analysis limited only to screened candidate structures.
Among these components, the DeepMS² Reasoner determines the mass spectrometry prediction capability of the entire system. Instead of directly learning “which peaks correspond to a given molecule and their respective intensities,” it simulates the fragmentation process step by step starting from the precursor ion, dynamically constructing a directed acyclic graph (DAG). In this DAG, nodes represent different fragment ions, while edges correspond to specific fragmentation events. The model considers three types of mechanisms—linear bond cleavage, ring bond cleavage, and neutral loss—and simultaneously tracks charge changes and hydrogen transfers. Since there is no pre-defined limit on fragmentation depth, it can accurately depict complex fragments that require multiple steps such as multi-step bond breaking, ring opening, or rearrangement.
The selection of fragmentation pathways is governed by the neural network component ALEA (Action Likelihood Estimator Advisor), which evaluates possible actions based on current conditions. Using a Graphormer architecture, ALEA assigns probabilities to various fragmentation reactions and the option to stop further fragmentation, taking into account atomic composition, chemical bonds, ring structures, and hydrogen states of the current fragment, along with experimental parameters like collision energy, instrument type, and adduct ions. These probabilities are then propagated through the fragmentation pathway in DeepMS² Reasoner; finally, the cumulative stopping probability at each resulting fragment yields its corresponding predicted peak intensity in the spectrum.

The neural network is responsible for determining which pathway is more likely to occur, while chemical rules constrain which pathways can actually take place. After each fragmentation step, the system checks molecular connectivity, hydrogen balance, and other chemical constraints; unreasonable fragmentations are excluded from subsequent calculations. Fragments with identical structures and chemical states are merged to reduce redundant searches. Branches with very low probabilities are pruned by the model, thereby avoiding an exhaustive enumeration of all possible fragmentation paths that grow rapidly in number as molecular complexity increases.
During training, the primary component requiring parameter learning is ALEA; all other fragmentation operations and assessments of chemical feasibility are carried out using deterministic rules. The model employs Kullback–Leibler (KL) divergence to measure the discrepancy between predicted and experimental mass spectra. Regularization constraints are also incorporated so that when multiple mechanisms could explain the same spectral peak, simpler linear bond cleavages are appropriately prioritized. Curriculum learning is adopted during training: it begins with smaller molecules having fewer and less complex fragmentation paths, then gradually introduces larger and more complicated compounds. This enables the model first to master transferable local fragmentation patterns before tackling greater structural diversity.
While DeepMS²Reasoner addresses “predicting mass spectra from molecular structures,” MS²KOSMOS further tackles “how to search across billions of molecules.” MS²KOSMOSGenerator represents each predicted spectrum as a sparse vector composed of fragment formulas and builds an inverted index. When faced with an unknown query spectrum, the system does not compare against every one of hundreds of millions of candidate molecules individually. Instead, it first identifies candidates sharing common fragment formulae with the queried spectrum. These candidates are then re-predicted under actual collision energy conditions and similar experimental parameters by MS²KOSMOSMapper, ranked accordingly, and their corresponding fragmentation directed acyclic graphs (DAGs) returned simultaneously.

From Predicted Mass Spectra to Elucidating Unknown Molecules
The study first evaluated DeepMS²Reasoner on fundamental mass spectrum prediction tasks. On an independent test set of NIST 2020, the average cosine similarity between predicted and experimental spectra reached 0.83, with a median of 0.89; other comparative models yielded averages ranging from 0.61 to 0.75. On completely independent datasets such as CASMI 2022 and MassSpecGym, DeepMS²Reasoner achieved average cosine similarities of 0.67 and 0.59 respectively, both being the highest among all participating models. Taking CASMI as an example, in over 40% of samples, DeepMS²Reasoner produced predicted spectra closest to the experimental results compared to all baseline models.
A more challenging task than merely predicting mass spectra is reverse-engineering correct molecules based on experimental spectra. The research placed true structures alongside numerous candidates with similar masses or structural features into retrieval benchmarks. In full-isomer tests conducted at CASMI, DeepMS²Reasoner's top-1 accuracy was 35.6%, while its top-10 and top-50 accuracies were 64.4% and 79.8% respectively — surpassing second-place FraGNNet by more than ten percentage points in terms of top-1 and top-10 performances.
Model capabilities handling multi-step fragmentation processes were also validated using specific compounds like biotin where the cosine similarity between predicted and actual spectral profiles reached up to 0.88. Some major fragments cannot form through single bond cleavage but require consecutive steps involving group removal ring opening further breakdown etcetera which this model successfully captures along corresponding pathways varying according collision energies leading different degrees breakage patterns observed experimentally under various conditions tested during evaluation phases reported herein today!

Performance of DeepMS² Reasoner in Mass Spectrometry Prediction
Following this, the study applied AIMe to the elucidation of truly unknown metabolites. Among the 111 unidentified microbiota-dependent signals identified in the mouse metabolome, approximately one-third could be matched with known compounds exhibiting high similarity using MS²KOSMOS, while the remainder were more likely to correspond to structures that have yet to be described.
Researchers further selected two unknowns for structural elucidation. Based on the fragment structures provided by AIMe, they combined various candidate molecules and predicted their MS/MS spectra to compare with experimental results. For one of the unknowns, the best initial candidate achieved a cosine similarity of 0.79 but still lacked several key fragments observed experimentally. Consequently, the research team considered cyclized structures and identified a rare macrocyclic polyamine derivative. Both candidate structures were ultimately validated through chemical synthesis and comparison of retention times and MS/MS spectra; this included a polyamine structure previously unreported in mice or humans. Further searches revealed that multiple related metabolites also exist in human samples.
Finally, the study extended AIMe to over 7.14 million consensus mass spectra in the GNPS database. Using a cosine similarity threshold of 0.7, approximately 2.69 million spectra received candidate annotations, accounting for about one-third of the total queries; raising the threshold to 0.8 yielded an additional ~1.27 million high-similarity annotations corresponding to more than 26 million originally unannotated raw mass spectra in GNPS. Thus, the application scope of AIMe expanded from predicting single-molecule mass spectra to annotating unknowns at the scale of entire databases.
*LARGE-SCALE ANNOTATION RESULTS OF AIMe ON THE GNPS DATABASE*
These findings do not imply that small molecule structural identification has been fully automated. As molecular weight increases, possible fragmentation pathways significantly multiply, while coverage of large molecules in training data remains relatively insufficient, leading to decreased predictive performance of DeepMS²Reasoner. More importantly, MS/MS alone is often inadequate for definitive structural confirmation. According to metabolomics standards, when independent evidence such as retention time, NMR, or authentic standards is lacking, results generated by AIMe primarily belong to Level 3 annotation. Their role lies mainly in narrowing down candidates, proposing structural hypotheses, and explaining fragmentation rationale; final confirmation still requires experimental validation.
Conclusion
The significance of AIMe extends beyond merely improving spectral prediction accuracy—it attempts to transform how we analyze unknown small molecules. Previously, researchers facing an unknown spectrum could typically search only within limited-size experimental libraries for direct matches. In contrast, AIMe first uses models to convert known small molecule space into a searchable predicted spectral space, then gradually narrows down candidates using fragment structures and fragmentation paths. While it currently cannot replace standard compounds, NMR, or other forms of experimental verification, it enables deeper tracking of signals that would otherwise remain difficult to analyze due to "lack of reference spectra."
For metabolomics, this may be even more important than simply adding new library entries: Unknown mass spectra are no longer restricted to just “matched” or “not matched,” but can now serve as starting points for generating and testing structural hypotheses.

