betaFeedback

WorksComputer Science

Anytime-valid detection of LLM weight exfiltration

Abstract

A compromised LLM inference server can leak model weights by encoding payload bits in otherwise plausible token choices. A replay of the same prompt in a trusted server can expose such deviations, but benign numerical nondeterminism also causes token mismatches. Patient attackers can therefore hide within normal variation unless evidence is combined across responses. We introduce a prompt-level e-process that calibrates whole-response mismatch events on trusted benign traffic and accumulates evidence sequentially while, under a calibration-transfer assumption, controlling the probability of any false alarm over an unbounded monitoring horizon. We evaluate it on four models against a seed-blind attack and a stronger seed-aware attack that hides payload bits only in near-ties to remain stealthy, analyzing the channel capacity vs detectability trade-off. Compared with a hard per-token alarm, the e-process combines weak evidence across responses while providing explicit anytime false-alarm control.

Introduction

An LLM inference server holds the model weights and runs the sampler that turns logits into tokens. If compromised, it can leak model weights, private prompts, or arbitrary data by using different plausible next tokens to represent payload bits in ordinary-looking responses [6, 3]. An inference server must return tokens to its clients, so the output-token channel can be monitored and rate-limited, but not completely closed [12]. However, the model weights owner has an advantage: it can replay the same prompt in a trusted server (the verifier) and check whether the served token matches the one prescribed by the committed sampling seed. The sampling seed determines one prescribed token Y∗Y^* at every position, so a different served token is a token mismatch. Under Gumbel–Max sampling [5], the fixed seed determines one Gumbel offset per logit, and the largest perturbed logit defines Y∗Y^* (Eq. (1)). These offsets define the prescribed sampling outcome, but small numerical differences due to GPU non-associativity can reorder a near-tie under the same offsets and cause a benign token mismatch [7].

Seed access therefore determines whether an attacker can exploit this cover to remain stealthy. A seed-blind attacker sees the model logits but not the offsets, so it cannot know Y∗Y^* or the gap to the winner (the seeded margin). It must choose a token to carry the payload before knowing how the offsets reorder the candidates, so its mismatches need not fall in the near-ties where benign token mismatches concentrate. A seed-aware attacker can reconstruct both Y∗Y^* and the seeded margin. It can restrict payload-carrying tokens to seeded near-ties and return Y∗Y^* elsewhere, making deliberate mismatches look like benign ones. Appendix C.1 gives more details about the attack implementation, the threat model, and their decoding assumptions.

