通过可学习旋转矩阵精准调整语言模型神经回路,提升零样本与少样本表现。
Mechanistic Behavior Editing of Language Models
- 用可学习旋转矩阵干预模型内部神经回路,优化任务适配。
- 在多任务上平均提升零样本性能23.81%、少样本性能11.15%。
- 适合需要高效微调且避免过拟合的场景,尤其适用于资源受限部署。
大规模语言模型通过网络文本训练获得广泛的语言生成能力,尤其在使用上下文示例将任务知识融入生成先验后表现更优。然而,从噪声数据中学习到的虚假特征会损害其泛化能力。监督微调虽能增强特定任务表现,但存在数据效率低的问题。已有研究指出:(i)语言模型中同时存在噪声与通用性神经回路;(ii)微调通常增强或抑制已有能力,而非引入新能力。基于此,本文提出TaRot方法,利用可学习旋转矩阵对神经回路进行干预,并通过贝叶斯优化在标准少样本提示样例的标签数据上进行优化。在多个分类与生成任务上对不同规模的语言模型进行实验,结果表明TaRot显著提升零样本与少样本性能,平均提升分别为23.81%和11.15%。代码已开源:https://github.com/joykirat18/TaRot。
原文摘要 · Abstract (English)
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
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。