LLM Distillation: Behavioral Similarity Does Not Prove Shared Data Provenance
This article explains why similar model outputs cannot by themselves establish shared training data, reviews the technical basis of knowledge distillation, and presents practical criteria for teacher model selection, compliance review, behavioral similarity evaluation, and an auditable distillation workflow.
1. Clarify the Premise: Similar Behavior Does Not Prove Provenance
When discussing where a model’s capabilities come from, the most common inference method is to compare outputs. If two models are close in tone, answer structure, code style, or tool-calling format, it is natural to raise suspicions. But such closeness can come from multiple causes:
- Overlap in public training data. Large amounts of public web pages, open-source code, and technical documentation are collected by multiple teams at the same time, so models learn the same writing patterns.
- Industry consensus on instruction data. Standards for a “good answer,” such as step-by-step explanations or giving the conclusion before the rationale, appear repeatedly in different teams’ data.
- Convergence driven by evaluation. Most teams optimize against the same public benchmarks, so models develop similar problem-solving habits on those tasks.
- Similar training paradigms. Similar pretraining recipes and alignment methods naturally make models show similar tendencies.
- Distillation or synthetic data. This is a real path, but it must be proven separately; output similarity alone is not enough to conclude it.
Therefore, evidence should be viewed in layers. Similar output style is the weakest evidence. If two models are also completely consistent on a large number of highly specific errors, the evidence becomes stronger. Only when specific data records and licensing documents can be traced is there effective proof of provenance. In the absence of such evidence, the reasonable conclusion is “behaviorally similar,” not “shared data provenance.”
2. Fundamentals of Knowledge Distillation
Knowledge distillation is a capability-transfer technique, usually with a stronger teacher model guiding a smaller or weaker student model. The student model learns not only the labeled correct answers but also the teacher model’s probability distribution at each position. These distributions contain the relative relationships among classes and are often called “soft label” information.
In language models, common approaches fall into two categories:
- Output-distribution-based distillation. The student model directly fits the teacher model’s vocabulary probability distribution, which requires access to the teacher model’s logits.
- Sequence-based distillation. The teacher model generates text, and the student model is trained with supervision on that text. This approach does not require internal probabilities and is more broadly applicable, but it carries less information.
Taking a classification task as an example, the loss function usually consists of two parts: one is the cross-entropy between the student output and the true label, and the other is the KL divergence between the student and the teacher’s soft labels. A temperature parameter is used to smooth the distribution. An illustrative workflow is as follows:
Input: sample x, true label y, teacher T, student S, temperature τ, weight α1. Teacher output z_t = T(x), student output z_s = S(x)2. p_t = softmax(z_t / τ), q_s = softmax(z_s / τ)3. L_kd = τ² * KL(p_t || q_s)4. L_ce = CrossEntropy(softmax(z_s), y)5. L = α * L_kd + (1 - α) * L_ce6. Backpropagate and update student parameters
The key premise here is that this kind of distillation can only be done if the teacher’s outputs are obtained. Whether those outputs can be obtained depends on access permissions, terms of service, and technical conditions. This condition determines whether distillation is feasible in engineering terms and also defines its legal boundaries.
3. Why Coding and Agent Scenarios Often Attract Attention
When discussing capability transfer, coding, multi-step reasoning, and tool calling are often mentioned for three main reasons.
First, results are verifiable. Whether code compiles and whether tests pass can be judged automatically. Training teams can generate candidate answers in batches and then filter them by execution results, keeping high-quality samples.
Second, structure is clear. Function signatures, JSON formats, and tool-calling parameters all have explicit specifications, making it easier for a student model to learn stable output formats.
Third, task chains are long. An agent needs to plan steps, call tools, read returned results, and revise its plan. Intermediate traces contain a large amount of reusable decision information.
It follows that no matter which team is doing distillation, coding and agent data are usually priority options. This reflects the characteristics of the tasks themselves, not the exclusive property of a particular source.
4. Dimensions for Choosing a Teacher Model
If a team wants to systematically evaluate teacher models, it is advisable to compare them across at least six dimensions:
- Capability fit: accuracy, stability, and long-context performance on the target task.
- Interface form: whether probability distributions can be obtained or only text outputs.
- Terms of service and licenses: whether outputs may be used to train other models and whether commercial use is allowed.
- Cost and throughput: the cost and speed of generating data in batches.
- Data privacy: whether generated content involves user information or sensitive data.
- Reproducibility: whether the model version can be fixed and whether results can be reproduced later.
Much of the controversy centers on the third dimension. Platforms have different rules on using outputs for training, and teams must read the terms item by item and rely on written authorization.
5. Compliance and Boundaries
Compliance risks in distillation are mainly concentrated in three areas:
- Terms risk. Violating terms of service may lead to account restrictions and may also lead to contract disputes.
- Intellectual property risk. The ownership of rights in model weights, training data, and generated content is not always clear and requires legal review.
- Technical circumvention risk. Bypassing access restrictions, forging identities, or abusing APIs are unacceptable practices.
Teams are advised to take the following measures:
- Prioritize open-source models with clear licenses, self-owned labeled data, and authorized datasets.
- For each batch of training data, record the source, scope of authorization, collection time, and processing method.
- Complete legal review before training and document the review conclusions in the project documentation.
- When describing model capabilities externally, use only reproducible evaluation results.
6. How to Evaluate Behavioral Similarity
To judge whether two models are similar, the following steps can be used:
- Build an evaluation set. Cover regular samples and edge samples for the target task, including questions with strict format requirements and questions that are easy to get wrong.
- Unify inference configuration. Fix temperature, maximum length, and system prompts to reduce interference from randomness.
- Calculate multidimensional metrics. Include answer agreement rate, format compliance rate, error-type distribution, and refusal patterns.
- Perform statistical tests. Test the significance of differences on the same batch of samples to avoid treating random fluctuations as patterns.
- Analyze shared errors. If two models agree on a large number of unusual errors, there may be a deeper connection, but other evidence is still needed.
Behavioral similarity is suitable for quality evaluation and risk signaling, but it cannot be used alone as a provenance conclusion.
An illustrative workflow is as follows:
function similarity_report(model_a, model_b, eval_set):results = []for item in eval_set:out_a = run(model_a, item.prompt, config)out_b = run(model_b, item.prompt, config)results.append({correct_a: check(out_a, item.answer),correct_b: check(out_b, item.answer),same_format: format_ok(out_a) == format_ok(out_b),same_error: (not correct_a) and (not correct_b)and error_type(out_a) == error_type(out_b)})return aggregate(results, with_significance_test=True)
7. An Auditable Distillation Workflow
A sound distillation workflow usually includes the following stages:
- Requirement definition. Define the target capabilities and acceptance metrics.
- Data preparation. Collect authorized data and remove duplicates, sensitive information, and low-quality samples.
- Teacher output generation. Call the teacher model within the authorized scope and record the version and parameters.
- Quality filtering. Filter samples through execution validation, rule checks, and manual spot checks.
- Training. Train the student model according to the loss function described above and save checkpoints.
- Evaluation and regression. Compare against the baseline and check for degradation in safety and format compliance.
- Audit trail. Keep data inventories, license documents, evaluation reports, and approval records.
