Fresh Keys, Stale Secrets: Numeric Leakage across Linked LLM Prompts

Jian Li, Qinglin Zhao, Shuoyao Wang, Jincheng Cai, Zhifeng Hao, Naiqi WuarXiv 2026

TL;DR

When businesses disguise confidential numbers (like unit costs and profit margins) before sending prompts to cloud LLMs, generating a fresh random key or noise draw for every prompt sounds like the safest bet. In reality, it’s a trap: if you ask repeated questions about the same underlying numbers, an honest-but-curious LLM provider can average across those "fresh" disguises to pinpoint your secrets. Counterintuitively, reusing the exact same secret key across your entire account history is often far safer than rolling the dice anew every time.

What Problem Does This Paper Address?

Imagine running a bakery and asking a cloud LLM how to price a wholesale croissant order, then returning next week to review margins on those same croissants. Your unit costs and profit margins are trade secrets, not personal identifiers—standard PII redaction won't hide them.

To protect financial figures, researchers have built "numeric prompt disguises" that scale numbers by secret multipliers, substitute them via order-preserving maps, or inject calibrated noise. The catch? These defenses are almost always evaluated one prompt at a time. A cloud provider, however, sees an entire logged-in account history. Because stateless sanitizers draw fresh randomness for every prompt without a overarching privacy budget, each query hands the provider a new, independent mathematical view of the same unchanged business numbers. The authors ask: how much secret data leaks across linked prompts, and does reusing a secret vs. generating fresh ones matter?

Threat model showing a firm disguising numbers with fresh or reused secrets while the cloud provider links queries by account to recover margins and unit costs.

Methods

The authors evaluate four disguise mechanisms across sequences of 1 to 16 linked queries:

  1. Shared scaling (D1): Multiplying all money values in a prompt by one secret random factor.
  2. Per-field scaling (D1'): Multiplying each field by its own independent random factor.
  3. Fixed-axis order-preserving substitution (D2): A concrete instantiation of a recent framework (Zhang et al.) that maps numbers onto random targets along a public logarithmic axis while keeping their relative order intact.
  4. Metric differential privacy (D3o / Pr$\varepsilon\varepsilon$mpt): Replacing numbers with noisy values calibrated by metric DP, tested using Pr$\varepsilon\varepsilon$mpt’s publicly released money-sanitizer code.

To measure leakage, they pit these defenses against an honest-but-curious Bayesian attacker that knows the disguise algorithm, holds public sector-level statistics (priors on typical prices and margins), and links prompts from the same business. For complex multi-product prompts, they introduce stronger joint shared-map and particle-filter attackers, alongside a hybrid LLM attacker (using Llama-3.1-8B and Qwen2.5-32B) to test if reading contextual prose cues (like city and brand positioning) boosts recovery. Finally, they back their empirical tests with information-theoretic proofs.

Datasets

Because real companies don't publish their secret unit costs, real prompts lack ground truth. The authors built a synthetic counterfactual benchmark of 300 small firms (50 development, 250 test) across six sectors (e.g., bakery/café, machine shop, IT consulting), plus a separate 2,000-firm draw to build the attacker's prior table. Sector margins are anchored to public U.S. IRS Statistics of Income corporation tables and industry aggregates, while prose cues incorporate 60 U.S. metropolitan Regional Price Parities. They also use the public FinQA benchmark (1,108 arithmetic items) solely to verify that their D2 implementation reconstructs local code execution accurately.

Key Insights and Ideas

  • Averaging defeats stateless randomness: Just as astronomers average noisy images to reveal faint stars, an attacker can combine independent disguised views of the same product to shrink uncertainty. Under fresh log-uniform scaling keys, the feasible interval of the true value shrinks at an exact rate of $2\log(b/a)/(n+1)$ over $n$ queries.
  • The "Reuse Ceiling": By the data-processing inequality, reusing one secret across all queries caps total historical leakage at a single full-precision view of the fields shown—a prompt-disguise parallel to "memoization" in telemetry privacy.
  • Invariants leak immediately: Shared scaling (D1) is broken on prompt #1 for margins, because gross margin $(p-c)/p$ cancels out any shared multiplier.
  • Why order-preserving maps leak values: Order preservation alone only leaks ranks. D2 leaks actual values across fresh maps because its intervals are anchored to a public axis, turning every fresh map into a noisy reading of where a number sits on that axis.
  • Code vs. Paper gaps: Pr$\varepsilon\varepsilon$mpt’s released code selects noise domains [l, u] based on the private input's magnitude (e.g., < 100 vs >= 100), leaking range information directly through output support boundaries.

Key Results

A margin estimate counts as a "hit" if it lands within $\pm 5$ percentage points (pp) of the truth; a unit-cost hit is within $\pm 10\%$ relative error.

Fig. 2. Margin recovery as linked queries accumulate (hit: error ≤5 pp). Both D2 curves use the same joint attacker, with fresh maps and with one reused map; D3o uses the default attacker. Bands: firm-clustered 95% bootstrap CIs; 60 test firms × 3 seeds.
  • Single-prompt illusion: In one prompt, D1', D2, and D3o look great for hiding margins, keeping the attacker's advantage over a prior-only guess (28.1%) between $-0.6$ and $+4.4$ pp (whereas shared scaling D1 hits 100% of margins immediately).
  • History breaks fresh secrets: Across 16 linked queries with fresh secrets, leakage climbs significantly across every tested defense. Under D2, margin hit rates jump from 25.0% to 59.4% ($+34.4$ pp). Under D1 and D1', unit-cost hits surge from 27.8% to 68.9% and 18.9% to 57.2%, respectively. Under Pr$\varepsilon\varepsilon$mpt ($\varepsilon=2$), margin hits climb from 18.9% to 51.1%.
  • Fresh vs. Reused: Applying the same joint attacker to D2, fresh maps yield 29.4 pp more recovered margins than reusing a single map (53.9% vs. 24.4% at 16 queries).
  • Robustness & Prose: These multi-query gains survive population shifts, mismatched attacker priors, and values drifting by up to 5% between queries (except Pr$\varepsilon\varepsilon$mpt at $\varepsilon=0.5$). Reading prose cues with an LLM adds at most 2.5 pp on these synthetic firms.
Fig. 4. With a fresh secret per query, recovery grows with the number of linked queries; with one reused secret it stays near its single-query level. Recovery of product 0 by the default attacker A1+. Solid: a fresh secret per query (D3o: fresh noise at ε=1); dashed: one reused secret. D1 recovers 100% of margins in both regimes (the lines coincide). The reused-map D2 curve is from the pair-only attacker; Table V compares the regimes under the joint attacker. Dotted: prior-only baseline (15.0% cost, 20.0% margin). 180 rows per n (60 test firms × 3 seeds); bands: firm-clustered 95% bootstrap CIs.

Limitations and Future Work

First, all evaluated businesses are synthetic; while anchored to IRS sector data, price spreads and weak prose-to-price correlations are modeling assumptions, meaning real-world prose with richer context might leak more to an LLM. Second, D2 is a controlled instantiation of Zhang et al.’s method rather than a full reproduction (it omits their local-LLM topic-rewriting step), and downstream task utility of the disguises isn't measured. Finally, the Bayesian attackers rely on approximations, so optimal attackers might extract even more. Future work includes testing on real disclosed product-line margins, evaluating Zhang et al.'s full pipeline, and testing mitigations like caching sanitized values per field and fixing noise domains in advance.

Summary updated

Abstract

Small businesses repeatedly ask cloud language models about the same confidential prices, unit costs and margins. Numeric prompt disguises for such numbers are evaluated one prompt at a time, but a provider sees a firm's history, in which each fresh secret gives a new, independent view of the same numbers. Since real costs are not public, we measure on synthetic firms with known values how much an honest-but-curious provider recovers when it knows the disguise algorithm, holds sector-level price and margin statistics, and links a firm's queries. In one prompt, per-field scaling, a fixed-axis instantiation of Zhang et al.'s order-preserving substitution and Pr$\varepsilon\varepsilon$mpt's released sanitizer keep the attacker's margin-hit advantage over a prior-only guess between -0.6 and +4.4 percentage points. After 16 linked queries with fresh secrets, every disguise we test (Pr$\varepsilon\varepsilon$mpt at $\varepsilon\geq 0.5$) has a target recovered significantly more often: under the order-preserving substitution, margin recovery rises from 25.0% to 59.4%. The same attacker recovers 29.4 percentage points more margins with fresh maps than with one reused map. Theory explains the contrast: one reused secret bounds all queries by a single full-precision view of the fields shown, whereas fresh scaling keys are identifiable. Except for Pr$\varepsilon\varepsilon$mpt at $\varepsilon=0.5$, the gains persist when the attacker's prior comes from another population model and when values drift by up to 5% between queries; on our firms, whose prose cues are weak, reading the prose with a language model adds at most 2.5 points. Code and data: https://github.com/Jamli58/fresh-keys-stale-secrets
BibTeX
@misc{li2026fresh,
  author = {Jian Li and Qinglin Zhao and Shuoyao Wang and Jincheng Cai and Zhifeng Hao and Naiqi Wu},
  title = {{Fresh Keys, Stale Secrets: Numeric Leakage across Linked LLM Prompts}},
  year = {2026},
  eprint = {2611.32864},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.32864},
}
Figure