← Latest papers
🤖 machine learning

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

The paper introduces DuoMem, a dual-space distillation framework that combines context-space memory augmentation and parameter-space fine-tuning to enable compact on-device LLMs to achieve near-teacher-level performance in complex procedural tasks while significantly reducing latency and resource requirements.

Original authors: Peyman Hosseini, Ondrej Bohdal, Ahmed Alajrami, Andrea Maracani, Ignacio Castro, Matthew Purver, Mete Ozay, Savas Ozkan, Taha Ceritli

Published 2026-06-30
📖 4 min read☕ Coffee break read

Original authors: Peyman Hosseini, Ondrej Bohdal, Ahmed Alajrami, Andrea Maracani, Ignacio Castro, Matthew Purver, Mete Ozay, Savas Ozkan, Taha Ceritli

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a brilliant but exhausted professor (the Teacher) who can solve complex household chores perfectly, but they are too slow and expensive to hire for every single task. Then, you have a bright but inexperienced intern (the Student) who is fast and cheap, but often gets lost, forgets what to do, or tries to open a drawer without walking to it first.

The paper introduces DuoMem, a training system designed to turn that clumsy intern into a master chef using two specific teaching methods. The goal is to let the small, fast intern do the work of the big professor, but on a regular smartphone or robot without needing a supercomputer.

Here is how DuoMem works, using simple analogies:

The Problem: The "Small Brain" Struggle

Large AI models are like geniuses who can solve a puzzle in 14 steps. Small AI models (like the 4-billion-parameter one tested) are like people trying to solve the same puzzle by guessing. They might wander around the house for 30 steps, try to pick up a spatula from a wall, and eventually give up. They lack "procedural memory"—the ability to remember how to do things based on past experiences.

The Solution: DuoMem (The Dual-Training Camp)

DuoMem teaches the small intern using two different "spaces" or methods at the same time.

1. Context-Space Distillation: The "Cheat Sheet"

  • The Old Way: When the intern tries a new task, they have to write their own notes on how to do it based on their own (often bad) memories.
  • The DuoMem Way: Before the intern even starts, the Professor writes a perfect, high-quality "cheat sheet" (a procedural script) based on how they solved similar tasks in the past.
  • How it works: When the intern faces a new task, the system hands them the Professor's cheat sheet. The intern doesn't have to figure out the strategy from scratch; they just read the Professor's notes and follow them.
  • The Analogy: It's like giving a student a textbook summary right before a test, rather than asking them to write the summary themselves while taking the test.

2. Parameter-Space Distillation: The "Muscle Memory"

  • The Old Way: The intern reads the cheat sheet but still fumbles their hands because they haven't practiced the specific movements.
  • The DuoMem Way: The system takes all the times the Professor successfully solved tasks and uses them to "fine-tune" the intern's brain. It's not just giving notes; it's rewiring the intern's neural pathways to mimic the Professor's successful habits.
  • How it works: The system trains a tiny, lightweight add-on (called LoRA) on the intern's brain. This add-on learns the "muscle memory" of the Professor's successful moves.
  • The Analogy: It's like a dance instructor watching a master dancer and then adjusting the student's posture and muscle tension so they naturally move like the master, even without looking at the notes.

The Results: Fast, Cheap, and Smart

The paper tested this on a virtual house called ALFWorld, where the agent has to do things like "clean a spatula and put it in a drawer."

  • Without DuoMem: The small 4B model was terrible. It succeeded only 4.3% of the time. It took about 29 steps and nearly 19 seconds per task.
  • With DuoMem: The same small model succeeded 77.9% of the time. It took only 21 steps and about 5 seconds.
  • The Comparison: The small model with DuoMem became almost as good as the massive 72-billion-parameter Professor (who succeeded 87.1% of the time), but it was 3 times faster and required a tiny fraction of the computing power.

Why This Matters

The paper claims that you don't need a massive, slow supercomputer to have a smart agent on your phone or robot. By combining the Professor's cheat sheets (Context) with the Professor's muscle memory (Parameters), a small, fast model can do complex tasks in real-time.

Key Takeaway: DuoMem proves that a small model doesn't need to be "dumb" if it is taught the right way. It can borrow the brainpower of a giant model without actually needing to carry the giant model's weight.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →