arXiv:2609.04802cs.CVSep 2026

Manuscript Offprint

arXiv:2609.04802

Linguistic Trajectory Encoding for Efficient Long-Horizon Spatial Memory in Embodied Agents

Tianyidan Xie, Shenyi Wang, Qiang Tang, Mingjie Wang, Zhicheng Qiu, Xuanfu Li, Zhan Xu, Jian Yang, Lanjun Wang, Zili Yi

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

Abstract

Embodied agents performing long-horizon tasks require a memory representation in which the state transitions of dynamic objects remain queryable in natural language across hours-to-days observation horizons. Existing systems either drop fine-grained motion (clip-level video-language embeddings), keep it only as raw coordinates (geometric SLAM), or organise it around immediate task context (agent working memories). None of them gives the agent a per-object timeline whose state transitions are themselves queryable in language. Our key contribution is Linguistic Trajectory Encoding (LTE), which compresses dynamic object motion histories via a hybrid representation combining natural language descriptions, sparse spatial anchors, and visual anchors. LTE adapts compression to motion complexity by anchoring periods without reliable observations to the last seen location, while representing motion with geometric waypoints and linguistic descriptions to preserve accuracy. To evaluate these capabilities across extended time horizons, we construct the Spatial Memory Benchmark (SMB) from EgoLife multi-day recordings, targeting capabilities absent in existing benchmarks: semantic trajectory retrieval and long-horizon object retrieval. On SMB, the LTE-based system achieves 45.3% success in semantic trajectory retrieval and 48.7% in long-horizon object retrieval, outperforming structured-memory and VLM baselines (best prior: 31.9% and 34.4%). LTE achieves trajectory compression by factors of 8.7×8.7 \times to 26.1×26.1 \times with sub-second query latency on 24 h video. On Ego4D natural-language queries, the system reaches 28.75% / 55.10% R@1/R@5, +15.80 / +31.30 pts over EgoVLPv2.

1 Introduction

Consider an embodied agent that has continuously observed a kitchen for six hours when the user asks: “Where did I last put the washed apple?” To answer, the agent must recover, from a long observation history, an object named in language (“the apple”), a state change described semantically (“washed”), and a location at a specific moment in time (“where it ended up”). A single query thus forces three retrieval modes to operate together over a memory that may span hours to days.

Existing memory systems each handle some of these modes but are limited on others. Geometric SLAM [Rosinol et al., 2021, Schmid et al., 2024] maintains persistent 3D state over time but exposes no interface for natural-language predicates such as “washed”. The system can tell us where an object ended up but not whether it was washed there. Video-language models [Lin et al., 2022, Pramanick et al., 2023, Pei et al., 2024] match free-form text against clip-level features but lack a 3D index, “where did I last put it” degenerates into an exhaustive temporal scan with no spatial pruning. Memory-augmented video agents [Fan et al., 2024, Goletto et al., 2024] organise observations into temporal events (e.g., a single “kitchen activity” span) but do not maintain a per-object trajectory,

∗^{*}Corresponding authors: Xie Tianyidan (sealical@outlook.com) and Zili Yi (yi@nju.edu.cn).

Preprint.

Figure

Figure 1: Our memory system at a glance. A 24 h egocentric day is encoded into per-object Linguistic Trajectory Encoding (LTE) records, each braided from three channels: linguistic captions (CC, green), sparse spatial anchors (Aspatial\mathcal{A}_{\text{spatial}}, blue), and visual anchors (Avisual\mathcal{A}_{\text{visual}}, terracotta). An octree provides room-level spatial pruning. Natural-language queries traverse only the relevant channel(s) and recover both the location and the moment, in 0.43 s, instead of 98 s on 24 h video.

so the apple's individual history is folded into the broader event and lost. Task-oriented agent memories [Sarch et al., 2023, Wang et al., 2025] connect language with short-horizon spatial state but organise records around the current task. The apple, incidental to whatever task was active, leaves no queryable record at all. The shared shortfall lies in how dynamic objects are recorded: their motion is either dropped (clip embeddings), kept as raw 3D coordinates without semantic content (SLAM), or summarised only when task-relevant. None of these systems gives the agent a per-object timeline whose state transitions are themselves queryable in language.

We address this gap with Linguistic Trajectory Encoding (LTE), a per-object trajectory representation designed for the dynamic-object memory problem above. For each tracked object, LTE records its history through three channels: (i) a sequence of natural-language captions describing motion phases (e.g., "apple moved from sink to countertop"), (ii) sparse 3D positions retained at trajectory inflections via Douglas-Peucker simplification, and (iii) visual crops at the same anchors for identity verification. Each channel covers a query type that the others cannot: captions match state predicates such as "washed", spatial anchors answer "where" in 3D, and visual crops verify "which apple" across motion phases. Compression is adaptive: tracking-gap intervals collapse to a single anchor, simple motions retain few waypoints, and complex ones retain more, yielding compression by factors of 8.7×8.7 \times to 26.1×26.1 \times relative to dense per-frame storage. Answering the apple query then comes down to a single caption match against "washed", after which the linked 3D location and visual crop are returned (Figure 1). Furthermore, to deploy LTE on hours of egocentric video, we wrap it in a memory architecture (Figure 2) with two supporting elements: an octree spatial index providing region pruning for queries scoped to a room or area, and five complementary views (Object, Scene, Text, Event, Image) that reuse the same per-object LTE records under different access patterns.

To evaluate the LTE-based system in the long-horizon regime that motivated it, we construct the Spatial Memory Benchmark (SMB) from EgoLife [Yang et al., 2025b]: 600 queries over multi-day recordings, with individual sessions reaching 50 h. SMB introduces two new tasks, Semantic Trajectory Retrieval (STR) and Long-Horizon Object Retrieval (LOR), complementing the established Ego4D Natural Language Queries (NLQ) and Visual Queries 2D (VQ2D) benchmarks [Grauman et al., 2022]. On SMB, the LTE-based system achieves 45.3% (STR) and 48.7% (LOR), versus 31.9% and 34.4% for the strongest VLM baseline and 24.7% and 33.8% for structured-memory baselines. On Ego4D NLQ (IoU= 0.3), it reaches 28.75% / 55.10% R@1/R@5, the strongest zero-shot result.