DOI: 10.1049/cit2.70166 ISSN: 2468-6557

Addressing Long‐Tailed Drug–Drug Interactions Through Minimisation of Predictive Uncertainty and Loss Sharpness

Chao Liu, Xizhao Wang, Farhad Pourpanah, Sam Kwong

ABSTRACT

Drug–Drug Interaction (DDI) prediction is critical for ensuring patient safety, particularly under long‐tailed distributions, where frequent (head) interactions dominate whereas rare (tail) interactions remain underrepresented. Conventional loss functions such as cross‐entropy often tend to overfit head classes while they underperform on rare but clinically important classes. Recent studies have shown that sharpness‐aware minimisation (SAM) improves generalisation by encouraging solutions that lie in flatter regions of the loss landscape. Given that the loss function plays a fundamental role in model training and that uncertainty estimation is crucial for handling ambiguous or difficult samples, we propose the uncertainty and SAM (USAM) loss for improving DDI prediction under long‐tail scenarios. The USAM loss integrates predictive uncertainty with SAM via two key components: (i) a dynamic reweighting strategy based on uncertainty, which leverages prediction entropy to emphasise difficult samples and (ii) a class‐balanced SAM regularisation term, which encourages flatter minima and enhances generalisation across imbalanced classes. Extensive experiments on four long‐tailed DDI benchmarks demonstrate that the USAM loss consistently outperforms existing methods in terms of both F1 score and recall. These results highlight the effectiveness of incorporating uncertainty modelling with sharpness‐aware optimisation in addressing long‐tailed problems.

More from our Archive