Ahmed Ibrahim , Abdullah Hosseini , Salma Ibrahim , Aamenah Sattar , Ahmed Serag
{"title":"D3: A Small Language Model for Drug-Drug Interaction prediction and comparison with Large Language Models","authors":"Ahmed Ibrahim , Abdullah Hosseini , Salma Ibrahim , Aamenah Sattar , Ahmed Serag","doi":"10.1016/j.mlwa.2025.100658","DOIUrl":null,"url":null,"abstract":"<div><div>Large Language Models (LLMs) have significantly advanced Natural Language Processing (NLP) applications, including healthcare. However, their high computational demands pose challenges for deployment in resource-constrained settings. Small Language Models (SLMs) offer a promising alternative, balancing performance and efficiency. In this study, we introduce D3, a compact SLM with approximately 70 million parameters, designed for Drug-Drug Interaction (DDI) prediction. Trained on a curated DrugBank dataset, D3 was compared against fine-tuned state-of-the-art LLMs, Qwen 2.5, Gemma 2, Mistral v0.3, and LLaMA 3.1, ranging from 1.5 billion to 70 billion parameters. Despite being 1000 times smaller than LLaMA 3.1, D3 achieved an F1 score of 0.86, comparable to larger models (Mistral v0.3: 0.88, LLaMA 3.1: 0.89), with no statistically significant performance difference. Expert evaluations further confirmed that D3’s predictions were clinically relevant and closely aligned with those of larger models. Our findings demonstrate that SLMs can effectively compete with LLMs in DDI prediction, achieving strong performance while significantly reducing computational requirements. Beyond DDI prediction, this work highlights the broader potential of small models in healthcare, where balancing accuracy and efficiency is critical.</div></div>","PeriodicalId":74093,"journal":{"name":"Machine learning with applications","volume":"20 ","pages":"Article 100658"},"PeriodicalIF":4.9000,"publicationDate":"2025-04-29","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Machine learning with applications","FirstCategoryId":"1085","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S2666827025000416","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
Large Language Models (LLMs) have significantly advanced Natural Language Processing (NLP) applications, including healthcare. However, their high computational demands pose challenges for deployment in resource-constrained settings. Small Language Models (SLMs) offer a promising alternative, balancing performance and efficiency. In this study, we introduce D3, a compact SLM with approximately 70 million parameters, designed for Drug-Drug Interaction (DDI) prediction. Trained on a curated DrugBank dataset, D3 was compared against fine-tuned state-of-the-art LLMs, Qwen 2.5, Gemma 2, Mistral v0.3, and LLaMA 3.1, ranging from 1.5 billion to 70 billion parameters. Despite being 1000 times smaller than LLaMA 3.1, D3 achieved an F1 score of 0.86, comparable to larger models (Mistral v0.3: 0.88, LLaMA 3.1: 0.89), with no statistically significant performance difference. Expert evaluations further confirmed that D3’s predictions were clinically relevant and closely aligned with those of larger models. Our findings demonstrate that SLMs can effectively compete with LLMs in DDI prediction, achieving strong performance while significantly reducing computational requirements. Beyond DDI prediction, this work highlights the broader potential of small models in healthcare, where balancing accuracy and efficiency is critical.