Source-linked AI summary

Intrinsic Dimensionality Explains the Effectiveness of Language Model Fine-Tuning

Armen Aghajanyan, Luke Zettlemoyer, Sonal Gupta

arXiv:2012.13255v1cs.LGcs.CL

TL;DR

Fine-tuning pretrained language models works well in low-data settings despite their enormous parameter counts, but its dynamics are poorly understood. The paper studies this through intrinsic dimensionality, finding that very low-dimensional reparameterizations can preserve fine-tuning performance and that pretraining, model size, and generalization are connected through this dimension.

  • Problem

    Why vanilla gradient descent can fine-tune models with hundreds of millions of parameters using only hundreds or thousands of labeled examples remains poorly understood.

  • Method

    The paper analyzes fine-tuning by projecting low-dimensional parameters into the full space, measuring the smallest satisfactory dimension, and connecting it to pretraining and compression-based generalization bounds.

  • Results

    Common pretrained models have very low intrinsic dimensions; pretraining implicitly reduces them, larger models tend to have lower values, and resulting generalization bounds are independent of full parameter count.

  • Takeaways & Limitations

    Intrinsic dimension provides an interpretation of pretrained representations as compressing downstream tasks and helps explain their fine-tuning and generalization behavior.

  • Takeaways & Limitations

    The generalization bounds apply only to intrinsic-subspace training, and whether standard SGD optimizes in that low-dimensional space remains unresolved.

Abstract

from arXiv · show

Although pretrained language models can be fine-tuned to produce state-of-the-art results for a very wide range of language understanding tasks, the dynamics of this process are not well understood, especially in the low data regime. Why can we use relatively vanilla gradient descent algorithms (e.g., without strong regularization) to tune a model with hundreds of millions of parameters on datasets with only hundreds or thousands of labeled examples? In this paper, we argue that analyzing fine-tuning through the lens of intrinsic dimension provides us with empirical and theoretical intuitions to explain this remarkable phenomenon. We empirically show that common pre-trained models have a very low intrinsic dimension; in other words, there exists a low dimension reparameterization that is as effective for fine-tuning as the full parameter space. For example, by optimizing only 200 trainable parameters randomly projected back into the full space, we can tune a RoBERTa model to achieve 90\% of the full parameter performance levels on MRPC. Furthermore, we empirically show that pre-training implicitly minimizes intrinsic dimension and, perhaps surprisingly, larger models tend to have lower intrinsic dimension after a fixed number of pre-training updates, at least in part explaining their extreme effectiveness. Lastly, we connect intrinsic dimensionality with low dimensional task representations and compression based generalization bounds to provide intrinsic-dimension-based generalization bounds that are independent of the full parameter count.

1 INTRODUCTION

The paper analyzes why pretrained language models can be fine-tuned effectively with few labeled examples by introducing intrinsic dimensionality as a lens on the process. It reports that pretraining reduces downstream intrinsic dimension, larger models tend to have lower intrinsic dimension, and intrinsic-dimension-based generalization bounds can ignore full parameter count.

  • Pretrained language models can be fine-tuned with vanilla gradient descent despite hundreds of millions of parameters and only hundreds or thousands of labeled examples.
  • Intrinsic dimensionality measures the minimum parameter dimension needed to approximate a fine-tuning optimization problem, providing the paper’s central analytical lens.
  • 200 parameters randomly projected into the full space can tune RoBERTa to within 90% of full-model performance.
  • Pretraining implicitly minimizes the intrinsic dimension of later tuning across a large set of NLP tasks.
  • Larger pretrained models tend to have smaller intrinsic dimensions, while compression-based bounds become independent of the pretrained model’s full parameter count.

2 RELATED WORK

Prior work studied pretrained models through capacity, sparsification, and fine-tuning strategies, but a holistic explanation for their generalization remained missing. This paper extends intrinsic-dimensionality analysis to pretrained representations.

  • This work directly extends intrinsic-dimensionality analysis from neural architectures to pretrained representations.
  • Earlier studies found substantial redundancy in pretrained models, enabling sparsification with limited degradation in end metrics.
  • Existing fine-tuning research examined layer selection and alternative methods, while standard fine-tuning showed non-trivial effects on generalization.
  • A holistic account of the mechanisms behind fine-tuned pretrained representations’ generalization was still missing.

3 INTRINSIC DIMENSIONALITY OF FINETUNING

The paper estimates fine-tuning intrinsic dimension by optimizing a low-dimensional random projection of pretrained parameters and selecting the smallest dimension reaching a target performance. It also introduces structure-aware scaling to account for layer specialization.

  • Intrinsic dimension is the minimum number of parameters, or lowest-dimensional subspace, needed to reach a satisfactory approximation of the original objective.
  • A projection P: R^d → R^D maps low-dimensional parameters into the full space, where optimization occurs only over d dimensions.
  • The standard procedure searches over dimensions and selects d90, the smallest dimension achieving 90% of the full training metric.
  • Initializing the low-dimensional parameters at zero recovers the original pretrained parameterization.
  • The Fastfood transform makes subspace optimization computationally feasible for very large pretrained models, avoiding dense projection matrices that can require 1.42 terabytes.
  • Structure-Aware Intrinsic Dimension incorporates layer-wise structure because attention-based pretrained-model layers can specialize separately.
  • SAID trades m subspace parameters for jointly learned layer-wise scales, whereas DID remains layer-unaware.

