The Boundaries of Model Distillation: Identifying and Defending Against Unauthorized Capability Extraction

    Model distillation is widely used to transfer capabilities from large teacher models to smaller student models, reducing inference costs and enabling edge deployment. However, unauthorized large-scale extraction of model outputs to train competing models raises severe compliance and intellectual property concerns. This article explores the technical principles of distillation, outlines the boundaries between compliant practices and violations, and details typical behavioral characteristics of unauthorized capability extraction, including how to identify such activities using risk scoring.

    I. Background and Problem Definition

    Knowledge Distillation is a common method in model training. Development teams use a highly capable teacher model to generate outputs, which are then used to train a smaller or more focused student model. This approach reduces inference costs, accelerates deployment, and is often used to migrate large model capabilities to edge devices.

    Recently, model developers publicly disclosed that they monitored systematic capability extraction by multiple organizations making high-frequency API calls through numerous accounts. According to the disclosure, the call volume reached tens of millions across tens of thousands of accounts. These figures are based on single-party disclosure without independent third-party verification and should be treated as unverified claims.

    The core issue is not “whether model outputs are used,” but rather “whether the usage is authorized and complies with the Terms of Service (ToS) and applicable regulations.” The same technical method is entirely legitimate when applied to one’s own data and models; however, unauthorized large-scale scraping of another service’s outputs for training purposes raises compliance and intellectual property disputes.

    II. Technical Principles of Distillation

    Understanding distillation requires distinguishing between two levels:

    (1) Soft-label distillation: The student model learns the complete probability distribution of the teacher model’s outputs, rather than just the final answer. The probability distribution contains the relative relationships between different categories, conveying richer information. This method typically requires access to the teacher model’s logits, making it common in self-owned models or open-weight scenarios.

    (2) Sequence-level distillation: When only text outputs are available, a common practice is to use the teacher model to generate a large number of Q&A or task examples, which are then used as supervised data for Supervised Fine-Tuning (SFT). This method has a lower barrier to entry, but its effectiveness heavily depends on prompt design and sample filtering quality.

    During the preference learning phase, preference pair data is also utilized, such as determining which of two responses to a given question is better. Methods like Direct Preference Optimization (DPO) leverage this data to adjust model behavior.

    Below is a general workflow schematic for constructing SFT samples:

    1. import json
    2. def build_sft_sample(instruction: str, response: str) -> dict:
    3. return {
    4. "messages": [
    5. {"role": "user", "content": instruction},
    6. {"role": "assistant", "content": response},
    7. ]
    8. }
    9. def write_dataset(pairs, path):
    10. with open(path, "w", encoding="utf-8") as f:
    11. for inst, resp in pairs:
    12. f.write(json.dumps(build_sft_sample(inst, resp), ensure_ascii=False) + "\n")

    III. Boundaries Between Compliance and Violation

    Determining whether a distillation process is compliant can be assessed from four dimensions:

    • Data source: Whether the outputs come from a self-owned model, an authorized API, or a dataset explicitly permitted for reuse.
    • Terms of Service: Whether the caller agreed to, or was explicitly prohibited from, using the outputs to train competing models under the accepted terms.
    • Usage method: Whether rate or quota limits are bypassed in a scaled, automated manner, or whether calls are distributed across multiple accounts or proxy networks.
    • Purpose and impact: Whether the training results are used to replace the original service or to remove the original service’s safety constraints.

    A practical guiding principle is: as long as there is a lack of explicit authorization and the behavior exceeds normal usage scale and methods, it should enter a risk review process rather than being assumed as fair use by default.

    IV. Typical Behavioral Characteristics of Capability Extraction

    Normal users and batch extractors often exhibit significant differences in call logs. Common signals include:

    1. Highly repetitive prompt templates: A large number of requests are generated by replacing variables in the same template, resulting in a unique template count far lower than the total number of calls.
    2. Capability-directed sampling: Requests are concentrated on specific capabilities such as reasoning, coding, tool calling, or multi-step tasks, showing a deliberate coverage in problem distribution.
    3. Requesting reasoning processes: Requests repeatedly ask for intermediate steps or attempt to obtain complete reasoning chains using various phrasings.
    4. Decentralized networks and accounts: A large number of accounts share similar registration information, payment methods, or exit IP addresses, or utilize proxy networks to bypass geographical and frequency restrictions.
    5. Abnormal time patterns: Calls exhibit a mechanical rhythm, such as fixed intervals, continuous long-term execution, or concentration during non-working hours.

    It must be emphasized that a single signal is insufficient for a definitive conclusion. Code teaching platforms, evaluation agencies, and research teams also generate a large number of structured requests. Judgment should be based on a combination of multiple signals.

    Below is a rule-based risk scoring schematic. The thresholds are for illustrative purposes only and need to be calibrated based on historical data in actual use.

    1. from dataclasses import dataclass
    2. @dataclass
    3. class AccountStats:
    4. account_id: str
    5. total_calls: int
    6. unique_templates: int
    7. capability_ratio: float # Ratio of requests for reasoning, code, and tool calling, ranging from 0 to 1
    8. shared_network_ratio: float # Ratio of shared exit network with other accounts, ranging from 0 to 1
    9. night_call_ratio: float # Ratio of calls during non-working hours, ranging from 0 to 1
    10. def risk_score(s: AccountStats