Abstract
Tandem mass spectrometry (MS/MS) is a powerful technique for structural identification of small molecules, yet a significant portion of MS/MS spectra from untargeted experiments remain unidentifiable through spectrum library matching. ModiFinder, a computational tool, tackles this issue by predicting the site of chemical modifications on known analogs of the unidentified compounds using MS/MS data. However, ModiFinder's performance is limited by insufficient peak data and fragmentation annotation ambiguities. In this study, we investigate how incorporating MS/MS spectra from multiple collision energies and mass spectrometry adducts can enhance ModiFinder’s localization accuracy. Using a dataset from Agilent Technologies comprising 2,150 data-rich compounds -five times larger than previously available datasets- we evaluated the impact of complementary spectral information. Our results show that combining spectra from different adducts and collision energies expands ModiFinder's localization abilities to more compounds and improves the overall performance.
Keywords: Mass Spectrometry, Library Search, Structural identification, Modification Site localization
Introduction
Tandem mass spectrometry (MS/MS) is a robust technique for identifying small molecule structures1. However, converting MS/MS spectra into accurate 2D chemical structures remains a significant challenge2. While methods like spectrum library matching have proved to be a powerful approach in compound identification3, on average 87% of MS/MS spectra from untargeted mass spectrometry experiments remain unidentifiable by library search4. The ModiFinder5 approach reframes the identification challenge of identifying putative new analogs to the computational problem of localizing chemical transformation on known molecules. By utilizing MS/MS data of structurally similar compounds, ModiFinder has been shown to be able to produce a prediction of the likelihood of the site of a structural modification. However, the key limitations of the ModiFinder approach focus on two key areas: first, too few MS/MS peaks and second, the ambiguity of MS/MS fragmentation annotation. In this manuscript, we address the first by investigating how increases in the number and potential complementarity of MS/MS peaks can enhance ModiFinder performance. Specifically, we explored how the incorporation of different collision energies and mass spectrometry adducts enhance ModiFinder localization performance. We have analyzed ModiFinder across multiple collision energies and adduct types and present merging methods that integrate this information into an ensemble learning framework and assess the performance.
Results
Dataset for Evaluation
In this manuscript, we describe several extensions to ModiFinder that utilize domain-specific insights. Specifically, we explore employing multiple collision energies and combining multiple adducts to observe the effect of localization with ModiFinder. This investigation is now only possible due to the comprehensive nature of MS/MS libraries utilized in this study. Figure 1-A shows that the GNPS6 dataset as one of the biggest public datasets contains 418 unique compounds that have scans available for both [M+H] and [M−H] adducts and three distinct collision energies in comparison to 1203 and 947 (2150) unique compounds analyzed in this manuscript.
Figure 1. Datasets Comparison –

A. Showing the number of scans in each dataset, the number of unique compounds, and the number of Data-Rich unique compounds (Compounds with scans having both [M+H]+ and [M-H]− adduct and collision energy 10, 20, 40 V). B. The distribution of adducts and collision energies in the datasets.
We evaluated the results on two datasets provided by Agilent Technologies. namely Metlin, and Applied Markets comprising 10833, 6105 unique compounds from the Agilent MS/MS library, called Agilent library [Fig. 1]. The MS/MS dataset includes MS/MS with various collision energies, but we have limited our analysis to 10, 20, and 40 V collision energies as they account for more than 98% of the dataset (Figure 1 C). Although 18 unique adducts are present, we limited our analysis to [M+H] and [M−H], which account for more than 96% of the dataset [Fig. 1 B] (The distribution of compounds based on their mass is shown in SI figure SI-1). We call the compounds that have all the 6 scans - both adducts of interest ([M+H] and [M−H]) and the 3 collision energies (10, 20, and 40V) - the “Data-Rich” Compounds. There are 1203 and 947 Data-Rich compounds in Metlin and Applied Markets respectively. From these Data-Rich Compounds, we identified pairs of compounds differing by exactly one modification site, 539 (170) pairs were detected spanning 420 (248) compounds for the Metlin (Applied Markets) dataset. In comparison, there are 179 pairs available in GNPS (SI Note 1).
Our findings indicate that increasing collision energies enhance ModiFinder’s ability to analyze pairs previously unmanageable. However, the benefits plateau beyond a certain threshold due to increased ambiguity. Additionally, ModiFinder’s performance on [M-H] ion pairs is generally inferior to that on [M+H] pairs, we attribute this to [M-H] ion pairs being more challenging to annotate. Lastly, employing an ensemble approach combining [M-H] and [M+H] substantially improves the pool of potential pairs ModiFinder can perform confidently.
Effect of collision energy on ModiFinder performance
We evaluated the effect of collision energy on ModiFinder’s localization performance. Broadly, as collision energy increases, the number of peaks rises, leading to an increased number of matched peaks and the number of annotated matched peaks [Fig. 2]. However, the number of annotated peaks alone is not enough of a measure for the performance of ModiFinder, our data shows that the Collision energy 20V scores higher than both 10V and 40V on both Agilent datasets when using the Average-Distance metric [Fig. 3 - A & B]. By increasing the collision energy from 10V to 40V, we found that 165 compounds which could not localize a modification in 10V, were now localizing significantly better [Fig. 4]. Moreover, Figure 4 shows that no specific collision energy consistently yields better results with ModiFinder, though experiments show 20V performs the best on average [Fig. 3].
Figure 2. Distribution of peaks and annotated peaks with respect to collision energy:

