Molecular property prediction using pretrained-BERT and Bayesian active learning: a data-efficient approach to drug design

Muhammad Arslan Masood, Samuel Kaski, Tianyu Cui

Introduction

In drug discovery, identifying molecules with specific biological properties—such as efficacy or toxicity—is a resource-intensive process. Traditional experimental methods are costly and time-consuming. While machine learning offers a way to accelerate this search, standard deep learning models often struggle with the "cold-start" problem: they require large amounts of labeled data to perform well, which is exactly what is missing in the early stages of drug design.

A recent study by Masood et al. addresses this bottleneck by combining the representational power of pretrained transformer models with the strategic sampling of Bayesian active learning. This approach, detailed in the Journal of Cheminformatics, demonstrates that "chemical intuition" gained from large-scale pretraining can significantly reduce the data needed for accurate molecular property prediction.

The Challenge: Data Scarcity and Calibration

Active Learning (AL) is an iterative process where a model selects the most informative unlabeled samples for experimental testing. However, when starting with very few samples, deep learning models often become "confidently wrong"—a state of poor uncertainty calibration. If a model cannot accurately gauge its own ignorance, it fails to select the truly informative molecules that would improve its performance, leading to inefficient AL cycles.

Methodology: MolBERT and Bayesian Uncertainty

The proposed framework decouples the understanding of molecular structure from the prediction of specific properties through a three-pillar approach:

  1. High-Quality Representations: Instead of using traditional molecular fingerprints, the researchers utilized MolBERT, a BERT-based transformer pretrained on 1.26 million unlabeled molecules. This allows the model to leverage a sophisticated "map" of chemical space from the start.
  2. Bayesian Neural Networks: To quantify uncertainty, the team employed a Multi-Layer Perceptron (MLP) with Monte Carlo (MC) Dropout. By sampling multiple predictions for a single molecule, the model can measure variance, identifying areas where it lacks confidence.
  3. Advanced Acquisition Functions: The study compared different strategies for selecting new data points, notably BALD (Bayesian Active Learning by Disagreement) and EPIG (Expected Predictive Information Gain). EPIG, in particular, focuses on reducing uncertainty relative to a specific target test set.

The Importance of Feature Quality

A key finding of the research is that the choice of molecular representation is more critical than the active learning algorithm itself. Traditional Extended-Connectivity Fingerprints (ECFP) often result in a fragmented view of chemical space, making it harder for the model to generalize from small datasets.

Performance comparison using traditional ECFP features on the ClinTox dataset.

As shown in Figure 6, even with advanced acquisition functions, the performance gains using ECFP features are gradual, highlighting the limitations of non-pretrained representations in low-data regimes.

Key Results: Efficiency and Accuracy

The integration of MolBERT with Bayesian AL yielded substantial improvements across several benchmarks, including Tox21 and ClinTox. The researchers observed a 50% efficiency gain, meaning the model reached target accuracy levels with half the experimental iterations required by traditional methods.

Comparison of acquisition functions (EPIG, BALD, and Random) showing the rapid performance improvement of Bayesian strategies.

In Figure 5, the superiority of active learning strategies like EPIG and BALD over random sampling is evident. These methods allow the model to "fill the gaps" in its knowledge much faster. For instance, on the ClinTox dataset, the model identified 70% of toxic compounds in just 266 iterations, whereas a random search required 600 iterations to achieve the same result.

Conclusion and Future Directions

By leveraging pretrained chemical knowledge, researchers can bypass the data-hungry nature of deep learning. The combination of MolBERT and EPIG provides a robust framework for drug discovery that is both data-efficient and well-calibrated. While challenges such as "distribution mismatch" remain, this work paves the way for more autonomous and cost-effective molecular screening.

Source: Masood, M.A., Kaski, S. & Cui, T. Molecular property prediction using pretrained-BERT and Bayesian active learning: a data-efficient approach to drug design. J Cheminform 17, 58 (2025).

Summary updated

BibTeX
@article{masood2025molecular,
  author = {Muhammad Arslan Masood and Samuel Kaski and Tianyu Cui},
  title = {{Molecular property prediction using pretrained-BERT and Bayesian active learning: a data-efficient approach to drug design}},
  journal = {J. Cheminformatics},
  year = {2025},
  doi = {10.1186/s13321-025-00986-6},
}
Figure