TIGER: Inverting Transformer Gradients via Embedding-Subspace Distance Optimization

William Kalikman, Ivo Petrov, Dimitar I. Dimitrov, Martin VechevarXiv 2026

TL;DR

TIGER (Transformer Data Inversion from Gradients via Embedding-subspace Reconstruction) is a continuous gradient inversion attack that reconstructs private training text from transformer model updates. By transforming low-rank gradient signals into a differentiable optimization objective, TIGER bypasses the brittleness of prior attacks, successfully extracting private data even under defenses like Differential Privacy and low-precision quantization.

What Problem Does This Paper Address?

Federated Learning (FL) allows multiple clients to collaboratively train Large Language Models (LLMs) by sharing only their model gradients while keeping their raw text data local. However, a malicious or curious server can intercept these gradients and attempt to reconstruct the original text—a process known as a gradient inversion attack.

Existing attacks on transformers fall into two categories, both with severe limitations:

  1. Optimization-based attacks (gradient matching): These try to synthesize dummy inputs that produce matching gradients. They are computationally expensive, slow, and highly unstable for modern LLMs.
  2. Algebraic attacks: These exploit the mathematical low-rank structure of attention layers to isolate a subspace containing the true token embeddings, followed by discrete token membership tests. While fast, these discrete filters are extremely brittle; they completely break down under numerical noise, lower precision (like BF16), or Differential Privacy (DP) defenses, and they scale poorly to encoder models with non-causal attention.

The authors introduce TIGER to bridge this gap, offering a continuous, robust framework capable of operating in realistic, defended FL environments.

Methods

Instead of treating subspace membership as a hard, discrete "yes/no" test, TIGER turns it into a continuous, differentiable span-distance objective.

The attack leverages the fact that for any linear layer in a transformer, the row span of the layer inputs aligns with the column space of its weight gradients. TIGER directly optimizes continuous token embeddings to minimize their geometric distance to this gradient-induced subspace across multiple layers.

Figure 1: Overview of TIGER. (a) The shared span objective: the span distance D(v, PS ) between a vector v and a subspace S with projection matrix PS, computed by each SPAN block. (b) Decoder attack: embeddings are recovered position by position (i = 1 . . . Tb) using the forward loss ℓforw only. Red marks attacker-simulated quantities. (c) Encoder attack: the simulated input ¯Z0 is optimized so that at every layer l ≤Lmax the hidden states ¯Zl lie in the gradient-induced subspace (ℓforw) and the gradient directions lie in the span of the hidden states (ℓback).

TIGER introduces tailored strategies for different transformer architectures:

  • Causal Decoders: Because a token's representation in a decoder only depends on preceding tokens, TIGER recovers text sequentially (token-by-token). To prevent multiple sequences in a batch from collapsing into the same text, it incorporates a novel first-token deduplication loss ($\ell_{dedup}$).
  • Bidirectional Encoders: Since encoders use non-causal attention (where every token attends to every other token), sequential recovery is impossible. TIGER jointly optimizes the entire input batch and introduces a backward span-distance loss ($\ell_{back}$). This bidirectional alignment ensures that the optimized embeddings not only fit into the gradient subspace but also fully "cover" it, preventing cross-sequence collapse.

To stabilize the highly non-convex optimization, TIGER initializes its dummy inputs using a position-dependent Gaussian prior derived from a public text corpus.

Datasets

The authors evaluated TIGER using the following datasets:

  • WikiText-103: Used as the primary source for generating client training batches and for fitting the position-dependent Gaussian initialization prior.
  • IMDb: Employed in an ablation study to demonstrate that the initialization prior relies on general language statistics rather than the specific corpus used to build it.

Key Insights and Ideas

  • The Power of Continuity: Converting a discrete filtering problem into a continuous optimization problem allows the attack to aggregate weak subspace signals across multiple layers. This makes it incredibly resilient to noise that would otherwise ruin exact algebraic methods.
  • Bidirectional Constraints Solve Encoder Collapse: In non-causal architectures, optimization easily falls into degenerate traps (like repeating the same token or duplicating sequences). Forcing the optimized hidden states to span the entire observed gradient space acts as an effective regularizer against this collapse.
  • A False Sense of Security: The paper reveals that common practical perturbations—such as switching from FP32 to BF16 gradients or adding modest Differential Privacy noise—do not inherently guarantee privacy against sophisticated geometric attacks.

Key Results

The authors evaluated TIGER against strong baselines, including LAMP (optimization-based) and DAGER (algebraic), on modern models like GEMMA-3-4B-IT (decoder) and EMBEDDINGGEMMA-300M (encoder).

  • Resilience to Differential Privacy (DP) Noise: On decoder models, when Gaussian noise ($\sigma = 10^{-5}$ to $10^{-3}$) was added to simulate DP defenses, the prior state-of-the-art attack (DAGER) collapsed to 0% ROUGE score. TIGER maintained high reconstruction quality, achieving over 70% ROUGE-1 even at higher noise levels ($\sigma = 10^{-3}$).
  • Quantization Robustness: When gradients were stored in lower-precision BF16 rather than FP32, DAGER failed completely due to numerical imprecision. TIGER's ROUGE-1 score dropped only modestly (e.g., from 99.1% to 94.5% on decoders).
  • Encoder Performance: On encoder-only models where causal token-by-token recovery is impossible, TIGER achieved a ROUGE-1 score of 90.8% for single sequences and maintained a strong 60.3% ROUGE-1 on large 16-sequence batches, vastly outperforming LAMP (which failed to exceed 24%).

Limitations and Future Work

  • Rank Saturation: TIGER relies heavily on the low-rank nature of transformer gradients. If the total number of tokens ($T$) in a client batch approaches or exceeds the model's hidden dimension ($d$), the gradient matrix becomes full-rank, eliminating the discriminative power of the subspace objective.
  • Advanced Defenses: While TIGER beats simple additive noise and quantization, its performance against other privacy-preserving techniques—such as aggressive gradient clipping, gradient masking, or secure aggregation—remains an open question.
  • Exact Token Ordering: In encoder settings, TIGER excels at finding the correct tokens but can struggle to place them in the exact order. The authors suggest that future hybrid attacks combining TIGER with discrete language model priors could resolve this ordering issue.

Summary updated

Abstract

Federated learning allows multiple clients to jointly train a shared model by sending gradient updates to a central server while keeping raw inputs local. However, prior gradient inversion attacks show that these updates can reveal enough information to reconstruct client inputs. Existing attacks on transformers either optimize dummy inputs to match the true client updates, which is costly and unstable for modern models, or exploit the low rank of attention gradients to identify a subspace containing the true layer embeddings, followed by a discrete membership test for candidate tokens. However, this token test is brittle under numerical noise, i.e., from quantization or Differential Privacy (DP), and scales poorly for encoder models with non-causal attention. We introduce TIGER, a continuous gradient inversion attack that turns this subspace signal into a differentiable objective. Instead of searching over tokens or matching full gradients, TIGER directly optimizes token embeddings to minimize their distance to the subspace. Our experiments demonstrate that on encoder-only models, TIGER substantially improves both reconstruction quality and runtime over existing attacks, while on decoder models, TIGER is more robust than prior subspace-based attacks, enabling the first successful reconstructions in DP-defended federated learning settings.
BibTeX
@misc{kalikman2026tiger,
  author = {William Kalikman and Ivo Petrov and Dimitar I. Dimitrov and Martin Vechev},
  title = {{TIGER: Inverting Transformer Gradients via Embedding-Subspace Distance Optimization}},
  year = {2026},
  eprint = {2606.18312},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.18312},
}

Loading related content...

Figure