arXiv:2610.06210cs.CVOct 2026

Manuscript Offprint

arXiv:2610.06210

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

Yiming Xu, Hao Cheng, Monika Sester

Yiming Xu 1∗^{1*} Hao Cheng 2^{2} Monika Sester 1^{1}

1^{1}Institute of Cartography and Geoinformatics

Leibniz University Hannover, 30167 Hannover, Germany

2^{2}Faculty of Geo-Information Science and Earth Observation

University of Twente, 7522 NH Enschede, The Netherlands

{Yiming.Xu, Monika.Sester}@ikg.uni-hannover.de

h.cheng-2@utwente.nl

Figure

Figure 1: Paradigm comparison. ① Query-based encoder–decoder methods generate trajectory proposals and refine them through additional decoding stages. ② Trajectory-space autoregressive methods explicitly decode each sub-trajectory, update the local frame, and re-tokenize the predicted motion for the next step. ③ In contrast, MoCAR represents endpoint-normalized trajectory segments as continuous motion codes and performs autoregressive next-code prediction directly in latent space, avoiding explicit trajectory queries and proposal-and-refinement pipelines.

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 MoCAR (Motion-code Coordinate-aware AutoRegression), 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

*Corresponding author: Yiming.Xu@ikg.uni-hannover.de.

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

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.

1 Introduction

Trajectory forecasting predicts agents' future motion from their observed histories, road context, and interactions with other agents. As an agent moves, the relevant lanes and neighboring agents change. Autoregressive forecasting can update this context after each predicted segment [1]. The key design choice is what motion representation to pass to the next prediction step. We propose MoCAR (Motion-code Coordinate-aware AutoRegression) to learn continuous motion codes for this purpose. Each code captures local trajectory geometry and the reference-frame transition induced by the segment. Predicted codes directly condition subsequent steps, while decoded endpoints update the local scene context. We refer to this direct reuse of the prediction state as clean autoregression.

Learning a reusable motion unit poses three challenges. First, position, velocity, heading, and curvature vary continuously. The representation must preserve the small differences between nearby motions. Second, the same observed history can lead to different futures, such as going straight, turning, or yielding [2, 3, 4]. Third, each predicted segment changes the position and heading used to query nearby lanes and agents [4, 1]. Unlike visual tokens that tile a fixed image grid, a motion token represents a state transition. It must describe local trajectory geometry and the relative pose change that establishes the next frame. MoCAR addresses these requirements with coordinate-aware continuous codes and separate rollout branches for multiple possible futures.

Existing forecasting methods use different prediction units and decoding pipelines (Figure 1). Vectorized and query-based encoder-decoder methods achieve strong forecasting performance [3, 5, 6, 7, 4]. Many use goal candidates, motion queries, anchor-informed proposals, or refinement stages [2, 8, 9, 10, 11]. DONUT [1] unifies history encoding and future rollout in a decoder-only model. It updates the local frame along predicted segments, but each step still generates, refines, and re-embeds a trajectory segment. Proposal generation, refinement, and feedback re-encoding introduce additional computation. Task-specific decoding designs can also limit the reuse of learned motion representations across datasets and prediction horizons. MoCAR instead learns continuous motion codes that jointly represent local trajectory shape and the induced frame transition. Each predicted code directly conditions the next prediction, while decoding supplies the trajectory and the next scene anchor. Forecasting therefore follows a shared next-code prediction rule over reusable motion units, without feedback re-encoding or additional refinement.

We learn the motion codes with a variational autoencoder [12]. Each trajectory segment is normalized using the position and heading of its endpoint. The code thus captures local motion geometry and the reference-frame transition induced by the segment. Following DONUT's history-conditioning strategy [1], codes from observed segments form a teacher-forced prefix. A shared causal predictor generates future codes using temporal memory, map context, and interactions among agents and modes. Learned mode embeddings initialize K rollout branches for different future hypotheses. The tokenizer and de-tokenizer are pretrained for reconstruction and then jointly optimized with the forecaster. Weak KL regularization promotes a smooth code space, while latent alignment supervises predicted codes. This yields a single-stage decoder-only forecaster.

The learned code space also provides a reusable vocabulary of local state transitions. Endpoint normalization removes dependence on global position and orientation. This is useful for cross-dataset transfer, where observation and prediction horizons, coordinate conventions, and motion distributions can change [13, 14]. On Argoverse (AV) benchmarks [15, 16], MoCAR achieves top-tier AV2 accuracy, strong AV2-to-AV1 zero-shot transfer, and improved performance on turn-heavy scenes.

Controlled ablations examine code learning and direct code feedback. A matched-stride comparison also shows lower latency than the strong baseline DONUT.

Our contributions are summarized as follows:

• We introduce coordinate-aware continuous motion codes for trajectory segments. Each code represents local motion geometry and the reference-frame transition needed for the next scene update.

• We formulate trajectory forecasting as persistent latent autoregression over these codes. To our knowledge, MoCAR is the first decoder-only trajectory forecaster to directly predict and reuse such codes. It requires no trajectory-space re-tokenization or additional refinement.

• We demonstrate strong AV2 performance, AV2-to-AV1 zero-shot transfer, and gains on turn-heavy scenes. Controlled ablations examine the contributions of motion-code learning and persistent feedback. Matched-stride evaluation shows lower latency than the strong decoder-only baseline DONUT.

Our code is publicly available at https://github.com/XuYiMing83/MoCAR.

References (44)