Source-linked AI summary
Looking Ahead and Back: Anticipatory Generative Modeling for Road-Network Trajectories
Zhenhao Huang, Li Sun, Philip S. Yu
TL;DR
Road-network trajectory generation must resolve ambiguous intersection choices, which can send routes along very different downstream paths. FORESIGHT uses a graph-constrained anticipatory loop to guide legal transition selection with a predicted future continuation. Experiments report superior trajectory-distribution matching and route fidelity under origin–destination constraints.
Problem
At intersections, history alone may leave multiple outgoing paths plausible despite their substantially different downstream routes, and existing diffusion methods can overlook next-transition selection and drift off-network.
Source: §1 · pp. 1–2Method
FORESIGHT predicts a provisional destination-conditioned continuation and uses it to select a legal transition, then updates the traversed history and re-anticipates.
Source: §1 · p. 2Results
Experiments on real-world datasets show superior performance in both trajectory distribution matching and route fidelity under origin–destination constraints.
Source: §6 · p. 10Takeaways & Limitations
The results suggest anticipation helps disambiguate locally plausible transitions while preserving topological validity during sequential generation.
Source: §6 · p. 10Different trajectories can share endpoints, so an observed route is one feasible realization rather than a unique target all generated routes must match.
Source: §4.1 · p. 4
Abstract
from arXiv · showhide
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.
1 Introduction
Road-network trajectories are constrained by topology, but intersection choices can lead to substantially different downstream routes. FORESIGHT addresses this ambiguity by using destination-conditioned anticipation to guide legal transition selection during sequential generation.
1 Introduction
- At intersections, multiple outgoing paths may seem equally plausible from history yet lead to substantially different downstream routes.The paper frames next-transition selection as a central challenge for road-network trajectory generation.Source: §1 · p. 1
- Diffusion methods generate holistic sequences of 2D locations and can drift off the road network, while search and reinforcement learning also face scaling or sparse-reward challenges.The authors describe route planning for road-network trajectories as a largely open problem.Source: §1 · p. 2
- Anticipatory Generative Modeling shifts from location simulation to graph-constrained behavior modeling by using a provisional future continuation to guide the next transition.Anticipation provides destination-conditioned context for selecting among legal transitions.Source: §1 · p. 2
- FORESIGHT uses an “anticipate–select–update–re-anticipate” loop to extend foresight while generating sequentially along the traversed history.It predicts a finite-horizon continuation, uses its representation for current selection, then updates history and predicts again.Source: §1 · p. 2
- FORESIGHT is reported to achieve state-of-the-art performance across various metrics while generating plausible trajectories.The paper presents this as empirical validation of the proposed route-planning approach.Source: §1 · p. 2
2 Related Work
Related trajectory-generation work either makes incremental local choices or generates complete paths and sequences. Foresight connects graph-legal next-step selection with an explicitly predicted, goal-conditioned future continuation.
Trajectory generation
- Trajectory-generation methods include incremental autoregressive routing and global latent-variable or diffusion generation; road-network methods encode topology stepwise or at sequence level.The reviewed approaches primarily model either the immediate next transition or a complete trajectory.Source: §2 · pp. 2–3
Iterative replanning
- Receding-horizon control predicts over a finite horizon, executes the first action, and replans; Foresight applies this interface to a discrete road graph with position- and direction-aware state.The related learned planners cited include Liu et al. (2026), Zheng et al. (2025), Huang et al. (2026), Jiang et al. (2024), and Wu et al. (2024).Source: §2 · p. 3
Planning with future information
- Prior methods represent future information through search, value estimates, or trajectory prediction, whereas Foresight predicts a goal-conditioned short-horizon continuation to select the next legal graph transition.The related work cites Dijkstra, A star, and Yen’s algorithm among classical search methods.Source: §2 · p. 3
3 Preliminaries and Problem Formulation
The paper formulates destination-conditioned trajectory generation on a directed road graph, where each decision selects a legal movement or, at the destination, STOP. Its sequential task is to generate a topologically valid continuation and terminate it at the destination.
3 Preliminaries and Problem Formulation
- The road network is a directed graph, and each road state pairs the current location with an attribute describing the incoming movement’s direction.The traversed history is the sequence of these states, and generation is conditioned on a destination.Source: §3 · p. 3
- At each step, the model selects a legal movement; STOP is an independent legal event only when the current location is the destination.STOP creates no new road state, and reaching the destination alone does not terminate generation.Source: §3 · p. 3
- An external transition budget can truncate generation before model-selected STOP, which is distinct from termination chosen by the model.The stated termination rule requires an explicit STOP selection at the destination.Source: §3 · p. 3
- The task is to generate a topologically valid continuation from the traversed history and destination, repeating legal action selection until STOP.A conventional formulation selects actions from the observed history and destination; the paper studies informing that local choice with candidate-induced continuations.Source: §3 · pp. 3–4
4 Methodology
FORESIGHT makes downstream route anticipation explicit to guide legal next-transition choices, then updates its predictions after each realized movement. Its finite-horizon, graph-constrained process maintains sequential generation without prescribing an open-loop route.
4 Methodology
- FORESIGHT repeatedly anticipates a provisional continuation, selects a topologically valid transition, updates the realized history, and re-anticipates until STOP is chosen.This closed-loop process adds longer-term foresight while retaining sequential routing on the road network.Source: §4 · p. 4, §4.5 · p. 7
4.1 Anticipatory Generative Modeling
- AGM explicitly represents plausible downstream evolution to inform current choices among feasible transitions without prescribing a unique future route.A conventional next-state conditional does not explicitly represent downstream evolution as an anticipation that informs the current transition.Source: §4.1 · p. 5
4.2 Finite-Horizon Anticipation
- FORESIGHT predicts a fixed H-position future window, and H bounds the future context exposed to each decision rather than the generated trajectory length.The window is recomputed from updated history after every realized movement, leaving more distant evolution to later predictions.Source: §4.2 · p. 5
4.3 FORESIGHT: Neural Architecture
- A Future Anticipation Decoder predicts contextual representations for the next H positions, while a topology-constrained Transition Network scores legal candidates using that anticipation.The decoder uses history, destination, and ordered future queries while preventing access to realized future states.Source: §4.3 · pp. 5–6
4.4 Learning Objective
- Training combines supervision for the realized next event with expected downstream compatibility of candidate movements under the transition distribution.Candidate-conditioned predictions are evaluated against the same observed suffix, which is a compatibility reference rather than a factual continuation for hypothetical candidates.Source: §4.4 · pp. 6–7
4.5 Sequential Generation
- At generation time, FORESIGHT selects from legal actions using predicted anticipation, appends the chosen movement, and recomputes anticipation; optional reranking compares overlapping future predictions.Hypothetical candidate branches are used only to score the current choice; only the selected action is executed, and reaching the destination makes STOP admissible but does not itself terminate generation.Source: §4.5 · p. 7
5 Experiments
The experiments evaluate goal-conditioned trajectory generation across Porto, Beijing, and San Francisco, comparing existing generators and examining spatial distributions, matched routes, and anticipatory-model ablations. The reported results distinguish performance by Foresight variant and identify which ablated components contribute most.
Spatial distributions and route examples
- The experiments also frame spatial-distribution and matched-route comparisons, including Porto views of the test distribution and generated routes from Foresight and Dijkstra.Figure 4 compares routes under two fixed test OD conditions.Source: §5 · p. 8, Figure 3 · p. 9, Figure 4 · p. 9
Experimental setup
- The evaluation uses official HOSER graphs and splits for Porto, Beijing, and San Francisco, with matched test OD conditions, replicate counts, and generation budgets.Baselines include search methods, routing systems, and learned generators; lower Distance/Radius JSD, Hausdorff distance, and EDR indicate better results.Source: §5 · p. 8
Overall performance
- The full-history Foresight variant is strongest on San Francisco and Beijing, while the Markov-history variant performs best on Porto and remains competitive elsewhere.The comparison reports Distance/Radius JSD, Hausdorff distance, and EDR, with lower values better.Source: §5 · p. 8
Ablation of anticipatory modeling
- Candidate-conditioned continuation contributes most in the ablation, followed by future-window supervision, while future-energy reranking provides a smaller but consistent improvement.Table 2 reports ablation results for Porto and San Francisco, with JSD values scaled by 10−2.Source: Table 2 · p. 8, §5 · p. 9
6 Conclusion
The conclusion frames road-network trajectory generation as generative route planning and presents Anticipatory Generative Modeling as a way to guide transition choices with predicted future routes. FORESIGHT applies this approach sequentially, and experiments report superior distribution matching and route fidelity under origin–destination constraints.
Conclusion
- The paper shifts trajectory generation from location simulation toward behavior modeling and route planning on road networks.It introduces Anticipatory Generative Modeling to address ambiguity in next-transition selection by anticipating how the future route unfolds toward the destination.Source: §6 · p. 9
- FORESIGHT repeatedly anticipates a provisional continuation, selects a topologically valid transition, updates the traversed sequence, and re-anticipates the suffix.The transition choice uses a direction-aware fiber.Source: §6 · pp. 9–10
- Experiments on real-world datasets show superior trajectory-distribution matching and route fidelity under origin–destination constraints.The conclusion states that anticipation helps disambiguate locally plausible transitions while preserving topological validity during sequential generation.Source: §6 · p. 10
AI Use Statement
The statement limits AI use to language polishing and formatting, excluding research development and analysis; the authors reviewed and take responsibility for the manuscript.
AI Use Statement
- AI tools were used for language polishing and formatting adjustments during manuscript preparation.The statement excludes use in developing research ideas or methodology, conducting experiments, analyzing results, or determining scientific claims and conclusions.Source: AI Use Statement · p. 10
- The authors state that they reviewed and take responsibility for all manuscript content.Source: AI Use Statement · p. 10
- The stated AI use did not include conducting experiments or analyzing experimental results.Source: AI Use Statement · p. 10
Reproducibility Statement
The statement specifies reproducible data, training, generation, and evaluation procedures, then formalizes Foresight as a goal-conditioned model of random-length road-network trajectories. Its finite-horizon anticipation informs legal transition selection, with a new anticipation computed after each realized movement.
Reproducibility Statement
- Experiments use public HOSER road graphs and official Porto, Beijing, and San Francisco splits, with training-only preprocessing and fixed manifests, checkpoints, conditions, and replicates.The test set is held out until the checkpoint and test-condition manifest are fixed.Source: Reproducibility Statement · p. 10
A Notation
- Table 3 distinguishes the realized training reference window y_t from the model-predicted anticipation bR_t.The directional attribute comes from the incoming movement, while destination conditioning uses node identity.Source: A Notation · p. 14
B Probabilistic Foundation of Foresight
- Foresight models a random-length trajectory as a realization of a goal-conditioned process, distinguishing sampled future suffixes from model-predicted anticipations.A single sampled trajectory does not specify the full multimodal route distribution.Source: B Probabilistic Foundation of Foresight · p. 15, §B.1 · p. 15
B.1 Random-Length Road-Network Trajectory Process
- Each road state is induced by the road-state process and includes the direction-aware action determined by consecutive road states; STOP ends the process without an ordinary successor state.STOP is admissible at the destination, but reaching the destination does not terminate generation automatically.Source: §B.1 · p. 15
B.2 Goal-Conditioned Future Process and Anticipatory Modeling
- The full future suffix has a conditional distribution, while its one-step marginal does not make downstream states explicit context for the current decision.Anticipatory Generative Modeling makes that context explicit by predicting a finite future representation before selecting the current legal transition.Source: §B.2 · pp. 15–16
B.3 Finite-Horizon Anticipation
- The model predicts H future positions as provisional downstream context, then recomputes anticipation after each realized movement; H is not the trajectory-length limit.The sampled reference window is used only during training.Source: §B.3 · p. 16
B.4 Legal Transition, Candidate-Conditioned Prediction, and Learning
- The unified training criterion supervises the observed current event and couples transition probabilities to sampled-future compatibility across hypothetical movement branches.Its empirical average estimates the defined criterion; it is not an unbiased estimator of a true counterfactual conditional likelihood.Source: §B.4 · p. 17
B.5 Sequential Generation as a Stochastic Process
- At inference, the model predicts from realized history and destination, selects one legal event, and updates history and anticipation after a movement; selecting STOP terminates generation.A generation budget may truncate a run before STOP without redefining its stopping time.Source: §B.5 · p. 17
C Architecture and Inference Details
The appendix specifies Foresight’s shared node–fiber representation, structured future decoder, and topology-constrained transition scoring. Optional candidate-conditioned consistency evaluation and closed-loop inference are detailed alongside architecture settings, computational costs, and the experimental protocol.
C.1 Fiber-Aware State and Candidate Encoding
- Visited states retain the incoming direction-aware fiber, while each legal candidate is represented by its node and incoming fiber; STOP is an independent event.Destination conditioning uses a zero-fiber token without replacing the fiber of a visited goal state.Source: §C.1 · p. 18
C.2 Future Anticipation Decoder
- The structured Future Anticipation Decoder maps history and destination to future representations and predictions; its visibility mask prevents later future queries from influencing earlier ones.The Transition Network receives the downstream hidden tail rather than the first prediction or Future logits.Source: Figure 5 · p. 19, §C.2 · pp. 19–20
C.3 Topology-Constrained Transition Network
- The Transition Network scores complete legal movement candidates and normalizes only over the legal event set, with STOP separately scored when admissible.STOP is masked away except at the goal; a non-goal state with no legal movement is invalid rather than forced to stop.Source: Figure 6 · p. 20, §C.3 · p. 21
C.4 Candidate-Conditioned Re-Anticipation
- Optional re-anticipation compares current and hypothetical-branch predictions at overlapping absolute future positions, using their mean Jensen–Shannon divergence as a consistency energy.STOP has no successor branch and receives zero future energy.Source: §C.4 · pp. 21–22
C.5 Closed-loop inference and termination
- Generation repeatedly rebuilds the future window, selects a graph-valid event, and updates the realized history after movement; only selecting STOP at the goal terminates successfully.Exhausting the decision budget is a timeout, while an empty non-goal event support is invalid_transition.Source: §C.5 · p. 22
C.6 Architecture Configuration and Inference Complexity
- All five production scales use a fixed future horizon H = 64, while enabled candidate-consistency reranking adds computation that scales with the number of legal movement candidates.The additional candidate-branch Future computation also adds activation memory.Source: §C.6 · pp. 23–24
D Experimental Setup and Evaluation Protocol
- The experimental protocol uses official city splits and common graphs, test conditions, replicate policy, generation budget, and failure accounting across methods.Complete numerical evidence and generated trajectory examples are reported separately.Source: D Experimental Setup and Evaluation… · p. 24
D.1 Datasets and Baselines
The evaluation covers three city subsets of the public HOSER dataset and compares statistical, graph-search, and learned-generation baselines. The protocol preserves baseline-specific modeling components while aligning test conditions and failure accounting.
Datasets
- Evaluation uses the Porto, Beijing, and San Francisco subsets of the public HOSER dataset, with city retained as the geographic unit.The supplied road graph provides directed road states and legal transitions, while trajectory files provide observed sequences.Source: §D.1 · pp. 24–25
Dataset splits
- Each city uses its official split, with training-only fitting, validation-based checkpoint selection, and test data held out until the protocol is fixed.All methods use the same ordered condition manifest and replicate seeds.Source: §D.1 · p. 25
Baselines
- Baselines span Markov sampling, Dijkstra and Yen graph search, and learned generators, with documented OD adaptation and common evaluation conditions.Continuous GPS outputs use a fixed map-matching rule, and conversion failures remain failed attempts.Source: §D.1 · pp. 25–26
D.2 Experimental Setup and Evaluation Protocol
The appendix specifies the evaluation protocol, Foresight’s architecture and training flow, and supplementary benchmark and ablation procedures. Evaluation uses matched goal-conditioned test conditions, multiple trajectory and distribution metrics, and bootstrap protocols that retain failed attempts.
D.3 PyTorch-style Pseudocode
- Anchor micro-batching changes memory use without changing the mathematical training objective, because global normalizers are computed before chunking and shared across chunks.Chunk gradients are accumulated before the intended trajectory-batch update.Source: §D.2 · p. 26, §D.3 · p. 29
D.2 Experimental Setup and Evaluation Protocol
- Evaluation reports lower-is-better Distance JSD and Radius JSD in 10^-2 units, plus Hausdorff, DTW, and normalized EDR on matched road trajectories.Hausdorff and DTW are accumulated distances in kilometres; EDR uses a fixed 0.05 km point-matching tolerance.Source: §D.2 · pp. 27–28
- Generation uses 5,000 fixed test conditions and five persisted seeds, with a 256-transition budget; every attempt, including failures and timeouts, remains in the evaluation corpus.A rollout ends at explicit STOP, the budget, or an abnormal failure; reaching the destination alone does not terminate it.Source: §D.2 · p. 28
- Exact-OD bootstrap resamples origin–goal clusters across 1,000 replicates, while condition bootstrap gives each frozen goal-conditioned test condition its own sampling weight.Both retain condition-to-replicate grouping and the complete failure corpus; file-level mean ± standard deviation is supplementary.Source: §D.2 · p. 28
D.3 PyTorch-style Pseudocode
- The Future Decoder predicts a finite-horizon continuation, and the Transition Network scores only graph-legal movement candidates, adding STOP only at the destination.The future target mask affects supervision, not conditioning; the structured mask prevents later future queries or targets from leaking into earlier positions.Source: §D.3 · pp. 28–29
- Sequential generation follows anticipate, select, update, and re-anticipate: only the selected movement is realized, and visiting the goal does not itself mean successful termination.The Future Decoder predicts again after each history update; a rollout terminates successfully only when STOP is selected at the goal.Source: §D.3 · p. 29, E Supplementary and Additional… · p. 30
E Supplementary and Additional Quantitative Results
- Supplementary benchmark and ablation tables use exact-OD bootstrap means and standard deviations, with Distance JSD and Radius JSD reported in 10^-2 units.Route metrics use overall evaluation values rather than a successful-only subset.Source: E Supplementary and Additional… · pp. 29–31
E.1 Complete Benchmark Results
The benchmark compares two Foresight history variants across Porto, San Francisco, and Beijing, and reports that their relative performance varies by city. Ablations identify candidate-conditioned continuation and future-window supervision as the components whose removal most degrades results.
E.1 Complete Benchmark Results
- FORESIGHT-F uses complete observed history, whereas FORESIGHT-M uses Markov history, making history choice explicit in the benchmark comparison.The reported city-dependent winners compare the two checkpoints; they do not isolate history length as a controlled factor.Source: §E.1 · pp. 31–32
- FORESIGHT-M has the lowest listed Distance JSD, Radius JSD, DTW, EDR, and Hausdorff values on Porto; FORESIGHT-F leads all four metrics in Beijing and three of four in San Francisco.FORESIGHT-M has the lowest San Francisco Radius JSD; the two reported checkpoints do not form a standalone controlled ablation of history length.Source: Table 13 · p. 31, Table 14 · p. 31, §E.1 · p. 32
E.2 Complete Ablation Results
- Removing candidate-conditioned continuation or future-window supervision produces the largest degradation relative to the complete model, while removing future-energy reranking causes a smaller visible degradation.The ablation tables report Porto, San Francisco, and Beijing results using the same five metrics and bootstrap unit as the benchmark tables.Source: §E.2 · p. 32, Table 16 · p. 32, Table 17 · p. 33
F Qualitative Visualization
The visualizations show Foresight recovering multiple spatial modes across cities while keeping generated routes connected and directed toward their prescribed destinations. Matched examples allow local route variation while preserving large-scale route shape and endpoint constraints.
F Qualitative Visualization
- Porto density maps recover dominant corridors and secondary branches, remain sparse in weakly supported regions, and attenuate isolated noise-like artifacts.The heatmaps use the same spatial extent, road geometry, traversal-count definition, and color normalization.Source: F Qualitative Visualization · p. 33, Figure 9 · p. 34
- San Francisco and Beijing maps likewise retain main and secondary corridors and multiple route alternatives while staying sparse in weakly supported regions.The pattern appears under different road layouts and route-length scales.Source: F Qualitative Visualization · p. 34, Figure 10 · p. 35, Figure 11 · p. 36
- Matched route examples show connected sequences of legal transitions directed toward the destination, with local branch variation but preserved large-scale shape and endpoint constraint.The examples do not show oscillation, trapping, or drift away from the destination.Source: F Qualitative Visualization · pp. 36–37, Figure 12 · p. 38, Figure 13 · pp. 39–40
- Together, the maps and route examples depict multimodal, globally coherent trajectories under destination conditioning, with persistent patterns reproduced and isolated irregularities attenuated.The reported qualitative findings are described as consistent with the paper’s quantitative improvements.Source: F Qualitative Visualization · p. 42