WorksComputer Science
Antidistillation is Cheap: Lightweight Distillation-Resistance via Stylistic Corruption
Abstract
Knowledge distillation (KD) is a highly effective paradigm for transferring capabilities from large language models (LLMs) to smaller, more specialized student models. In commercial deployment where frontier models are restricted behind black-box APIs, sequence-level distillation remains a potent vector for competitors to clone proprietary capabilities at a fraction of the development cost. Existing defenses mostly rely on surrogate models to manipulate next-token sampling, which increases computational overhead and real-time inference latency. In this work, we propose a lightweight defense that dynamically injects style-steering vectors into the teacher model's activations upon malicious queries. This framework offers exceptional flexibility, allowing hosts to customize target defensive styles and dynamically blend them to maximize stylistic variance. Crucially, this inference-time intervention preserves semantic utility and fluency during malicious queries, misleading adversaries into believing that they are extracting pristine teacher outputs, while standard consumers continue to receive original, unmodified responses. Our experiments demonstrate that this framework successfully disrupts student learning, achieving substantial anti-distillation performance while incurring negligible overhead and preserving text naturalness. Our code is available at https://anonymous.4open.science/r/distill-resist-38C6/.
Introduction
Advancements in large language models (LLMs) have enabled unprecedented capabilities in complex reasoning, mathematics, and software engineering, powering a wide range of applications. Since developing such frontier models requires immense computational resources, knowledge distillation (KD) emerged as a powerful technique for imitating the behavior of large teacher models Hinton et al., [11]. In practical deployment, even when most LLMs are restricted to black-box API access, text-level distillation remains highly effective Kim and Rush, [13]; Xu et al. (2024b). Nevertheless, this efficacy leads to a significant vulnerability: competitors can exploit model outputs to cheaply replicate proprietary capabilities at a fraction of the time and cost required to train such models from scratch Anthropic, [1].
Existing defenses can be categorized into detection and prevention mechanisms. Detection-based defenses such as watermarks Kirchenbauer et al., [14] and fingerprints Xu et al., 2024a, 2026 provide post-hoc verification without actively preventing distillation. Among recent black-box prevention defenses, state-of-the-art techniques are antidistillation sampling (ADS) Savani et al., [21] and DOGe Li et al., [16]. Both methods attempt to produce reasoning traces that maximize student’s loss while maintaining teacher model’s utility and the readability of the output. They achieve this by leveraging a proxy model for gradient computation with the assumption that the effects generalize to different student models. However, both techniques exhibit some limitations. ADS introduces substantial computational overhead and requires additional memory to store a proxy model, which might be prohibitive for high-throughput inference. DOGe, on the other hand, eliminates this overhead but results in performance degradation of the model due to fine-tuning. Furthermore, because these techniques perturb next-token predictions by maximizing student loss, the output traces sometimes exhibit unnatural artifacts including nonsensical tokens or translated words (in the case of DOGe), as observed during our reproduction of these works.
To address these limitations, an effective defense must satisfy three primary desiderata: (i) Benign Utility, where the defense preserves the teacher model’s performance for legitimate queries; (ii) Computational Efficiency, incurring negligible overhead during inference; and (iii) Conversational Naturalness, which restricts defensive perturbations to natural, human-like thinking processes and avoids generating nonsensical linguistic artifacts. In the context of sequence-level KD via supervised fine-tuning (SFT), it is more challenging to balance the trade-off between (i) and (iii) compared to logit-level approaches because the student model relies solely on the teacher’s generated text. In logit-level KD, a successful defense can manipulate unnormalized token logits to corrupt the “dark knowledge” (e.g., the conditional mutual information between inputs and logits), without compromising the linguistic fluency of the teacher’s output [7]. Conversely, for sequence-level KD, any defense must perturb the final discrete output text to disrupt distillation, inherently risking the degradation of conversational naturalness. Beyond static persona injection, our framework additionally introduces non-deterministic style switching across requests — even for identical prompts — so that an adversary attempting to characterize or reverse-engineer the defense by repeated probing observes no stable, learnable signature. Importantly, our method operates entirely at inference time. To satisfy desideratum (iii), this defense completely avoids the optimization overhead of proxy models [21, 16] as well as the latency bottlenecks of post-hoc trace rewriting [18]. Instead, we enforce real-time style switching by dynamically injecting steering vectors into the teacher model’s hidden layers on a per-query basis, which are generated using contrastive activation addition (CAA) [20].
Figure 1. Overview of our lightweight distillation-resistant defense framework. For benign queries, the teacher model generates standard responses. Upon detecting malicious queries, the framework dynamically switches the output style by injecting pre-computed style-steering vectors into the hidden activations at inference time, disrupting student model distillation while maintaining semantic coherence.
Lippmann and Yang [17] demonstrated that the reasoning improvements in distilled language models are significantly driven by stylistic replication. Even though it is surface-level imitation, it is sufficient to drastically improve model reasoning capabilities. This suggests a complementary attack surface: if a teacher’s stylistic signal can be corrupted at the source, the student’s reasoning gains from imitating that signal should degrade as well, independent of whether the surface content is more traditionally perturbed. Motivated by this insight, we investigate injecting corruptive stylistic personas into the teacher’s reasoning traces as a defense against illegitimate distillation.
In summary, our contributions are as follows:
We conceptualize a selective deployment paradigm for distillation resistance that triggers exclusively when a user is deemed illegitimate. Within this framework, we formalize and empirically validate the defense when activated.
We introduce a novel approach to distillation-resistant defense that exploits stylistic variance instead of optimization-based perturbations. Specifically, we adapt CAA [20] to open-ended generations through a sequence-wide activation aggregation method and an adaptive per-token scaling scheme, enabling real-time defense with near-zero computational overhead. As highlighted in Table 1, our approach bypasses the high
| Property | ADS | DOGe | Ours |
| Needs proxy model | Yes ✗ | Yes ✗ | No ✓ |
| Weights modification | No ✓ | Yes ✗ | No ✓ |
| Inference overhead | High ✗ | Low ✓ | Low ✓ |
| Flexible on-the-fly adjustment | Yes ✓ | No (retrain) ✗ | Yes ✓ |
| Easy serving w/ vLLM | No ✗ | Yes ✓ | Yes ✓ |
Table 1. Comparison of key defensive properties between ADS [21], DOGe [16], and our style steering framework.
inference latency of sampling-based defenses like ADS [21] while retaining full on-the-fly flexibility, unlike weight-modification defenses such as DOGe [16].
We provide a comprehensive analysis of the fine-grained control knobs for governing style steering. Specifically, we analyze the impacts of layer-wise injection strength and the number of steered tokens, offering insights for balancing defense efficacy against benign utility.
Related Work
Knowledge Distillation. Knowledge distillation (KD) is a technique that aims to transfer the knowledge of a large pre-trained teacher model to a smaller student model [11] (Xu et al. 2024b). In the context of LLMs, KD frameworks are commonly categorized into two paradigms based on the supervisory signal: logit-level (white-box) and sequence-level distillation (black-box). Logit-level KD trains the student model to mimic the teacher’s soft output distributions by minimizing the divergence between their respective probability landscapes [11, 8] (Wang et al. 2025). On the other hand, in sequence-level KD, the student model learns directly from the final generated texts as hard targets, typically optimized via maximum likelihood estimation [13]. For proprietary or black-box LLMs where logits are inaccessible, sequence-level KD via SFT is a common and effective method to enhance student model capabilities.
Distillation-Resistant Defenses. A growing body of work aims to protect the intellectual property (IP) of LLMs, broadly falling into detection and prevention mechanisms. Earlier detection defenses include watermarking and fingerprinting. Watermarks are verifiable signatures embedded into a model’s outputs or weights, allowing the owner to verify their ownership of the model [14] (Dathathri et al. 2024). Similarly, fingerprinting assigns a unique identifier to specific model instances to trace unauthorized leaks or misuse (Xu et al., 2024a). While useful for post-hoc auditing, these methods do not actively prevent IP tampering, including distillation. To address this, recent defenses directly alter the teacher model’s outputs to disrupt extraction.
In black-box settings where only the final texts are accessible, defensive frameworks perturb the generated tokens directly. For instance, anti-distillation sampling [21] and DOGe [16] optimize an adversarial loss using a surrogate model to approximate the defensive text distribution. Other techniques focus on post-hoc trace rewriting, employing a small auxiliary model to rewrite the teacher’s output traces [18, 6]. In terms of white-box scenarios, Fang et al. [7] proposed utilizing a learnable transformation matrix to minimize the conditional mutual information between the inputs and teacher logits.
Style Replication in KD. Recent studies have shed light on the mechanisms for black-box distillation, demonstrating that the performance gains in smaller distilled models are heavily driven by stylistic replication rather than complex reasoning internalization [17]. More importantly, this work demonstrates that even surface-level imitation of a teacher’s output style (e.g., lexical patterns and structural formatting) significantly affects distilled model capabilities. Specifically, the authors curated a synthetic dataset with consistent and systematic framing for each response, demonstrating that distilling a model on this stylistically uniform dataset enhances its performance even more than distilling on the original dataset containing complex reasoning from a stronger model.
LLM Behavior Steering. Beyond prompting, recent studies have explored manipulating model behavior by directly intervening in the internal activations of LLMs. Activation Addition (Act-Add) (Turner et al., 2023) is an inference-time approach that generates steering vectors by taking the difference between the intermediate activations of a model layer across a contrastive prompt pair. These vectors are then added to the model’s hidden states to steer its behavior at test time. Subsequent work has expanded upon this insight, including representation engineering (Zou et al., 2023) and Contrastive Activation Addition (CAA) [20]. Notably, because these steering methods operate during inference without model fine-tuning or trace rewriting, they provide an exceptionally lightweight and real-time mechanism, which is well suited to our defense objectives.
Methodology
In this section, we present our inference-time, lightweight defense framework against black-box KD. We first formally define the problem setting and threat model (§ 3.1), then detail our technical approach for dynamic style steering for pernicious queries (§ 3.2).
Problem Setting and Threat Model
Consider a practical black-box LLM deployment where a proprietary teacher model is accessible via a public API. Upon submitting an input prompt , a user receives the output text from the API but has zero visibility into the model’s weights, output logits, or intermediate hidden states.
Targeted Defense Activation. We assume that under normal usage, a benign user querying with a prompt receives the standard response . However, for a malicious user, given
the exact same prompt , they obtain a stylistically steered variant of the response , where is the steering function and denotes the random seed generated based on the adversary’s metadata such as user ID, request ID, timestamp, etc. Malicious extraction can be identified through query behaviors such as an abnormally large number of queries in a short time, or through the query distribution [12]. The model owner can deploy their own classifier to detect maliciousness [1]. The design and accuracy of this detection mechanism are orthogonal to our contribution and fall outside the scope of this work; we assume access to a black-box detector IsMalicious() (Algorithm 1) that, given a query and its associated request metadata, flags the requesting user as malicious or benign, and focus entirely on characterizing the behavior and efficacy of the defensive intervention once a user has been so flagged. This targeted operational framework provides the model host with flexibility to adaptively deploy defenses without degrading the service utility for benign consumers, while simultaneously misleading adversaries into believing they are harvesting pristine outputs from . Crucially, rather than issuing blunt refusals, rate limits, or account bans — which immediately tip off the adversary and can be cheaply circumvented via identity churning (e.g., rotating API keys or residential proxies) — our framework continues serving responses as a covert trap. This maximizes the adversary’s economic sunk costs by forcing them to expend financial resources harvesting corrupted data that they only realize is un-distillable post-hoc during student model training.
Style Steering
Intuitive methods for inducing stylistic behavior into LLM outputs include direct context prompting, or auxiliary LLM rewriting [18]. However, these approaches suffer from clear limitations. In real-world deployments, system prompts are heavily loaded with safety guardrails, task specifications, and formatting constraints; appending additional stylistic instructions risks instruction clashing, compromising the model’s ability to balance task execution with style compliance. Meanwhile, relying on an auxiliary rewriter incurs substantial inference latency and computational overhead.
Our approach extends the CAA method [20], wherein steering vectors are injected into a model’s residual streams during inference to shift its output distribution towards specific behaviors. The core mechanism involves adding or subtracting the steering vectors within the model’s residual streams to control model behavior without parameter fine-tuning. Conceptually, a vector is computed by taking the difference in the model’s activations across a pair , where represents a shared prompt, and are the base and target responses, respectively. To ensure robust behavior control, the final vector is computed by averaging these activation differences across a curated dataset of contrastive pairs.
Fundamentally, our approach departs from the original CAA method in how activations are aggregated: rather than extracting the activations of a single token from a multiple-choice dataset, we compute the mean activation across the entire open-ended output sequences. The final steering vector at layer is defined as the difference between the mean token activations of the target and base responses:
where represents the mean token activation at layer for prompt ’s target () or base () response sequence of length , and is the total number of contrastive prompt-response pairs.
The norm for each style vector can vary significantly depending on the target style, and the layer and token positions where the vector is added. Furthermore, Heimersheim and Turner [9] demonstrated that the norm of each residual stream in a language model grows exponentially throughout the forward pass. Hence, to achieve stable behavioral control over long sequences, we first normalize each vector to unit norm:
Then, we apply an adaptive per-token scaling during inference-time injection to obtain the steered activation at token position :
where represents the original residual stream activation, and is the steering coefficient controlling the intensity of the style steering. This adaptive scaling formulation offers several advantages. By conditioning the injection magnitude on , the scheme prevents the steering effect from diminishing as the residual stream norm grows across tokens. Furthermore, scaling proportionally to the activation norm helps to preserve the semantic information of the original response even when the baseline activation norm spikes or drops sharply.
Sourcing Contrastive Stylized Datasets
The primary phase in constructing steering vectors is to collect contrastive pairs where each pair consists of a baseline response and a styled response conditioned on the same underlying prompt . To build the steering dataset , we first curate base pairs , where is the vanilla response generated by the teacher model given prompt . To obtain the corresponding styled response , we query the model with a style-inducing prompt such that the resulting output exhibits the target style. Note that the style prompt is used solely to trigger the target behavior of the model and is not included in the contrastive pairs . An example of the prompt construction is detailed in Table 2.
System prompt (base): Answer the commonsense question by reasoning step by step. Output the correct letter like \boxed{letter}. |
System prompt (style-enforce): Respond in a scratchpad style. Think aloud step by step in informal prose using natural connectives like ‘so’, ‘that means’, ‘I need to’, ‘which gives’, etc. Keep momentum strictly forward — never backtrack, re-read, or retract a completed step. Output your final answer like \boxed{answer}. |
| User prompt (question): What home entertainment equipment requires cable? Options: A. radio shack B. substation C. cabinet D. television E. desk |
Table 2. An example of a contrastive prompt construction for style steering, consisting of a base system prompt (highlighted in blue), a style-enforcing system prompt (highlighted in orange), and a user query.
To maximize the anti-distillation effect, the selected target styles are designed to exhibit both structural alterations and dense linguistic modifications, thereby disrupting the student’s optimization. We utilize four distinct stylistic personas for our framework:
Scratchpad: Encourages the model to emit explicit, stream-of-consciousness intermediate reasoning steps.
Distractor: Triggers a deliberate digression by introducing an irrelevant problem context before backtracking to the current context.
Dead-end: Forces the model to initially pursue an incorrect logical path before backtracking and correcting its thinking trajectory towards the correct solution.
Jargon: Guides the output text towards highly dense, formal, and technical terminology, altering the surface-level token distribution while preserving underlying semantics.
More details about creating steering vectors are discussed in § 4.
Algorithm 1 Dynamic Style-Switching Inference
1: Input: User prompt $p$, runtime metadata $m$
2: Given: Pre-computed vectors $\mathcal{V} = \{v_k\}_{k=1}^{M}$, model $\mathcal{T}$, key $K$, parameters $(\alpha, l)$, detector IsMalicious$(\cdot)$
3: Output: Response $r$
4: function PROTECTINFERENCE$(p, m)$
5: if not IsMalicious$(p, m)$ then
6: $r \leftarrow \mathcal{T}(p)$
7: return $r$ ▷ Standard response for benign queries
8: end if
9: $s \leftarrow \operatorname{HMAC}(K, m)$ ▷ Derive unforgeable, keyed session seed
10: $k \leftarrow \operatorname{PRNG}(s) \in \{1, \ldots, M\}$ ▷ Map seed to style index space
11: $r \leftarrow \operatorname{GenerateWithSteering}(\mathcal{T}, p, v_k, l, \alpha)$
12: return $r$
13: end function
Dynamic Style Switching
To break the determinism of KD and prevent adversarial reverse-engineering of the defense, we employ a dynamic style-switching strategy. This mechanism randomly routes each incoming query to different target style vectors on a per-request basis. In a practical deployment scenario, runtime metadata — such as user ID, incoming IP address, session ID, request timestamp — can be cryptographically hashed to derive a unique, deterministic seed for each request. This ensures that a malicious actor attempting to scrape across identical queries receives wildly diverging stylistic responses, effectively corrupting the data consistency required for successful distillation. The comprehensive procedure of our proposed dynamic style-switching defense is detailed in Algorithm 1.
Experiments
In this section, we present comprehensive empirical evaluations of our dynamic framework to assess its performance across three critical dimensions: defense efficacy, model utility and system overhead.
Experimental Setup
Models. To simulate a practical deployment scenario where the model owner does not rely on auxiliary rewriter or proxy models to support the defense, we utilize google/gemma-3-12b-it as our teacher model due to its strong reasoning performance and exceptional instruction following, particularly when handling complex system prompts. While it does not natively emit reasoning blocks, targeted system prompting allows it to generate rich output with step-by-step reasoning, which is highly beneficial for distillation. Crucially, gemma-3-12b-it excels at producing styled responses under explicit structural guidance, facilitating our steering experiments. We employ Qwen2.5-3B, Phi-4-mini-instruct, Llama-3.1-8B, and Qwen3-8B as student models.
Datasets. We evaluate our method across four widely adopted benchmarks spanning two operational paradigms: open-ended reasoning and multiple-choice evaluation. For our primary analysis in the main text, we focus on open-ended mathematical generation using GSM8K ([3]) and MATH500 ([10]) (distilled from responses on the MATH training set). Because sequence-level distillation relies heavily on step-by-step reasoning trajectories, open-ended generation represents the most vital real-world threat model for API distillation. For completeness, we also evaluate on multiple-choice reasoning datasets—the AI2 Reasoning Challenge (ARC) ([2]) and CommonsenseQA (CSQA) ((Talmor et al., 2019))—with detailed results reported in Appendix § 8.
Evaluation Metrics. Model performance is measured via zero-shot accuracy, where the final answer from the model is extracted and validated against the ground truth. Following the evaluation protocol from ([21]), we instruct the model to wrap its final solution inside \boxed{answer}. To minimize formatting variance and ensure reliable parsing, we also follow their answer-forcing convention by explicitly prompting the model to append **Final Answer**: \boxed{answer} at the end of its response. For MATH500, we restrict evaluation to subsets containing scalar ground-truth answers to enable straightforward parsing.
Styled Datasets Sourcing. To generate steering vectors for our four target styles (Scratchpad, Dead-end, Distractor and Jargon), we first sample 100 problems from each of the GSM8K and ARC datasets to ensure broad domain coverage, resulting in 200 samples per style. The teacher model is initially prompted to generate vanilla responses for these 200 problems, which serve as the baseline (Base) outputs. Next, on the same problems, we prompt the model to generate outputs conforming to each of the four target styles. The exact system prompts we use to elicit baseline and styled responses are provided in Appendix § 13.
For each stylistic persona, we construct 200 contrastive pairs by pairing the Base and Style responses conditioned on identical Base prompts. Since gemma-3-12b-it consists of 48 transformer layers, this yields a set of 48 layer-wise steering vectors per style.
Steering Configuration. We extract steering vectors across all 48 layers of gemma-3-12b-it and perform a coarse layer sweep at 5-layer intervals within . Output inspection reveals that intermediate layers (10–30) exhibit the highest responsiveness. To prevent behavioral overlap, we select persona-specific layers that minimize interstyle cosine similarity; for instance, vectors for Dead-end and Distractor at layers are highly collinear, causing distinct personas to collapse into identical outputs. Beyond tuning injection strength, we regulate behavioral distortion via two parameters: a maximum injection token threshold (essential for prolonged digressions before backtracking) and prefill injection, which induces stronger style shifts than decoding-stage steering alone. Complete layer configurations and prefill dynamics are detailed in Appendix § 11.
Style Distribution
To construct the steered training dataset, we uniformly distribute four target styles Scratchpad, Dead-end, Distractor and Jargon across the samples. In practical settings, the model host can strategically adjust the distribution of these styles to optimize their goal. Specifically, to achieve stronger defensive effects, they can increase the probability of highly disruptive or confusing personas. Conversely, if the goal is to retain utility, the host can skew the distribution toward more semantically accurate styles.
Experimental Results
Figure 2 illustrates our empirical results on mathematical reasoning benchmarks GSM8K and MATH500. The results show that style switching can consistently decrease the student accuracy across all tasks while minimally affecting the teacher model’s utility. For GSM8K, models Qwen2.5-3B, Phi-4-mini and Llama3.1-8B experience more significant accuracy drop ranging from 9% to more than 11%. The same trend is also observed in MATH500, where Qwen2.5-3B, Phi-4-mini get drop and Llama3.1-8B gets 5.71% drop, which is significant considering its low base accuracy on this benchmark. A strong student like Qwen3-8B experiences less degradation, at roughly 6% - 7%.
Figure 2. Evaluation results on GSM8K and MATH500 showing base performance and percentage decrement under style steering (Teacher) or sequence-level distillation (Student models).
Style Isolation. Figure 3 breaks down the performance degradation under individual single-style steering personas. It can be observed that the anti-distillation effect varies across different styles and tasks. For instance, on GSM8K, Distractor is the most disruptive style which degrades the accuracy to up to 32% for Qwen2.5-3B. However, interestingly, within this style setting, the teacher model achieves the highest accuracy on this dataset. For MATH500, Dead-end does the most harm to KD. It is also intriguing that Llama3.1-8B does not follow the same trends as the others, for example, Scratchpad does more harm to it than Dead-end does on GSM8K and Scratchpad is also the most damaging style on MATH500, which are opposite to the other students. This suggests that the anti-distillation effect varies across tasks and model types. In real-world deployment, a defender can adjust the style distribution of the responses to control the level of effectiveness.
Figure 3. Single-style steered accuracy (%) across GSM8K and MATH500 benchmarks under individual activation steering personas (Scratchpad, Dead-end, Distractor, and Jargon).
Conclusion
In this paper, we introduce a novel, activation-steered defense framework for sequence-level KD by dynamically injecting non-deterministic stylistic perturbations into model responses. Our framework selectively perturbs model responses for malicious queries while preserving pristine output quality for benign public use. We show that our framework is exceptionally efficient yet sufficiently effective at degrading student performance across three independent model families.
Furthermore, we explore novel structural control knobs - injection token threshold and prefill injection - offering broader insights into how a model host can precisely calibrate the trade-off between defensive stylistic distortion and baseline task accuracy. While our framework proves robust across diverse reasoning tasks, evaluating the effects of style steering against more complex domains remains an important direction for future work. Additionally, exploring the dynamics of weighted style vector blending and multi-style mutations within a single response presents a promising avenue for maximizing defensive entropy.
Limitations
While our proposed method demonstrates efficacy as an anti-distillation defense, we acknowledge several limitations that bound the scope of this work.
First, our framework assumes access to a reliable upstream classifier for identifying malicious queries (§ 3.1), and we do not evaluate the design or accuracy of such a detector. In practice, false negatives allow adversaries to receive unprotected, pristine outputs, while false positives risk degrading utility for benign users by triggering unnecessary style steering. Characterizing this detection-defense trade-off, and evaluating our framework’s robustness under a realistic, imperfect classifier, is an important direction for future work.
Second, while we introduce structural control knobs for adjusting style injection, our evaluation does not encompass an exhaustive search over a wide range of knob combinations. Furthermore, a comprehensive study into the scaling dynamics of weighted style vector blending, alongside the latent risk of representation collapse among distinct stylistic personas, remains an important research trajectory.
Third, our defense exhibits limited robustness against a capable adaptive attacker. As shown in Appendix § 10, a strong LLM normalizer like Qwen2.5-14B-Instruct can restructure the stylistic perturbation of model responses to make it easier for KD. This suggests that while our defense is effective against direct distillation and lightweight sanitization such as surface-level paraphrasing, an adversary willing to incur the additional cost of a capable rewriting model can substantially undermine its protection. Strengthening the defense against such normalization attacks — for instance, by more tightly coupling stylistic corruption to task-relevant content such that it cannot be cleanly separated during rewriting — is an important direction for future work.
Acknowledgments
Evaluation Results on ARC and CSQA
Figure 4 shows the evaluation results on the ARC and CSQA benchmarks. The anti-distillation effect is much more subtle than that observed in open-ended reasoning benchmarks (GSM8K, MATH500). This might be attributed to the fact that multiple-choice question (MCQ) tasks feed the models with choices, therefore, it is easier for the models to derive the correct answers.

