arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.05764cs.CL
收藏

通过概念激活向量控制大型语言模型

Controlling Large Language Models Through Concept Activation Vectors

Key Lab of Intelligent Information Processing of Chinese Academy of Sciences(中国科学院智能信息处理重点实验室);Key Lab of AI Safety of Chinese Academy of Sciences(中国科学院人工智能安全重点实验室);University of Chinese Academy of Sciences(中国科学院大学);Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学高瓴人工智能学院)

Hanyu Zhang, Xiting Wang, Chengao Li, Xiang Ao, Qing He

AI总结:

针对LLM受控生成资源消耗大或控制粒度粗的问题,提出轻量级GCAV框架,通过训练并引导概念激活向量实现毒性、情感、风格和主题的精确控制。

摘要:

随着大型语言模型(LLM)在各个领域得到广泛部署,控制其生成输出的能力变得愈发关键。这种控制包括使LLM输出与人类价值观和伦理原则保持一致,或为个体用户在特定主题或风格上定制LLM。现有的受控生成方法要么需要大量计算资源和广泛的试错,要么只能提供粗粒度控制。本文提出Generation with Concept Activation Vector(GCAV,基于概念激活向量的生成),这是一个轻量级模型控制框架,无需耗费大量资源的微调即可确保精确控制。具体而言,GCAV首先针对毒性等待控制的指定概念训练一个概念激活向量。在推理过程中,GCAV引导LLM中的概念向量,例如从激活层中移除毒性概念向量。从毒性降低、情感控制、语言风格和主题控制等不同角度开展的控制实验表明,该框架以细粒度控制取得了最先进性能,允许针对单个样本对引导层和引导幅度进行精细调整。

英文摘要:

As large language models (LLMs) are widely deployed across various domains, the ability to control their generated outputs has become more critical. This control involves aligning LLMs outputs with human values and ethical principles or customizing LLMs on specific topics or styles for individual users. Existing controlled generation methods either require significant computational resources and extensive trial-and-error or provide coarse-grained control. In this paper, we propose Generation with Concept Activation Vector (GCAV), a lightweight model control framework that ensures accurate control without requiring resource-extensive fine-tuning. Specifically, GCAV first trains a concept activation vector for specified concepts to be controlled, such as toxicity. During inference, GCAV steers the concept vector in LLMs, for example, by removing the toxicity concept vector from the activation layers. Control experiments from different perspectives, including toxicity reduction, sentiment control, linguistic style, and topic control, demonstrate that our framework achieves state-of-the-art performance with granular control, allowing for fine-grained adjustments of both the steering layers and the steering magnitudes for individual samples.

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

↑