Skip to content

Exploring the advantages of visual prompting in differential privacyExploring the Benefits of Visual Prompting in Differential Privacy

arXiv· arXiv:2303.12247· ICCV 2023· Yizhe Li, Yu-Lin Tsai, Xuebin Ren, Chia-Mu Yu, Pin-Yu ChenSchool of Computer Science and Technology, Xi’an Jiaotong University; National Yang Ming Chiao Tung University; IBM ResearchIndexed by this site · 27 days ago· Originally publishedDefenses

Quick read

Defenses

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

The authors propose Prom-PATE, which combines visual prompts (VP) with PATE to train differentially private classifiers, and report 97.07% accuracy on CIFAR-10 at ϵ=1.019.

Threat modelDefender's goal: train an image classifier satisfying (ϵ, δ)-DP on sensitive data. The defense relies on PATE's Confident-GNMax aggregation to guarantee privacy; the re-teacher models are not released; the public pretrained model (ImageNet) is used twice (re-teacher and student training).

Questions
Training classifiers with differential privacy (DP) faces a privacy-utility trade-off: PATE has low teacher model accuracy when data are insufficient, while directly fine-tuning a public pretrained model may break the DP guarantee.
Methods
Proposes Prom-PATE: uses visual prompting (VP) to reprogram an ImageNet-pretrained model into a re-teacher, replacing the original teachers in PATE; then aggregates labels with Confident-GNMax and trains the student model with semi-supervised learning.
Experiments and results
On CIFAR-10, Prom-PATE reaches 97.07% at ϵ=1.019 (Table 3), and 99.17% after switching to a stronger backbone (Table 4); on the Blood-MNIST cross-domain task it is about 8 percentage points higher than Transfer-PATE.
Limitations and future work
The authors point out that high-resolution images lose features after rescaling, causing accuracy to drop; the experiments cover only image classification and do not involve other task types.
Experimental setupSwin Transformer、ViT et al. · CIFAR-10、CIFAR-100 et al. · top-1 accuracy、privacy budget ϵ et al.
Evaluated models
Swin TransformerViTResNet50ResNet152WideResNet
Benchmarks
CIFAR-10CIFAR-100Blood-MNISTSVHNEuroSATPathMNISTTissueMNISTDermaMNISTCelebA-GenderCelebA-HairFFHQ-Gender
Metrics
top-1 accuracyprivacy budget ϵAnswer Accuracy
AI summaryVisual Prompting combined with the differentially private training method PATE achieves the current best privacy-utility trade-off with the least privacy budget. Visual Prompting enables sample-efficient downstream task adaptation by engineering a well-trained frozen source model. Experiments on cross-domain image classification with large domain gaps and extensive ablation studies further verify the effectiveness and contribution of Visual Prompting under differential privacy.