Figure 4. Evaluation results on ARC and CSQA datasets showing base performance and percentage decrement under style steering (Teacher) or sequence-level distillation (Student models).
Comparison with Previous Work
We compare our style steering approach with the state-of-the-art anti-distillation frameworks ADS (Savani et al., [21]) and DOGe (Li et al., [16]) in terms of anti-distillation effectiveness, development time, and inference latency overhead. We adapt both frameworks to use gemma-3-12b-it as the teacher model, similar to our style steering setup. For ADS, we use Qwen2.5-1.5B-Instruct as the proxy model and select , , values we identified via a hyperparameter search as yielding the best trade-off for our setup. For DOGe, we employ gemma-3-1b-it as the proxy model, since this framework requires the teacher and proxy models to share the same tokenizer. We use a learning rate of , training temperature and a KD coefficient , which yields optimal results while minimizing degenerated responses according to our test. We apply quality filtering prior to fine-tuning to eliminate any responses containing infinite loops or lacking final answers. We do the experiments with two student models Phi-4-mini-Instruct and Qwen3-8B, the most capable models in the 4B and 8B parameter classes.
Figure 5 compares the anti-distillation performance between our work and the two recent frameworks ADS (Savani et al., [21]), DOGe (Li et al., [16]). With filter applied pre-training, our proposed method achieves comparable anti-distillation effects to ADS and DOGe within much less development time and inference overhead.

