ChatPaper.aiChatPaper

DuoMem: 通过双空间蒸馏实现高效的设备端内存代理

DuoMem: Towards Capable On-Device Memory Agents via Dual-Space Distillation

June 29, 2026
作者: Peyman Hosseini, Ondrej Bohdal, Ahmed Alajrami, Andrea Maracani, Ignacio Castro, Matthew Purver, Mete Ozay, Savas Ozkan, Taha Ceritli
cs.AI

摘要

基于大语言模型(LLM)的智能体能够通过多轮交互与环境协作,解决复杂的过程性任务,但这一能力通常依赖于大型模型、长上下文和重复的推理调用。这使得先进的记忆增强型智能体难以部署在资源受限的设备上。我们提出DuoMem——一种双空间蒸馏框架,将过程性问题的解决能力从大型教师模型迁移至紧凑的学生模型。DuoMem在两个互补空间中进行蒸馏:(1)上下文空间蒸馏,将学生生成的记忆替换为教师生成的高质量过程记忆,并将其前置到学生模型的输入中;(2)参数空间蒸馏,在成功的教师轨迹上微调轻量级LoRA适配器。在具有挑战性的具身决策基准测试ALFWorld上的评估表明,DuoMem将40亿参数模型的任务成功率从4.3%提升至77.9%,基本弥合了与720亿参数教师模型(成功率87.1%)之间的差距,同时仅增加不到1000万可训练参数和数兆字节的预计算教师记忆。此外,经DuoMem增强的40亿模型在完成任务的时钟时间上比720亿模型快3倍以上,使其适用于对教师模型而言极具挑战的实时边缘部署。在涵盖2B至72B参数的八个模型上的广泛消融实验表明,两个蒸馏维度均提供了互补的贡献。
English
Large Language Model (LLM)-based agents can solve complex procedural tasks by interacting with environments over multiple turns, but this ability typically depends on large models, long contexts, and repeated inference calls. This makes advanced memory-augmented agents difficult to deploy on resource-constrained devices. We introduce DuoMem, a dual-space distillation framework that transfers procedural problem-solving ability from a large teacher model to compact student models. DuoMem distils in two complementary spaces: (1)context-space distillation, which replaces student-generated memories with higher-quality teacher-generated procedural memories prepended to the student's input, and (2)parameter-space distillation, which fine-tunes lightweight LoRA adapters on successful teacher trajectories. Evaluated on ALFWorld, a challenging embodied decision-making benchmark, DuoMem boosts a 4B-parameter model from 4.3% to 77.9% task success rate, closing most of the gap to a 72B teacher model (87.1%), while adding fewer than 10M trainable parameters and only a few megabytes of pre-computed teacher memories. Moreover, the DuoMem-enhanced 4B model completes tasks over 3x faster than the 72B teacher in wall-clock time, making it viable for real-time edge deployment, which would be challenging for the teacher.Extensive ablations across eight models spanning 2B-72B parameters reveal that both distillation axes contribute complementary