Presented at ICML 2024
Abstract
Selecting the optimal pre-trained model for fine-tuning on a specific downstream task is a significant challenge for AI engineers, often requiring prohibitive computational resources to evaluate multiple candidates. This paper introduces the Rectified Scaling Law, a new mathematical framework that accounts for the "pre-learned" knowledge models acquire during pre-training. By identifying a distinct "pre-power phase" in fine-tuning performance, the authors propose the Accept then Stop (AtS) algorithm. AtS predicts a model's final performance using up to 500x less compute than full training, significantly outperforming traditional selection metrics such as model size or zero-shot accuracy.
Introduction
The proliferation of pre-trained models on platforms like Hugging Face has created a "selection dilemma." While standard scaling laws—popularized by OpenAI and DeepMind—predict that performance improves with increased compute, parameters, and data, these laws primarily describe training from scratch. Fine-tuning is fundamentally different because models do not start from a state of zero knowledge; they possess a "head start" derived from their pre-training phase.
Currently, developers often rely on heuristics like model size or zero-shot performance to choose a base model. However, research shows these are surprisingly poor predictors of how a model will perform after exhaustive fine-tuning. This paper addresses the need for a reliable, compute-efficient method to predict the "end-state" of fine-tuning by observing only a small fraction of the training process.
The Rectified Scaling Law
The authors observe that on a log-log plot, the fine-tuning loss curve does not follow a simple linear descent. Instead, it exhibits two distinct stages:
- The Pre-power Phase: A relatively flat region where the model adapts to the new task format.
- The Power Phase: A linear descent that mirrors traditional scaling laws.
To account for this, the researchers "rectified" the standard scaling law by introducing a term, $D_l$, representing pre-learned data size. This term quantifies the "virtual" task-specific samples the model effectively encountered during its initial pre-training. The resulting formula is:
$$\hat{L}(D) = \frac{B}{D_l + D^\beta} + E$$
Where $D$ is the amount of fine-tuning data, and $D_l$ captures the transferability of pre-training to the specific downstream task. This explains why a smaller, well-pre-trained model can sometimes outperform a larger model if its $D_l$ for a specific task is significantly higher.
The Accept then Stop (AtS) Algorithm
Predicting final performance by fitting a curve to early-stage data is often unstable. To solve this, the authors developed the Accept then Stop (AtS) algorithm.
AtS iteratively fine-tunes candidate models on exponentially increasing subsets of data (e.g., 1/512, 1/256, 1/128 of the total budget). The algorithm monitors the "residual error" to detect the transition from the flat pre-power phase into the predictable power phase. Once the model enters the power phase—often occurring when test loss drops below a threshold of approximately 2.2—the algorithm stops training and extrapolates the final performance. This prevents wasting compute on models that are clearly underperforming or have not yet reached a predictable learning state.
Experimental Validation
The researchers validated the Rectified Scaling Law across 30 different LLMs (ranging from 100M to 7B parameters), including the GPT-2, OPT, T5, and Phi series. They tested these models on three diverse tasks:
- FLAN: Multi-task instruction tuning.
- WMT19 (En-Zh): Machine translation.
- Gigaword: Document summarization.
Key Results
- High Predictive Accuracy: On the Gigaword dataset, the AtS algorithm achieved a Pearson correlation of 0.938 with actual full-training results. In comparison, selecting models based on size showed a negative correlation (-0.244), proving that "bigger is better" is a fallacious guide for fine-tuning selection.
- Extreme Efficiency: AtS identified near-optimal models using as little as 1/512 of the total data budget. This represents a reduction in GPU hours by several orders of magnitude.
- Phase Transition Insights: The study found that zero-shot performance only indicates what a model knows currently, not its capacity to learn. The $D_l$ term successfully quantifies this latent learning potential.
Discussion and Limitations
While the Rectified Scaling Law provides a robust framework for model selection, some limitations remain:
- Data Scarcity: If the total available data is so limited that a model never exits the pre-power phase, AtS cannot accurately extrapolate the final loss.
- Parameter Integration: The current law focuses on data size ($D$). Future work is needed to integrate model parameters ($N$) into a unified equation for fine-tuning.
- PEFT Methods: The study focused on full-parameter fine-tuning. Applying these laws to Parameter-Efficient Fine-Tuning (PEFT) methods like LoRA or prefix-tuning is a vital next step for the research community.
Conclusion
The Rectified Scaling Law and the AtS algorithm offer a principled, data-driven approach to LLM selection. By accounting for pre-trained knowledge and identifying the transition into the power phase of learning, researchers and engineers can optimize their fine-tuning workflows, saving significant time and computational capital.
Project Page: rectified-scaling-law.github.io
Summary updated