MoCAR: Motion-code Coordinate-aware AutoRegression for Continuous Trajectory Forecasting

Yiming Xu, Hao Cheng, Monika SesterNeurIPS 2026

TL;DR

Large language models make autoregressive prediction look easy because discrete words naturally double as the state for the next step—physical motion has no such luxury. MoCAR introduces continuous, coordinate-aware "motion codes" that allow autonomous driving models to predict trajectories step-by-step directly in latent space. It strips away clunky refinement stages and re-encoding loops, achieving state-of-the-art forecasting accuracy, faster inference, and impressive zero-shot generalization across datasets.

What Problem Does This Paper Address?

Imagine driving through a busy intersection. As you turn left, the lanes that matter to you—and the cars you might collide with—constantly shift. Predicting how traffic will unfold requires updating your perspective as agents move.

Autoregressive generation (predicting the future one chunk at a time) is ideal for this, just as it is for generating text. However, physical motion lacks a clean, reusable "token." Motion is continuous, multimodal (an agent might go straight, yield, or turn), and tied to local coordinate frames that rotate and shift with every movement.

Comparison of trajectory forecasting paradigms

Existing forecasting models handle this with heavy machinery: either multi-stage query-and-refinement pipelines, or autoregressive loops (like the recent DONUT model) that must decode a predicted latent state into physical coordinates, update the reference frame, refine the path, and re-encode it back into latent space for the next step. All that back-and-forth adds latency and makes learned representations brittle when moving to new datasets. The authors ask: Can we design a continuous motion token that lets a decoder-only model roll out predictions cleanly in latent space?

Methods

MoCAR (Motion-code Coordinate-aware AutoRegression) solves this with two core innovations:

1. Endpoint-Normalized Continuous Motion Codes (Novel): Trajectories are sliced into short, overlapping local segments (e.g., 1.5 seconds long). Instead of expressing a segment from its starting point, MoCAR normalizes all points relative to the position and heading of its endpoint. Because the start point is retained inside this normalized segment, the representation naturally captures both the local curve of the path and the exact coordinate-frame transition from the previous segment to the new endpoint. A Variational Autoencoder (VAE)—pretrained for reconstruction and jointly fine-tuned with the predictor—compresses each segment into a 24-dimensional continuous vector: the motion code.

Figure 2: Coordinate-aware motion segment. Each local trajectory segment is normalized in the coordinate frame of its endpoint anchor and encoded as a continuous motion code. This code jointly represents local geometry and the induced frame transition, making it the autoregressive prediction unit in MoCAR.

2. Persistent Latent Autoregression (Novel): Past observations are tokenized into a prefix of motion codes. To handle multiple possible futures (say, $K=6$ hypotheses), learned mode embeddings branch the final historical code into $K$ parallel rollout streams. At each step, a causal predictor outputs the next motion code. Crucially, this predicted code persists directly as the input state for the next step—no trajectory re-encoding or refinement needed. Meanwhile, a lightweight de-tokenizer decodes the segment solely to grab the new endpoint pose so the model can refresh its view of nearby lanes and agents.

Figure 3: Decoder-only motion-code autoregression in MoCAR. Historical segments are tokenized into a teacher-forced motion-code prefix, and future prediction rolls out autoregressively in latent space. Mode embeddings separate latent rollout branches, while the predictor updates each branch using temporal, map, agent, and mode interactions before decoding the next segment and endpoint anchor. MoCAR therefore forecasts directly in code space, without trajectory-space re-tokenization or proposal-and-refinement pipelines.

What’s Standard: The scene-conditioning mechanics—using Fourier features for relative geometry and attention layers across time, map polylines, neighboring agents, and modes—are adapted from established vectorized forecasting models like QCNet and DeMo.

Datasets

The authors use two standard autonomous driving benchmarks (no new datasets are introduced):

  • Argoverse 2 (AV2): Primary training and evaluation benchmark (250k scenarios across six cities; 5s history, 6s future prediction at 10 Hz).
  • Argoverse 1 (AV1): Used exclusively to test zero-shot cross-dataset transfer (2s history, 3s future at 10 Hz, with different agent labels and motion state conventions).

