arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.10414cs.CRcs.CLcs.LG
收藏

基于LLM的防护模型校准研究:面向可靠内容审核

On Calibration of LLM-based Guard Models for Reliable Content Moderation

National University of Singapore(新加坡国立大学);University of Copenhagen(哥本哈根大学);Rutgers University(罗格斯大学)

Hongfu Liu, Hengguan Huang, Xiangming Gu, Hao Wang, Ye Wang

AI总结:

本研究实证评估9个基于LLM的防护模型在12个基准上的置信度校准,发现其过度自信、易受越狱攻击影响且鲁棒性不足,并提出温度缩放和上下文校准方法以提升可靠性。

摘要:

大语言模型(LLM)因其可能生成有害内容或用户试图绕过防护措施而带来重大风险。现有研究已开发出基于LLM的防护模型,旨在审核威胁性LLM的输入和输出,通过阻止违反安全协议的内容来确保部署时遵守安全策略。然而,对这些防护模型的可靠性和校准问题的关注有限。在本工作中,我们对9个现有基于LLM的防护模型在12个基准上的置信度校准进行了全面的实证研究,涵盖用户输入和模型输出分类任务。我们的研究发现,当前的基于LLM的防护模型倾向于:1)产生过度自信的预测;2)在遭受越狱攻击时表现出显著的校准误差;3)对不同类型响应模型生成的输出表现出有限的鲁棒性。此外,我们评估了事后校准方法在缓解校准误差方面的有效性。我们证明了温度缩放的效力,并首次强调了上下文校准在防护模型置信度校准中的益处,尤其是在缺乏验证集的情况下。我们的分析和实验凸显了当前基于LLM的防护模型的局限性,并为未来开发校准良好的防护模型以实现更可靠的内容审核提供了宝贵见解。我们还主张在发布未来的基于LLM的防护模型时,纳入置信度校准的可靠性评估。

英文摘要:

Large language models (LLMs) pose significant risks due to the potential for generating harmful content or users attempting to evade guardrails. Existing studies have developed LLM-based guard models designed to moderate the input and output of threat LLMs, ensuring adherence to safety policies by blocking content that violates these protocols upon deployment. However, limited attention has been given to the reliability and calibration of such guard models. In this work, we empirically conduct comprehensive investigations of confidence calibration for 9 existing LLM-based guard models on 12 benchmarks in both user input and model output classification. Our findings reveal that current LLM-based guard models tend to 1) produce overconfident predictions, 2) exhibit significant miscalibration when subjected to jailbreak attacks, and 3) demonstrate limited robustness to the outputs generated by different types of response models. Additionally, we assess the effectiveness of post-hoc calibration methods to mitigate miscalibration. We demonstrate the efficacy of temperature scaling and, for the first time, highlight the benefits of contextual calibration for confidence calibration of guard models, particularly in the absence of validation sets. Our analysis and experiments underscore the limitations of current LLM-based guard models and provide valuable insights for the future development of well-calibrated guard models toward more reliable content moderation. We also advocate for incorporating reliability evaluation of confidence calibration when releasing future LLM-based guard models.

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

↑