Table of Contents
Fetching ...

Bits Leaked per Query: Information-Theoretic Bounds on Adversarial Attacks against LLMs

Masahiro Kaneko, Timothy Baldwin

TL;DR

This work casts adversarial attacks on LLMs as information-theoretic inference over an observable signal $Z$ that leaks a target property $T$ per query, with leakage quantified by $I(Z;T)$. It derives a fundamental lower bound $N_{ m min}(\\varepsilon) \\ge \\log_2(1/\\varepsilon)/I(Z;T)$ and a matching SPRT-based upper bound, showing a near-linear inverse relation between leakage and required queries. The authors validate the theory experimentally across seven LLMs and three attack classes (system-prompt leakage, jailbreak, relearning) and four leakage regimes, observing that exposing more signals (e.g., logits or thinking processes) dramatically lowers the attack cost, by roughly one to two orders of magnitude. The results provide a principled yardstick for trading off transparency and security in LLM deployment, enabling auditors and defenders to quantify risk via a single information-theoretic metric per query.

Abstract

Adversarial attacks by malicious users that threaten the safety of large language models (LLMs) can be viewed as attempts to infer a target property $T$ that is unknown when an instruction is issued, and becomes knowable only after the model's reply is observed. Examples of target properties $T$ include the binary flag that triggers an LLM's harmful response or rejection, and the degree to which information deleted by unlearning can be restored, both elicited via adversarial instructions. The LLM reveals an \emph{observable signal} $Z$ that potentially leaks hints for attacking through a response containing answer tokens, thinking process tokens, or logits. Yet the scale of information leaked remains anecdotal, leaving auditors without principled guidance and defenders blind to the transparency--risk trade-off. We fill this gap with an information-theoretic framework that computes how much information can be safely disclosed, and enables auditors to gauge how close their methods come to the fundamental limit. Treating the mutual information $I(Z;T)$ between the observation $Z$ and the target property $T$ as the leaked bits per query, we show that achieving error $\varepsilon$ requires at least $\log(1/\varepsilon)/I(Z;T)$ queries, scaling linearly with the inverse leak rate and only logarithmically with the desired accuracy. Thus, even a modest increase in disclosure collapses the attack cost from quadratic to logarithmic in terms of the desired accuracy. Experiments on seven LLMs across system-prompt leakage, jailbreak, and relearning attacks corroborate the theory: exposing answer tokens alone requires about a thousand queries; adding logits cuts this to about a hundred; and revealing the full thinking process trims it to a few dozen. Our results provide the first principled yardstick for balancing transparency and security when deploying LLMs.

Bits Leaked per Query: Information-Theoretic Bounds on Adversarial Attacks against LLMs

TL;DR

This work casts adversarial attacks on LLMs as information-theoretic inference over an observable signal that leaks a target property per query, with leakage quantified by . It derives a fundamental lower bound and a matching SPRT-based upper bound, showing a near-linear inverse relation between leakage and required queries. The authors validate the theory experimentally across seven LLMs and three attack classes (system-prompt leakage, jailbreak, relearning) and four leakage regimes, observing that exposing more signals (e.g., logits or thinking processes) dramatically lowers the attack cost, by roughly one to two orders of magnitude. The results provide a principled yardstick for trading off transparency and security in LLM deployment, enabling auditors and defenders to quantify risk via a single information-theoretic metric per query.

Abstract

Adversarial attacks by malicious users that threaten the safety of large language models (LLMs) can be viewed as attempts to infer a target property that is unknown when an instruction is issued, and becomes knowable only after the model's reply is observed. Examples of target properties include the binary flag that triggers an LLM's harmful response or rejection, and the degree to which information deleted by unlearning can be restored, both elicited via adversarial instructions. The LLM reveals an \emph{observable signal} that potentially leaks hints for attacking through a response containing answer tokens, thinking process tokens, or logits. Yet the scale of information leaked remains anecdotal, leaving auditors without principled guidance and defenders blind to the transparency--risk trade-off. We fill this gap with an information-theoretic framework that computes how much information can be safely disclosed, and enables auditors to gauge how close their methods come to the fundamental limit. Treating the mutual information between the observation and the target property as the leaked bits per query, we show that achieving error requires at least queries, scaling linearly with the inverse leak rate and only logarithmically with the desired accuracy. Thus, even a modest increase in disclosure collapses the attack cost from quadratic to logarithmic in terms of the desired accuracy. Experiments on seven LLMs across system-prompt leakage, jailbreak, and relearning attacks corroborate the theory: exposing answer tokens alone requires about a thousand queries; adding logits cuts this to about a hundred; and revealing the full thinking process trims it to a few dozen. Our results provide the first principled yardstick for balancing transparency and security when deploying LLMs.
Paper Structure (32 sections, 2 theorems, 41 equations, 2 figures, 1 table)

This paper contains 32 sections, 2 theorems, 41 equations, 2 figures, 1 table.

Key Result

Theorem 1

Let $T \in \mathcal{T}$ be the target property with an arbitrary prior (finite, countable, or continuous), and let an attacker issue $N$ sequential queries, where the $n$-th input $X_n$ may depend on all previous outputs $Z_{1:n-1}$ (i.e., the attack is adaptive). The model reply is where $U_n$ is internal randomness independent of $T$ and of all previous $(X_i, Z_i)_{i<n}$. Define the per-query

Figures (2)

  • Figure 1: Measured number of queries to success $N$ ($y$ axis, $\log_{10}$ scale) required to reach a success probability $1-\varepsilon$ versus the single-query mutual information $I(Z;T)$ (horizontal axis, $\log_{10}$ scale). Columns correspond to the three attack tasks: system-prompt, jailbreak, and relearning attacks, while rows list the seven target LLMs. Marker shapes and colors denote the leakage signals available to the adversary. The dashed black line shows the information-theoretic lower bound $N_{\min}$.
  • Figure 2: Hyper-parameter sweep over temperature $T$ (upper four rows) and nucleus threshold $p$ (lower four rows). Plotting conventions follow \ref{['fig:query-vs-info']}.

Theorems & Definitions (2)

  • Theorem 1: Lower bound on query complexity
  • Theorem 2: Achievability