4 INTRINSIC DIMENSIONALITY OF COMMON NLP TASKS

The study measures intrinsic dimension for BERT and RoBERTa models on MRPC and QQP using subspace fine-tuning, finding effective solutions with very few trainable parameters and improved performance from structured projections.

  • Experimental setup: The experiments evaluate BERT and RoBERTa at base and large sizes on the MRPC and QQP sentence-prediction tasks.MRPC represents a smaller tuning dataset, while QQP represents a much larger one.
  • Experimental setup: 100 subspace trainings per dataset-model pair search dimensions from 10 to 10000, with four learning rates and zero-initialized task parameters.The randomly initialized classification head is included so exactly d parameters are optimized.
  • Results: RoBERTa-Large reaches 90% of full fine-tuning performance using roughly 200 parameters on MRPC and 800 on QQP.These are estimated d90 values from the subspace experiments.
  • Results: RoBERTa consistently outperforms BERT across subspace dimensions d despite having more parameters.The comparison is reported across the evaluated models and dimensions.
  • Results: SAID consistently improves over the structure-unaware DID method, indicating that incorporating structure benefits intrinsic-dimension computation.Figure 1 reports DID results across two datasets and four models, while the study also compares SAID and DID.

5 INTRINSIC DIMENSION, PRE-TRAINING, AND GENERALIZATION GAP

The paper interprets intrinsic dimension as the description length required to represent downstream tasks within pretrained representations. Experiments connect lower intrinsic dimension with pretraining progress, larger models, better evaluation performance, and smaller generalization gaps, while the resulting bounds depend on intrinsic rather than full parameter count.

  • Task representations: Intrinsic dimension represents the minimal description length of a downstream task within the framework of pretrained representations.The intrinsic parameter vector encodes the task relative to the original pretrained representations.
  • Task representations: Roughly 200 parameters encode MRPC, requiring less than a kilobyte to represent the task within RoBERTa.This provides a concrete example of highly compressed task representation.
  • Pretraining trajectory: RoBERTa-Base’s intrinsic dimensionality monotonically decreases throughout pretraining, despite pretraining having no access to downstream datasets.Easier tasks consistently exhibit lower intrinsic dimensionality across checkpoints than harder tasks such as ANLI.
  • Parameter count: Across existing pretrained models, increasing parameter count strongly correlates with decreasing fine-tuning intrinsic dimension on MRPC and other datasets.The comparison spans models including BERT, RoBERTa, BART, Electra, Albert, XLNet, T5, and XLM-R; the ideal controlled scaling experiment was computationally infeasible.
  • Generalization: Lower intrinsic dimension strongly correlates with better evaluation accuracy and a smaller relative generalization gap across tasks.These observations motivate interpreting intrinsic dimension as a measure of task complexity.
  • Generalization: Compression-based bounds depend on downstream task dimension d rather than the pretrained model’s full parameter count D.The bounds apply to methods trained with the intrinsic-dimension subspace method; whether standard SGD optimizes in that low-dimensional space remains unresolved.

6 CONCLUSION

The paper uses intrinsic dimensionality to explain fine-tuning and reports that low-dimensional structure relates to compression, model scale, and generalization.

  • Common natural-language tasks can sometimes be learned with only hundreds of parameters when using pretrained representations.
  • Pretraining is interpreted as a compression framework that implicitly minimizes the average description length of natural-language tasks.
  • Intrinsic dimensionality decreases as the number of pretrained representation parameters increases.
  • Models with lower intrinsic dimensions achieve higher evaluation accuracies and lower relative generalization gaps across tasks.
  • Intrinsic-dimension-based generalization bounds grow with intrinsic dimension rather than the pretrained model’s parameter count.
  • The paper identifies explicit theoretical connections between SGD and intrinsic-dimension optimization as future work.

A.1 PROOFS

This section connects low-dimensional parameterization with lossless compression and generalization bounds through discrete representations and helper strings.

  • A classifier class is indexed by trainable parameters and fixed helper strings, with compressibility defined by the existence of a suitable parameter choice.
  • Intrinsic-dimension parameterizations are losslessly compressible using the random-projection seed and the initial pretrained representation as a helper string.
  • Functions parameterized by DID or SAID are therefore described as (0, S)-compressible.
  • Compression with r discrete states supplies a generalization bound, following Theorem 2.1 of Arora et al. (2018).
  • The intrinsic parameters can be discretized, with the number of states determined by the quantization level, such as FP32 versus FP16.
  • The paper derives its final asymptotic bound by combining (0, S)-compressibility of SAID/DID models with low-dimensional training.
Loading 2012.13255v1…