Bits leaked per query: information-theoretic bounds on adversarial attacks against large language modelsBits Leaked per Query: Information-Theoretic Bounds on Adversarial Attacks against LLMs
The authors propose using mutual information I(Z;T) to measure the number of bits leaked per query by an LLM, prove that the lower bound on the number of queries required for an attack is log(1/ε)/I(Z;T), and verify on 7 LLMs and 3 attack types that the measured query counts of adaptive attacks agree with this inverse relationship.
- The answer tokens, thought process, and logits that LLMs expose for transparency may be exploited by attackers, but the scale of leakage has only been described anecdotally, and auditors and defenders lack a yardstick to quantify the risk.
- The conversation between the attacker and the model is modeled as an information channel, with mutual information I(Z;T) representing the number of bits leaked per query; it is proven that reaching error ε requires at least log(1/ε)/I(Z;T) queries, and SPRT is used to prove that this lower bound is achievable; in the experiments, the maximum of three estimators implemented with RoBERTa — MINE, NWJ, and InfoNCE — is used to estimate I(Z;T).
- Tested three types of attacks on 7 LLMs: system prompt leakage, jailbreak, and re-learning: the log-log regression slope of adaptive attacks is indistinguishable from the theoretical value of −1 (Table 1), while non-adaptive attacks deviate from −1; answer tokens alone require about a thousand queries, adding logits about a hundred, and adding the full thought process reduces it to a few dozen (abstract).
- The paper does not specifically discuss limitations. Experimental coverage: 7 models tested, 3 attack types, 4 signal disclosure settings; system prompt leakage and relearning each use 1k samples, jailbreak uses 1k AdvBench instances; query limit 2k; the paper does not report the specific bit values of I(Z;T) under each disclosure setting.
- Threat model
- The attacker's goal is to infer the target attribute T (such as a jailbreak success indicator or the recoverability of deleted information) using as few queries as possible; the attack is adaptive, and the n-th input can depend on all previous outputs; the observable signal Z is a combination of answer tokens, thought process tokens, or logits; the victim system is the LLM that returns these signals.
- Evaluated models
- GPT-4 (gpt-4o-mini-2024-07-18)DeepSeek-R1OLMo-2-1124-7B (OLMo2-7B)OLMo-2-1124-13B (OLMo2-13B)OLMo-2-0325-32B (OLMo2-32B)Llama-4-Maverick-17B (Llama4-M)Llama-4-Scout-17B (Llama4-S)
- Benchmarks
- system-prompt-leakage datasetAdvBenchDolma (Wikibooks shard)
- Metrics
- I(Z;T) 互信息(比特/查询)Nmin(ε) 最小查询数log-log 回归斜率 β̂ROUGE-L ≥ 0.80(泄漏/再学习成功判定)
Researchers Masahiro Kaneko and Timothy Baldwin propose an information-theoretic framework that quantifies the information each large language model response leaks to an attacker as mutual information I(Z,T), and prove that an attack reaching error rate ε requires at least log(1/ε)/I(Z,T) queries. Experiments examine system prompt leakage, jailbreak, and relearning attacks on GPT-4, DeepSeek-R1, three OLMo-2 variants, and two Llama-4 models, using three attack algorithms: paraphrasing, GCG, and PAIR. Results show that adaptive attacks' query costs match the theoretical lower bound: exposing only answer tokens requires about one thousand queries, adding logits lowers it to about one hundred, and further exposing the full thought process lowers it to a few dozen, whereas non-adaptive attacks clearly deviate from this inverse relationship. The authors say this provides the first principled yardstick for trading off transparency and security at deployment time.
Why it was selectedThe paper gives an inverse relationship between the number of bits leaked per query and the number of queries required for an attack, which providers offering open chain of thought or logits can use to trade off transparency and security.
Paper analysis
What problem does this paper attempt to solve?
The authors address the problem that there is no quantitative scale for how much information an LLM leaks per query, and propose using mutual information to define a theoretical lower bound on the query cost of an attack.
Core question: how much information an LLM leaks to an attacker per query, and how this lowers attack cost from 1/ε to log(1/ε); previously this was known only anecdotally, with no principled quantitative method.
- Problem setting: for transparency and interpretability, many LLM services expose a visible thought process or even token-level probabilities to users; the authors state that these signals can be weaponized, and an attacker with access to the chain of thought can bypass guardrails with orders of magnitude fewer queries than blind guessing.
- Shortcomings of existing methods: the authors state that evaluations of recent adaptive attacks (gradient-guided prompt search, CoT editing, self-play, etc.) are overwhelmingly empirical, most papers only plot success rate against the number of target model calls, the community lacks a principled scale for measuring risk and optimality, and providers can only make ad-hoc redaction choices.
- Core observation: an attack can be viewed as the process of inferring a target attribute T — T is unknown when the instruction is issued and becomes known after observing the model's reply; the model exposes an observable signal Z through answer tokens, thought process tokens, or logits, and the mutual information between Z and T is the number of bits leaked per query.
- What the paper proposes: an information-theoretic framework that models the conversation as an information channel, proves that reaching error ε requires at least log(1/ε)/I(Z;T) queries, and empirically validates this on 7 LLMs and 3 attack types.
- Threat model (per Section 2.2 of the paper):
- Goal: elicit model replies that make T fall into a target value or threshold range using as few queries as possible (such as a jailbreak success indicator, a hidden system prompt, or information deleted by unlearning).
- Knowledge: the attacker does not know T before the reply arrives; the paper does not describe the attacker's knowledge using white-box/black-box terminology.
- Capability: adaptive attack — the n-th input Xn can depend on all previous outputs Z1:n−1; the observable signal Z is a combination of answer tokens, token-level probabilities, or thought process traces.
- Victim system: the LLM that returns the above signals, covering the closed-weight GPT-4 and DeepSeek-R1 and the open-weight OLMo2 and Llama4 series.
What related research exists?
Related work falls into three groups: information-theoretic lower bounds, query complexity theory, and empirical studies of thought process leakage; the authors state that this paper extends static lower bounds to sequential LLM queries.
Information-theoretic lower bounds
- Xu and Raginsky (2016), Esposito et al. (2024)——prove Shannon-type lower bounds linking the Bayes risk of an estimator to the mutual information between the unknown parameter and a single observation, but without further feedback. The authors say this paper extends this static setting to sequential LLM queries, covering interactive multi-round inference.
Query complexity theory
- Castro and Nowak (2008), Raginsky and Rakhlin (2011)——classic results on twenty-questions games and active learning: query complexity grows with the cumulative information gained per observation. The authors note that these theories assume binary labels or low-dimensional parameters and treat each query as a fixed-capacity noiseless channel, whereas LLM responses Z may contain high-entropy content such as logits and chain of thought, and this paper's lower bound scales with the mutual information per response.
Empirical studies of thought processes and transparency
- Mireshghallah et al. (2023)——find that thought processes amplify contextual privacy leakage in instruction-tuned LLMs. The authors say this paper's bits-of-leakage-per-query metric provides a principled measure for such empirical findings.
- Kuo et al. (2025), Andriushchenko et al. (2024)——the authors cite them as: attackers with access to chain of thought can bypass guardrails with orders of magnitude fewer queries; leaked log probabilities or latency patterns further accelerate adversarial attacks.
Attack methods and benchmarks used in experiments
- Attack methods: non-adaptive paraphrase rewriting (Hu et al. 2025; Goldstein et al. 2025), adaptive GCG (Zou et al. 2023) and PAIR (Chao et al. 2023).
- Benchmarks: the system-prompt-leakage dataset, AdvBench (Zou et al. 2023), and the Wikibooks shard of Dolma (relearning).
Authors' positioning: this paper provides what the authors call the first systematic, multi-model validation that the query cost of attacking an LLM is approximately inversely related to the amount of information it leaks, offering auditors and defenders a bits-per-query risk yardstick.
How does the paper address this problem?
Model the attack as an information channel, prove the lower bound with Fano's inequality and achievability with SPRT, then empirically validate with a neural mutual information estimator in real attacks.
Overall idea: treat the conversation between the attacker and the LLM as an information channel, collapse the observable signals (answer tokens, logits, thought process) into a random variable Z, define the per-query leakage budget by the mutual information between Z and the target attribute T, and thereby derive a lower bound on query complexity and verify its tightness.
Problem Formalization
- Notation: Z is the signal observable in a single query, T is the target attribute the attacker wants to infer; (Z,T) is assumed i.i.d. across queries i; the attacker computes the target attribute from the raw response via a fixed predicate T = g(Y).
- Core definition: mutual information I(Z;T) = EZ,T[log (pZ,T(z,t))/(pZ(z)pT(t))] (bits), interpreted as the number of bits leaked per query; Nmin(ε) is the minimum number of queries to achieve the goal with failure rate no greater than ε.
Theoretical Lower Bound (Theorem 1)
- Adaptive attack lower bound: allowing the n-th input to depend on all previous outputs, define Imax as the supremum of I(Z;T|X=x) over all inputs x; then by Fano's inequality and the chain rule, Nmin(ε) ≥ log2(1/ε)/Imax.
- K-ary and continuous T: in system prompt leakage and re-learning, T takes K = |Σ|^m strings, and K-ary Fano gives Nmin(ε) ≥ ((1−ε)log2 K − 1)/I(Z;T), which simplifies to the same lower bound when K is sufficiently large; for continuous T, the differential-entropy version of Fano is used, and as ε→0 the leading term is likewise log2(1/ε).
- Summary: in the binary, K-ary, and continuous cases, Nmin(ε) = Θ(log(1/ε)/I(Z;T)), i.e., the number of queries is inversely proportional to the per-query leakage.
Matching Upper Bound (Theorem 2)
- SPRT achievability: for binary equiprobable T, an adaptive strategy based on the sequential probability ratio test (SPRT) satisfies E[N] ≤ log2(1/ε)/I(Z;T) + O(1), i.e., the lower bound is tight; the full proof is in Appendix A, including extensions to K-ary (multi-hypothesis SPRT) and continuous T (GLRT).
Experimental Methods
- Disclosure settings: four — (i) output tokens; (ii) output tokens + thought process; (iii) output tokens + logits; (iv) all three. GPT-4 and OLMo2 use "Let's think step by step" to elicit the thought process, and DeepSeek-R1 uses think tag pairs.
- Mutual information estimation: three variational lower-bound estimators, MINE, NWJ, and InfoNCE, with the maximum of the three taken as the representative value to preserve the lower-bound property; all implemented with roberta-base (Appendix B: freeze the original encoder, add two randomly initialized layers and an MLP critic head, AdamW, learning rate 1×10−5, batch 32, 20k steps, about two hours on a single H100).
- Attack methods: non-adaptive paraphrase rewriting (using the target LLM itself as the rewriting engine, repeating until success or the limit is reached); adaptive GCG and PAIR (details in Appendix D; when Z includes logits, GCG directly uses the token likelihoods returned by the target model, otherwise it uses sampling to estimate pseudo-likelihoods). Query limit 2k.
- Success criteria: system prompt leakage and re-learning use ROUGE-L ≥ 0.80 as success, following prior work; jailbreak uses the OpenAI Moderation API judging any harmful category as success, following prior work.
What experiments did the paper conduct?
Across 7 LLMs, 3 attack types, and 4 disclosure settings, the regression slope of adaptive attacks is indistinguishable from the theoretical value of −1, while non-adaptive attacks deviate from −1.
Experimental Setup
- Target models: GPT-4 (gpt-4o-mini-2024-07-18), DeepSeek-R1 (closed-weight, used for the jailbreak defense task); OLMo2-7B, OLMo2-13B, OLMo2-32B, Llama4-M, Llama4-S (open-weight, used for the three tasks of system prompt leakage, jailbreak, and re-learning).
- Datasets: the system-prompt-leakage dataset (1k randomly sampled each for train/dev/test, averaged over 5 random seeds, plus 20 hand-written seed instructions, see Appendix C); AdvBench (1k instances, four-fold cross-validation, using the default instructions as seeds); the Wikibooks shard of Dolma (taking pages whose titles uniquely match an article, 1k title–article pairs each for train/dev/test, averaged over 4 random seeds; the article body is unlearned from the target model via belief space rectifying, and the re-learning attack reconstructs the full text from the title alone, with 20 hand-written seed instructions in Appendix C).
- Attack methods: non-adaptive paraphrase; adaptive GCG, PAIR; each method is run over all seed instructions and averaged; query limit 2k.
- Metrics and criteria: leakage I(Z;T) (maximum of the three estimators MINE/NWJ/InfoNCE, implemented with roberta-base); number of queries N; success is judged as ROUGE-L ≥ 0.80 (leakage/re-learning) or judged harmful by the OpenAI Moderation API (jailbreak).
- Analysis variable: the least-squares regression slope of log N on log I(Z;T), testing the null hypothesis H0: β = −1.
Main Results
Table 1 gives the log-log regression slope β̂ (averaged over the three tasks) and the minimum p-value of the single-task regressions:
Swipe horizontally to read the table
Model Adaptive β̂ Adaptive p Non-adaptive β̂ Non-adaptive p OLMo2-7B −1.00 0.978 −0.32 < 10−3 OLMo2-13B −1.03 0.854 −0.22 < 10−3 OLMo2-32B −0.98 0.881 0.04 < 10−3 Llama4-S −0.98 0.230 0.11 < 10−3 Llama4-M −0.97 0.393 0.13 < 10−3 DeepSeek-R1 −1.03 0.039 0.24 < 10−3 GPT-4 −1.01 0.459 0.26 < 10−3 (据 Table 1;p 为检验 H0: β = −1 的最小 p 值)
- 自适应攻击:作者称 7 个模型的斜率与理论值 −1 不可区分(p > 0.05, of which DeepSeek-R1 is 0.039), in Figure 1 no adaptive attack point falls below the lower boundary line, and they are almost perfectly aligned with the slope −1 line.
- Non-adaptive attacks: the slope deviates from −1 (−0.32 to 0.26), with all p < 10−3; the authors state that a fixed query strategy cannot exploit the leakage information in each response, and thus deviates from the basic scaling law.
- Effect of disclosure signals: the authors state that revealing logits or thought process tokens progressively accelerates the attack, and that exposing both signals reduces the query budget by about an order of magnitude; the abstract gives the magnitude description: answer tokens alone require about a thousand queries, adding logits about a hundred, and exposing the full thought process reduces it to a few dozen.
Decoding Hyperparameter Analysis (Figure 2)
- What was tested: temperature T from 1.0 down to 0.3, nucleus threshold p from 0.95 down to 0.5, plotting log10 I against log10 N for the three tasks, with each point the mean of the 7 target LLMs; T ≈ 0.7, p ≈ 0.95 is near the actual commonly used default, and T = 0.3, p = 0.5 is the stress-test setting.
- Results: the authors state that under all tasks and hyperparameter choices the point cloud maintains a slope close to −1; lowering T or p shifts the point cloud parallel upward, i.e., suppressing diversity reduces leaked bits at the cost of more queries required for the attack; under the same T, p, additionally revealing logits or thought process tokens shifts the point cloud toward the lower right.
- Authors' interpretation: the authors state that the diversity of generated outputs directly governs leakage risk.
Other Ablations and Analyses
- The conclusion section reports: revealing thought process tokens or logits increases leakage per query by about 0.5 bit, and reduces the median jailbreak budget from thousands of queries to a few dozen, a reduction of one to two orders of magnitude.
- The paper does not report a table of specific bit values of I(Z;T) under each disclosure setting; the scatter values in Figure 1 and Figure 2 are not individually annotated in the text.
Negative Results and Exceptions
- Non-adaptive attacks clearly deviate from the N ∝ 1/I relationship (Table 1, slope −0.32 to 0.26), which the authors explain as a fixed query strategy being unable to exploit input-level leakage differences.
- The p-value of the adaptive slope for DeepSeek-R1 is 0.039 (Table 1), below 0.05, the only one among the 7 models with p < 0.05; the paper does not explain this separately.
What are some points that can be further explored?
The paper does not specifically discuss limitations; experimental coverage is 7 models, 3 attack types, and 4 disclosure settings, and the specific leakage values are not reported in a table.
Limitations and future directions noted by the authors
- The paper does not specifically discuss limitations and has no Limitations section; the conclusion section only states that the given leakage lower bound is a purely theoretical lower bound and does not by itself increase actual attack risk.
Scope of experimental coverage
- Models tested: 7 in total — GPT-4 (gpt-4o-mini-2024-07-18), DeepSeek-R1, OLMo2-7B/13B/32B, Llama4-M, Llama4-S; of these, GPT-4 and DeepSeek-R1 are used only for the jailbreak task, and the remaining 5 open-weight models are used for all three task types (Section 3.1).
- Attack and defense side: the attack methods are paraphrase, GCG, and PAIR; unlearning in the relearning setting uses one method, belief space rectifying (Section 3.1); the paper does not evaluate defense methods against leakage.
- Samples and repetitions: 1k samples each for system prompt leakage and relearning, with 5 and 4 random seeds respectively; jailbreak uses 1k AdvBench instances with four-fold cross-validation; query limit 2k (Section 3.1).
- Disclosure settings: 4 signal combinations; the thought process is elicited via prompting ("Let's think step by step" or a think tag), not the model's native hidden reasoning trace (Section 3.1).
- Items not reported: the paper does not report a table of specific bit values of I(Z;T) under each disclosure setting, and the specific coordinates of the scatter points in Figure 1/2 are not labeled in the text; the identity of the attack LLM used by PAIR is not stated (Appendix D only calls it an attack LLM).
Summarize the main content of the paper
The authors propose an information-theoretic bits-per-query yardstick to define the query cost lower bound for LLM attacks; the measured slopes across 7 models and 3 attack types match the theoretical value of −1.
An information-theoretic analysis paper: it unifies adversarial attacks against LLMs into the measurement problem of "how many bits are leaked per query," providing a quantitative scale for the trade-off between transparency and security.
- Problem: the answer tokens, thought processes, and logits exposed by LLM services can be exploited by attackers, but the scale of leakage is known only anecdotally, and auditors and defenders lack a principled risk metric.
- Method: the conversation between the attacker and the model is modeled as an information channel, with mutual information I(Z;T) as the number of bits leaked per query; Fano's inequality is used to prove that any adaptive strategy reaching error ε requires at least log2(1/ε)/Imax queries, and SPRT is used to prove that this order is achievable (Nmin(ε) = Θ(log(1/ε)/I(Z;T))); this applies uniformly to binary, K-ary, and continuous target attributes.
- Experiments: 7 LLMs (GPT-4, DeepSeek-R1, 3 OLMo2, 2 Llama4) × 3 attack types (system prompt leakage, jailbreak, relearning) × 4 disclosure settings; I(Z;T) is estimated as the maximum of three estimators, MINE/NWJ/InfoNCE.
- Main results:
- The log-log regression slope β̂ of adaptive attacks ranges from −1.03 to −0.97 and is indistinguishable from the theoretical value of −1 (Table 1, p > 0.05 except DeepSeek-R1 p=0.039); non-adaptive attack slopes range from −0.32 to 0.26, all p < 10−3.
- Magnitude description in the abstract: answer tokens alone require about a thousand queries, adding logits about a hundred, and exposing the full thought process reduces this to a few dozen.
- Conclusion section: revealing thought process tokens or logits increases leakage per query by about 0.5 bit, and the median jailbreak budget drops from several thousand to a few dozen.
- Decoding analysis (Figure 2): lowering the temperature or nucleus threshold shifts the point cloud upward in parallel; the authors state that the cost of suppressing diversity to reduce leakage is an increase in attack cost.
- Authors' conclusion: the authors state that for each small increase in leaked bits, the attack cost relative to precision drops from quadratic (1/ε) to logarithmic (log(1/ε)); constraining leakage to below 1 bit per query can force attackers into the high-query regime, and effective defense must trade off between transparency and the rise in attack efficiency.