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 將一個 4B 參數模型的任務成功率從 4.3% 提升至 77.9%,大幅縮小了與 72B 教師模型(87.1%)的差距,同時僅增加不到 1000 萬個可訓練參數及數 MB 的預計算教師記憶。此外,經過 DuoMem 增強的 4B 模型在實際時鐘時間上完成任務的速度比 72B 教師模型快 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