Programmatic Multimodal Memory: Learning to Read Long Videos with Code
Abstract
Answering questions about hours- or days-long videos requires finding a few seconds of evidence in recordings far longer than any model can read at once. Most memory systems decide what matters at write time. Before any question arrives, they consolidate the video into compressed memory banks or structured graphs and lose details that later questions need. We instead defer this decision to read time. Programmatic Multimodal Memory (PMM) writes a multi-scale temporal memory of timestamped captions and transcripts once, without consolidation, and keeps it aligned with the raw video. Single-round retrieval misses much of the evidence, so a Root model reads this memory with code over multiple turns in a persistent Python REPL. Its programs filter records across days, query a frozen submodel in batches, and inspect raw frames on demand. The Root now decides what matters, yet small open-weight models struggle zero-shot to coordinate code search and frame inspection. We therefore train Qwen3.5-9B as the Root in this REPL with evidence-grounded supervised fine-tuning and outcome-reward reinforcement learning. The resulting PMM-9B gains 12.1 points over its zero-shot version and outperforms every open-source model and agent baseline on all five personal-memory and long-video benchmarks. It also beats standalone GPT-5 and Gemini 2.5 Pro on average, and by nearly 20 points on week-long EgoLifeQA. Open-source baselines that use more input tokens per question than PMM-9B are all less accurate, and those that use fewer score at least 16.6 points lower. Project page: https://shadow-weave.github.io/PMM/.
Get this paper in your agent:
hf papers read 2611.41408 Don't have the latest CLI?
curl -LsSf https://hf.co/cli/install.sh | bash Models citing this paper 0
No model linking this paper
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper
Collections including this paper 0
No Collection including this paper