TrajRAG: Retrieving Geometric-Semantic Experience for Zero-Shot Object Navigation

Yiyao Wang, Sixian Zhang, Keming Zhang, Xinhang Song, Songjie Du, Shuqiang Jiang

TL;DR

TrajRAG introduces a retrieval-augmented generation (RAG) framework for zero-shot Object Goal Navigation that builds a "long-term memory" of 3D spatial experiences. By converting raw navigation paths into a compact "topological-polar" representation, it allows large language models to exploit real-world geometric-semantic layouts from past episodes rather than relying solely on web-text commonsense.

What Problem Does This Paper Address?

Object Goal Navigation (ObjectNav) requires an embodied agent (like a robot) to find a specific object (e.g., a "couch") in an entirely unseen environment using only egocentric RGB-D camera views. Recently, researchers have used Large Language Models (LLMs) and Vision-Language Models (VLMs) as zero-shot planners because they possess immense commonsense knowledge about where objects are typically located (e.g., refrigerators are usually in kitchens).

However, web-scale text training doesn't equate to embodied 3D spatial experience. Furthermore, standard zero-shot methods typically discard the observations they collect after each navigation episode ends. This means the agent never actually learns from its own history or accumulates lifelong experience across different environments.

Figure 1. Comparisons with LLM/VLM-based Zero-shot Object- Nav methods. (a) Single-step context. the planner (LLM/VLM) receives raw textual observations from the single timestep. (b) Episodic context. episodic memory is structured into prompts for reasoning but discarded after each episode. (c) Episode + expe- rience context. our TrajRAG serves as long-term memory that continuously accumulates episodic memory and retrieves geomet- ric–semantic experience for planning.

Methods

To bridge this gap, the authors propose Trajectory RAG (TrajRAG), which continuously indexes and retrieves historical navigation experiences to guide an LLM planner. The framework relies on three core components:

  1. Topological-Polar (Topo-Polar) Trajectory Representation: Storing raw video frames or point clouds is computationally prohibitive and highly redundant. Instead, TrajRAG builds a semantic map, skeletonizes the navigable space into topological nodes, and discretizes the surrounding area into 12 polar sectors (30° each). Each sector records nearby semantic labels. Loops and redundant paths are pruned out, leaving a highly compact, loop-free fingerprint of the environment's layout.
  2. Hierarchical Chunking Architecture: Trajectories are stored as "chunks." To make retrieval efficient, chunks with similar topological structures are grouped into a unified topo-polar summary graph, which acts as a coarse index.
  3. Coarse-to-Fine Retrieval: During navigation, the agent identifies potential exploration frontiers and generates candidate path hypotheses. It then queries TrajRAG using a two-stage pipeline:
  4. Coarse matching: Matches the current layout against the topo-polar summaries using semantic and geometric alignment (via RANSAC).
  5. Fine-grained matching: Uses a dedicated trajectory encoder (DistilBERT + DistilGPT2 trained via contrastive learning) to find the most relevant specific trajectory chunks within the selected groups.

The retrieved experiences are translated into natural language descriptions and fed directly into the LLM planner (Qwen3-32B) to help it choose the best next waypoint.

The TrajRAG Navigation Framework

Datasets

The authors collected over 350,000 navigation trajectories from the training splits of two major datasets to build the TrajRAG knowledge base:

  • HM3Dv1 & HM3Dv2 (Habitat-Matterport 3D)
  • MP3D (Matterport3D)

Evaluation was performed on the validation sets of these datasets within the Habitat simulator.

Key Insights and Ideas

  • Geometry + Semantics is the Winning Combo: Ablation studies revealed that using only geometry (layouts without object labels) or only unorganized text descriptions performs significantly worse. The structured, directional pairing of what object is where relative to the agent is what makes the memory actionable.
  • Cross-Dataset Generalization: One of the most exciting findings is that a TrajRAG corpus built entirely from one dataset (e.g., HM3D) generalizes remarkably well to an entirely different dataset (e.g., MP3D) with negligible performance drops. This proves that the topo-polar format captures universal, scene-invariant spatial relationships.
  • Filtering via Layout Pre-Retrieval: Directly retrieving trajectories using flat text embeddings causes a major performance drop. Coarse scene-level matching based on layout topology is essential to filter out irrelevant contexts before fine-grained trajectory matching occurs.

Key Results

TrajRAG achieved new state-of-the-art (SOTA) performance across all evaluated benchmarks for zero-shot ObjectNav, outperforming existing LLM/VLM-based methods in both Success Rate (SR) and Success weighted by Path Length (SPL):

  • MP3D: Reached 42.6% SR and 18.0% SPL (outperforming the previous best, UniGoal, at 41.0% SR).
  • HM3Dv1: Reached 62.5% SR and 33.9% SPL (outperforming BeliefMapNav at 61.4% SR).
  • HM3Dv2: Reached 78.1% SR and 40.2% SPL (significantly outperforming ApexNAV at 76.2% SR / 38.0% SPL).

Limitations and Future Work

Specific limitations and future directions were not explicitly detailed by the authors in the provided text. However, they noted that for the sake of controlled evaluation, TrajRAG was pre-built on training data and kept frozen during testing. While the architecture natively supports dynamic, real-time test-time updates to accumulate lifelong experience, evaluating the long-term scaling behavior and potential memory saturation of an infinitely growing database remains an open area for exploration.

Summary updated

BibTeX
@inproceedings{wang2026trajrag,
  author = {Yiyao Wang and Sixian Zhang and Keming Zhang and Xinhang Song and Songjie Du and Shuqiang Jiang},
  title = {{TrajRAG: Retrieving Geometric-Semantic Experience for Zero-Shot Object Navigation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=B4xB2t2Rt3},
}
Figure