arXiv:2505.19504cs.LGcs.AI2025-05被引 16

通过微调输出层让大模型输出误导抄袭者,保护自身知识不被窃取。

DOGe: Defensive Output Generation for LLM Protection Against Knowledge Distillation

  • 仅微调教师模型最后一层线性层,用对抗损失生成误导性输出。
  • 学生模型从防御输出中蒸馏后性能大幅下降,准确率显著降低。
  • 适合需要防止知识被逆向蒸馏的商业大模型开发者使用。

大型语言模型(LLMs)是巨大的智力与经济投资,但其输出可能被竞争对手通过知识蒸馏(KD)模仿。在实际场景中,对手可通过观察公开输出,如同逆向工程般复现模型能力。现有防护方法如水印仅能事后识别模仿,而其他防御假设学生模型模仿教师内部逻辑,对仅依赖输出文本的蒸馏无效。本文提出防御性输出生成(DOGe)策略,在仅支持API访问的现实约束下主动保护大模型。该方法通过仅微调教师模型最后一层线性层,引入对抗损失,使输出对合法用户仍准确有用,却对蒸馏过程具有强误导性。实验表明,尽管教师模型性能保持不变,但从防御输出中蒸馏的学生模型性能急剧下降,验证了DOGe作为实用抗蒸馏保护方案的有效性。

原文摘要 · Abstract (English)

Large Language Models (LLMs) represent substantial intellectual and economic investments, yet their effectiveness can inadvertently facilitate model imitation via knowledge distillation (KD). In practical scenarios, competitors can distill proprietary LLM capabilities by simply observing publicly accessible outputs, akin to reverse-engineering a complex performance by observation alone. Existing protective methods like watermarking only identify imitation post-hoc, while other defenses assume the student model mimics the teacher's internal logits, rendering them ineffective against distillation purely from observed output text. This paper confronts the challenge of actively protecting LLMs within the realistic constraints of API-based access. We introduce an effective and efficient Defensive Output Generation (DOGe) strategy that subtly modifies the output behavior of an LLM. Its outputs are accurate and useful for legitimate users, yet are designed to be misleading for distillation, significantly undermining imitation attempts. We achieve this by fine-tuning only the final linear layer of the teacher LLM with an adversarial loss. This targeted training approach anticipates and disrupts distillation attempts during inference time. Our experiments show that, while preserving the performance of the teacher model, student models distilled from the defensively generated outputs demonstrate catastrophically reduced performance, demonstrating DOGe as a practical safeguard against KD-based model imitation.

大模型安全知识蒸馏防御机制

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。