NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

3D Reconstruction with Spatial Memory

Hengyi Wang, Lourdes Agapito

TL;DR

Spann3R turns the paradigm of feedforward 3D vision (popularized by DUSt3R) into a streaming, real-time pipeline. By introducing an external spatial memory that stores and sparsifies past 3D geometric features, Spann3R incrementally regresses global pointmaps on-the-fly at over 65 frames per second (fps) without requiring camera parameters or test-time optimization.

What Problem Does This Paper Address?

Traditional 3D reconstruction pipelines (such as Structure-from-Motion and visual SLAM) rely on a complex cascade of handcrafted steps: feature matching, triangulation, bundle adjustment, and multi-view stereo. Recently, DUSt3R dramatically simplified this process by training transformers to directly predict 3D pointmaps from uncalibrated image pairs.

However, DUSt3R only predicts pointmaps in the local coordinate system of each image pair. To reconstruct an entire scene, it must construct a dense pairwise graph and perform an expensive, offline global optimization to align all views. This optimization prevents real-time processing and limits scalability for streaming video. Spann3R eliminates this optimization bottleneck, enabling online, incremental 3D reconstruction in a single feedforward pass.

Methods

Spann3R builds upon the pre-trained weights and dual-decoder architecture of DUSt3R, but repurposes the network into a recurrent framework augmented by an external spatial memory:

[ Incoming Frame It ] ──> ViT Encoder ──> Visual Feature
                                              │
[ Query ft-1^Q ] ──> Read from Spatial Memory ─┴─> Cross-Attention Decoders
                           (Working + Long-term)         │
                                              ┌──────────┴──────────┐
                                              ▼                     ▼
                                       Target Decoder       Reference Decoder
                                              │                     │
                                        Next Query ft^Q       Pointmap & Conf.
                                                                    │
                                                              Memory Encoder
                                                                    │
                                                                    ▼
                                                            Spatial Memory Bank
  • Repurposed Decoders: Rather than predicting two views of an image pair independently, Spann3R’s target decoder generates a query feature for the next frame, while the reference decoder predicts the 3D pointmap and confidence values in a persistent global coordinate frame.
  • Spatial Memory Bank:
  • A lightweight memory encoder translates past predictions and decoder features into memory keys and values.
  • Memory readout is performed via cross-attention between the current query and stored memory keys.
  • An attention threshold ($5 \times 10^{-4}$) clips small weights, preventing distant spatial outliers from corrupting the readout.
  • Two-Tiered Memory Management: Inspired by human memory models (via XMem), the system maintains:
  • Working Memory: Stores dense representations of the most recent 5 frames to capture local spatial relationships. Redundant features (similarity $> 0.95$) are discarded.
  • Long-Term Memory: Old working memory frames drain into long-term storage. To constrain GPU memory and compute, Spann3R tracks accumulated attention weights and periodically sparsifies long-term memory, retaining only the top-$k$ most informative tokens.
  • Curriculum Training: The network is trained on 5-frame sequences sampled with dynamically adjusting window intervals, allowing the model to learn both short-term tracking and long-range dependencies.

Datasets

  • Training: Posed RGB-D data from six datasets: ScanNet, ScanNet++, ARKitScenes, BlendedMVS, Co3D-v2, and a synthetic subset of Habitat.
  • Evaluation (Unseen Benchmarks): Zero-shot transfer was benchmarked on 7Scenes, NRGBD, and DTU. Qualitative generalization was demonstrated on Map-free Reloc, ETH3D, MipNeRF-360, NeRF synthetic, and TUM-RGBD.
  • Note: No new datasets were introduced.

Key Insights and Ideas

  • Memory Replaces Global Alignment: Instead of using non-linear least squares to stitch pairwise predictions together after the fact, Spann3R learns cross-attention retrieval over a persistent 3D memory bank. The neural network learns to "snap" new geometry into the canonical frame on-the-fly.
  • Long-Term Memory is Essential to Prevent Drift: Relying solely on a short working memory (5 frames) causes rapid trajectory drift. Retaining a compact set of long-term memory tokens (e.g., around 4,000 tokens) provides anchor points that maintain global consistency.
  • Clipping Small Attention Weights Matters: In dense cross-attention, thousands of tiny background attention weights accumulate and corrupt the fused geometric features. Pruning weights below $5 \times 10^{-4}$ significantly improves geometric stability.

Key Results

  • Throughput: Online reconstruction runs at $\sim$65.5 fps (and up to 72 fps in few-view mode) with an 11 GB memory footprint on a single NVIDIA RTX 4090 GPU—representing a massive speedup over DUSt3R's optimization pass ($<1$ fps).
  • Accuracy:
  • On 7Scenes, Spann3R achieves median accuracy of 0.0148 m and completion of 0.0085 m, closely matching full DUSt3R ($0.0123\text{ m} / 0.0091\text{ m}$) despite running without test-time optimization.
  • In few-view evaluation, Spann3R (FV) achieves competitive results (median accuracy $0.0111\text{ m}$ on 7Scenes) compared to DUSt3R$^\dagger$ ($0.0133\text{ m}$).
  • Zero-Shot Generalization: Generates consistent geometry across diverse indoor and outdoor scenes, demonstrating an internal understanding of structural regularities (e.g., flat, textureless walls in Manhattan-world scenes).

Limitations and Future Work

  • Drift and Loop Closures: Because Spann3R runs purely feedforward without bundle adjustment, errors can still accumulate over extended sequences. When closing large loops, the model may fail to align endpoints accurately.
  • Forward Camera Motion: Performance degrades when traversing large-scale or multi-room environments where the camera continuously moves forward away from the origin frame, primarily due to training on 5-frame sequences.
  • Resolution Bottlenecks: To keep multi-frame training tractable on available hardware, models were trained at $224 \times 224$ resolution, leading to smoothed-out thin structures compared to full-resolution DUSt3R ($512 \times 384$).
  • Future Work: Integrating hybrid learned/traditional bundle adjustment to refine memory tokens, training on longer high-resolution video streams, and exploring self-supervised objectives on unposed casual videos.

Summary updated

BibTeX
@inproceedings{wang2025d,
  author = {Hengyi Wang and Lourdes Agapito},
  title = {{3D Reconstruction with Spatial Memory}},
  booktitle = {3DV},
  year = {2025},
  url = {https://openreview.net/forum?id=NaTnWehi7O},
}
Figure