NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Understanding the Effects of Domain Finetuning on LLMs

Eshaan Tanwar, Deepak Nathani, William Yang Wang, Tanmoy ChakrabortyarXiv 2025 · DOI

Overview

Researchers have long observed that fine-tuning Large Language Models (LLMs) for specialized domains like medicine yields significant performance gains. However, the internal mechanisms driving these changes have remained largely opaque. This research introduces the concept of Tuning Vectors to demonstrate that domain adaptation is a surgical process. Rather than a complete overhaul, fine-tuning modifies a tiny fraction of the model's representational space, primarily injecting new knowledge into MLP layers while amplifying existing patterns in attention heads.

Problem Statement

While general instruction tuning has been extensively studied, domain-specific specialization—critical for high-stakes fields like healthcare—is less understood. The authors investigate whether fine-tuning rewrites a model's internal logic or merely adjusts specific parameters. Interpreting these shifts is essential for building reliable and steerable specialized models.

Methodology

The study analyzed three model families: Meta-Llama-3, Qwen2.5, and Phi-3.5. The researchers employed several novel analytical techniques:

  • Neuron Activation Analysis: Comparing "firing" patterns between base and fine-tuned models.
  • Tuning Vectors: Defined as the weight difference between the fine-tuned and base models ($\theta_{ft} - \theta_{pre}$).
  • Vector Manipulation: Testing the functional importance of these vectors through negation (subtraction) and cross-domain addition.
  • Subspace Alignment (SSA): Using Singular Value Decomposition (SVD) to determine if tuning vectors introduce new information or amplify existing representations.

Key Insights: A Surgical Transformation

A primary finding is that fine-tuning is remarkably surgical. Despite substantial performance improvements, the "edit distance" between the activation patterns of base and fine-tuned models remains small. This suggests the model refines a specific subset of representations rather than learning an entirely new language.

Normalised edit distance across layers for different model families, illustrating the minimal shift in activation patterns during fine-tuning.

Further analysis revealed a functional division within the architecture:

  • MLPs as Knowledge Loci: Tuning vectors in MLP layers often point in new directions, indicating that these layers are where new domain-specific facts are encoded.
  • Attention as Amplifiers: Conversely, tuning vectors in attention mechanisms largely align with existing directions, suggesting they amplify pre-existing relationships rather than creating new ones.

Performance and Instruction Following

The tuning vector is not just a repository of facts; it is also intrinsically linked to the model's ability to follow domain-specific instructions. Removing the tuning vector (negation) leads to a dramatic collapse in performance and formatting adherence.

Performance comparison of specialized models and their negated counterparts across various medical benchmarks, showing the significant impact of the tuning vector.

Key results include:

  • Performance Collapse: Negating the tuning vector in Llama-3-Aloe-Alpha resulted in a 65% drop in medical benchmark accuracy.
  • Vector Stacking: The researchers demonstrated that adding a Medical Tuning Vector and a Math Tuning Vector to a base model creates a "Generalist Specialist" that outperforms individual models on non-target tasks.
  • High Weight Similarity: Cosine similarity between base and fine-tuned weights consistently exceeded 0.99, confirming that the transformative "delta" is mathematically minute yet functionally potent.

Limitations and Future Directions

The study identifies several areas for future exploration:

  • Scaling: Testing if these findings hold for larger models (70B+) or Mixture of Experts (MoE) architectures.
  • Dynamic Analysis: Investigating how tuning vectors evolve throughout the training process.
  • Interference: Developing more sophisticated merging strategies to mitigate conflicts when combining multiple domain vectors.

Summary updated

BibTeX
@misc{tanwar2025understanding,
  author = {Eshaan Tanwar and Deepak Nathani and William Yang Wang and Tanmoy Chakraborty},
  title = {{Understanding the Effects of Domain Finetuning on LLMs}},
  year = {2025},
  eprint = {2510.09359},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.09359},
}
Figure