The number of Peaks and annotated peaks for each collision energy for the two datasets combined. As the collision energy increases, the number of peaks and annotated peaks also increases.
Figure 3. ModiFinder Result for Different Collision energies across different datasets:

the result of the ModiFinder on different collision energies, Merged Peaks method and Ensemble. A, B The 20V performs better on average than 10V and 40V. C, D While the Average-Distance metric does not show significant improvements between 20V and Merged or Ensemble, the Is-Max metric shows significant improvement from Ensemble in comparison to other collision energies and the merged method.
Figure 4. Pairwise comparison of ModiFinder result for different collision energies:

This figure shows the comparison of the performance of ModiFinder on different collision Energies (For both datasets). Each subgraph shows a scatter plot where the performance of ModiFinder for each match for the respective collision energy is calculated using the average distance metric. To show the effect of increasing collision energy, the number of matches that ModiFinder couldn’t provide any prediction on collision energy 10V, but did provide a prediction on collision energy 40V is highlighted with an blue rectangle (165 matches).
Merging the Multiple Collision Energies
We hypothesized that multiple collision energies could be complementary in site localization performance. We merged MS/MS peaks from different collision energies of the same compound and adduct (see the methods section on "Merging the MS/MS Peaks for Different Collision Energies"). By naively merging 10, 20, and 40V into a single MS/MS spectrum, we did not observe a difference in localization performance using the average distance metric [Fig. 3]. However, merging MS/MS spectra is shown to improve localization performance over the individual collision energy spectra when using the Is-Max evaluation method from 20V, up to 60 percent [Fig. 3].
This difference is rooted in the underlying construction of these methods. The Average-Distance method takes both ambiguity and proximity into account, while the Is-Max method focuses solely on the highest-scoring atoms in the localization—specifically, identifying the true modification site without considering the ambiguity from other closely scoring atoms scattered across the molecule. As more peaks are annotated, the probability of correctly identifying the modification site increases, leading to higher proximity scores. However, this also flattens the scoring distribution, increasing ambiguity and resulting in only modest changes to the average-distance score. However, the Is-Max method remains largely unaffected by this ambiguity as the additional annotated peaks typically include the true modification site. As a result, the Proximity score mostly increases, leading to a higher overall Is-Max score. This effect can be seen on the scatter plot comparing 20V energy and the merged dataset for both scoring methods on the Metlin dataset [Fig. 5-A]. Figure 5 plot B shows an example for the case where the Average-Distance decreases but the Is-Max remains the same.
Figure 5. Impact of Merging Peaks on ModiFinder Performance:

This figure shows that by merging the peaks, the performance of ModiFinder does not improve for all the pairs. A While the Average-Distance shows no clear advantage on datapoints that had a prediction on collision energy 20 (score above 0), the Is-Max function clearly shows merging the peaks improves the chance of assigning the highest score to the true modification site. B, C The newly added peaks provide new information; however, they introduce ambiguities. These ambiguities in some cases will result in a complete miss prediction (plot C), or a more ambiguous prediction resulting in a lower Average-Distance Evaluation score (plot B).
Ensemble Learning by Merging the Predictions
As an alternative approach to merging all energies into a single MS/MS spectrum, the ensemble approach aims to merge the localization predictions of several pairs of MS/MS spectra. Specifically, localization predictions were created for pairs of 10 V, 20 V, and 40 V spectra separately, with the predictions merged [Section Merging the Predictions (Ensemble)]. We observed that this ensemble approach improved the localization performance of ModiFinder on the Is-Max evaluation method by up to 75% compared to its performance on individual collision energy spectra. However, the performance of the Ensemble method on the Average-Distance metric did not surpass that of the individual methods, for reasons similar to those discussed for the merged peaks [SI Figure SI-3].
Comparisons with Oracle
Comparing ModiFinder's performance, when more experiments and scans are available (merged peaks or ensemble) with its oracle performance on individual sets [SI Figure SI-5], demonstrates its potential superiority to the oracle. This is promising because it suggests that increasing the amount of data can mitigate one of ModiFinder’s main Achilles' heels: ambiguity in peak annotation.
Polarity Adducts Effect on ModiFinder Performance
We investigated the complementarity of different adducts in the localization of modification sites with ModiFinder. Specifically, we used [M+H] and [M−H] as the most prevalent adducts in the dataset. Initial evaluation of ModiFinder’s performance given [M+H] and [M−H] adducts shows that ModiFinder performs considerably better in positive mode in Average-Distance Metric (Fig. 6). This difference in performance can be attributed in part to the negative mode having fewer peaks and fewer annotated matched peaks (Fig. 7). Although having more annotated matched peaks can sometimes lead to increased ambiguity - hence, not improving the evaluation score-, having fewer than a certain threshold of these peaks means there is less critical information for ModiFinder to utilize effectively.
Figure 6. Performance of ModiFinder on each adduct individually and as an ensemble:

