VitroBert: modeling DILI by pretraining BERT on in vitro data

Muhammad Arslan Masood, Anamya Ajjolli Nagaraja, Katia Belaid, Natalie Mesens, Hugo Ceulemans, Samuel Kaski, Dorota Herman, Markus HeinonenJ. Cheminformatics 2025

Introduction

Drug-induced liver injury (DILI) remains a primary cause of attrition in pharmaceutical development and post-market safety withdrawals. Predicting DILI is challenging due to the inherent biological complexity of toxicity—which involves intricate cellular pathway disruptions—and the scarcity of high-quality clinical data. Most toxicity datasets are heavily imbalanced, with safe compounds vastly outnumbering toxic ones. While existing chemical language models like MolBERT effectively capture molecular "grammar" through SMILES strings, they often lack the biological context necessary for accurate safety assessment. This paper introduces VitroBERT, a model designed to bridge this gap by incorporating biological assay data into the pretraining phase.

Methodology

VitroBERT builds upon the Bidirectional Encoder Representations from Transformers (BERT) architecture. Unlike standard molecular BERT models that focus solely on chemical structures and basic physical properties, VitroBERT utilizes a multi-task pretraining strategy.

The VitroBERT framework: Multi-task pretraining on unlabelled data followed by downstream toxicity prediction using a frozen encoder and MLP head.

The model is pretrained with three primary objectives:

  1. Masked Language Modeling (MLM): Learning chemical syntax by predicting masked tokens in SMILES strings.
  2. Physicochemical Property Prediction: Estimating approximately 200 molecular properties, such as solubility and molecular weight.
  3. InvitroHead: A novel objective where the model predicts activity across over 1,200 biological assays, including off-target interactions and ADME (Absorption, Distribution, Metabolism, and Excretion) profiles.

To address the extreme class imbalance typical of toxicity data, the researchers employed a Weighted Focal Loss function. This approach prioritizes "hard" examples—the rare toxic compounds—preventing the model from defaulting to a "safe" prediction for all inputs.

Data and Experimental Setup

The study leveraged extensive datasets for both pretraining and downstream evaluation:

  • Pretraining Data: A combination of an internal Johnson & Johnson dataset (1.26 million compounds across ~1,200 biological tasks) and the public ChEMBL20 database (~445,000 molecules across 1,243 targets).
  • Evaluation Data: Downstream performance was assessed using preclinical rat liver histopathology and biochemistry data (412 molecules), the TG-GATES toxicogenomics database, and the SIDER database for clinical adverse drug reactions.

Results and Discussion

VitroBERT demonstrated significant performance improvements over the baseline MolBERT model in preclinical safety tasks. Specifically, the model achieved a 29% improvement in predicting liver-related biochemical markers and a 16% gain in predicting histopathology endpoints (tissue-level damage).

A key insight from the study is that biological supervision acts as a "secret sauce." While domain adaptation through chemical structure pretraining is beneficial, the inclusion of biological assay data provides a much more substantial leap in predictive power. Furthermore, VitroBERT showed enhanced robustness against class imbalance, maintaining higher precision in scenarios where toxic examples were extremely rare.

However, a notable limitation was observed: VitroBERT did not show significant improvement in predicting human clinical DILI from the SIDER dataset. This suggests that while in vitro data captures many fundamental biological interactions, human DILI involves additional complex, host-specific factors—such as immune system responses and individual genetic variability—that are not yet fully represented in current in vitro assays.

Conclusion

VitroBERT represents a significant step toward "biologically informed" AI for drug safety. By teaching models how molecules interact with biological systems before task-specific training, researchers can substantially improve preclinical toxicity predictions. Future work will focus on integrating more complex data types, such as transcriptomics and cell painting, and exploring adaptation techniques like LoRA to better bridge the gap between animal models and human clinical outcomes.

Summary updated

BibTeX
@article{masood2025vitrobert,
  author = {Muhammad Arslan Masood and Anamya Ajjolli Nagaraja and Katia Belaid and Natalie Mesens and Hugo Ceulemans and Samuel Kaski and Dorota Herman and Markus Heinonen},
  title = {{VitroBert: modeling DILI by pretraining BERT on in vitro data}},
  journal = {J. Cheminformatics},
  year = {2025},
  doi = {10.1186/s13321-025-01048-7},
}
Figure