PaCE:用于大型语言模型的简约概念工程
PaCE: Parsimonious Concept Engineering for Large Language Models
AI总结:
本文提出简约概念工程(PaCE),通过构建激活空间概念字典并利用稀疏编码分解激活,去除不良概念以实现LLM对齐,在去毒、忠实性增强等任务上达到最先进性能且保持语言能力。
摘要:
大型语言模型(LLM)正被用于各种各样的任务。虽然它们能够生成类似人类的响应,但它们也可能产生不良输出,包括潜在有害信息、种族主义或性别歧视语言以及幻觉。对齐方法旨在通过微调、提示工程和表示工程等技术来减少此类不良输出。然而,现有方法面临若干挑战:有些方法需要对每个对齐任务进行昂贵的微调;有些方法不能充分去除不良概念,导致对齐失败;有些方法去除了良性概念,降低了LLM的语言能力。为了解决这些问题,我们提出了简约概念工程(PaCE),一种新颖的用于对齐的激活工程框架。首先,为了充分建模概念,我们在激活空间中构建了一个大规模的概念字典,其中每个原子对应一个语义概念。给定任何对齐任务,我们指导一个概念分区器高效地将概念标注为良性或不良。然后,在推理时,我们通过稀疏编码沿概念字典分解LLM激活,以准确地将激活表示为良性和不良组件的线性组合。通过从激活中去除后者,我们重新引导LLM的行为朝向对齐目标。我们在响应去毒、忠实性增强和情感修正等任务上进行了实验,并表明PaCE在保持语言能力的同时实现了最先进的对齐性能。
英文摘要:
Large Language Models (LLMs) are being used for a wide variety of tasks. While they are capable of generating human-like responses, they can also produce undesirable output including potentially harmful information, racist or sexist language, and hallucinations. Alignment methods are designed to reduce such undesirable outputs via techniques such as fine-tuning, prompt engineering, and representation engineering. However, existing methods face several challenges: some require costly fine-tuning for every alignment task; some do not adequately remove undesirable concepts, failing alignment; some remove benign concepts, lowering the linguistic capabilities of LLMs. To address these issues, we propose Parsimonious Concept Engineering (PaCE), a novel activation engineering framework for alignment. First, to sufficiently model the concepts, we construct a large-scale concept dictionary in the activation space, in which each atom corresponds to a semantic concept. Given any alignment task, we instruct a concept partitioner to efficiently annotate the concepts as benign or undesirable. Then, at inference time, we decompose the LLM activations along the concept dictionary via sparse coding, to accurately represent the activations as linear combinations of benign and undesirable components. By removing the latter ones from the activations, we reorient the behavior of the LLM towards the alignment goal. We conduct experiments on tasks such as response detoxification, faithfulness enhancement, and sentiment revising, and show that PaCE achieves state-of-the-art alignment performance while maintaining linguistic capabilities.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。