Understanding Linear Probing then Fine-tuning Language Models from NTK Perspective

The two-stage fine-tuning (FT) method, linear probing (LP) then fine-tuning (LP-FT), outperforms linear probing and FT alone. This holds true for both in-distribution (ID) and out-of-distribution (OOD) data. One key reason for its success is the preservation of pre-trained features, achieved by obtaining a near-optimal linear head during LP. However, despite the widespread use of large language models, there has been limited exploration of more complex architectures such as Transformers. In this paper, we analyze the training dynamics of LP-FT for classification tasks on the basis of the neural tangent kernel (NTK) theory. Our analysis decomposes the NTK matrix into two components. This decomposition highlights the importance of the linear head norm alongside the prediction accuracy at the start of the FT stage. We also observe a significant increase in the linear head norm during LP, which stems from training with the cross-entropy (CE) loss. This increase in the linear head norm effectively reduces changes in learned features. Furthermore, we find that this increased norm can adversely affect model calibration, which can be corrected using temperature scaling. Additionally, we extend our analysis with the NTK to the low-rank adaptation (LoRA) method and validate its effectiveness. Our experiments using a Transformer-based model on multiple natural language processing datasets confirm our theoretical analysis. Our study demonstrates the effectiveness of LP-FT for fine-tuning language models. Code is available at https://github.com/tom4649/lp-ft_ntk.

Paper

References (62)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer qfrt6/10 · confidence 2/52024-07-13

Summary

The authors analyze the training dynamics of LP-FT for classification models based on NTK theory. They decomposed NTK matrix and highlight the importance of linear head norm. Additionally, they highlight the increased linear head norms can negatively affect the model calibration and can be fixed by temperature scaling. Finally, they extend their analysis to the LoRA method.

Strengths

1. The application of NTK theory to analyze LP-FT in complex models like Transformers is interesting. 2. The theoretical analysis is thorough, well-supported by mathematical proofs, and aligns with empirical observations.

Weaknesses

1. The experiments primarily focus on the classification tasks. Since the authors also extend their analysis to LoRA, exploring additional domains and harder tasks (reasoning, math, code generation) combined with LLMs could siginificantly strengthen the generalizability of the findings.

Questions

N/A

Rating

6

Confidence

2

Soundness

3

Presentation

3

Contribution

3

Limitations

N/A

Reviewer PtuD8/10 · confidence 2/52024-07-13

Summary

The authors present a theoretical analysis of the linear probing and fine-tuning framework based on neural tangent theory, supported by experiments with transformer-based models on natural language processing benchmarks. Their analysis decomposes the NTK matrix into the FT-effective component and the pre-train-effective component, demonstrating an approximation between the fine-tuning matrix and the LoRA matrix.

Strengths

1. The paper is very well written, with detailed technical content. The authors have provided enough mathematical details to support their theoretical analysis. The proofs for theorems and corollaries are detailed delineated in the appendix. 2. A timely topic that bridges established theory and recent advancements in natural language processing. 3. The authors have provided comprehensive benchmarks to support the claims of the paper.

Weaknesses

Although the experiments included an exhaustive list of benchmarks, I noticed that you only implemented one transformer model in your setup. I believe it would be more effective to include multiple types of transformer-based models to better illustrate the practical advantages of your approach.

Questions

Minors: In Figures 3 and 11, it would be helpful to explicitly indicate the purpose of the shaded area in the caption to enhance readability.

Rating

8

Confidence

2

Soundness

4

Presentation

3

Contribution

4

Limitations

The authors have made a clear statement about the limitations of the proposed analysis.

Reviewer R1ei7/10 · confidence 4/52024-07-13

Summary

This paper studies the dynamics of Linear probing and fine tuning by means of NTK theory. The authors provide a connection between the Frobenius norm of linear probing weights and FT-effective component of the NTK matrix.

Strengths

The NTK sees the model as an Gaussian process, making it a powerful tool for analysis of neural networks’ convergence and generalization. This paper derives an interesting connection between NTK theory and fine tuning language models. The NTK is decomposed into pre-trained and fine tuned terms. Feature distortion theory is employed to interpret performance of FT.

Weaknesses

-The organization of material can be improved. for instance, you used the linear model $f(x)$ in Proposition 1, however it is introduced later in Definition 1. -Table 2 is very uninformative and the numbers are not in line, making it hard to read. please provide precise description of each table and figure in the text. -Same for Fig.3, some numbers are floating on it and the message of the figure is not clear. please further enhance the presentation of results, I found it hard to infer your achievements from the numerical results section.

Questions

In Fig.3, What does “number of feature difference”? please provide the definition. -How did you calculate the NTK matrix for numerical simulations? There is a body of literature for only approximation of NTK for transformers. -Did you use empirical NTK for simulations? if yes, then can you say if your results hold in the finite width regime too?

Rating

7

Confidence

4

Soundness

3

Presentation

2

Contribution

4

Limitations

NTK theory in general holds in the infinite width limit. Further discussions are needed to adapt the methods in this paper to finite regime.

Reviewer zDRZ7/10 · confidence 5/52024-07-15

Summary

The paper presents a novel application of neural tangent kernel (NTK) theory to analyze the training dynamics of the linear probing then fine-tuning (LP-FT) method for large language models, demonstrating its effectiveness and extending the analysis to include the low-rank adaptation (LoRA) method.

Strengths

The paper stands out for its originality by applying NTK theory to the LP-FT method and extending it to include an analysis of LoRA. It's strong in terms of quality because it combines solid theoretical work with thorough experiments to back up the claims. The writing is clear and well-organized, making it easy to follow the arguments and findings. The significance of the research is evident in its potential impact on fine-tuning practices, not just in NLP but across various fields that use large pre-trained models. Overall, this paper makes a valuable contribution to advancing our understanding and methods in transfer learning.

Weaknesses

One weakness of the paper is that while it presents a solid theoretical foundation and empirical evidence, it could benefit from more detailed explanations in certain sections, particularly the experimental setup and hyperparameter tuning. This would enhance transparency and reproducibility. Additionally, the paper could further strengthen its claims by including a broader range of experiments across different domains beyond NLP. Another point for improvement is the discussion of the impact and practical applications of the findings, which could be expanded to provide more actionable insights for practitioners. Lastly, while the paper briefly mentions temperature scaling to address calibration issues, a deeper exploration of this aspect could provide more comprehensive recommendations for improving model performance.

Questions

Can you expand on the practical applications of your findings? More specific examples of how practitioners can apply your recommendations in real-world scenarios would enhance the practical value of your work.

Rating

7

Confidence

5

Soundness

3

Presentation

3

Contribution

4

Limitations

he paper does not discuss the computational resources required for implementing LP-FT and NTK analysis. Providing information on the computational cost and efficiency of the proposed methods would help readers understand the practical feasibility of adopting these techniques.

Authorsrebuttal2024-08-10

Confirmation on Addressed Concerns

Dear AC and reviewers; We are concerned because we have not yet received a response from the reviewers and have heard that discussions between reviewers and authors have already started on other papers. We have responded to all of the reviewers' perfectly and additional experiments have supported our theory. Therefore, we believe that all of the reviewer's concerns have been addressed.

Reviewer PtuD2024-08-12

Thank the authors' response and the addition of another set of requirements. I am impressed that the paper's findings hold across various transformer architectures. I adjusted my rating and recommended a strong accept for the paper.

Authorsrebuttal2024-08-12

Thank you for your positive feedback and reevaluation. We appreciate you taking the time to review our paper!

Reviewer qfrt2024-08-13

Thanks for the response

I thank the authors for providing extra experiments. I have updated my score accordingly.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC