arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.06843cs.CLcs.AI
收藏

面向大语言模型安全响应的语义损失引导数据高效监督微调

Semantic Loss Guided Data Efficient Supervised Fine Tuning for Safe Responses in LLMs

Singapore Management University(新加坡管理大学);Rutgers University(罗格斯大学)

Yuxiao Lu, Arunesh Sinha, Pradeep Varakantham

AI总结:

针对大语言模型易生成不安全响应的问题,提出结合语义代价与负EMD损失的高效监督微调方法,仅需少量不安全响应数据即可提升安全性与数据效率,并探究了过度对齐的影响。

摘要:

大语言模型(LLMs)针对有毒提示生成不安全响应是其应用中的一个重要问题。尽管已有诸多研究致力于解决这一安全问题,但以往方法通常需要大量人工数据收集,或是依赖使用另一个大语言模型生成修正数据这种不太可靠的方案。本文旨在解决该问题,克服对大量高质量人工数据的需求限制。我们的方法仅需少量针对有毒提示的不安全响应,这些响应可轻易从不安全的大语言模型本身获取。通过结合语义代价与负推土机距离(Earth Mover Distance, EMD)损失,我们引导大语言模型避免生成不安全响应。此外,我们提出了一种新颖的EMD损失下界,可实现更高效的优化。实验结果表明,与基线方法相比,该方法具备更优的性能与数据效率;我们还进一步探究了使用对比数据时过度对齐的细微影响以及语言能力潜在退化的问题。

英文摘要:

Large Language Models (LLMs) generating unsafe responses to toxic prompts is a significant issue in their applications. While various efforts aim to address this safety concern, previous approaches often demand substantial human data collection or rely on the less dependable option of using another LLM to generate corrective data. In this paper, we aim to take this problem and overcome limitations of requiring significant high-quality human data. Our method requires only a small set of unsafe responses to toxic prompts, easily obtained from the unsafe LLM itself. By employing a semantic cost combined with a negative Earth Mover Distance (EMD) loss, we guide the LLM away from generating unsafe responses. Additionally, we propose a novel lower bound for EMD loss, enabling more efficient optimization. Our results demonstrate superior performance and data efficiency compared to baselines, and we further examine the nuanced effects of over-alignment and potential degradation of language capabilities when using contrastive data.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