Characterizing the Training Dynamics of Private Fine-tuning with Langevin diffusion

Shuqi Ke, Charlie Hou, Sewoong Oh, Giulia Fanti

TL;DR

Differentially private full fine-tuning (DP-FFT) can severely distort valuable pre-trained features early in training due to misalignment with a randomly initialized classification head. This paper shows that a two-phase strategy—first running differentially private linear probing to align the head, then switching to full fine-tuning (DP-LP-FFT)—mitigates this distortion and optimizes the privacy-utility trade-off.

What Problem Does This Paper Address?

When deploying machine learning models under strict privacy constraints, a standard pipeline is to pre-train a model non-privately on public data and then fine-tune it on private data using Differentially Private Stochastic Gradient Descent (DP-SGD).

Engineers typically choose between two fine-tuning methods:

  1. Linear Probing (LP): Freezing the pre-trained feature extractor and only training the final classification head.
  2. Full Fine-Tuning (FFT): Updating all parameters across the entire network.
Figure 1: Linear probing (LP) freezes the lower layers and optimizes the last linear layer while full fine-tuning (FFT) optimizes the whole network.

While FFT theoretically has more capacity, practitioners often notice a strange phenomenon: in private settings, full fine-tuning can initially degrade the quality of pre-trained features, leading to suboptimal performance. This paper tackles the underlying training dynamics of DP fine-tuning to explain why this feature distortion happens, how to mathematically model it, and how to prevent it by combining both approaches.

Methods

The authors analyze the continuous-time dynamics of DP-SGD by modeling it as a Stochastic Differential Equation (SDE) via Langevin diffusion. To make the complex, non-linear math tractable without oversimplifying the neural network's architecture, they introduce two key methodological innovations:

  • Zeroth-Order Approximation Technique: Instead of linearizing the neural network parameters (which destroys the multi-layer interactions), they perform an asymptotic expansion of the stochastic noise term. This converts the complex SDE into a deterministic Ordinary Differential Equation (ODE) for the parameter dynamics while still explicitly preserving the second-order noise effects within the loss dynamics.
  • Layer-Wise Sensitivity Modeling: They prove that uniform noise injection ignores the fact that the linear head and the feature extractor have fundamentally different sensitivities at initialization. They propose a modified Langevin diffusion framework that scales noise based on layer-wise sensitivity, restoring mathematical invariants like the "imbalance matrix."

Using these tools, they derive explicit upper and lower convergence bounds for 2-layer ReLU networks and 2-layer linear networks.

Datasets

The theoretical insights were validated using several standard computer vision transfer-learning benchmarks:

  • Public Pre-training: ImageNet-1K (using self-supervised methods like BYOL and MoCo, or distillation).
  • Private Fine-tuning: STL-10, CIFAR-10, and MNIST.
  • Synthetic Data: Evaluation was also conducted on WideResNet models pre-trained on synthetic images generated via StyleGAN.

Key Insights and Ideas

  • The Cause of Feature Distortion: At the start of full fine-tuning, the classification head is randomly initialized and completely misaligned with the pre-trained backbone. The resulting gradients—further corrupted by DP noise—force the backbone to update in directions that warp and destroy its beautifully clustered pre-trained geometry.
  • The "Mitigate-Then-Fine-Tune" Effect: Running a brief phase of linear probing (DP-LP) first allows the classification head to adapt to the backbone without altering the backbone's weights. Once the head is aligned, transitioning to full fine-tuning no longer distorts the features; instead, feature quality improves monotonically.
  • Privacy Budget Allocation Rules: The optimal split of the privacy budget ($\epsilon$) depends entirely on the total budget available. When the total privacy budget is small (high noise regime), you should allocate a much larger fraction of it to the linear probing phase to prevent noise from destroying the model.

Key Results

  • The Feature Quality Dip: Empirically, the authors demonstrated that during DP-FFT, feature quality (measured by kNN accuracy) drops sharply in the first epoch before slowly recovering. DP-LP-FFT completely bypasses this dangerous dip.
Figure 2: Left: Backbone feature quality evaluated by top-1 kNN accuracy on the downstream task, for ResNet-50, through public pre-training on ImageNet-1K and differentially private fine-tuning on STL-10. Right: Privacy budget trade-off in DP-LP-FFT, predicted in our theory, for WideResNet- 16-4 on CIFAR-10 (Tang et al., 2023). For a detailed explanation, refer to
  • Optimal Budget Splitting: Experiments on CIFAR-10 using a WideResNet showed a clear concave utility curve regarding budget allocation. Allocating roughly 20% of the privacy budget to the initial linear probing phase yielded the highest final test accuracy across moderate privacy regimes ($\epsilon = 1, 2, 3$).
  • Cross-over Regimes: Under high noise regimes (low $\epsilon$), pure DP-LP often beats pure DP-FFT. However, the hybrid DP-LP-FFT consistently achieves the best or near-best performance across all tested architectures (ResNet-18, MobileNet-v3, and DeiT transformers).

Limitations and Future Work

While this work provides a major stepping stone for understanding private optimization, a few limitations remain:

  • Simplified Architectures: The explicit theoretical bounds are derived for 2-layer networks. Extending these exact proofs to deep, multi-layer architectures remains an open mathematical challenge.
  • Loss Functions: The analysis primarily focuses on exponential and mean squared error (MSE) losses; analyzing cross-entropy dynamics under this approximation is left for future work.
  • Parameter-Efficient Fine-Tuning (PEFT): Although the authors show similar empirical trends when substituting full fine-tuning with LoRA, a rigorous theoretical extension of their framework to PEFT methods has not yet been developed.

Summary updated

Abstract

We show that differentially private full fine-tuning (DP-FFT) can distort pre-trained backbone features based on both theoretical and empirical results. We identify the cause of the distortion as the misalignment between the pre-trained backbone and the randomly initialized linear head. We prove that a sequential fine-tuning strategy can mitigate the feature distortion: first-linear-probing-then-fine-tuning (DP-LP-FFT). A new approximation scheme allows us to derive approximate upper and lower bounds on the training loss of DP-LP and DP-FFT, in a simple but canonical setting of 2-layer neural networks with ReLU activation. Experiments on real-world datasets and architectures are consistent with our theoretical insights. We also derive new upper bounds for 2-layer linear networks without the approximation. Moreover, our theory suggests a trade-off of privacy budget allocation in multi-phase fine-tuning methods like DP-LP-FFT.
BibTeX
@article{ke2025characterizing,
  author = {Shuqi Ke and Charlie Hou and Sewoong Oh and Giulia Fanti},
  title = {{Characterizing the Training Dynamics of Private Fine-tuning with Langevin diffusion}},
  journal = {Accepted by TMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=LwT8aDv502},
}
Figure