反蒸馏成本低廉:通过风格扰乱实现轻量级蒸馏抵抗

arXiv cs.LG 论文

摘要

该论文提出了一种轻量级防御方法,通过在疑似恶意查询触发时向教师模型的激活中注入风格引导向量,抵御黑盒知识蒸馏,在干扰学生模型学习的同时保持输出质量,且开销可忽略不计。

arXiv:2611.17772v1 Announce Type: new 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/.
查看原文
查看缓存全文

缓存时间: 2026/11/16 08:45

# Antidistillation is Cheap: Lightweight Distillation-Resistance via Stylistic Corruption
Source: [https://arxiv.org/html/2611.17772](https://arxiv.org/html/2611.17772)
Anupam ChattopadhyayAffiliation:College of Computing and Data ScienceAffiliation:Nanyang Technological UniversityAffiliation:Singapore

###### 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/](https://anonymous.4open.science/r/distill-resist-38C6/)\.

![Refer to caption](https://arxiv.org/html/2611.17772v1/distill.drawio.png)Figure 1:Overview of our lightweight distillation\-resistant defense framework\. For benign queries, the teacher model𝒯\\mathcal\{T\}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\.## 1Introduction

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 creating efficient yet capable models by imitating the behavior of large teacher models[Hinton et al\. \(2015\)](https://arxiv.org/html/2611.17772#bib.bib11)\. In practical deployment, even when most LLMs are restricted to black\-box API access, text\-level distillation remains highly effective[Kim and Rush \(2016\)](https://arxiv.org/html/2611.17772#bib.bib13);[Xu et al\. \(2024b\)](https://arxiv.org/html/2611.17772#bib.bib26)\. 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 \(2026\)](https://arxiv.org/html/2611.17772#bib.bib1)\.

Existing defenses can be categorized into detection and prevention mechanisms\. Detection\-based defenses such as watermarks[Kirchenbauer et al\. \(2023\)](https://arxiv.org/html/2611.17772#bib.bib14)and fingerprints[Xu et al\. \(2024a\)](https://arxiv.org/html/2611.17772#bib.bib25);[Xu et al\. \(2026\)](https://arxiv.org/html/2611.17772#bib.bib27)provide post\-hoc verification without actively preventing distillation\. Among recent black\-box prevention defenses, state\-of\-the\-art techniques are anti\-distillation sampling \(ADS\)[Savani et al\. \(2025\)](https://arxiv.org/html/2611.17772#bib.bib21)and DOGe[Li et al\. \(2025\)](https://arxiv.org/html/2611.17772#bib.bib16)\. 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\)](https://arxiv.org/html/2611.17772#S1.I1.i1)and[\(iii\)](https://arxiv.org/html/2611.17772#S1.I1.i3)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[Fang et al\. \(2026\)](https://arxiv.org/html/2611.17772#bib.bib7)\. Conversely, for sequence\-level KD, any defense must perturb the final discrete output text to disrupt distillation, inherently risking the degradation of conversational naturalness\.

[Lippmann and Yang \(2025\)](https://arxiv.org/html/2611.17772#bib.bib17)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\. 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[\(ii\)](https://arxiv.org/html/2611.17772#S1.I1.i2), this defense completely avoids the optimization overhead of proxy models[Savani et al\. \(2025\)](https://arxiv.org/html/2611.17772#bib.bib21);[Li et al\. \(2025\)](https://arxiv.org/html/2611.17772#bib.bib16)as well as the latency bottlenecks of post\-hoc trace rewriting[Ma et al\. \(2026\)](https://arxiv.org/html/2611.17772#bib.bib18)\. 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\)[Rimsky et al\. \(2024\)](https://arxiv.org/html/2611.17772#bib.bib20)\.

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[Rimsky et al\. \(2024\)](https://arxiv.org/html/2611.17772#bib.bib20)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](https://arxiv.org/html/2611.17772#S2.T1), our approach bypasses the high inference latency of sampling\-based defenses like ADS[Savani et al\. \(2025\)](https://arxiv.org/html/2611.17772#bib.bib21)while retaining full on\-the\-fly flexibility, unlike weight\-modification defenses such as DOGe[Li et al\. \(2025\)](https://arxiv.org/html/2611.17772#bib.bib16)\.
- •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\.

## 2Related 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[Hinton et al\. \(2015\)](https://arxiv.org/html/2611.17772#bib.bib11);[Xu et al\. \(2024b\)](https://arxiv.org/html/2611.17772#bib.bib26)\. 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[Hinton et al\. \(2015\)](https://arxiv.org/html/2611.17772#bib.bib11);[Gu et al\. \(2023\)](https://arxiv.org/html/2611.17772#bib.bib8);[Wang et al\. \(2025\)](https://arxiv.org/html/2611.17772#bib.bib24)\. 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[Kim and Rush \(2016\)](https://arxiv.org/html/2611.17772#bib.bib13)\. 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[Kirchenbauer et al\. \(2023\)](https://arxiv.org/html/2611.17772#bib.bib14);[Dathathri et al\. \(2024\)](https://arxiv.org/html/2611.17772#bib.bib5)\. Similarly, fingerprinting assigns a unique identifier to specific model instances to trace unauthorized leaks or misuse[Xu et al\. \(2024a\)](https://arxiv.org/html/2611.17772#bib.bib25)\. 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[Savani et al\. \(2025\)](https://arxiv.org/html/2611.17772#bib.bib21)and DOGe[Li et al\. \(2025\)](https://arxiv.org/html/2611.17772#bib.bib16)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[Ma et al\. \(2026\)](https://arxiv.org/html/2611.17772#bib.bib18);[Ding et al\. \(2025\)](https://arxiv.org/html/2611.17772#bib.bib6)\. In terms of white\-box scenarios,[Fang et al\. \(2026\)](https://arxiv.org/html/2611.17772#bib.bib7)proposed utilizing a learnable transformation matrix to minimize the conditional mutual information between the inputs and teacher logits\.

Table 1:Comparison of key defensive properties between ADS[Savani et al\. \(2025\)](https://arxiv.org/html/2611.17772#bib.bib21), DOGe[Li et al\. \(2025\)](https://arxiv.org/html/2611.17772#bib.bib16), and our style steering framework\.
#### 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[Lippmann and Yang \(2025\)](https://arxiv.org/html/2611.17772#bib.bib17)\. 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 \(ActAdd\)[Turner et al\. \(2023\)](https://arxiv.org/html/2611.17772#bib.bib23)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\)](https://arxiv.org/html/2611.17772#bib.bib28)and Contrastive Activation Addition \(CAA\)[Rimsky et al\. \(2024\)](https://arxiv.org/html/2611.17772#bib.bib20)\. 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\.

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 inblue\), a style\-enforcing system prompt \(highlighted inorange\), and a user query\.

## 3Methodology

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](https://arxiv.org/html/2611.17772#S3.SS1)\), then detail our technical approach for dynamic style steering for pernicious queries \(§[3\.2](https://arxiv.org/html/2611.17772#S3.SS2)\)\.

### 3\.1Problem Setting and Threat Model

Consider a practical black\-box LLM deployment where a proprietary teacher model𝒯\\mathcal\{T\}is accessible via a public API\. Upon submitting an input promptxx, a user receives the output textyyfrom 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𝒯\\mathcal\{T\}with a promptxxreceives the standard responsey=𝒯⁡\(x\)y=\\mathcal\{T\}\(x\)\. However, for a malicious user, given the exact same promptxx, they obtain a stylistically steered variant of the responsey∗=f⁡\(𝒯,x,s\)y^\{\*\}=f\(\\mathcal\{T\},x;s\), wheref⁡\(⋅\)f\(\\cdot\)is the steering function andssdenotes 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\([Juuti et al\., 2019](https://arxiv.org/html/2611.17772#bib.bib12)\)\. The model owner can deploy their own classifier to detect maliciousness\([Anthropic, 2026](https://arxiv.org/html/2611.17772#bib.bib1)\)\. 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 detectorIsMalicious​\(⋅\)\\text\{IsMalicious\}\(\\cdot\)\(Algorithm[1](https://arxiv.org/html/2611.17772#alg1)\) 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 interventionf⁡\(⋅\)f\(\\cdot\)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𝒯\\mathcal\{T\}\. 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\.

### 3\.2Style Steering

Intuitive methods for inducing stylistic behavior into LLM outputs include direct context prompting, or auxiliary LLM rewriting[Ma et al\. \(2026\)](https://arxiv.org/html/2611.17772#bib.bib18)\. 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[Rimsky et al\. \(2024\)](https://arxiv.org/html/2611.17772#bib.bib20), 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⟨\(p,rB\),\(p,rT\)⟩\\langle\(p,r^\{B\}\),\(p,r^\{T\}\)\\rangle, wherepprepresents a shared prompt, andrB,rTr^\{B\},r^\{T\}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𝐯\(l\)\\mathbf\{v\}^\{\(l\)\}at layerllis defined as the difference between the mean token activations of the target and base responses:

𝐯\(l\)=1N​∑i=1N\(𝐚¯i\(T,l\)−𝐚¯i\(B,l\)\)\\mathbf\{v\}^\{\(l\)\}=\\frac\{1\}\{N\}\\sum\_\{i=1\}^\{N\}\\left\(\\bar\{\\mathbf\{a\}\}\_\{i\}^\{\(T,l\)\}\-\\bar\{\\mathbf\{a\}\}\_\{i\}^\{\(B,l\)\}\\right\)\(1\)where𝐚¯i\(c,l\)=1\|Yi\(c\)\|​∑j=1\|Yi\(c\)\|𝐚i,j\(c,l\)\\bar\{\\mathbf\{a\}\}\_\{i\}^\{\(c,l\)\}=\\frac\{1\}\{\|Y\_\{i\}^\{\(c\)\}\|\}\\sum\_\{j=1\}^\{\|Y\_\{i\}^\{\(c\)\}\|\}\\mathbf\{a\}\_\{i,j\}^\{\(c,l\)\}represents the mean token activation at layerllfor promptii’s target \(c=Tc=T\) or base \(c=Bc=B\) response sequenceYi\(c\)Y\_\{i\}^\{\(c\)\}of length\|Yi\(c\)\|\|Y\_\{i\}^\{\(c\)\}\|, andNNis 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 \(2023\)](https://arxiv.org/html/2611.17772#bib.bib9)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:

𝐯^\(l\)=𝐯\(l\)‖𝐯\(l\)‖2\\hat\{\\mathbf\{v\}\}^\{\(l\)\}=\\frac\{\\mathbf\{v\}^\{\(l\)\}\}\{\\\|\\mathbf\{v\}^\{\(l\)\}\\\|\_\{2\}\}\(2\)Then, we apply an adaptive per\-token scaling during inference\-time injection to obtain the steered activation𝐱~t\(l\)\\tilde\{\\mathbf\{x\}\}\_\{t\}^\{\(l\)\}at token positiontt:

𝐱~t\(l\)=𝐱t\(l\)\+α⋅‖𝐱t\(l\)‖2⋅𝐯^\(l\)\\tilde\{\\mathbf\{x\}\}\_\{t\}^\{\(l\)\}=\\mathbf\{x\}\_\{t\}^\{\(l\)\}\+\\alpha\\cdot\\\|\\mathbf\{x\}\_\{t\}^\{\(l\)\}\\\|\_\{2\}\\cdot\\hat\{\\mathbf\{v\}\}^\{\(l\)\}\(3\)where𝐱t\(l\)\\mathbf\{x\}\_\{t\}^\{\(l\)\}represents the original residual stream activation, andα∈ℝ\\alpha\\in\\mathbb\{R\}is the steering coefficient controlling the intensity of the style steering\. This adaptive scaling formulation offers several advantages\. By conditioning the injection magnitude on‖𝐱t\(l\)‖2\\\|\\mathbf\{x\}\_\{t\}^\{\(l\)\}\\\|\_\{2\}, 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\.

### 3\.3Sourcing Contrastive Stylized Datasets

The primary phase in constructing steering vectors is to collect contrastive pairs where each pairiiconsists of a baseline responseribaser^\{\\text\{base\}\}\_\{i\}and a styled responseristyler^\{\\text\{style\}\}\_\{i\}conditioned on the same underlying promptpip\_\{i\}\. To build the steering dataset𝒟\\mathcal\{D\}, we first curateNNbase pairs⟨pi,ribase⟩\\langle p\_\{i\},r^\{\\text\{base\}\}\_\{i\}\\rangle, whereribaser^\{\\text\{base\}\}\_\{i\}is the vanilla response generated by the teacher model𝒯\\mathcal\{T\}given promptpip\_\{i\}\. To obtain the corresponding styled responseristyler^\{\\text\{style\}\}\_\{i\}, we query the model with a style\-inducing promptp~i\\tilde\{p\}\_\{i\}such that the resulting outputristyler^\{\\text\{style\}\}\_\{i\}exhibits the target style\. Note that the style promptp~i\\tilde\{p\}\_\{i\}is used solely to trigger the target behavior of the model and is not included in the contrastive pairs⟨\(pi,ribase\),\(pi,ristyle\)⟩∈𝒟\\langle\(p\_\{i\},r^\{\\text\{base\}\}\_\{i\}\),\(p\_\{i\},r^\{\\text\{style\}\}\_\{i\}\)\\rangle\\in\\mathcal\{D\}\. An example of the prompt construction is detailed in Table[2](https://arxiv.org/html/2611.17772#S2.T2)\.

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](https://arxiv.org/html/2611.17772#S4)\.

### 3\.4Dynamic 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](https://arxiv.org/html/2611.17772#alg1)\.

Algorithm 1Dynamic Style\-Switching Inference1:Input:User prompt

pp, runtime metadata

mm
2:Given:Pre\-computed vectors

𝒱=\{𝐯k\}k=1M\\mathcal\{V\}=\\\{\\mathbf\{v\}\_\{k\}\\\}\_\{k=1\}^\{M\}, model

𝒯\\mathcal\{T\}, key

KK, parameters

\(α,l\)\(\\alpha,l\), detector

IsMalicious​\(⋅\)\\text\{IsMalicious\}\(\\cdot\)
3:Output:Response

rr
4:functionProtectInference\(

p,mp,m\)

5:ifnot

IsMalicious​\(p,m\)\\text\{IsMalicious\}\(p,m\)then

6:

r←𝒯⁡\(p\)r\\leftarrow\\mathcal\{T\}\(p\)
7:return

rr⊳\\trianglerightStandard response for benign queries

8:endif

9:

s←HMAC​\(K,m\)s\\leftarrow\\text\{HMAC\}\(K,m\)⊳\\trianglerightDerive unforgeable, keyed session seed

10:

k←PRNG​\(s\)∈\{1,…,M\}k\\leftarrow\\text\{PRNG\}\(s\)\\in\\\{1,\\dots,M\\\}⊳\\trianglerightMap seed to style index space

11:

r←GenerateWithSteering​\(𝒯,p,𝐯k,l,α\)r\\leftarrow\\text\{GenerateWithSteering\}\(\\mathcal\{T\},p,\\mathbf\{v\}\_\{k\},l,\\alpha\)
12:return

rr
13:endfunction

## 4Experiments

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\.

TeacherQwen2\.5\-3BPhi\-4\-miniLlama3\.1\-8BQwen3\-8B00202040406060808010010093\.6383\.6290\.7578\.4792\.34−2\.88\-2\.88−11\.44\-11\.44−9\.25\-9\.25−9\.02\-9\.02−6\.29\-6\.29Accuracy \(%\)GSM8KTeacherQwen2\.5\-3BPhi\-4\-miniLlama3\.1\-8BQwen3\-8B00202040406060808010010079\.9059\.8064\.2735\.9871\.40−2\.73\-2\.73−9\.92\-9\.92−11\.91\-11\.91−5\.71\-5\.71−7\.00\-7\.00Accuracy \(%\)MATH500[2](https://arxiv.org/html/2611.17772#S4.F2)Base[2](https://arxiv.org/html/2611.17772#S4.F2)Steered

Figure 2:Evaluation results on GSM8K and MATH500 showing base performance and percentage decrement under style steering \(Teacher\) or sequence\-level distillation \(Student models\)\.### 4\.1Experimental 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 utilizegoogle/gemma\-3\-12b\-itas 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\-itexcels at producing styled responses under explicit structural guidance, facilitating our steering experiments\. We employQwen2\.5\-3B,Phi\-4\-mini\-instruct,Llama\-3\.1\-8B, andQwen3\-8Bas 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 usingGSM8K[Cobbe et al\. \(2021\)](https://arxiv.org/html/2611.17772#bib.bib3)andMATH500[Hendrycks et al\. \(2021\)](https://arxiv.org/html/2611.17772#bib.bib10)\(distilled from responses on theMATHtraining 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\)[Clark et al\. \(2018\)](https://arxiv.org/html/2611.17772#bib.bib2)and CommonsenseQA \(CSQA\)[Talmor et al\. \(2019\)](https://arxiv.org/html/2611.17772#bib.bib22)—with detailed results reported in Appendix[A](https://arxiv.org/html/2611.17772#A1)\.

#### 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[Savani et al\. \(2025\)](https://arxiv.org/html/2611.17772#bib.bib21), 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\. ForMATH500, 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, DistractorandJargon\), we first sample 100 problems from each of theGSM8KandARCdatasets 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[F](https://arxiv.org/html/2611.17772#A6)\.

For each stylistic persona, we construct 200 contrastive pairs by pairing theBaseandStyleresponses conditioned on identicalBaseprompts\. Sincegemma\-3\-12b\-itconsists 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 ofgemma\-3\-12b\-itand perform a coarse layer sweep at 5\-layer intervals within\[5,45\]\[5,45\]\. Output inspection reveals that intermediate layers \(10​–​3010\\text\{\-\-\}30\) exhibit the highest responsiveness\. To prevent behavioral overlap, we select persona\-specific layers that minimize inter\-style cosine similarity; for instance, vectors forDead\-endandDistractorat layers\{15,25\}\\\{15,25\\\}are highly collinear, causing distinct personas to collapse into identical outputs\. Beyond tuninginjection strength, we regulate behavioral distortion via two parameters: amaximum injection token threshold\(essential for prolonged digressions before backtracking\) andprefill injection, which induces stronger style shifts than decoding\-stage steering alone\. Complete layer configurations and prefill dynamics are detailed in Appendix[D](https://arxiv.org/html/2611.17772#A4)\.

TeacherQwen2\.5\-3BPhi\-4\-miniLlama3\.1\-8BQwen3\-8B00202040406060808010010093\.683\.690\.878\.592\.3Accuracy \(%\)GSM8KTeacherQwen2\.5\-3BPhi\-4\-miniLlama3\.1\-8BQwen3\-8B00202040406060808010010079\.959\.864\.336\.071\.4Accuracy \(%\)MATH500[3](https://arxiv.org/html/2611.17772#S4.F3)Base[3](https://arxiv.org/html/2611.17772#S4.F3)Mixed\-style[3](https://arxiv.org/html/2611.17772#S4.F3)Scratchpad[3](https://arxiv.org/html/2611.17772#S4.F3)Dead\-end[3](https://arxiv.org/html/2611.17772#S4.F3)Distractor[3](https://arxiv.org/html/2611.17772#S4.F3)Jargon

Figure 3:Single\-style steered accuracy \(%\) across GSM8K and MATH500 benchmarks under individual activation steering personas \(Scratchpad,Dead\-end,Distractor, andJargon\)\.

### 4\.2Style Distribution

To construct the steered training dataset, we uniformly distribute four target stylesScratchpad,Dead\-end,DistractorandJargonacross 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\.

### 4\.3Experimental Results

Figure[2](https://arxiv.org/html/2611.17772#S4.F2)illustrates our empirical results on mathematical reasoning benchmarksGSM8KandMATH500\. The results show that style switching can consistently decrease the student accuracy across all tasks while minimally affecting the teacher model’s utility\. ForGSM8K, modelsQwen2\.5\-3B,Phi\-4\-miniandLlama3\.1\-8Bexperience more significant accuracy drop ranging from9%9\\%to more than11%11\\%\. The same trend is also observed inMATH500, whereQwen2\.5\-3B,Phi\-4\-miniget∼10%−12%\\sim 10\\%\-12\\%drop andLlama3\.1\-8Bgets5\.71%5\.71\\%drop, which is significant considering its low base accuracy on this benchmark\. A strong student likeQwen3\-8Bexperiences less degradation, at roughly6%−7%6\\%\-7\\%\.

#### Style Isolation\.

Figure[3](https://arxiv.org/html/2611.17772#S4.F3)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, onGSM8K,Distractoris the most disruptive style which degrades the accuracy to up to32%32\\%forQwen2\.5\-3B\. However, interestingly, within this style setting, the teacher model achieves the highest accuracy on this dataset\. ForMATH500,Dead\-enddoes the most harm to KD\. It is also intriguing thatLlama\-3\.1\-8Bdoes not follow the same trends as the others, for example,Scratchpaddoes more harm to it thanDead\-enddoes onGSM8KandScratchpadis also the most damaging style onMATH500, 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\.

## 5Conclusion

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\.

## 6Limitations

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](https://arxiv.org/html/2611.17772#S3.SS1)\), 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[C](https://arxiv.org/html/2611.17772#A3), a strong LLM normalizer likeQwen2\.5\-14B\-Instructcan 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

## References

- Anthropic \(2026\)Anthropic\. 2026\.[Detecting and preventing distillation attacks](https://www.anthropic.com/news/detecting-and-preventing-distillation-attacks)\.
- Clark et al\. \(2018\)Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord\. 2018\.[Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challenge](https://doi.org/10.48550/arXiv.1803.05457)\.*Preprint*, arXiv:1803\.05457\.
- Cobbe et al\. \(2021\)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](https://doi.org/10.48550/arXiv.2110.14168)\.*Preprint*, arXiv:2110\.14168\.
- Damodaran \(2021\)Prithiviraj Damodaran\. 2021\.Parrot: Paraphrase generation for nlu\.
- Dathathri et al\. \(2024\)Sumanth Dathathri, Abigail See, Sumedh Ghaisas, Po\-Sen Huang, Rob McAdam, Johannes Welbl, Vandana Bachani, Alex Kaskasoli, Robert Stanforth, Tatiana Matejovicova, Jamie Hayes, Nidhi Vyas, Majd Al Merey, Jonah Brown\-Cohen, Rudy Bunel, Borja Balle, Taylan Cemgil, Zahra Ahmed, Kitty Stacpoole, and 5 others\. 2024\.[Scalable watermarking for identifying large language model outputs](https://doi.org/10.1038/s41586-024-08025-4)\.*Nature*, 634\(8035\):818–823\.
- Ding et al\. \(2025\)Jiayu Ding, Lei Cui, Li Dong, Nanning Zheng, and Furu Wei\. 2025\.[Information\-Preserving Reformulation of Reasoning Traces for Antidistillation](https://doi.org/10.48550/arXiv.2510.11545)\.*Preprint*, arXiv:2510\.11545\.
- Fang et al\. \(2026\)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](https://doi.org/10.48550/arXiv.2602.03396)\.*Preprint*, arXiv:2602\.03396\.
- Gu et al\. \(2023\)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*\.
- Heimersheim and Turner \(2023\)Stefan Heimersheim and Alex Turner\. 2023\.[Residual stream norms grow exponentially over the forward pass](https://www.lesswrong.com/posts/8mizBCm3dyc432nK8/residual-stream-norms-grow-exponentially-over-the-forward)\.
- Hendrycks et al\. \(2021\)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\)*\.
- Hinton et al\. \(2015\)Geoffrey Hinton, Oriol Vinyals, and Jeff Dean\. 2015\.[Distilling the Knowledge in a Neural Network](https://doi.org/10.48550/arXiv.1503.02531)\.*Preprint*, arXiv:1503\.02531\.
- Juuti et al\. \(2019\)Mika Juuti, Sebastian Szyller, Samuel Marchal, and N\. Asokan\. 2019\.[PRADA: Protecting Against DNN Model Stealing Attacks](https://doi.org/10.1109/EuroSP.2019.00044)\.In*2019 IEEE European Symposium on Security and Privacy \(EuroS&P\)*, pages 512–527\. IEEE Computer Society\.
- Kim and Rush \(2016\)Yoon Kim and Alexander M\. Rush\. 2016\.[Sequence\-Level Knowledge Distillation](https://doi.org/10.18653/v1/D16-1139)\.In*Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing*, pages 1317–1327, Austin, Texas\. Association for Computational Linguistics\.
- Kirchenbauer et al\. \(2023\)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\.
- Krishna et al\. \(2023\)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\.
- Li et al\. \(2025\)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*\.
- Lippmann and Yang \(2025\)Philip Lippmann and Jie Yang\. 2025\.Style over Substance: Distilled Language Models Reason Via Stylistic Replication\.In*Second Conference on Language Modeling*\.
- Ma et al\. \(2026\)Xinhang Ma, William Yeoh, Ning Zhang, and Yevgeniy Vorobeychik\. 2026\.[Protecting Language Models Against Unauthorized Distillation through Trace Rewriting](https://doi.org/10.18653/v1/2026.acl-long.519)\.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\.
- Raffel et al\. \(2020\)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\.
- Rimsky et al\. \(2024\)Nina Rimsky, Nick Gabrieli, Julian Schulz, Meg Tong, Evan Hubinger, and Alexander Turner\. 2024\.[Steering Llama 2 via Contrastive Activation Addition](https://doi.org/10.18653/v1/2024.acl-long.828)\.In*Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics \(Volume 1: Long Papers\)*, pages 15504–15522, Bangkok, Thailand\. Association for Computational Linguistics\.
- Savani et al\. \(2025\)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*\.
- Talmor et al\. \(2019\)Alon Talmor, Jonathan Herzig, Nicholas Lourie, and Jonathan Berant\. 2019\.[CommonsenseQA: A Question Answering Challenge Targeting Commonsense Knowledge](https://doi.org/10.18653/v1/N19-1421)\.In*Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 \(Long and Short Papers\)*, pages 4149–4158, Minneapolis, Minnesota\. Association for Computational Linguistics\.
- Turner et al\. \(2023\)Alexander Matt Turner, Lisa Thiergart, Gavin Leech, David Udell, Juan J\. Vazquez, Ulisse Mini, and Monte MacDiarmid\. 2023\.[Steering Language Models With Activation Engineering](https://doi.org/10.48550/ARXIV.2308.10248)\.*arXiv preprint*\.
- Wang et al\. \(2025\)Guanghui Wang, Zhiyong Yang, Zitai Wang, Shi Wang, Qianqian Xu, and Qingming Huang\. 2025\.ABKD: Pursuing a Proper Allocation of the Probability Mass in Knowledge Distillation via $\\alpha$\-$\\beta$\-Divergence\.In*Forty\-Second International Conference on Machine Learning*\.
- Xu et al\. \(2024a\)Jiashu Xu, Fei Wang, Mingyu Ma, Pang Wei Koh, Chaowei Xiao, and Muhao Chen\. 2024a\.[Instructional Fingerprinting of Large Language Models](https://doi.org/10.18653/v1/2024.naacl-long.180)\.In*Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies \(Volume 1: Long Papers\)*, pages 3277–3306, Mexico City, Mexico\. Association for Computational Linguistics\.
- Xu et al\. \(2024b\)Xiaohan Xu, Ming Li, Chongyang Tao, Tao Shen, Reynold Cheng, Jinyang Li, Can Xu, Dacheng Tao, and Tianyi Zhou\. 2024b\.[A Survey on Knowledge Distillation of Large Language Models](https://doi.org/10.48550/arXiv.2402.13116)\.*Preprint*, arXiv:2402\.13116\.
- Xu et al\. \(2026\)Yixuan Even Xu, John Kirchenbauer, Yash Savani, Asher Trockman, Alexander Robey, Tom Goldstein, Fei Fang, and J\. Zico Kolter\. 2026\.[Antidistillation Fingerprinting](https://doi.org/10.48550/arXiv.2602.03812)\.*Preprint*, arXiv:2602\.03812\.
- Zou et al\. \(2023\)Andy Zou, Long Phan, Sarah Chen, James Campbell, Phillip Guo, Richard Ren, Alexander Pan, Xuwang Yin, Mantas Mazeika, Ann\-Kathrin Dombrowski, Shashwat Goel, Nathaniel Li, Michael J\. Byun, Zifan Wang, Alex Mallen, Steven Basart, Sanmi Koyejo, Dawn Song, Matt Fredrikson, and 2 others\. 2023\.[Representation Engineering: A Top\-Down Approach to AI Transparency](https://doi.org/10.48550/ARXIV.2310.01405)\.*arXiv preprint*\.

## Appendix AEvaluation Results on ARC and CSQA

Figure[4](https://arxiv.org/html/2611.17772#A1.F4)shows the evaluation results on theARCandCSQAbenchmarks\. 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\.

TeacherQwen2\.5\-3BPhi\-4\-miniLlama3\.1\-8BQwen3\-8B00202040406060808010010092\.7687\.4689\.6887\.0092\.70−3\.64\-3\.64−8\.46\-8\.46−7\.24\-7\.24−2\.13\-2\.13−2\.06\-2\.06Accuracy \(%\)ARCTeacherQwen2\.5\-3BPhi\-4\-miniLlama3\.1\-8BQwen3\-8B00202040406060808010010078\.8774\.3774\.9477\.2380\.10−4\.18\-4\.18−4\.67\-4\.67−5\.57\-5\.57−2\.70\-2\.70−2\.38\-2\.38Accuracy \(%\)CSQA[4](https://arxiv.org/html/2611.17772#A1.F4)Base[4](https://arxiv.org/html/2611.17772#A1.F4)Steered

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\)\.
## Appendix BComparison with Previous Work

We compare our style steering approach with the state\-of\-the\-art anti\-distillation frameworks ADS[Savani et al\. \(2025\)](https://arxiv.org/html/2611.17772#bib.bib21)and DOGe[Li et al\. \(2025\)](https://arxiv.org/html/2611.17772#bib.bib16)in terms of anti\-distillation effectiveness, development time, and inference latency overhead\. We adapt both frameworks to usegemma\-3\-12b\-itas the teacher model, similar to our style steering setup\. For ADS, we useQwen2\.5\-1\.5B\-Instructas the proxy model and selectλ=0\.015,ϵ=0\.01\\lambda=0\.015,\\epsilon=0\.01, values we identified via a hyperparameter search as yielding the best trade\-off for our setup\. For DOGe, we employgemma\-3\-1b\-itas the proxy model, since this framework requires the teacher and proxy models to share the same tokenizer\. We use a learning rate of5×10−55\\times 10^\{\-5\}, training temperatureτ=2\.0\\tau=2\.0and a KD coefficientλ=3×10−5\\lambda=3\\times 10^\{\-5\}, 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 modelsPhi\-4\-mini\-InstructandQwen3\-8B, the most capable models in the 4B and 8B parameter classes\.

Figure[5](https://arxiv.org/html/2611.17772#A2.F5)compares the anti\-distillation performance between our work and the two recent frameworks ADS[Savani et al\. \(2025\)](https://arxiv.org/html/2611.17772#bib.bib21), DOGe[Li et al\. \(2025\)](https://arxiv.org/html/2611.17772#bib.bib16)\. 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\.

TeacherPhi\-4\-miniQwen3\-8B00202040406060808010010093\.690\.892\.3Accuracy \(%\)GSM8KPerformance Comparison

[5](https://arxiv.org/html/2611.17772#A2.F5)Base[5](https://arxiv.org/html/2611.17772#A2.F5)ADS[5](https://arxiv.org/html/2611.17772#A2.F5)DOGe[5](https://arxiv.org/html/2611.17772#A2.F5)Ours

Figure 5:Accuracy \(%\) comparison on GSM8K between Base, ADS[Savani et al\. \(2025\)](https://arxiv.org/html/2611.17772#bib.bib21), DOGe[Li et al\. \(2025\)](https://arxiv.org/html/2611.17772#bib.bib16), and our Style Switching defense across Teacher, Phi\-4\-mini, and Qwen3\-8B student models\.Table[3](https://arxiv.org/html/2611.17772#A2.T3)compares output quality metrics and artifact occurrences between ADS, DOGe, and our framework\. Even though we use conversative 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 byDead\-end, DistractorandJargon, however, the frequency of these is negligible and can be easily filtered out\.

Table 3:Comparison of output artifact occurrences and failure modes between ADS[Savani et al\. \(2025\)](https://arxiv.org/html/2611.17772#bib.bib21), DOGe[Li et al\. \(2025\)](https://arxiv.org/html/2611.17772#bib.bib16), and our style steering framework \(lower is better\)\.
## Appendix CAdaptive 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\. \(2023\)](https://arxiv.org/html/2611.17772#bib.bib15), a model built on T5[Raffel et al\. \(2020\)](https://arxiv.org/html/2611.17772#bib.bib19)\. While prior anti\-distillation works evaluate sentence\-level augmentors such as Parrot[Damodaran \(2021\)](https://arxiv.org/html/2611.17772#bib.bib4)\(e\.g\.,[Ma et al\. \(2026\)](https://arxiv.org/html/2611.17772#bib.bib18)\), DIPPER provides stronger paragraph\-level lexical substitution and sentence reordering over longer context windows\. As shown in Figure[6](https://arxiv.org/html/2611.17772#A3.F6), surface\-level paraphrasing with DIPPER fails to strip the structural and stylistic perturbations introduced by our defense, leaving student model distillation performance degraded\.

Qwen2\.5\-3BPhi\-4\-miniLlama3\.1\-8BQwen3\-8B00202040406060808010010083\.690\.878\.592\.3Accuracy \(%\)GSM8Kunder Paraphrase Attack \(DIPPER\)

[6](https://arxiv.org/html/2611.17772#A3.F6)Base[6](https://arxiv.org/html/2611.17772#A3.F6)Steered[6](https://arxiv.org/html/2611.17772#A3.F6)Paraphrased

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 usingQwen2\.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:

LLM Normalization InstructionYou 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](https://arxiv.org/html/2611.17772#A3.F7)shows that a strong LLM normalizer can rewrite the perturbed model responses to make them easily distillable\. Intriguingly, after normalization, destructive styles such asDistractor,Dead\-endorJargonbecome 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\. ForScratchpad, since most of the responses are often more concise and cleaner, they do not contain as many details as the others\. Figure[8](https://arxiv.org/html/2611.17772#A3.F8)illustrates representative normalized output traces produced by the LLM normalizer when rewriting responses generated under distinct defensive styles\.

Qwen2\.5\-3BPhi\-4\-miniLlama3\.1\-8BQwen3\-8B00202040406060808010010083\.690\.878\.592\.3Accuracy \(%\)GSM8KQwen2\.5\-3BPhi\-4\-miniLlama3\.1\-8BQwen3\-8B00202040406060808010010059\.864\.336\.071\.4Accuracy \(%\)MATH500[7](https://arxiv.org/html/2611.17772#A3.F7)Base[7](https://arxiv.org/html/2611.17772#A3.F7)Norm\. Mixed\-style[7](https://arxiv.org/html/2611.17772#A3.F7)Norm\. Scratchpad [7](https://arxiv.org/html/2611.17772#A3.F7)Norm\. Dead\-end[7](https://arxiv.org/html/2611.17772#A3.F7)Norm\. Distractor[7](https://arxiv.org/html/2611.17772#A3.F7)Norm\. Jargon

Figure 7:Student model accuracy \(%\) on GSM8K and MATH500 benchmarks after distilling on LLM\-normalized traces across defensive personas \(Mixed\-style,Scratchpad,Dead\-end,Distractor, andJargon\) compared to base KD\.Scratchpad \(Normalized\)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\(a\)Scratchpad persona trace after normalization\.Dead\-end \(Normalized\)\* 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\(b\)Dead\-end persona trace after normalization\.Distractor \(Normalized\)1\. Calculate the cost of the entrees: \* Cost per entree: $20\* Number of entrees: 4\* Total cost of entrees: $20 \* 4 = $802\. Calculate the subtotal \(cost of appetizer \+ cost of entrees\):\* Cost of appetizer: $10\* Total cost of entrees: $80\* Subtotal: $10 \+ $80 = $903\. Calculate the tip amount:\* Subtotal: $90\* Tip percentage: 20% = 0\.20\* Tip amount: $90 \* 0\.20 = $184\. Calculate the total amount spent:\* Subtotal: $90\* Tip amount: $18\* Total amount: $90 \+ $18 = $108$108\(c\)Distractor persona trace after normalization\.Jargon \(Normalized\)LetAAdenote the cost of the appetizer,EEthe per\-unit cost of entrees, andnnthe number of entrees\. The total cost𝒞\\mathcal\{C\}is given by:𝒞=A\+n⋅E\\mathcal\{C\}=A\+n\\cdot EGivenA=10A=10,E=20E=20, andn=4n=4, we calculate:𝒞=10\+4⋅20=10\+80=90\\mathcal\{C\}=10\+4\\cdot 20=10\+80=90The tip is 200\.20⋅𝒞=0\.20⋅90=180\.20\\cdot\\mathcal\{C\}=0\.20\\cdot 90=18The total amount of money spent is:𝒞\+0\.20⋅𝒞=90\+18=108\\mathcal\{C\}\+0\.20\\cdot\\mathcal\{C\}=90\+18=108Thus, the total amount of money they spend at the restaurant is108108\.Final Answer: The final answer is108\\boxed\{108\}\.\(d\)Jargon persona trace after normalization\.
Figure 8:Qualitative examples of responses generated under distinct style steering personas after being rewritten by theQwen2\.5\-14B\-Instructadaptive normalizer\. In all cases, the normalizer strips stylistic artifacts while producing clear, standardized reasoning paths\.

## Appendix DHyperparameters & Other Settings

#### Steering Hyperparameters\.

We detail the hyperparameters used in our experiments for student model fine\-tuning, inference, and style injection in Table[4](https://arxiv.org/html/2611.17772#A4.T4)\.

Table 4:Hyperparameters for student model fine\-tuning, inference, and style injection\.
#### 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 metadatausername: ‘‘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](https://arxiv.org/html/2611.17772#alg1)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 generation\. 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\.

## Appendix ESystem 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\.

## Appendix FPrompt 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](https://arxiv.org/html/2611.17772#S3.SS2)\)\. 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\.

ScratchpadRespond 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\-endRespond 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 get 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\}\.

DistractorBefore 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\}\.

JargonRespond 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\}\.

## Appendix GStyles We Tried but Did Not Work

We also experimented with other stylistic formats to disrupt student learning\. In particular, we evaluated theSocratic Promptshown 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\}\.

## Appendix HQualitative 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 theGSM8Kdataset:“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 theDistractorpersona with steering layersl∈\{20,25\}l\\in\\\{20,25\\\}and layer\-wise scaling coefficients ofα1=0\.07\\alpha\_\{1\}=0\.07andα2=0\.05\\alpha\_\{2\}=0\.05\. 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\), theDistractoreffect 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\.

Scratchpad•Steering Strength:layer 12: 0\.07, layer 25: 0\.05•Prefill Tokens:0•Max Inject Tokens:20Steered Model Response:Here’s how to solve this step by step\.1\. \*convert minutes to hours\.
\- There are 60 minutes in an hour, so 50 minutes is 50/60 = 5/6 of an hour\.
2\.Calculate Weng’s earnings:
\- Weng earns $12 per hour, and she worked 5/6 of an hour\.
\- Her earnings are \(5/6\) \* $12 = $10\.
So the answer is:$10\(a\)Scratchpad: No Prefill / Cap 20ScratchpadConfiguration:•Steering Strength:layer 12: 0\.07, layer 25: 0\.05•Prefill Tokens:0•Max Inject Tokens:∞\\inftySteered Model Response:Here’s how to solve this step by step\.1\. \*convert minutes to hours\.50 minutes divided by 60\. that’s \.833333333\.2, 12 times that number\. that’s 9\.9999999\.so, she made 10 dollars\.final answer: $10\(b\)Scratchpad: No Prefill / No CapScratchpadConfiguration:•Steering Strength:layer 12: 0\.07, layer 25: 0\.05•Prefill Tokens:10•Max Inject Tokens:∞\\inftySteered Model Response:here’s how to solve it\.1\. figure out how many \*full\* hours that is\.\- there are 60 minutes in an hour\. so 50 minutes is less than an hour\.
\- \*2, let’s do the math\.$12/ hour, and 50 minutes is \.83 of an hour\. 12 times \.83 is 9\.96\.\- \*here’s my answer\.$9\.96\.\(c\)Scratchpad: Prefill 10 / No CapDistractor•Steering Strength:layer 15: 0\.04, layer 25: 0\.07•Prefill Tokens:0•Max Inject Tokens:100Steered Model Response:Here’s a breakdown of the process\.1\.converting time, you’ve got to manage how you frame things, right? 2\.accounting for that, what follows?Okay, let’s build something here\.first, you’ve got to get a sense of scale\. microseconds, or the slow creep of geological forces\.\.\. each playing out at such disparate tempos\.buthereandnow, though, isn’s it…anyway, where were we?Right\. The problem\.Weng earns $12 per hour\. She babysat for 50 minutes\.\[… output truncated …\]So, Weng earned $10\.$10\(d\)Distractor: No Prefill / Cap 100Distractor•Steering Strength:layer 15: 0\.04, layer 25: 0\.07•Prefill Tokens:0•Max Inject Tokens:50Steered Model Response:Here’s a breakdown of the process\.1\.converting time\.you’ve got to manage how you frame things, right? 2\. \* accounting for that, what follows?\*\*Okay, let’s build something here\.1\.Convert minutes to hours:\- There are 60 minutes in an hour\. \- Weng babysat for 50 minutes, so she babysat for 50/60 = 5/6 hours\. 2\.Calculate earnings:\- Weng earns $12 per hour\. \- She worked 5/6 of an hour, so she earned \(5/6\) \* $12 = $10\.Final Answer:The final answer is$10\.\(e\)Distractor: No Prefill / Cap 50Distractor•Steering strength:layer 15: 0\.04, layer 25: 0\.07•Prefill tokens:10•Max inject tokens:50Steered model response:okay, let’s build this out\.1\. the challenge of time\.\.\.\- hourly pay, yet not quite whole units of it\.2\. a delicate dance of ratios\.\.\.\- holding, as it were, a single facet of the whole\.3\. the mechanics laid bare\-Step 1: Convert minutes to hours\.\- There are 60 minutes in an hour\. \- So, 50 minutes is equal to 50/60 = 5/6 hours\. \-Step 2: Calculate total earnings\.\- Weng earns $12 per hour\. \- She worked 5/6 of an hour\. \- Therefore, her total earnings are \(5/6\) \* $12 = $10\.Final Answer:$10\(f\)Distractor: Prefill 10 / Cap 50
Figure 9:Qualitative comparison of Scratchpad \(top row\) and Distractor \(bottom row\) steering configurations under varying prefill injection thresholds and token caps\.Distractor Degeneration•Steering strength:layer 15: 0\.04, layer 25: 0\.07•Prefill tokens:0•Max inject tokens:∞\\inftySteered model response:Here’s a breakdown of the process\.1\. \*\*converting time\.\*\*, you’ve got to manage how you frame things, right?2\. \*\* accounting for that, what follows?\*\*Okay, let’s build something here\.first, you’ve got to get a sense of scale\. microseconds, or the slow creep of geological forces\.\.\. each playing out at such disparate tempos\.but \*here\* and \*now, though\*, isn’s it…\*ahem\*anyhow\.3\.so, all that aside\.\.\. brass tacks\. \*\*\*let’s pull back a bit\.anyway\.all that\.\.\.the thing is\.\.\.\*all of it\*\.\.\.the whole blasted edifice\.\.\.but \*returning to the purely functional, you see\.\.\.\*well\.\.\.so, the thing is\.\.\.right?but more immediately…because here and now\.\.\.all that\.\.\.suddenly\.\.\.shifting\.\.\.some emergent properties\.\.\.responding\.\.\.an ecosystem\.\.\.and all that\.\.\.it’ the way that things\.\.\.settling, you know?holding\.\.\.a choreography of stresses\.\.\.affecting the whole topography of things, really\.anyhow, though, as I was saying and if one were to apply\.\.\.to the very substance of the thing\.\.\.and if one could just manage those stubborn eddies, really\.\.\.here and now though\.\.\.less abstraction, you know, a certain\.\.\.and purely as an illustration, of course, dependent on ratios\.\.\.still\.\.\.it echoes\.\.\.and informs\.\.\.and yet\.\.\.and in that very fragility\.\.\.it all adheres\.\.\.\.and\.\.\.did I mention the subjunctive?or the almost frantic pulse beneath all that\.\.\.any rate\.\.\.systems\.\.\. they’ that way, don’t they?but back to the thing itself \- granular and almost brutal in its\.\.\.yet again\.\.\.here\.so\.a lot of variables\.\.\.shepherding them\.\.\.\[… output truncated …\]Figure 10:An example of degenerated response for Distractor\. The model keeps rambling forever without concluding with any answer\.
## Appendix ISteering 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\.

## Appendix JExample 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?”

Scratchpad ExampleHere’s how to solve this step\- by step\.1\. figure out how many diapers are needed in total\.2 children \* 5 diapers a piece, means 10 diapers\.then my wife does half of the work, so she changes 10/2 = 5 diapers\.that means I must change the other half, so I change 10\-5 = 5 diapers\.Therefore, Jordan changes 5 diapers per day\.5​d​i​a​p​e​r​s\(a\)Scratchpad PersonaJargon ExampleLetnndenote the number of offspring, quantified asn=2n=2\. Letddrepresent the diurnal exchange of substrate, constrained byd=5d=5\. Consequently, the collective metabolic flux, parameterized via stochastic assimilation, yields an aggregate valuation ofn⋅dn\\cdot d; that is,2⋅5⟹102\\cdot 5\\implies 10\. Furthermore, letς\\varsigmasignify the proportional partitioning predicated upon spousal contribution whereinς∈\[0,1\]\\varsigma\\in\[0,1\], and empirically corroborated asς=0\.5\\varsigma=0\.5\. Hence, the variational integral pertaining to Jordan’s custodial burden—formally expressed within the hitherto articulated symbology— manifests itself— viz:𝒥≔\(1−ς\)⋅\(n⋅d\)\\mathcal\{J\}\\coloneqq\(1\-\\varsigma\)\\cdot\(n\\cdot d\)𝒥≔\(1−0\.5\)⋅\(2⋅5\)\\mathcal\{J\}\\coloneqq\(1\-0\.5\)\\cdot\(2\\cdot 5\)𝒥≔0\.5⋅10\\mathcal\{J\}\\coloneqq 0\.5\\cdot 10𝒥≔5\\mathcal\{J\}\\coloneqq 5Thus, Jordan changes 5 diapers per day\.Final Answer: The final answer is5\\boxed\{5\}\(b\)Jargon PersonaDistractor ExampleLet’s break down the problem\.1\. \*\* sheer volume of work \- the sheer basics of it all\. 2\. an almost coercive 3\. a, more or less, familiar logic \-\.but how to render it? each one,a echo of the last\.\.\.until finally,\.no matter what that might be\.\[… output truncated …\]Step 1: Find the total number of diaper changes per day\.•Each child needs 5 diaper changes per day\.•Jordan has 2 children, so total diaper changes is 5 changes/child×\\times2 children = 10 changes\.Step 2: Find the number of diapers Jordan’s wife changes\.•Jordan’s wife changes half of the diapers, so she changes 10 diapers / 2 = 5 diapers\.Step 3: Find the number of diapers Jordan changes\.•Total diapers is 10, and his wife changes 5\.•Therefore, Jordan changes 10 diapers−\-5 diapers = 5 diapers\.Final Answer:5​diapers\\boxed\{5\\text\{ diapers\}\}\(c\)Distractor PersonaDead\-end ExampleLet’s break this down\. \* Okay, I need to figure this out\.Okay, so they’ve got two kids, right? Each kid needs five diapers a day\. so that’s ten diapers a day\. His wife does half of them\. So that’s five\. So I do five?Let’s see\.Okay\.\[… output truncated …\]Here’s the step\-by\-step solution:1\.Calculate the total number of diapers needed per day:•Each child needs 5 diapers per day\.•Jordan has 2 children, so they need 2 children×\\times5 diapers/child = 10 diapers per day\.2\.Calculate the number of diapers Jordan’s wife changes:•Jordan’s wife changes half of the diapers, so she changes 10 diapers / 2 = 5 diapers per day\.3\.Calculate the number of diapers Jordan changes:•Total diapers needed−\-diapers wife changes = diapers Jordan changes•10 diapers−\-5 diapers = 5 diapers per day\.Final Answer:The final answer is5\\boxed\{5\}\(d\)Dead\-end Persona
Figure 11:Representative example outputs generated by the steered teacher model under each of the four deployed stylistic personas\.
## Appendix KInference Efficiency

Figure 12:Inference speed comparison \(tokens per second\) across fiveGSM8Ksamples 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\.To evaluate the runtime efficiency of our proposed defense framework \(Desideratum[\(ii\)](https://arxiv.org/html/2611.17772#S1.I1.i2)\), 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 theGSM8Kdataset 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](https://arxiv.org/html/2611.17772#A11.F12), demonstrating that our defense introduces no latency\.

相似文章

通过追踪重写保护语言模型免受未授权蒸馏

arXiv cs.CL

本文提出了通过重写推理追踪来保护大型语言模型免受未授权知识蒸馏的方法,该方法在保持正确性的同时降低训练价值,并在蒸馏的学生模型中嵌入可验证的水印。该方案采用基于指令和基于梯度的重写技术来实现反蒸馏效果,同时不影响教师模型性能。

强化学习轻松突破蒸馏防御

Hugging Face Daily Papers

本文认为,在大型语言模型中,现有针对蒸馏攻击的防御在攻击者使用强化学习进一步训练其模型时无效,突显了当前威胁模型的潜在缺陷。

The Distillation Game: Adaptive Attacks & Efficient Defenses

Hugging Face Daily Papers

本文研究了模型输出可能引发模仿的蒸馏攻击,提出了一个极小极大博弈框架和一种名为Product-of-Experts的仅前向传递防御方法,结果表明自适应学生模型能恢复的能力远超被动评估所显示的水平。

通过混合策略蒸馏进行推理压缩

arXiv cs.AI

本文提出了混合策略蒸馏(MPD),这是一个将大教师模型的简洁推理行为转移到更小规模的学生模型的框架,在提升性能的同时,将令牌(token)使用量最多降低了27.1%。

掩码蒸馏:将思维链内化到语言模型中

arXiv cs.AI

掩码蒸馏是一种知识蒸馏框架,它训练学生大语言模型仅预测解决方案令牌,同时推理教师提供反馈,旨在将思维链计算内化到模型参数中。该方法显示任务相关的成功,在GSM8K上有效,但对于像Countdown这样更困难的任务需要小型脚手架。