Improving language models fine-tuning with representation consistency targets

Anastasia Razdaibiedina, Vivek Madan, Zohar Karnin, Ashish Khetan, Vishaal Kapoor

Fine-tuning pre-trained language models (PLMs) has become the standard approach for achieving state-of-the-art results in Natural Language Processing. However, this process is often plagued by "fine-tuning instability," where models either converge to suboptimal states or collapse entirely, failing to outperform simple baselines.

A recent study introduces REPINA (REpresentation Projection Invariance), a novel regularization method designed to mitigate representation collapse. By ensuring that fine-tuned representations remain consistent with their pre-trained counterparts through a learnable projection, REPINA enhances model stability and performance, particularly in data-constrained environments.

The Challenge: Representation Collapse

Standard fine-tuning updates model weights to minimize task-specific loss. While this allows for adaptation, it often leads to representation collapse. In this state, the rich, high-dimensional features learned during pre-training are "squashed" into a lower-dimensional subspace to overfit the training data.

This phenomenon manifests in three primary ways:

  1. Instability: High performance variance across different random seeds.
  2. Poor Generalization: Overfitting to training data, leading to failure on out-of-distribution (OOD) samples.
  3. Data Inefficiency: Difficulty in learning from small datasets (few-shot scenarios).

Traditional solutions like weight consolidation (e.g., $L_2$ regularization towards pre-trained weights) are often too rigid, preventing the model from effectively learning new task-specific features.

The REPINA Method

REPINA addresses collapse by focusing on the geometry of representations rather than raw weight values. The core idea is projection invariance: the fine-tuned representation ($f_{fin}$) should remain "projectable" back to the original pre-trained state ($f_{pre}$).

Comparison of fine-tuning strategies: Standard model tuning often leads to representation collapse, while minimal tuning (frozen backbone) lacks performance. REPINA achieves both high performance and mitigation of collapse.

The method introduces a regularization term to the loss function: $$\mathcal{R} = \min_{\phi \in \Phi} \sum \|f_{pre}(x) - \phi(f_{fin}(x))\|^2$$

Where $\phi$ is a transformation function. The authors propose two variants:

  • $REPINA_I$ (Identity): Uses an identity function for $\phi$, forcing representations to stay physically close to the original. This is highly effective for very small datasets.
  • $REPINA_{MLP}$ (MLP): Uses a shallow Multi-Layer Perceptron as the projection. This allows for more flexibility, permitting the model to shift or rotate representations as long as the underlying information content is preserved.

Experimental Evaluation

The researchers evaluated REPINA across 13 diverse tasks, including the GLUE benchmark and several non-GLUE datasets such as biomedical relation extraction (CHEMPROT) and citation intent (SciCite). They tested the models in full-data, few-shot (250–1000 samples), and noisy-label settings.

Key Results

REPINA consistently outperformed major baselines, including standard fine-tuning and adversarial methods like R3F.

Performance comparison across GLUE, Non-GLUE, Probing experiments, and Representation Diversity metrics. REPINA variants consistently outperform the standard fine-tuning baseline (STD++).
  • Superior Performance: REPINA achieved top results on 10 out of 13 tasks.
  • Few-Shot Robustness: In the 250-sample setting, $REPINA_I$ demonstrated superior stability and average rank, making it ideal for low-resource scenarios.
  • Preserving Diversity: Using metrics like the Geometric Mean (GM) of eigenvalues of the representation's Gram matrix, the authors showed that REPINA maintains significantly higher representation diversity compared to standard fine-tuning, effectively preventing collapse.
  • Noise Tolerance: The method showed increased robustness when training with noisy labels (30% flipped), maintaining higher accuracy than standard approaches.

Conclusion

REPINA offers a powerful yet flexible framework for fine-tuning language models. By shifting the focus from weight constraints to representation consistency, it allows models to adapt to new tasks without sacrificing the rich knowledge acquired during pre-training. While it introduces some computational overhead due to the required forward pass of the frozen model, the gains in stability and generalization make it a compelling choice for modern NLP pipelines.

Summary updated

BibTeX
@inproceedings{razdaibiedina2023improving,
  author = {Anastasia Razdaibiedina and Vivek Madan and Zohar Karnin and Ashish Khetan and Vishaal Kapoor},
  title = {{Improving language models fine-tuning with representation consistency targets}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  url = {https://openreview.net/forum?id=V6SSEqoKdA},
}
Figure