Active Learning Improves Ionization Efficiency Predictions and Quantification in Nontargeted LC/HRMS

Wei‐Chieh Wang, Nahid Amini, Carolin Huber, Meelis Kull, Anneli KruveAnalytical 2025 · DOI

TL;DR

This paper tackles the challenge of accurately quantifying chemicals in complex samples using liquid chromatography-mass spectrometry (LC/HRMS) when analytical standards are scarce. They demonstrate that active learning, a machine learning strategy that intelligently selects new data points for training, significantly improves prediction accuracy for ionization efficiency (IE), leading to more reliable quantification of unknown compounds.

What Problem Does This Paper Address?

Nontargeted screening (NTS) using LC/ESI/HRMS is a powerful tool for identifying thousands of chemicals in complex samples. However, a major bottleneck is the lack of commercially available analytical standards for most detected compounds, making accurate quantification difficult. Machine learning (ML) models can predict ionization efficiency (IE) to overcome this, but their accuracy plummets when dealing with chemicals structurally different from the training data. This gap in chemical space coverage is a significant limitation. The authors aim to address this by using active learning (AL) to strategically expand the training dataset, thereby improving IE prediction accuracy and, consequently, the reliability of quantification in NTS.

Methods

The core of this study is the evaluation of different active learning (AL) strategies for improving IE prediction models. They compared four AL approaches – clustering-based, uncertainty-based, mix (combining clustering and uncertainty), and anticlustering – against a random sampling baseline. These AL methods intelligently select new chemicals from an "unexplored" chemical space to add to the existing "explored" training data. The selection criteria for AL were based on factors like diversity, representativeness, and informativeness of the data points.

Key techniques include:

  • PaDEL descriptors: Used to numerically represent chemical structures.
  • Extreme Gradient Boosting (xgBoost): The ML algorithm employed for predicting log IE.
  • UMAP (Uniform Manifold Approximation and Projection): Used for visualizing the chemical space and assessing overlap between explored and unexplored regions.
  • k-means clustering: Applied within AL strategies to group chemicals.
  • Quantile regression forest: Used for uncertainty-based AL to estimate prediction intervals.

The study also involved a rigorous performance evaluation through repeated cross-validation and a final assessment of quantification accuracy on a real-world sample.

Datasets

The study utilized two main sets of chemical data:

  • Explored Space: An initial training dataset consisting of 81 unique chemicals, primarily carboxylic acids and phenols, measured under various mobile phase conditions, resulting in 1009 data points.
  • Unexplored Space: This dataset comprised 369 chemicals from four distinct chemical classes:
  • Per- and polyfluorinated chemicals (PFAS)
    • Hydroxylated polychlorinated biphenyls (OH-PCBs)
    • Natural products
    • Environmental contaminants (pesticides, pharmaceuticals, etc.)

The PFAS and OH-PCBs datasets were sourced from previous publications, while the natural products and environmental contaminants datasets were measured specifically for this study. This diverse "unexplored" space was crucial for testing the AL strategies' ability to bridge chemical gaps.

Key Insights and Ideas

  • Chemical Space Exploration is Crucial: The visualization (UMAP) and distance metrics clearly showed a poor overlap between the initial training data and the unexplored chemical space, underscoring the necessity of AL for improving model generalizability.
  • Active Learning Dramatically Reduces Errors: Even a single AL iteration, especially with intelligent sampling, led to a significant drop in prediction error (RMSE) for IE. This highlights the immediate benefit of strategically adding new data.
  • Different AL Strategies Excel at Different Stages: Uncertainty-based AL was most effective when sampling a few chemicals at a time, while anticlustering and random sampling generally performed well across the board, emphasizing the importance of diversity. Clustering-based AL was less effective, especially in early stages.
  • Sampling Number Matters: The number of chemicals sampled per iteration (nsample) significantly impacted AL performance. For uncertainty-based AL, a smaller nsample was more practical to maintain diversity.
  • Descriptor Importance Shifts: As AL expanded the training data, the importance of certain chemical descriptors changed, with new descriptors being introduced and others becoming less influential, reflecting the model's learning of new chemical patterns.
  • Improved Quantification in Real Samples: Expanding the chemical space through AL directly translated to improved quantification accuracy for natural products in a real plant extract, demonstrating the practical utility of the approach.

Key Results

  • The Root Mean Squared Error (RMSE) of IE predictions dropped significantly (up to 0.3 log units) after just one AL iteration.
  • After sampling approximately 6% of the chemicals, the mean RMSE pooled decreased to 1.22-1.25 log IE units, and further decreased to around 0.99 log IE units after 20 iterations, depending on the algorithm.
  • Quantification accuracy for five natural products in Alpinia officinarum extract improved from a fold error of 4.13× to 2.94× after chemical space expansion via AL.
  • Anticlustering and random sampling generally showed better performance in reducing RMSE pooled compared to clustering-based and mix sampling.
  • Uncertainty-based AL was inefficient when sampling ten or more chemicals per iteration, reducing its practicality.

Limitations and Future Work

  • Limited Chemical Space: The authors acknowledge that the explored chemical space was relatively small, which might have influenced the performance differences between some AL strategies, particularly for larger sampling numbers.
  • Potential for Overfitting: The cost-based sampling approach showed a potential for overfitting and inefficient exploration, suggesting that simply choosing the cheapest chemicals is not an optimal strategy.
  • Discrepancies in Ionization Mechanisms: The observed increase in RMSE pooled in some cross-validation scenarios suggests potential differences in ionization mechanisms or measurement procedures between the explored and unexplored chemical spaces. This highlights the need to balance training data from both.

Future work could involve:

  • Investigating AL strategies on larger and more diverse chemical spaces.
  • Developing combined AL approaches that leverage the strengths of different strategies.
  • Exploring cost-optimized AL strategies that balance chemical accessibility with informative sampling.
  • Further research into the impact of different ionization mechanisms on model performance and how to mitigate these effects.

Summary updated

Abstract

Liquid chromatography electrospray ionization high-resolution mass spectrometry (LC/ESI/HRMS) is frequently employed in nontargeted screening (NTS) due to its high selectivity and sensitivity. However, data interpretation is challenging since the number of chemical standards available for quantification is limited and the response of the chemicals vastly differs depending on their structure and analysis conditions. Therefore, machine learning (ML) models have been utilized to predict ionization efficiency (<i>IE</i>) and enable the quantification of detected chemicals. It has been observed that the error in the predictions is high for chemicals structurally different from the training data. To enlarge the training set and to accurately predict the IE given a limited labeling budget, active learning (AL) is proposed to acquire informative data points from the targeted chemical space. In the current study, four AL approaches (clustering-based, uncertainty-based, mix, and anticlustering) and a baseline approach (random) were evaluated for <i>IE</i> prediction. The RMSE of the <i>IE</i> in the targeted space dropped significantly (up to 0.3 log units) after a single AL iteration, highlighting the necessity of chemical space exploration before ML model execution. Clustering-based AL reduced the RMSE least, while the uncertainty-based AL was inefficient if ten or more chemicals were sampled in one iteration, thereby reducing its practicality. Finally, expanding the chemical space improved the quantification accuracy from a fold error of 4.13× to 2.94× for five natural products in <i>Alpinia officinarum</i>, thereby demonstrating the need for updating the chemical space coverage of the training set.
BibTeX
@inproceedings{wang2025active,
  author = {Wei‐Chieh Wang and Nahid Amini and Carolin Huber and Meelis Kull and Anneli Kruve},
  title = {{Active Learning Improves Ionization Efficiency Predictions and Quantification in Nontargeted LC/HRMS}},
  booktitle = {Analytical},
  year = {2025},
  doi = {10.1021/acs.analchem.5c00816},
}
Figure