Discrete-token API queries leak the vocabulary-head subspace of Gemma-family models, with RMSNorm shrinking ambiguity to O(d). Recovery is validated on a real Gemma 3 270M checkpoint, but MoE routing and blind quantized-weight extraction remain out of reach.
Full-output Class A recovery on the real pretrained google/gemma-3-270m checkpoint (L=18,d=640,V=262,144, n=768 training / 128 held-out discrete prefixes, T=8). Top block: archived double-centered FP64 runs (double-centered held-out residuals 5.55--5.87×10-15; ealign aligns weighted UbmΣ to PEeff via 4,096-row blocked normal equations, while unblocked direct-matmul normal equations show 10-12--10-11 summation drift near the FP64 floor; etest uses exact Eq. (11) single centering). Bottom block: single-centered final-output precision ablation on identical raw scores with rank fixed at d=640 for ealign,etest, and Energy. Gap reports σ640/σ641; d is the blind maximum-ratio width estimate over the positive spectrum († denotes blind width failure); Energy reports held-out squared centered score energy captured on the 128 held-out prefixes (1-etest2, Eq. (22)). Output format | d | Gap | ealign | etest | Energy Archived deterministic FP64 oracle (double-centered Gram) Raw logits (FP64) | 640 | 1.97×105 | 2.71×10-14 | 2.55×10-14 | >99.9999% Log probs. (FP64) | 640 | 1.84×105 | 2.83×10-14 | 2.50×10-14 | >99.9999% Probs. (FP64, 0 underflow) | 640 | 1.84×105 | 2.83×10-14 | 2.50×10-14 | >99.9999% Output-precision ablation (single vocab-centered Gram, Prop. 1(a)) Log probs. (8-dec.) | 640 | 1.72×105 | 7.86×10-10 | 2.33×10-9 | >99.9999% Log probs. (FP32) | 640 | 1.16×105 | 1.30×10-7 | 3.70×10-7 | >99.9999% Log probs. (BF16) | 640 | 2.39 | 8.53×10-3 | 2.37×10-2 | 99.94% Raw logits (BF16) | 2† | 1.05 | 1.73×10-2 | 4.16×10-2 | 99.83%
Gemma 2-style restricted-output recovery across four weight seeds per scale (d=32: V=128,n=80, pre-cap biases (16,24,32), post-cap bias 20, Top-1 B=20,q=28 [midpoint bound 3.73×10-8, interval width 7.45×10-8]; d=128: V=512,n=288, pre-cap biases (32,40,48), post-cap bias 60, Top-1 B=64,q=30 [midpoint bound 2.98×10-8, interval width 5.96×10-8]; both scales use 16 post-cap refinement rounds). All protocols recorded zero coverage failures and observed spectral gaps matching the configured width d=d. d | Return | Bias | ealign (min–max) | Max. etest | Queries 32 | Top-5 logp | Pre-cap | (6.17--6.45)×10-9 | 8.54×10-9 | 8,000 32 | Top-5 logp | Post-cap | 4.00×10-7--2.40×10-6 | 2.94×10-6 | 2,640 32 | Top-1 ID | Pre-cap | (8.29--8.52)×10-9 | 1.16×10-8 | 284,560 32 | Top-1 ID | Post-cap | 4.00×10-7--2.40×10-6 | 2.94×10-6 | 284,560 128 | Top-5 logp | Pre-cap | (5.43--5.51)×10-9 | 7.39×10-9 | 111,744 128 | Top-5 logp | Post-cap | (1.97--5.52)×10-5 | 6.71×10-5 | 37,152 128 | Top-1 ID | Pre-cap | (3.49--3.50)×10-9 | 4.74×10-9 | 4,415,328 128 | Top-1 ID | Post-cap | (1.97--5.52)×10-5 | 6.71×10-5 | 4,415,328
Going deeper
Unified discrete-token forward path and API interaction points across our Gemma-style prototypes. All callers supply strictly discrete token sequences x∈{1,…,V}T (never continuous internal states). Double-bordered teal boxes mark the tied uses of E; dashed amber arrows indicate optional Regime II controls (paired nested widths, multi-context temporal probing, and optional real-valued pre- versus post-cap logit_bias).
(Threshold Reduction, Three-Bias Uniqueness, and Latent-Reference Coupling). Fix a prefix x with raw logits z∈RV, capped logits u=gc(z) (c>0), and an idealized deterministic exact-arithmetic oracle with continuous per-token bias control (breaking exact ties by smaller token ID). Let r=argmaxjzj=argmaxjuj be the unique unbiased Top-1 winner. (a) Pre-cap Top-1 winning-threshold reduction: Under spre(x,b)=gc(z+b), applying scalar bias b≥0 solely to token i≠r causes token i to strictly beat token r if and only if b>bi⋆:=zr-zi (while b<bi⋆ guarantees r strictly beats i, and exact-tie selection at b=bi⋆ follows the tie-breaking rule). Hence q steps of binary search on [0,B] (with B≥zr-minjzj) localize each bi⋆ to an interval of width B/2q, yielding midpoint error at most B/2q+1 for every relative raw logit zi-zr=-bi⋆ in 1+(V-1)q logical queries per prefix, independent of c. (b) Pre-cap Top- k two-bias difference ambiguity and three-bias global injectivity: Under spre, suppose target token i and an unmodified reference token ri≠i both appear in Top- k log probabilities at bias levels b0<b1<b2 applied to i, yielding δi(bj)=ℓi(bj)-ℓri(bj)=gc(zi+bj)-gc(zri). Define the response-difference map Δj,0(z):=gc(z+bj)-gc(z+b0) (j∈{1,2}), whose observed values at z=zi are Δj,0(zi)=δi(bj)-δi(b0),j∈{1,2}. (15) Then: (i) from the single difference statistic Δ1,0(z) alone under any two biases b0<b1, Δ1,0 is symmetric about m01=-(b0+b1)/2 and every value in (0,Δ1,0(m01)) has exactly two preimages z and 2m01-z; (ii) under exact observations at any three strictly ordered biases b0<b1<b2, the map zmapsto(Δ1,0(z),Δ2,0(z)) is globally injective on R, uniquely determining the absolute raw logit zi. (c) Post-cap Top- k /Top-1 observable equivalence: Under spost(x,b)=gc(z)+b in exact arithmetic, both single-bias Top- k promotion (subtracting the known promotion bias bp from ℓi-ℓr) and the exact post-cap Top-1 winning threshold (-bi⋆, where bi⋆:=ur-ui is localized to an interval under finite q) target the identical capped relative score vector ti:=ui-ur≤0 (i=1,…,V, with tr=0). Reconstructing raw relative logits for prefix x from exact ti reduces to selecting one latent scalar reference ax:=ur in the exact open feasible interval -c-miniti<ax<c (16) via zi-zr=gc-1(ax+ti)-gc-1(ax).
Imagine a locksmith who knows the exact design of your front door but not the specific cuts on your key. They can ring the doorbell and listen to the sounds the lock makes. The question is: how much of the key's shape can they figure out just from doorbell responses?
The authors study language-model APIs the same way. The model architecture is public (the door design), but the trained weights are secret (the key). By sending text prompts and reading back the scores the model returns, they show that the output-scoring layer—the last piece that turns hidden calculations into word predictions—leaks its shape to a surprising degree. A geometric constraint inside the model (like the lock clicking at fixed angles) shrinks the remaining guesswork from an enormous space down to a rotation.
The catch: the locksmith can learn the groove pattern but not necessarily the exact depth of each cut. Deeper internal parts of the model are shielded by layers of nonlinear processing, and rounding to low precision blurs the signal. The paper maps out exactly where the listening stops working—like a lock with extra tumblers that muffle the sound.
The abstract, word for word, with the seven densest phrases unpacked.
Open-weight models increasingly power proprietary AI services whose weights remain confidential behind inference APIs. Even under strictly discrete token inputs (excluding continuous internal-state oracles)1, public architecture enables partial parameter recovery through hosted APIs. We study black-box partial parameter recovery from nine reduced-scale Gemma-style prototypes and validate head recovery on the pretrained google/gemma-3-270m checkpoint (d=640,V=262,144). Across all tested interfaces, the tied readout leaks vocabulary-head subspaces2: Final-RMSNorm shrinks effective-head ambiguity to O(d)3; Gemma 2’s pre-cap subspace remains recoverable through the soft cap, with pre-cap bias lowering error by 47--15,840× over tested post-cap estimators4; and Gemma 3 270M recovery reaches 10-14--10-75 on FP64, 8-decimal, and FP32 log probabilities despite 1,605× gain spread, while BF16 disrupts blind raw-logit width detection yet retains 99.83%--99.94% held-out energy6. Beyond the head, enhanced controls recover single-layer MatFormer channels (before multilayer masking) and d=4 recurrent decay spectra, whereas discrete probes do not recover MoE hyperplanes and unknown basis frames block blind 4-bit snapping7. Overall, these results show that black-box parameter identifiability depends jointly on the target parameter class, readout transform, and query interface.
Two lines of prior work converge here: discrete-API model stealing and neural-network identifiability theory.
Read the framework, then the head recovery, then the limits.
Skip Section 2.1–2.2 notation and prototype catalog if you know Gemma internals. Skip Appendix A complexity tables unless you need query budgets.
If the claimed risks are smaller than they look, check these places.
Four explicit caveats bound this real-checkpoint experiment: (i) while weights come directly from the official BF16 checkpoint, forward arithmetic runs in deterministic FP64 via a standalone NumPy implementation of transformers v4.55.0 (verified by internal head-loop, causal-prefix, and dot-product self-tests rather than a live PyTorch runtime cross-check), so end-to-end BF16 internal activation rounding is not modeled; (ii) uniform random token prefixes (T=8<512) excite all 640 hidden dimensions effectively and keep minp=9.72×10-36 above FP32 underflow, whereas natural-language prompts may yield sharper tails and probability underflow; (iii) the archived spectral gap of 1.84--1.97×105 reflects Gram-matrix squaring noise (sqrtεmachσ12≈10-4) rather than model residual; and (iv) because Gemma 3 omits final soft-capping, real-checkpoint validation of strongly saturated Gemma 2 soft caps remains open (Section 7.1).
Final-layer eight-channel subspace residual ealign (Eq. (10)) in nested GeGLU MatFormer prototypes (d=32,V=128,mS=32,mB=40). At L=1, global and final-layer-only switching coincide. Depth L | All layers switch (Regime II) | Final layer only (diagnostic) 1 | 2.64×10-8 2 | 0.515 | 2.50×10-8 3 | 0.546 | 5.96×10-6 6 | 0.755 | 2.83×10-8
A recurring pitfall in model-extraction risk reporting is equating one small objective or subspace residual with uniform recovery of every underlying parameter. Even strictly within discrete-token experiments, metrics on the same attack can diverge by orders of magnitude: fitting a single RecurrentGemma context reaches a per-sequence objective floor of ≈7.0×10-11 (cost=2.78×10-10 across 4 sequences) yet incurs cross-context maximum spectral errors up to 0.247--0.271 across the four-context evaluation (Proposition 4(c)); conversely, centered SVD on Gemma 1 achieves GL(d) subspace alignment below 6×10-10 while orthogonal Procrustes row-geometry error remains 0.223 until RMSNorm gauge fixing reduces it to 4.83×10-7 under unit gains (Proposition 1(b)).
Nothing on this page was recomputed. Every claim points to the paper so you can check it.
More latest news
Read all