Massive Supervised Fine-tuning Experiments Reveal How Data, Layer, and Training Factors Shape LLM Alignment Quality

Yuto Harada, Yusuke Yamauchi, Yusuke Oda, Yohei Oseki, Yusuke Miyao, Yu Takagi

TL;DR

This paper presents a massive, controlled study of supervised fine-tuning (SFT) for Large Language Models (LLMs), training over 1,000 models to understand how data, model architecture, and training factors influence alignment. Key findings reveal that lower data perplexity is a surprisingly strong predictor of SFT success, and that mid-layer weight changes are most crucial for performance gains, suggesting a shift in focus for efficient fine-tuning.

What Problem Does This Paper Address?

Supervised fine-tuning (SFT) is a crucial step for aligning pre-trained LLMs with human instructions and values. However, despite its widespread use, many aspects of SFT remain poorly understood. Researchers lack a clear understanding of which dataset properties are most effective, how different base models respond to SFT, which parts of the model are most affected, and how various training strategies (like LoRA vs. full fine-tuning) impact outcomes. Existing studies often suffer from limited scale, lack of control, or biases towards specific model families, making it difficult to draw generalizable conclusions. This paper aims to fill this gap by conducting a large-scale, systematic, and controlled SFT experiment to uncover these relationships.

Methods

The authors conducted a comprehensive SFT experiment involving:

  • 12 diverse base models: Ranging from 7B to 9B parameters, covering English, Chinese, and Japanese languages.
  • 10 distinct English training datasets: Categorized into General, Coding, Math, and Classic NLP tasks.
  • Controlled training conditions: Each base model was fine-tuned on each dataset using both full-parameter tuning and LoRA (Low-Rank Adaptation), with sample sizes of 1k and 20k.
  • Extensive evaluation: Over 1,000 SFT models were evaluated on 12 benchmark datasets across 5 categories using the OpenCompass framework.
  • Analysis of internal model changes: The study analyzed layer-wise weight changes and the intrinsic dimensionality of embeddings to understand how SFT affects model representations.
  • Latent space projection: t-SNE was used to visualize the relationships between models, training data, and training configurations in a common latent space.

Datasets

Training Datasets: * General: Alpaca, LIMA, UltraChat * Coding: CodeAlpaca, Magicoder * Math: OpenMathInstruct, MathInstruct * Classic NLP: FLAN (split into FLAN Knowledge, FLAN Reasoning, FLAN Comprehension)

Evaluation Benchmarks: * Math: MATH, GSM8K * Coding: HumanEval, MBPP * Knowledge: BoolQ, NaturalQuestions, TruthfulQA * Examination: MMLU, MMLU-zh, MMLU-jp * Instruction-following: MT-Bench, AlpacaEval v2

The paper uses existing, publicly available datasets and does not introduce new benchmarks.

Key Insights and Ideas

  • Perplexity is King (for Data Selection): Surprisingly, the perplexity of the training data relative to the base model is a much stronger predictor of SFT success than direct content similarity or tokenizer compatibility. This suggests that data the model already "understands" is more amenable to fine-tuning.
  • Mid-Layers Matter Most: Weight changes in the mid-layers of the model correlate most strongly with performance gains. This indicates that critical adaptations for instruction-following occur in these layers, not necessarily the very first or last.
  • Model Architecture Dominates: When visualizing models in a common latent space, points cluster primarily by model family (e.g., Llama, Mistral) rather than by the training corpus used. This highlights the strong inductive bias of the base model.
  • Small Sample Sizes Can Be Sufficient: A compact set of 1k instruction-response pairs often yields comparable results to larger sets (20k), sometimes even outperforming them by preventing the representation from drifting too far from the optimum.
  • LoRA is Almost as Good as Full Fine-tuning: LoRA models show minimal separation from full-parameter tuned models in the latent space, with only slight trade-offs on specific task types (e.g., full-parameter better for reasoning, LoRA for open-ended QA).
  • Cross-lingual Transfer is Robust: English-only SFT datasets effectively transfer to Japanese and Chinese benchmarks, suggesting that content overlap, rather than surface-level language similarity, is key.

Key Results

  • 1,000+ SFT models trained and released: This massive dataset aims to accelerate future research.
  • Perplexity correlation: Negative correlation (R ≈ -0.7 to -0.8) between training data perplexity and accuracy gain was observed across many models and tasks.
  • Mid-layer weight change correlation: The blue line in Figure 5a shows a peak correlation between mid-layer weight deltas and accuracy gain, indicating their importance.
  • Intrinsic Dimensionality (ID) increase: Fine-tuning leads to a sharp increase in the ID of embeddings around the middle layers (around layer-position 0.6), suggesting these layers actively expand the model's representational subspace.
  • Latent space visualization: t-SNE plots (Figure 6) show clear clustering by model family, convergence of trajectories towards a shared instruction-following region across epochs, and minimal separation between LoRA and full-parameter tuning.

Limitations and Future Work

Limitations: * Model Size: The study was limited to 7-9B parameter models due to computational constraints. Generalizing findings to larger models (70B+) or MoE architectures remains an open question. * Dataset Language: All training datasets were in English, limiting the direct investigation of cross-lingual SFT effects. * Dataset Variety: The use of 10 popular datasets might limit the generality of findings for highly specialized tasks or broader multilingual corpora. * Perplexity Nuances: Perplexity can fluctuate based on tokenizer design and base training distributions, suggesting a need for more nuanced measures.

Future Work: * Investigating cross-lingual knowledge transfer and its differing effects. * Developing more nuanced measures for data-model compatibility beyond perplexity. * Exploring how to leverage mid-layer adaptations for more efficient and interpretable SFT. * Understanding the causal drivers behind the perplexity-performance association. * Extending the analysis to larger model scales and different architectures.

Summary updated

BibTeX
@inproceedings{harada2025massive,
  author = {Yuto Harada and Yusuke Yamauchi and Yusuke Oda and Yohei Oseki and Yusuke Miyao and Yu Takagi},
  title = {{Massive Supervised Fine-tuning Experiments Reveal How Data, Layer, and Training Factors Shape LLM Alignment Quality}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2025},
  url = {https://openreview.net/forum?id=s1y6nC7T1h},
}
Figure