用可灵活合并的局部参数记忆增强模型,减少遗忘且仅增0.02%参数
Locas: Your Models are Principled Initializers of Locally-Supported Parametric Memories
- 设计类FFN的局部参数记忆,支持持续学习与参数复用
- 仅用0.02%额外参数即可存储整本书内容,保持小上下文窗口
- 通过重用模型参数/激活/梯度实现合理初始化,防遗忘
本文提出Locas——一种可灵活固化到模型参数中的局部支持型参数记忆。其结构借鉴现代Transformer的FFN模块,支持高效持续学习。提出两种变体:一种为传统两层MLP,具备清晰理论保障;另一种采用SOTA大模型通用的GLU-FFN结构,可无缝接入现有模型,实现参数与计算双重高效。关键在于,通过复用模型参数、激活值或梯度对低秩侧向FFN式记忆进行合理初始化,可显著加速收敛、提升泛化能力并防止灾难性遗忘。在PG-19全书语言建模和LoCoMo长上下文对话问答任务上验证:最低仅增加0.02%参数,Locas-GLU即能存储过往上下文信息,同时维持更小的上下文窗口。对比MMLU评估显示,经整书记忆后,模型内部知识损失极小,展现出将历史内容永久化为参数知识的潜力。
原文摘要 · Abstract (English)
In this paper, we aim to bridge test-time-training with a new type of parametric memory that can be flexibly offloaded from or merged into model parameters. We present Locas, a Locally-Supported parametric memory that shares the design of FFN blocks in modern transformers, allowing it to be flexibly permanentized into the model parameters while supporting efficient continual learning. We discuss two major variants of Locas: one with a conventional two-layer MLP design that has a clearer theoretical guarantee; the other one shares the same GLU-FFN structure with SOTA LLMs, and can be easily attached to existing models for both parameter-efficient and computation-efficient continual learning. Crucially, we show that proper initialization of such low-rank sideway-FFN-style memories -- performed in a principled way by reusing model parameters, activations and/or gradients -- is essential for fast convergence, improved generalization, and catastrophic forgetting prevention. We validate the proposed memory mechanism on the PG-19 whole-book language modeling and LoCoMo long-context dialogue question answering tasks. With only 0.02\% additional parameters in the lowest case, Locas-GLU is capable of storing the information from past context while maintaining a much smaller context window. In addition, we also test the model's general capability loss after memorizing the whole book with Locas, through comparative MMLU evaluation. Results show the promising ability of Locas to permanentize past context into parametric knowledge with minimized catastrophic forgetting of the model's existing internal knowledge.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。