arXiv:2410.12999cs.CL2024-10ICML被引 7

用教师模型生成数据,让大模型更安全且减少过度拒绝。

POROver: Improving Safety and Reducing Overrefusal in Large Language Models with Overgeneration and Preference Optimization

  • 用GPT-4o等强模型自动生成指令数据,提升模型安全性。
  • 安全指标提升,有用性从11.1%增至82.1%,过拒大幅减少。
  • 适合追求高安全又不牺牲实用性的大模型部署场景。

近年来,如何在大语言模型中同时实现高安全性和高实用性成为关键挑战。模型常出现不安全行为或过度谨慎导致对良性提示频繁拒绝,降低可用性。这主要源于微调与对齐过程中数据的性质和范围。本文研究使用先进教师模型(如GPT-4o)对通用及有毒提示进行过生成数据的影响。此外,提出POROver对齐策略,通过偏好优化和教师模型生成结果,减少过拒绝并保持安全性。实验表明,针对通用提示过生成可显著提升安全性能,使安全与实用性综合得分(F1)从74.4%升至91.8%;对有毒提示过生成使实用性从11.1%提升至57.6%,且不降低安全性;应用POROver后实用性进一步提升至82.1%,安全性仍保持稳定。代码与数据已公开于https://github.com/batuhankmkaraman/POROver。

原文摘要 · Abstract (English)

Achieving both high safety and high usefulness simultaneously in large language models has become a critical challenge in recent years.Models often exhibit unsafe behavior or adopt an overly cautious approach leading to frequent overrefusal of benign prompts, which reduces their usefulness. A major factor underlying these behaviors is how the models are finetuned and aligned, particularly the nature and extent of the data used.In this work, we examine how overgenerating finetuning data with advanced teacher models (e.g., GPT-4o)-covering both general-purpose and toxic prompts-affects safety and usefulness in instruction-following language models.Additionally, we present POROver, an alignment strategy designed for models that are highly safe but prone to overrefusal. POROver employs preference optimization algorithms and leverages completions from an advanced teacher model to reduce overrefusals while maintaining safety.Our results show that overgenerating completions for general-purpose prompts significantly boosts safety with only a minimal impact on usefulness. Specifically, the F1 score calculated between safety and usefulness increases from 74.4% to 91.8% because of a substantial rise in safety. Moreover, overgeneration for toxic prompts raises usefulness from 11.1% to 57.6% while preserving safety. Finally, applying POROVer increases usefulness further-from 57.6% to 82.1%-while keeping safety at comparable levels. Our data and code are available at https://github.com/batuhankmkaraman/POROver.

大模型对齐安全增强过拒绝偏好优化

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