用可信适配器池约束微调,防住恶意数据攻击
Learning Only What Valid Adapters Can Express: Subspace-Constrained Adaptation Against Fine-Tuning Poisoning
- 限定更新在可信适配器的共享子空间内,只学能表达的有效变化
- 面对攻击时,约束方法准确率仍保持62%-96%,而普通微调降至3%-26%
- 无需额外检测器,就能通过损失差异自动区分干净与污染数据
参数高效微调仍存在可被恶意目标利用的行为更新空间。本文提出一种新思路:将适配过程限制在由可信现有适配器估计出的低维共享子空间内。在使用196个公开LoRA适配器的flan-t5-large上,我们发现(1)适配器中功能相关的内容集中在低维子空间,其权重范数中有30%至38%为冗余;(2)将梯度更新限制在该子空间的128个坐标上,即可在干净分类任务上达到全量LoRA微调的效果,而在定向标签反转攻击下,普通LoRA准确率暴跌至3%-26%,而约束学习者仍保持62%-96%;(3)约束学习者无法拟合污染数据,其适应损失在干净与垃圾数据间相差两个数量级(120倍),无需额外检测器即能识别异常;(4)面对在子空间内优化的自适应后门攻击,在目标行为与池中方向不同时,攻击成功率从100%降至8%(完全阻断),在目标与池中常见行为一致时仅部分阻断(85%)。结果表明保护效果与目标接近池中方向的程度有关,但未确立明确边界。该机制以牺牲部分可塑性为代价换取安全性,前提是适配器池本身可信。代码与数据已公开。
原文摘要 · Abstract (English)
Parameter-efficient fine-tuning still leaves a broad space of behavior-changing updates reachable, so a poisoned objective can be represented and optimized. We study an alternative: adaptation constrained to the subspace estimated from a trusted pool of existing task adapters. On flan-t5-large with 196 public LoRA adapters, we show that (1) the functionally relevant content of an adapter lies in a low-dimensional shared subspace, 30 to 38 percent of its weight norm being redundant under the evaluated task distributions; (2) gradient adaptation restricted to 128 coordinates on this subspace matches full LoRA fine-tuning on clean classification data, while under targeted label inversion LoRA collapses to 3-26 percent exact match and the constrained learner keeps 62-96 percent on the tasks the pool covers; (3) the constrained learner cannot fit corrupted data, its adaptation loss separating clean from garbage by two orders of magnitude (120x), an out-of-distribution signal without an extra detector; and (4) against an adaptive backdoor attacker who optimizes within the subspace, the attack is blocked (8 percent success versus 100 for LoRA) on the task where its target behavior is unlike anything in the pool, and only partially blocked (85 percent) when the target coincides with a common pool behavior. On these two tasks the outcome is consistent with how close the target is to the pool's directions, which suggests but does not establish a pool-relative boundary. The mechanism trades peak plasticity for these properties: on tasks the pool covers poorly, unconstrained fine-tuning wins, and the protection assumes the pool itself is trusted. Code and data are public.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。