Improved Regularization and Robustness for Fine-tuning in Neural Networks

Dongyue Li, Hongyang R. Zhang

TL;DR

This paper introduces REGSL (Regularized Self-Labeling), a novel framework that significantly improves how we fine-tune large pre-trained models on small or noisy datasets. By combining layer-wise distance constraints—which prevent the model from "wandering" too far from its pre-trained state—with a self-labeling mechanism to correct and reweight noisy data, the authors achieve state-of-the-art performance across multiple image and text classification benchmarks.

The Challenge of Fine-Tuning and Label Noise

Fine-tuning is the bread and butter of modern deep learning: practitioners take a massive model pre-trained on a giant dataset (like ImageNet) and tweak it for a specific target task. However, when the target dataset is small, these high-capacity models tend to "memorize" the training labels rather than learning generalizable features, leading to severe overfitting.

This problem is exacerbated by label noise. In many real-world scenarios, labels are generated via "weak supervision" (e.g., automated scripts or non-expert crowdsourcing), which are often incorrect. Standard fine-tuning is notoriously fragile in the face of such noise. The authors set out to answer a critical question: How can we theoretically justify and practically implement regularization that ensures both generalization and robustness during fine-tuning?

The REGSL Approach

To address these vulnerabilities, the authors propose a two-pronged approach called REGSL (Regularized Self-Labeling):

  1. Layer-wise Distance Regularization: Based on a PAC-Bayes generalization bound they derived, the authors found that the "distance traveled" by weights during training is a critical factor. Instead of applying a uniform penalty to all layers, they use an exponentially increasing constraint. Bottom layers (which capture general features) are kept very close to their pre-trained values, while top layers (which capture task-specific features) are given more freedom to move.
  2. Self-Labeling (Correction & Reweighting): To handle noisy labels, the algorithm uses the model's own evolving "intuition":
  3. Label Correction: If the model is highly confident in a prediction that disagrees with the provided label, the label is updated to the model’s prediction.
  4. Label Reweighting: Samples with high loss (likely noise) are down-weighted during the gradient update, preventing the model from being "pulled" in the wrong direction by outliers.
Training vs. Test accuracy over epochs, demonstrating how standard fine-tuning overfits while regularized self-labeling maintains generalization and actively corrects labels.

Key Insights and Theoretical Grounding

The success of REGSL is built on several key theoretical and empirical observations:

  • The "Distance" Matters: The paper proves that generalization error is bounded by the $\ell_2$ distance between the fine-tuned and pre-trained weights. This provides a solid theoretical footing for distance-based regularization.
  • Hierarchical Flexibility: A key "aha moment" is that not all layers are equal. Empirical measurements showed that top layers naturally travel further from initialization than bottom layers. Forcing a uniform constraint on all layers is sub-optimal; the exponentially increasing constraint ($D \cdot \gamma^{i-1}$) better matches the network's natural behavior.
Empirical measurements showing that higher layers in the network travel significantly further from their pre-trained initialization than lower layers.
  • Synergy between Regularization and Self-Labeling: Regularization prevents the model from memorizing noise in the early stages. This "clean" early learning makes the model's predictions more reliable, which in turn makes the self-labeling/correction step much more accurate. It’s a virtuous cycle.
  • Noise Stability: Pre-trained models exhibit much higher "noise stability" (resistance to weight perturbations) than randomly initialized models, explaining why they are such a powerful starting point for robust learning.

Experimental Validation

The researchers validated their approach on a diverse set of benchmarks, including standard image classification (e.g., CUB-200-2011, Stanford-Cars), medical imaging (ChestX-ray14), few-shot learning (miniImageNet), and text classification.

Key Results: * General Performance: REGSL improved baseline methods by an average of 1.76% across seven image classification tasks. * Robustness to Noise: In scenarios with noisy labels, REGSL outperformed baselines by a significant 3.56% on average. * Few-Shot Success: Even with extremely limited data, the method provided a 0.75% boost on miniImageNet. * Transferability: The method proved effective even when transferring to very different domains, such as medical X-rays, where it improved the mean AUROC by 0.39%.

Limitations and Future Work

While highly effective, the approach has limitations. The base distance $D$ and scale factor $\gamma$ for the layer-wise constraints require hyperparameter tuning, which can be computationally expensive. Additionally, while the authors note that adversarial pre-training helps downstream transfer, a full theoretical analysis of why this happens within their PAC-Bayes framework remains an open question. Finally, while REGSL improves accuracy and robustness, it does not explicitly address underlying societal biases present in pre-trained models—a critical area for future fairness-focused research in transfer learning.

Summary updated

BibTeX
@inproceedings{li2021improved,
  author = {Dongyue Li and Hongyang R. Zhang},
  title = {{Improved Regularization and Robustness for Fine-tuning in Neural Networks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=xZPSWpR7rgN},
}
Figure