Looking Ahead and Back: Anticipatory Generative Modeling for Road-Network Trajectories

arXiv cs.AI Papers

Summary

论文提出一种面向路网轨迹生成的图约束生成范式 Anticipatory Generative Modeling,并提出模型 Foresight,通过"anticipate–select–update–re-anticipate"循环解决路口转移选择问题,超越扩散模型等基线方法。

arXiv:2610.13131v1 Announce Type: new Abstract: Trajectory generation underpins urban applications such as traffic management and urban planning. Within road networks, vehicle movement along road segments is largely deterministic, whereas transitions at intersections are critical--multiple outgoing paths may appear equally plausible, yet they can lead to substantially different downstream routes. Existing generative methods such as diffusion models simulate location sequences and fail short of next transition selection, even producing trajectories that drift off the road network. To fill this gap, we advocate a fundamental shift: moving beyond location simulation toward behavior modeling on the road network. In this paper, we revisit trajectory generation through the lens of generative route planning, and introduce a new graph-constrained generative paradigm, Anticipatory Generative Modeling, which resolves next transition selection by incorporating the Anticipation of how the future route may unfold toward the destination. Concretely, we propose a novel generative model named Foresight that formulates a probabilistic model for an "anticipate--select--update--re-anticipate" loop that enables longer-term foresight while continuing sequential generation along the historical trajectory. Extensive experiments demonstrate that Foresight wins state-of-the-art baselines.
Original Article
View Cached Full Text

Cached at: 10/12/26, 06:37 AM

# Looking Ahead and Back: Anticipatory Generative Modeling for Road-Network Trajectories
Source: [https://arxiv.org/html/2610.13131](https://arxiv.org/html/2610.13131)
Li SunAffiliation:Beijing University of Posts and TelecommunicationsPhilip S\. YuAffiliation:University of Illinois Chicago

###### Abstract

Trajectory generation underpins urban applications such as traffic management and urban planning\. Within road networks, vehicle movement along road segments is largely deterministic, whereas transitions at intersections are critical—multiple outgoing paths may appear equally plausible, yet they can lead to substantially different downstream routes\. Existing generative methods such as diffusion models simulate location sequences and fail short of next transition selection, even producing trajectories that drift off the road network\. To fill this gap, we advocate a fundamental shift: moving beyond location simulation toward behavior modeling on the road network\. In this paper, we revisit trajectory generation through the lens of generative route planning, and introduce a new graph\-constrained generative paradigm, Anticipatory Generative Modeling, which resolves next transition selection by incorporating the*Anticipation*of how the future route may unfold toward the destination\. Concretely, we propose a novel generative model namedForesightthat formulates a probabilistic model for “*anticipate–select–update–re\-anticipate*” loop that enables longer\-term foresight while continuing sequential generation along the historical trajectory\. Extensive experiments demonstrate thatForesightwins state\-of\-the\-art baselines\.

## 1Introduction

\(a\)Diffusion model: global route generation\.\(b\)Foresight: Anticipatory route generation\.
Figure 1:Motivated example for anticipatory generative modeling\.Generating human mobility data, particularly vehicle movement trajectories, plays a fundamental role in a wide spectrum of urban applications, including traffic management, navigation, and urban planning\([Shi et al\., 2024](https://arxiv.org/html/2610.13131#bib.bib11);[Li et al\., 2026](https://arxiv.org/html/2610.13131#bib.bib12)\)\. Within road networks, vehicle movement is constrained by the physical topology: movement along road segments is largely deterministic, whereas*transitions at intersections are critical*—multiple outgoing paths may appear equally plausible given the traversed history, yet they can lead to substantially different downstream routes\.

Conditioned on a given destination, a central challenge in road\-network trajectory generation lies in modeling the next transition selection, especially at road intersections\. In the literature, deep generative models such as diffusion\-based methods are frequently employed\([Zhu et al\., 2023](https://arxiv.org/html/2610.13131#bib.bib8);[Wei et al\., 2024](https://arxiv.org/html/2610.13131#bib.bib9);[Zhu et al\., 2024](https://arxiv.org/html/2610.13131#bib.bib10);[Shi et al\., 2024](https://arxiv.org/html/2610.13131#bib.bib11);[Li et al\., 2026](https://arxiv.org/html/2610.13131#bib.bib12)\)\. These models typically treat trajectories as holistic sequences of 2D locations and synthesize complete trajectories by denoising from random noise, often overlooking the discrete decision of next\-transition selection at intersections\. Consequently, they are prone to producing drift\-off trajectories that deviate from the underlying road network, as illustrated in Fig\.[1](https://arxiv.org/html/2610.13131#S1.F1)[1\(a\)](https://arxiv.org/html/2610.13131#S1.F1.sf1), which undermines their effectiveness for capturing real\-world human mobility patterns\. Regarding transition selection, classical search or dynamic programming, e\.g\., Dijkstra and A\-star, attempt to find optimal solutions by exhaustively enumerating the action space, but they struggle to scale to large\-scale road networks\([Dijkstra, 1959](https://arxiv.org/html/2610.13131#bib.bib17);[Hart et al\., 1968](https://arxiv.org/html/2610.13131#bib.bib18)\)\. Although reinforcement learning has been explored for action selection, the sparse reward signal associated with destination reachability makes it ill\-conditioned for generating stepwise action sequences on road networks\([Bello et al\., 2017](https://arxiv.org/html/2610.13131#bib.bib14);[Kool et al\., 2019](https://arxiv.org/html/2610.13131#bib.bib15);[Sun et al\., 2023](https://arxiv.org/html/2610.13131#bib.bib5)\)\. That is, route planning for road\-network trajectories remains a largely open problem\.

In this paper, we revisit trajectory generation on road networks, shifting from location simulation towards behavior modeling, and introduce a new graph\-constrained generative paradigm,*Anticipatory Generative Modeling*, for route planning\. The core of this paradigm isanticipation, a provisional short\-horizon continuation used to guide next\-transition selection\. A transition generator remains ambiguous when conditioned solely on the traversed history, since every legal transition on the road network may appear equally plausible\. As illustrated in Fig\.[1](https://arxiv.org/html/2610.13131#S1.F1)[1\(b\)](https://arxiv.org/html/2610.13131#S1.F1.sf2), the situation changes when the model incorporates anticipation of how the future route may unfold toward the destination\. Accordingly, we construct a 4\-phase loop of “*anticipate–select–update–re\-anticipate*” that enables longer\-term foresight while continuing sequential generation along the historical trajectory\.

Specifically, we present an anticipatory generation model namedForesightto produce plausible trajectories on road networks\. Given the destinationgg, we formalize*Anticipatory Generative Modeling*\(AGM\) at the heart of our model, which first predicts a provisional, destination\-conditioned continuation over a finite horizon, and then uses its representation to select the current transition:

ct,g⟶Rt=\(St\+1,…,St\+H\)⟶qt​\(⋅\),c\_\{t\},g\\;\\longrightarrow\\;R\_\{t\}=\(S\_\{t\+1\},\\ldots,S\_\{t\+H\}\)\\;\\longrightarrow\\;q\_\{t\}\(\\cdot\),\(1\)whereRtR\_\{t\}is inferred from the available traversed historyctc\_\{t\}\. It thus serves as predictive context for the current selection, rather than being executed\. After each transition, the history is updated and a new continuation is predicted\. This loop preserves closed\-loop generation while exposing downstream context\.HHlimits the explicitly represented future window, not the total trajectory length\.Foresightemploys a Future Decoder to predictRtR\_\{t\}, and a topology\-constrained Transition Network to score and normalize legal outgoing candidates\. A direction\-aware fiber state encodes the geometry of each realized movement, while candidate\-conditioned re\-anticipation predicts the continuation induced by each hypothetical candidate after the current distribution is formed\. The training objective couples the likelihood of the current legal transition with future\-window prediction and candidate\-conditioned future compatibility\. During inference, an optional future\-consistency score can further refine candidate selection\. After each executed movement,Foresightrecomputes the continuation from the updated history\. The independentSTOPevent is admissible only at the destination, ensuring that validity and termination are governed by the same graph\-constrained process\. Our key contributions are summarized as follows:

- •*Generative Route Planning\.*We revisit trajectory generation through the lens of behavior modeling and fundamentally shift the focus from location simulation to route planning on road networks\.
- •*Anticipatory Generative Modeling\.*Essentially different from diffusion models, we introduce a new graph\-constrained generative paradigm, which resolves next transition selection by incorporating the anticipation of how the future route may unfold toward the destination\.
- •*Methodology Innovation\.*We purpose a novelForesightmodel that formulates a probabilistic model with a direction\-aware fiber for “*anticipate–select–re\-anticipate*” loop that enables longer\-term foresight while continuing sequential generation along the historical trajectory\.
- •*Empirical Validation\.*Foresightachieves state\-of\-the\-art performance across various metrics, demonstrating its effectiveness in generating plausible trajectories\.

## 2Related Work

#### Trajectory generation\.

Trajectory generation methods span autoregressive models that recursively predict subsequent locations or road segments and latent\-variable or diffusion models that synthesize trajectories more globally\. In mobility modeling, diffusion\-based approaches such as DiffTraj generate complete GPS sequences\([Zhu et al\., 2023](https://arxiv.org/html/2610.13131#bib.bib8)\), while road\-network methods increasingly incorporate topology into either step\-wise or sequence\-level generation\. Autoregressive methods such as ProgRPGAN\([Fu and Lee, 2021](https://arxiv.org/html/2610.13131#bib.bib28)\), Semantic Routing\([Zhao et al\., 2024](https://arxiv.org/html/2610.13131#bib.bib25)\), and HOSER\([Cao et al\., 2025](https://arxiv.org/html/2610.13131#bib.bib26)\)construct routes incrementally, conditioning each local choice on the destination, map semantics, or traversed history\. Graph\-Constrained Diffusion, Diff\-RNTraj, and ControlTraj instead generate complete paths or trajectories while explicitly encoding road\-network structure\([Shi et al\., 2024](https://arxiv.org/html/2610.13131#bib.bib11);[Wei et al\., 2024](https://arxiv.org/html/2610.13131#bib.bib9);[Zhu et al\., 2024](https://arxiv.org/html/2610.13131#bib.bib10)\)\. These approaches therefore primarily model either the immediate next transition or the trajectory as a complete sequence\.

#### Iterative replanning\.

Receding\-horizon control offers a complementary closed\-loop paradigm: the planner repeatedly predicts over a finite horizon, executes the first action, and replans from the resulting state\. Related principles have been adopted in learned driving planners that reason over continuous trajectories, occupancy representations, or traffic\-scene forecasts\.\([Liu et al\., 2026](https://arxiv.org/html/2610.13131#bib.bib2);[Zheng et al\., 2025](https://arxiv.org/html/2610.13131#bib.bib4);[Huang et al\., 2026](https://arxiv.org/html/2610.13131#bib.bib3);[Jiang et al\., 2024](https://arxiv.org/html/2610.13131#bib.bib7);[Wu et al\., 2024](https://arxiv.org/html/2610.13131#bib.bib6)\)\. Foresight brings this interface to a discrete road graph: each graph\-legal transition is informed by an explicitly predicted, goal\-conditioned future window, while a position\- and direction\-aware fiber state preserves local context\. After execution, the anticipated continuation is retained when the transition is aligned and revised when the rollout deviates, coupling trajectory generation with closed\-loop replanning\.

#### Planning with future information\.

Classical search methods reason over candidate futures: Dijkstra\([Dijkstra, 1959](https://arxiv.org/html/2610.13131#bib.bib17)\)accumulates path costs, A star\([Hart et al\., 1968](https://arxiv.org/html/2610.13131#bib.bib18)\)adds heuristic estimates, and Yen’s algorithm enumerates alternative loopless paths\([Yen, 1971](https://arxiv.org/html/2610.13131#bib.bib19)\)\. Learned search and routing methods incorporate longer\-term consequences through neural heuristics, returns, value functions, or target\-conditioned policies\([Yonetani et al\., 2021](https://arxiv.org/html/2610.13131#bib.bib20);[Jain et al\., 2021](https://arxiv.org/html/2610.13131#bib.bib21);[Bello et al\., 2017](https://arxiv.org/html/2610.13131#bib.bib14);[Kool et al\., 2019](https://arxiv.org/html/2610.13131#bib.bib15);[Zeng et al\., 2023](https://arxiv.org/html/2610.13131#bib.bib16)\)\. Sequence\-modeling and diffusion\-based approaches instead represent or generate imagined trajectories\([Janner et al\., 2021](https://arxiv.org/html/2610.13131#bib.bib22);[Chen et al\., 2021](https://arxiv.org/html/2610.13131#bib.bib23);[Wu et al\., 2023](https://arxiv.org/html/2610.13131#bib.bib24);[Janner et al\., 2022](https://arxiv.org/html/2610.13131#bib.bib1)\)\. These works encode future information through search, value estimates, or trajectory prediction\. Foresight explicitly represents a goal\-conditioned short\-horizon continuation and uses it to select the next legal graph transition\.

## 3Preliminaries and Problem Formulation

#### Road\-network trajectories\.

We represent the road network as a directed graph𝒢=\(𝒱,ℰ\)\\mathcal\{G\}=\(\\mathcal\{V\},\\mathcal\{E\}\), where𝒱\\mathcal\{V\}is the set of road locations andℰ\\mathcal\{E\}contains directed connections\. LetXt∈𝒱X\_\{t\}\\in\\mathcal\{V\}denote the location at steptt, and letAt=ψ⁡\(Xt,Xt−1\)A\_\{t\}=\\psi\(X\_\{t\},X\_\{t\-1\}\)denote the direction\-aware attribute of the incoming movement \(with an initialization token att=0t=0\)\. The corresponding road state isSt=\(At,Xt\)S\_\{t\}=\(A\_\{t\},X\_\{t\}\), and the realized history before the next decision isct=S0:tc\_\{t\}=S\_\{0:t\}\. A trajectory is conditioned on a destinationg∈𝒱g\\in\\mathcal\{V\}\. Each movement follows the graph topology, withXt\+1∈𝒩𝒢\+​\(Xt\)X\_\{t\+1\}\\in\\mathcal\{N\}\_\{\\mathcal\{G\}\}^\{\+\}\(X\_\{t\}\), where𝒩𝒢\+​\(Xt\)\\mathcal\{N\}\_\{\\mathcal\{G\}\}^\{\+\}\(X\_\{t\}\)denotes the outgoing neighbors ofXtX\_\{t\}\. For a neighboru∈𝒩𝒢\+​\(Xt\)u\\in\\mathcal\{N\}\_\{\\mathcal\{G\}\}^\{\+\}\(X\_\{t\}\), define the complete movement candidatest\+1\(u\)=\(ψ⁡\(u,Xt\),u\)s\_\{t\+1\}^\{\(u\)\}=\\bigl\(\\psi\(u,X\_\{t\}\),u\\bigr\)\. We denote by𝒰tmove=\{st\+1\(u\):u∈𝒩𝒢\+​\(Xt\)\}\\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\}=\\\{s\_\{t\+1\}^\{\(u\)\}:u\\in\\mathcal\{N\}\_\{\\mathcal\{G\}\}^\{\+\}\(X\_\{t\}\)\\\}the set of legal movement candidates available at steptt\. The complete legal event set additionally includes the independent termination event only at the destination:

𝒰t=\{𝒰tmove,Xt≠g,𝒰tmove∪\{STOP\},Xt=g\.\\mathcal\{U\}\_\{t\}=\\begin\{cases\}\\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\},&X\_\{t\}\\neq g,\\\\ \\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\}\\cup\\\{\\mathrm\{STOP\}\\\},&X\_\{t\}=g\.\\end\{cases\}

#### Actions and stopping time\.

At steptt, the model selects a legal eventAt\+1A\_\{t\+1\}after observingctc\_\{t\}\. A movement event is one of the complete\-state candidates in𝒰tmove\\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\}and produces its associated locationXt\+1X\_\{t\+1\};STOP\\mathrm\{STOP\}creates no new road state\. Trajectory termination is defined by the stopping time

τ=inf\{t≥0:Xt=g,At\+1=STOP\}\.\\tau=\\inf\\left\\\{t\\geq 0:X\_\{t\}=g,A\_\{t\+1\}=\\mathrm\{STOP\}\\right\\\}\.\(2\)BecauseSTOP\\mathrm\{STOP\}is legal only at the destination,Aτ\+1=STOPA\_\{\\tau\+1\}=\\mathrm\{STOP\}impliesXτ=gX\_\{\\tau\}=g\. Reachingggalone does not terminate generation; the model must explicitly selectSTOP\\mathrm\{STOP\}\. An external transition budget may truncate generation before this selection, which is distinct from model\-selected termination\.

#### Conditional trajectory generation\.

Given the traversed historyctc\_\{t\}and destinationgg, the task is to generate a topologically valid continuation and terminate it at the destination\. A conventional sequential formulation selects a legal action according top⁡\(At\+1∣ct,g\)p\(A\_\{t\+1\}\\mid c\_\{t\},g\), appends the resulting road location after a movement, and repeats untilSTOP\\mathrm\{STOP\}is selected\. Such a formulation makes the next decision directly from the observed history and destination\. We instead study how to inform this local decision with the trajectory continuation that each candidate movement may induce\. The conditional future of interest isP\(St\+1:τ∣ct,g\)P\(S\_\{t\+1:\\tau\}\\mid c\_\{t\},g\), whose first event determines the next legal transition and whose remaining states describe a possible downstream continuation\.

![Refer to caption](https://arxiv.org/html/2610.13131v1/architecture.png)Figure 2:Overview ofForesight\.Further architectural details are provided in Appendix[C](https://arxiv.org/html/2610.13131#A3)\.

## 4Methodology

Distinguished from previous methods, we advocate a fundamental shift toward generative route planning on road networks\. To resolve the next\-transition ambiguity that arises from relying solely on the traversed history, we introduce a new graph\-constrained generative paradigm, Anticipatory Generative Modeling \(AGM\), which addresses this challenge by anticipating how the future route unfolds toward the destination\. Accordingly, we propose an anticipatory model,Foresight, whose overall architecture is sketched in Fig\.[2](https://arxiv.org/html/2610.13131#S3.F2)\.*It recursively executes an “anticipate–select–update–re\-anticipate” loop for stepwise routing on the road network\.*Specifically, the Future Decoder first constructs an anticipation of a provisional short\-horizon continuation\. Then, the Transition Network selects the topologically valid outgoing direction based on its consistency with the anticipated future; the selected transition is appended to update the traversed sequence, and the model re\-anticipates the trajectory suffix upon committing to the transition\. This process repeats untilSTOPis chosen at the destination\. Altogether, this endows the routing generator with longer\-term foresight capacity while maintaining sequential generation along the historical trajectory\.

### 4\.1Anticipatory Generative Modeling

We model goal\-conditioned road trajectories as realizations of an underlying stochastic process\. Given an originx0x\_\{0\}and destinationgg, each training trajectorys0:τ\(n\)s\_\{0:\\tau\}^\{\(n\)\}is sampled fromPdata\(S0:τ∣X0=x0,g\)P\_\{\\mathrm\{data\}\}\(S\_\{0:\\tau\}\\mid X\_\{0\}=x\_\{0\},g\)and represents one feasible route between the two endpoints\. Trajectories with the same endpoints may follow different paths, so an observed trajectory is one possible realization of the process rather than a unique target that all generated trajectories must match\.

At an anchor indexed bytt, the traversed historyctc\_\{t\}and destinationgginduce a conditional future processP\(St\+1:τ∣ct,g\)P\(S\_\{t\+1:\\tau\}\\mid c\_\{t\},g\)\. The suffix observed in a training example is one realization of this process: its first element specifies the next state, while the remainder records one possible downstream continuation\. At inference,Foresighthas access only to the traversed history and destination, from which it forms an anticipation of how the trajectory may continue\.

A conventional stepwise generator directly models the next\-state conditionalP⁡\(St\+1∣ct,g\)P\(S\_\{t\+1\}\\mid c\_\{t\},g\), corresponding to the one\-step marginal of the full future process:

P\(st\+1∣ct,g\)=∑st\+2:τP\(st\+1,st\+2:τ∣ct,g\)\.P\(s\_\{t\+1\}\\mid c\_\{t\},g\)=\\sum\_\{s\_\{t\+2:\\tau\}\}P\(s\_\{t\+1\},s\_\{t\+2:\\tau\}\\mid c\_\{t\},g\)\.Although longer\-term regularities may still be learned from data, they are not explicitly represented as anticipations of downstream evolution that directly inform the current transition\.

Anticipatory Generative Modeling \(AGM\) instead makes plausible downstream evolution explicit before selecting the current transition\. Given\(ct,g\)\(c\_\{t\},g\),Foresightanticipates how the trajectory may continue and uses this information to choose among topologically feasible transitions, without prescribing a unique future route\.

Because the stopping timeτ\\tauis random, the future continuationSt\+1:τS\_\{t\+1:\\tau\}has variable length and becomes increasingly uncertain at longer horizons\. Rather than representing the entire continuation before every transition,Foresightrealizes AGM through a finite anticipation window, leaving more distant evolution to subsequent predictions\.

### 4\.2Finite\-Horizon Anticipation

For a realized trajectory, each traversed prefixctc\_\{t\}defines an*anchor*at steptt, from which the conditional future process extends to the random stopping timeτ\\tau\. Sinceτ\\tauis unknown when the current decision is made, explicitly representing the full continuation would require modeling a variable\-length predictive object\. We instead restrict the explicitly represented future to a fixed horizon ofHHpositions\. LetYtY\_\{t\}denote the corresponding realized future window:

Yt=St\+1:t\+H,Yt∼Pdata\(Yt∣ct,g\)\.Y\_\{t\}=S\_\{t\+1:t\+H\},\\qquad Y\_\{t\}\\sim P\_\{\\mathrm\{data\}\}\(Y\_\{t\}\\mid c\_\{t\},g\)\.\(3\)Here,YtY\_\{t\}provides the realized training target, whereas the model\-predicted finite\-horizon anticipation is denoted byR^t\\widehat\{R\}\_\{t\}\. The horizonHHbounds the amount of future context exposed to the current decision rather than the length of the generated trajectory\. IfSTOP\\mathrm\{STOP\}occurs within the window, all subsequent positions are masked\.

During training, the observed windowYtY\_\{t\}supervises the predictive distributions represented byR^t\\widehat\{R\}\_\{t\}\. During inference,ForesightpredictsR^t\\widehat\{R\}\_\{t\}from\(ct,g\)\(c\_\{t\},g\)and uses its representation as downstream context when selecting the next legal transition\.

The anticipation is revised after every realized movement:

ct⟶R^t⟶St\+1⟶ct\+1⟶R^t\+1,R^t\+1=ℱθ​\(ct\+1,g\)\.c\_\{t\}\\longrightarrow\\widehat\{R\}\_\{t\}\\longrightarrow S\_\{t\+1\}\\longrightarrow c\_\{t\+1\}\\longrightarrow\\widehat\{R\}\_\{t\+1\},\\qquad\\widehat\{R\}\_\{t\+1\}=\\mathcal\{F\}\_\{\\theta\}\(c\_\{t\+1\},g\)\.\(4\)Thus, theHH\-step anticipation is not executed open\-loop; it is recomputed from the updated history after each realized movement\.

### 4\.3Foresight: Neural Architecture

We instantiate finite\-horizon anticipation withForesight, which couples a shared Future Anticipation Decoder with a topology\-constrained Transition Network\. Figure[2](https://arxiv.org/html/2610.13131#S3.F2)summarizes the architecture and its step\-wise generation process\. Given the traversed historyctc\_\{t\}and destinationgg, the decoder predicts a finite\-horizon anticipation, whose contextual representations are then used by the Transition Network to score the legal transitions from the current state:

R^t=ℱθ​\(ct,g\),qt=𝒯ϕ​\(ct,g,R^t,𝒰t\)\.\\widehat\{R\}\_\{t\}=\\mathcal\{F\}\_\{\\theta\}\(c\_\{t\},g\),\\qquad q\_\{t\}=\\mathcal\{T\}\_\{\\phi\}\(c\_\{t\},g,\\widehat\{R\}\_\{t\};\\mathcal\{U\}\_\{t\}\)\.\(5\)Here,R^t\\widehat\{R\}\_\{t\}contains contextual representations for the nextHHpositions together with the parameters of their associated categorical distributions, andqtq\_\{t\}is the distribution over the legal candidate set𝒰t\\mathcal\{U\}\_\{t\}\. We denote the categorical distribution at future positionhhbyP^t,h\\widehat\{P\}\_\{t,h\}\.

The Future Anticipation Decoderℱθ\\mathcal\{F\}\_\{\\theta\}jointly encodes the traversed history, destination, and an ordered sequence of future queries with a shared Transformer\. Its hidden states provide contextual representations for the nextHHpositions, while prediction heads parameterize categorical distributions over the global predictive space\. A structured visibility rule allows each future query to attend to the observed history, destination, and preceding query context, while preventing access to realized future states\. The resulting anticipation therefore depends only on information available at the current anchor\.

From the current road statextx\_\{t\}, Foresight forms the movement candidate set𝒰tmove\\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\}from the topologically valid outgoing transitions\. The legal candidate set is

𝒰t=\{𝒰tmove∪\{STOP\},xt=g,𝒰tmove,xt≠g,\\mathcal\{U\}\_\{t\}=\\begin\{cases\}\\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\}\\cup\\\{\\mathrm\{STOP\}\\\},&x\_\{t\}=g,\\\\ \\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\},&x\_\{t\}\\neq g,\\end\{cases\}soSTOP\\mathrm\{STOP\}is available only at the destination\. The Transition Network scores every legal candidate with the same compatibility function:

scoret⁡\(s′\)=scoreϕ⁡\(ct,g,R^t,s′\),qt​\(s′\)=exp⁡scoret⁡\(s′\)∑s¯∈𝒰texp⁡scoret⁡\(s¯\),s′∈𝒰t\.\\operatorname\{score\}\_\{t\}\(s^\{\\prime\}\)=\\operatorname\{score\}\_\{\\phi\}\(c\_\{t\},g,\\widehat\{R\}\_\{t\},s^\{\\prime\}\),\\qquad q\_\{t\}\(s^\{\\prime\}\)=\\frac\{\\exp\\,\\operatorname\{score\}\_\{t\}\(s^\{\\prime\}\)\}\{\\sum\_\{\\bar\{s\}\\in\\mathcal\{U\}\_\{t\}\}\\exp\\,\\operatorname\{score\}\_\{t\}\(\\bar\{s\}\)\},\\qquad s^\{\\prime\}\\in\\mathcal\{U\}\_\{t\}\.\(6\)Thus, movement candidates andSTOP\\mathrm\{STOP\}are treated uniformly within the same topology\-constrained distribution, while the anticipated future directly informs their scores\.

Afterqtq\_\{t\}has been formed, each movement candidates′∈𝒰tmoves^\{\\prime\}\\in\\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\}can be appended hypothetically to the traversed history and re\-evaluated by the same decoder:

ct\(s′\)=ct⊕s′,R^t\+1\(s′\)=ℱθ​\(ct\(s′\),g\),s′∈𝒰tmove\.c\_\{t\}^\{\(s^\{\\prime\}\)\}=c\_\{t\}\\oplus s^\{\\prime\},\\qquad\\widehat\{R\}\_\{t\+1\}^\{\(s^\{\\prime\}\)\}=\\mathcal\{F\}\_\{\\theta\}\(c\_\{t\}^\{\(s^\{\\prime\}\)\},g\),\\qquad s^\{\\prime\}\\in\\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\}\.\(7\)These candidate\-conditioned predictions represent the continuations induced by hypothetical legal movements\. They are not separate observed targets; Section[4\.4](https://arxiv.org/html/2610.13131#S4.SS4)combines them with the single realized continuation to define the sequence learning objective\.

### 4\.4Learning Objective

For an anchortton a sampled training trajectory, we extract anHH\-position future reference

yt=\(yt,1,…,yt,H\)\.y\_\{t\}=\(y\_\{t,1\},\\ldots,y\_\{t,H\}\)\.This reference is one realization of the conditional future process given the traversed history and goal, rather than a unique target route\. Its first entryyt,1y\_\{t,1\}is the realized next event, whileyt,2:Hy\_\{t,2:H\}records the subsequent continuation\. IfSTOP\\mathrm\{STOP\}occurs within the horizon, its position is retained and all subsequent positions are masked; ifyt,1=STOPy\_\{t,1\}=\\mathrm\{STOP\}, only the first position contributes\. The reference is used only for training supervision and is unavailable at inference\.

To combine the current transition with subsequent future predictions in the sameHH\-position objective, all positions are represented in a common prediction space\. The Transition Network definesqtq\_\{t\}over the local action set𝒰t\\mathcal\{U\}\_\{t\}, whereas future positions are predicted over the global space𝒴=𝒱∪\{STOP\}\\mathcal\{Y\}=\\mathcal\{V\}\\cup\\\{\\mathrm\{STOP\}\\\}\. We therefore mapqtq\_\{t\}to a global distributionq¯t\\bar\{q\}\_\{t\}, assigning each movement probability to its resulting road state, assigning the STOP probability toSTOP\\mathrm\{STOP\}when applicable, and setting all other entries to zero\. Within the transition\-coupled objective,q¯t\\bar\{q\}\_\{t\}provides the prediction foryt,1y\_\{t,1\}\.

The Future Decoder is directly supervised by the masked future\-window cross\-entropy

ℒF,t=−∑h=1Hmt,hlogP^t,h\(yt,h\)\.\\mathcal\{L\}\_\{F,t\}=\-\\sum\_\{h=1\}^\{H\}m\_\{t,h\}\\log\\widehat\{P\}\_\{t,h\}\(y\_\{t,h\}\)\.For each admissible movement candidates′∈𝒰tmoves^\{\\prime\}\\in\\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\}, we further use the hypothetical re\-anticipation

R^t\+1\(s′\)=ℱθ​\(ct⊕s′,g\)\\widehat\{R\}\_\{t\+1\}^\{\(s^\{\\prime\}\)\}=\\mathcal\{F\}\_\{\\theta\}\(c\_\{t\}\\oplus s^\{\\prime\},g\)to obtain candidate\-conditioned predictions for positionsh=2,…,Hh=2,\\ldots,H\. Since the training data provide no counterfactual continuation for unexecuted candidates, every candidate\-conditioned prediction is evaluated against the same observed suffixyt,2:Hy\_\{t,2:H\}\. This suffix serves as a compatibility reference rather than a factual continuation conditioned on the hypothetical candidate\. LetP~t,h\(s′\)\\widetilde\{P\}\_\{t,h\}^\{\(s^\{\\prime\}\)\}denote the corresponding global prediction at downstream positionhh\. We define

ℓtcomp\(s′\)=−∑h=2Hmt,hlogP~t,h\(s′\)\(yt,h\)\.\\ell\_\{t\}^\{\\mathrm\{comp\}\}\(s^\{\\prime\}\)=\-\\sum\_\{h=2\}^\{H\}m\_\{t,h\}\\log\\widetilde\{P\}\_\{t,h\}^\{\(s^\{\\prime\}\)\}\(y\_\{t,h\}\)\.
The anchor\-level transition\-coupled objective is

ℒt=−mt,1​log⁡q¯t​\(yt,1\)\+∑s′∈𝒰tmoveqt​\(s′\)​ℓtcomp​\(s′\)\.\\mathcal\{L\}\_\{t\}=\-m\_\{t,1\}\\log\\bar\{q\}\_\{t\}\(y\_\{t,1\}\)\+\\sum\_\{s^\{\\prime\}\\in\\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\}\}q\_\{t\}\(s^\{\\prime\}\)\\,\\ell\_\{t\}^\{\\mathrm\{comp\}\}\(s^\{\\prime\}\)\.\(8\)The first term supervises the realized next event, while the second evaluates the expected downstream compatibility of candidate movements underqtq\_\{t\}\. The complete anchor loss is

𝒥t=ℒF,t\+ℒt\.\\mathcal\{J\}\_\{t\}=\\mathcal\{L\}\_\{F,t\}\+\\mathcal\{L\}\_\{t\}\.Candidate\-conditioned re\-anticipation is computed only afterqtq\_\{t\}is formed and therefore affects the transition distribution only through the training objective\. Training averages𝒥t\\mathcal\{J\}\_\{t\}over sampled trajectories and temporal anchors\.

### 4\.5Sequential Generation

At generation steptt, given the realized historyctc\_\{t\}and destinationgg,Foresightfirst predicts the current finite\-horizon anticipation and uses it to define a base distribution over the legal action set:

R^t=ℱθ​\(ct,g\),qt=𝒯ϕ​\(ct,g,R^t,𝒰t\)\.\\widehat\{R\}\_\{t\}=\\mathcal\{F\}\_\{\\theta\}\(c\_\{t\},g\),\\qquad q\_\{t\}=\\mathcal\{T\}\_\{\\phi\}\(c\_\{t\},g,\\widehat\{R\}\_\{t\};\\mathcal\{U\}\_\{t\}\)\.\(9\)Generation uses only the realized history, the destination, and model\-predicted anticipations; the future reference used for training is never available\. By default, the next action is selected directly fromqtq\_\{t\}\. Optionally,Foresightcan further rerank legal movements according to the consistency between the current anticipation and the continuation predicted after each hypothetical candidate\.

For a movement candidates′∈𝒰tmoves^\{\\prime\}\\in\\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\}, let

R^t\+1\(s′\)=ℱθ​\(ct⊕s′,g\)\\widehat\{R\}\_\{t\+1\}^\{\(s^\{\\prime\}\)\}=\\mathcal\{F\}\_\{\\theta\}\(c\_\{t\}\\oplus s^\{\\prime\},g\)denote its candidate\-conditioned re\-anticipation, and letP^t,h\\widehat\{P\}\_\{t,h\}andP^t\+1,h\(s′\)\\widehat\{P\}\_\{t\+1,h\}^\{\(s^\{\\prime\}\)\}denote the categorical distributions associated with positionhhofR^t\\widehat\{R\}\_\{t\}andR^t\+1\(s′\)\\widehat\{R\}\_\{t\+1\}^\{\(s^\{\\prime\}\)\}, respectively\. Since advancing by one movement shifts the prediction horizon by one position, future consistency is measured over their overlapping predictions:

Efut\(s′\)=1H−1∑h=1H−1DJS\(P^t,h\+1∥P^t\+1,h\(s′\)\),s′∈𝒰tmove,E\_\{\\mathrm\{fut\}\}\(s^\{\\prime\}\)=\\frac\{1\}\{H\-1\}\\sum\_\{h=1\}^\{H\-1\}D\_\{\\mathrm\{JS\}\}\\left\(\\widehat\{P\}\_\{t,h\+1\}\\,\\\|\\,\\widehat\{P\}\_\{t\+1,h\}^\{\(s^\{\\prime\}\)\}\\right\),\\qquad s^\{\\prime\}\\in\\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\},\(10\)whereDJSD\_\{\\mathrm\{JS\}\}is the Jensen–Shannon divergence\. We setEfut​\(STOP\)=0E\_\{\\mathrm\{fut\}\}\(\\mathrm\{STOP\}\)=0\. The resulting selection energy and distribution are

Et​\(s′\)=−log⁡qt​\(s′\)\+w​Efut​\(s′\),πt​\(s′\)=exp⁡\[−Et​\(s′\)\]∑u∈𝒰texp⁡\[−Et​\(u\)\],a^t\+1=Select⁡\(πt;𝒰t\)\.E\_\{t\}\(s^\{\\prime\}\)=\-\\log q\_\{t\}\(s^\{\\prime\}\)\+wE\_\{\\mathrm\{fut\}\}\(s^\{\\prime\}\),\\quad\\pi\_\{t\}\(s^\{\\prime\}\)=\\frac\{\\exp\[\-E\_\{t\}\(s^\{\\prime\}\)\]\}\{\\sum\_\{u\\in\\mathcal\{U\}\_\{t\}\}\\exp\[\-E\_\{t\}\(u\)\]\},\\quad\\hat\{a\}\_\{t\+1\}=\\operatorname\{Select\}\(\\pi\_\{t\};\\mathcal\{U\}\_\{t\}\)\.\(11\)Whenw=0w=0,πt=qt\\pi\_\{t\}=q\_\{t\}, recovering selection from the base transition distribution\. Candidate\-conditioned branches used in reranking remain hypothetical: they are evaluated only to score the current decision, and only the selected actiona^t\+1\\hat\{a\}\_\{t\+1\}is executed and appended to the realized history\.

Ifa^t\+1∈𝒰tmove\\hat\{a\}\_\{t\+1\}\\in\\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\}, executing the selected movement determines the next road position\. Letdest⁡\(a^t\+1\)\\operatorname\{dest\}\(\\hat\{a\}\_\{t\+1\}\)denote the destination road position of the selected legal movement\. Consistent with the state definitionSt=\(At,Xt\)S\_\{t\}=\(A\_\{t\},X\_\{t\}\), the realized state and updated history are

xt\+1=dest⁡\(a^t\+1\),st\+1=\(a^t\+1,xt\+1\),ct\+1=ct⊕st\+1\.x\_\{t\+1\}=\\operatorname\{dest\}\(\\hat\{a\}\_\{t\+1\}\),\\qquad s\_\{t\+1\}=\(\\hat\{a\}\_\{t\+1\},x\_\{t\+1\}\),\\qquad c\_\{t\+1\}=c\_\{t\}\\oplus s\_\{t\+1\}\.\(12\)Foresightthen recomputes the anticipation from the updated realized history:

R^t\+1=ℱθ​\(ct\+1,g\)\.\\widehat\{R\}\_\{t\+1\}=\\mathcal\{F\}\_\{\\theta\}\(c\_\{t\+1\},g\)\.\(13\)The anticipation therefore informs the current transition without prescribing an open\-loop route\. Each executed movement changes the realized history and induces a new prediction, yielding a closed\-loop anticipate–select–update–re\-anticipate process\.

Ifa^t\+1=STOP\\hat\{a\}\_\{t\+1\}=\\mathrm\{STOP\}, generation terminates immediately and no subsequent movement state is appended\. Reachingxt=gx\_\{t\}=gonly makesSTOP\\mathrm\{STOP\}admissible; termination still requires selecting it\. A maximum generation budget provides an external evaluation\-time truncation: reaching the budget beforeSTOP\\mathrm\{STOP\}is recorded as a timeout rather than as stochastic termination\.

## 5Experiments

We study whether Foresight can reproduce both the spatial distribution of held\-out mobility and the route structure of individual trips\. The experiments are organized around four questions: how the model compares with existing generators, whether its samples occupy space like the test set, what its generated routes look like under matched conditions, and which parts of the anticipatory state are responsible for the gains\.

Table 1:Overall performance across cities\.D\-JSD/R\-JSD denote Distance/Radius JSD and are reported in units of10−210^\{\-2\}\.HD is Hausdorff distance and EDR is edit distance on real sequences\. Cells report OD\-bootstrap means under the common evaluation protocol \(see Appendix[E](https://arxiv.org/html/2610.13131#A5)\)\. Lower is better\.Table 2:Ablation results for Porto and San Francisco\.JSD values are scaled by10−210^\{\-2\}\.#### Experimental setup\.

We evaluate goal\-conditioned generation on the Porto, Beijing, and San Francisco datasets with the official HOSER graphs and splits\.111The HOSER dataset is available at[https://huggingface\.co/datasets/caoji2001/HOSER\-dataset](https://huggingface.co/datasets/caoji2001/HOSER-dataset)\.All methods use matched test OD conditions, replicate counts, and generation budgets; we report Distance/Radius JSD, Hausdorff distance, and EDR \(lower is better\)\. Full protocol, training, and metric details appear in Appendices[D](https://arxiv.org/html/2610.13131#A4)\.

#### Baselines\.

Baselines span the Markov reference, Dijkstra and Yen’skk\-shortest\-path search\([Dijkstra, 1959](https://arxiv.org/html/2610.13131#bib.bib17);[Yen, 1971](https://arxiv.org/html/2610.13131#bib.bib19)\), Semantic Routing and HOSER\([Zhao et al\., 2024](https://arxiv.org/html/2610.13131#bib.bib25);[Cao et al\., 2025](https://arxiv.org/html/2610.13131#bib.bib26)\), and learned generators: TS\-TrajGen\([, 2023](https://arxiv.org/html/2610.13131#bib.bib27)\), GDP\([Shi et al\., 2024](https://arxiv.org/html/2610.13131#bib.bib11)\), Diff\-RNTraj\([Wei et al\., 2024](https://arxiv.org/html/2610.13131#bib.bib9)\), DiffTraj\([Zhu et al\., 2023](https://arxiv.org/html/2610.13131#bib.bib8)\), TrajFlow\([Li et al\., 2026](https://arxiv.org/html/2610.13131#bib.bib12)\), and Seed\([Rao et al\., 2025](https://arxiv.org/html/2610.13131#bib.bib13)\)\. Adaptation and implementation details are in Appendix[D](https://arxiv.org/html/2610.13131#A4); all methods use the matched evaluation protocol above\.

#### Overall performance\.

Table[1](https://arxiv.org/html/2610.13131#S5.T1)reports distribution\-level and route\-level fidelity under the common evaluation protocol\. Distance JSD and Radius JSD are reported in units of10−210^\{\-2\}; complete results with bootstrap standard deviations, DTW, and completion diagnostics are provided in Appendix[E](https://arxiv.org/html/2610.13131#A5)\. The two Foresight variants show complementary behavior: the full\-history variant is strongest on San Francisco and Beijing, whereas the Markov\-history variant performs best on Porto and remains competitive elsewhere\. Completion diagnostics use the same test conditions and retain failed rollouts in their denominators\.

#### Spatial distributions and route examples\.

The quantitative comparison is complemented by spatial and route views under matched held\-out conditions; the complete spatial and route panels are in Appendix[F](https://arxiv.org/html/2610.13131#A6)\.

![Refer to caption](https://arxiv.org/html/2610.13131v1/real_test_distribution.png)Road networkTest distribution![Refer to caption](https://arxiv.org/html/2610.13131v1/generated_test_distribution.png)![Refer to caption](https://arxiv.org/html/2610.13131v1/x1.png)Generated: ForesightGenerated: DijkstraFigure 3:Porto spatial comparison\. Top: road network and test\-set trajectory distribution\. Bottom: trajectory distributions generated by Foresight and Dijkstra\.
#### Ablation of anticipatory modeling\.

We ablate complete trajectory history, future\-window supervisionℒF\\mathcal\{L\}\_\{F\}, candidate\-conditioned continuation lossℓtcon\\ell\_\{t\}^\{\\mathrm\{con\}\}, and inference\-time future energyEfutE\_\{\\mathrm\{fut\}\}\. As shown in Table[2](https://arxiv.org/html/2610.13131#S5.T2), candidate\-conditioned continuation contributes the most, followed by future\-window supervision, while future\-energy reranking provides a smaller but consistent improvement\. Full results, including dataset\-specific history effects, standard deviations, DTW, and Beijing experiments, are provided in Appendix[E](https://arxiv.org/html/2610.13131#A5)\.

Real TrajectoryDijkstraForesightFigure 4:Matched Porto route comparison for two fixed test OD conditions\.

## 6Conclusion

This work revisits trajectory generation through the lens of generative route planning on road networks\. To this end, we introduce a new graph\-constrained generative paradigm, Anticipatory Generative Modeling, which resolves the ambiguity in next\-transition selection by anticipating how the future route unfolds toward the destination\. Specifically, we present an anticipatory model,Foresight\. At each step, it \(i\) constructs an*anticipation*of a provisional short\-horizon continuation, \(ii\)*selects*among topologically valid transitions via a direction\-aware fiber, \(iii\)*updates*the traversed sequence through the decoder, and \(iv\)*re\-anticipates*the trajectory suffix upon committing to the transition\. Experiments on real\-world datasets show thatForesightachieves superior performance in both trajectory distribution matching and route fidelity under origin–destination constraints\. These results suggest that the proposed anticipation mechanism helps disambiguate locally plausible transitions while preserving topological validity throughout sequential generation\.

## AI Use Statement

AI tools were used solely for language polishing and formatting adjustments during manuscript preparation\. They were not used to develop the research ideas or methodology, conduct experiments, analyze experimental results, or determine the scientific claims and conclusions of this work\. The authors reviewed and take responsibility for all content in the manuscript\.

## Reproducibility Statement

We document the inputs and procedures needed to reproduce the stated experiments\. We use the public HOSER road graphs and official train/validation/test splits for Porto, Beijing, and San Francisco \([https://huggingface\.co/datasets/caoji2001/HOSER\-dataset](https://huggingface.co/datasets/caoji2001/HOSER-dataset)\)\. Preprocessing readsroadmap\.geo,roadmap\.rel, and the supplied trajectory files; it validates road identifiers, graph\-valid transitions, timestamp consistency, and finite attributes\. Continuous\-feature statistics are fitted on training data and reused for validation, test, and generation\. Trajectories are not re\-split, and test trajectories do not fit preprocessing statistics or model parameters\. Each run is bound to a versioned data/configuration manifest, a validation\-selected checkpoint, and a fixed test\-condition and replicate list\.

The method appendices fix the model interfaces and training boundaries\. Shared Base/Fiber encoders construct history\-consistent node–fiber states and enumerate only graph\-legal successors\. A structured Future Transformer uses a fixedH=64H=64query window, global node\-ID targets, and an independentSTOPevent; its visibility mask excludes future labels from the context\. The Transition Network builds a candidate\-independentq\_transreadout, then scores complete legal candidate states with a projected dot product and positive temperature\. Full\-history and Markov variants share this interface; the latter retains only\[S0,St\]\[S\_\{0\},S\_\{t\}\]and the goal in both modules\. One joint optimizer transaction combines masked future event cross\-entropy, current\-event NLL, and expected future cross\-entropy over candidate branches\. Future targets are stop\-gradient, Transition inputs are detached, and discrete actions are detached before history append\. The reported training configuration uses AdamW for 60,000 updates with fixed validation checkpoint selection; each run records scale dimensions, parameter counts, normalization settings, precision, clipping, and random states\. The appendix lists the five scale presets, their widths, depths, heads, horizons, and city\-dependent vocabulary parameter counts for direct checkpoint comparison\.

Generation uses the frozen model in evaluation/no\-gradient mode\. At every decision it rebuilds the fixed future window from the realized history, passes the downstream future representation to Transition, scores legal outgoing graph edges, and admitsSTOPonly at the goal\. Reaching the goal alone does not terminate a rollout\. The reported protocol uses 5,000 fixed test conditions, and a maximum of 256 transitions per attempt; greedy or sampling selection and candidate\-conditioned future\-consistency reranking are run\-level fields\. Every attempt is retained, including timeouts, invalid transitions, and numerical failures, with condition/OD identifiers, seed, node sequence, stop reason, and checkpoint/configuration references\. Baselines share the graph, test conditions, replicate policy, and failure\-accounting rule; their adapters, decoding/search settings, and budgets are recorded separately\.

Evaluation is reproducible from saved generation records and the evaluation configuration\. The primary metrics are Distance JSD, Radius JSD, Hausdorff distance, DTW, and EDR; undefined metrics stay unavailable rather than becoming zeros\. Completion statistics use the complete attempted corpus as their denominator\. Exact\-OD bootstrap is primary and uses 1,000 resamples with bootstrap seed 0; condition\-bootstrap and HOSER\-style file\-level aggregation are secondary checks\. The experimental appendix specifies supports, binning, matching rules, and Python/PyTorch\-style pseudocode for training, inference, and evaluation\. Cells without measured values identify missing runs or inputs and are not interpreted as results\.

## References

- Belloet al\.\(2017\)I\. Bello, H\. Pham, Q\. V\. Le, M\. Norouzi, and S\. BengioNeural combinatorial optimization with reinforcement learning\.External Links:[Link](https://openreview.net/forum?id=rJY3vK9eg)Cited by:[§1](https://arxiv.org/html/2610.13131#S1.p2.1),[§2](https://arxiv.org/html/2610.13131#S2.SS0.SSS0.Px3.p1.1)\.
- Caoet al\.\(2025\)J\. Cao, T\. Zheng, Q\. Guo, Y\. Wang, J\. Dai, S\. Liu, J\. Yang, J\. Song, and M\. SongHolistic semantic representation for navigational trajectory generation\.InProceedings of the Thirty\-Ninth AAAI Conference on Artificial Intelligence and Thirty\-Seventh Conference on Innovative Applications of Artificial Intelligence and Fifteenth Symposium on Educational Advances in Artificial Intelligence,External Links:[Document](https://dx.doi.org/10.1609/aaai.v39i1.31978)Cited by:[§D\.1](https://arxiv.org/html/2610.13131#A4.SS1.SSS0.Px2.p2.1),[§D\.1](https://arxiv.org/html/2610.13131#A4.SS1.SSS0.Px3.p1.1),[§D\.1](https://arxiv.org/html/2610.13131#A4.SS1.SSS0.Px3.p3.1),[Table 8](https://arxiv.org/html/2610.13131#A4.T8),[Table 8](https://arxiv.org/html/2610.13131#A4.T8.4),[Appendix D](https://arxiv.org/html/2610.13131#A4.p1.1),[§2](https://arxiv.org/html/2610.13131#S2.SS0.SSS0.Px1.p1.1),[§5](https://arxiv.org/html/2610.13131#S5.SS0.SSS0.Px2.p1.1)\.
- Chenet al\.\(2005\)L\. Chen, M\. T\. Özsu, and V\. OriaRobust and fast similarity search for moving object trajectories\.InProceedings of the 2005 ACM SIGMOD International Conference on Management of Data,pp\. 491–502\.Cited by:[§D\.2](https://arxiv.org/html/2610.13131#A4.SS2.SSS0.Px3.p2.1)\.
- Chenet al\.\(2021\)L\. Chen, K\. Lu, A\. Rajeswaran, K\. Lee, A\. Grover, M\. Laskin, P\. Abbeel, A\. Srinivas, and I\. MordatchDecision transformer: reinforcement learning via sequence modeling\.InAdvances in Neural Information Processing Systems,Vol\.34,pp\. 15084–15097\.Cited by:[§2](https://arxiv.org/html/2610.13131#S2.SS0.SSS0.Px3.p1.1)\.
- \[5\]\(2023\)Continuous trajectory generation based on two\-stage gan\.InAAAI 2023,External Links:[Document](https://dx.doi.org/10.1609/aaai.v37i4.25557),[Link](https://doi.org/10.1609/aaai.v37i4.25557)Cited by:[§D\.1](https://arxiv.org/html/2610.13131#A4.SS1.SSS0.Px3.p1.1),[§D\.1](https://arxiv.org/html/2610.13131#A4.SS1.SSS0.Px3.p3.1),[§5](https://arxiv.org/html/2610.13131#S5.SS0.SSS0.Px2.p1.1)\.
- Dijkstra \(1959\)E\. W\. DijkstraA note on two problems in connexion with graphs\.Numerische Mathematik1\(1\),pp\. 269–271\.External Links:[Document](https://dx.doi.org/10.1007/BF01386390)Cited by:[§D\.1](https://arxiv.org/html/2610.13131#A4.SS1.SSS0.Px3.p1.1),[§1](https://arxiv.org/html/2610.13131#S1.p2.1),[§2](https://arxiv.org/html/2610.13131#S2.SS0.SSS0.Px3.p1.1),[§5](https://arxiv.org/html/2610.13131#S5.SS0.SSS0.Px2.p1.1)\.
- Fu and Lee \(2021\)T\. Fu and W\. LeeProgRPGAN: progressive gan for route planning\.InProceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining,KDD ’21,pp\. 393–403\.External Links:[Document](https://dx.doi.org/10.1145/3447548.3467406)Cited by:[§2](https://arxiv.org/html/2610.13131#S2.SS0.SSS0.Px1.p1.1)\.
- Hartet al\.\(1968\)P\. E\. Hart, N\. J\. Nilsson, and B\. RaphaelA formal basis for the heuristic determination of minimum cost paths\.IEEE Trans\. Syst\. Sci\. Cybern\.4,pp\. 100–107\.Cited by:[§1](https://arxiv.org/html/2610.13131#S1.p2.1),[§2](https://arxiv.org/html/2610.13131#S2.SS0.SSS0.Px3.p1.1)\.
- Huanget al\.\(2026\)Z\. Huang, B\. Zhang, Z\. Li, and D\. LinOccDriver: future occupancy guided dual\-branch trajectory planner in autonomous driving\.InThe Fourteenth International Conference on Learning Representations,External Links:[Link](https://openreview.net/forum?id=abJCjkIwi5)Cited by:[§2](https://arxiv.org/html/2610.13131#S2.SS0.SSS0.Px2.p1.1)\.
- Huttenlocheret al\.\(1993\)D\. P\. Huttenlocher, G\. A\. Klanderman, and W\. J\. RucklidgeComparing images using the hausdorff distance\.IEEE Transactions on Pattern Analysis and Machine Intelligence15\(9\),pp\. 850–863\.Cited by:[§D\.2](https://arxiv.org/html/2610.13131#A4.SS2.SSS0.Px3.p2.1)\.
- Jainet al\.\(2021\)J\. Jain, V\. Bagadia, S\. Manchanda, and S\. RanuNeuroMLR: robust & reliable route recommendation on road networks\.InAdvances in Neural Information Processing Systems,A\. Beygelzimer, Y\. Dauphin, P\. Liang, and J\. W\. Vaughan \(Eds\.\),External Links:[Link](https://openreview.net/forum?id=Sl0WX9H6ZJg)Cited by:[§2](https://arxiv.org/html/2610.13131#S2.SS0.SSS0.Px3.p1.1)\.
- Janneret al\.\(2022\)M\. Janner, Y\. Du, J\. Tenenbaum, and S\. LevinePlanning with diffusion for flexible behavior synthesis\.InProceedings of the 39th International Conference on Machine Learning,Proceedings of Machine Learning Research, Vol\.162,pp\. 9902–9915\.External Links:[Link](https://proceedings.mlr.press/v162/janner22a.html)Cited by:[§2](https://arxiv.org/html/2610.13131#S2.SS0.SSS0.Px3.p1.1)\.
- Janneret al\.\(2021\)M\. Janner, Q\. Li, and S\. LevineOffline reinforcement learning as one big sequence modeling problem\.External Links:2106\.02039,[Link](https://arxiv.org/abs/2106.02039)Cited by:[§2](https://arxiv.org/html/2610.13131#S2.SS0.SSS0.Px3.p1.1)\.
- Jianget al\.\(2024\)C\. M\. Jiang, Y\. Bai, A\. Cornman, C\. Davis, X\. Huang, H\. Jeon, S\. Kulshrestha, J\. Lambert, S\. Li, X\. Zhou, C\. Fuertes, C\. Yuan, M\. Tan, Y\. Zhou, and D\. AnguelovSceneDiffuser: efficient and controllable driving simulation initialization and rollout\.InAdvances in Neural Information Processing Systems,Vol\.37,pp\. 55729–55760\.External Links:[Document](https://dx.doi.org/10.52202/079017-1771)Cited by:[§2](https://arxiv.org/html/2610.13131#S2.SS0.SSS0.Px2.p1.1)\.
- Koolet al\.\(2019\)W\. Kool, H\. van Hoof, and M\. WellingAttention, learn to solve routing problems\!\.InInternational Conference on Learning Representations,External Links:[Link](https://openreview.net/forum?id=ByxBFsRqYm)Cited by:[§1](https://arxiv.org/html/2610.13131#S1.p2.1),[§2](https://arxiv.org/html/2610.13131#S2.SS0.SSS0.Px3.p1.1)\.
- Liet al\.\(2026\)P\. Li, J\. Wang, H\. Zhang, X\. Shi, N\. Koshizuka, C\. Shimizu, and R\. JiangTrajFlow: nation\-wide pseudo GPS trajectory generation with flow matching models\.InThe Fourteenth International Conference on Learning Representations,External Links:[Link](https://openreview.net/forum?id=BDOldEjwCE)Cited by:[§D\.1](https://arxiv.org/html/2610.13131#A4.SS1.SSS0.Px3.p1.1),[§D\.1](https://arxiv.org/html/2610.13131#A4.SS1.SSS0.Px3.p3.1),[§1](https://arxiv.org/html/2610.13131#S1.p1.1),[§1](https://arxiv.org/html/2610.13131#S1.p2.1),[§5](https://arxiv.org/html/2610.13131#S5.SS0.SSS0.Px2.p1.1)\.
- Liuet al\.\(2026\)S\. Liu, W\. Chen, W\. Li, Z\. Wang, L\. Yang, J\. Huang, YipinZhang, Z\. Huang, Z\. Cheng, and H\. YangBridgeDrive: diffusion bridge policy for closed\-loop trajectory planning in autonomous driving\.InThe Fourteenth International Conference on Learning Representations,External Links:[Link](https://openreview.net/forum?id=dJKhjK4zpp)Cited by:[§2](https://arxiv.org/html/2610.13131#S2.SS0.SSS0.Px2.p1.1)\.
- Raoet al\.\(2025\)X\. Rao, S\. Shang, R\. Jiang, P\. Han, and L\. ChenSeed: bridging sequence and diffusion models for road trajectory generation\.InProceedings of the ACM Web Conference 2025,pp\. 2007–2017\.External Links:[Document](https://dx.doi.org/10.1145/3696410.3714951)Cited by:[§D\.1](https://arxiv.org/html/2610.13131#A4.SS1.SSS0.Px3.p1.1),[§D\.1](https://arxiv.org/html/2610.13131#A4.SS1.SSS0.Px3.p3.1),[§5](https://arxiv.org/html/2610.13131#S5.SS0.SSS0.Px2.p1.1)\.
- Sakoe and Chiba \(1978\)H\. Sakoe and S\. ChibaDynamic programming optimization for spoken word recognition\.IEEE Transactions on Acoustics, Speech, and Signal Processing26\(1\),pp\. 43–49\.Cited by:[§D\.2](https://arxiv.org/html/2610.13131#A4.SS2.SSS0.Px3.p2.1)\.
- Shiet al\.\(2024\)D\. Shi, Y\. Tong, Z\. Zhou, K\. Xu, Z\. Wang, and J\. YeGRAPH\-CONSTRAINED DIFFUSION FOR END\-TO\-END PATH PLANNING\.InThe Twelfth International Conference on Learning Representations,External Links:[Link](https://openreview.net/forum?id=vuK8MhVtuu)Cited by:[§D\.1](https://arxiv.org/html/2610.13131#A4.SS1.SSS0.Px3.p1.1),[§D\.1](https://arxiv.org/html/2610.13131#A4.SS1.SSS0.Px3.p3.1),[Appendix E](https://arxiv.org/html/2610.13131#A5.p2.1),[§1](https://arxiv.org/html/2610.13131#S1.p1.1),[§1](https://arxiv.org/html/2610.13131#S1.p2.1),[§2](https://arxiv.org/html/2610.13131#S2.SS0.SSS0.Px1.p1.1),[§5](https://arxiv.org/html/2610.13131#S5.SS0.SSS0.Px2.p1.1)\.
- Sunet al\.\(2023\)Q\. Sun, L\. Zhang, H\. Yu, W\. Zhang, Y\. Mei, and H\. XiongHierarchical reinforcement learning for dynamic autonomous vehicle navigation at intelligent intersections\.InProceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining,KDD ’23,pp\. 4852–4861\.External Links:[Document](https://dx.doi.org/10.1145/3580305.3599839)Cited by:[§1](https://arxiv.org/html/2610.13131#S1.p2.1)\.
- Weiet al\.\(2024\)T\. Wei, Y\. Lin, S\. Guo, Y\. Lin, Y\. Huang, C\. Xiang, Y\. Bai, and H\. WanDiff\-rntraj: a structure\-aware diffusion model for road network\-constrained trajectory generation\.IEEE Trans\. on Knowl\. and Data Eng\.36\(12\),pp\. 7940–7953\.External Links:ISSN 1041\-4347,[Document](https://dx.doi.org/10.1109/TKDE.2024.3460051)Cited by:[§D\.1](https://arxiv.org/html/2610.13131#A4.SS1.SSS0.Px3.p1.1),[§D\.1](https://arxiv.org/html/2610.13131#A4.SS1.SSS0.Px3.p3.1),[Appendix E](https://arxiv.org/html/2610.13131#A5.p2.1),[§1](https://arxiv.org/html/2610.13131#S1.p2.1),[§2](https://arxiv.org/html/2610.13131#S2.SS0.SSS0.Px1.p1.1),[§5](https://arxiv.org/html/2610.13131#S5.SS0.SSS0.Px2.p1.1)\.
- Wuet al\.\(2023\)P\. Wu, A\. Majumdar, K\. Stone, Y\. Lin, I\. Mordatch, P\. Abbeel, and A\. RajeswaranMasked trajectory models for prediction, representation, and control\.InInternational Conference on Machine Learning,Cited by:[§2](https://arxiv.org/html/2610.13131#S2.SS0.SSS0.Px3.p1.1)\.
- Wuet al\.\(2024\)W\. Wu, X\. Feng, Z\. Gao, and Y\. KanSMART: scalable multi\-agent real\-time motion generation via next\-token prediction\.InAdvances in Neural Information Processing Systems,Vol\.37,pp\. 114048–114071\.External Links:[Document](https://dx.doi.org/10.52202/079017-3622)Cited by:[§2](https://arxiv.org/html/2610.13131#S2.SS0.SSS0.Px2.p1.1)\.
- Yen \(1971\)J\. Y\. YenFinding the k shortest loopless paths in a network\.Management Science17\(11\),pp\. 712–716\.External Links:[Document](https://dx.doi.org/10.1287/mnsc.17.11.712),[Link](https://doi.org/10.1287/mnsc.17.11.712)Cited by:[§D\.1](https://arxiv.org/html/2610.13131#A4.SS1.SSS0.Px3.p1.1),[§2](https://arxiv.org/html/2610.13131#S2.SS0.SSS0.Px3.p1.1),[§5](https://arxiv.org/html/2610.13131#S5.SS0.SSS0.Px2.p1.1)\.
- Yonetaniet al\.\(2021\)R\. Yonetani, T\. Taniai, M\. Barekatain, M\. Nishimura, and A\. KanezakiPath planning using neural a\* search\.InProceedings of the 38th International Conference on Machine Learning,Proceedings of Machine Learning Research, Vol\.139,pp\. 12029–12039\.Cited by:[§2](https://arxiv.org/html/2610.13131#S2.SS0.SSS0.Px3.p1.1)\.
- Zenget al\.\(2023\)X\. Zeng, Q\. Yu, S\. Liu, Y\. Xia, H\. Su, and K\. ZhengTarget\-oriented maneuver decision for autonomous vehicle: a rule\-aided reinforcement learning framework\.InProceedings of the 32nd ACM International Conference on Information and Knowledge Management,CIKM ’23,New York, NY, USA,pp\. 3124–3133\.External Links:[Document](https://dx.doi.org/10.1145/3583780.3615072)Cited by:[§2](https://arxiv.org/html/2610.13131#S2.SS0.SSS0.Px3.p1.1)\.
- Zhaoet al\.\(2024\)E\. Zhao, P\. Awasthi, Z\. Chen, S\. Gollapudi, and D\. DellingSemantic routing via autoregressive modeling\.InAdvances in Neural Information Processing Systems,Vol\.37,pp\. 10060–10087\.External Links:[Document](https://dx.doi.org/10.52202/079017-0323)Cited by:[§D\.1](https://arxiv.org/html/2610.13131#A4.SS1.SSS0.Px3.p1.1),[§D\.1](https://arxiv.org/html/2610.13131#A4.SS1.SSS0.Px3.p3.1),[§2](https://arxiv.org/html/2610.13131#S2.SS0.SSS0.Px1.p1.1),[§5](https://arxiv.org/html/2610.13131#S5.SS0.SSS0.Px2.p1.1)\.
- Zhenget al\.\(2025\)Y\. Zheng, R\. Liang, K\. ZHENG, J\. Zheng, L\. Mao, J\. Li, W\. Gu, R\. Ai, S\. E\. Li, X\. Zhan, and J\. LiuDiffusion\-based planning for autonomous driving with flexible guidance\.InThe Thirteenth International Conference on Learning Representations,External Links:[Link](https://openreview.net/forum?id=wM2sfVgMDH)Cited by:[§2](https://arxiv.org/html/2610.13131#S2.SS0.SSS0.Px2.p1.1)\.
- Zhuet al\.\(2023\)Y\. Zhu, Y\. Ye, S\. Zhang, X\. Zhao, and J\. YuDiffTraj: generating gps trajectory with diffusion probabilistic model\.InAdvances in Neural Information Processing Systems,Vol\.36,pp\. 65168–65188\.External Links:[Document](https://dx.doi.org/10.52202/075280-2843)Cited by:[§D\.1](https://arxiv.org/html/2610.13131#A4.SS1.SSS0.Px3.p1.1),[§D\.1](https://arxiv.org/html/2610.13131#A4.SS1.SSS0.Px3.p3.1),[Appendix E](https://arxiv.org/html/2610.13131#A5.p2.1),[§1](https://arxiv.org/html/2610.13131#S1.p2.1),[§2](https://arxiv.org/html/2610.13131#S2.SS0.SSS0.Px1.p1.1),[§5](https://arxiv.org/html/2610.13131#S5.SS0.SSS0.Px2.p1.1)\.
- Zhuet al\.\(2024\)Y\. Zhu, J\. J\. Yu, X\. Zhao, Q\. Liu, Y\. Ye, W\. Chen, Z\. Zhang, X\. Wei, and Y\. LiangControlTraj: controllable trajectory generation with topology\-constrained diffusion model\.InProceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining,KDD ’24,pp\. 4676–4687\.External Links:[Document](https://dx.doi.org/10.1145/3637528.3671866)Cited by:[§1](https://arxiv.org/html/2610.13131#S1.p2.1),[§2](https://arxiv.org/html/2610.13131#S2.SS0.SSS0.Px1.p1.1)\.

## Appendix ANotation

Table[3](https://arxiv.org/html/2610.13131#A1.T3)summarizes the symbols used in the problem formulation, model, and training objective\. We distinguish road locations, direction\-aware states, legal events, and the global output alphabet\. The training targetyty\_\{t\}is a realized reference window, whereasR^t\\widehat\{R\}\_\{t\}is the model\-predicted anticipation\.

Table 3:Core notation used in the paper\.The directional attribute is determined by the incoming movement, whereas the destination condition is determined by node identity\. The realized targetyty\_\{t\}and maskmt,hm\_\{t,h\}are used only for training; at inference,R^t\\widehat\{R\}\_\{t\}is predicted from\(ct,g\)\(c\_\{t\},g\)and only the selected event is executed\. STOP is an event in𝒰t\\mathcal\{U\}\_\{t\}only at the destination and does not correspond to a successor state\.

## Appendix BProbabilistic Foundation of Foresight

This appendix gives a probabilistic interpretation of Foresight that is consistent with Section[4](https://arxiv.org/html/2610.13131#S4)\. The underlying object is a random\-length trajectory on a directed road network\. A training trajectory is one realization of this process, and a future window extracted from it is one sampled realization at a temporal anchor\. In contrast,RtR\_\{t\}denotes a model\-predicted anticipation computed from the history and goal\. Keeping these objects distinct is essential when hypothetical candidate\-conditioned continuations are evaluated\.

### B\.1Random\-Length Road\-Network Trajectory Process

Let𝒢=\(𝒱,ℰ\)\\mathcal\{G\}=\(\\mathcal\{V\},\\mathcal\{E\}\)be a directed road network and letXt∈𝒱X\_\{t\}\\in\\mathcal\{V\}denote the road state at steptt\. For an ordinary movement, the direction\-aware action is induced by two consecutive road states,

At=ψ⁡\(Xt,Xt−1\)∈𝒜move,St=\(At,Xt\),t≥1,A\_\{t\}=\\psi\(X\_\{t\},X\_\{t\-1\}\)\\in\\mathcal\{A\}\_\{\\mathrm\{move\}\},\\qquad S\_\{t\}=\(A\_\{t\},X\_\{t\}\),\\quad t\\geq 1,\(14\)whereA0=BOSA\_\{0\}=\\mathrm\{BOS\}andS0=\(BOS,X0\)S\_\{0\}=\(\\mathrm\{BOS\},X\_\{0\}\)\. ThusStS\_\{t\}is induced by the road\-state process;AtA\_\{t\}is not an additional independent latent process\. The realized history before the next decision is

ct=S0:t,g∈𝒱,c\_\{t\}=S\_\{0:t\},\\qquad g\\in\\mathcal\{V\},\(15\)whereggis the destination andX0X\_\{0\}is the origin encoded byS0S\_\{0\}\.

The action alphabet includes an explicit terminal event,

𝒜\+=𝒜move∪\{STOP\}\.\\mathcal\{A\}^\{\+\}=\\mathcal\{A\}\_\{\\mathrm\{move\}\}\\cup\\\{\\mathrm\{STOP\}\\\}\.\(16\)The stopping time is defined by that event alone:

τ=inf\{t≥0:At\+1=STOP\}\.\\tau=\\inf\\\{t\\geq 0:A\_\{t\+1\}=\\mathrm\{STOP\}\\\}\.\(17\)AtXt=gX\_\{t\}=g, STOP becomes admissible, but reaching the destination does not terminate the process automatically\. IfAt\+1∈𝒜moveA\_\{t\+1\}\\in\\mathcal\{A\}\_\{\\mathrm\{move\}\}, a new road state is realized andAt\+1=ψ⁡\(Xt\+1,Xt\)A\_\{t\+1\}=\\psi\(X\_\{t\+1\},X\_\{t\}\); ifAt\+1=STOPA\_\{t\+1\}=\\mathrm\{STOP\}, no ordinaryXt\+1X\_\{t\+1\}orSt\+1S\_\{t\+1\}is generated\. With the decision filtration

ℱt=σ⁡\(S0,A1,S1,…,St,At\+1\),\\mathcal\{F\}\_\{t\}=\\sigma\(S\_\{0\},A\_\{1\},S\_\{1\},\\ldots,S\_\{t\},A\_\{t\+1\}\),\(18\)τ\\tauis a stopping time\. The complete stopped trajectory is

𝐒=S0:τ=\(S0,…,Sτ\),\\mathbf\{S\}=S\_\{0:\\tau\}=\(S\_\{0\},\\ldots,S\_\{\\tau\}\),\(19\)whose length is random\. At the data level,

𝐒\(n\)∼Pdata​\(𝐒∣X0,g\)\.\\mathbf\{S\}^\{\(n\)\}\\sim P\_\{\\mathrm\{data\}\}\(\\mathbf\{S\}\\mid X\_\{0\},g\)\.\(20\)A training trajectory is one realization of this goal\-conditioned process, not a deterministic specification of a unique route between its endpoints\. The conditional distribution is learned from regularities across trajectory samples and temporal anchors; a single realization does not identify the full multimodal distribution\.

### B\.2Goal\-Conditioned Future Process and Anticipatory Modeling

At an anchort≤τt\\leq\\tau, the complete future is the variable\-length suffixSt\+1:τS\_\{t\+1:\\tau\}with conditional distribution

P\(St\+1:τ∣ct,g\)\.P\(S\_\{t\+1:\\tau\}\\mid c\_\{t\},g\)\.\(21\)The usual next\-step conditional is its one\-step marginal,

P\(St\+1∣ct,g\)=∑St\+2:τP\(St\+1:τ∣ct,g\)\.P\(S\_\{t\+1\}\\mid c\_\{t\},g\)=\\sum\_\{S\_\{t\+2:\\tau\}\}P\(S\_\{t\+1:\\tau\}\\mid c\_\{t\},g\)\.\(22\)The summation represents marginalization over downstream continuations\. Long\-range regularities may therefore be encoded implicitly, but the future is not an explicit context for the current decision\. Anticipatory Generative Modeling \(AGM\) makes such context explicit by predicting a finite future representation before selecting the current legal transition\.

For a sampled trajectory𝐒\(n\)\\mathbf\{S\}^\{\(n\)\}, the observed suffixSt\+1:τ\(n\)\(n\)S\_\{t\+1:\\tau^\{\(n\)\}\}^\{\(n\)\}is one realization of the conditional future for\(ct\(n\),g\)\(c\_\{t\}^\{\(n\)\},g\)\. It is a supervision reference, not a unique route and not an inference input\. The learned computation is

Rt=ℱθ​\(ct,g\),qt=𝒯ϕ​\(ct,g,Rt,𝒰t\)\.R\_\{t\}=\\mathcal\{F\}\_\{\\theta\}\(c\_\{t\},g\),\\qquad q\_\{t\}=\\mathcal\{T\}\_\{\\phi\}\(c\_\{t\},g,R\_\{t\};\\mathcal\{U\}\_\{t\}\)\.\(23\)These arrows describe computation and do not assert a conditional\-independence statement such asSt\+1⟂\(ct,g\)\|RtS\_\{t\+1\}\\perp\(c\_\{t\},g\)\\mid R\_\{t\}\.

### B\.3Finite\-Horizon Anticipation

The full future has random length, whereas the model exposes a fixed numberHHof future positions at each decision\. Let

𝒴=𝒱∪\{STOP\},yt=\(yt,1,…,yt,H\),yt,h∈𝒴∪\{PAD\}\.\\mathcal\{Y\}=\\mathcal\{V\}\\cup\\\{\\mathrm\{STOP\}\\\},\\qquad y\_\{t\}=\(y\_\{t,1\},\\ldots,y\_\{t,H\}\),\\quad y\_\{t,h\}\\in\\mathcal\{Y\}\\cup\\\{\\mathrm\{PAD\}\\\}\.\(24\)For a sampled trajectory and anchortt, define the STOP\-aware reference by

yt,h=\{Xt\+h,1≤h≤τ−t,STOP,h=τ−t\+1,PAD,h\>τ−t\+1,mt,h=𝟏\{h≤τ−t\+1\}\.y\_\{t,h\}=\\begin\{cases\}X\_\{t\+h\},&1\\leq h\\leq\\tau\-t,\\\\ \\mathrm\{STOP\},&h=\\tau\-t\+1,\\\\ \\mathrm\{PAD\},&h\>\\tau\-t\+1,\\end\{cases\}\\qquad m\_\{t,h\}=\\mathbf\{1\}\\\{h\\leq\\tau\-t\+1\\\}\.\(25\)The STOP position is supervised, while positions after STOP are masked\. PAD is only a storage symbol and is not a decoder output\.

The model\-predicted anticipation is

Rt=ℱθ​\(ct,g\),R\_\{t\}=\\mathcal\{F\}\_\{\\theta\}\(c\_\{t\},g\),\(26\)whoseHHprediction positions provide downstream context for the Transition Network\. ThusHHis the explicit anticipation horizon, not the length of a generated trajectory, and fixingHHdoes not impose conditional independence on more distant states\. The sampled referenceyty\_\{t\}is used only during training\.

The anticipation is provisional and is recomputed after each realized movement:

Rt⟶st\+1⟶ct\+1⟶Rt\+1,ct\+1=ct⊕st\+1,Rt\+1=ℱθ​\(ct\+1,g\)\.R\_\{t\}\\longrightarrow s\_\{t\+1\}\\longrightarrow c\_\{t\+1\}\\longrightarrow R\_\{t\+1\},\\qquad c\_\{t\+1\}=c\_\{t\}\\oplus s\_\{t\+1\},\\quad R\_\{t\+1\}=\\mathcal\{F\}\_\{\\theta\}\(c\_\{t\+1\},g\)\.\(27\)

### B\.4Legal Transition, Candidate\-Conditioned Prediction, and Learning

Let𝒩G\+​\(Xt\)\\mathcal\{N\}\_\{G\}^\{\+\}\(X\_\{t\}\)denote the outgoing neighbors ofXtX\_\{t\}\. The legal movement candidates are

𝒰tmove=\{s′​\(u\):u∈𝒩G\+​\(Xt\)\},s′​\(u\)=\(ψ⁡\(u,Xt\),u\),\\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\}=\\\{s^\{\\prime\}\(u\):u\\in\\mathcal\{N\}\_\{G\}^\{\+\}\(X\_\{t\}\)\\\},\\qquad s^\{\\prime\}\(u\)=\\bigl\(\\psi\(u,X\_\{t\}\),u\\bigr\),\(28\)and the current event support is

𝒰t=\{𝒰tmove,Xt≠g,𝒰tmove∪\{STOP\},Xt=g\.\\mathcal\{U\}\_\{t\}=\\begin\{cases\}\\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\},&X\_\{t\}\\neq g,\\\\ \\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\}\\cup\\\{\\mathrm\{STOP\}\\\},&X\_\{t\}=g\.\\end\{cases\}\(29\)The transition distribution is normalized only on this topology\-constrained support:

qt=𝒯ϕ​\(ct,g,Rt,𝒰t\),∑e∈𝒰tqt​\(e\)=1\.q\_\{t\}=\\mathcal\{T\}\_\{\\phi\}\(c\_\{t\},g,R\_\{t\};\\mathcal\{U\}\_\{t\}\),\\qquad\\sum\_\{e\\in\\mathcal\{U\}\_\{t\}\}q\_\{t\}\(e\)=1\.\(30\)
Future positions use the global alphabet𝒴\\mathcal\{Y\}, whereas current events use𝒰t\\mathcal\{U\}\_\{t\}\. Withι​\(s′​\(u\)\)=u\\iota\(s^\{\\prime\}\(u\)\)=uandι⁡\(STOP\)=STOP\\iota\(\\mathrm\{STOP\}\)=\\mathrm\{STOP\}, align the current distribution by

q¯t​\(y\)=∑e∈𝒰tι⁡\(e\)=yqt​\(e\),y∈𝒴\.\\bar\{q\}\_\{t\}\(y\)=\\sum\_\{\\begin\{subarray\}\{c\}e\\in\\mathcal\{U\}\_\{t\}\\\\ \\iota\(e\)=y\\end\{subarray\}\}q\_\{t\}\(e\),\\qquad y\\in\\mathcal\{Y\}\.\(31\)This is a probability\-space alignment, not a second classifier\.

Afterqtq\_\{t\}has been formed, each hypothetical movement candidate defines a candidate\-conditioned history and re\-anticipation:

ct\(s′\)=ct⊕s′,Rt\+1\(s′\)=ℱθ​\(ct⊕s′,g\),s′∈𝒰tmove\.c\_\{t\}^\{\(s^\{\\prime\}\)\}=c\_\{t\}\\oplus s^\{\\prime\},\\qquad R\_\{t\+1\}^\{\(s^\{\\prime\}\)\}=\\mathcal\{F\}\_\{\\theta\}\(c\_\{t\}\\oplus s^\{\\prime\},g\),\\quad s^\{\\prime\}\\in\\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\}\.\(32\)The order is

Rt⟶qt⟶ct⊕s′⟶Rt\+1\(s′\)\.R\_\{t\}\\longrightarrow q\_\{t\}\\longrightarrow c\_\{t\}\\oplus s^\{\\prime\}\\longrightarrow R\_\{t\+1\}^\{\(s^\{\\prime\}\)\}\.\(33\)Rt\+1\(s′\)R\_\{t\+1\}^\{\(s^\{\\prime\}\)\}is a model prediction under a hypothetical history, not an observed counterfactual continuation\. STOP has no ordinary continuation branch\.

Letpt\+1,j\(s′\)p\_\{t\+1,j\}^\{\(s^\{\\prime\}\)\}be the decoder distribution at downstream positionjj\. For alignment with positions2,…,H2,\\ldots,H, define

P~t,1\(s′\)=q¯t,P~t,h\(s′\)=pt\+1,h−1\(s′\),2≤h≤H\.\\widetilde\{P\}\_\{t,1\}^\{\(s^\{\\prime\}\)\}=\\bar\{q\}\_\{t\},\\qquad\\widetilde\{P\}\_\{t,h\}^\{\(s^\{\\prime\}\)\}=p\_\{t\+1,h\-1\}^\{\(s^\{\\prime\}\)\},\\quad 2\\leq h\\leq H\.\(34\)The sampled\-future compatibility cost is

ℓtcomp\(s′\)=−∑h=2Hmt,hlogP~t,h\(s′\)\(yt,h\)\.\\ell\_\{t\}^\{\\mathrm\{comp\}\}\(s^\{\\prime\}\)=\-\\sum\_\{h=2\}^\{H\}m\_\{t,h\}\\log\\widetilde\{P\}\_\{t,h\}^\{\(s^\{\\prime\}\)\}\(y\_\{t,h\}\)\.\(35\)The same sampled suffix is a compatibility reference for all hypothetical branches\. For an unexecuted candidate,yt,2:Hy\_\{t,2:H\}is generally not a sample fromPdata\(⋅∣ct⊕s′,g\)P\_\{\\mathrm\{data\}\}\(\\cdot\\mid c\_\{t\}\\oplus s^\{\\prime\},g\); the data contain no factual future for every counterfactual movement\. The unified anchor criterion is

ℒt=−mt,1​log⁡q¯t​\(yt,1\)\+∑s′∈𝒰tmoveqt​\(s′\)​ℓtcomp​\(s′\)\.\\mathcal\{L\}\_\{t\}=\-m\_\{t,1\}\\log\\bar\{q\}\_\{t\}\(y\_\{t,1\}\)\+\\sum\_\{s^\{\\prime\}\\in\\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\}\}q\_\{t\}\(s^\{\\prime\}\)\\ell\_\{t\}^\{\\mathrm\{comp\}\}\(s^\{\\prime\}\)\.\(36\)The first term supervises the observed current event, including STOP\. The second couples transition probabilities to sampled\-future compatibility over hypothetical movement branches\. It is one unified criterion rather than separately weighted transition, future, and rollout losses\. Candidate re\-anticipation is not a forward input toqtq\_\{t\}, but its compatibility cost affects learning through the objective\.

For valid trajectory\-anchor pairsℐ\\mathcal\{I\}, the dataset objective is

ℛ^​\(Θ\)=1\|ℐ\|​∑\(n,t\)∈ℐℒt\(n\),ℛ⁡\(Θ\)=𝔼𝐒∼Pdata​\[∑t≤τℒt​\(𝐒\)\]\.\\widehat\{\\mathcal\{R\}\}\(\\Theta\)=\\frac\{1\}\{\|\\mathcal\{I\}\|\}\\sum\_\{\(n,t\)\\in\\mathcal\{I\}\}\\mathcal\{L\}\_\{t\}^\{\(n\)\},\\qquad\\mathcal\{R\}\(\\Theta\)=\\mathbb\{E\}\_\{\\mathbf\{S\}\\sim P\_\{\\mathrm\{data\}\}\}\\left\[\\sum\_\{t\\leq\\tau\}\\mathcal\{L\}\_\{t\}\(\\mathbf\{S\}\)\\right\]\.\(37\)The empirical average is a Monte Carlo estimate of the expected value of the defined training criterion\. This interpretation does not turn an unobserved branch into an observed counterfactual sample, nor does it claim thatℓtcomp​\(s′\)\\ell\_\{t\}^\{\\mathrm\{comp\}\}\(s^\{\\prime\}\)is an unbiased estimator of a true counterfactual conditional likelihood\.

### B\.5Sequential Generation as a Stochastic Process

At inference, only the realized history and destination are available:

Rt=ℱθ​\(ct,g\),qt=𝒯ϕ​\(ct,g,Rt,𝒰t\),a^t\+1=Select⁡\(qt;𝒰t\)\.R\_\{t\}=\\mathcal\{F\}\_\{\\theta\}\(c\_\{t\},g\),\\qquad q\_\{t\}=\\mathcal\{T\}\_\{\\phi\}\(c\_\{t\},g,R\_\{t\};\\mathcal\{U\}\_\{t\}\),\\qquad\\hat\{a\}\_\{t\+1\}=\\operatorname\{Select\}\(q\_\{t\};\\mathcal\{U\}\_\{t\}\)\.\(38\)The sampled training windowyty\_\{t\}is never provided\. Ifa^t\+1=s′∈𝒰tmove\\hat\{a\}\_\{t\+1\}=s^\{\\prime\}\\in\\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\}, then

st\+1=s′,ct\+1=ct⊕st\+1,Rt\+1=ℱθ​\(ct\+1,g\)\.s\_\{t\+1\}=s^\{\\prime\},\\qquad c\_\{t\+1\}=c\_\{t\}\\oplus s\_\{t\+1\},\\qquad R\_\{t\+1\}=\\mathcal\{F\}\_\{\\theta\}\(c\_\{t\+1\},g\)\.\(39\)Ifa^t\+1=STOP\\hat\{a\}\_\{t\+1\}=\\mathrm\{STOP\}, generation terminates withτ=t\\tau=tand no ordinary state is appended\. A maximum generation budget may truncate a run before STOP, but it does not redefineτ\\tau\.

For stochastic action selection, the probability of a stopped realization is schematically

PΘ\(S1:τ,Aτ\+1=STOP∣S0,g\)=\[∏t=0τ−1qt\(St\+1\)\]qτ\(STOP\),P\_\{\\Theta\}\(S\_\{1:\\tau\},A\_\{\\tau\+1\}=\\mathrm\{STOP\}\\mid S\_\{0\},g\)=\\left\[\\prod\_\{t=0\}^\{\\tau\-1\}q\_\{t\}\(S\_\{t\+1\}\)\\right\]q\_\{\\tau\}\(\\mathrm\{STOP\}\),\(40\)where eachqtq\_\{t\}is recomputed from the current realized history\. Training may evaluate all hypothetical movement branches for compatibility; inference realizes exactly one legal event and updates only that branch\. The resulting closed\-loop process is

\(Xt−1,Xt\)→At=ψ\(Xt,Xt−1\),\(At,Xt\)→St;\\displaystyle\(X\_\{t\-1\},X\_\{t\}\)\\to A\_\{t\}=\\psi\(X\_\{t\},X\_\{t\-1\}\),\\quad\(A\_\{t\},X\_\{t\}\)\\to S\_\{t\};\(41\)\(ct,g\)→Rt→qt→a^t\+1;\\displaystyle\(c\_\{t\},g\)\\to R\_\{t\}\\to q\_\{t\}\\to\\hat\{a\}\_\{t\+1\};movement:a^t\+1→st\+1→ct\+1→Rt\+1;\\displaystyle\\text\{movement: \}\\hat\{a\}\_\{t\+1\}\\to s\_\{t\+1\}\\to c\_\{t\+1\}\\to R\_\{t\+1\};STOP:a^t\+1=STOP→τ;\\displaystyle\\text\{STOP: \}\\hat\{a\}\_\{t\+1\}=\\mathrm\{STOP\}\\to\\tau;training branch:qt→s′→ct⊕s′→Rt\+1\(s′\)⇢yt\.\\displaystyle\\text\{training branch: \}q\_\{t\}\\to s^\{\\prime\}\\to c\_\{t\}\\oplus s^\{\\prime\}\\to R\_\{t\+1\}^\{\(s^\{\\prime\}\)\}\\dashrightarrow y\_\{t\}\.The dashed link denotes training supervision only\. It does not makeyty\_\{t\}a causal input toqtq\_\{t\}or an observed label for a hypothetical branch\.

## Appendix CArchitecture and Inference Details

This appendix fixes the architectural and inference interfaces used in Section[4](https://arxiv.org/html/2610.13131#S4)\. The model uses a shared node–fiber representation, a single structured Future Anticipation Decoder, and a topology\-constrained Transition Network\. Throughout,ct=S0:tc\_\{t\}=S\_\{0:t\}denotes the realized state history,St=\(At,Xt\)S\_\{t\}=\(A\_\{t\},X\_\{t\}\)is the current direction\-aware state,ggis the destination,Rt=ℱθ​\(ct,g\)R\_\{t\}=\\mathcal\{F\}\_\{\\theta\}\(c\_\{t\},g\)is the predicted finite\-horizon anticipation, andqtq\_\{t\}is the distribution over the legal event set𝒰t\\mathcal\{U\}\_\{t\}\. Uppercase block names such asCC,FF,GG, andTTare reserved for the token blocks in the visibility mask\. The learning criterion is defined in Section[4\.4](https://arxiv.org/html/2610.13131#S4.SS4); this appendix specifies its tensor interfaces and the closed\-loop inference procedure\.

### C\.1Fiber\-Aware State and Candidate Encoding

The shared node encoder maps node attributes tozx=Eθ​\(ax\)∈ℝdXz\_\{x\}=E\_\{\\theta\}\(a\_\{x\}\)\\in\\mathbb\{R\}^\{d\_\{X\}\}\. It is used for history nodes, the destination, and candidate nodes\. Node IDs index the graph and the global vocabulary; they are not additional inputs to the node\-attribute encoder\. A visited state is represented causally as

A0=0,At=ψ⁡\(Xt,Xt−1\),t≥1,St=\(At,Xt\)\.A\_\{0\}=0,\\qquad A\_\{t\}=\\psi\(X\_\{t\},X\_\{t\-1\}\),\\quad t\\geq 1,\\qquad S\_\{t\}=\(A\_\{t\},X\_\{t\}\)\.\(42\)Thus the current state contains the incoming transition that has already occurred\. For a legal outgoing nodeu∈𝒩𝒢\+​\(Xt\)u\\in\\mathcal\{N\}\_\{\\mathcal\{G\}\}^\{\+\}\(X\_\{t\}\), the online candidate is

At\+1\(u\)=ψ⁡\(u,Xt\),st\+1\(u\)=\(At\+1\(u\),u\)\.A\_\{t\+1\}^\{\(u\)\}=\\psi\(u,X\_\{t\}\),\\qquad s\_\{t\+1\}^\{\(u\)\}=\(A\_\{t\+1\}^\{\(u\)\},u\)\.\(43\)The movement support used below is therefore

𝒰tmove=\{st\+1\(u\):u∈𝒩𝒢\+​\(Xt\)\}\.\\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\}=\\\{s\_\{t\+1\}^\{\(u\)\}:u\\in\\mathcal\{N\}\_\{\\mathcal\{G\}\}^\{\+\}\(X\_\{t\}\)\\\}\.\(44\)If this candidate is executed, its fiber becomes the incoming fiber of the next history state\. Reaching the destination does not replace that fiber by a zero vector\. A zero\-fiber destination token is used only for destination conditioning\. STOP is an independent event rather than a graph node, so it does not pass through either encoder\.

The complete state embedding is formed before the Transformer input projection:

Tok\(St\)=WS\[zXt∥At\]\+etime\(t\)\+ehistory\.\\operatorname\{Tok\}\(S\_\{t\}\)=W\_\{S\}\[z\_\{X\_\{t\}\}\\\|A\_\{t\}\]\+e\_\{\\mathrm\{time\}\}\(t\)\+e\_\{\\mathrm\{history\}\}\.\(45\)The destination\-conditioning token uses\[zg∥0\]\[z\_\{g\}\\\|0\]and a destination role embedding\. This token does not overwrite the incoming fiber of an actually visited goal state\.

### C\.2Future Anticipation Decoder

The Future Anticipation Decoder is one structured Transformer with token layout

𝒳t=\[Tok⁡\(ct\),QtF,Tok⁡\(g\),QtG,eSTOP\],\\mathcal\{X\}\_\{t\}=\[\\operatorname\{Tok\}\(c\_\{t\}\),Q\_\{t\}^\{F\},\\operatorname\{Tok\}\(g\),Q\_\{t\}^\{G\},e\_\{\\mathrm\{STOP\}\}\],\(46\)whereQtFQ\_\{t\}^\{F\}containsHHordered future queries andQtGQ\_\{t\}^\{G\}contains learned global slots\. Queryhhcarries the absolute timet\+ht\+hand the projected destination condition,

qt,hF=etime\(t\+h\)\+WS\[zg∥0\],h=1,…,H\.q^\{F\}\_\{t,h\}=e\_\{\\mathrm\{time\}\}\(t\+h\)\+W\_\{S\}\[z\_\{g\}\\\|0\],\\qquad h=1,\\ldots,H\.\(47\)The global\-slot position identifies a slot index, not a trajectory time\.

![Refer to caption](https://arxiv.org/html/2610.13131v1/future_decoder.png)Figure 5:Future Anticipation Decoder\. The structured Transformer maps the causal historyctc\_\{t\}and destinationggto global\-slot latents, future hidden representations, and global road\-space predictions\. The downstream hidden tail is passed to the Transition Network; candidate\-conditioned re\-decoding reuses the same decoder after a hypothetical legal movement\.The structured visibility mask is applied at every Transformer layer\. LetCC,FF,gg,GG, andTTdenote history, future\-query, destination, global\-slot, and STOP blocks\. The block\-level visibility contract is:

Table 4:Visibility mask for the Future Anticipation Decoder\. Padding masks additionally remove invalid rows and keys\.The structured visibility mask is applied at every Transformer layer\. History tokens attend only within the current anchor’s observed prefix\. A future query attends to valid history, the destination, all valid global slots, and itself or earlier future queries\. Destination and global slots do not read future queries, and later future queries cannot influence an earlier query\. Different anchors never attend to one another\. This mask cannot be replaced by an ordinary causal mask over the concatenated sequence\.

query\_validdescribes which query tokens are constructed and may be read by the network\. At inference the requested fixed window supplies allHHvalid queries, independent of the unknown realized suffix length\.target\_validis separate: it masks only the observed target sequence in training and offline comparison\. The Future Anticipation Decoder therefore never receives the true suffix length, a realized future token, or a target mask as a conditioning feature\.

The decoder interface is

\(ZtG,ZtF,Lt\)=ℱθ​\(ct,g\),ZtF∈ℝH×d,Lt∈ℝH×\|𝒴\|\.\(Z\_\{t\}^\{G\},Z\_\{t\}^\{F\},L\_\{t\}\)=\\mathcal\{F\}\_\{\\theta\}\(c\_\{t\},g\),\\qquad Z\_\{t\}^\{F\}\\in\\mathbb\{R\}^\{H\\times d\},\\quad L\_\{t\}\\in\\mathbb\{R\}^\{H\\times\|\\mathcal\{Y\}\|\}\.\(48\)The fixed query layout is constructed internally fromttandHH\. Each future position returns a hidden state and a categorical logit vector over𝒴\\mathcal\{Y\}\. The exported anticipation in the notation of Section[4](https://arxiv.org/html/2610.13131#S4)is

Rt=\(ZtF,Lt\)\.R\_\{t\}=\(Z\_\{t\}^\{F\},L\_\{t\}\)\.\(49\)The first hidden state and logit vector describe the immediate next event\. The Transition Network consumes only the downstream hidden tailZtF\[2:H\]Z\_\{t\}^\{F\}\[2\{:\}H\]\(equivalently, the future tensor with its first query removed\) and itsquery\_validmask; it does not consume the first prediction, the Future logits, or the global slots\. The global\-slot states are internal decoder memory and are not part of the Transition input\.

### C\.3Topology\-Constrained Transition Network

The Transition Network first reads the current context without seeing the candidate set\. Its input is the history, the destination token, and the downstream part of the Future representation:

![Refer to caption](https://arxiv.org/html/2610.13131v1/transition_network.png)Figure 6:Topology\-constrained Transition Network\. A candidate\-independent readout summarizesctc\_\{t\},gg, and the downstream Future hidden tail\. Complete legal node–fiber candidates are scored afterward with a projected dot product and normalized only over𝒰t\\mathcal\{U\}\_\{t\}; the STOP event uses its independent scalar head\. Candidate\-conditioned future evaluation is a separate branch performed after the base distribution\.Xttr=\[qtrans,ProjC\(ct\),Projg\(g\),ProjF\(ZtF\[2:H\]\)\]\.X\_\{t\}^\{\\mathrm\{tr\}\}=\[q\_\{\\mathrm\{trans\}\},\\,\\operatorname\{Proj\}\_\{C\}\(c\_\{t\}\),\\,\\operatorname\{Proj\}\_\{g\}\(g\),\\,\\operatorname\{Proj\}\_\{F\}\(Z\_\{t\}^\{F\}\[2\{:\}H\]\)\]\.\(50\)Hereqtransq\_\{\\mathrm\{trans\}\}is a learned readout token\. The Transition Network applies full self\-attention to this sequence and uses padding masks for invalid history or future positions\. Candidate states are not appended to this sequence, so changing the number or order of legal candidates cannot change the contextual readout\. With

Httr=Transformerϕ⁡\(Xttr;maskt\),httr=Httr​\[qtrans\],H\_\{t\}^\{\\mathrm\{tr\}\}=\\operatorname\{Transformer\}\_\{\\phi\}\(X\_\{t\}^\{\\mathrm\{tr\}\};\\operatorname\{mask\}\_\{t\}\),\\qquad h\_\{t\}^\{\\mathrm\{tr\}\}=H\_\{t\}^\{\\mathrm\{tr\}\}\[q\_\{\\mathrm\{trans\}\}\],\(51\)the network produces one context\-dependent prediction in the complete state space:

rttr\\displaystyle r\_\{t\}^\{\\mathrm\{tr\}\}=Wout​httr\+bout,\\displaystyle=W\_\{\\mathrm\{out\}\}h\_\{t\}^\{\\mathrm\{tr\}\}\+b\_\{\\mathrm\{out\}\},qtkey\\displaystyle q\_\{t\}^\{\\mathrm\{key\}\}=Wq​rttr,\\displaystyle=W\_\{q\}r\_\{t\}^\{\\mathrm\{tr\}\},\(52\)ht\+1\(u\)\\displaystyle h\_\{t\+1\}^\{\(u\)\}=Wcand\[zu∥At\+1\(u\)\]\+ecand,\\displaystyle=W\_\{\\mathrm\{cand\}\}\[z\_\{u\}\\\|A\_\{t\+1\}^\{\(u\)\}\]\+e\_\{\\mathrm\{cand\}\},kt\(u\)\\displaystyle k\_\{t\}^\{\(u\)\}=Wk​ht\+1\(u\)\.\\displaystyle=W\_\{k\}h\_\{t\+1\}^\{\(u\)\}\.The representationrttrr\_\{t\}^\{\\mathrm\{tr\}\}is a prediction in the complete node–fiber state space\. The candidate encoder uses the same node and fiber features as the online state construction, so candidateuuis represented by its node embedding and incoming fiberAt\+1\(u\)A\_\{t\+1\}^\{\(u\)\}\. The notationqtkeyq\_\{t\}^\{\\mathrm\{key\}\}denotes a projected query vector and is distinct from the event distributionqtq\_\{t\}\. For each legal movement candidatest\+1\(u\)s\_\{t\+1\}^\{\(u\)\}, the projected dot\-product score is

ℓt​\(st\+1\(u\)\)=\(qtkey\)⊤​kt\(u\)κ,κ\>0\.\\ell\_\{t\}\\bigl\(s\_\{t\+1\}^\{\(u\)\}\\bigr\)=\\frac\{\(q\_\{t\}^\{\\mathrm\{key\}\}\)^\{\\top\}k\_\{t\}^\{\(u\)\}\}\{\\kappa\},\\qquad\\kappa\>0\.\(53\)STOP has no node or fiber state\. When it is admissible, its score is produced by an independent learned scalar head,

ℓt​\(STOP\)=wSTOP⊤​httr\+bSTOP\.\\ell\_\{t\}\(\\mathrm\{STOP\}\)=w\_\{\\mathrm\{STOP\}\}^\{\\top\}h\_\{t\}^\{\\mathrm\{tr\}\}\+b\_\{\\mathrm\{STOP\}\}\.\(54\)The legal event support is

𝒰t=\{𝒰tmove,Xt≠g,𝒰tmove∪\{STOP\},Xt=g,𝒰tmove=\{st\+1\(u\):u∈𝒩𝒢\+​\(Xt\)\}\.\\mathcal\{U\}\_\{t\}=\\begin\{cases\}\\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\},&X\_\{t\}\\neq g,\\\\\[2\.0pt\] \\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\}\\cup\\\{\\mathrm\{STOP\}\\\},&X\_\{t\}=g,\\end\{cases\}\\qquad\\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\}=\\\{s\_\{t\+1\}^\{\(u\)\}:u\\in\\mathcal\{N\}\_\{\\mathcal\{G\}\}^\{\+\}\(X\_\{t\}\)\\\}\.\(55\)The event distribution is the masked softmax over exactly this set:

qt​\(e\)=exp⁡\{ℓt​\(e\)\}∑v∈𝒰texp⁡\{ℓt​\(v\)\},e∈𝒰t,q\_\{t\}\(e\)=\\frac\{\\exp\\\{\\ell\_\{t\}\(e\)\\\}\}\{\\displaystyle\\sum\_\{v\\in\\mathcal\{U\}\_\{t\}\}\\exp\\\{\\ell\_\{t\}\(v\)\\\}\},\\qquad e\\in\\mathcal\{U\}\_\{t\},\(56\)andqt​\(e\)=0q\_\{t\}\(e\)=0outside the support\. Padding entries and illegal candidates therefore never contribute to the denominator\. In particular, the STOP column is masked to−∞\-\\inftywheneverXt≠gX\_\{t\}\\neq g; it becomes a competing event at the goal, and is the unique event when the goal has no outgoing movement\. A non\-goal state with no legal outgoing movement has an empty support and is reported as an invalid transition rather than being forced to stop\.

The number of legal candidates can vary across the road network\. For batching, candidate rows may be padded to a common width, but padding is masked before scoring and never enters the normalizer\. The support remains exactly𝒰tmove\\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\}\(together with STOP when it is admissible\); no sampled or synthetic candidate changes the legal event set\.

The output interface is consequently

\(ct,g,ZtF\[2:H\],𝒰tmove\)⟼\(rttr,\{ℓt\(e\)\}e∈𝒰t,qt\)\.\(c\_\{t\},g,Z\_\{t\}^\{F\}\[2\{:\}H\],\\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\}\)\\longmapsto\\bigl\(r\_\{t\}^\{\\mathrm\{tr\}\},\\\{\\ell\_\{t\}\(e\)\\\}\_\{e\\in\\mathcal\{U\}\_\{t\}\},q\_\{t\}\\bigr\)\.\(57\)Candidate\-conditioned branches are evaluated only after this base readout and distribution have been formed\. They can refine inference when enabled, but they do not change the candidate\-independent definition or legal support ofqtq\_\{t\}\.

### C\.4Candidate\-Conditioned Re\-Anticipation

The base distributionqtq\_\{t\}scores legal events from the current history and its Future representation\. An optional inference refinement asks whether each proposed movement remains compatible with the model’s own forecast after that movement is appended\. For a legal movements′∈𝒰tmoves^\{\\prime\}\\in\\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\}, form a hypothetical branch by appending its full node–fiber state to a copy ofctc\_\{t\}:

ct\(s′\)=ct∥s′,Rt\+1\(s′\)=ℱθ​\(ct\(s′\),g\)=\(Zt\+1F,\(s′\),Lt\+1\(s′\)\)\.c\_\{t\}^\{\(s^\{\\prime\}\)\}=c\_\{t\}\\mathbin\{\\\|\}s^\{\\prime\},\\qquad R\_\{t\+1\}^\{\(s^\{\\prime\}\)\}=\\mathcal\{F\}\_\{\\theta\}\(c\_\{t\}^\{\(s^\{\\prime\}\)\},g\)=\\bigl\(Z\_\{t\+1\}^\{F,\(s^\{\\prime\}\)\},L\_\{t\+1\}^\{\(s^\{\\prime\}\)\}\\bigr\)\.\(58\)The branch uses the same Future Anticipation Decoder parameters and the absolute query positions associated with the extended history\. It is hypothetical: evaluating it does not alterctc\_\{t\}\. Candidate branches can be flattened over the active history–candidate pairs and decoded in a single batched call; padded or illegal candidates are omitted\.

Appending one state shifts the forecast window by one position\. Thus the current forecast at query indexhhand the branch forecast at indexh−1h\-1refer to the same absolute future position forh=2,…,Hh=2,\\ldots,H\. Figure[7](https://arxiv.org/html/2610.13131#A3.F7)shows this overlap; the first query in each row is excluded from the comparison\.

Lt​\[2\],…,Lt​\[H\]⏟current:t\+2,…,t\+H⟷Lt\+1\(s′\)​\[1\],…,Lt\+1\(s′\)​\[H−1\]⏟branch:t\+2,…,t\+H\.\\underbrace\{L\_\{t\}\[2\],\\ldots,L\_\{t\}\[H\]\}\_\{\\text\{current: \}t\+2,\\ldots,t\+H\}\\hskip 9\.24994pt\\longleftrightarrow\\hskip 9\.24994pt\\underbrace\{L\_\{t\+1\}^\{\(s^\{\\prime\}\)\}\[1\],\\ldots,L\_\{t\+1\}^\{\(s^\{\\prime\}\)\}\[H\-1\]\}\_\{\\text\{branch: \}t\+2,\\ldots,t\+H\}\.

Figure 7:Overlap alignment for candidate\-conditioned re\-anticipation\. Predictions are compared only when they refer to the same absolute future position\.Letpt​\[h\]=softmax⁡\(Lt​\[h\]\)p\_\{t\}\[h\]=\\operatorname\{softmax\}\(L\_\{t\}\[h\]\)andpt\+1\(s′\)​\[h\]=softmax⁡\(Lt\+1\(s′\)​\[h\]\)p\_\{t\+1\}^\{\(s^\{\\prime\}\)\}\[h\]=\\operatorname\{softmax\}\(L\_\{t\+1\}^\{\(s^\{\\prime\}\)\}\[h\]\), over the shared future event alphabet𝒴\\mathcal\{Y\}\(node events and STOP\)\. ForH\>1H\>1, the optional consistency energy is the mean Jensen–Shannon divergence over theH−1H\-1overlapping positions:

Efut​\(s′\)=1H−1​∑h=2HJSD⁡\(pt​\[h\],pt\+1\(s′\)​\[h−1\]\)\.E\_\{\\mathrm\{fut\}\}\(s^\{\\prime\}\)=\\frac\{1\}\{H\-1\}\\sum\_\{h=2\}^\{H\}\\operatorname\{JSD\}\\\!\\left\(p\_\{t\}\[h\],p\_\{t\+1\}^\{\(s^\{\\prime\}\)\}\[h\-1\]\\right\)\.\(59\)HereJSD\(p,r\)=12KL\(p∥m\)\+12KL\(r∥m\)\\operatorname\{JSD\}\(p,r\)=\\tfrac\{1\}\{2\}\\operatorname\{KL\}\(p\\\|m\)\+\\tfrac\{1\}\{2\}\\operatorname\{KL\}\(r\\\|m\), wherem=12​\(p\+r\)m=\\tfrac\{1\}\{2\}\(p\+r\)\. This score uses predicted distributions only; it does not use realized future labels ortarget\_valid\. IfH≤1H\\leq 1, no positions overlap and the future energy is defined as zero, so no empty average is formed\. STOP has no successor state and is assigned zero future energy\.

When the inference weightw\>0w\>0\(the default configuration usesw=1w=1\), combine this optional score with the base event probability:

Et​\(e\)=−log⁡qt​\(e\)\+w​Efut​\(e\),πt​\(e\)=exp⁡\[−Et​\(e\)\]∑v∈𝒰texp⁡\[−Et​\(v\)\],e∈𝒰t\.E\_\{t\}\(e\)=\-\\log q\_\{t\}\(e\)\+wE\_\{\\mathrm\{fut\}\}\(e\),\\qquad\\pi\_\{t\}\(e\)=\\frac\{\\exp\[\-E\_\{t\}\(e\)\]\}\{\\sum\_\{v\\in\\mathcal\{U\}\_\{t\}\}\\exp\[\-E\_\{t\}\(v\)\]\},\\quad e\\in\\mathcal\{U\}\_\{t\}\.\(60\)HereEfut​\(e\)E\_\{\\mathrm\{fut\}\}\(e\)is the branch score for a movement and zero for STOP\. Greedy decoding selects the legal event with minimumEtE\_\{t\}; sampling draws fromπt\\pi\_\{t\}\. Settingw=0w=0\(orH≤1H\\leq 1\) uses the base distributionqtq\_\{t\}directly\. After selection, only the chosen movement state is appended to the realized history; the next decision computes a fresh Future window from that updated history\.

### C\.5Closed\-loop inference and termination

Foresight generates a trajectory by repeatedly anticipating, selecting one graph\-valid event, executing it, and revising the anticipation from the resulting history\. The future window is reconstructed at every decision\. In particular, the previous prediction is not shifted forward after a movement: the new history determines new query positions, masks, candidate fibers, and decoder states\. The procedure below usesKmaxK\_\{\\max\}as an external decision budget; the STOP event counts as one decision\.

![Refer to caption](https://arxiv.org/html/2610.13131v1/generation.png)Figure 8:Closed\-loop generation\. At each decision, Foresight anticipates a fixed future window from the realized history and goal, scores the graph\-legal events, optionally evaluates candidate\-conditioned future consistency, and selects one movement or STOP\. A movement updates the history and triggers a fresh Future Anticipation Decoder call; STOP terminates only at the goal, while budget exhaustion is reported as a timeout\.The data flow at one decision is therefore

\(ck,g\)⟶ℱθ⟶qk⟶πk​\(optional\)⟶one movement or STOP\.\(c\_\{k\},g\)\\;\\longrightarrow\\;\\mathcal\{F\}\_\{\\theta\}\\;\\longrightarrow\\;q\_\{k\}\\;\\longrightarrow\\;\\pi\_\{k\}\\;\(\\text\{optional\}\)\\;\\longrightarrow\\;\\text\{one movement or STOP\}\.The current Future forward and all candidate branches use shared decoder parameters\. Branches are evaluated only for valid movement candidates; padding rows are removed before decoding and never enter a probability denominator\. The branch batch may be flattened over active request–candidate pairs, but the real trajectory remains sequential becauseck\+1c\_\{k\+1\}depends on the event selected at stepkk\.

STOP and failure states have distinct meanings\. STOP is admissible only at the destination, does not create a successor state, and terminates the rollout only when it is selected\. Visiting the destination does not terminate generation; a trajectory may leave the destination if a movement is selected there\. Consequently, an initial history whose current node is alreadyggstill invokes the model and must select STOP\. A non\-destination node with no legal outgoing movement has an empty event support and returnsinvalid\_transition; STOP is never used as a fallback\. If the budget is exhausted before STOP is selected, the result istimeout\(or truncation under the reporting terminology\)\. Non\-finite model outputs or an invalid sampled event are reported asnumerical\_errorrather than silently repaired\.

Table 5:Termination and boundary semantics during generation\.The diagnostic flaggoal\_arrivedrecords whether the realized history has ever visitedgg; it is independent of the terminal event\. A rollout is successful only when STOP is selected while the current node isgg, so merely visitingggdoes not imply success\. This matches the stopping\-time convention in the theory appendix, where termination is induced by the selected STOP event rather than by the first visit to the destination\.

For a batch of requests, generation proceeds by an active\-wavefront schedule\. At each depth, only requests that have not returnedstop,invalid\_transition,timeout, ornumerical\_errorare padded and passed through the shared Future and Transition forwards\. Candidate branches are flattened across the active requests and legal movement candidates, then scattered back to their request rows before selection\. Each request keeps its own history, seed, and sampling state; removing a finished request from later waves does not alter the ordering of the remaining candidates\. A trace records the node sequence and complete states, legal candidates,qtq\_\{t\}\(andπt\\pi\_\{t\}when used\), selected event, query/mask metadata, consistency energy, elapsed time, and the final stop reason\.

### C\.6Architecture Configuration and Inference Complexity

The scale namess​1s1–s​5s5refer to the resolved architecture presets inconfigs/rest\_s1–configs/rest\_s5\. The dimensions and depths below are transcribed from the current scale specification; they describe the network instance and do not determine the optimizer, training schedule, or generation budget\. The Future Anticipation Decoder uses widthdF=dmodel=dXd\_\{F\}=d\_\{\\mathrm\{model\}\}=d\_\{X\}, while the Transition Network uses widthdT=dXd\_\{T\}=d\_\{X\}\. All production scales usedV=64d\_\{V\}=64, fiber hidden width 128, sinusoidal time encodings, zero dropout, eight Future attention heads, four Transition heads, two\-layer base/fiber MLPs with base hidden width2​dX2d\_\{X\}, and Transformer FFN widths four times their model width\. Every scale uses the fixed Future horizonH=64H=64; the realized suffix length is represented by the validity mask\.

Table 6:Resolved architecture dimensions for the five model scales\.HHis fixed at 64 in every configuration\.The current inference protocol uses the projected dot\-product candidate score with a positive finite temperatureκ\\kappa\. Candidate\-conditioned future consistency is enabled with weightw=1w=1in the default protocol; settingw=0w=0gives the Transition\-only ablation\. The selection mode, sampling temperature, and decision budget are run\-level settings and must be read from the savedresolved\_config; no fixed value is asserted here\. Likewise, the global vocabulary size\|𝒴\|\|\\mathcal\{Y\}\|is supplied by the city\-specific ordered node table and is not determined by the scale name\. The resulting parameter counts therefore vary by city\. The current report is:

Table 7:Total trainable parameters \(Future plus Transition\) by city and model scale\. Counts include the Future vocabulary head and exclude optimizer state, gradients, activations, and runtime caches\.LetNtN\_\{t\}be the number of valid history tokens,DtD\_\{t\}the number of legal movement candidates, andV=\|𝒴\|V=\|\\mathcal\{Y\}\|the global predictive vocabulary\. One decision performs one current Future forward and one Transition forward\. With dense attention, the current Future cost is𝒪⁡\(\(Nt\+H\+M\+2\)2​dF\+H​V​dF\)\\mathcal\{O\}\(\(N\_\{t\}\+H\+M\+2\)^\{2\}d\_\{F\}\+HVd\_\{F\}\), while the Transition cost is𝒪⁡\(\(Nt\+H−1\)2​dT\+Dt​dT\)\\mathcal\{O\}\(\(N\_\{t\}\+H\-1\)^\{2\}d\_\{T\}\+D\_\{t\}d\_\{T\}\)up to layer and head factors\. When future\-consistency reranking is enabled, the valid movement branches add a batched Future computation of𝒪⁡\(Dt​\(Nt\+H\+M\+2\)2​dF\+Dt​H​V​dF\)\\mathcal\{O\}\(D\_\{t\}\(N\_\{t\}\+H\+M\+2\)^\{2\}d\_\{F\}\+D\_\{t\}HVd\_\{F\}\); batching reduces kernel\-launch overhead but does not remove this candidate\-dependent work or its activation memory\. Candidate branches are flattened over active request–candidate pairs, whereas different realized steps remain sequential because the next history depends on the selected event\.

Static node encodings may be cached when model parameters are fixed\. Fiber features remain online functions of each source–destination pair, and all history\-conditioned Future hidden states and logits are recomputed after a real movement\. The implementation therefore does not claim a cache for the entire decoder state or a fixed latency improvement from batching\. Measured latency, throughput, and peak memory are run\-dependent quantities and belong to the experimental protocol \(Appendix[D\.2](https://arxiv.org/html/2610.13131#A4.SS2)\)\. Architecture and parameter\-scale specifications are reported in Appendix[D\.2](https://arxiv.org/html/2610.13131#A4.SS2.SSS0.Px1); the result tables in Appendix F should be read together with Tables[6](https://arxiv.org/html/2610.13131#A3.T6)and[7](https://arxiv.org/html/2610.13131#A3.T7)\.

## Appendix DExperimental Setup and Evaluation Protocol

This appendix specifies the data, model configuration, training procedure, and evaluation protocol used for the reported experiments\. Porto, Beijing, and San Francisco use the official HOSER road graphs and train/validation/test splits\[[Cao et al\., 2025](https://arxiv.org/html/2610.13131#bib.bib26)\]\. Training reads only the training split; validation is used for checkpoint selection and development\-time model selection; the test split is read only after the checkpoint and test\-condition manifest have been fixed\. All methods use the same graph, test conditions, replicate policy, generation budget, and failure\-accounting rule\. The fixed settings used for the reported runs are stated below\. Complete numerical evidence is reported in Appendix[E](https://arxiv.org/html/2610.13131#A5), while generated spatial and trajectory examples are reported separately in Appendix[F](https://arxiv.org/html/2610.13131#A6)\.

### D\.1Datasets and Baselines

#### Dataset Description and Sources

We evaluate goal\-conditioned road\-network trajectory generation on the Porto, Beijing, and San Francisco subsets of the public HOSER dataset\. The supplied road graph provides directed road states, road attributes, and legal outgoing transitions; trajectory files provide the observed road\-state sequences\. The three subsets represent the corresponding urban road regions, and the city name is retained as the geographic unit throughout training and evaluation\. The road graph and trajectory identifiers are retained when constructing the experimental records, so that a generated path can be checked against the same graph and reference representation used by the test evaluator\.

Preprocessing performs the dataset\-provided road\-to\-trajectory association and removes records that cannot be represented as graph\-valid directed sequences or that contain non\-finite required attributes\. Continuous\-feature normalization and any transition statistics are fitted on the training split and then reused without refitting on validation or test\. We do not introduce a new random split or pool trajectories across cities\. Dataset\-specific engineering details are kept in the data bundle; this appendix reports only the choices that affect the scientific comparison\.

#### Dataset Splits and Statistics

The official split is used independently for each city\. Training trajectories are used to fit model parameters and training\-only statistics\. Validation trajectories are fixed while selecting a checkpoint and comparing development settings\. Test trajectories and their reference paths are held out until the checkpoint, condition manifest, generation seeds, and evaluation configuration are frozen\. A test condition contains the origin/goal request and its linked reference metadata; several conditions may share one OD pair\.

Table[8](https://arxiv.org/html/2610.13131#A4.T8)is the compact dataset summary, following the statistics reported for the public HOSER data in Cao et al\.\[[Cao et al\., 2025](https://arxiv.org/html/2610.13131#bib.bib26)\]\. Road counts, trajectory totals, average distances, and average durations are copied from that dataset report\. Split counts are properties of the accepted experimental manifest and are reported separately when available\.

Table 8:Dataset statistics for the three evaluation cities, following the public HOSER dataset report\[[Cao et al\., 2025](https://arxiv.org/html/2610.13131#bib.bib26)\]\.Every method is evaluated on the same ordered condition manifest\. The manifest fixes the origin, destination, any additional goal\-conditioned fields, the reference identifier, and the requested replicate seeds\. No test trajectory is used to fit normalization, transition frequencies, or a checkpoint\.

#### Baseline Models

Baselines cover three comparison families\.*Statistical references*include Markov transition sampling, which uses only the training split\.*Graph\-search references*include Dijkstra\[[Dijkstra, 1959](https://arxiv.org/html/2610.13131#bib.bib17)\]and Yen’skk\-shortest\-path procedure\[[Yen, 1971](https://arxiv.org/html/2610.13131#bib.bib19)\], run on the same directed graph and OD requests\.*Learned generators*include Semantic Routing\[[Zhao et al\., 2024](https://arxiv.org/html/2610.13131#bib.bib25)\], HOSER\[[Cao et al\., 2025](https://arxiv.org/html/2610.13131#bib.bib26)\], TS\-TrajGen\[[, 2023](https://arxiv.org/html/2610.13131#bib.bib27)\], GDP\[[Shi et al\., 2024](https://arxiv.org/html/2610.13131#bib.bib11)\], Diff\-RNTraj\[[Wei et al\., 2024](https://arxiv.org/html/2610.13131#bib.bib9)\], DiffTraj\[[Zhu et al\., 2023](https://arxiv.org/html/2610.13131#bib.bib8)\], TrajFlow\[[Li et al\., 2026](https://arxiv.org/html/2610.13131#bib.bib12)\], and Seed\[[Rao et al\., 2025](https://arxiv.org/html/2610.13131#bib.bib13)\], matching the methods listed in the main experiment table\.

For each learned baseline, the original representation and decoder are kept as the method’s defining component\. If the original method is not OD\-conditioned, we use an explicitly documented OD adaptation: the origin and destination are supplied through its conditioning interface \(or its input representation\), and the adaptation is trained on the same city and split\. Continuous GPS outputs are mapped to the common road representation with the fixed map\-matching rule; conversion failures remain failed attempts\. Search baselines use fixed edge costs,kk, candidate ordering, and search budgets\. All baselines use the same test conditions, replicate seeds, maximum generation budget, and failure denominator\. Thus differences due to the baseline’s original modeling idea are separated from choices made solely to make the comparison executable under the common protocol\.

More specifically, Semantic Routing\[[Zhao et al\., 2024](https://arxiv.org/html/2610.13131#bib.bib25)\]and HOSER\[[Cao et al\., 2025](https://arxiv.org/html/2610.13131#bib.bib26)\]are stepwise road\-level navigational generators whose road\-token or semantic representation is kept in its native form; their goal interface is used directly when available\. GDP\[[Shi et al\., 2024](https://arxiv.org/html/2610.13131#bib.bib11)\]and Diff\-RNTraj\[[Wei et al\., 2024](https://arxiv.org/html/2610.13131#bib.bib9)\]generate graph\-constrained paths or road\-network trajectories with diffusion, so their graph support is retained and the OD request is added as the declared conditioning input when required\. TS\-TrajGen uses a two\-stage continuous trajectory generator\[[, 2023](https://arxiv.org/html/2610.13131#bib.bib27)\], while DiffTraj\[[Zhu et al\., 2023](https://arxiv.org/html/2610.13131#bib.bib8)\], TrajFlow\[[Li et al\., 2026](https://arxiv.org/html/2610.13131#bib.bib12)\], and Seed\[[Rao et al\., 2025](https://arxiv.org/html/2610.13131#bib.bib13)\]operate on continuous GPS, flow, or sequence–diffusion representations\. For these methods, the only comparison adaptation is OD conditioning plus the fixed GPS\-to\-road conversion; no generated path is repaired by a shortest\-path replacement\. Markov estimates local transition frequencies from training trajectories, and the search references decode their fixed candidate sets deterministically before the common replicate and failure accounting is applied\.

### D\.2Experimental Setup and Evaluation Protocol

#### Model Configuration and Parameter Scale

Foresight uses the shared node–fiber state representation, a structured Future Anticipation Decoder, and a topology\-constrained Transition Network \(Appendix[C](https://arxiv.org/html/2610.13131#A3)\)\. The scale name identifies one resolved configuration directory, while the city\-specific graph bundle supplies the global road vocabulary\. The complete per\-scale configuration, including all widths, depths, heads, slot counts, feed\-forward dimensions, and the fixed Future horizon, is given in Table[11](https://arxiv.org/html/2610.13131#A4.T11)\. The Transition readout uses the projected dot\-product candidate score described in Appendix[C\.3](https://arxiv.org/html/2610.13131#A3.SS3)\.

The parameter report counts every trainable tensor bynumel\. For a city with vocabulary sizeVV, the Future vocabulary head contributes\(dX\+1\)​V\(d\_\{X\}\+1\)Vparameters; all other Future parameters and all Transition parameters are independent of the city\. Tables[9](https://arxiv.org/html/2610.13131#A4.T9)and[10](https://arxiv.org/html/2610.13131#A4.T10)give the decomposition and the resulting city/scale totals\. Counts exclude optimizer state, gradients, activations, and runtime caches\. The selected scale, vocabulary size, and full parameter report must be read from the savedresolved\_configwhen reproducing a run\.

Table 9:Parameter decomposition for the five resolved model scales\. The Future vocabulary head is\(dX\+1\)​V\(d\_\{X\}\+1\)Vfor vocabulary sizeVV\.Table 10:Total trainable parameters by city and model scale, reported in millions \(M\)\.VVis the graph vocabulary size; counts include the Future vocabulary head\.Table 11:Complete resolved configuration for each model scale\. The columns are split into two panels for readability; parameters not varying with scale are repeated explicitly\.Panel A: widths, slots, and horizon Panel B: Base/Fiber and Future Decoder Panel C: Transition Network

#### Training Configuration

Training minimizes the unified candidate\-conditioned sequence objective\. Future targets are stop\-gradient supervision targets; they are never exposed as inputs to the Future Decoder or Transition Network\. The best checkpoint is selected by the fixed validation loss in evaluation mode and then frozen before test generation\. The values below are the resolved run configuration used for the reported experiments\.

Table 12:Training configuration used for the reported experiments\.The*trajectory batch*is the complete set of sampled trajectories from which valid decision anchors are constructed\. The*anchor micro\-batch*is only a memory\-scheduling chunk inside that trajectory batch; it does not define a different data distribution\. Outer gradient accumulation, if used, is a separate update boundary across trajectory batches\. All global normalizers are computed before chunking \(with separate Future and Transition valid\-anchor counts when the objective uses separate denominators\), and each chunk contributes its share to the same batch gradient\. Consequently, anchor micro\-batching changes memory use and graph lifetime but does not change the mathematical loss or its normalization\.

#### Evaluation Metrics

All metrics operate on the ordered 2\-D road trajectory representation obtained from the HOSER road graph \(road\-state geometry mapped to a local metric coordinate system\)\. Spatial distances are measured in kilometres; generated and reference trajectories are compared only when both have valid representations\. We report two complementary metric families\.*Distribution\-level metrics*are Distance JSD and Radius JSD\. Distance JSD is the Jensen–Shannon divergence between the reference and generated distributions of trajectory travel distance, while Radius JSD compares their distributions of spatial radius from the trajectory origin\. Both use the same fixed city\-specific support and bins for every method, are reported in the tables in units of10−210^\{\-2\}, and are lower\-is\-better\.

*Trajectory\-level similarity metrics*compare each generated trajectory with its matched reference trajectory\. Hausdorff distance\[[Huttenlocher et al\., 1993](https://arxiv.org/html/2610.13131#bib.bib29)\]measures the maximum spatial deviation between the two point sets; DTW\[[Sakoe and Chiba, 1978](https://arxiv.org/html/2610.13131#bib.bib30)\]uses the standard dynamic\-programming alignment to accumulate the minimum sequence\-level Euclidean distance; and EDR\[[Chen et al\., 2005](https://arxiv.org/html/2610.13131#bib.bib31)\]is an edit\-distance\-style similarity that matches points within a fixed toleranceϵ=0\.05\\epsilon=0\.05km \(50 m\)\. Hausdorff and DTW are reported as accumulated distances in kilometres, whereas EDR is divided by the reference sequence length and therefore lies on a normalized scale\. All three are lower\-is\-better\. The implementation uses the standard definitions above, with only the stated road\-trajectory conversion, city\-level binning, and normalization applied\.

#### Test and Generation Procedure

After checkpoint selection, generation runs in evaluation/no\-gradient mode on the frozen checkpoint and the fixed test\-condition manifest\. A condition provides the origin, destination, and any declared goal\-conditioning fields; the generator reads the generated prefix, graph, legal candidates, and its own predictions, never a true future suffix, reference label, or true path length\. For each condition, the manifest requests a fixed numberKrepK\_\{\\mathrm\{rep\}\}of replicates with persisted generation seeds\. The reported runs use 5,000 fixed test conditions and generation seeds\{0,1,2,3,4\}\\\{0,1,2,3,4\\\}\. Decoding follows the declared run\-level greedy or sampling configuration shared by all methods where applicable\.

At each transition, the model scores graph\-legal movement events and the independentSTOPevent\.STOPis admissible only when the current node is the destination\. The maximum transition budgetKmaxK\_\{\\max\}is fixed at 256 transitions\. A rollout ends at explicitSTOP, atKmaxK\_\{\\max\}, or at an abnormal failure such as an empty non\-goal support or a non\-finite model output\. Reaching the destination alone does not terminate a rollout\. Every attempt, including timeout and failure records, remains in the evaluation corpus with its condition ID, OD ID, replicate seed, node sequence, stop reason, success flag, and error code\. Completion rates use all attempts as the denominator\.

#### OD Bootstrap Evaluation

The primary uncertainty protocol treats an exactod\_idas one cluster\. Generated replicates and conditions are first grouped by that OD; when an OD contains multiple conditions, the condition\-level summaries are averaged within the OD before resampling\. A bootstrap replicate samples OD clusters with replacement, recomputes every reported metric from the sampled clusters, and stores the resulting statistic\. The reported point estimate is the statistic on the complete corpus, and the uncertainty interval or bootstrap standard deviation is obtained from the bootstrap distribution\. The reported results use 1,000 resamples with bootstrap seed 0\.

Resampling OD clusters keeps repeated conditions from the same origin–goal pair from being treated as independent evidence\. Distance JSD, Radius JSD, Hausdorff, EDR, DTW, and completion diagnostics are recomputed under the same fixed supports, matching rules, and denominator definitions in every bootstrap replicate\. Undefined metrics remain unavailable and are never zero\-filled\.

#### Condition Bootstrap Evaluation

The condition\-bootstrap protocol uses the exact evaluation condition as its resampling unit\. A condition is the frozen origin/goal request together with its reference metadata and all requested generated replicates\. Conditions that share an OD pair remain distinct clusters here, because the purpose is to measure sensitivity to condition weighting\. A bootstrap replicate samples condition IDs with replacement and retains all generated replicates belonging to each sampled condition as one unit before recomputing the metrics\.

Thus, OD bootstrap answers how results vary across origin–goal pairs, whereas condition bootstrap gives every supplied goal\-conditioned test condition its own sampling weight\. Both protocols preserve the condition\-to\-replicate grouping and the complete failure corpus\. HOSER\-style file\-level mean±\\pmstandard deviation is retained only as a supplementary compatibility statistic: it computes one summary per generation file and reports variation across files, without replacing the OD\-bootstrap protocol used for the main evidence\.

### D\.3PyTorch\-style Pseudocode

The four algorithms below state the tensor and control flow of Foresight at the architecture level\. They omit repository\-specific APIs and file paths\. The Future Decoder predicts over the global alphabet𝒴=𝒱∪\{STOP\}\\mathcal\{Y\}=\\mathcal\{V\}\\cup\\\{\\mathrm\{STOP\}\\\}, whereas the Transition Network normalizes only over the current graph\-legal support\. A future target mask affects supervision only; it is not supplied as a conditioning feature\.

#### Future Anticipation Decoder

Algorithm 1Future Anticipation Decoder1:Input:realized history

ctc\_\{t\}, destination

gg, query\-valid mask

MtM\_\{t\}
2:

C←encode\_history​\(ct\)C\\leftarrow\\texttt\{encode\\\_history\}\(c\_\{t\}\);

G←encode\_goal​\(g\)G\\leftarrow\\texttt\{encode\\\_goal\}\(g\)
3:

QF←future\_queries​\(H,t\)Q^\{F\}\\leftarrow\\texttt\{future\\\_queries\}\(H,t\);

QG←global\_slots​\(\)Q^\{G\}\\leftarrow\\texttt\{global\\\_slots\}\(\)
4:

X←concat​\(C,QF,G,QG,STOP\_slot\)X\\leftarrow\\texttt\{concat\}\(C,Q^\{F\},G,Q^\{G\},\\texttt\{STOP\\\_slot\}\)
5:

Z←structured\_transformer​\(X,visibility\_mask​\(ct,Mt\)\)Z\\leftarrow\\texttt\{structured\\\_transformer\}\(X,\\texttt\{visibility\\\_mask\}\(c\_\{t\},M\_\{t\}\)\)
6:

ZF←future\_block​\(Z\)Z^\{F\}\\leftarrow\\texttt\{future\\\_block\}\(Z\)
7:

LF←future\_head​\(ZF\)∈ℝH×\|𝒴\|L^\{F\}\\leftarrow\\texttt\{future\\\_head\}\(Z^\{F\}\)\\in\\mathbb\{R\}^\{H\\times\|\\mathcal\{Y\}\|\}
8:

LF←mask\_invalid\_query\_positions​\(LF,Mt\)L^\{F\}\\leftarrow\\texttt\{mask\\\_invalid\\\_query\\\_positions\}\(L^\{F\},M\_\{t\}\)
9:return

ZF,LFZ^\{F\},L^\{F\}

The structured mask allows each future query to read the valid history, destination, global slots, and preceding future queries while preventing later queries or target suffixes from leaking into earlier positions\. The first future hidden state represents the immediate next event; the downstream tailZF2:HZ^\{F\}\_\{2:H\}is exposed to the Transition Network\.

#### Transition Network

Algorithm 2Topology\-constrained Transition Network1:Input:history

ctc\_\{t\}, goal

gg, downstream anticipation

ZF2:HZ^\{F\}\_\{2:H\}, graph

GG
2:

𝒰tmove←legal\_neighbors​\(G,ct​\[−1\]\)\\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\}\\leftarrow\\texttt\{legal\\\_neighbors\}\(G,c\_\{t\}\[\-1\]\)
3:

ut←context\_encoder\(ct,g,detach\(Z2:HF\)\)u\_\{t\}\\leftarrow\\texttt\{context\\\_encoder\}\(c\_\{t\},g,\\texttt\{detach\}\(Z^\{F\}\_\{2:H\}\)\)
4:

ei←candidate\_encoder​\(si′\)e\_\{i\}\\leftarrow\\texttt\{candidate\\\_encoder\}\(s\_\{i\}^\{\\prime\}\)for each

si′∈𝒰tmoves\_\{i\}^\{\\prime\}\\in\\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\}
5:

ℓi←projected\_dot​\(ut,ei\)\\ell\_\{i\}\\leftarrow\\texttt\{projected\\\_dot\}\(u\_\{t\},e\_\{i\}\)for each legal candidate

6:

ℓstop←stop\_head​\(ut\)\\ell\_\{\\mathrm\{stop\}\}\\leftarrow\\texttt\{stop\\\_head\}\(u\_\{t\}\)
7:

St←𝒰tmove∪\{STOPifct\[−1\]=g\}S\_\{t\}\\leftarrow\\mathcal\{U\}\_\{t\}^\{\\mathrm\{move\}\}\\cup\\\{\\mathrm\{STOP\}\\ \\text\{if \}c\_\{t\}\[\-1\]=g\\\}
8:

ℓ←mask\_outside\_support​\(append​\(ℓi,ℓstop\),St\)\\ell\\leftarrow\\texttt\{mask\\\_outside\\\_support\}\(\\texttt\{append\}\(\\ell\_\{i\},\\ell\_\{\\mathrm\{stop\}\}\),S\_\{t\}\)
9:

qt←softmax\_over\_support​\(ℓ,St\)q\_\{t\}\\leftarrow\\texttt\{softmax\\\_over\\\_support\}\(\\ell,S\_\{t\}\)
10:return

ℓ,qt,St\\ell,q\_\{t\},S\_\{t\}

The context readout is formed without appending candidates to the Transformer sequence, so candidate count and ordering cannot change the context itself\. Only legal movement events and, at the goal,STOPparticipate in the normalizer\. A non\-goal state with no legal movement is reported as an invalid transition rather than being silently converted toSTOP\.

#### Sequential Generation

Algorithm 3Closed\-loop Sequential Generation1:Input:condition

\(s0,g\)\(s\_\{0\},g\), graph

GG, transition budget

KmaxK\_\{\\max\}
2:

c←\[s0\]c\\leftarrow\[s\_\{0\}\];

goal\_arrived←\(s0=g\)\\texttt\{goal\\\_arrived\}\\leftarrow\(s\_\{0\}=g\)
3:for

t=0,…,Kmax−1t=0,\\ldots,K\_\{\\max\}\-1do

4:

\(ZF,LF\)←FutureDecoder​\(c,g,all\_valid\_queries\)\(Z^\{F\},L^\{F\}\)\\leftarrow\\texttt\{FutureDecoder\}\(c,g,\\texttt\{all\\\_valid\\\_queries\}\)
5:

\(ℓ,qt,St\)←Transition\(c,g,Z2:HF,G\)\(\\ell,q\_\{t\},S\_\{t\}\)\\leftarrow\\texttt\{Transition\}\(c,g,Z^\{F\}\_\{2:H\},G\)
6:

a←decode​\(ℓ,qt,configured\_greedy\_or\_sampling\)a\\leftarrow\\texttt\{decode\}\(\\ell,q\_\{t\},\\texttt\{configured\\\_greedy\\\_or\\\_sampling\}\)
7:if

a=STOPa=\\mathrm\{STOP\}then

8:break⊳\\trianglerightlegal only when the current node isgg

9:elseif

a∉Sta\\notin S\_\{t\}then

10:return

c,invalid\_transitionc,\\texttt\{invalid\\\_transition\}
11:else

12:

c←append​\(c,successor\_state​\(a\)\)c\\leftarrow\\texttt\{append\}\(c,\\texttt\{successor\\\_state\}\(a\)\)
13:

goal\_arrived←goal\_arrived∨\(c⁡\[−1\]=g\)\\texttt\{goal\\\_arrived\}\\leftarrow\\texttt\{goal\\\_arrived\}\\ \\lor\\ \(c\[\-1\]=g\)
14:endif

15:endfor

16:iflast action wasSTOPthen

17:

r←STOPr\\leftarrow\\texttt\{STOP\}
18:else

19:

r←timeoutr\\leftarrow\\texttt\{timeout\}
20:endif

21:return

c,r,goal\_arrivedc,r,\\texttt\{goal\\\_arrived\}

The loop makes the receding\-anticipation order explicit:*anticipate→\\rightarrowselect→\\rightarrowupdate→\\rightarrowre\-anticipate*\. Only the selected movement is realized\. Visiting the goal is recorded separately from selectingSTOP; therefore a goal visit does not by itself mark a successful termination\.

#### Training with Anchor Micro\-batching

For a trajectory batchBB, let𝒜⁡\(B\)\\mathcal\{A\}\(B\)be all valid anchors and letZBZ\_\{B\}denote the global normalizer\(s\) prescribed by the unified objective \(for example, the total number of valid supervised anchor/position contributions; Future and Transition terms may have separate counts\)\. These values are computed before anchors are chunked and are shared by every micro\-batch\. This is the key condition that makes micro\-batching a memory strategy rather than a change to the objective\.

Algorithm 4Training with Anchor Micro\-batching1:Input:trajectory batch

BB, anchor chunk size

mm, optimizer

𝒪\\mathcal\{O\}
2:

𝒜←build\_valid\_anchors​\(B\)\\mathcal\{A\}\\leftarrow\\texttt\{build\\\_valid\\\_anchors\}\(B\);

ZB←global\_normalizer​\(𝒜\)Z\_\{B\}\\leftarrow\\texttt\{global\\\_normalizer\}\(\\mathcal\{A\}\)
3:

𝒪\.zero\_grad​\(\)\\mathcal\{O\}\.\\texttt\{zero\\\_grad\}\(\)
4:for all

𝒜j∈chunk​\(𝒜,m\)\\mathcal\{A\}\_\{j\}\\in\\texttt\{chunk\}\(\\mathcal\{A\},m\)do

5:

Fj←FutureDecoder\(𝒜j\.history,𝒜j\.goal\)F\_\{j\}\\leftarrow\\texttt\{FutureDecoder\}\(\\mathcal\{A\}\_\{j\}\.\\texttt\{history\},\\mathcal\{A\}\_\{j\}\.\\texttt\{goal\}\)
6:

LF,j←masked\_future\_CE\(Fj,𝒜j\.target\)L\_\{F,j\}\\leftarrow\\texttt\{masked\\\_future\\\_CE\}\(F\_\{j\},\\mathcal\{A\}\_\{j\}\.\\texttt\{target\}\)
7:

Cj←legal\_candidates\(𝒜j\.current\_state\)C\_\{j\}\\leftarrow\\texttt\{legal\\\_candidates\}\(\\mathcal\{A\}\_\{j\}\.\\texttt\{current\\\_state\}\)
8:

Tj←Transition\(𝒜j\.history,𝒜j\.goal,Fj\.Z2:HF,Cj\)T\_\{j\}\\leftarrow\\texttt\{Transition\}\(\\mathcal\{A\}\_\{j\}\.\\texttt\{history\},\\mathcal\{A\}\_\{j\}\.\\texttt\{goal\},F\_\{j\}\.Z^\{F\}\_\{2:H\},C\_\{j\}\)
9:

LT,j←event\_NLL\(Tj,𝒜j\.realized\_event\)L\_\{T,j\}\\leftarrow\\texttt\{event\\\_NLL\}\(T\_\{j\},\\mathcal\{A\}\_\{j\}\.\\texttt\{realized\\\_event\}\)
10:for all

s′∈Cjs^\{\\prime\}\\in C\_\{j\}do

11:

Fj\(s′\)←FutureDecoder\(𝒜j\.history⊕s′,𝒜j\.goal\)F\_\{j\}^\{\(s^\{\\prime\}\)\}\\leftarrow\\texttt\{FutureDecoder\}\(\\mathcal\{A\}\_\{j\}\.\\texttt\{history\}\\oplus s^\{\\prime\},\\mathcal\{A\}\_\{j\}\.\\texttt\{goal\}\)
12:

dj\(s′\)←masked\_suffix\_CE\(Fj\(s′\),𝒜j\.shifted\_target\)d\_\{j\}^\{\(s^\{\\prime\}\)\}\\leftarrow\\texttt\{masked\\\_suffix\\\_CE\}\(F\_\{j\}^\{\(s^\{\\prime\}\)\},\\mathcal\{A\}\_\{j\}\.\\texttt\{shifted\\\_target\}\)
13:endfor

14:

LC,j←candidate\_probability\_weighted\_sum​\(Tj,dj\(s′\)\)L\_\{C,j\}\\leftarrow\\texttt\{candidate\\\_probability\\\_weighted\\\_sum\}\(T\_\{j\},d\_\{j\}^\{\(s^\{\\prime\}\)\}\)
15:

Lj←sum\_over\_valid\_terms​\(LF,j\+LT,j\+LC,j\)L\_\{j\}\\leftarrow\\texttt\{sum\\\_over\\\_valid\\\_terms\}\(L\_\{F,j\}\+L\_\{T,j\}\+L\_\{C,j\}\)
16:

normalize\_with\_global\_normalizers​\(Lj,ZB\)\.backward​\(\)\\texttt\{normalize\\\_with\\\_global\\\_normalizers\}\(L\_\{j\},Z\_\{B\}\)\.\\texttt\{backward\}\(\)⊳\\trianglerightchunk\-wise backward; release this graph afterwards

17:endfor

18:if

ZB\>0Z\_\{B\}\>0and gradients are finitethen

19:

clip\_grad\_norm\(𝒪\.parameters\)\\texttt\{clip\\\_grad\\\_norm\}\(\\mathcal\{O\}\.\\texttt\{parameters\}\);

𝒪\.step​\(\)\\mathcal\{O\}\.\\texttt\{step\}\(\)
20:endif

21:returnupdated parameters and the batch normalizer

ZBZ\_\{B\}

The trajectory batch is sampled once, and all valid anchors are counted before the first forward pass\. Candidate\-conditioned re\-anticipations use the same Future Decoder parameters and are included in the same unified objective\. Each chunk backpropagates its globally normalized sum before its computation graph is released; parameters are updated only at the intended trajectory batch \(and, if configured, outer accumulation\) boundary\. Summing the chunk gradients therefore gives the gradient of the unchunked batch objective, so changing the anchor micro\-batch size cannot change the mathematical target\.

## Appendix ESupplementary and Additional Quantitative Results

This appendix reports the complete benchmark and ablation results for Porto, San Francisco, and Beijing\. All tables use the evaluation conditions, generation seeds, failure policy, and bootstrap definitions in Appendix[D](https://arxiv.org/html/2610.13131#A4)\. The bootstrap unit is the exact OD pair \(“OD bootstrap”\); generated replicates belonging to one OD are resampled together\. Every entry is reported as a benchmark mean±\\pmstandard deviation under this protocol\. Distance JSD and Radius JSD are reported in units of10−210^\{\-2\}\. Route metrics use the overall evaluation values, rather than the successful\-only subset\.

All entries use the same exact\-OD bootstrap protocol, matched test conditions, replicate policy, and failure accounting\. Conditional trajectory metrics are reported as means and standard deviations under this protocol\. The benchmark reports DTW under this same exact\-OD bootstrap protocol\. Published baseline papers use incompatible metric definitions and scales\[[Zhu et al\., 2023](https://arxiv.org/html/2610.13131#bib.bib8),[Shi et al\., 2024](https://arxiv.org/html/2610.13131#bib.bib11),[Wei et al\., 2024](https://arxiv.org/html/2610.13131#bib.bib9)\]; all values in the tables below therefore use the common protocol defined in Appendix[D](https://arxiv.org/html/2610.13131#A4)\.

### E\.1Complete Benchmark Results

The benchmark tables use the same method rows and the same column order for all cities\. The two Foresight rows make the history comparison explicit:Foresight\-F uses the complete observed history, whereasForesight\-M uses the Markov history\.

Table 13:Full Results on Porto\. Entries are mean±\\pmstandard deviation with exact\-OD bootstrap, Distance JSD and Radius JSD use10−210^\{\-2\}units\.Table 14:Full Results on San Francisco\. Entries are mean±\\pmstandard deviation with exact\-OD bootstrap; Distance JSD and Radius JSD use10−210^\{\-2\}units\.Table 15:Full Results on Beijing\. Entries are mean±\\pmstandard deviation with exact\-OD bootstrap; Distance JSD and Radius JSD use10−210^\{\-2\}units\.The PortoForesight\-M result has the lowest listed Distance JSD, Radius JSD, DTW, EDR, and Hausdorff values on Porto\.Foresight\-F retains the lowest listed values on all four metrics in Beijing and on three of four metrics in San Francisco;Foresight\-M has the lowest San Francisco Radius JSD\. These values compare the two reported checkpoints and are not a standalone controlled ablation of history length\. Its goal\-hit and successful\-STOP rates are both 97\.18%, with 2\.82% timeouts and no arrivals without STOP\. Mean trajectory length is 47\.0832 edges, normalized edit distance is 0\.3322, and road F1 is 0\.7172\. On San Francisco,Foresight\-M reaches the goal in 94\.98% of attempted rollouts, with a 94\.92% successful\-STOP rate and a 5\.08% timeout rate\. Its mean trajectory length is 52\.2396 edges; the overall Hausdorff distance, DTW, EDR, normalized edit distance, and road F1 are 0\.5418 km, 22\.9237 km, 0\.4152, 0\.5280, and 0\.5107, respectively\. On successful trajectories, these route metrics are 0\.4667 km, 13\.8395 km, 0\.3891, 0\.5064, and 0\.5279, respectively\.

### E\.2Complete Ablation Results

The ablation tables use the same five metrics and the same bootstrap unit as the benchmark tables\. RemovingℒF\\mathcal\{L\}\_\{F\}orℓtcon\\ell\_\{t\}^\{\\mathrm\{con\}\}produces the largest degradation relative to the complete model, while removingEfutE\_\{\\mathrm\{fut\}\}produces a smaller but visible degradation\. Distance JSD and Radius JSD use10−210^\{\-2\}units\.

Table 16:Full ablation results on Porto\. Entries are mean±\\pmstandard deviation values; Distance JSD and Radius JSD use10−210^\{\-2\}units\.Table 17:Full ablation results on San Francisco\. Entries are mean±\\pmstandard deviation values; Distance JSD and Radius JSD use10−210^\{\-2\}units\.Table 18:Full ablation results on Beijing\. Entries are mean±\\pmstandard deviation values; Distance JSD and Radius JSD use10−210^\{\-2\}units\.

## Appendix FQualitative Visualization

This appendix provides qualitative evidence for the behavior ofForesight\. The figures use the same test conditions and coordinate system for real and generated trajectories\. We focus on three properties: the ability to recover the spatial distribution of observed mobility, the ability to generate connected and destination\-directed routes, and the ability to avoid amplifying isolated noisy trajectories\. The Porto examples are shown first because they provide the clearest visual comparison; corresponding results for San Francisco and Beijing follow the same plotting protocol\.

The Porto density maps show that the model learns the persistent structure of the data rather than reproducing individual samples\. The generated heatmap follows the same high\-density corridors as the real heatmap, preserves several secondary branches, and remains sparse in regions with little support\. Thus, the model captures multiple feasible route modes instead of collapsing onto a single shortest\-path pattern\. At the same time, isolated speckles and other small irregularities visible in the observations are not turned into dense artificial corridors\. This indicates that the learned distribution is stable under occasional outliers, map\-matching errors, and unusual detours\.

\(a\)Road network![Refer to caption](https://arxiv.org/html/2610.13131v1/x5.png)\(b\)Real trajectories
![Refer to caption](https://arxiv.org/html/2610.13131v1/x6.png)\(c\)Generated trajectories

Figure 9:Porto road network and trajectory density\. Generated trajectories recover the dominant and secondary spatial modes of the real test set while suppressing isolated noise\-like artifacts\. Both heatmaps use the same spatial extent, road geometry, traversal\-count definition, and color normalization\.The corresponding spatial maps for San Francisco and Beijing show the same pattern under different road layouts and route\-length scales\. In both cities, the generated densities follow the main arterial and secondary corridors as in the real data, retain multiple alternatives, and remain sparse in weakly supported regions\. This consistency suggests that the qualitative behavior is not specific to the Porto map\.

![Refer to caption](https://arxiv.org/html/2610.13131v1/x7.png)\(a\)Road network
![Refer to caption](https://arxiv.org/html/2610.13131v1/x8.png)\(b\)Real trajectories
![Refer to caption](https://arxiv.org/html/2610.13131v1/x9.png)\(c\)Generated trajectories

Figure 10:San Francisco road network and trajectory density\. The generated samples recover the dominant and secondary spatial modes under the common plotting protocol\.![Refer to caption](https://arxiv.org/html/2610.13131v1/x10.png)\(a\)Road network
![Refer to caption](https://arxiv.org/html/2610.13131v1/x11.png)\(b\)Real trajectories
![Refer to caption](https://arxiv.org/html/2610.13131v1/x12.png)\(c\)Generated trajectories

Figure 11:Beijing road network and trajectory density\. Generated trajectories track the observed corridors and remain sparse in weakly supported regions\.The matched route examples provide a trajectory\-level view of the same effect\. For each condition, the generated route forms a connected sequence of legal road transitions and remains directed toward the prescribed destination\. The model can choose a different local branch from the observed route, but the large\-scale route shape and endpoint constraint are preserved\. We do not see the common failure mode in which a locally plausible turn leads to oscillation, trapping, or drift away from the destination\. The examples support the interpretation that anticipatory representations help resolve ambiguous intersections over a long horizon\.

\(a\)Real\(b\)Generated\(c\)Real\(d\)Generated\(e\)Real\(f\)Generated\(g\)Real\(h\)Generated
Figure 12:Matched Porto path examples\. Each row uses one origin–destination condition, with the real trajectory on the left and the generated trajectory on the right\. Generated routes preserve connectivity and destination awareness while allowing benign local variation\.\(a\)Real\(b\)Generated\(c\)Real\(d\)Generated
Figure 13:Matched San Francisco path examples, with real trajectories on the left and generated trajectories on the right\.![Refer to caption](https://arxiv.org/html/2610.13131v1/test_100090.png)\(a\)Real
![Refer to caption](https://arxiv.org/html/2610.13131v1/generate_100090.png)\(b\)Generated
\(c\)Real\(d\)Generated
Figure 14:Matched San Francisco path examples \(continued\)\.\(a\)Real\(b\)Generated\(c\)Real\(d\)Generated\(e\)Real\(f\)Generated\(g\)Real\(h\)Generated
Figure 15:Matched Beijing path examples, with real trajectories on the left and generated trajectories on the right\.Taken together, the maps and route examples show a model that learns the regularities of urban movement, preserves multimodal route structure, and produces globally coherent trajectories under destination conditioning\. The same visualizations also explain why noisy observations do not dominate the results: persistent road\-level patterns are reproduced, whereas isolated irregularities are attenuated\. These qualitative findings are consistent with the quantitative improvements reported in the main paper\.

Similar Articles

Model-Based Online Decision Making via Generative Trajectory Planning

Hugging Face Daily Papers

论文提出 Generative Trajectory Planning (GTP),一种基于学习到的扩散先验对动作序列进行采样与束搜索精炼的模型在线决策框架,在 MuJoCo 运动与长时程操作任务上超越基线,并开源代码与模型。