Introduction: The Challenge of DILI Prediction
Predicting drug-induced liver injury (DILI) is a critical yet notoriously difficult task in drug development. DILI remains a leading cause of clinical trial failures and post-marketing withdrawals. The primary obstacle in modeling toxicity is the inherent "data imbalance": most drugs are safe, resulting in datasets where negative instances vastly outnumber the rare toxic examples. Standard machine learning models often become biased toward the majority class, achieving high nominal accuracy by simply predicting "safe" for every compound, thereby failing to identify the actual toxic threats.
Methodology: MolBERT and Advanced Loss Functions
To address these challenges, this research utilizes a multi-modal, multi-task deep learning framework. The core of the architecture is MolBERT, a BERT-based model pre-trained on 1.6 million compounds to learn a robust "chemical grammar" from SMILES strings. By treating molecular representations as a language, MolBERT captures complex structural information more effectively than traditional molecular fingerprints like ECFP.
To combat class imbalance, the study evaluates four distinct loss functions:
- Binary Cross-Entropy (BCE): The standard baseline.
- Weighted-BCE (w-BCE): Assigns higher costs to misclassifying toxic samples.
- Focal Loss (FL): Introduces a modulating factor that down-weights the loss for easy, well-classified examples (safe drugs) and focuses the model’s attention on hard, misclassified ones (toxic drugs).
- Weighted Focal Loss (w-FL): Combines both weighting and focal modulation for maximum sensitivity to rare toxic events.
Data Modalities and Imbalance
The framework integrates data across three distinct modalities to create a comprehensive toxicity profile:
- Preclinical Histopathology: 12 endpoints from the TG-GATES database.
- Biochemistry/Blood Markers: Clinical markers such as ALT, AST, and Bilirubin.
- Clinical Adverse Drug Reactions (ADRs): Extracted from drug labels via the SIDER database.
The final dataset comprised approximately 1,554 unique molecules. Analysis revealed that models performed significantly better on biochemistry-related tasks than on clinical ADRs, likely due to the higher biological complexity and noise inherent in human clinical data compared to controlled preclinical studies.
Results: The Efficacy of Frozen Features and Focal Loss
A key finding of the study is the performance difference between "frozen" and "fine-tuned" models. Interestingly, using MolBERT as a static feature extractor (frozen) consistently yielded better results when paired with weighted loss functions. Fine-tuning the BERT architecture often led to inconsistent performance or "negative transfer," possibly due to the relatively small size of toxicity datasets causing overfitting.
As shown in the performance plots, the Frozen MolBERT + Weighted Focal Loss configuration emerged as the superior approach. Transitioning from standard BCE to Weighted Focal Loss in the frozen model resulted in steady improvements across all key metrics:
- Balanced Accuracy (BA): Improved from ~0.68 to 0.72.
- F1-Score: Increased from ~0.37 to 0.40.
- ROC-AUC: Reached 0.70 for the best multi-task configurations.
Discussion and Limitations
While the combination of MolBERT and Focal Loss represents a significant step forward, limitations remain. Certain pathological changes proved "unlearnable" by the model, suggesting that some toxicity mechanisms require data modalities beyond chemical structure, such as gene expression or 3D structural data. Furthermore, despite the integration of multiple databases, the sample size of ~1,500 compounds is still small for deep learning. Future work will focus on incorporating larger unlabeled chemical libraries and diverse "omics" data to further enhance predictive power.
Summary updated