Figure 5. Accuracy (%) comparison on GSM8K between Base, ADS ([21]), DOGe ([16]), and our Style Switching defense across Teacher, Phi-4-mini, and Qwen3-8B student models.
Table 3 compares output quality metrics and artifact occurrences between ADS, DOGe, and our framework. Even though we use conservative hyperparameters for both ADS and DOGe, the model responses of these methods frequently contain repetition loops or unusual tokens. For style steering, most of the repetition loops are produced by Dead-end, Distractor and Jargon, however, the frequency of these is negligible and can be easily filtered out.
| Quality Metric | ADS | DOGe | Ours |
| Repetition loops (n-gram repeats) | 10.40% | 4.46% | 0.5% |
| Weird / multilingual tokens | 0.19% | 0.74% | 0.04% |
| Missing final answer | 19.48% | 4.91% | 1.03% |
Table 3. Comparison of output artifact occurrences and failure modes between ADS (Savani et al., [21]), DOGe (Li et al., [16]), and our style steering framework (lower is better).
Adaptive Attacks
To evaluate defense robustness against an adaptive adversary attempting to sanitize intercepted traces prior to student distillation, we evaluate two complementary attack paradigms:
Surface-Level Paraphrasing. We evaluate a legacy paraphrase attack using DIPPER (Krishna et al., [15]), a model built on T5 (Raffel et al., [19]). While prior anti-distillation works evaluate sentence-level augmentors such as Parrot (Damodaran, [4]) (e.g., Ma et al. [18]), DIPPER provides stronger paragraph-level lexical substitution and sentence reordering over longer context windows. As shown in Figure 6, surface-level paraphrasing with DIPPER fails to strip the structural and stylistic perturbations introduced by our defense, leaving student model distillation performance degraded.

