WACV 2027

Breaking the Privacy Promise: Gradient Inversion Attacks on Federated Low-Rank Adapted Vision Transformers

Ritik K. Badiya Siladittya Manna Ashmit Sinha Yashwanth Mandula Anirban Chakraborty

Indian Institute of Science, Bengaluru, India

{ritikbadiya, yashwanthm, siladittyam, anirban}@iisc.ac.in

Several initializations converge to different reconstructions with nearly identical gradients
Duplicate solutions in gradient inversion. The gradient-matching objective has many local minima, so different images can produce nearly identical gradients to the private sample. All initializations and reconstructions shown are real samples from our experiments.

TL;DR Federated LoRA fine-tuning of ViTs shares only low-rank gradients, but it doesn't stop data leakage. Making positional embeddings trainable in every transformer block gives an honest-but-curious server layer-wise spatial anchors. Combined with a generative prior, these anchors recover private images with high fidelity.

+10.14 dBPSNR on CIFAR-10
(GIAS → GIAS+Ours)
+0.45SSIM on CIFAR-10
+7.83 dBPSNR on CelebA
(128×128)
+11.74 dBPSNR on CARS
(64×64)

Abstract

Parameter-efficient fine-tuning (PEFT) has been increasingly adopted to fine-tune pretrained models with low computational cost and is therefore also preferred in the federated learning paradigm to reduce computational and communication overhead. In this work, we investigate the sparsely explored domain of the risk of private data leakage in LoRA-adapted Vision Transformers (ViTs), where low-rank updates weaken the gradient signal available to an honest-but-curious server. We show that reconstruction is limited by two coupled ambiguities: reduced information in LoRA gradients and missing spatial cues from frozen positional embeddings. To address this, we propose a practically plausible spatially anchored generative inversion framework that incorporates trainable positional embeddings into transformer blocks during local fine-tuning. The resulting positional gradients act as layer-wise spatial anchors, while the generative prior keeps reconstructions on a realistic image manifold, reducing twin-data and patch-permutation artifacts. Adding our anchoring to GIAS improves PSNR by 10.14 dB, SSIM by 0.45, and LPIPS by 0.098 on CIFAR-10, with PSNR gains of 7.83 and 11.74 dB on high-resolution CelebA and CARS, respectively. The proposed strategy provides gains at higher batch sizes and in FedAvg settings. These results indicate that LoRA-based PEFT does not, by itself, prevent data leakage in FL and that carefully incorporated positional embeddings can help in exposing private information.

Why is inverting LoRA gradients hard?

The paper identifies two coupled sources of ambiguity:

Intrinsic dimensionality of gradients, full fine-tuning vs LoRA
Intrinsic dimensionality of gradients from full fine-tuning compared with LoRA-adapted ViT-Small. Fewer trainable parameters means a lower-dimensional gradient manifold.

Jumbled patches across random restarts (ViT-Small, LoRA r = 128, CIFAR-10)

Three independent initializations per method. Both optimization-based attacks (APRIL, GradViT) and the generative attack GIAS converge to patch-permuted or distorted reconstructions.

Method: Spatial Anchoring

The server prescribes a ViT in which a trainable positional embedding $p_l$ is added to the input of every transformer encoder layer (except the first), alongside the LoRA adapters. This doesn't change the clients' local training procedure. The architecture also improves task performance and robustness, which gives clients a genuine reason to adopt it. The overhead is small: GFLOPs increase by only 0.016% for ViT-Small.