The result of ModiFinder for different adducts shows that ModiFinder performs better on positive mode. "Ensemble Individual" represents the predictions generated by merging results from the same collision energy but different polarities. The " Ensemble Merged" predictions are based on the combined MS/MS spectra from both polarities.
Figure 7. Distribution of peaks and annotated peaks with respect to Adduct:

A The number of peaks B The number of annotated peaks based on the adduct. C Color Filled bars show the of the number of pairs where ModiFinder was able to outperform the random baseline. Out of all 683 pairs of compounds, Positive mode is able to outperform random localization more than Negative mode. Further, the Ensemble approach integrating Positive and Negative increases the number of MS/MS pairs that can improve over random localization.
Ensemble Learning by Merging the Predictions
We combined the predictions from [M+H] and [M−H] adducts using the ensemble method. First, each pair of the same collision energy and different polarity are combined to generate a new prediction. The result is reported as the Ensemble Individual in Figure 6. Then, instead of the individual scans, an aggregate MS/MS is generated using the merge peaks method and then the ensemble prediction is generated using these spectra. Although none of this did improve the evaluation score [Fig. 6], the number of compound pairs where ModiFinder would be applicable increased significantly [Fig. 7-C]. Figure 7-C shows a diagram of the number of pairs where ModiFinder is able to outperform the random baseline. Specifically, the positive mode could not provide answers or perform better for 125 pairs, and the negative mode could not provide answers for 208 pairs. After merging the predictions, this number was reduced to 106 pairs, thereby decreasing the space of unanswered pairs by 15%. Additionally, the total number of pairs ModiFinder predicts it can provide reliable info on increases from 599 and 588 (positive and negative mode respectively) to 632. This suggests that in cases where ModiFinder could not accurately annotate the peaks in one polarity mode and provide a reliable answer, there is a chance for it to succeed in the other polarity. Therefore, collecting MS/MS of multiple adducts may not necessarily enhance ModiFinder prediction accuracy for cases already predicted with relatively high confidence [Fig. 6], but these data can extend the coverage to more compounds that initially had low ModiFinder prediction confidence due to a lack of annotated peaks.
Discussion
In this manuscript we utilized a subset of a dataset from Agilent Technologies Inc. that included compounds that were comprehensively acquired under a consistent and wide range of collision energies and adducts to evaluate ModiFinder site localization performance. This filtered Agilent dataset included 2,150 “Data-Rich” compounds and expanded upon publicly accessible datasets from GNPS by at 5 fold, enabling a more comprehensive exploration of the effect of collision energy and adducts on ModiFinder performance.
Our findings suggest that increasing the availability of MS/MS spectra from different adducts and energies positively impacts ModiFinder's site localization performance in both MF-R and MF-O modes. Specifically, data acquired under varying adducts appeared to be complementary, allowing ModiFinder to better utilize certain compound pairs, thereby providing previously unavailable information and leading to higher localization evaluation scores. However, this performance improvement is sometimes offset by cases where the additional data either did not contribute significant critical information or increased ambiguity, resulting in lower evaluation scores.
Conclusion
We conclude that increasing the amount of spectral information from different adducts and energies generally helps ModiFinder maintain its average performance across more compound pairs. However, to achieve further performance improvements, we suggest that implementing drastically different fragmentation mechanisms is necessary to enhance ModiFinder's capabilities.
Methods
Implemented the negative adduct support
Expanding upon the original ModiFinder to add the support for negative adducts, a new module to calculate adducts mass was developed. While there are tools to calculate the adduct mass, such as MSAC7, the need to integrate this with other aspects of ModiFinder required developing our own module and integrating that with any part of the algorithm that uses the peaks’ m/z to assign an annotation or adjusting a formula. This included the refinement by SIRIUS8, refinement by msbuddy9, and the substructure annotation. For the peak annotation step, when each substructure was created, the mass of the adduct was calculated and the mass of the substructure was adjusted with the calculated mass. Then, the same procedure as the original ModiFinder was taken and peaks within the threshold of the adjusted substructure mass were annotated by that substructure. The supported adducts and their mass are listed as follows: [M+H]+, [M+Na]+, [M-H]−, [M+NH4]+, [M+K]+, [M+Cl]−, [M+Br]−.
Merging the MS/MS peaks for different collision energies
To merge two spectra of the same compound acquired with the same adduct but different collision energies we first copy all the peaks from the smaller collision energy spectrum to the aggregate spectra. Then, we loop through the peaks of the data with the larger collision energy, for each peak pi, we first check if there is any peak within 10 ppm of this peak that exists in the aggregate spectra. If there is, we add the intensity to the current intensity. Otherwise, we add this peak to the aggregate spectrum with its original intensity. Finally, the aggregate spectrum is normalized.
Ensemble Learning, Merging the Predictions
One effective approach for leveraging data from multiple experiments is ensemble learning. In this method, the likelihood predictions from different experiments are combined. To combine the predictions, first a weight is assigned to each prediction. The aggregate likelihood score for each atom is then calculated as the weighted average of its score across the experiments. The weights were chosen two different ways, the first was to assign the same weight to all the experiments, this is the most simple way of combining the predictions. The second method, which proved more effective, assigned weights based on the entropy of the predicted likelihood array. In this approach, higher entropy (indicating more dispersed and less focused predictions) results in lower weights, while lower entropy (indicating more focused predictions) leads to higher weights. The results presented in this manuscript use the entropy-based weighting method, as it generally produces better scores, though the equal-weight method shows a similar overall trend [Figure SI-4].
To report the ensemble results for different collision energies, ModiFinder prediction results from three experiments (using collision energies of 10V, 20V, and 40V) were combined for each matched pair of compounds and adducts. For adducts, the ensemble result was created by merging ModiFinder results from two experiments (positive and negative polarity) for each match.
Supplementary Material
Supporting Information, Names and the SMILES representation of all the compounds used for the analysis in this paper are provided. Additional experimental details including the data processing method for GNPS data and more detailed graphs for the experiments.
The SI file is provided with the submission.
Acknowledgements
MRZS was supported by a gift from Agilent Inc. MW is supported by NIH 5U24DK133658-02. MW WAS PARTIALLY SUPPORTED by the U.S. Department of Energy Joint Genome Institute (https://ror.org/04xm1d337), a DOE Office of Science User Facility, is supported by the Office of Science of the U.S. Department of Energy operated under Contract No. DE-AC02-05CH11231.
Footnotes
Availability of data and materials
The GNPS dataset analyzed during the current study is available in Zenodo, https://doi.org/10.5281/zenodo.1119389810
The list of data-rich compounds used for this analysis is available as a supplementary file submitted with this manuscript.
The MS/MS data that support the findings of this study are available from Agilent Technologies, but restrictions apply to the availability of these data, which were used under license for the current study, and so are not publicly available. Data are however available from the authors upon reasonable request and with permission of Agilent Technologies.
Competing interests
MW is a co-founder of Ometa Labs LLC
References
- (1).Schrimpe-Rutledge AC; Codreanu SG; Sherrod SD; McLean JA Untargeted Metabolomics Strategies-Challenges and Emerging Directions. J. Am. Soc. Mass Spectrom 2016, 27 (12), 1897–1905. 10.1007/s13361-016-1469-y. [DOI] [PMC free article] [PubMed] [Google Scholar]
- (2).McLuckey SA Principles of Collisional Activation in Analytical Mass Spectrometry. J. Am. Soc. Mass Spectrom 1992, 3 (6), 599–614. 10.1016/1044-0305(92)85001-Z. [DOI] [PubMed] [Google Scholar]
- (3).Stein SE; Scott DR Optimization and Testing of Mass Spectral Library Search Algorithms for Compound Identification. J. Am. Soc. Mass Spectrom 1994, 5 (9), 859–866. 10.1016/1044-0305(94)87009-8. [DOI] [PubMed] [Google Scholar]
- (4).Bittremieux W; Wang M; Dorrestein PC The Critical Role That Spectral Libraries Play in Capturing the Metabolomics Community Knowledge. Metabolomics 2022, 18 (12), 94. 10.1007/s11306-022-01947-y. [DOI] [PMC free article] [PubMed] [Google Scholar]
- (5).Shahneh MRZ; Strobel M; Vitale GA; Geibel C; Abiead YE; Garg N; Wagner B; Forchhammer K; Aron A; Phelan VV; Petras D; Wang M. ModiFinder: Tandem Mass Spectral Alignment Enables Structural Modification Site Localization. J. Am. Soc. Mass Spectrom 0 (0), null. 10.1021/jasms.4c00061. [DOI] [PMC free article] [PubMed] [Google Scholar]
- (6).Wang M; Carver JJ; Phelan VV; Sanchez LM; Garg N; Peng Y; Nguyen DD; Watrous J; Kapono CA; Luzzatto-Knaan T; Porto C; Bouslimani A; Melnik AV; Meehan MJ; Liu W-T; Crüsemann M; Boudreau PD; Esquenazi E; Sandoval-Calderón M; Kersten RD; Pace LA; Quinn RA; Duncan KR; Hsu C-C; Floros DJ; Gavilan RG; Kleigrewe K; Northen T; Dutton RJ; Parrot D; Carlson EE; Aigle B; Michelsen CF; Jelsbak L; Sohlenkamp C; Pevzner P; Edlund A; McLean J; Piel J; Murphy BT; Gerwick L; Liaw C-C; Yang Y-L; Humpf H-U; Maansson M; Keyzers RA; Sims AC; Johnson AR; Sidebottom AM; Sedio BE; Klitgaard A; Larson CB; P CAB; Torres-Mendoza D; Gonzalez DJ; Silva DB; Marques LM; Demarque DP; Pociute E; O’Neill EC; Briand E; Helfrich EJN; Granatosky EA; Glukhov E; Ryffel F; Houson H; Mohimani H; Kharbush JJ; Zeng Y; Vorholt JA; Kurita KL; Charusanti P; McPhail KL; Nielsen KF; Vuong L; Elfeki M; Traxler MF; Engene N; Koyama N; Vining OB; Baric R; Silva RR; Mascuch SJ; Tomasi S; Jenkins S; Macherla V; Hoffman T; Agarwal V; Williams PG; Dai J; Neupane R; Gurr J; Rodríguez AMC; Lamsa A; Zhang C; Dorrestein K; Duggan BM; Almaliti J; Allard P-M; Phapale P; Nothias L-F; Alexandrov T; Litaudon M; Wolfender J-L; Kyle JE; Metz TO; Peryea T; Nguyen D-T; VanLeer D; Shinn P; Jadhav A; Müller R; Waters KM; Shi W; Liu X; Zhang L; Knight R; Jensen PR; Palsson BO; Pogliano K; Linington RG; Gutiérrez M; Lopes NP; Gerwick WH; Moore BS; Dorrestein PC; Bandeira N. Sharing and Community Curation of Mass Spectrometry Data with Global Natural Products Social Molecular Networking. Nat. Biotechnol 2016, 34 (8), 828–837. 10.1038/nbt.3597. [DOI] [PMC free article] [PubMed] [Google Scholar]
- (7).Blumer MR; Chang CH; Brayfindley E; Nunez JR; Colby SM; Renslow RS; Metz TO Mass Spectrometry Adduct Calculator. J. Chem. Inf. Model 2021, 61 (12), 5721–5725. 10.1021/acs.jcim.1c00579. [DOI] [PMC free article] [PubMed] [Google Scholar]
- (8).Dührkop K; Fleischauer M; Ludwig M; Aksenov AA; Melnik AV; Meusel M; Dorrestein PC; Rousu J; Böcker S. SIRIUS 4: A Rapid Tool for Turning Tandem Mass Spectra into Metabolite Structure Information. Nat. Methods 2019, 16 (4), 299–302. 10.1038/s41592-019-0344-8. [DOI] [PubMed] [Google Scholar]
- (9).Xing S; Shen S; Xu B; Li X; Huan T. BUDDY: Molecular Formula Discovery via Bottom-up MS/MS Interrogation. Nat. Methods 2023, 20 (6), 881–890. 10.1038/s41592-023-01850-x. [DOI] [PubMed] [Google Scholar]
- (10).Strobel Michael; Gil-de-la-Fuente Alberto; Shahneh Mohammad Reza Zare; El Abiead Yasin; Bushuiev Roman; Bushuiev Anton; Pluskal Tomáš; Wang Mingxun. A Machine Learning Dataset and Evaluation for Tandem Mass Spectra Similarity Prediction, 2024. 10.5281/zenodo.11193898. [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