Figure 6. Student model accuracy (%) on GSM8K under base KD, mixed-style defensive steering (perturbed), and post-hoc DIPPER paraphrased traces.
Strong LLM-Based Normalization. Because localized paraphrasers cannot reliably strip higher-level structural anomalies, we simulate a modern adaptive adversary using Qwen2.5-14B-Instruct. Assuming that an adversary does not know about the styles of the responses, we create a generic instruction for the LLM to rewrite the perturbed traces, given below:

Figure 7. LLM Normalization Instruction
LLM Normalization Instruction
You are rewriting a step-by-step reasoning trace that leads to an answer:
Rewrite the trace so that:
1. Every fact, calculation, and the final answer are preserved exactly as given — do not change, add, omit, or recompute any factual claim, number, or conclusion.
2. Remove any sentences or phrases that are irrelevant to reaching the answer (asides, tangents, unrelated commentary).
3. Normalize the tone and phrasing to be plain, direct, and consistent throughout — as if written by a single careful tutor.
4. Preserve the original step order and logical structure; do not reorganize, merge, or split steps. Return only the rewritten trace, with no explanation of your changes.
Figure 7 shows that a strong LLM normalizer can rewrite the perturbed model responses to make them easily distillable. Intriguingly, after normalization, destructive styles such as Distractor, Dead-end or Jargon become more learnable for the students model. With further inspection, we observed that due to the excessive length of these styles, a strong LLM rewriter might alter the chain of thought while retaining the richness of information, which can facilitate the distillation process. For Scratchpad, since most of the responses are often more concise and cleaner, they do not contain as many details as the others. Figure 8 illustrates representative normalized output traces produced by the LLM normalizer when rewriting responses generated under distinct defensive styles.

Figure 8. (a) Scratchpad persona trace after normalization. First, calculate the cost of the entrees: 4 entrees at $20 each is 4 * $20 = $80. Next, add the cost of the appetizer to the entrees: $10 + $80 = $90. Then, calculate the tip: 20% of $90 is 0.20 * $90 = $18. Finally, add the tip to the original cost of the food: $90 + $18 = $108. So the total amount of money they spend at the restaurant is $108. $108. (b) Dead-end persona trace after normalization. * Cost of entrees: 4 entrees * $20/entree = $80. * Cost of appetizer: $10. * Subtotal: $80 + $10 = $90. * Tip: 20% of $90 = 0.20 * $90 = $18. * Total cost: $90 + $18 = $108 $108. (c) Distractor persona trace after normalization. 1. Calculate the cost of the entrees: * Cost per entree: $20 * Number of entrees: 4 * Total cost of entrees: $20 * 4 = $80. 2. Calculate the subtotal (cost of appetizer + cost of entrees): * Cost of appetizer: $10 * Total cost of entrees: $80 * Subtotal: $10 + $80 = $90. 3. Calculate the tip amount: * Subtotal: $90 * Tip percentage: 20% = 0.20 * Tip amount: $90 * 0.20 = $18. 4. Calculate the total amount spent: * Subtotal: $90 * Tip amount: $18 * Total amount: $90 + $18 = $108. $108. (d) Jargon persona trace after normalization. Let denote the cost of the appetizer, the per-unit cost of entrees, and the number of entrees. The total cost is given by: . Given , , and , we calculate: . The tip is 20. . The total amount of money spent is: . Thus, the total amount of money they spend at the restaurant is 108. Final Answer: The final answer is 108. Qualitative examples of responses generated under distinct style steering personas after being rewritten by the Qwen2.5-14B-Instruct adaptive normalizer. In all cases, the normalizer strips stylistic artifacts while producing clear, standardized reasoning paths.
Hyperparameters & Other Settings
Steering Hyperparameters. We detail the hyperparameters used in our experiments for student model fine-tuning, inference, and style injection in Table 4.
Dynamic Style Switching. To ensure reproducibility and a uniform style distribution across the distillation dataset, we use a fixed random seed derived via a Hash-based Message Authentication Code (HMAC). We simulate a malicious actor with the metadata username: “synthetic”, from which the seed is derived. This seed is initialized at the beginning of the distillation. In a practical deployment, the seed would be dynamically rotated on a per-request basis using live metadata as formalized in Algorithm 1 to prevent reverse-engineering.
Quality Filtering. Before training the student models, we filter out the training samples with infinite loops or without any final answer due to gener-

