May 2024 — August 2024 · Houston, TX
Biomedical NLP
Research Engineer · Advised by Dr. Sinan Kockara
How much can a domain-specific language model improve biomedical classification when the dataset is cleaned and expanded, and how does that compare with retrieval on the same task?
NLP · PyTorch · BioMedLM · RAG
Approach
I first worked on the dataset itself. The existing records contained stale and inconsistent information, so I scraped, updated, and added more than 10,000 records before training.
I then built a PyTorch training and inference pipeline around BioMedLM and iterated on preprocessing, training, and evaluation. I compared the classifier against the published benchmark and also built a RAG baseline on the same labels so both approaches could be scored under the same task.
Results
The fine-tuned classifier reached 0.902 AUC against a 0.857 published benchmark. Against the RAG baseline, the fine-tuned model finished six percentage points higher in F1.
Model performance was determined as much before training as during it. Fixing the data and labels mattered as much as many of the modeling decisions. Two systems can look competitive under one metric while failing in different ways, so class-level behavior and failure cases mattered as much as the headline number.
Retrieval is powerful, but it is not automatically the right architecture for every problem. For this classification task, the fine-tuned model was more stable and performed better on the labels we cared about.