Existing detection rules classify individual tokens from their fixed-seed score and raw-logit rank [12], but leave response-level pooling and escalation to deployment. A patient attacker may leave too little evidence in any one token, yet repeatedly applying a hard token alarm eventually flags benign traffic unless error is controlled over the whole monitoring path. We close this gap with an e-process [11] over whole-response (rather than token-level) mismatch events: under the prompt-level null and a calibration-transfer assumption, it runs indefinitely while keeping the probability of any false alarm below a predefined rate. On four models, it detects every resampled seed-blind stream and several seed-aware settings. By contrast, the hard-alarm instantiation of Rinberg et al. [ [12] can’t detect the seed-blind stream while alarming on nearly every benign stream.

Related work. Our monitor builds on two closely related works. Rinberg et al. [ [12] formalize weight exfiltration through the sampler and bound its capacity under a fixed-seed verifier, with a per-token classifier (safe, suspicious, or dangerous) read from a per-token fixed-seed likelihood score and a raw-logit rank. Token-DiFR [7] takes up the complementary difficulty that replay is not bit-exact, characterizing when a mismatch between served and replayed tokens is still consistent with benign serving under numerical nondeterminism. Our monitor takes the fixed-seed score from the first and the benign-mismatch analysis from the second. Methodologically, Shin et al. [ [13] construct e-detectors from restarted e-processes for general sequential change detection, while Su et al. [ [14] use e-processes for online LLM watermark detection. Neither addresses inference-server weight exfiltration. A companion paper [10] studies the complementary calibration question on the same threat model and corpus: it equalizes the realized per-token false-alarm rate across entropy strata and adds a fixed-horizon per-response test, which controls error for a single look rather than over the unbounded horizon considered here.

Method: a prompt-level e-process

The construction starts from KK nested binary events Aj,mA_{j,m} computed after response jj. Each event must be fixed before its benign rate is calibrated. For token tt in response jj, the verifier recomputes the token prescribed by the committed seed, using Gumbel–Max sampling [5], and records whether the server returned a different token:

Yj,t∗=arg max⁡i{lj,t,i/T+gj,t,i},Fj,t=1{yj,t≠Yj,t∗}.(1)Y^{*}_{j,t} = \operatorname*{arg\,max}_{i}\{l_{j,t,i}/T + g_{j,t,i}\}, \qquad F_{j,t} = \mathbb{1}\{y_{j,t} \ne Y^{*}_{j,t}\}. \tag*{(1)}

A benign token mismatch is most plausible when the two leading perturbed logits are nearly tied. Let Δj,t\Delta_{j,t} be the gap between these logits. An independent benign split fixes ordered thresholds 0=b0<⋯<bK−10 = b_0 < \cdots< b_{K-1}. The margin event is

Aj,m=1{∃t:Fj,t=1 and Δj,t≥bm},m=0,…,K−1.(2)A_{j,m} = \mathbb{1}\{\exists t : F_{j,t} = 1 \text{ and } \Delta_{j,t} \ge b_m\}, \qquad m = 0,\ldots,K-1. \tag*{(2)}

A higher-threshold event also triggers every lower-threshold event. Each response contributes one binary observation per threshold, so no independence is assumed among its tokens.

Benign calibration. After fixing the events, we use nn new benign calibration responses. Let Ai,mcalA^{\mathrm{cal}}_{i,m} be event mm on response ii, and let km=∑i=1nAi,mcalk_m = \sum_{i=1}^{n} A^{\mathrm{cal}}_{i,m}. Thus, kmk_m counts calibration responses that trigger event mm, not individual tokens. The plain fraction km/nk_m/n can underestimate the rate by chance, so we instead use the Clopper–Pearson upper bound qm+q_m^{+} [2], fixing qm+q_m^{+} such that the probability of observing at most kmk_m events under a possible rate qm+q_m^{+} reaches η=γ/K\eta= \gamma/K:

∑r=0km(nr)(qm+)r(1−qm+)n−r=η,km<n.(3)\sum_{r=0}^{k_m} \binom{n}{r}(q_m^{+})^r(1-q_m^{+})^{n-r} = \eta, \qquad k_m < n. \tag*{(3)}

We set qm+=1q_m^{+}=1 when km=nk_m=n. Equation (3) asks how large the benign rate could be while observing only kmk_m or fewer events remains an η\eta-probability outcome. Each bound misses the true rate with probability at most η\eta, so all KK bounds cover their rates together with probability at least 1−γ1-\gamma. A loose bound may delay detection, but cannot make benign responses appear more suspicious.

The monitor then asks whether future responses continue to trigger each event at no more than the benign rate qm+q_m^{+}. Let Gj−1\mathcal{G}_{j-1} contain calibration and the completed prompt-response rounds through j−1j-1, before the next prompt-response round is drawn. We formalize the null hypothesis as

H0:E0[Aj,m∣Gj−1]≤qmfor every response j and threshold index m.(4)H_0:\quad\mathbb{E}_0[A_{j,m}\mid\mathcal{G}_{j-1}] \le q_m \quad\text{for every response } j \text{ and threshold index } m. \tag*{(4)}

Under H0H_0, conditional on past rounds, the next benign response triggers each event no more often than its benign rate. This guarantee averages over prompts from the calibration distribution, so it does not need to hold for each prompt separately. Under the alternative H1H_1, at least one event becomes more likely. Thus, H0H_0 requires the same prompt distribution, model, and serving stack used during trusted calibration. Prompt shift, adaptive prompt selection, or a serving-stack change may require stratified calibration or recalibration.

Sequential evidence. For each threshold index mm, the monitor starts with evidence equal to one and updates it after every response by multiplying by a factor:

Ej,m=1+λj,m(Aj,m−qm+),MJ,m=∏j=1JEj,m.(5)E_{j,m}=1+\lambda_{j,m}(A_{j,m}-q_m^+), \qquad M_{J,m}=\prod_{j=1}^{J}E_{j,m}. \tag*{(5)}

An event raises the factor, and a response without it lowers it, so a sustained excess across responses accumulates evidence. We choose λj,m\lambda_{j,m} from earlier responses only, and set it to zero unless their estimated event rate exceeds qm+q_m^+, and cap it at c/qm+c/q_m^+. With c=0.5c=0.5, no update can multiply the evidence by less than 0.5. Appendix B gives the exact rule and its motivation. Finally, we combine the KK components using the fixed average

MJ=1K∑m=0K−1MJ,m.(6)M_J=\frac{1}{K}\sum_{m=0}^{K-1}M_{J,m}. \tag*{(6)}

Validity follows from two facts. First, λj,m\lambda_{j,m} is fixed before response jj is observed, so it cannot depend on that response’s outcome. Second, successful calibration gives E0[Aj,m∣Gj−1]≤qm+\mathbb{E}_0[A_{j,m}\mid\mathcal{G}_{j-1}]\leq q_m^+. Together these imply E0[Ej,m∣Gj−1]≤1\mathbb{E}_0[E_{j,m}\mid\mathcal{G}_{j-1}]\leq1. The cap gives Ej,m≥1−c>0E_{j,m}\geq1-c>0. Conditional on successful calibration, each component is therefore a nonnegative supermartingale, and their fixed average is an e-process [11]. We alarm when MJ≥1/αM_J\geq1/\alpha. Ville’s inequality [15] controls the probability of ever crossing this threshold, regardless of when monitoring stops. The conditional crossing probability is at most α\alpha. Including calibration failure γ\gamma gives

P0(sup⁡J≥1MJ≥1/α)≤α+γ=:δFA.(7)\mathbb{P}_0\left(\sup_{J\geq1}M_J\geq1/\alpha\right)\leq\alpha+\gamma=:\delta_{\mathrm{FA}}. \tag*{(7)}

Appendix B provides the full proof.

Experiments

We study two attack regimes distinguished by seed access (Appendix § 8.§ 1), with codecs tailored to the information available. The lower-knowledge seed-blind attacker cannot reconstruct the prescribed token, so it uses arithmetic coding over clean near-ties and its mismatches land wherever the seeded perturbation falls. The stronger seed-aware attacker reconstructs the seed and uses a binary choice between the prescribed token and its runner-up. Its parameter dmax⁡d_{\max} caps the fixed-seed score gap it will exploit: increasing dmax⁡d_{\max} makes more positions eligible for encoding bits but exposes mismatches at wider, more detectable seeded margins.

For each model, 125 benign responses fit seven margin events and another 125 calibrate their rates. We use c=0.5c=0.5 for the update cap and α=γ=0.005\alpha=\gamma=0.005, giving the operational e-process an alarm threshold of 200 and a 1% overall false-alarm bound. We compare it with the three-tier classifier of Rinberg et al. [ [12], using their fixed-seed likelihood threshold τ=−5\tau=-5 and raw-logit rank threshold R=8R=8 (see Appendix § 8.§ 3). Their policy does not specify pooling over time, so we alarm at the first response containing a dangerous token. Appendix C.2 specifies data splits, calibration, and detector settings.

Table 1 reports how quickly each method alarms over 1,000 bootstrap streams of 250 responses. For each stream we record the response at first alarm and whether it alarms by response 250.

Modeldmax⁡d_{\max}bits/toke-process resp. to alarme-process % alarm (attack / benign)Rinberg et al. % alarm (attack / benign)
Seed-blind attack (no seed access)
Llama-3.2-3B.10456 [5–7]100.0 / 0.00.0 / 100.0
OLMoE-1B-7B.158710 [9–13]100.0 / 0.00.0 / 100.0
Qwen3-32B.18319 [9–9]100.0 / 0.00.0 / 100.0
Qwen3-30B-A3B.120314 [10–21]100.0 / 0.00.0 / 100.0
Seed-aware attack by dmax⁡d_{\max}
Llama-3.2-3B.02.0069−0.0 / 0.063.1 / 98.4
.05.0182172 [72–235]45.9 / 0.095.5 / 98.4
.1.035728 [14–49]100.0 / 0.098.2 / 98.4
OLMoE-1B-7B.02.0096−0.0 / 0.0100.0 / 100.0
.05.0238−0.0 / 0.0100.0 / 100.0
.1.0464181 [115–249]1.7 / 0.0100.0 / 100.0
Qwen3-32B.02.0103204 [152–243]5.6 / 0.0100.0 / 100.0
.05.025885 [67–116]100.0 / 0.0100.0 / 100.0
.1.047430 [26–39]100.0 / 0.0100.0 / 100.0
Qwen3-30B-A3B.02.0068−0.0 / 0.0100.0 / 100.0
.05.0165−0.0 / 0.0100.0 / 100.0
.1.0304−0.0 / 0.0100.0 / 100.0

Table 1. Time to alarm for seed-aware and seed-blind attacks for each detector, over 1,000 bootstrap streams of 250 responses. “resp. to alarm”: median [10–90th pct] response over streams that alarm (− if none by 250).

We begin with the seed-blind attacker (Table 1, top block). The e-process alarms on all 1,000 resampled attack streams for every model at a median of 6–14 responses, while no matched benign stream ever alarms. On the other hand, the method from Rinberg et al. [ [12] alarms only on benign streams because of its rank gate: a token is dangerous only if it is both unlikely under the committed seed and has raw-logit rank greater than 8. The seed-blind encoder emits the clean maximum or a near-tie, so its many token mismatches remain within the top-rank and are labeled suspicious, not dangerous. However, under benign non-determinism, Gumbel sampling can instead prescribe a lower-ranked token, and a replay disagreement there satisfies both gates, flagging tokens as dangerous on the benign held-out set, alarming on every benign stream while being unable to detect the attack.

Seed access improves the attacker’s position by letting it reconstruct the prescribed token and confine deviations to seeded near-ties, trading exfiltration capacity for stealth. Again, the e-process never false-alarms on benign traffic. Regarding attack detection, on the dense models the attack is detected at the higher evaluated rates. On the two mixture-of-experts models, benign mismatches occur more often at wide seeded margins, raising the calibrated event bounds and leaving little excess for near-tie attack mismatches to contribute (Appendix § 6). This is an empirical property of these model–serving stacks, not evidence that mixture-of-experts architecture directly influences detectability. Detection therefore tracks both channel intensity and the benign margin profile (Figure 1): Qwen3-32B is caught at 0.0258 bits/token, while Qwen3-30B-A3B is not at the higher rate 0.0304. More detailed experimental results and the evidence paths are available at Appendix § 9.

Figure 1. Fraction of streams alarmed by response 250 (1,000 bootstrap streams).

Conclusion

Inference verification can limit the exfiltration channel but cannot remove it, since any inference server has to produce responses. This work contributes a prompt-level e-process whose guarantee makes inference verification usable in practice: it can be checked after every response while keeping the probability of any false alarm below a preset level over an unbounded horizon. Across four models it alarms rapidly on every resampled seed-blind stream, while seed-aware power varies with rate and the benign margin profile of the model. Some seed-aware attacks that transmit only a few hundredths of a bit per token are not detected within 250 responses. Such rates could slow enough bulk weight exfiltration but do not prevent the exfiltration of small secrets. Future work will explore an e-process built directly on the fixed-seed likelihood score instead of the binary margin events, betting on this continuous score to accumulate evidence faster and detect a seed-aware attacker at even lower rates.

Acknowledgments and Disclosure of Funding

This work was conducted as part of the ML Alignment & Theory Scholars (MATS) Program.

Why the response statistic matters

The e-process can control false alarms for any prespecified response events whose calibrated bounds transfer to monitoring. The simplest event, “this response contains at least one token mismatch”, is nearly useless because benign serving already produces a mismatch in 41.2%–87.2% of complete responses (Table 2). The e-process still controls its false-alarm probability, but it has little room to detect an attacker on top of that. An event that fires this often on benign traffic has no power against an attacker that exactly matches its benign event rate.

ModelTypeToken mismatches (%)Responses with mismatch (%)Mean mismatches/response
Llama-3.2-3BDense0.4041.20.83
OLMoE-1B-7BMoE1.7587.25.54
Qwen3-32BDense0.5579.22.46
Qwen3-30B-A3BMoE1.6574.84.61

Table 2. Benign nondeterminism in 250 held-out benign responses across model types. The first column counts the fraction of tokens that mismatch the seeded replay, the second counts the fraction of complete responses that contain at least one mismatch, and the third counts the mean number of mismatches per response.

The solution is to track not only whether a mismatch occurred, but also where it occurred. The fixed seeded Gumbel draws define the prescribed token and its margin. Benign token mismatches arise when numerical differences between the serving and verification stacks reorder a near-tie under those same draws. A mismatch at a wide seeded margin is therefore harder to explain by numerical noise alone. Figure 2 shows how steeply the benign mismatch rate falls as the margin widens. Each token falls in exactly one margin cell, and the curve is the fraction of tokens in that cell that mismatch: across models it drops from roughly 10%–40% in the tightest cell to below 0.1% in the widest. These per-token rates are descriptive only: the monitor holds its guarantee by calibrating whole-response events on separate benign responses.

Per-token benign mismatch rate by margin cell for four model types

Figure 2. Per-token benign mismatch rate by margin cell in the same 250 held-out benign responses as Table 2. Margin-cell edges were fitted on a separate 125-response benign split. Cell 0: tightest ties, cell 6: widest margins.

The ordering does not track model scale, and we did not evaluate task capability against replay stability. OLMoE-1B-7B has the highest pooled mismatch burden (1.75% of tokens, 87.2% of responses, and 5.54 mismatches per response), while the larger dense Qwen3-32B is lower on all three measures. More broadly, both mixture-of-experts models have roughly 3–4 times the dense models’ pooled token mismatch rates and higher mismatch rates in the widest cell. Sparse expert routing is a plausible amplifier: small numerical changes may alter the selected experts and propagate into larger logit differences. Four checkpoints confound model family, architecture, and serving kernels, however, so this is a hypothesis rather than a capability trend or causal architecture result. We therefore treat benign noise as a property of the complete model–serving stack and calibrate each deployment separately.

A higher benign mismatch rate in a wide margin cell gives the attacker cover: payload-carrying mismatches look more like benign ones, and each adds less evidence. In the extreme, a monitor that ignores the margin entirely sees only mismatch counts, so an attacker that matches the overall benign rate is indistinguishable from benign traffic to that statistic. Conditioning on the margin adds information the seed-blind attack cannot target. A seed-aware attacker can better match where benign mismatches fall, but only by restricting the evaluated encoder to tighter ties and therefore fewer eligible positions.

In addition, a single margin threshold would force us to decide in advance whether to watch for common tight-margin excesses or for rare wide-margin ones. Instead, we run one e-process per threshold and average the K=7K = 7 of them, letting the stream itself determine where evidence accumulates. The price of not choosing is small: the average is never less than 1/K1/K times the best component, a penalty of at most log⁡K\log K in log evidence, and no threshold is ever selected using attack data. The events are deliberately simple: each event records only whether it fired, not how many mismatches qualified or how wide their margins were. A richer response statistic could detect more, but it would need its own calibration and its own validity argument, that we leave for future work.

Validity of the e-process

Let Cedge\mathcal{C}_{\mathrm{edge}} and Cevent\mathcal{C}_{\mathrm{event}} be independent sets of benign responses. The first fixes the margin thresholds and therefore the event maps in (2). The second estimates their probabilities. Let Gj−1\mathcal{G}_{j-1} contain both calibration sets and the completed monitoring rounds through j−1j-1, before the next prompt-response round is drawn. Write C=(Cedge,Cevent)C = (\mathcal{C}_{\mathrm{edge}},\mathcal{C}_{\mathrm{event}}) for the combined calibration realization. The monitor updates only after a response is complete. There are KK nested events, indexed by m=0,…,K−1m = 0,\ldots,K-1.

Assumptions.

  1. Conditional on Cedge\mathcal{C}_{\mathrm{edge}}, the responses in Cevent\mathcal{C}_{\mathrm{event}} are independent draws from the benign response distribution. For each mm, their indicators Ai,mcalA^{\mathrm{cal}}_{i,m} are therefore Bernoulli with mean qmq_m.

  1. During monitoring, the prompt-level null (4) holds for every round and threshold index. Independent prompt-response rounds from the calibrated deployment distribution are sufficient, but not necessary.

  1. Calibration and monitoring use the same prompt distribution, model, hardware, and serving stack, and the calibration responses are collected from a trusted window in which the server is known benign. Because the threat is a compromised serving stack, this trusted window is what the guarantee is measured against: it bounds false alarms on deviations that occur after calibration. The expectation in (4) is marginal over the next prompt and response. The calibration does not establish a uniform bound conditional on every possible prompt: prompt shift or adaptive prompt selection can violate the null.

  1. The coefficient λj,m\lambda_{j,m} is Gj−1\mathcal{G}_{j-1}-measurable and satisfies 0≤λj,m≤c/qm+0 \le\lambda_{j,m} \le c/q_m^{+} for a fixed c<1c < 1.

Choosing λ\lambda from past responses. Let Sj−1,m=∑i<jAi,mS_{j-1,m} = \sum_{i<j} A_{i,m} count the earlier responses that triggered event mm. Before observing response jj, we add half a count (1/2)(1/2) to each outcome: event and no event. The resulting estimate is

r^j,m=Sj−1,m+1/2(Sj−1,m+1/2)+(j−1−Sj−1,m+1/2)=Sj−1,m+1/2j.\hat{r}_{j,m} = \frac{S_{j-1,m} + 1/2}{(S_{j-1,m} + 1/2) + (j - 1 - S_{j-1,m} + 1/2)} = \frac{S_{j-1,m} + 1/2}{j}.

This is the Krichevsky–Trofimov estimator [8]: the two half counts act as a weak prior observation of each outcome, so no finite sample can drive the estimate to exactly zero or one. Without the half counts, the first few responses alone would push the estimate to an extreme: zero after a quiet start with no events, or one after an early event, and the coefficient below would swing with it. Applying the smoothing allows early estimates to stay moderate, and the coefficient can adjust gradually as responses accumulate. The coefficient turns this estimate into the size of the next update: it grows with the excess of the estimated rate over the calibrated bound, and it is clipped to the permitted range [0,c/qm+][0,c/q_m^{+}]:

λ~j,m=r^j,m−qm+qm+(1−qm+),λj,m=min⁡{cqm+,max⁡{0,λ~j,m}}.(8)\widetilde{\lambda}_{j,m} = \frac{\hat{r}_{j,m} - q_m^{+}}{q_m^{+}(1-q_m^{+})}, \qquad\lambda_{j,m} = \min\left\{\frac{c}{q_m^{+}},\max\left\{0,\widetilde{\lambda}_{j,m}\right\}\right\}. \tag*{(8)}

If qm+=1q_m^+ = 1, we set λj,m=0\lambda_{j,m} = 0. Because this choice uses only earlier responses, λj,m\lambda_{j,m} is fixed before response jj is observed. This is the predictability condition required for validity. To see where the formula comes from, write qq for qm+q_m^+ and suppose the next event occurs with probability rr. The expected logarithm of the update factor is

g(λ;r,q)=rlog⁡(1+λ(1−q))+(1−r)log⁡(1−λq).(9)g(\lambda; r, q) = r \log(1 + \lambda(1 - q)) + (1 - r) \log(1 - \lambda q). \tag*{(9)}

Differentiating (9) gives the growth-rate-optimal fixed bet λ∗=(r−q)/[q(1−q)]\lambda^* = (r - q)/[q(1 - q)] [16]. Since rr is unknown, substituting the past-response estimate r^j,m\hat{r}_{j,m} gives λ~j,m\tilde{\lambda}_{j,m} in (8). Clipping at zero prevents the monitor from reacting when the estimated rate is below the benign bound. The upper limit c/qm+c/q_m^+ ensures that every update factor is at least 1−c1-c. The estimate need not be correct for validity, λj,m\lambda_{j,m} only needs to be chosen before Aj,mA_{j,m} is observed and remain within these limits.

For each mm, Clopper–Pearson gives P0(qm>qm+∣Cedge)≤γ/K\mathbb{P}_0(q_m > q_m^+ \mid C_{\mathrm{edge}}) \le\gamma/K. No independence across events is needed. A union bound gives

P0(A∣Cedge)≥1−γ,A={qm≤qm+ for m=0,…,K−1}.(10)\mathbb{P}_0(\mathcal{A} \mid C_{\mathrm{edge}}) \ge1 - \gamma,\qquad\mathcal{A} = \{q_m \le q_m^+ \text{ for } m = 0,\ldots,K-1\}. \tag*{(10)}

This is the meaning of simultaneous coverage: one event certifies all bounds used by the mixture.

Proposition. Under the assumptions above, conditional on any calibration realization in A\mathcal{A}, every (MJ,m)J≥0(M_{J,m})_{J\ge0} and their fixed mixture (MJ)J≥0(M_J)_{J\ge0} are nonnegative supermartingales with initial value one. Hence

P0(sup⁡J≥1MJ≥1α | C=c)≤αfor every c∈A.\mathbb{P}_0\left(\sup_{J\ge1} M_J \ge\frac{1}{\alpha}\,\middle|\, C = c\right) \le\alpha\qquad\text{for every } c \in\mathcal{A}.

Proof. Fix mm. Since Aj,m∈{0,1}A_{j,m} \in\{0,1\},

Ej,m={1−λj,mqm+≥1−c>0,Aj,m=0,1+λj,m(1−qm+)≥1,Aj,m=1.E_{j,m} = \begin{cases} 1-\lambda_{j,m}q_m^+ \ge1-c > 0, & A_{j,m}=0,\\ 1+\lambda_{j,m}(1-q_m^+) \ge1, & A_{j,m}=1. \end{cases}

Thus MJ,m≥0M_{J,m} \ge0. On A\mathcal{A}, predictability and (4) give

E0[Ej,m∣Gj−1]=1+λj,m(E0[Aj,m∣Gj−1]−qm+)≤1+λj,m(qm−qm+)≤1.\mathbb{E}_0[E_{j,m}\mid\mathcal{G}_{j-1}] =1+\lambda_{j,m}\left(\mathbb{E}_0[A_{j,m}\mid\mathcal{G}_{j-1}]-q_m^+\right) \le1+\lambda_{j,m}(q_m-q_m^+) \le1.

Since Mj−1,mM_{j-1,m} is nonnegative and measurable given Gj−1\mathcal{G}_{j-1},

E0[Mj,m∣Gj−1]=Mj−1,mE0[Ej,m∣Gj−1]≤Mj−1,m.\mathbb{E}_0[M_{j,m}\mid\mathcal{G}_{j-1}] =M_{j-1,m}\mathbb{E}_0[E_{j,m}\mid\mathcal{G}_{j-1}] \le M_{j-1,m}.

Each component is therefore a nonnegative supermartingale. Linearity of conditional expectation makes their fixed average MJM_J a nonnegative supermartingale with M0=1M_0=1. Ville’s inequality gives the conditional result. Finally,

P0(sup⁡JMJ≥1/α)≤P0(Ac)+P0(sup⁡JMJ≥1/α,A)≤α+γ=δFA.\mathbb{P}_0\left(\sup_J M_J \ge1/\alpha\right) \le\mathbb{P}_0(\mathcal{A}^{\mathrm{c}}) +\mathbb{P}_0\left(\sup_J M_J \ge1/\alpha,\mathcal{A}\right) \le\alpha+\gamma=\delta_{\mathrm{FA}}.

The proof does not assume anything about dependence among tokens within a response. It does assume that calibration responses provide binomial observations for each event and that their marginal prompt-response event bounds transfer to future rounds. If qm+=E0[Aj,m∣Gj−1]q_m^+ = \mathbb{E}_0[A_{j,m}\mid\mathcal{G}_{j-1}], then the corresponding factor has conditional mean one. A conservative upper bound changes equality to an inequality, which is why the implemented process is generally a supermartingale rather than a martingale. The uniform mixture costs at most log⁡K\log K in log evidence relative to its best component: a component reaching K/αK/\alpha is sufficient by itself to trigger the alarm. With K=7K=7, this is a small fixed price for not selecting an event threshold on attack data.

Experimental data and evaluation protocol

Threat model and seed access.

We assume a trusted verifier and a serving stack whose token-selection logic may be compromised. The attacker knows the model, prompt, logits, sampling rule, and detector, and may coordinate its token choices with a receiver to encode a payload. It cannot alter the verifier, its calibration data, or the recorded responses. Its only lever is the token returned at each step, so detection must come from the pattern of emitted tokens rather than (possibly) corrupted telemetry.

We separate two seed-access regimes. A seed-blind attacker chooses the next token to emit without seeing the verifier’s sampling seed, replayed token, or seeded margin. This requires an architecture that keeps seed-derived randomness outside the compromised encoding component, such as an isolated sampler or a commit-then-reveal protocol. By contrast, a seed-aware attacker owns the sampling seed and can reconstruct the verifier’s sampling step before choosing a token, concentrating its payload where the replayed winner is nearly tied with the runner-up. The closer it matches the benign pattern of mismatches and replay scores, the less evidence the monitor can accumulate. We treat this stronger regime as a stress test rather than assuming that seed secrecy survives full server compromise.

Seed-aware attack. At each position, the seed-aware attacker computes the seed-prescribed token Yj,t∗Y^{*}_{j,t} and the runner-up under the verifier’s fixed-seed likelihood score, with score gap dtd_t. A position is eligible to encode bits when the runner-up has score at least τ=−5\tau= -5 and dt≤dmax⁡d_t \le d_{\max}. Each eligible position offers a binary alphabet: Yj,t∗Y^{*}_{j,t} encodes 0 and the runner-up encodes 1; otherwise the attacker emits Yj,t∗Y^{*}_{j,t} without consuming a bit. Hence dmax⁡d_{\max} controls how many positions offer one bit, not how many bits one eligible position carries. The sets are nested: positions eligible at .02 remain eligible at .05 and .1, which additionally admit wider gaps. If K(dmax⁡)K(d_{\max}) of NN positions qualify, the attack carries K(dmax⁡)K(d_{\max}) bits at rate K(dmax⁡)/NK(d_{\max})/N bits per token; increasing dmax⁡d_{\max} therefore raises both the realized rate and exposure to detection. A four-candidate alphabet could instead map 00, 01, 10, 11 to four tokens, but that is a different attack: the implementation evaluated here always uses the top two. The decoder reconstructs this ordered pair from the emitted token and returned top-candidate logprobs. The binary code, payload distribution, and detector remain fixed across dmax⁡d_{\max}.

Seed-blind attack. Unable to compute Yj,t∗Y^{*}_{j,t}, the encoder forms a codebook from up to 16 clean candidates within 0.5 logits of the maximum, emitting the maximum if fewer than two qualify. Its size varies and is often not a power of two, so fixed bit labels waste choices. Arithmetic coding efficiently uses the full nonuniform codebook with model-proportional weights and is reconstructible from clean logprobs without the seed [6, 3]. It is therefore an efficiency choice: the seed-aware binary top-two code instead isolates dmax⁡d_{\max}. Seeded noise can reorder clean candidates, causing wide-margin mismatches. Rates are ideal channel-use estimates, not measured payload.

Decoding assumptions. Both implementations assume that a colluding API client receives the emitted token and enough top-candidate logprobs to reconstruct each codebook and, for arithmetic coding, its weights. If the provider omits logprobs, or truncates them below the candidate-set size, this decoder cannot recover the payload. Some frontier interfaces do not expose the required metadata: Anthropic’s Messages schema has no logprobs field, OpenAI’s GPT-5.6 feature list does not advertise logprobs, and Google marks both logprob controls deprecated for Gemini 3.x [1, 9, 4]. This blocks the implemented decoder on those interfaces, but not the sampler channel in principle: an attacker could use a lower-rate codebook recoverable from output tokens alone.

Dataset.

Prompts come from the training split of LMSYS-Chat-1M [17]. After applying each model’s chat template, we retain unique conversations of at most 512 prompt tokens. The main experiment uses 250 even-indexed prompts for trusted calibration and 250 odd-indexed prompts for testing. Each attack run and its benign control use the same odd prompts, so their only intended difference is whether payload bits are encoded. Each setting has one response per prompt, capped at 512 output tokens. Table 3 gives the scored token counts and Table 4 the monitoring settings.

The four checkpoints cover three model families and two architectures: Llama-3.2-3B and Qwen3-32B are dense, while OLMoE-1B-7B and Qwen3-30B-A3B are mixture-of-experts models. This samples benign replay behavior across different families, nominal scales, and routing architectures, but does not isolate any one factor or constitute a comprehensive model survey.

ModelArchitectureCalibrationBenign testAttack range
Llama-3.2-3B-Instructdense44,20152,36751,839–52,547
OLMoE-1B-7B-0125-InstructMoE78,98579,37578,837–80,248
Qwen3-32Bdense113,613111,679112,138–112,570
Qwen3-30B-A3B-InstructMoE71,41269,85569,616–70,473

Table 3. Scored output-token counts for the seed-aware attack. Attack counts span the three reported dmax⁡d_{\max}.

SettingValue
Seed-aware attackseeded winner and runner-up; one bit per eligible token
Maximum score gapdmax⁡∈{.02,.05,.1}d_{\max} \in\{.02, .05, .1\}
Eligibilityrunner-up predicted safe and score gap dt≤dmax⁡d_t \le d_{\max}
Margin constructionsix fixed percentile levels: 2, 5, 10, 20, 40, 70%
Margin eventsK=7K = 7 nested margin thresholds
Benign split per model125 edge fit; 125 event calibration; 250 matched test
e-processc=0.5c = 0.5; α=0.005\alpha= 0.005; γ=0.005\gamma= 0.005; threshold 200
Rinberg et al. baselineσ=1\sigma= 1; τ=−5\tau= -5; rank cutoff R=8R = 8
Escalation policyfirst response containing a dangerous token
Monitoring protocol1,000 resampled streams of 250 responses per setting

Table 4. Experimental and monitoring settings.

Data generation and verification. Generation and replay use the same bfloat16 checkpoint with temperature 1, top-k=50k = 50, top-p=0.95p = 0.95, sampling seed 42, and concurrency 1. Replay is run separately and records the mismatch indicator, seeded margin, fixed-seed likelihood score, and raw-logit rank. The payload is a pseudorandom bit stream with seed 1234, separate from the sampling seed.

Calibration and evaluation. For each model, the 250 even-prompt benign responses are divided by a fixed whole-prompt split into 125 responses for margin-threshold fitting and 125 for event bounds. For each of the K=7K = 7 events, we use the Clopper–Pearson bound at error γ/K\gamma/K. We set α=γ=0.005\alpha= \gamma= 0.005 and c=0.5c = 0.5, giving alarm threshold 200 and the 0.01 bound under the prompt-level null and calibration-transfer assumption. A separate benign run on the 250 odd prompts is the matched benign control set. Each attack setting uses those same odd prompts, and we form 1,000 streams by resampling complete responses with replacement. For Table 1 and Figures 1 and 5 both detectors run at their prespecified alarm rule (e-process threshold 200, Rinberg et al. alarms at the first dangerous token), and we record each stream’s first-alarm response and whether it alarms by response 250. Evidence is updated once after each complete response. These bootstrap streams quantify sensitivity to resampling and response order within one fixed 250-response test pool, they are not independent model runs or confidence intervals for a new deployment. Table 5 reports the fitted margin values.

Baseline (Rinberg et al.)

The baseline scores each served token by how consistent it is with the committed seed. Holding that seed, the verifier recomputes the exact Gumbel perturbation the sampler added to the logits at that step and finds the token the seeded sampler would have selected, Yj,t∗Y^{*}_{j,t}. Writing Δj,tsrv≥0\Delta^{\mathrm{srv}}_{j,t} \ge0 for the resulting gap on the perturbed logits between Yj,t∗Y^{*}_{j,t} and the served token, the fixed-seed likelihood score is

GLSj,t=log⁡Φ(−Δj,tsrvσ2),(11)\mathrm{GLS}_{j,t} = \log\Phi\left(-\frac{\Delta^{\mathrm{srv}}_{j,t}}{\sigma\sqrt{2}}\right), \tag*{(11)}

where Φ\Phi is the standard normal cumulative distribution function and σ\sigma scales the assumed noise. When the served token is the prescribed winner the gap is zero and the score takes its maximum log⁡12≈−0.69\log\frac{1}{2} \approx-0.69. A token far down the seeded order has a large gap and a strongly negative score. Intuitively, the score is high when the served token is what the seed would have produced and falls as the two disagree by more.

On top of this score, Rinberg et al. [2025] propose a fixed three-tier rule: a token is safe when its score is at least τ\tau, a lower-scoring token is suspicious when its zero-indexed raw-logit rank is at most RR and dangerous when its rank is greater than RR. We use the verifier’s σ=1\sigma= 1 scale and the recommended threshold from the paper at τ=−5\tau= -5, together with the rank cutoff R=8R = 8 highlighted

Modelb1b_1b2b_2b3b_3b4b_4b5b_5b6b_6
Llama-3.2-3B.0425.1180.2374.47131.04742.2907
OLMoE-1B-7B.0387.1000.2072.4349.97912.1589
Qwen3-32B.0454.1098.2252.46481.02062.2092
Qwen3-30B-A3B.0464.1165.2354.48841.07532.2991

caption: Fitted margin thresholds (125 edge-fitting responses). b0=0b_0 = 0, whereas the last cell includes margins above b6b_6.

in their results. The authors explicitly leave pooling to the response level and escalation to the deployment. We therefore define the hard-alarm policy as the first response containing at least one dangerous token. This policy has no claimed stream-level error guarantee.

Section 3 explains why its rank gate alarms on benign traffic yet misses the seed-blind attack. The e-process instead tests whether mismatches occur at wider seeded margins more often than under benign serving.

Detailed experimental results

This appendix supports the three main findings of Section 3 with the full monitoring detail: (1) every resampled seed-blind stream alarms quickly; (2) seed-aware detection depends on rate and the model’s benign margin profile; and (3) no held-out benign e-process stream crosses, whereas the hard-alarm baseline crosses frequently. All results below use the data splits of Appendix C and one shared protocol: for each model and setting, 1,000 audit streams of 250 complete responses, sampled with replacement from the test prompts, with each detector running its prespecified alarm rule.

Figure 3 plots the fraction of attack streams that have alarmed by each response. Against the seed-blind attack, every resampled stream on every model alarms, typically within the first fifteen responses (medians 6–14), and no matched benign stream alarms. Resampling response order 1,000 times shows that this result is not tied to the recorded order. The seed-aware attack behaves differently: on the dense models the alarms arrive earlier as dmax⁡d_{\max} grows, while on the two mixture-of-experts models the curves stay essentially at zero (at most 1.7% of streams by response 250).

Figure 3. Fraction of attack streams alarmed by each response (1,000 bootstrap streams of 250 responses), seed-blind versus seed-aware at dmax⁡∈{.02,.05,.1}d_{\max} \in\{.02, .05, .1\}.

First, we examine the evidence paths of each model and attack setting. Figure 4 shows one recorded-order path per setting. The seed-blind paths cross within the first few responses. Seed-aware paths cross only at detectable settings, whereas the matched benign paths remain below the alarm threshold. Table 1 and Figure 3 summarize the bootstrap streams.

Figure 4. Accumulated log evidence for the benign control, the seed-blind attack, and the seed-aware attack at each dmax⁡d_{\max}. Curves stop at the alarm threshold log⁡200\log200.

Detectability is model dependent. Figure 1 follows from the benign floor of Table 2 and Figure 2. The two mixture-of-experts models produce several times more benign mismatches, including at wide seeded margins, so their calibrated benign event bounds are high. A seed-aware attacker that limits payload swaps to near-ties can then sit beneath that floor, leaving little excess for the monitor to accumulate. Whether this attack is detectable is therefore as much a property of the model–serving stack’s benign behavior as of the monitor. Appendix § 6 explains why the four-model comparison does not establish an architecture effect.

Figure 5 condenses the same dmax⁡d_{\max} sweep into one panel: the median response at first e-process alarm against the realized exfiltration rate, counting streams that never alarm as censored at the horizon, so settings whose median stream never alarms sit as open markers on the top line. Across the seed-aware settings that are detected, alarms arrive sooner at higher realized rates. The evaluated seed-blind codec operates at a higher rate and alarms within the first dozen responses. This is an empirical trade-off for these codecs, not proof that throttling is an attacker’s only evasion strategy.

Median response at first e-process alarm by realized rate

Figure 5. Median response at first e-process alarm by realized rate (1,000 streams. Medians over all streams, censored at response 250). Stars: seed-blind attack; open markers: no alarm by response 250.

At last, looking in depth at the benign control set, we can observe how on the held-out benign data the largest recorded-order log evidence over 250 responses is 0.15 (Qwen3-30B-A3B), well below the alarm line log⁡200≈5.3\log200 \approx5.3, and none of the 1,000 resampled benign streams crosses on any model. Figure 6 shows that, when checked response by response on the same streams, the hard-alarm baseline’s cumulative benign crossing rate approaches 100%, whereas the e-process has no crossings. Theorem-level anytime control comes from § 2 and Appendix § 7.

Cumulative false-alarm rate on benign streams by response

Figure 6. Cumulative false-alarm rate on benign streams by response (1,000 bootstrap streams). Dotted: the α+γ=1%\alpha+ \gamma= 1\% bound.

References

  1. [1]Anthropic. Create a message — claude API reference. https://platform.claude.com/docs/en/api/http/messages/create, 2026. Accessed 2026-08-27.
  2. [2]Charles J. Clopper and Egon S. Pearson. The use of confidence or fiducial limits illustrated in the case of the binomial. Biometrika, 26(4):404–413, 1934.DOI
  3. [3]Christian Schroeder de Witt, Samuel Sokota, J. Zico Kolter, Jakob Foerster, and Martin Strohmeier. Perfectly secure steganography using minimum entropy coupling. In Proc. International Conference on Learning Representations (ICLR), 2023.arxiv.org/abs/2210.14889
  4. [4]Google Cloud. Generate content with the Gemini API. https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/models/inference, 2026. Accessed 2026-08-27.
  5. [5]Emil Julius Gumbel. Statistical theory of extreme values and some practical applications, volume 33. US Government Printing Office, 1954.
  6. [6]Gabriel Kaptchuk, Tushar M. Jois, Matthew Green, and Aviel D. Rubin. Meteor: Cryptographically secure steganography for realistic distributions. In Proc. ACM Conference on Computer and Communications Security (CCS), pages 1529–1548, 2021.DOI
  7. [7]Adam Karvonen, Daniel Reuter, Roy Rinberg, Luke Marks, Adria Garriga-Alonso, and Keri Warr. DiFR: Inference verification despite nondeterminism. arXiv preprint arXiv:2511.20621, 2025.arxiv.org/abs/2511.20621
  8. [8]Raphaïl E. Krichevsky and Victor K. Trofimov. The performance of universal encoding. IEEE Transactions on Information Theory, 27(2):199–207, 1981.DOI
  9. [9]OpenAI. GPT-5.6 sol model — openai API. https://developers.openai.com/api/docs/models/gpt-5.6-sol, 2026. Accessed 2026-08-27.
  10. [10]Ines Ortega-Fernandez, Mateusz Kowalczyk, and Keri Warr. A conformal layer for fixed-seed LLM inference verification. In Proceedings of the IEEE International Workshop on Information Forensics and Security (WIFS), Sendai, Japan, December 2026. To appear.
  11. [11]Aaditya Ramdas, Peter Grünwald, Vladimir Vovk, and Glenn Shafer. Game-theoretic statistics and safe anytime-valid inference. Statistical Science, 38(4):576–601, 2023.arxiv.org/abs/2210.01948
  12. [12]Roy Rinberg, Adam Karvonen, Alexander Hoover, Daniel Reuter, and Keri Warr. Verifying LLM inference to detect model weight exfiltration. arXiv preprint arXiv:2511.02620, 2025.arxiv.org/abs/2511.02620
  13. [13]Jaehyeok Shin, Aaditya Ramdas, and Alessandro Rinaldo. E-detectors: A nonparametric framework for sequential change detection. New England Journal of Statistics in Data Science (NEJSDS), 2(2):229–260, 2024.arxiv.org/abs/2203.03532
  14. [14]Weijie Su, Ruodu Wang, and Zinan Zhao. Online LLM watermark detection via e-processes. arXiv preprint arXiv:2602.14286, 2026.arxiv.org/abs/2602.14286
  15. [15]Jean Ville. Étude critique de la notion de collectif. Gauthier-Villars, Paris, 1939.
  16. [16]Ian Waudby-Smith and Aaditya Ramdas. Estimating means of bounded random variables by betting. Journal of the Royal Statistical Society: Series B, 86(1):1–27, 2024.
  17. [17]Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Tianle Li, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zhuohan Li, Zi Lin, Eric P Xing, et al. LLMsys-chat-1m: A large-scale real-world llm conversation dataset. In International Conference on Learning Representations, volume 2024, pages 22225–22257, 2024.DOI

Paper details

vlnc:W_ahs9aexs
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 5

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents