让大模型在微调时兼顾任务性能与安全对齐,避免生成有害内容。
Alignment-Aware Model Adaptation via Feedback-Guided Optimization
- 通过反馈信号动态调节梯度,优先处理不明确或偏离对齐的样本
- 微调后有害和幻觉输出显著减少,同时保持任务性能不变
- 适合需要高安全性、抗攻击的模型部署场景
微调是将基础模型适配到下游任务的主要方法;然而,现有方法通常仅优化任务目标,忽视了安全、幻觉规避等关键对齐目标。这导致微调可能损害对齐性,无法纠正预存在的偏差行为。本文提出一种对齐感知的微调框架,通过基于策略梯度的正则化引入外部对齐反馈信号。该方法设计自适应门控机制,在样本层面动态平衡监督与对齐驱动的梯度,优先处理不确定或不一致的样本,允许对齐良好的样本沿用标准监督更新。框架还学习对严重偏离对齐输入的拒答行为,并将保守响应直接融入微调后的模型中。在通用及领域特定指令微调基准上的实验表明,该方法能持续降低有害与幻觉输出,且不牺牲下游任务性能。额外分析显示其对对抗性微调、提示攻击和不安全初始化具有鲁棒性,验证了自适应门控对齐优化在保持与恢复对齐方面的有效性。
原文摘要 · Abstract (English)
Fine-tuning is the primary mechanism for adapting foundation models to downstream tasks; however, standard approaches largely optimize task objectives in isolation and do not account for secondary yet critical alignment objectives (e.g., safety and hallucination avoidance). As a result, downstream fine-tuning can degrade alignment and fail to correct pre-existing misaligned behavior. We propose an alignment-aware fine-tuning framework that integrates feedback from an external alignment signal through policy-gradient-based regularization. Our method introduces an adaptive gating mechanism that dynamically balances supervised and alignment-driven gradients on a per-sample basis, prioritizing uncertain or misaligned cases while allowing well-aligned examples to follow standard supervised updates. The framework further learns abstention behavior for fully misaligned inputs, incorporating conservative responses directly into the fine-tuned model. Experiments on general and domain-specific instruction-tuning benchmarks demonstrate consistent reductions in harmful and hallucinated outputs without sacrificing downstream task performance. Additional analyses show robustness to adversarial fine-tuning, prompt-based attacks, and unsafe initializations, establishing adaptively gated alignment optimization as an effective approach for alignment-preserving and alignment-recovering model adaptation.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。