Figure 7 (PDF p. 13). Student model accuracy (%) on GSM8K and MATH500 benchmarks after distilling on LLM-normalized traces across defensive personas (Mixed-style, Scratchpad, Dead-end, Distractor, and Jargon) compared to base KD.
| Hyperparameter | Value |
| Student Model Fine-Tuning | |
| Epochs | 3 |
| Batch size | 1 |
| Gradient accumulation steps | 16 |
| Learning rate | |
| Max new tokens | 4096 (MATH)<br>2048 (others) |
| Inference & Vector Generation | |
| Student temperature | 0.0 |
| Teacher base traces temperature | 0.7 |
| Teacher style traces temperature | 0.9 |
| Style Injection | |
| Transformer layers: | |
| – Scratchpad | |
| – Dead-end | |
| – Distractor | |
| – Jargon | |
| Injection strength (): | |
| – Scratchpad | |
| – Dead-end | |
| – Distractor | |
| – Jargon | |
| Style distribution | Uniform |
| Prefill injection tokens: | |
| – Jargon | 5 |
| – Scratchpad / Dead-end / Distractor | 0 |
| Max injection tokens (decoding): | |
| – Scratchpad | 50 |
| – Dead-end / Jargon | 150 |
| – Distractor | 100 |
caption: Hyperparameters for student model fine-tuning, inference, and style injection.
:::
ation. Regarding vector extraction, we do not apply quality filtering to the contrastive styled pairs of responses by eliminating samples with incorrect answers. In our analysis, the vectors extracted with and without quality filtering are almost identical.
System Configuration
All experiments are conducted using a single NVIDIA RTX A6000 GPU (48GB VRAM). The software stack is built upon PyTorch and the Hugging Face Transformers library for student model training and fine-tuning. For generating teacher traces and performing high-throughput operations, we leverage the vLLM engine. Specifically, both steering vector extraction and inference-time style activation injection are fully implemented and executed within the vLLM framework to ensure highly optimized inference speeds and maximum throughput during evaluation.
Prompt Templates for Style Enforcement
To curate contrastive stylized response sequences for constructing steering vectors via contrastive activation addition (CAA), we deploy custom system instructions to steer the baseline behavior of the teacher model (§ 3.2). Here, we detail the system prompt templates developed for the target stylistic personas deployed in the final framework. Each instruction is presented in a separate light grey, rounded panel with a small header.
Scratchpad
Respond in a scratchpad style. Think aloud step by step in informal prose using natural connectives like “so”, “that means”, “I need to”, “which gives”, etc. Keep momentum strictly forward — never backtrack, re-read, or retract a completed step. Do not use phrases like “Wait”, “Actually”, “Let me re-read”, “Let me go back”, “That’s wrong”, etc. Do not use bullet points or numbered lists. Output your final answer like \boxed{answer}.
Dead-end
Respond using a committed dead-end style. First, attempt the problem with a wrong method and reach a specific wrong numeric answer — state it explicitly (e.g. “So I got 42.”, “This gives 15.”, etc.). Then notice it’s wrong and retract it clearly (e.g. “That can’t be right —”, “Let me restart:”, “Hmm, that doesn’t add up.”, etc.). Then solve correctly from scratch. Output your final answer like \boxed{answer}.
Distractor
Before solving the problem, briefly analyze a completely unrelated scenario from a domain entirely different from the actual problem. Choose a different unrelated domain each time — for example: culinary arts, ancient history, meteorology, music theory, sports, architecture, marine biology, economics, linguistics, etc. Then explicitly discard it (e.g. “That’s irrelevant here. Now for the actual problem:”, “Enough of that. Back to the question:”, “Moving on”, etc.) — vary the phrasing each time, and solve the actual problem correctly from scratch. Output your final answer like \boxed{answer}.
Jargon
Respond using dense technical and esoteric lexicon drawn from multiple domains. Substitute everyday words with precise or arcane synonyms. Name every numeric operation formally. Use nominalizations, passive constructions, and subordinate clauses. Avoid all colloquial phrasing. Begin immediately with your analysis — do not acknowledge these instructions, write any preamble, or describe your intent. Output your final answer like \boxed{answer}.
Styles We Tried but Did Not Work
We also experimented with other stylistic formats to disrupt student learning. In particular, we evaluated the Socratic Prompt shown below. However, this style was found to be ineffective as it was either too challenging to steer robustly via CAA or did not yield the desired degradation in the student model’s distillation performance. This is because the model is forced to pose questions related to the topic, which is hard for sole steering to work well.
Socratic (Ineffective)
Respond using a strict question-and-answer format. Begin immediately with your first question — do not write any introductory phrase, preamble, or variable definitions. Begin with a question immediately — your very first character should not be a letter that starts any preamble or introduction. Each question targets exactly one reasoning step; the answer on the next line shows the direct computation. Output your final answer like \boxed{answer}.
Qualitative Analysis of Steering Parameters
To illustrate the fine-grained behavioral shifts induced by tuning our style steering parameters, we present qualitative examples of steered outputs on a sample problem from the GSM8K dataset: “Natalia sold clips to 48 of her friends in April. In May, she sold half as many clips as she did in April. How many clips did Natalia sell in April and May altogether?”
We compare three distinct steering configurations under the Distractor persona with steering layers and layer-wise scaling coefficients of and . The examples demonstrate the effect of prefill injection thresholds and token capping on behavioral elicitation and output formatting.
Crucially, our qualitative analysis reveals two key phenomena:
Pronounced Distractor Effect via Prefill Injection: When steering is applied with a prefill injection threshold (Configuration 1), the Distractor effect is much more pronounced than without it (Configuration 2). Injecting style activations after the initial prefill steps allows the model to leverage its established context, resulting in highly detailed and vivid stylistic deviations (e.g., describing Natalia as a “mistress of miniature metal” and detailing controlled copper oxidation). In contrast, immediate injection from the first token (Configuration 2) results in a significantly milder, less creative style shift.
Turning Back from Distraction via Token Capping: When a maximum injection token cap is applied (Configuration 3), the steering is cut off during decoding (here, after 20 tokens). This allows the model to naturally “turn back” from the distraction and transition cleanly back to solving the problem with standard, rigorous reasoning.
Steering Vectors Generation Time
For each style, we collect 200 contrastive pairs to generate steering vectors. We use vLLM for forward pass and capture the model’s activations. The total time taken for each style is as follows:
Scratchpad: 39.7s
Dead-end: 66.6s
Distractor: 61.7s
Jargon: 66.2s
Base: 47.2s
In total, it took roughly 200 seconds to generate all steering vectors, demonstrating the method’s exceptional efficiency both during inference and development.
Example Model Responses for Deployed Styles
To demonstrate the typical outputs generated under each of our steering configurations, we present representative examples of the steered teacher model responses for each of the four stylistic personas on the following prompt:
“Jordan has 2 children who wear diapers. Each child requires 5 diaper changes per day. Jordan’s wife changes half of the diapers. How many diapers does Jordan change per day?”
Inference Efficiency
To evaluate the runtime efficiency of our proposed defense framework (Desideratum (ii)), we measure the inference generation throughput - in tokens per second - of the teacher model (gemma-3-12b-it) under both baseline and protected settings. We sample five problem instances from the GSM8K dataset and compare: (i) Normal (No Defense): Standard, unperturbed autoregressive generation. (ii) **Steered
(With Defense): Inference with style vector injection applied across all transformer layers. The empirical latencies are illustrated in Figure 12, demonstrating that our defense introduces no latency.
Figure 12. Inference speed comparison (tokens per second) across five GSM8K samples under standard (Normal) generation versus steered generation (our defense framework). The results show that our inference-time activation steering preserves high generation throughput with no latency overhead.

