Repeated probes recover tokens from protected caches
When Shuffling Fails: Token Recovery from Obfuscated KV Caches · arXiv:2611.24276
In plain words
Repeat-to-Reveal is an attack that uses repeated-token probes to recover token identities and counts from protected language-model caches. In tests of KV-Cloak, it recovered every evaluated token occurrence across 3,000 prompts, when probe and target blocks used the same secret configuration.
The attacker compares cache blocks made from repeated text, then uses a public copy of the model to match recovered data to tokens. It learns which tokens appeared and how often, but not their order within each block.
The research
A cache can contain token-level traces of a user’s input even when its rows are shuffled.
This result changes what a shuffle count alone can justify: in the tested KV-Cloak setup, repeated inputs exposed reusable structure, so the protection depended on whether probe and target caches shared secrets.
Repeat-to-Reveal uses repeated-token cache probes to estimate reused secret transforms, then matches target blocks to public-model token vectors.
In tests of the official KV-Cloak implementation, the attack calibrated on repeated-token probes and applied its estimates to target blocks protected with the same secrets.
The researchers compared recovered token identities and counts with reference token multisets across 3,000 prompts, eleven models and thirteen configurations.
It matched all 116,571,072 evaluated token occurrences, pooled across cache heads and two shuffle seeds. This supports the claim that fresh row shuffles did not stop recovery under the tested conditions; the measure does not include token order.
The attack was evaluated on first-layer Value cache blocks and requires cache access plus the same secret configuration for calibration and target blocks.
The study does not measure how often real deployments meet that condition; identifying sensitive values also required a known request template and a supplied candidate list.
What the evidence shows
- The shuffle count misleads
Repeat-to-Reveal is an attack that recovers token identities and counts from protected language-model cache blocks. It addresses a weakness in shuffled obfuscation: a defense may count many possible shuffles as protection even when an attacker-chosen input makes many shuffles look identical.
In KV-Cloak, repeated tokens make the data rows identical, so shuffling them leaves the data unchanged; only the recovery marker moves.
- Probes expose reused structure
The attack compares cache blocks created by repeated-token probes to estimate the secret mixing transformation. It can reuse that estimate on target blocks processed with the same secrets, then match the recovered rows against token vectors generated from public model weights.
The key contrast is between a fresh row shuffle for each block and other secrets reused across requests: the fresh shuffle does not prevent transfer in this tested setup.
- Every tested token matched
The decisive result is 116,571,072 matching token occurrences out of 116,571,072 evaluated across 3,000 prompts, eleven public models and thirteen configurations. This pooled count compares recovered token multisets with reference multisets across models, cache heads, configurations and two shuffle seeds.
It establishes complete token identity and count recovery in the evaluated first-layer Value blocks, not exact reconstruction of prompt text.
- Secret reuse sets the boundary
On the same Qwen2.5-0.5B prompts, token recovery fell to about 0.412% when the secrets changed but the attack kept its old estimates, then returned to 100% after recalibration.
This matched control supports the explanation that transfer depends on a shared secret configuration, within this model and prompt set.
Deep
- Original paper authors
- Chengzhi Yi, Xiao Cheng, Wei Song, Haoyu Wang
- Submitted to arXiv
- License
- arXiv non-exclusive