New to ShortSpan? We distil the AI-security research that matters into practitioner takeaways — edited by Ben Williams (NCC Group).Get the weekly email
// Analysis
SARA cracks ViT split inference privacy tricks
Published: Wed, 02 Sep 2026 • By Lydia Stratus
Attacks
New research shows token shuffling in Vision Transformer split inference does little for privacy. The SARA pipeline predicts original patch positions from transmitted tokens, fills in missing embeddings, and reconstructs images. Token reduction helps but leakage persists. MAE-pretrained models leak more. An edge-only defence weakens SARA without cloud changes.
Split inference for Vision Transformers (ViT) is sold as a neat privacy win: run a few blocks on the device, ship “smashed” token embeddings to the cloud, and maybe shuffle or drop some to be safe. The paper on Spatially Aligned Reconstruction Attack (SARA) shows why that comfort blanket is thin. Those tokens still whisper where they came from.
How the attack lands
SARA is a three-stage feature inversion pipeline that treats the cloud as an honest-but-curious observer. The edge sends intermediate ViT tokens. The attacker, who only sees these, trains SARA on an auxiliary dataset. First, a token-position predictor guesses each token’s original patch index, even after several transformer blocks. That reassembles a spatially aligned grid. Second, a feature-space masked autoencoder imputes the dropped or merged tokens. Finally, a convolutional decoder turns the completed grid into a plausible image.
Why does this work? Positional information survives through ViT layers. Simple predictors perform well early; transformer-based predictors keep working deeper. A vanilla decoder chokes on shuffled tokens, but once SARA recovers the layout, reconstruction quality jumps back near the unshuffled baseline. Shuffling is mostly theatre.
Token reduction does more, but not enough. Random dropping or ToMe merging cuts bandwidth and some leakage. Yet if the retained tokens still carry strong semantic and positional cues, SARA can fill the gaps and recover recognisable inputs. The authors summarise the trade-off with a Privacy–Utility Reconstruction Index: privacy improves as you reduce more, until accuracy tanks. There is no free lunch.
Pretraining matters. MAE-B/16, trained to reconstruct, leaks more. Across split points, it yields consistently higher-quality reconstructions than a standard ViT-B/16. If you pretrain a model to keep spatial relations intact, do not be surprised when an adversary exploits that.
The paper also tests an edge-only defence: strip positional embeddings on the device and progressively adapt the edge blocks via knowledgedistillation. No cloud changes. Against SARA under shuffling, this drops reconstruction quality for ViT-B/16 substantially (reported SSIM below 0.4), though MAE remains harder to protect. An adversarial variant that trains against a token-position predictor helps stability across layers, at the cost of potential accuracy hits and optimisation headaches.
This is one of those cases where “works in the paper” also likely works at 3am if your cloud sees intermediate tensors. The open questions are the interesting ones: how this generalises beyond classification, how it behaves on other token-reordering schemes and domains, and whether similar edge-only adaptations can tame reconstruction-centric pretraining without breaking utility.
Additional analysis of the original ArXiv paper
📋Original Paper Title and Abstract
Position Matters: Feature Inversion Attacks in ViT Split Inference with Token Reduction and Shuffling
Authors: Stefano Leggio, Giulio Rossolini, and Alessandro Biondi
Vision Transformers (ViTs) are increasingly used in split-inference systems, where edge devices transmit intermediate token representations to a remote cloud. In this setting, token reduction lowers computation and communication costs, while token shuffling disrupts the spatial organization of the transmitted tokens, potentially limiting information leakage. However, their privacy benefits remain unclear against feature inversion attacks, which attempt to reconstruct the input from the transmitted embeddings. In this work, we show that, despite disrupting the spatial structure required by conventional reconstruction attacks, transmitted token embeddings retain substantial positional information. Based on this observation, we introduce the Spatially Aligned Reconstruction Attack (SARA), a unified pipeline that predicts token positions, restores their spatial layout, reconstructs missing embeddings using a feature-space masked autoencoder, and recovers the input image. Our results demonstrate that token shuffling provides only apparent privacy, as SARA largely reconstructs the original token organization. Token reduction offers stronger protection, but significant leakage persists when the retained tokens preserve sufficient semantic and positional information. Finally, we introduce a lightweight edge-side defense that removes positional embeddings and progressively adapts the edge-side transformer blocks through knowledge distillation. It substantially reduces attack performance against SARA, while preserving downstream task accuracy and requiring no changes to the cloud-side model.
🔍ShortSpan Analysis of the Paper
Problem
The paper studies privacy leakage in Vision Transformer split inference, where an edge device sends intermediate token embeddings to a cloud. Two lightweight edge-side operations are common: token reduction to lower computation and communication, and token shuffling to hide spatial layout. The question is whether these operations meaningfully prevent feature inversion attacks that reconstruct the original image from transmitted embeddings. This matters because an honest-but-curious cloud can observe smashed representations and attempt input reconstruction without altering the inference protocol.
Approach
The authors first show that intermediate ViT token embeddings retain substantial positional information even after several transformer blocks. They introduce the Spatially Aligned Reconstruction Attack, SARA, a three-stage pipeline: a token position predictor that estimates each transmitted token’s original patch index and restores a spatially aligned full-length representation; a feature-space masked autoencoder that imputes missing token embeddings; and a convolutional decoder that reconstructs the image from the completed token grid. The attacker is passive and trains SARA components on an auxiliary dataset. Experiments use ImageNet-1K with ViT-B/16 and MAE-B/16, and consider two token-reduction strategies, random dropping and ToMe merging, plus token shuffling. Reconstruction quality is measured by SSIM, PSNR and FSIM, and privacy–utility trade-offs are summarised by a Privacy–Utility Reconstruction Index, PURI.
Key Findings
Positional information survives ViT processing: simple predictors can recover patch indices with high accuracy in early layers, and transformer-based predictors remain effective deeper, enabling spatial realignment of shuffled tokens.
Token shuffling gives only apparent privacy: a conventional convolutional decoder fails on shuffled tokens, but SARA largely recovers original token organisation and restores reconstruction quality to near the aligned baseline; shuffling alone is insufficient.
Token reduction improves privacy but incompletely: removing or merging tokens reduces leakage, yet significant reconstruction persists when retained tokens keep enough semantic and positional cues. Optimal reduction balances privacy and accuracy as quantified by PURI.
MAE-pretrained models are more vulnerable: MAE-B/16 shows consistently high reconstruction quality across split points, reflecting its reconstruction-oriented pretraining that preserves spatial relations.
Edge-only defence is effective and practical: removing positional embeddings on the edge and progressively fine-tuning edge blocks via knowledge distillation substantially reduces SARA performance while preserving downstream accuracy and requiring no cloud changes. This defence reduces SSIM of reconstructions under shuffling to below 0.4 for ViT-B/16, though MAE remains more challenging.
Adversarial extension of the defence, which trains an auxiliary token-position predictor while adapting the edge to frustrate it, further stabilises protection across layers but can introduce accuracy loss and optimisation instability.
Limitations
Evaluation focuses on image classification utility; other tasks such as segmentation are not studied. The defence may be less effective or less stable on models pretrained for reconstruction, and the adversarial variant can reduce accuracy. Results are specific to the tested ViT variants and ImageNet data; additional token-reordering strategies or domains remain to be explored.
Implications
An attacker in an honest-but-curious cloud can recover spatial layout and reconstruct private inputs even when tokens are shuffled or partially reduced, by exploiting residual positional cues and imputing missing tokens. Lightweight edge-only defences that remove positional embeddings and fine-tune edge blocks can substantially reduce this leakage without changing cloud models, but adaptive attackers and reconstruction-oriented pretrained models remain a practical risk.
- It reveals that tiny, imperceptible changes can push Vision Transformers to misleading internal representations, posing a real risk for any AI syste...
- It shows a way to defeat attention-based defenses for Vision Transformers by using independently optimized decoy patches that steal attention away f...
- It proposes a practical, plug‑and‑play defense for Vision Transformers that detects anomalous tokens caused by adversarial patches and neutralizes t...
- Shows how Vision Transformers can be attacked not just broadly but with targeted patch attacks, exposing a real risk surface for AI-enabled vision s...
- The work tests how six adversarial tricks affect Vision Transformers and then uses the model’s own attention signals to spot the tampering with Prot...
- It shows a practical black-box technique to reveal private vision-tokenizer settings (like patch size and preprocessing) of vision-language models b...
- It shows a concrete way to leak private training visuals from vision-language models by reconstructing images from the model’s signals, highlighting...
- What makes it relevant: It introduces Filtered-ViT with SMART-VMF to suppress multiple simultaneous adversarial patches, improving robustness on Ima...
Get the weekly digest
The few AI-security papers that matter, with the practitioner takeaway. No spam.