Abstract
In drug discovery and disease diagnosis, identifying rare "active" compounds within vast libraries of "inactive" molecules presents a significant class-imbalance challenge. This paper introduces BTDT-MBO, a novel framework that integrates bidirectional transformers with graph-based algorithms to classify highly imbalanced molecular data. By combining self-supervised feature extraction, distance correlation-based graph weighting, and dynamic decision threshold adjustment, the model significantly outperforms state-of-the-art methods. Experimental results on benchmark datasets show the algorithm achieves ROC-AUC scores as high as 0.978, effectively identifying rare active compounds even at imbalance ratios of 20:1.
Introduction
The "needle in a haystack" problem is central to virtual screening in drug discovery. For every active drug candidate, there are often thousands of inactive ones, leading to extreme class imbalance. Standard machine learning models typically fail in these scenarios, as they are prone to majority-class bias, achieving high accuracy by simply predicting all samples as inactive. Existing solutions like resampling or complex retraining often carry high computational costs. BTDT-MBO (Bidirectional Transformer Decision Threshold - Merriman-Bence-Osher) addresses this gap by optimizing the decision boundary post-generation of probabilities, specifically tailored for molecular data represented as SMILES strings.
Methods
The BTDT-MBO algorithm operates through a multi-stage pipeline designed to leverage both deep chemical context and geometric data relationships.
- Feature Extraction (BT): The model utilizes a pre-trained Bidirectional Transformer (Self-Supervised Learning Platform, or SSLP) to convert SMILES strings into high-dimensional numerical fingerprints. This allows the model to benefit from chemical knowledge learned from millions of molecules during pre-training.
- Graph Construction & Weighting: Molecules are represented as nodes in a similarity graph. A key innovation is the use of Distance Correlation (dCor) for edge weighting. Unlike standard Gaussian kernels, dCor provides a robust measure of dependence between random vectors in arbitrary dimensions, which is particularly effective for non-normal molecular data distributions.
- The MBO Algorithm: This physics-inspired graph-based process alternates between a diffusion step (spreading label information across the graph) and a thresholding step (assigning points to classes).
- Decision Threshold Adjustment (DT): Rather than using a static 0.5 probability cutoff, the algorithm iteratively tests a range of thresholds (0.05 to 0.55). It selects the optimal threshold that maximizes the ROC-AUC score for unlabeled data at each iteration.
Experimental Validation
The model was validated on six highly imbalanced molecular datasets, including four DrugMatrix Assays and two DS1 datasets, with imbalance ratios ranging from 16.5:1 to 20:1. These datasets serve as benchmarks for virtual screening tasks.
Key Results
- Superior Performance: BTDT-MBO outperformed the GHOST procedure (a leading threshold-adjustment method) and standard baselines like Random Forest and XGBoost on 5 out of 6 datasets.
- High Discriminatory Power: On the CHEMBL1909150 dataset, the model achieved an average ROC-AUC of 0.978, indicating near-perfect separation between active and inactive compounds despite the 17:1 imbalance.
- Robustness: The method demonstrated stability across 50 random data partitions, confirming that its performance is not dependent on specific training splits.
Discussion and Future Work
BTDT-MBO demonstrates that post-hoc decision boundary optimization can be more effective than re-engineering training sets for imbalanced data. The use of the MBO algorithm, originally designed for modeling physical phenomena like mean curvature flow, proves highly effective for discrete molecular classification when mapped onto a graph.
However, the algorithm faces computational scaling challenges due to the requirement of calculating eigenvectors of the graph Laplacian. Future work will explore the Nyström method to scale the algorithm to millions of nodes. Additionally, incorporating diverse features such as extended-connectivity fingerprints (ECFP) or explicit class-size constraints within the diffusion process may further enhance performance in extremely sparse scenarios.
Summary updated