Skip to content

Differentially private fine-tuning requires additional hyperparameter searchFine-Tuning with Differential Privacy Necessitates an Additional Hyperparameter Search

arXiv· arXiv:2210.02156· Yannis Cattan, Christopher A. Choquette-Choo, Nicolas Papernot, Abhradeep ThakurtaMines Paris, Université PSL; Google Research, Brain TeamIndexed by this site · 27 days ago· Originally publishedDefenses

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

The authors state that in DP fine-tuning, fine-tuning only the first and last layers of a pretrained model can reach 77.9% accuracy on CIFAR-100 (ε=2), outperforming full-model fine-tuning's 74.7%.

Questions
DP-SGD has a "curse of dimensionality" that grows with parameter count, making privacy and utility hard to achieve together; existing DP fine-tuning methods do not select which layers to fine-tune based on the characteristics of privacy-preserving learning.
Methods
While following De et al.'s DP-SGD implementation and all optimization tricks, only the fine-tuning scope is changed to the first and last layers of a pretrained 28-10 Wide-ResNet, with the remaining layers frozen.
Experiments and results
On CIFAR-10/100 (ImageNet pretraining), first-last-layer fine-tuning outperforms whole-model or last-layer-only fine-tuning under most privacy budgets; on CIFAR-100 at ε=2 it reaches 77.9%, 3.2 percentage points higher than whole-model fine-tuning.
Limitations and future work
The authors point out that hyperparameters themselves may leak privacy, so related tuning strategies cannot be directly transferred to privacy settings; the experiments cover only one model and two datasets, and the authors state this is a short preprint.
Experimental setup28-10 Wide-ResNet · CIFAR-10、CIFAR-100 et al. · Top-1 DP Fine-Tuning Accuracy、(ε, δ)-DP
Evaluated models
28-10 Wide-ResNet
Benchmarks
CIFAR-10CIFAR-100ImageNet(预训练)
Metrics
Top-1 DP Fine-Tuning Accuracy(ε, δ)-DP
AI summaryResearchers propose that when performing differentially private fine-tuning on models pretrained on public data, carefully selecting which layers are fine-tuned can establish new privacy-accuracy trade-offs, for example achieving 77.9% accuracy on CIFAR-100 with (ε, δ)=(2, 10^-5) on an ImageNet-pretrained model. The paper notes that algorithms such as DP-SGD cannot benefit from model scale as non-private learning does, leading to undesirable privacy-accuracy trade-offs on complex tasks, and that existing differentially private fine-tuning methods do not adapt the fine-tuning approach to the characteristics of privacy-preserving learning. The authors accordingly call for additional hyperparameter search for the differentially private fine-tuning pipeline itself.

