Lightweight defense thwarts language model cloning with style tricks
Antidistillation is Cheap: Lightweight Distillation-Resistance via Stylistic Corruption
Machine Learning
Summary
Language models can be copied by training smaller models on their answers, which is a problem for companies wanting to protect their work. The authors propose a way to subtly change the style of answers when suspicious requests are detected, so copycat models learn confusing versions that don’t work well. Regular users still get clear and useful answers, so the change is hidden. This method is simple and doesn’t slow down the system much but still makes copying the original model harder.
What this means in practice
- •For api service providers: Prevent unauthorized copying of their language models by adding style variations that confuse distillation attempts without affecting normal users.$Commercial implications: Enables selling API services with inbuilt protection against model extraction, preserving competitive advantage.
- •For cybersecurity teams: Defend deployed language models from intellectual property theft by injecting subtle stylistic changes during suspicious query patterns.
Authors
Anh Tu Ngo, Anupam Chattopadhyay
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/.