Visual Prompting combined with the differentially private training method PATE achieves the current best privacy-utility trade-off with the least privacy budget. Visual Prompting enables sample-efficient downstream task adaptation by engineering a well-trained frozen source model. Experiments on cross-domain image classification with large domain gaps and extensive ablation studies further verify the effectiveness and contribution of Visual Prompting under differential privacy.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    How to improve PATE with visual prompting to train high-accuracy image classifiers under differential privacy constraints.

    Core problem: when training high-accuracy image classifiers under differential privacy (DP) constraints, PATE suffers from low teacher model accuracy due to data partitioning, while directly fine-tuning a public pretrained model may break the privacy guarantee.

    • Problem setting: DP training (e.g., DPSGD, PATE) requires a trade-off between the privacy budget ϵ and model utility. PATE partitions sensitive data to train multiple teacher models, then uses noisy voting to label public data for training a student model; however, when sensitive data are limited, each teacher receives too little data (e.g., CIFAR-10 split into 250 shards, only 200 images each), teacher accuracy is below 50%, leading to poor student model performance (Section 3.1, C1).
    • Shortcomings of existing methods: The authors point out that fine-tuning a public pretrained model with transfer learning (TL) as PATE teachers performs poorly when data are over-partitioned (Table 1 shows TL-based methods reach only 76.93%); and directly fine-tuning a pretrained model with DPSGD (e.g., De et al.) may have questionable DP guarantees when the source and target domains have similar distributions (Section 3.1, C3, citing the concern in [38]).
    • Core observation: Visual prompting (VP)/model reprogramming (MR) can adapt a large source-domain model to a small target domain by training input perturbations and label mappings without modifying the pretrained model weights, and has cross-domain capability. The authors hypothesize that this property can solve the problem of insufficient teacher data in PATE.
    • Proposed method: Prom-PATE is proposed, replacing each teacher model in PATE with a VP-based re-teacher (fixed backbone, training only the visual prompt ω1 and label mapping ω2), then aggregating predictions with Confident-GNMax, and finally training the student model with semi-supervised learning. The authors state this is the first exploration of the benefits of VP in DP classifier design.
  2. What related research exists?

    Related work covers visual prompting/model reprogramming, DP training methods such as DPSGD and PATE, and Reprogrammable-FL.

    Visual prompting and model reprogramming

    • Bahng et al. [3] proposed Visual Prompting (VP), which adapts a frozen pretrained model (e.g., the CLIP image encoder) to downstream classification tasks by padding the input image with trainable perturbations together with a label mapping, outperforming linear probing on some tasks. Chen et al. [7] introduced iterative label mapping to improve VP.
    • Tsai et al. [39] and Neekhara et al. [31] applied model reprogramming (MR) to cross-domain adaptation (e.g., biomedical images), showing that a black-box source model can be reused when data are scarce. Chen [8] surveyed the application of MR in resource-efficient cross-domain learning.

    Differentially private classifiers

    • DPSGD [1] achieves DP through gradient clipping and noise addition, but the authors point out that it suffers information loss due to clipping and noise. Recent work [10, 30] argues that the privacy loss of DPSGD may be overestimated.
    • PATE [33, 34] trains a student model through a teacher ensemble and noisy aggregation. Private-kNN [46] uses kNN queries to avoid data partitioning and is an improvement on PATE.
    • Private fine-tuning of pretrained models: Tramèr & Boneh [37] perform private fine-tuning with SimCLR features; De et al. [11] fine-tune CIFAR-10 with DPSGD after ImageNet pretraining (94.7% at ϵ=1); Bu et al. [5] improve DPSGD efficiency with ghost clipping.

    Combining VP and DP

    • Reprogrammable-FL [2] learns privatized visual prompts and label mappings with DPSGD in a federated learning setting. The authors point out that it still needs to clip and add noise to prompt updates in each round, so its performance may be lower than non-private VP (Section 2).

    Baselines and positioning

    • The baselines compared in the paper include: plain PATE (train-from-scratch teachers), Transfer-PATE (transfer-learning teachers), and Reprogrammable-FL [2]. The authors position Prom-PATE as the first method to combine VP with PATE for centralized DP classifier training, differing from Reprogrammable-FL's federated setting and DPSGD update mechanism.
  3. How does the paper address this problem?

    Prom-PATE uses visual prompts to reprogram a pretrained model into a re-teacher, replacing PATE teachers, and then trains the student model via Confident-GNMax aggregation and semi-supervised learning.

    The core idea of Prom-PATE is to replace the train-from-scratch teachers in PATE with visual prompts (VP), thereby leveraging the knowledge of a public pretrained model while inheriting PATE's privacy guarantees.

    Problem setting and notation

    • The source model fS(θS; x) is pretrained on a large public dataset DS (e.g., ImageNet) and frozen; the target private dataset DT is used for training. VP adapts fS to DT through input transformation and label mapping without modifying θS.

    Re-teacher model training

    • Each re-teacher trains only two sets of parameters: the visual prompt ω1 (input perturbation) and the label mapping ω2. The visual prompt is defined as x̂S = M ⊙ ω1 + (I − M) ⊙ ZeroPad(xT), where M is a binary mask controlling the ratio of the target image to noise; predictions are output as target-domain labels through the label mapping fℓ(ω2; ·).
    • There are two label mapping approaches (Figure 2): random label mapping (RLM, a predefined source-target label correspondence) or a fully connected layer (FC, a learnable mapping).

    Privacy aggregation and student training

    • The Confident-GNMax mechanism of PATE is adopted: for unlabeled public samples, the votes of all re-teachers are collected, and it is first checked whether max{nj(x)} + N(0, σ1²) ≥ T holds; if so, arg max{nj(x) + N(0, σ2²)} is output as the label, otherwise no label is output.
    • The student model is trained with semi-supervised learning (FixMatch [36] or FreeMatch [41]); only part of the public data obtains labels through the above mechanism, and the remaining unlabeled data are used for semi-supervised training.

    Key parameter settings

    • Visual prompt dimension 224×224 (matching the ImageNet input); re-teacher training uses Adam, learning rate 0.05, decay rate 70%, batch size 16, trained for 10 epochs.
    • The label mapping by default randomly selects 10 classes from the 1000 source classes for one-to-one mapping; student training on CIFAR-10 uses 9000 samples (partially labeled) and tests on 1000 samples.

    Privacy analysis

    • The authors prove that Prom-PATE satisfies (ϵ, δ)-DP: the re-teachers are not released, and the only step that touches sensitive data is the student querying the ensemble labels of the re-teachers, which inherits the RDP guarantee of Confident-GNMax (Theorem 3, Appendix 6.1).
  4. What experiments did the paper conduct?

    The experiments cover 11 datasets including CIFAR-10/100 and Blood-MNIST, compare PATE, Transfer-PATE and existing DP methods, and verify the privacy-utility trade-off of Prom-PATE.

    Experimental Setup

    • Methods evaluated: Prom-PATE (VP-based re-teacher + pretrained student classifier), Transfer-PATE (transfer-learning teacher), plain PATE (teacher trained from scratch), Reprogrammable-FL [2].
    • Pretrained models: re-teacher backbones use Swin Transformer, ViT, ResNet50/152, WideResNet (Table 7); student training uses ViT or EVA; semi-supervised algorithms use FixMatch or FreeMatch.
    • Datasets: CIFAR-10, CIFAR-100, Blood-MNIST, SVHN, EuroSAT, PathMNIST, TissueMNIST, DermaMNIST, CelebA-Gender/Hair, FFHQ-Gender (Table 12).
    • Privacy parameters: δ=10⁻⁵, using RDP accounting; ϵ≈1.019 on CIFAR-10 (Table 3), ϵ≈1.973 on Blood-MNIST (Table 5).
    • Number of repetitions: all results are the mean and standard deviation of 3 independent experiments (Section 4.1).

    Main Results

    Swipe horizontally to read the table

    MethodϵAccuracy (%)Source
    Prom-PATE (Swin+ViT+FixMatch)1.01997.07 ± 0.50Table 3
    Prom-PATE (Swin+EVA+FreeMatch)1.01999.17Table 4
    Transfer-PATE (TL teacher + pretrained student)1.02196.10 ± 0.46Table 3
    Plain PATE (trained from scratch)1.02832.53 ± 2.57Table 3
    De et al. [11]194.7Table 4
    Bu et al. [5]196.7Table 4
    • The authors claim that Prom-PATE achieves the SOTA privacy-utility trade-off on CIFAR-10 at ϵ≈1, and that it can be further improved to 99.17% by changing the backbone (Swin→EVA) and the semi-supervised algorithm (FixMatch→FreeMatch).
    • Plain PATE achieves only 32.53% under the same setting, verifying the problem of insufficient teacher data (C1).

    Cross-Domain Dataset Evaluation

    • Setup: Blood-MNIST (8-class blood cell images, with a large domain gap from ImageNet), Prom-PATE uses a Swin backbone, 1000 re-teachers.
    • Results: Prom-PATE accuracy 69.93%, Transfer-PATE 61.33%, Reprogrammable-FL [2] 63.45% (Table 5).
    • Authors' interpretation: when the domain gap is sufficient, VP's cross-domain capability makes Prom-PATE about 8 percentage points higher than Transfer-PATE, and the high accuracy eliminates privacy concerns about "training-test same distribution" (C3).

    Ablation Studies

    • Teacher type and student pretraining (Table 3): VP-based re-teacher is up to 5 percentage points higher than TL teacher (A vs C: 97.07 vs 96.10); using a pretrained student classifier is 15–20 percentage points higher than training from scratch (A vs B: 97.07 vs 82.20).
    • Number of re-teachers (Table 6): accuracy is highest with 1000 re-teachers (97.07%), 85.87% with 250, 96.53% with 500; only 59.20% with 100.
    • Choice of pretrained model (Table 7): accuracy is highest when Swin Transformer is the source model (97.07%), and its ImageNet source-domain accuracy is also highest (85.2%, Table 8).
    • Label mapping (Table 10): 1-layer FC is best (97.07%), random label mapping (RLM) only 33.4%, 2-layer FC 96.13%; RLM's noisy label accuracy is only 22.9%.
    • Binary mask M (Table 9): 97.07% with M, 96.53% without.
    • Rescaling ratio (Table 11): accuracy is highest when target images are rescaled to 192×192 (97.07%), only 93.03% at 64×64.

    Other Experiments

    • CIFAR-100 (Table 21): Prom-PATE reaches 91.47% at ϵ=8.078, higher than Bu et al. [5]'s 88.4% (ϵ=8).
    • High-resolution images (Table 18–20): about 93.2% for Prom-PATE on CelebA-Gender, about 86.9% on FFHQ-Gender; the authors note that features are lost after rescaling high-resolution images, resulting in lower accuracy than CIFAR-10.
    • Semi-supervised algorithm comparison: the difference between FixMatch and FreeMatch results is minimal (Table 18–20).
  5. What are some points that can be further explored?

    The authors point out that rescaling high-resolution images leads to feature loss, and the experiments are limited to image classification; future work could explore broader VP definitions and backbone replacement.

    Limitations and future directions noted by the authors

    • Feature loss for high-resolution images: The authors point out that when target-task images have high resolution (e.g., CelebA, FFHQ), rescaling to 224×224 causes features to disappear, negatively affecting accuracy (Section 6.2).
    • Limited scope of VP: The authors explicitly restrict VP to input-level prompt engineering and do not explore injecting trainable token embeddings into the layers of the pretrained model (e.g., visual prompt tuning [18]), leaving this for future work (Section 2).
    • Backbone and algorithm replacement: The authors state that Prom-PATE can flexibly replace the source model and semi-supervised training method to easily improve accuracy (Section 4.3), implying that newer backbones and algorithms could be integrated in the future.

    Scope of experimental coverage

    • Task types: Only image classification (including cross-domain adaptation) is covered; other vision tasks such as detection and segmentation are not involved.
    • Datasets: 11 datasets are covered, including CIFAR-10/100, Blood-MNIST, SVHN, EuroSAT, PathMNIST, TissueMNIST, DermaMNIST, CelebA-Gender/Hair, FFHQ-Gender (Table 12).
    • Privacy budget: On CIFAR-10, ϵ≈1.019 is mainly reported; on CIFAR-100, ϵ=4.089 and 8.078; on cross-domain datasets, ϵ ranges from 1.5–3.0.
    • Model scale: The number of re-teachers ranges from 100–2000, and backbones cover ResNet, ViT, Swin, WideResNet, EVA.
    • Not reported: The paper does not report the training/inference time or memory overhead of Prom-PATE, nor a direct comparison with DPSGD on the same backbone.
  6. Summarize the main content of the paper

    Prom-PATE combines visual prompts with PATE and achieves 97.07% accuracy on CIFAR-10 at ϵ=1.019; the authors claim it achieves a SOTA privacy-utility trade-off.

    Prom-PATE is a differentially private classifier training method that combines visual prompting (VP) with PATE. To address the problem of low teacher accuracy in PATE when data are limited, the authors use VP to reprogram an ImageNet-pretrained model into a re-teacher (training only the input perturbation and label mapping, with the backbone frozen), replacing PATE's train-from-scratch teachers; they then use Confident-GNMax to aggregate re-teacher votes to label public data, and finally train a student model with semi-supervised learning (FixMatch/FreeMatch).

    Main results:

    • On CIFAR-10, Prom-PATE reaches 97.07% at ϵ=1.019 (Table 3), and 99.17% after switching to the EVA backbone and FreeMatch (Table 4), which the authors state outperforms existing DP methods (e.g., 96.7% of Bu et al. [5]).
    • Plain PATE reaches only 32.53% under the same setting, verifying the effectiveness of VP in addressing insufficient teacher data.
    • On the cross-domain task Blood-MNIST, Prom-PATE reaches 69.93%, about 8 percentage points higher than Transfer-PATE (Table 5).
    • On CIFAR-100, it reaches 91.47% at ϵ=8.078 (Table 21).

    The authors conclude: VP can improve the privacy-utility trade-off of DP classifiers, with clear advantages especially in cross-domain scenarios; Prom-PATE can flexibly replace the backbone and semi-supervised algorithm to further improve performance. Limitations are that rescaling high-resolution images loses features, and that only input-level VP has been explored so far.

Read originalICCV 2023