Abstract
Fine-tuning Large Language Models (LLMs) for specialized biomedical domains is challenging due to data sparsity and the difficulty of defining reinforcement learning rewards. We present Balanced Fine-Tuning (BFT), a post-training method that employs a dual-weighting strategy at the token and sample levels. BFT stabilizes training on sparse scientific text and mitigates catastrophic forgetting of general knowledge. Our results demonstrate that BFT consistently outperforms standard supervised fine-tuning (SFT) across various model scales and biomedical benchmarks.
Introduction
The application of LLMs in medicine and biology is hindered by the "sparse" nature of biomedical knowledge and the complexity of scientific reasoning. Standard Supervised Fine-Tuning (SFT) often leads to overfitting on surface-level instruction patterns rather than deep conceptual understanding. Furthermore, Reinforcement Learning (RL), while effective for alignment, is often impractical in life sciences due to the high cost and time required for reward verification, such as wet-lab experiments.
Methods: Balanced Fine-Tuning (BFT)
BFT introduces an adaptive weighting mechanism to improve generalization from static, sparse datasets without additional computational overhead. It operates at two levels:
- Token-level Weighting: Loss is rescaled based on prediction probability. Lower-confidence tokens contribute less to the gradient, preventing gradient explosion and overfitting to noise during early training stages.
- Sample-level Weighting: BFT identifies the "weakest link" in a reasoning sequence using a minimum group confidence metric. Samples containing difficult segments are assigned higher weights, forcing the model to focus on challenging reasoning steps.
BFT is designed as a drop-in improvement over SFT, compatible with efficiency techniques like LoRA and mixed-precision training.
Experimental Setup
We evaluated BFT on models ranging from 1.5B to 70B parameters across several benchmarks:
- Medical Reasoning: OpenAI Health Bench (Consensus for training, Hard for testing).
- Biological Reasoning: MsigDB, NeST, and Gene Ontology benchmarks.
- General Knowledge: MMLU and CMMLU to assess knowledge retention.
- Mathematical Reasoning: NuminaMath and OlympiadBench for initial validation.
Results and Discussion
Performance Across Biomedical Domains
BFT-tuned models significantly outperformed SFT baselines across all tested model sizes. In medical tasks, BFT showed marked improvements in complex response generation and clinical knowledge. In biological reasoning, a BFT-tuned DeepSeek-R1 (70B) surpassed specialized systems like GeneAgent, which rely on external database lookups, suggesting that BFT successfully internalizes biological knowledge directly into the model weights.
Mitigating Catastrophic Forgetting
A key advantage of BFT is its ability to retain general-domain knowledge. While SFT often causes a decline in performance on general benchmarks like MMLU, BFT-tuned models maintain high accuracy across STEM, Humanities, and other categories. By avoiding over-optimization on surface patterns, the model maintains its foundational capabilities.
Semantic Embeddings
Beyond text generation, BFT enhances the quality of model embeddings. These "out-of-the-box" embeddings perform competitively on specialized tasks such as gene interaction prediction and single-cell perturbation response, often matching the performance of models specifically designed for those tasks.
Conclusion
Balanced Fine-Tuning provides a robust, efficient alternative to standard SFT and RL for domain-specific alignment. By stabilizing gradients and focusing on difficult reasoning segments, BFT enables LLMs to internalize complex scientific knowledge while preserving foundational capabilities. Future work will explore BFT's applicability to other specialized fields where data is sparse and rewards are difficult to define.
Summary updated