Manuscript Offprint

arXiv:2610.32332

4DMemory: Benchmarking Long-Horizon Spatiotemporal Memory with Harness-Augmented Agents

Yanhao Jia, Yi Zhu, Yiran Zhong, Weigao Sun, Feida Zhu, Pengkun Jiao, Sihan Yang, Ming Ma, Steven Hoi, Erik Cambria

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Humans efficiently process multimodal streams spanning hours to years, building persistent, fine-grained spatiotemporal memories that support reasoning about and predicting long-horizon events. In contrast, existing benchmarks focus on short- and medium-context tasks, and most foundation models struggle to preserve fine-grained information over long horizons. To evaluate and improve long-horizon spatiotemporal reasoning, we introduce the LongVideo dataset and the 4DMemoryBench. LongVideo comprises about 900 hours of video and over 5,000 manually reviewed questions covering visual, textual, and spatiotemporal reasoning across diverse context lengths. We further develop the 4DMemory Harness, which integrates four complementary skills, 22+ specialized tool models, and a model-specific retrieval-augmented generation system. Evaluating 13 leading models, we find that standalone foundation models struggle with long-horizon tasks, while the 4DMemory Harness improves all of them by over 50%. Compared to previous benchmark, the same models exhibit a performance drop of more than 10% on 4DMemoryBench. We hope 4DMemory will facilitate the development of spatiotemporal agents capable of addressing complex, long-horizon tasks.

1 Introduction

Humans do not always know in advance which aspects of an unfolding experience will matter to a future goal. They form long-term memories as the world evolves and, once a concrete goal arises, selectively retrieve relevant experiences, integrate them with new observations, and update their current understanding (Tulving and Thomson, 1973; Hupbach et al., 2007). This interaction between persistent memory and goal-directed recall enables reasoning across long temporal horizons. As multimodal large language models (MLLMs) advance from static-image perception toward video understanding and multimodal reasoning (Maaz et al., 2024; Li et al., 2024a; Gemini Team, 2024; Wang et al., 2024a), developing an analogous capability becomes increasingly important for artificial systems. Long-horizon 4D tasks require models to preserve how entities, spatial relations, states, and events evolve over time, so that observations made hours earlier can inform later reasoning.

Although modern MLLMs perform strongly on many vision-language tasks, they remain poorly matched to long-horizon 4D reasoning. First, a nominally long context window does not imply an equally long effective video context, as dense video generates long sequences of visual tokens that impose substantial computational and memory costs during visual encoding and attention. Practical systems therefore depend on sparse frame sampling or token compression, which may discard fine-grained evidence before the eventual task is known (Wu et al., 2024; Fu et al., 2025). Second, strong long-text reasoning does not by itself provide the multimodal alignment, temporal reasoning, and spatial understanding needed to connect events across changing scenes (Liu et al., 2024; Yang et al., 2025). As a result, directly processing hours of video with an MLLM remains unreliable for complex 4D tasks whose evidence is distributed across distant moments, scenes, and temporal scales.

Prior work has addressed these limitations through complementary interventions at the system, model, and method levels. At the system level, agentic harnesses iteratively retrieve query-relevant frames, maintain structured temporal and object memories, and orchestrate multi-granular search or specialist tools (Wang et al., 2024b; Fan et al., 2024; Ma et al., 2025; Zhang et al., 2026). At the model level, long-video MLLMs extend their effective visual horizon through long-context training, compact per-frame tokenization, and explicit temporal encoding (Chen et al., 2025; Li et al.,

†^{\dagger}Corresponding authors.

Illustrative film example

Figure

Figure 1: Motivation for 4DMemory Agent. (a) Traditional models with limited active context may lose access to earlier observations, leaving relevant evidence unavailable for temporal reasoning. (b) 4DMemory Agent coordinates persistent memory and task-specific skills through a harness to retrieve evidence and reason over events and their relations.

2024b; Bai et al., 2025). At the method level, adaptive spatiotemporal compression removes redundant frames and visual tokens, sparse memory consolidates dense observations into long-term representations, and query-adaptive hierarchical selection allocates computation across temporal granularities (Shen et al., 2025; Song et al., 2024; Wang et al., 2025b). Together, these advances improve access to long-range evidence, but their gains are typically evaluated under different datasets, interfaces, and access conditions, making it difficult to isolate improvements in the base model, evidence acquisition, memory, and final reasoning. Moreover, these components are not readily composable across systems, since methods such as LongVU require access to the internal vision-token pipeline, whereas LongVT learns its tool-use protocol through model-specific post-training of Qwen2.5-VL-7B rather than through a model-agnostic plug-in interface (Shen et al., 2025; Yang et al., 2026).

