Deep Learning for Virtual Screening: Five Reasons to Use ROC Cost Functions

Vladimir Golkov, Alexander Becker, Daniel T. Plop, Daniel Cuturilo, Neda Davoudi, Jeffrey L. Mendenhall, Rocco Moretti, Jens Meiler, Daniel Cremers

Introduction

In the high-stakes field of drug discovery, virtual screening serves as a critical computational filter. The goal is to identify a handful of "active" compounds—molecules that bind to a specific biological target—from libraries containing billions of candidates. This task is notoriously difficult due to extreme class imbalance and the practical requirement for "early enrichment," where only the very top-ranked predictions are synthesized and tested in the lab.

Researchers from the Technical University of Munich and Vanderbilt University have identified a fundamental flaw in how deep learning models are typically trained for this task. They argue that the standard cross-entropy loss function is ill-suited for the unique demands of chemical screening and propose a shift toward directly optimizing the Receiver Operating Characteristic (ROC) curve.

The Limitations of Cross-Entropy

Standard deep learning models typically employ cross-entropy loss, a point-wise objective that treats every sample independently. In the context of virtual screening, this approach suffers from two major drawbacks:

  1. Class Imbalance Sensitivity: In a typical dataset, "inactive" compounds outnumber "actives" by several orders of magnitude. Cross-entropy can lead models to achieve high nominal accuracy simply by predicting "inactive" for every molecule, failing to learn the features of the rare active compounds.
  2. Misaligned Objectives: Scientists usually only have the resources to validate the top 0.1% of predicted hits. Cross-entropy optimizes for average performance across the entire dataset, often neglecting the "early enrichment" zone—the far-left side of the ROC curve—where the most promising candidates reside.

Methodological Innovations: ROC-Based Cost Functions

To address these issues, the authors propose moving from point-wise loss to pair-wise loss, which compares a positive molecule directly to a negative one. This approach ensures that both classes contribute equally to the training signal, regardless of their frequency in the dataset. Key innovations include:

  • $L_{AUC-prev}$ (Out-of-batch predictions): To overcome the quadratic computational complexity of pair-wise comparisons, the researchers use a buffer of predictions from previous mini-batches. This provides a global context for training without the heavy computational cost.
  • $L_{logAUC}$ (Early Enrichment Optimization): This novel cost function specifically optimizes the area under the ROC curve when the False Positive Rate is plotted on a logarithmic scale. This forces the model to prioritize performance at the high decision thresholds used in real-world screening.
  • Numerical Stability: Since ranks are not naturally differentiable, the authors utilize a sigmoidal approximation of the ROC curve and a lookup table for efficient rank estimation.

Empirical Evaluation

The proposed methods were evaluated on nine large-scale PubChem QSAR (Quantitative Structure-Activity Relationship) datasets. These datasets reflect the challenges of real-world drug discovery, featuring diverse target families and realistic levels of class imbalance.

Table showing AUC performance across nine PubChem datasets, where ROC-based methods consistently outperform cross-entropy.

As shown in the results, ROC-based cost functions consistently outperformed the cross-entropy baseline. Specifically, the $L_{AUC-prev}$ method showed superior general performance on the standard AUC metric across most datasets.

Table showing logAUC performance, highlighting the superior early enrichment achieved by the $L_{logAUC}$ cost function in 7 out of 9 datasets.

The impact was even more pronounced when measuring early enrichment. The $L_{logAUC}$ cost function led to significantly better results on the logAUC metric in 7 out of the 9 datasets, confirming that aligning the training objective with the chemist's goal yields superior drug candidates.

Five Reasons to Adopt ROC Cost Functions

  1. Inherent Robustness to Imbalance: Because ROC-based functions compare pairs of positives and negatives, every class appears equally often in the cost term, making the model immune to extreme class imbalance.
  2. Alignment with Real-World Goals: By optimizing for the log-transformed ROC, the model focuses on the "early enrichment" zone—the top 0.1% of molecules—which are the only ones chemists actually test.
  3. Computational Efficiency: Innovations like $L_{AUC-prev}$ allow for global pair-wise optimization without the quadratic computational hit of traditional methods.
  4. Mathematical Soundness for Unlabeled Data: ROC optimization is equivalent to Positive/Unlabeled (PU) learning, which is ideal for biological datasets where "negatives" are often just untested compounds.
  5. Proven Empirical Success: Across diverse PubChem datasets, these methods consistently deliver statistically significant improvements over standard cross-entropy baselines.

Conclusion

The choice of loss function is a primary driver of success in virtual screening. By moving beyond cross-entropy and adopting ROC-based cost functions, researchers can train models that are not only more robust to data imbalance but also significantly better at finding the "needle in the haystack." While future work may explore these losses in conjunction with Graph Neural Networks, the current findings provide a compelling case for ROC optimization in any domain characterized by extreme imbalance and high decision thresholds.

Summary updated

BibTeX
@misc{golkov2020deep,
  author = {Vladimir Golkov and Alexander Becker and Daniel T. Plop and Daniel Cuturilo and Neda Davoudi and Jeffrey L. Mendenhall and Rocco Moretti and Jens Meiler and Daniel Cremers},
  title = {{Deep Learning for Virtual Screening: Five Reasons to Use ROC Cost Functions}},
  year = {2020},
  eprint = {2007.07029},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2007.07029},
}
Figure