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

面向大语言模型的推理时按类别安全引导

Towards Inference-time Category-wise Safety Steering for Large Language Models

School of Computing and AI(计算与人工智能学院);Arizona State University(亚利桑那州立大学);NVIDIA(英伟达公司)

Amrita Bhattacharjee, Shaona Ghosh, Traian Rebedea, Christopher Parisien

AI总结:

本文提出一种无需训练的推理时按类别安全引导方法,利用类别特定引导向量和更优向量提取技术,在保持文本质量的同时增强多个 LLM 的安全性。

摘要:

尽管大语言模型(LLM)在多种用例中的能力和应用已取得前所未有的进展,但这些模型的安全对齐仍是一个活跃的研究领域。LLM 具有脆弱性,即使是经历了大量对齐和安全训练机制的模型也不例外,因此有必要通过无需训练、在推理时执行的方法增加额外的安全引导步骤。近期机制可解释性领域的工作研究了潜在表征空间中的激活如何编码概念,并随后通过表征工程在 LLM 输出中诱导此类概念,但这类方法在安全方面的适用性仍相对缺乏探索。不同于近期的推理时安全引导工作,本文利用以下方式探索 LLM 输出的安全引导:(i)类别特定的引导向量,从而实现对引导过程的细粒度控制;(ii)用于提取信息丰富的引导向量的先进方法,以在保持生成文本质量的同时实现更有效的安全引导。我们在多个 LLM 和数据集上展示了这一探索,证明了所提出引导方法的有效性,并讨论了其影响和最佳实践。

英文摘要:

While large language models (LLMs) have seen unprecedented advancements in capabilities and applications across a variety of use-cases, safety alignment of these models is still an area of active research. The fragile nature of LLMs, even models that have undergone extensive alignment and safety training regimes, warrants additional safety steering steps via training-free, inference-time methods. While recent work in the area of mechanistic interpretability has investigated how activations in latent representation spaces may encode concepts, and thereafter performed representation engineering to induce such concepts in LLM outputs, the applicability of such for safety is relatively under-explored. Unlike recent inference-time safety steering works, in this paper we explore safety steering of LLM outputs using: (i) category-specific steering vectors, thereby enabling fine-grained control over the steering, and (ii) sophisticated methods for extracting informative steering vectors for more effective safety steering while retaining quality of the generated text. We demonstrate our exploration on multiple LLMs and datasets, and showcase the effectiveness of the proposed steering method, along with a discussion on the implications and best practices.

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

↑