用分布对齐方法防止大模型微调时安全性能下降。
Safeguarding LLM Fine-tuning via Push-Pull Distributional Alignment
- 通过最优传输理论构建双参考拉-推机制,实现分布级安全对齐。
- 在多个模型和领域上显著提升安全性,同时保持良好下游性能。
- 适合关注大模型安全微调的开发者与研究者使用。
大语言模型在微调过程中,其内在安全性容易因看似无害的数据集而退化。现有防御方法多依赖启发式的实例级评估,忽略数据分布的整体几何结构,且未能显式排斥有害模式。为此,我们提出安全最优传输(SOT)框架,将安全微调从实例级过滤问题转化为基于最优传输的分布级对齐任务。核心是双参考的“拉-推”加权学习机制:SOT通过主动将下游分布拉向可信的安全锚点,同时推离通用的有害参考,建立稳健的几何安全边界,有效净化训练数据。在多种模型族和领域的广泛实验表明,SOT显著提升模型安全性,同时保持竞争力的下游表现,相较于基线实现了更优的安全-效用权衡。
原文摘要 · Abstract (English)
The inherent safety alignment of Large Language Models (LLMs) is prone to erosion during fine-tuning, even when using seemingly innocuous datasets. While existing defenses attempt to mitigate this via data selection, they typically rely on heuristic, instance-level assessments that neglect the global geometry of the data distribution and fail to explicitly repel harmful patterns. To address this, we introduce Safety Optimal Transport (SOT), a novel framework that reframes safe fine-tuning from an instance-level filtering challenge to a distribution-level alignment task grounded in Optimal Transport (OT). At its core is a dual-reference ``push-pull'' weight-learning mechanism: SOT optimizes sample importance by actively pulling the downstream distribution towards a trusted safe anchor while simultaneously pushing it away from a general harmful reference. This establishes a robust geometric safety boundary that effectively purifies the training data. Extensive experiments across diverse model families and domains demonstrate that SOT significantly enhances model safety while maintaining competitive downstream performance, achieving a superior safety-utility trade-off compared to baselines.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。