Locking Pretrained Weights via Deep Low-Rank Residual Distillation

📄 arXiv: 2605.10777v1 📥 PDF

作者: Keitaro Sakamoto, Pierre Ablin, Federico Danieli, Marco Cuturi

分类: cs.LG

发布日期: 2026-05-11


💡 一句话要点

提出DLR-Lock方法,通过深度低秩残差蒸馏锁定预训练模型权重以防御恶意微调。

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture)

关键词: 模型安全 大语言模型 低秩残差网络 模型蒸馏 自动微分 防御性微调 知识产权保护

📋 核心要点

  1. 现有模型防御机制易被具备完全模型知识的攻击者通过优化手段破解,难以有效阻止未经授权的权重微调。
  2. 提出DLR-Lock方法,利用自动微分的推理-训练不对称性,通过深度低秩残差网络替换MLP,显著增加反向传播的内存开销。
  3. 实验验证了该方法在保持原始模型性能的同时,能有效增加微调难度,成功抵御具备完全防御策略知识的自适应攻击。

📝 摘要(中文)

近年来,开源大语言模型的发展极大地促进了模型在各类硬件和软件平台上的应用与研究。然而,用户对模型权重的自由访问也引发了关于未经授权修改和滥用的担忧。针对此类防御问题,现有的简单结构化防御手段往往难以抵御具备完全模型知识的自适应攻击者。本文提出了一种名为DLR-Lock的新型防御机制,利用自动微分中推理与训练的不对称性作为防御轴。该方法通过将预训练模型中的MLP层替换为参数量相当的深度低秩残差网络(DLR-Net),强制在反向传播过程中产生随深度线性增长的激活内存开销。DLR-Net通过模块化蒸馏进行高效训练。实验表明,DLR-Lock不仅增加了微调的内存成本,还通过架构失配复杂化了优化空间,有效抵御了知情攻击者的微调尝试,同时保持了原始模型的能力。

🔬 方法详解

问题定义:论文旨在解决开源大语言模型面临的“恶意微调”风险。现有防御手段在面对了解模型架构和权重的攻击者时,往往因缺乏对抗性设计而失效,无法阻止攻击者对模型进行未经授权的二次训练或适配。

核心思路:利用自动微分中“推理”与“训练”在内存消耗上的不对称性。通过引入深度低秩残差网络(DLR-Net)替代原始MLP,使得模型在推理时保持高效,但在反向传播(训练)时产生巨大的内存开销,从而在物理层面增加微调难度。

技术框架:首先,将原始预训练模型的MLP层替换为DLR-Net;其次,采用模块化蒸馏(Module-wise Distillation)技术,确保DLR-Net能够精确复现原始MLP的输出;最后,在部署时锁定这些结构,使攻击者在尝试微调时面临极高的计算资源门槛。

关键创新:引入了基于深度低秩结构的“内存陷阱”。与传统加密或混淆不同,该方法通过改变计算图的拓扑结构,使得反向传播过程中的激活值存储需求随深度线性增长,从而在不影响推理性能的前提下,从根本上破坏了标准微调的优化可行性。

关键设计:DLR-Net通过低秩分解(Low-Rank Decomposition)保持参数量与原MLP相当,利用残差连接保证信息流的稳定性。训练阶段采用逐层蒸馏损失函数,确保模型在推理精度上与原始模型对齐,同时在反向传播中通过特定的计算图设计强制触发内存溢出或极高的显存占用。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果表明,DLR-Lock在保持原始模型推理性能的同时,成功增加了微调过程中的内存开销。在针对LLM的测试中,该方法使得反向传播的显存占用显著高于前向传播,且通过架构失配使得优化景观变得极其复杂,即便攻击者完全知晓防御策略,也难以通过标准微调手段有效更新模型权重,验证了其作为防御机制的鲁棒性。

🎯 应用场景

该技术主要应用于大语言模型的分发与版权保护领域。模型提供商可利用DLR-Lock锁定模型权重,防止下游用户进行未经授权的微调或恶意适配。此外,该方法在需要保护模型知识产权、防止模型被非法二次开发或用于有害任务的场景中具有重要应用价值,为开源生态下的模型安全提供了新的防御范式。

📄 摘要(原文)

The quality of open-weight language models has dramatically improved in recent years. Sharing weights greatly facilitates model adoption by enabling their use across diverse hardware and software platforms. They also allow for more open research and testing, to the extent that users can use them as checkpoints, fine-tune them according to their needs, and potentially redistribute them. In some cases, however, concerns on modifying these weights towards unauthorized uses may outweigh the pros of giving users such a freedom. Defending against such adaptation is non-trivial: since an adaptive attacker can observe all weights and architectures by definition, they can reverse simple structural defenses, and use optimization to defeat the simplest locking mechanisms. In this work, we exploit the inference-training asymmetry of automatic differentiation as a novel defense axis. We propose DLR-Lock, a method where the purveyor of the model purposely replaces each pretrained MLP in their model with a deep low-rank residual network (DLR-Net) of comparable parameter count, forcing activation memory that grows linearly with depth during backpropagation. DLR-Nets are efficiently trained via module-wise distillation. We show that, beyond this memory overhead, DLR-Lock results in architectural mismatches that complicate the optimization landscape of standard fine-tuning, and a backward pass that incurs disproportionately more overhead than the forward pass. Our defense succeeds in withstanding adaptive attackers with full knowledge of the defense strategy while preserving the original model's capabilities. Experiments on LLM validate these claims.