Researchers propose that when performing differentially private fine-tuning on models pretrained on public data, carefully selecting which layers are fine-tuned can establish new privacy-accuracy trade-offs, for example achieving 77.9% accuracy on CIFAR-100 with (ε, δ)=(2, 10^-5) on an ImageNet-pretrained model. The paper notes that algorithms such as DP-SGD cannot benefit from model scale as non-private learning does, leading to undesirable privacy-accuracy trade-offs on complex tasks, and that existing differentially private fine-tuning methods do not adapt the fine-tuning approach to the characteristics of privacy-preserving learning. The authors accordingly call for additional hyperparameter search for the differentially private fine-tuning pipeline itself.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The authors state that existing DP fine-tuning does not select fine-tuning layers according to the characteristics of privacy learning, and propose fine-tuning only the first and last layers to improve the privacy-accuracy trade-off.

    Core question: which layers of a pretrained model should be fine-tuned in differential privacy (DP) fine-tuning to achieve better accuracy under a fixed privacy budget.

    • Background and motivation: DP-SGD suffers from a "curse of dimensionality"—the required noise norm grows with the number of parameters d; larger models improve performance in non-private settings but may instead harm performance in private settings, leading to a poor trade-off between privacy and utility (accuracy).
    • Shortcomings of existing methods: The authors argue that DP fine-tuning work represented by De et al. and Mehta et al. directly carries over the two approaches from non-private fine-tuning (fine-tuning the entire model or fine-tuning only the last layer), without selecting which parameters to fine-tune according to the characteristics of privacy learning.
    • Core observation and hypothesis: Fine-tuning only some layers can reduce the norm of the noise that must be added to obtain DP; the authors hypothesize that fine-tuning the first layer (more general features) and the last layer (more task-relevant features) can preserve task performance while alleviating the privacy-scale tension, and state that this hypothesis will be further discussed in the full version.
    • Proposed approach: During DP fine-tuning, fine-tune only the first and last layers of the pretrained model (first-last-layers fine-tuning); the authors state that in most libraries this requires only a one-line change, and call for treating the choice of fine-tuning layers as a hyperparameter that requires additional search in the DP fine-tuning pipeline.
  2. What related research exists?

    Related work falls into three categories: DP learning and the curse of dimensionality, representative work on DP fine-tuning, and layer-selection practices in non-private fine-tuning.

    DP Learning and the Curse of Dimensionality

    • Abadi et al. (2016) — proposed DP-SGD, the most commonly used optimization algorithm for privacy-preserving learning; Chaudhuri et al. (2011) initiated research on differentially private empirical risk minimization.
    • Bassily et al. (2014) — gave a bound on excess risk growing with √d/ε, providing intuition that "larger parameter counts are not necessarily beneficial for DP learning."
    • Papernot et al. (2019), Tramer & Boneh (2020), Kurakin et al. (2022) and others — empirically observed that increasing model size may instead degrade performance in privacy settings.

    Representative Work on DP Fine-Tuning (the direct comparison for this paper)

    • De et al. (2022) — found on CIFAR-10/100 that fine-tuning the whole model is best, and on ImageNet that fine-tuning only the last layer is better; their contributions focus on optimizing the DP-SGD implementation (group normalization, large batches, weight standardization, parameter moving average, data augmentation), without carefully studying the choice of layers to fine-tune. This paper uses their setup and results as baselines.
    • Mehta et al. (2022) — parallel work, fine-tuning ViT-H/14 on ImageNet, likewise comparing only whole-model fine-tuning and last-layer-only fine-tuning, finding last-layer-only fine-tuning better, with large batches (128k to 1M) performing best.

    Layer Selection Practices in Non-Private Fine-Tuning

    • Yosinski et al. (2014) — proposed the intuition that lower-layer features are more general and higher-layer features more task-relevant, supporting the common practice of fine-tuning only the last (few) layers (Donahue et al. 2014; Long et al. 2015).
    • Radford et al. (2021) — sometimes the last layer is learned from random initialization or a new linear layer is appended to the model.

    Positioning: The authors say this paper differs from the above work in treating "which parameters to fine-tune" as a problem requiring dedicated study in DP fine-tuning, rather than following the default practice of non-private fine-tuning; the baseline methods are Whole-Model and Last-Layer fine-tuning, with CIFAR-10 and CIFAR-100 as benchmarks.

  3. How does the paper address this problem?

    On De et al.'s DP-SGD framework, only the fine-tuning scope is changed to the first and last layers; all other settings remain completely unchanged.

    Overall approach: do not change the DP-SGD algorithm itself, only change the subset of parameters being fine-tuned — First-Last-Layers fine-tuning, i.e., fine-tune only the first and last layers of the pretrained model and freeze the middle layers.

    Privacy Framework

    • Uses (ε, δ)-DP: mechanism M satisfies Pr[M(d) ∈ S] ≤ eε Pr[M(d′) ∈ S] + δ, where ε is the privacy budget and δ is the failure probability.
    • The optimization algorithm is DP-SGD: per-sample gradients are clipped to C by ℓ2 norm, Gaussian noise with standard deviation σ·C is added to the sum of mini-batch gradients, and σ is calibrated to the (ε, δ) guarantee after composing multiple epochs.

    Choice of Layers to Fine-Tune

    • Three configurations are compared: fine-tuning the whole model (Whole-Model), fine-tuning only the last layer (Last-Layer), and fine-tuning only the first and last layers (First-Last-Layers, this paper's method).
    • Design rationale (in the authors' voice): reducing the number of fine-tuned parameters can reduce the norm of the noise needed to obtain DP; the last layer learns task-relevant features and the first layer learns more general features, and the authors hypothesize that these two types of layers are more important for task performance.
    • The authors say this change requires only one line of code in most libraries.

    Experimental Configuration

    • Model: 28-10 Wide-ResNet, pretrained on ImageNet, then DP fine-tuned on downstream datasets.
    • Datasets: CIFAR-10 and CIFAR-100.
    • Directly follows all of De et al.'s optimization techniques: group normalization, large batches (e.g., 4096 or 16384), weight standardization, exponential moving average of parameters, and data augmentation that averages gradients over augmented samples before clipping; no other modifications besides replacing the fine-tuning step with first-last-layer fine-tuning.

    Evaluation Method

    • The metric is Top-1 DP fine-tuning accuracy, reported under ε ∈ {1, 2, 4, 8} (δ = 10⁻⁵); baseline numbers are taken from De et al. or reproduced using their exact same setup.
  4. What experiments did the paper conduct?

    Comparing three fine-tuning scopes on CIFAR-10/100, first-last-layer fine-tuning achieves the highest accuracy under most privacy budgets.

    Experimental Setup

    • Model under test: 28-10 Wide-ResNet (ImageNet pretrained), this one only.
    • Datasets: CIFAR-10, CIFAR-100; pretraining dataset is ImageNet.
    • Baselines: Whole-Model fine-tuning and Last-Layer fine-tuning, with numbers taken from De et al. or reproduced using their exact same setup.
    • Metric: Top-1 DP Fine-Tuning Accuracy (%).
    • Privacy budget: ε ∈ {1, 2, 4, 8}, δ = 10⁻⁵.
    • Sample size and number of repetitions: not reported in the paper.

    Main Results

    According to Table 1 (Top-1 DP fine-tuning accuracy %):

    Swipe horizontally to read the table

    DatasetMethodε=1ε=2ε=4ε=8
    CIFAR-10Whole-Model94.795.496.196.7
    CIFAR-10Last-Layer93.193.694.094.2
    CIFAR-10First-Last-Layers (Ours)95.095.696.196.4
    CIFAR-100Whole-Model70.374.779.281.8
    CIFAR-100Last-Layer70.373.976.177.6
    CIFAR-100First-Last-Layers (Ours)73.777.981.082.1
    • The authors say first-last-layer fine-tuning "consistently" outperforms prior SOTA results using whole-model or last-layer-only fine-tuning; according to the table, the exceptions are CIFAR-10 at ε=4, where it ties Whole-Model (96.1), and at ε=8, where it is lower than Whole-Model (96.4 vs. 96.7).
    • The authors report 77.9% vs. 74.7% on CIFAR-100 at ε=2, an improvement of 3.2 percentage points; the abstract separately writes the comparison as 74.6%.
    • The authors state in the Table 1 caption: when the model is already near the non-private baseline and saturated, first-last-layer fine-tuning yields no additional gain; otherwise the gain is highest on CIFAR-100 at ε=1, up to 3.4 percentage points.

    Other Ablations and Analysis

    • The paper conducted only the one set of main experiments above and did not report other ablations, parameter analyses, defense evaluations or human evaluations.
  5. What are some points that can be further explored?

    The authors point out that hyperparameters may leak privacy and that hyperparameter-tuning strategies cannot be directly carried over to private settings, and state that this will be discussed further in the full version.

    Limitations and Future Directions Noted by the Authors

    • Privacy leakage risk of hyperparameters (Conclusion): The authors point out that hyperparameters may leak privacy (citing Papernot & Steinke 2022), and many fine-tuning strategies that introduce additional hyperparameters cannot be directly applied in privacy settings.
    • Mechanism hypothesis to be verified (Section 3, footnote 2): The authors say the hypothesis that "first and last layers are more important" is still under further study and will be discussed in expanded form in the full manuscript.
    • Manuscript form (first-page footnote 1): The authors note this paper is a preprint (short note) of an upcoming full version.

    Experimental Coverage

    • The model under test is only 28-10 Wide-ResNet, with ImageNet as the pretraining dataset.
    • Downstream evaluation covers only two image classification benchmarks, CIFAR-10 and CIFAR-100.
    • Privacy budgets cover ε ∈ {1, 2, 4, 8}, δ = 10⁻⁵.
    • The fine-tuning configurations compared are Whole-Model, Last-Layer and First-Last-Layers; the paper does not report results for other layer combinations (such as fine-tuning only the first layer or fine-tuning middle layers).
    • The paper does not report the number of repetitions, variance or statistical significance tests, nor cost figures such as training time.
  6. Summarize the main content of the paper

    A short paper: during DP fine-tuning, fine-tuning only the first and last layers can improve accuracy on CIFAR-10/100 under most privacy budgets.

    This is a short paper on a differentially private fine-tuning method (the authors note it is a preprint of the full version).

    • Problem: The noise norm in DP-SGD grows with parameter count, so model scale may not bring gains in privacy settings; the authors argue that existing DP fine-tuning work directly follows non-private practice (fine-tuning the whole model or only the last layer), ignoring the selection of layers to fine-tune based on the characteristics of privacy-preserving learning.
    • Method: While fully following De et al.'s DP-SGD implementation and optimization techniques, they change only the fine-tuning scope to the first and last layers of a pretrained 28-10 Wide-ResNet (ImageNet pretrained), which the authors say requires only a one-line change in most libraries.
    • Main results (Table 1, Top-1 accuracy): On CIFAR-100 at ε=2, first-last-layer fine-tuning reaches 77.9%, above Whole-Model's 74.7% and Last-Layer's 73.9%; at ε=1 it reaches 73.7%, 3.4 percentage points above both baselines (both 70.3%); on CIFAR-10 it leads slightly at ε=1 and 2, but ties Whole-Model at ε=4 and is slightly lower at ε=8 (96.4 vs. 96.7).
    • Authors' conclusion: The choice of layers to fine-tune should become a hyperparameter requiring additional search in DP fine-tuning; the authors also caution that hyperparameters themselves may leak privacy, so related tuning strategies cannot be directly transferred to privacy settings, and say they will discuss the hypothesis that "first and last layers are more important" in the full version.
Read originalarxiv.org