Key Insights and Ideas

  • Anchor at the destination, not the origin: Normalizing a segment by its endpoint rather than its start point means the resulting token leaves the agent already aligned with the exact coordinate frame needed to query the map for the next step.
  • Stop re-encoding your predictions: Passing predicted continuous codes directly to the next step outperforms decoding and re-encoding trajectories (reducing 6-second endpoint error from 1.21m to 1.17m), proving that latent persistence preserves subtle motion state better over long rollouts.
  • Smoothness requires a delicate touch: Turning off the VAE's KL regularization (making it a standard autoencoder) or freezing the tokenizer causes noticeable accuracy drops. Weak KL regularization paired with a latent-alignment loss creates a smooth, predictable latent manifold organized naturally by speed, turn angle, and agent type (vehicles vs. pedestrians/cyclists).

Key Results

  • Top-tier AV2 Accuracy: On the AV2 test set ($K=6$ modes), MoCAR hits 1.17m minimum Final Displacement Error ($\text{minFDE}_6$), 0.62m minimum Average Displacement Error ($\text{minADE}_6$), and ties for the best Miss Rate (0.13), matching complex multi-stage refinement models like DeMo and DONUT with a simpler single-stage architecture.
  • Zero-Shot Transfer Champion: Taking an AV2-trained model and dropping it straight onto AV1 without fine-tuning, MoCAR achieves 1.24m $\text{minFDE}_6$ and 0.11 $\text{MR}_6$—substantially beating QCNet (1.55m) and DONUT (1.58m). Endpoint-normalized codes genuinely act as a reusable, dataset-agnostic motion vocabulary.
  • Better on Sharp Turns: On turn-heavy scenarios ($\ge 45^\circ$ heading change), MoCAR achieves the lowest error (1.99m $\text{minFDE}_6$, 0.28 $\text{MR}_6$) compared to DONUT (2.01m, 0.31) and QCNet (2.37m, 0.36).
  • Faster Rollouts: With 6.3M parameters on a single RTX 4090, MoCAR runs in 97.9 ms at a matched stride—a 22.7% latency reduction over DONUT (126.7 ms)—and 66.8 ms (~15 fps) at its default 15-step stride.

Limitations and Future Work

  • Error accumulation: Because predictions feed into subsequent steps and update coordinate frames, motion and pose errors can still compound over long horizons, especially during rare or aggressive maneuvers.
  • Fixed clock rates: Zero-shot transfer was only tested between 10 Hz datasets; transferring to sensors with different sampling rates would require temporal resampling or adapting the token duration.
  • Downstream planning: Mode probabilities are trained for ranking trajectories rather than calibrated uncertainty, leaving their effectiveness in closed-loop vehicle planning untested. Still, the authors note that coordinate-aware continuous motion tokens could naturally extend to robotics, aerial drones, and embodied AI.

Summary updated

Abstract

Autoregressive generation is natural for language, where predicted tokens can be directly reused as the next prediction state, but trajectory forecasting lacks such a clean token: motion is continuous, multimodal, and expressed in local coordinate frames that evolve with the predicted trajectory. We present $\textbf{MoCAR}$ ($\textbf{Mo}$tion-code $\textbf{C}$oordinate-aware $\textbf{A}$uto$\textbf{R}$egression), a decoder-only framework that casts trajectory forecasting as next-code prediction in a coordinate-aware continuous latent space. MoCAR learns a continuous motion-code space for endpoint-normalized trajectory segments, where each code jointly captures local trajectory geometry and the reference-frame transition induced by that segment. Historical motion codes are used as a teacher-forced prefix, future codes are generated autoregressively under temporal, map, agent, and mode interactions, and predicted codes persist in latent memory while decoded endpoints update the local scene context. This enables rollout without trajectory-space re-tokenization, trajectory queries, goal candidates, or proposal-and-refinement pipelines. On Argoverse (AV) benchmarks, MoCAR achieves top-tier performance with a simple single-stage architecture, transfers strongly from AV2 to AV1 in zero-shot evaluation, and improves on turn-heavy scenarios. Ablations confirm that the learned continuous motion-code space, latent alignment, weak KL regularization, and joint tokenizer-predictor optimization are essential for stable latent autoregression.
BibTeX
@inproceedings{xu2026mocar,
  author = {Yiming Xu and Hao Cheng and Monika Sester},
  title = {{MoCAR: Motion-code Coordinate-aware AutoRegression for Continuous Trajectory Forecasting}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=l6217PyQb0},
}
Figure