Massive Editing for Large Language Models via Meta Learning
作者: Chenmien Tan, Ge Zhang, Jie Fu
分类: cs.CL, cs.LG
发布日期: 2023-11-08 (更新: 2024-01-25)
🔗 代码/项目: GITHUB
💡 一句话要点
提出MAhmen以解决大语言模型知识更新问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 大语言模型 知识更新 超网络 最小二乘问题 自然语言处理 信息检索 智能问答
📋 核心要点
- 现有的超网络在同步编辑操作数量上存在可扩展性不足的问题,限制了大语言模型知识的更新能力。
- MALMEN通过将参数偏移聚合为最小二乘问题,利用正规方程更新语言模型参数,提升了编辑效率。
- 实验结果显示,MALMEN能够在多种知识密集型NLP任务中编辑数百倍于强基线的事实,表现出色。
📝 摘要(中文)
大型语言模型(LLMs)虽然能够从预训练语料中学习知识,但这些知识可能会随着时间的推移而变得不正确或过时,因此需要在训练后对语言模型(LM)的知识进行修正。本文提出了一种名为MAssive Language Model Editing Network(MALMEN)的方法,通过将参数偏移聚合形式化为最小二乘问题,利用正规方程更新LM参数。该方法能够在有限的内存预算下同时编辑多个事实,支持任意批量大小的计算。实验表明,MALMEN在不同架构的LM上能够编辑数千个事实,且性能显著优于现有基线。
🔬 方法详解
问题定义:本文旨在解决大型语言模型知识更新的效率问题,现有方法在同步编辑操作时可扩展性不足,导致无法有效处理大量知识修正。
核心思路:MALMEN通过将参数偏移聚合为最小二乘问题,利用正规方程进行更新,从而实现高效的知识编辑。该设计允许在有限内存下同时处理多个事实,提升了编辑的灵活性和效率。
技术框架:MALMEN的整体架构包括超网络和语言模型两个主要模块,超网络负责生成参数偏移,而语言模型则应用这些偏移进行知识更新。通过分离计算,支持任意批量大小的处理。
关键创新:MALMEN的核心创新在于将参数偏移聚合问题形式化为最小二乘问题,这一方法显著提高了编辑操作的可扩展性,与传统超网络方法相比,能够处理更多的编辑任务。
关键设计:在设计中,MALMEN采用了正规方程来更新参数,确保了计算的高效性。此外,网络结构的设计允许在不同架构的LM上进行广泛应用,支持多种NLP任务。
🖼️ 关键图片
📊 实验亮点
实验结果表明,MALMEN在不同架构的语言模型上能够编辑数千个事实,性能超过了专为GPT设计的编辑器,且在编辑数量上比强基线高出数百倍,显示出显著的提升。
🎯 应用场景
该研究的潜在应用领域包括知识更新、信息检索和智能问答系统等。通过高效编辑大型语言模型的知识,MALMEN能够帮助提升模型在动态环境中的适应能力,具有重要的实际价值和未来影响。
📄 摘要(原文)
While large language models (LLMs) have enabled learning knowledge from the pre-training corpora, the acquired knowledge may be fundamentally incorrect or outdated over time, which necessitates rectifying the knowledge of the language model (LM) after the training. A promising approach involves employing a hyper-network to generate parameter shift, whereas existing hyper-networks suffer from inferior scalability in synchronous editing operation amount. To mitigate the problem, we propose the MAssive Language Model Editing Network (MALMEN), which formulates the parameter shift aggregation as the least square problem, subsequently updating the LM parameters using the normal equation. To accommodate editing multiple facts simultaneously with limited memory budgets, we separate the computation on the hyper-network and LM, enabling arbitrary batch size on both neural networks. Our method is evaluated by editing up to thousands of facts on LMs with different architectures, i.e., BERT-base, GPT-2, T5-XL (2.8B), and GPT-J (6B), across various knowledge-intensive NLP tasks, i.e., closed book fact-checking and question answering. Remarkably, MALMEN is capable of editing hundreds of times more facts than strong baselines with the identical hyper-network architecture and outperforms editor specifically designed for GPT. Our code is available at https://github.com/ChenmienTan/malmen.