$$x_{l+1} = \tilde{x}_l + \operatorname{MLP}\!\big(\operatorname{LN}'(\tilde{x}_l)\big),\qquad \tilde{x}_l = \operatorname{MHSA}\!\big(\operatorname{LN}(x_l + p_l)\big) + (x_l + p_l)$$

The gradients of $p_l$ now carry explicit, layer-wise spatial information. The attacker builds on the generative GIA framework GIAS. It optimizes a latent code $z$ and then the generator $G_\omega$ so that the gradients of the candidate image $\hat{x} = G_\omega(z)$ match the client's gradients, for both the LoRA/classifier parameters and the positional embeddings:

$$\mathcal{L}_{\text{match}} = d_{\cos}\!\big(\nabla_{\theta'^S}\ell(\hat{y},y),\, g_{\theta'}\big) + d_{\cos}\!\big(\nabla_{\theta^S_{\text{PE}}}\ell(\hat{y},y),\, g_{\text{PE}}\big),\qquad \min_{z,\,G_\omega}\ \mathcal{L}_{\text{match}} + \lambda_{\text{reg}} R_{\text{base}}(z, G_\omega)$$
High-level overview of the generative GIA framework
High-level overview of the generative gradient-inversion framework. $g^C$ and $g^S$ are the client and server gradients.

Contributions

Qualitative results

CIFAR-10, ViT-Small, batch size 1. With spatial anchoring, the patch misplacement seen with GIAS disappears.
CelebA (128×128) and CARS (64×64). Instance-level identities of faces and cars are recovered, with minimal computational overhead.
Single-step setting with LoRA rank 128: four samples each from a batch of 4 and a batch of 16.
Gradient-level defences: additive Gaussian noise $\mathcal{N}(\sigma)$, gradient clipping (GC, $C=4$) and both combined. GIAS+Ours holds up under mild noise and clipping. Strong noise degrades both methods.

Quantitative results

CIFAR-10, single step, batch size 1

MetricAPRIL+OursΔGradViT+OursΔGIAS+OursΔ
PSNR ↑12.75 (2.19)12.03 (2.39)−0.7215.03 (4.68)16.62 (4.50)+1.5915.77 (4.52)25.91 (6.29)+10.14
SSIM ↑0.40 (0.152)0.45 (0.11)+0.050.397 (0.226)0.48 (0.266)+0.0830.34 (0.221)0.79 (0.17)+0.45
LPIPS ↓0.24 (0.077)0.19 (0.224)−0.050.124 (0.05)0.12 (0.051)−0.0040.12 (0.075)0.022 (0.033)−0.098

Mean over 10 users with three reconstructions each; standard deviation in parentheses. Green marks an improvement.

High-resolution datasets

MethodCelebA (128×128)CARS (64×64)
PSNR ↑SSIM ↑LPIPS ↓PSNR ↑SSIM ↑LPIPS ↓
GIAS11.71 (2.8)0.24 (0.10)0.31 (0.08)9.04 (1.89)0.07 (0.08)0.36 (0.07)
GIAS + Ours19.54 (3.72)0.585 (0.125)0.125 (0.082)20.78 (3.17)0.72 (0.128)0.089 (0.058)

 

Multi-step updates (FedAvg), CIFAR-10, PSNR ↑

Epochs / BatchAPRIL+OursGradViT+OursGIAS+OursΔ GIAS
E=1, B=813.4113.5614.0113.9111.0413.12+2.08
E=1, B=413.3413.7914.0913.8610.8213.21+2.39
E=2, B=813.4413.6614.0113.8510.8413.23+2.39
E=2, B=413.4013.4614.0213.8210.7913.58+2.79

Each client holds 16 private samples per round, giving E×16/B local steps. The GIAS gain is statistically significant (Welch's t-test, p < 0.05). SSIM and LPIPS are in the paper.

Ablations

Performance across LoRA ranks 16 to 128
LoRA rank. Even at r = 16, GIAS+Ours improves PSNR by 10.67 dB and SSIM by 0.507. A lower rank alone doesn't remove the privacy risk.
Performance across batch sizes 1 to 32
Batch size. At batch size 4, GIAS+Ours raises PSNR from 12.10 to 20.97 and SSIM from 0.126 to 0.628. Gains shrink at 16 and 32, where batch averaging dominates the spatial signal, but LPIPS stays lower.

Privacy–utility trade-off

Reconstruction PSNR versus test accuracy under gradient perturbation
Over full FedAvg training, stronger gradient perturbation lowers reconstruction PSNR (less leakage) but also lowers test accuracy. PEFTLeak's attack and utility both drop to zero once the poisoned weights change.

Limitations

Differential-privacy-style gradient perturbation mitigates the attack, but it costs downstream accuracy. Robustness against stronger adaptive adversaries, and attacks on multi-modal architectures such as vision-language models in heterogeneous federated settings, remain open directions.

Takeaway

PEFT-aware privacy defences should consider not just how many parameters are trainable but what kind of information their gradients expose. In federated ViTs, spatial information matters most.

BibTeX

@InProceedings{Badiya_2027_WACV,
    author    = {Badiya, Ritik K. and Manna, Siladittya and Sinha, Ashmit and
                 Mandula, Yashwanth and Chakraborty, Anirban},
    title     = {Breaking the Privacy Promise: Gradient Inversion Attacks on
                 Federated Low-Rank Adapted Vision Transformers},
    booktitle = {Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV)},
    month     = {},
    year      = {2027},
    pages     = {}
}