arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2607.22625cs.AIcs.LG

TokenMem:为冻结的语言模型进行忠实的知识注入

TokenMem: Faithful Knowledge Injection for Frozen LLMs

Chengzhang Yu, Chenyang Zheng, Zening Lu, Yingru He, Yutong Huang, Yiming Zhang, Yue Xu, Zhanpeng Jin

首次发表
浏览论文内容

中文总结 AI 辅助

研究针对RAG增强LLMs时的知识冲突问题,提出TokenMem轻量级记忆系统,通过专用通道向冻结LLMs注入知识,经两阶段课程训练薄门控适配器,实验显示其在反事实基准上知识一致性远超普通RAG,两阶段课程关键,门控适配器能自主学习策略。

中文摘要 AI 辅助

检索增强生成(RAG)用外部知识增强大型语言模型(LLMs),但存在知识冲突问题:当检索信息与参数记忆矛盾时,共享的自注意力路径会产生不可预测的输出。我们提出TokenMem,一种轻量级记忆系统,通过专用的交叉注意力通道将知识注入冻结的LLMs,绕过与残差流中参数记忆的竞争。TokenMem通过两阶段课程仅训练一个薄的门控适配器(约300万 - 700万参数):首先学习一般知识利用,然后在反事实知识下强化忠实一致性。在对三个系列的五个模型(Qwen3 - 4B/8B/14B,LLaMA - 3.1 - 8B,OLMo - 3 - 7B)的控制实验中,TokenMem在反事实基准上实现了69 - 70%的知识一致性(KC),而普通RAG为20 - 52%,差距高达49个百分点。消融研究表明两阶段课程至关重要:去除第二阶段会使KC降至接近零。机制分析表明门控适配器在无明确监督的情况下学习到冲突感知、特定层的注入策略。

英文摘要

Retrieval-augmented generation (RAG) enhances large language models (LLMs) with external knowledge, but suffers from knowledge conflicts: when retrieved information contradicts parametric memory, the shared self-attention pathway produces unpredictable outputs. We present TokenMem, a lightweight memory system that injects knowledge into frozen LLMs through a dedicated cross-attention channel, bypassing competition with parametric memory in the residual stream. TokenMem trains only a thin gating adapter ($\sim$3-7M parameters) via a two-phase curriculum: first learning general knowledge utilization, then strengthening faithful compliance under counterfactual knowledge. In controlled experiments on five models spanning three families (Qwen3-4B/8B/14B, LLaMA-3.1-8B, OLMo-3-7B), TokenMem achieves 69-70% Knowledge Compliance (KC) on counterfactual benchmarks, compared to 20-52% for vanilla RAG, a gap of up to 49 percentage points. Ablation studies show that the two-phase curriculum is critical: removing Phase 2 collapses KC to near-zero. Mechanistic analysis reveals that the gate adapter learns a conflict-aware, layer-specific injection strategy without explicit supervision.

发表机构

  • South China University of Technology(华南理工大学)
  • University of Science and Technology of China(中国科学技术大学)

机构由 AI 辅助整理,请以论文原文为准。

补充信息

↑