arXiv:2511.18039cs.LG2025-11被引 4

通过几何特性修复微调后模型的安全性,不牺牲任务表现。

Curvature-Aware Safety Restoration In LLMs Fine-Tuning

  • 利用损失曲率和影响函数定位有害输入,精准调整模型
  • 在多个模型和对抗场景下,有害输出减少40%以上,性能不变或提升
  • 适合需要安全微调且不想重训的工程师和研究者

为下游任务微调大语言模型(LLMs)常导致安全性下降,即使使用参数高效方法如LoRA也如此。本文发现:无论采用何种微调方法,微调后的模型仍保留其损失景观中关于有害内容的几何结构。这表明安全行为并未被消除,而是移至参数空间中影响较小的区域。基于此洞察,我们提出一种曲率感知对齐恢复方法,结合影响函数与二阶优化,选择性地提高有害输入的损失,同时保持任务性能。通过利用基础模型与微调模型之间的共享几何结构,该方法抑制不当输出,避免全量回滚,实现低干扰的精确更新。在多个模型族和对抗设置下的广泛评估显示,该方法能有效降低有害响应,同时维持甚至提升实用性与少样本学习性能。

原文摘要 · Abstract (English)

Fine-tuning Large Language Models (LLMs) for downstream tasks often compromises safety alignment, even when using parameter-efficient methods like LoRA. In this work, we uncover a notable property: fine-tuned models preserve the geometric structure of their loss landscapes concerning harmful content, regardless of the fine-tuning method employed. This suggests that safety behaviors are not erased but shifted to less influential regions of the parameter space. Building on this insight, we propose a curvature-aware alignment restoration method that leverages influence functions and second-order optimization to selectively increase loss on harmful inputs while preserving task performance. By navigating the shared geometry between base and fine-tuned models, our method discourages unsafe outputs while preserving task-relevant performance, avoiding full reversion and enabling precise, low-impact updates. Extensive evaluations across multiple model families and adversarial settings show that our approach efficiently reduces harmful responses while maintaining or even improving utility and few-shot learning performance.

大模型安全微调修复曲率分析

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