Moreover, expanding a model’s nominal context window determines how much input it can accept, but not how much distributed evidence it can use effectively, as performance degrades with increasing context length and task complexity even when all relevant evidence is perfectly retrieved (Hsieh et al., 2024; Du et al., 2025). External memory and RAG reduce the raw context presented at once, but shift the bottleneck to deciding what to store, compress, update, retrieve, and ultimately use; current systems can lose visual fidelity during memory construction and remain far below human performance on long-term temporal and causal reasoning (Maharana et al., 2024; Ren et al., 2026). Reusable skills and tools provide procedural guidance and specialist capabilities, but their gains depend strongly on the task and harness, while reliable execution requires correct routing and parameter grounding and deteriorates as tool catalogs, tool outputs, and interaction histories grow (Li et al., 2026c; Kate et al., 2025; Shen et al., 2026). Consequently, as task horizons and dependency depth grow by orders of magnitude, errors accumulate across memory construction, retrieval, skill selection, and reasoning, and current systems have yet to demonstrate stable and reliable performance on complex multimodal tasks that demand human-like episodic recall, temporal integration, memory updating, and coordinated action.

Therefore, we introduce LongVideo, a dataset comprising over 1,000 standalone long videos and two multi-season television series, with approximately 900 hours of video in total. Based on LongVideo, we build LongVideo, which contains more than 5,000 question-answer pairs and combines multi-evidence questions on individual videos with episode-, season-, and complete-series queries across visual, textual, and spatiotemporal reasoning. To support a broad range of LLMs and

BenchmarkCorpus (h)Temporal extent (Max)Multi-History Scope?Harness Support?
Video-MME (Fu et al., 2025)2541 h✕✕
LongVideoBench (Wu et al., 2024)NR1 h✕✕
HourVideo(Chandrasegaran et al., 2024)3812 h✕✕
LVBench (Wang et al., 2025a)11768.4 min✕✕
InfiniBench (Ataallah et al., 2025)> 1,00052.6 min✕✕
EgoMonth (Chen et al., 2026)3014-5 hoursa✓✓
MemLens (Ren et al., 2026)N/A32K–256K tokens✓✓
4DMemoryBench (Ours)≈ 88797.98 h✓✓

Table 1: Comparison with representative long-video and multimodal-memory benchmarks. Corpus hours measure total source-video duration, whereas temporal extent describes the video input or history scale, not the minimum evidence needed to answer a question. The final column summarizes documented evaluation or harness functionality, rather than whether third-party agents could be integrated.

MLLMs, we further develop the 4DMemory Harness. Following the principle of task-independent storage and goal-directed recall, the harness first constructs reusable, question-independent memories of long video streams and then performs question-conditioned retrieval and specialized evidence acquisition when a concrete task arrives. This design decouples the temporal scope of a task from the model's native context window, allowing the foundation model and the harness to operate together as the 4DMemory Agent.

Our contributions are summarized as below:

  1. We curate the LongVideo and the 4DMemory-Bench, which is, to our knowledge, the first multimodal video benchmark in which an individual question can bind more than 100 hours of ordered source video. The benchmark contains 1,000+ videos, 5,000+ manually reviewed QA pairs, and 850+ hours of source video across visual, textual, and spatiotemporal reasoning.

  2. We develop the 4DMemory Agent, a model-flexible inference framework that integrates multiple complementary skills and tools, a memory-centric RAG system, and more than 20 supporting models. It constructs reusable question-independent memories and performs question-conditioned retrieval and specialized evidence acquisition, decoupling task duration from the native context window of the underlying LLM or MLLM.

  3. Through a comprehensive evaluation of leading LLMs and MLLMs, we show that standalone models struggle with complex long-horizon 4D tasks, while harness-equipped 4DMemory Agent consistently improve their performance across task types and temporal scales.

References (24)