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

语言模型的机制性行为编辑

Mechanistic Behavior Editing of Language Models

TU Darmstadt(达姆施塔特工业大学);IIT Delhi(德里印度理工学院)

Joykirat Singh, Subhabrata Dutta, Tanmoy Chakraborty

AI总结:

针对大语言模型受噪声虚假特征影响泛化性差、监督微调数据效率低的问题,提出任务适配方法TaRot,用贝叶斯优化的可学习旋转矩阵干预神经回路,显著提升零样本和少样本性能。

摘要:

在网络规模文本上训练的大语言模型(Large Language Models,LLMs)具备可解决广泛任务的语言生成能力,尤其是当任务知识通过上下文示例被优化融入生成先验时效果更显著。然而,从噪声数据中学到的虚假特征会阻碍其泛化能力。监督微调虽能引入任务特异性,但存在数据效率低下的问题。已有研究表明:(1)LLMs中噪声神经回路与可泛化神经回路共存;(2)微调通常是增强或抑制现有能力,而非引入新能力。基于此,我们提出一种新型任务适配方法TaRot。TaRot使用可学习旋转矩阵干预神经回路,这些旋转矩阵通过贝叶斯优化(Bayesian Optimization),按标准少样本提示示例的顺序在标注样本上进行优化。在不同规模LLMs的多个分类和生成任务上的实验验证了TaRot的有效性,其零样本和少样本性能均得到提升,(跨模型和任务的)平均提升幅度分别为23.81%和11.15%。源代码可在https://github.com/joykirat18/TaRot获取。

英文摘要:

Large Language Models trained on web-scale text acquire language generation abilities that can solve a wide range of tasks, particularly when task knowledge is refined into the generative prior using in-context examples. However, spurious features learned from noisy data hinder their generalizability. Supervised finetuning can introduce task specificity, but introduce data inefficiency. Prior studies indicate that (i) noisy neural circuitries coexist with generalizable ones within LLMs, and (ii) finetuning typically enhances (or suppresses) existing abilities without introducing newer ones. Building upon these, we propose TaRot, a novel method for task adaptation. TaRot intervenes in the neural circuitries using learnable rotation matrices that are optimized using Bayesian Optimization, on labelled samples in the order of standard few-shot prompting examples. Experiments on multiple classification and generation tasks using LLMs of varying sizes reveal the efficacy of TaRot, improving upon both zero- as well as few-shot performance, with average improvements (across models and tasks) of 23.81% and 11.15%, respectively. The source code is available at https://github.com/joykirat18/TaRot

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

↑