Why Closed-Source Models Can't Prevent Distillation Attacks
This article explains why keeping model weights private and tightening API access no longer stops model distillation. It compares white-box and black-box distillation, shows how on-policy distillation shifts the training loop from imitating outputs to maximizing a reward signal, and quantifies the limited benefit of hiding chain-of-thought. It also covers why smaller student models are not just scaled-down copies of their teachers, and outlines practical defenses centered on observability and governance rather than output masking.
1. The Misreading: “Closed Source Means Safe”
When people discuss protecting models from distillation, a widely repeated assumption is that as long as weights stay private and interfaces are locked down, a student model cannot acquire the core capabilities of the teacher. That assumption largely held in the era of small models. Today it is hard to defend. It fails not because the defenses lack detail, but because it rests on two outdated premises:
- Only white-box access enables real distillation.
- A student’s capability ceiling must be lower than the teacher’s, so it cannot learn the teacher’s core reasoning ability.
To see why neither premise holds anymore, it helps to first clarify the technical categories of distillation, then look at how the training paradigm has shifted in the large-model era.
2. White-Box vs. Black-Box Distillation: The Real Difference
Classically, white-box distillation means the student can read the teacher’s internal probability distributions — typically the scores assigned to candidate tokens at each position (logits or probabilities). Black-box distillation can only observe the teacher’s final text output.
Early research generally held that more information exposure leads to better student learning, so defenses naturally evolved into: don’t release weights, don’t return probabilities, and give only summaries of chain-of-thought. The implicit assumption behind this strategy is that capability can transfer through only one channel — imitating the output distribution.
The problem is that capability transfer has more than one channel.
3. The Paradigm Flip: From “Teacher Writes, Student Copies” to “Student Writes, Teacher Grades”
On-policy distillation, which has drawn considerable discussion over the past two years, reverses the order: the student generates an answer first, then the teacher evaluates and corrects that answer. The training objective shifts from fitting a distribution to maximizing a reward, which is mathematically close to reinforcement learning — the teacher’s evaluation is the reward signal.
What makes this path least friendly to defenders is how little access it requires:
- If the teacher returns a probability for every token the student generates, some degree of white-box access is still needed.
- If the teacher only returns an overall score, or points out what is good and what is not, an ordinary inference endpoint is enough to close the training loop.
Public research has already taken this approach: strong-model responses are obtained entirely through public interfaces, a separate discriminator is trained to tell “teacher-written” from “student-written” segments, and the discriminator’s output serves as the reward. The result was an open-source model on the order of ten billion parameters approaching strong-model performance on a specific dialogue benchmark. Some model vendors have also disclosed that a substantial share of the suspected distillation traffic they observe consists of requests asking the model to score answers against a fixed rubric — effectively using the model as a reward model in reinforcement learning.
The conclusion is direct: chain-of-thought can be hidden, but judgment cannot. And judgment is precisely what users consume every day, and what the product’s value consists of.
4. How Much Does Hiding Chain-of-Thought Actually Buy?
Hiding chain-of-thought is not useless, but its benefit is limited and measurable. Public experiments show that under the same training budget, training on full chain-of-thought versus training on hidden chain-of-thought yields roughly 80% versus 72% on benchmarks. In other words:
- Hiding chain-of-thought does retain information and can reduce distillation efficiency by about eight or nine percentage points.
- But with only summaries and final answers, a student can still reach above seventy percent of the effect.
For defenders, this means hiding raises the attacker’s cost without changing feasibility. Betting the entire security strategy on output masking is an investment with diminishing returns.
5. The Student Is Not a Smaller Teacher: What Capacity Constraints Change
White-box distillation requires the student to fit the teacher’s full distribution, which contains not only knowledge and reasoning paths but also large amounts of task-irrelevant noise such as wording, tone, and stylized “ways of thinking.” With limited capacity, the student cannot absorb all of it.
A 2025 study observed that models under three billion parameters train unstably on long chain-of-thought data, while shorter, more concise reasoning chains are easier to learn. Black-box scoring acts as an objective noise filter: it feeds back only the signal of what is useful, and naturally performs curriculum selection.
This explains why the black-box path is not only feasible in engineering but often more efficient.
6. What Enterprises Can Actually Do
Since output-layer protection cannot solve the problem at its root, the focus should shift to observability and governance:
- Call side: establish fine-grained quotas, rate limits, and abnormal-behavior baselines, and identify high-frequency scoring-style and discriminator-style call patterns.
- Data side: isolate high-value corpora and evaluation sets, and control the spread surface using object storage access policies and key rotation.
- Audit side: use logging services and monitoring alerts to build call profiles and form a traceable evidence chain.
- Model side: accept that capabilities will be approximated, and place competitive barriers in data loops, scenario engineering, and compliant delivery.
On Baidu AI Cloud, these capabilities can be assembled from general-purpose container platforms, object storage, logging services, and monitoring and alerting components, without relying on any proprietary interface.
7. Conclusion
Distillation cannot be prevented, not because interfaces are insufficiently closed, but because once capability is offered externally in the form of judgment, it can inevitably be sampled, scored, and fed back. The rational move is to adjust the security goal from “absolutely non-replicable” to “replication cost high enough and anomalies visible enough,” and to invest resources in what is genuinely hard to distill: private data, real-world scenario feedback, and engineering delivery capability.
