[Paper Review] Linear Connectivity Reveals Generalization Strategies
This paper reveals that in NLP text classification tasks, fine-tuned models can occupy distinct, disconnected loss surface basins—revealed through linear mode connectivity (LMC)—that correspond to different generalization strategies, such as lexical overlap or syntactic heuristics. Unlike in image classification, transfer learning does not guarantee linear connectivity, and basin membership predicts performance on out-of-distribution diagnostic sets.
It is widely accepted in the mode connectivity literature that when two neural networks are trained similarly on the same data, they are connected by a path through parameter space over which test set accuracy is maintained. Under some circumstances, including transfer learning from pretrained models, these paths are presumed to be linear. In contrast to existing results, we find that among text classifiers (trained on MNLI, QQP, and CoLA), some pairs of finetuned models have large barriers of increasing loss on the linear paths between them. On each task, we find distinct clusters of models which are linearly connected on the test loss surface, but are disconnected from models outside the cluster -- models that occupy separate basins on the surface. By measuring performance on specially-crafted diagnostic datasets, we find that these clusters correspond to different generalization strategies: one cluster behaves like a bag of words model under domain shift, while another cluster uses syntactic heuristics. Our work demonstrates how the geometry of the loss surface can guide models towards different heuristic functions.
Motivation & Objective
- To investigate whether linear mode connectivity (LMC) holds across fine-tuned NLP models, challenging assumptions from computer vision.
- To determine if distinct loss surface basins exist in text classification tasks and whether they correlate with functional differences in model behavior.
- To link basin membership to real-world generalization performance on out-of-distribution (OOD) diagnostic datasets.
- To explore how training dynamics and initialization influence basin selection and model generalization strategies.
- To evaluate whether alternative fine-tuning procedures like linear probing then full fine-tuning (LP-FT) reduce basin diversity and improve generalization homogeneity.
Proposed method
- Measure linear mode connectivity (LMC) via convexity gap (CG), defined as the maximum loss along linear interpolation paths between model weight vectors.
- Use k-means clustering on the spectral space of CG matrices to identify distinct basins of attraction in the weight space.
- Train multiple BERT and RoBERTa-based models on MNLI, QQP, and CoLA using different random seeds to vary data order and head initialization.
- Evaluate models on diagnostic datasets (e.g., HANS-LO, PAWS-QQP) to assess generalization behavior under distribution shift.
- Compare LMC and Euclidean distance metrics to determine whether geometric proximity correlates with basin membership.
- Apply LP-FT (linear probing then full fine-tuning) to assess its impact on basin diversity and model homogeneity.
Experimental results
Research questions
- RQ1Do fine-tuned NLP models on text classification tasks exhibit linear connectivity across different training runs, as seen in image classification?
- RQ2Are there multiple disconnected basins in the loss surface of text classifiers, and do they correspond to distinct generalization strategies?
- RQ3Can basin membership predicted by LMC geometry be linked to performance on out-of-distribution diagnostic datasets?
- RQ4How does the training procedure (e.g., LP-FT vs. standard fine-tuning) affect basin diversity and model generalization behavior?
- RQ5To what extent do Euclidean distance and convexity gap correlate with basin membership and model functional differences?
Key findings
- In NLP tasks like MNLI, QQP, and CoLA, fine-tuned models frequently occupy distinct, disconnected basins on the loss surface, contradicting assumptions from computer vision.
- Models within the same basin exhibit similar performance on diagnostic datasets (e.g., HANS-LO), while models in different basins show divergent generalization behaviors.
- On MNLI, one cluster behaves like a bag-of-words model under domain shift, while another uses syntactic heuristics, indicating distinct functional strategies.
- The convexity gap (CG) metric effectively identifies basin membership, with strong clustering observed in BERT models but not in RoBERTa models.
- LP-FT reduces basin diversity and convexity gap variance, leading to more homogeneous models with less functional variation.
- Euclidean distance correlates more strongly with CG within basins than between them, suggesting basin membership shapes geometric proximity in weight space.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.