## 3 Methodology
### LoRA Fine-Tuning of BiomedBERT  
In the present work, the microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract-fulltext model was fine-tuned using LoRA [8]. For each self-attention block, the original query and value projection matrices \(W_{Q,V}^{(0)}\in\mathbb{R}^{d\times k}\) are augmented by a trainable low-rank term:  
\[\Delta W=BA,\qquad B\in\mathbb{R}^{d\times r},\quad A\in\mathbb{R}^{r\times k} \tag{1}\]  
so that the adapted weights become as follows:  
\[W_{Q,V}=W_{Q,V}^{(0)}+\Delta W \tag{2}\]  
With rank \(r=8\) and \(d=k=768\) (matching BiomedBERT's hidden size), two low-rank matrices \(B\) and \(A\) together introduce exactly 12,288 additional parameters--only 0.01117% of the base model--while recovering the representational capacity of a full-rank update. The value \(r=8\) was selected based on prior LoRA studies and early empirical results indicating a favorable tradeoff between accuracy and parameter efficiency.  
Training minimizes the cross-entropy objective:  
\[\mathcal{L}=-\frac{1}{N}\sum_{i=1}^{N}\sum_{c\in\{\mathrm{S},A\}}y_{ic}\log p _{ic},\quad p_{ic}=\frac{e^{iz_{c}}}{\sum_{j}e^{iz_{j}}} \tag{3}\]  
where S, A denote the synergistic and antagonistic classes, and \(z_{ic}\) is the logit for sample \(i\) and class \(c\). The Adam optimizer with weight decay (AdamW), set with \(\beta_{1}=0.9\), \(\beta_{2}=0.999\), and \(\epsilon=10^{-8}\) was used in optimization. Helping to stabilize convergence and prevent oscillations during training, these values regulate the exponential decay rates for the moving averages of gradient (first moment) and squared gradient (second moment). The selected parameters conform to conventional defaults experimentally proved to be suitable for transformer-based designs. We employed early stopping after two epochs without improvement to avoid overfitting using a learning rate of \(2\times 10^{-4}\) with 10% linear warm-up.  
Training was performed on an NVIDIA RTX 3060 with 12 GB VRAM. At batch size 8 and sequence length 256, convergence was reached within 6-7 epochs over \(\sim\)3.5 h. The  
\begin{table}
\begin{tabular}{l c c c} \hline \hline
**Split** & **Synergistic** & **Antagonistic** & **Total** \\ \hline Training & 5872 & 5872 & 11,744 \\ Testing & 1468 & 1468 & 2936 \\ Validation & 92 & 96 & 192 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Dataset composition by interaction type.  
LoRA adapter introduced 11,744 trainable examples, allowing for practical fine-tuning on consumer hardware. The resulting adapter weighs \(<\)10 MB and can be merged into the base checkpoint on-the-fly or kept separate for rapid version control.  
While DrugBank provides millions of interaction descriptions, only a small subset of polarity-labeled interactions could be identified from DrugComb and the DrugBank antagonism file, which was used to build the supervised training set.  
After fine-tuning, the adapter-augmented model was used to label all remaining interaction sentences in DrugBank v5.1.10. Prior to inference, every \((\text{drug}_{1},\text{drug}_{2})\) pair present in the seed corpus was removed. This ensured a strict separation between training and application data. Roughly 1.5 million sentences were streamed through the model in batches of 256; predictions, confidences, and checkpoint hashes were inserted into a resumable SQLite ledger. This exhaustive logging allows downstream rules or pharmacists to review low-confidence pairs without re-executing the classifier.