TL;DR
When serving Large Language Models (LLMs), providers often hide most of the model's output probabilities and return only the top-$K$ token scores—a common defense meant to prevent attackers from cloning the model. This paper proves the exact mathematical blind spot created by top-$K$ censoring, showing it successfully obscures the model's exact probability distribution. However, there is a twist: mimicking a model's probabilities and stealing its actual skills are two very different things, meaning top-$K$ censoring slows down distribution cloning without stopping capability theft through text generation.
What Problem Does This Paper Address?
Imagine you’ve spent a small fortune fine-tuning a specialized LLM. When you put it behind an API or a self-hosted serving engine (like vLLM), you might expose token scores (logits or log-probabilities) for debugging or scoring prompts. If you expose the entire vocabulary's scores, an attacker can easily distill your model's brain into their own student model.
To prevent this "model extraction," interfaces routinely truncate the output, returning only the top-$K$ highest-scoring tokens (say, $K=20$) and censoring the remaining $V-K$ vocabulary words. Until now, the community lacked a hard theoretical floor for this defense: just how much ambiguity does a single top-$K$ observation leave behind, regardless of how clever the attacker is? Furthermore, if top-$K$ censoring successfully muddies the probability distribution, does that actually stop an attacker from stealing the model's downstream reasoning skills?
Methods
Instead of proposing a new attack or distillation trick, the authors borrow a lens from econometrics called partial identification.
When an interface returns raw top-$K$ scores for a single prompt position, the normalization constant (the denominator of the softmax) is unknown, and every hidden token's score is known only to be less than or equal to the $K$-th score, $\tau$. Rather than pinpointing a single teacher distribution, this observation defines an identified set—a geometric cloud of all valid probability distributions compatible with those $K$ numbers.
The authors derive:
- Exact Total-Variation (TV) Diameter ($U_K$): The exact worst-case distance between two valid teacher distributions in this cloud: one where hidden tokens have zero probability mass, and one where they hold the maximum uniform probability mass allowed by $\tau$. Remarkably, $U_K$ can be computed from a single API call using just the $K$ returned scores and the public vocabulary size $V$.
- Minimax KL Risk Bounds: Two-sided mathematical brackets ($R_{\text{bin}} \le R^*_K \le R_{\text{cap}}$) on the worst-case Kullback-Leibler (KL) divergence any attacker faces when guessing the true distribution.
- Controlled Extraction Hierarchy: Empirical head-to-head distillation experiments (using Qwen3-0.6B and Llama-3.2-1B/3B) comparing standard cross-entropy, sparse top-$K$ knowledge distillation (KD), full-logit distillation, and supervised fine-tuning (SFT) on teacher-generated text.
Datasets
The authors rely on established benchmarks rather than introducing new datasets:
- WikiText-103: Used to privately fine-tune teachers for distribution-geometry measurements, off-task distillation, and held-out KL divergence evaluations.
- GSM8K: Grade-school math word problems used to create a math-reasoning teacher and measure downstream capability recovery.
- MBPP: Python programming problems used as a secondary domain check, scored via code execution on held-out assertions.
Key Insights and Ideas
- Raw top-$K$ scores leave massive mathematical ambiguity: Because modern LLM vocabularies are huge ($V > 128,000$), hundreds of thousands of hidden tokens sitting just below the threshold $\tau$ could collectively hold a massive amount of probability mass. Even at $K=100$, over 80% of the total-variation diameter remains unresolved for raw scores.
- Distribution fidelity decouples from capability transfer: Closing the KL divergence gap between student and teacher does not mean the student learned the teacher's private skill. Conversely, a student with terrible overall KL fidelity can still pick up useful task skills if the distillation method biases it toward the teacher's #1 favorite token.
- Reasoning lives in trajectories, not single-pass prompt scores: Math reasoning requires rolling out chains of thought. Prompt-only top-$K$ distillation struggles to steal math skills—not just because of censored tails, but because static prompts don't show the student how the teacher steps through a solution. If an attacker can simply sample generated text, top-$K$ censoring won't save you.
- Temperature matters; rounding doesn't: Lowering the release temperature ($\theta$) dramatically shrinks the ambiguity $U_K$, whereas rounding log-probabilities or int8-quantizing logits barely moves the needle.
Key Results
- High Ambiguity on Real Models: On a WikiText-tuned Qwen3-0.6B ($V=151,936$), the mean TV diameter $U_K$ is 0.908 at $K=20$ (bounding minimax KL risk between 0.538 and 1.150 nats) and 0.809 at $K=100$. On Llama-3.2-1B, $U_K$ is 0.942 at $K=20$. (Under normalized log-probabilities, where hidden tail mass is known, the bound drops to 0.176 at $K=20$).
- The Capability Gap (GSM8K): Using Private Value Recovery (PVR—the percentage of the teacher's accuracy gain over the base model recovered by the student), training on GSM8K prompts yields nearly identical WikiText KL closure for both top-$K$ KD (98.4%) and full-logit KD (99.0%). Yet top-$K$ KD recovers only 11.8% PVR, while full-logit KD jumps to 56.5% PVR. Simple SFT on teacher-generated solutions bypasses logit limits entirely, recovering 96.1% PVR.
- Task-Dependence (Code vs. Math): On MBPP code generation, the gap between top-$K$ and full-logit prompt distillation disappears (46.3% vs. 44.4% PVR), while generation SFT hits 100.0% PVR.
Limitations and Future Work
- Open Finite-Regime Exactness: While the upper and lower KL bounds match asymptotically as $U_K \to 0$, they differ by a factor of 1.7x to 3.5x at realistic $U_K$ values, leaving the exact finite-$U_K$ minimax KL risk an open theoretical problem.
- Single-Position Threat Model: The theoretical bounds apply per-position in a single forward pass (typical of self-hosted vLLM setups, rather than commercial chat APIs that only return log-probs on generated tokens). Adaptive multi-query attacks, low-rank logit structures, or sequential token-by-token querying can tighten or bypass these single-position barriers.
- Same-Family Scope: All capability-transfer (PVR) experiments initialize the student from the teacher's exact base checkpoint, architecture, and tokenizer. Because logit distillation requires matching vocabularies, cross-family capability extraction remains an open question.
Summary updated