Why Defenses Against LLM Distillation Are Hard to Make Effective

    This article explains why defending served large language models against distillation is difficult. It shows how black-box distillation turns observable input-output behavior into training data, analyzes four structural reasons defenses fall short, separates general capabilities from critical assets that can be protected, outlines a layered defense framework, and proposes a measurable evaluation approach based on pre-registered attack budgets, utility loss, false blocks, and cost ratios.

    Black-box model distillation generally works like this: an attacker makes large numbers of calls to the inference service of a protected model, collects input-output behavior samples, and then trains a replacement model with similar capabilities at lower cost. This attack does not depend on model weights and does not require breaching the training cluster, which makes it a long-term risk for served models.

    Discussing why such attacks are hard to stop should not stop at whether a product adds API keys or rate limits. The discussion should return to the structural tension in served models. A model must produce useful results for legitimate users, and those useful results inherently carry capability signals.

    1. The Distillation Attack Surface: Observable Behavior Is the Training Data

    For black-box distillation, attackers do not need model files. They need query samples that cover the target distribution well enough. Answer content, formatting style, refusal boundaries, the level of detail in reasoning steps, and the conditions that trigger tool calls all become learning signals for a replacement model. Defenders can see requests and responses, but it is hard to tell whether a given request is normal business traffic, automated evaluation, academic research, or preparation for distillation.

    From an information-theoretic perspective, any output related to the protected model’s capabilities carries a signal that can be learned. Blocking the signal completely would make the model unusable. Heavily perturbing outputs would hurt accuracy, consistency, and user experience. The defense problem is therefore not whether outputs can carry zero information. It is how to raise the cost of attack, reduce its payoff, and protect critical assets while preserving product utility.

    2. Four Structural Reasons Why Defenses Fall Short

    1. The defense target is hard to define clearly. Large-scale calls from regular users, automated enterprise workflows, model evaluations, and distillation data collection overlap heavily in request patterns. If defenders simply rate-limit, they can easily harm legitimate business. If they loosen limits, they struggle to stop slow, distributed, and diverse collection. Attackers can disguise requests, split accounts, and stretch collection over longer periods, which makes intent recognition difficult.

    2. Attack and defense costs are asymmetric. An attacker only needs usable behavior samples to train a replacement model outside the service. A defender must continuously cover identity, quotas, behavior patterns, output content, and downstream use, and wrongful blocks are costly. Attackers can trial and error, while defenders must be consistent. This cost structure means single-point defenses rarely remain effective over time.

    3. Evaluation easily falls into circular reasoning. If a defense scheme looks good only on favorable samples, and those results are then used to conclude that the defense works, the evaluation commits the classic “shoot first, draw the target later” fallacy. Examples include counting only blocked requests while ignoring leaked requests and false blocks, testing only weaker model states while skipping strong ones, or reporting only failed attacks without reporting changes in attack cost. Such evaluations cannot answer the real questions: Under a fixed attack budget, how much did the replacement model’s capability improve? How much legitimate business was lost? How much did defensive operating costs increase?

    4. Defense effectiveness depends heavily on the capability state of the protected model. When a model is weak and its outputs carry limited information, distillation yields little, and it is easy to mistake this for a successful defense. When a model is very strong and its outputs are rich, distillation yields a lot, and defensive pressure spikes. At a normal capability level, defenders can usually protect only critical parts such as system prompts, private knowledge, and tool permissions. They cannot prevent general capabilities from being approximated. Treating low payoff caused by weak capability as defense success is one of the most common biases in evaluation.

    3. What Can and Cannot Be Defended: Separate General Capabilities From Critical Assets

    Fully preventing general capabilities from being approximated is not realistic, but critical assets can be protected deliberately. Two categories of targets should be distinguished. The first is general capabilities such as Q&A, writing, and coding. Blocking these completely would sacrifice product usability. The second includes system prompts, private data, business rules, tool-calling permissions, safety policies, and unpublished knowledge. These should be controlled through minimal exposure, permission isolation, sensitive information filtering, tool-call authorization, audit alerts, and watermark-based tracing.

    Watermarks and fingerprints improve traceability, but they should not be assumed to be impossible to remove. License agreements and compliance terms create constraints, but they cannot replace technical protection. A reasonable goal is to significantly raise the cost for an attacker to obtain equivalent capabilities, and to ensure that leaks of critical assets can be detected, traced, and handled.

    4. A Layered Engineering Defense Framework

    In practice, a layered strategy works better than relying on a single switch:

    • Identity and quota layer: Account tiers, rate limits, alerts for abnormal quota usage, and approval for high-risk capabilities reduce the efficiency of large-scale collection.
    • Behavior detection layer: Monitor signals such as prompt diversity, repeated patterns, long-tail coverage, and short-term coordination across multiple accounts. Combine these with logs and monitoring alerts to form an operational loop.
    • Output protection layer: Apply sensitive information filtering, necessary format constraints, watermarks and fingerprints, and audits of abnormal outputs. Assess every measure for its impact on legitimate tasks.
    • Capability tiering layer: Open high-value capabilities on demand. Apply least-privilege access and secondary authorization to tool calls and private data access.
    • Audit and response layer: Keep necessary logs and establish processes for bans, appeals, false-block review, and tracing. From an engineering standpoint, cloud product categories such as general log services, monitoring and alerting, container platforms, and object storage can host audit and evaluation pipelines. Specific strategies should still be determined by business risk. Baidu AI Cloud offers services in these categories, and the relevant API documentation describes their details.

    5. Measurable Evaluation: Avoiding “Shooting First, Drawing the Target Later”

    An evaluation framework should pre-register the attack budget, query distribution, test sets, and metrics. It should report failed samples and confidence intervals rather than selecting favorable results after the fact. The following pseudocode illustrates this approach:

    1. # Definition: teacher model T, defense strategy F, attack budget B, query distribution D
    2. # Collection: S = query(T, F, D, B)
    3. # Training: A = train_alternative(S)
    4. # Metrics:
    5. # utility_loss = perf(T) - perf(F)
    6. # attack_gain = perf(A) - perf(base)
    7. # false_block = share of legitimate requests that get blocked
    8. # cost_ratio = defense operating cost / attack collection cost
    9. # Reporting: break down results by capability dimension, sample range, and attack-budget curve

    Only by observing the replacement model’s gain, legitimate business loss, false-block rate, and defense cost together can one judge whether a defense is truly effective. Otherwise, any single metric can be interpreted selectively.

    Conclusion

    Defenses against LLM distillation are hard to make effective because served models must produce useful information, and useful information is a learnable signal. Evaluation of defenses is also easily distorted by capability states, sample selection, and after-the-fact interpretation. In engineering practice, the goal should not be to block distillation completely. Teams should adopt layered defenses, protect critical assets, evaluate cost and benefit, and keep operations traceable. Framing the goal as raising attack costs, protecting critical assets, preserving product utility, and keeping evaluations reproducible is a more practical answer.