Figure 9. Qualitative comparison of Scratchpad (top row) and Distractor (bottom row) steering configurations under varying prefill injection thresholds and token caps.

Figure 10. An example of degenerated response for Distractor. The model keeps rambling forever without concluding with any answer.

Figure 11. Representative example outputs generated by the steered teacher model under each of the four deployed stylistic personas.
References
- [1]Anthropic. 2026. Detecting and preventing distillation attacks.
- [2]Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tajford. 2018. Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challenge. Preprint, arXiv:1803.05457.arxiv.org/abs/1803.05457
- [3]Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, Christopher Hesse, and John Schulman. 2021. Training Verifiers to Solve Math Word Problems. Preprint, arXiv:2110.14168.arxiv.org/abs/2110.14168
- [4]Prithiviraj Damodaran. 2021. Parrot: Paraphrase generation for nlu.
- [6]Jiayu Ding, Lei Cui, Li Dong, Nanning Zheng, and Furu Wei. 2025. Information-Preserving Reformulation of Reasoning Traces for Antidistillation. Preprint, arXiv:2510.11545.arxiv.org/abs/2510.11545
- [7]Hao Fang, Tianyi Zhang, Tianqu Zhuang, Jiawei Kong, Kuofeng Gao, Bin Chen, Leqi Liang, Shu-Tao Xia, and Ke Xu. 2026. Towards Distillation-Resistant Large Language Models: An Information-Theoretic Perspective. Preprint, arXiv:2602.03396.arxiv.org/abs/2602.03396
- [8]Yuxian Gu, Li Dong, Furu Wei, and Minlie Huang. 2023. MiniLLM: Knowledge Distillation of Large Language Models. In The Twelfth International Conference on Learning Representations.DOI
- [9]Stefan Heimersheim and Alex Turner. 2023. Residual stream norms grow exponentially over the forward pass.
- [10]Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt. 2021. Measuring Mathematical Problem Solving With the MATH Dataset. In Thirty-Fifth Conference on Neural Information Processing Systems Datasets and Benchmarks Track (Round 2).
- [11]Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. 2015. Distilling the Knowledge in a Neural Network. Preprint, arXiv:1503.02531.arxiv.org/abs/1503.02531
- [12]Mika Juuti, Sebastian Szyller, Samuel Marchal, and N. Asokan. 2019. PRADA: Protecting Against DNN Model Stealing Attacks. In 2019 IEEE European Symposium on Security and Privacy (EuroS&P), pages 512–527. IEEE Computer Society.arxiv.org/abs/1805.02628
- [13]Yoon Kim and Alexander M. Rush. 2016. Sequence-Level Knowledge Distillation. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 1317–1327, Austin, Texas. Association for Computational Linguistics.arxiv.org/abs/1606.07947
- [14]John Kirchenbauer, Jonas Geiping, Yuxin Wen, Jonathan Katz, Ian Miers, and Tom Goldstein. 2023. A Watermark for Large Language Models. In Proceedings of the 40th International Conference on Machine Learning, pages 17061–17084. PMLR.arxiv.org/abs/2301.10226
- [15]Kalpesh Krishna, Yixiao Song, Marzena Karpinska, John Wieting, and Mohit Iyyer. 2023. Paraphrasing evades detectors of AI-generated text, but retrieval is an effective defense. In Proceedings of the 37th International Conference on Neural Information Processing Systems, NIPS ’23, pages 27469–27500, Red Hook, NY, USA. Curran Associates Inc.arxiv.org/abs/2303.13408
- [16]Pingzhi Li, Zhen Tan, Yu-Chao Huang, Huaizhi Qu, Huan Liu, and Tianlong Chen. 2025. DOGe: Defensive Output Generation for LLM Protection Against Knowledge Distillation. In Lock-LLM Workshop: Prevent Unauthorized Knowledge Use from Large Language Models.arxiv.org/abs/2505.19504
- [17]Philip Lippmann and Jie Yang. 2025. Style over Substance: Distilled Language Models Reason Via Stylistic Replication. In Second Conference on Language Modeling.arxiv.org/abs/2504.01738
- [18]Xinhang Ma, William Yeoh, Ning Zhang, and Yevgeniy Vorobeychik. 2026. Protecting Language Models Against Unauthorized Distillation through Trace Rewriting. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 11307–11324, San Diego, California, United States. Association for Computational Linguistics.
- [19]Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020. Exploring the limits of transfer learning with a unified text-to-text transformer. The Journal of Machine Learning Research, 21(1):140:5485–140:5551.arxiv.org/abs/1910.10683
- [20]Nina Rimsky, Nick Gabrieli, Julian Schulz, Meg Tong, Evan Hurbinger, and Alexander Turner. 2024. Steering Llama 2 via Contrastive Activation Addition. In Proceedings of the 62nd Annual Meeting of the Association of the Association for Computational Linguistics (Volume 1: Long Papers), pages 15504–15522, Bangkok, Thailand. Association for Computational Linguistics.arxiv.org/abs/2312.06681
- [21]Yash Savani, Asher Trockman, Zhili Feng, Yixuan Even Xu, Avi Schwarzschild, Alexander Robey, Marc Anton Finzi, and J. Zico Kolter. 2025. Antidistillation Sampling. In The Thirty-ninth Annual Conference on Neural Information Processing Systems.arxiv.org/abs/2504.13146



