Alignment with Preference Optimization Is All You Need for LLM Safety

Reda Alami, Ali Khalifa Almansoori, Ahmed Alzubaidi, Mohamed El Amine Seddik, Mugariya Farooq, Hakim Hacid
{"title":"Alignment with Preference Optimization Is All You Need for LLM Safety","authors":"Reda Alami, Ali Khalifa Almansoori, Ahmed Alzubaidi, Mohamed El Amine Seddik, Mugariya Farooq, Hakim Hacid","doi":"arxiv-2409.07772","DOIUrl":null,"url":null,"abstract":"We demonstrate that preference optimization methods can effectively enhance\nLLM safety. Applying various alignment techniques to the Falcon 11B model using\nsafety datasets, we achieve a significant boost in global safety score (from\n$57.64\\%$ to $99.90\\%$) as measured by LlamaGuard 3 8B, competing with\nstate-of-the-art models. On toxicity benchmarks, average scores in adversarial\nsettings dropped from over $0.6$ to less than $0.07$. However, this safety\nimprovement comes at the cost of reduced general capabilities, particularly in\nmath, suggesting a trade-off. We identify noise contrastive alignment\n(Safe-NCA) as an optimal method for balancing safety and performance. Our study\nultimately shows that alignment techniques can be sufficient for building safe\nand robust models.","PeriodicalId":501301,"journal":{"name":"arXiv - CS - Machine Learning","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2024-09-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Machine Learning","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2409.07772","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

We demonstrate that preference optimization methods can effectively enhance LLM safety. Applying various alignment techniques to the Falcon 11B model using safety datasets, we achieve a significant boost in global safety score (from $57.64\%$ to $99.90\%$) as measured by LlamaGuard 3 8B, competing with state-of-the-art models. On toxicity benchmarks, average scores in adversarial settings dropped from over $0.6$ to less than $0.07$. However, this safety improvement comes at the cost of reduced general capabilities, particularly in math, suggesting a trade-off. We identify noise contrastive alignment (Safe-NCA) as an optimal method for balancing safety and performance. Our study ultimately shows that alignment techniques can be sufficient for building safe and robust models.
与偏好优化保持一致是保证 LLM 安全的必要条件
我们证明了偏好优化方法可以有效提高LLM 的安全性。在使用安全数据集的 Falcon 11B 模型中应用各种配准技术后,我们显著提高了 LlamaGuard 3 8B 测定的全球安全得分(从 57.64%$ 提高到 99.90%$),与最先进的模型不相上下。在毒性基准上,对抗环境中的平均得分从 0.6 美元以上降至 0.07 美元以下。然而,这种安全性的提高是以通用能力的降低为代价的,特别是在数学方面,这表明需要权衡利弊。我们认为噪声对比对齐(Safe-NCA)是平衡安全性和性能的最佳方法。我们的研究最终表明,配准技术足以构建安全而稳健的模型。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信