Remember and Recall: Associative-Memory-Based Trajectory Prediction

Hang Guo, Yuzhen Zhang, Tianci Gao, Junning Su, Pei Lv, Mingliang Xu

TL;DR

The Fragmented-Memory-based Trajectory Prediction (FMTP) model moves away from traditional continuous trajectory representations, instead using a learnable discrete memory array to store "experience fragments." By combining this discrete memory with a language-model-based reasoning engine, the system achieves state-of-the-art accuracy and significantly faster inference speeds by mimicking how humans recall and adapt past experiences to new situations.

What Problem Does This Paper Address?

Predicting where a pedestrian or vehicle will move next is a cornerstone of autonomous driving. However, most current models rely on continuous representations of movement. While precise, this approach has two major flaws:

  1. Information Redundancy: Continuous data often contains repetitive features, leading to computational inefficiency.
  2. Poor Generalization: When faced with an unfamiliar or "out-of-distribution" scenario, continuous models struggle to find a "close enough" match in their training data, leading to erratic predictions.

The authors argue that humans don't navigate by processing raw, continuous streams of every past walk. Instead, we store fragmented, prototypical memories of "turning," "passing," or "following" and recombine these fragments to handle new environments.

Methods

The authors introduce the Fragmented-Memory-based Trajectory Prediction (FMTP) model, which consists of three main components:

  • Learnable Memory Array: Using a joint reconstruction architecture (encoder-decoder), the model distills continuous trajectories into a discrete set of "memory entries" via a quantization operation. To make this non-differentiable process trainable, they employ a straight-through gradient estimator, allowing the memory array to update alongside the rest of the network.
  • Language Model Reasoning Engine: Once trajectories are converted into sequences of discrete "motion tokens" (indices in the memory array), the task becomes a Sequence-to-Sequence (Seq2Seq) problem. The authors use a Transformer-based engine to learn the "associative rules" between these tokens—essentially predicting the next "memory fragment" based on the current sequence.
  • Semi-Causal Relationship Learning: They introduce a specific attention masking technique. Unlike standard causal masks that only look backward, this semi-causal approach provides richer context during the inference phase, accelerating model convergence without leaking future information.

Datasets

The model was rigorously tested across several diverse public benchmarks:

  • ETH-UCY: Standard pedestrian trajectory datasets.
  • inD: Drone-recorded traffic data at intersections.
  • nuScenes: A large-scale autonomous driving dataset with 3D bounding boxes.
  • Waymo Open Motion Dataset: High-fidelity clips from various geographical locations.
  • VTPTL: A massive dataset containing 150 minutes of video and 4 million bounding boxes at intersections and roundabouts.

Key Insights and Ideas

  • The Power of Discretization: By forcing the model to use a discrete "vocabulary" of movements, the authors effectively "denoise" the trajectory data. This eliminates redundant information and allows the model to focus on the essential geometric features of a path.
  • Trajectories as Language: Treating a path as a series of tokens allows the model to leverage the powerful predictive capabilities of Transformers. Just as an LLM predicts the next word in a sentence, FMTP predicts the next "fragment" of a movement.
  • Efficiency via Recall: Because the model "recalls" pre-stored fragments rather than generating continuous coordinates from scratch at every step, it is significantly more computationally efficient.

Key Results

  • State-of-the-Art Accuracy: On the inD dataset, FMTP improved performance by at least 50% in ADE (Average Displacement Error) and 54% in FDE (Final Displacement Error) compared to previous methods.
  • Superior Generalization: On the complex nuScenes dataset, FMTP outperformed the previous best model (FRM) by roughly 15% to 50% across various metrics.
  • Real-Time Performance: The model is remarkably fast. It can complete a single trajectory prediction in 0.8 to 1.2 milliseconds, compared to 2.0–2.3 ms for MemoNet, making it highly suitable for real-world autonomous systems.
  • Qualitative Fluidity: Visualizations show that FMTP produces more "natural" and fluid paths in overtaking and collision-avoidance scenarios where other models produce jittery or unrealistic trajectories.

Limitations and Future Work

Despite its success, the authors note that FMTP still struggles with highly complex multi-agent interactions. For instance, in very dense crowds where multiple pedestrians are reacting to each other simultaneously, the model occasionally fails to predict the exact desired interactive behavior because it lacks a dedicated module for inter-agent feature capture.

Future directions include: * Incorporating random latent variables to better model the inherent uncertainty of human intent (e.g., "will they turn left or right?"). * Learning the temporal dynamics of the scene more deeply to understand relationships without relying on pre-defined attention decomposition. * Integrating high-definition map data to provide better environmental context for the memory recall process.

Summary updated

BibTeX
@article{guo2025remember,
  author = {Hang Guo and Yuzhen Zhang and Tianci Gao and Junning Su and Pei Lv and Mingliang Xu},
  title = {{Remember and Recall: Associative-Memory-Based Trajectory Prediction}},
  journal = {IEEE Trans. Intell. Transp. Syst.},
  year = {2025},
  doi = {10.1109/tits.2025.3568153},
}
Figure