Manuscript Offprint

arXiv:2610.16790

Logit Leakage through Floating-Point Bias Addition

Shaomin Chen, Xiaorui Gong

Shaomin Chen

Xiaorui Gong

Abstract—Language model APIs can expose token-specific biases while withholding logits and token probabilities. Existing bias-based extraction recovers relative logits, leaving a common additive component undetermined in ideal arithmetic. We identify a numerical side channel in floating-point bias addition that exposes information about this component through token identities alone. The channel distinguishes score vectors with identical complete unperturbed log probabilities. Our method exploits changes in representable spacing at binary exponent boundaries. Under the stated binary32 arithmetic assumptions and a known reachable score interval, it recovers a logit pair and its unknown tie-breaking priority exactly in at most 52 token queries. Given complete relative logits, one recovered anchor determines the original logit vector. We evaluate recovery across 11 public checkpoints from seven model families and extend the local method with adaptive interval search and anchor selection. In end-to-end experiments with vLLM, SGLang, and llama.cpp, adaptive recovery succeeds on all 128 Qwen3-0.6B inputs per system, including 64 held-out inputs. A separate token-only experiment extracts a pretrained small model's complete output-head representation up to an invertible hidden-basis transformation. We also establish a sufficient condition for suppressing common-shift disclosure by subtracting the maximum before bias addition. In controlled experiments, this mitigation eliminates all observed distinctions between common-shift variants and preserves token decisions under the tested random biases.

1. Introduction

Language-model services expose configurable decoding interfaces while withholding internal logits and model parameters. Logit bias lets users steer generated text by increasing or decreasing the likelihood of specified tokens, even when the interface returns only the selected token [1]. Understanding what numerical information can be recovered through these controls is part of assessing the information exposed by a prediction interface.

Prediction interfaces support model extraction [2], including recovery of language-model output projections and their dimensions [3], [4]. Morris et al. and Carlini et al. recover relative logits through token-specific biases and observed token choices [3], [5]. In exact real arithmetic, both softmax probabilities and biased-argmax responses are invariant to a common additive shift of the logit vector. These observations determine logit differences while leaving one additive component unidentified for each input.

We show that floating-point bias addition can expose this component through token identities alone. Floating-point spacing varies with magnitude, so adding a chosen bias can produce different rounded comparisons for logit vectors related by a common shift. We construct queries that distinguish such vectors even when their complete unperturbed log probabilities are identical. Under explicit arithmetic and range conditions, we use these differences to recover original-logit anchors. Combined with complete relative logits, an anchor determines the original logit vector, including its common additive component.

Figure 1 summarizes the mechanism and recovery. We address three technical challenges:

• Identifying leakage beyond relative logits. Common-shift score vectors produce identical ideal query responses. Establishing additional disclosure requires floating-point queries that distinguish these vectors while their complete unperturbed probability outputs remain identical.

  • Recovering original logits from token responses. A token comparison combines score gaps, rounding, and an unknown tie-breaking order. Bounded biases restrict the accessible numerical regions, so recovery requires queries that separate these effects.

  • Suppressing leakage while preserving bias control. Removing dependence on the common additive component can change rounded comparisons and token choices. A mitigation must retain token-specific bias control and be evaluated for both channel suppression and preservation of decoding behavior.

For positive-score recovery, we determine the logit gap and the token tie-breaking priority, then probe the original anchor using the spacing change at an exponent boundary. The probe responses are periodic over part of the candidate range. We first use a small number of queries to determine the anchor's position within this repeating pattern, then restrict the candidate values accordingly to obtain a monotone comparison for binary search. Binary search then recovers the anchor exactly within the stated interval, and the recovered gap determines the second original logit.

Our central result assumes stable scores, independently converted biases, one correctly rounded addition per coordinate, greedy selection, and a fixed but unknown token tie-breaking order. Given a known reachable score interval, recovery takes at most 50 binary queries for a positive binary32 score pair and its priority, or 47 for negative scores. Selecting the two tokens takes two additional queries. We validate recovery across 11 public checkpoints from seven

(a) Token-only queries

Private service

Figure

(b) Same increment, different rounding

(c) Original-logit recovery

(d) Suppression before bias addition

Figure 1. Overview of the numerical channel and recovery. (a) The observer chooses token biases b for fixed input x and observes the selected token; RN32RN_{32} denotes binary32 rounding. (b) At the positive boundary P=2eP = 2^e, spacing increases from Δ\Delta to 2Δ2\Delta. At the illustrated point below P, the increment is exact. At P, the exact sum P+ΔP + \Delta lies halfway between P and P+2ΔP + 2\Delta and rounds to P under ties-to-even. (c) Gap and priority recovery followed by boundary probes recovers the score pair under the stated arithmetic and range assumptions. (d) Subtracting the maximum before bias suppresses common-shift disclosure when stored variants yield identical centered vectors.

model families and extend the local method with interval search and anchor selection. End-to-end adaptive recovery through vLLM, SGLang, and llama.cpp succeeds on all 128 Qwen3-0.6B inputs per system, including 64 held-out inputs.

The recovered component has a direct role in output-head extraction. For a bias-free linear head under the rank conditions in Appendix G, centered logits determine CWG, where C subtracts the vocabulary mean, W is the output head, and G is an invertible hidden-basis transformation. Original-logit anchors supply the missing shared row component and permit recovery of WG. We demonstrate this composition by extracting a pretrained model's complete 512×64512 \times 64 output-head representation from token responses across three independent input sets. On vocabulary rows excluded from basis alignment, weight RMSE ranges from 3.60×10−73.60 \times 10^{-7} to 1.20×10−61.20 \times 10^{-6} (Section 5.3).

Finally, we analyze subtracting the maximum before bias addition as a mitigation. When common-shift variants yield identical preprocessed vectors, subsequent bias queries disclose no difference between them. Controlled experiments verify this condition and measure output preservation under independently generated sparse biases.

We make three contributions:

  1. Logit leakage through floating-point bias addition. We characterize how rounding exposes a common additive component that remains unidentified by ideal probabilities and biased-argmax responses.

  2. Constructive recovery and output-head extraction. We give local exact-recovery algorithms and query bounds, validate them through generation and serving interfaces, and combine recovered anchors with relative logits to extract an output-head representation.

  3. Processing-order analysis and mitigation. We establish a sufficient condition for suppressing common-shift disclosure through pre-bias max subtraction and measure its effect on token decisions.

References (39)