Looking Ahead and Back: Anticipatory Generative Modeling for Road-Network Trajectories
Organizations: North China Electric Power University · Beijing University of Posts and Telecommunications · 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 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.
Figures & tables
| Porto | San Francisco | Beijing | ||||||||||
| Method | D-JSD | R-JSD | HD | EDR | D-JSD | R-JSD | HD | EDR | D-JSD | R-JSD | HD | EDR |
| Dijkstra | 2.47 | 1.31 | 0.481 | 0.358 | 2.18 | 1.29 | 0.399 | 0.305 | 2.64 | 1.56 | 0.449 | 0.341 |
| Yen- | 2.36 | 1.29 | 0.503 | 0.386 | 2.34 | 1.39 | 0.497 | 0.377 | 2.78 | 1.67 | 0.552 | 0.414 |
| Markov | 2.61 | 1.46 | 0.613 | 0.462 | 2.39 | 1.42 | 0.602 | 0.458 | 2.88 | 1.72 | 0.681 | 0.503 |
| SemRoute | 1.68 | 1.07 | 0.514 | 0.384 | 1.69 | 0.91 | 0.481 | 0.363 | 2.16 | 1.19 | 0.548 | 0.414 |
| HOSER | 1.57 | 0.96 | 0.431 | 0.317 | 1.82 | 0.98 | 0.412 | 0.306 | 2.04 | 1.09 | 0.463 | 0.351 |
| Porto | San Francisco | |||||||
|---|---|---|---|---|---|---|---|---|
| Variant | D-JSD | R-JSD | HD | EDR | D-JSD | R-JSD | HD | EDR |
| Foresight -F | 1.53 | 0.79 | 0.401 | 0.312 | 1.39 | 0.71 | 0.386 | 0.298 |
| Foresight -M | 1.01 | 0.71 | 0.375 | 0.285 | 2.68 | 0.65 | 0.542 | 0.415 |
| w/o | 2.25 | 1.35 | 0.500 | 0.390 | 2.10 | 1.25 | 0.480 | 0.380 |
| w/o | 2.55 | 1.55 | 0.550 | 0.420 | 2.40 | 1.45 | 0.530 | 0.410 |
| w/o | 2.05 | 1.20 | 0.460 | 0.360 | 1.95 | 1.15 | 0.450 | 0.350 |
Appendix figures & tables26 assets
Supplementary material from the paper’s appendix.
Appendix
| Symbol | Meaning |
|---|---|
| Trajectory, state, and legal events | |
| Directed road graph. | |
| Location at step . | |
| Location trajectory; is an index (and may be the endpoint of a realized trajectory). | |
| Destination location. | |
| Direction/fiber attribute induced by the incoming movement; is the initialization token. | |
| row key | |||||
|---|---|---|---|---|---|
| prefix | no | no | no | no | |
| yes | yes | yes | yes | ||
| no | no | self | no | no | |
| yes | no | yes | all | no | |
| no | no | no | no | self |
| context | query 1 | query 2 | query 3 | query | ||
|---|---|---|---|---|---|---|
| Current | ||||||
| Branch |
| Current condition | Event support and outcome |
|---|---|
| Non-goal with legal outgoing edges | Movement candidates only; STOP is masked. |
| Goal with legal outgoing edges | Movement candidates and STOP compete under (or ). |
| Goal with no outgoing edges | STOP is the unique legal event. |
| Non-goal with no outgoing edges | Empty support; return invalid_transition . |
| STOP selected at the goal | End without appending a state; success=true . |
| Budget exhausted before STOP | End with timeout ; success=false . |
| Scale | base hidden | FFN ratio | |||||||
|---|---|---|---|---|---|---|---|---|---|
| s1 | 72 | 64 | 144 | 16 | 64 | 2 | 2 | 2 | |
| s2 | 96 | 64 | 192 | 24 | 64 | 3 | 2 | 2 | |
| s3 | 152 | 64 | 304 | 32 | 64 | 4 | 3 | 3 | |
| s4 | 240 | 64 | 480 | 48 | 64 | 6 | 4 | 4 | |
| s5 | 400 | 64 | 800 | 64 | 64 | 8 | 6 | 6 |
| City ( ) | s1 | s2 | s3 | s4 | s5 |
|---|---|---|---|---|---|
| Beijing (40,060) | 3,300,102 | 4,628,670 | 8,448,638 | 17,366,670 | 44,881,710 |
| Porto (11,024) | 1,180,474 | 1,812,178 | 4,006,130 | 10,368,994 | 33,238,274 |
| San Francisco (27,187) | 2,360,373 | 3,379,989 | 6,479,069 | 14,264,277 | 39,719,637 |
| Dataset | Roads | Trajectories | Avg. distance | Avg. time |
|---|---|---|---|---|
| Porto | 11,024 | 687,656 | 3.66 km | 7.99 min |
| Beijing | 40,060 | 899,115 | 5.16 km | 12.87 min |
| San Francisco | 27,187 | 293,023 | 3.41 km | 9.29 min |
| Scale | Future fixed | Future head | Transition | Total formula |
|---|---|---|---|---|
| s1 | 199,401 | 176,321 | ||
| s2 | 438,657 | 304,193 | ||
| s3 | 1,303,273 | 1,016,185 | ||
| s4 | 4,526,385 | 3,185,825 | ||
| s5 | 16,201,585 | 12,616,065 |
| City ( ) | s1 | s2 | s3 | s4 | s5 |
|---|---|---|---|---|---|
| Beijing (40,060) | 3.300 | 4.629 | 8.449 | 17.367 | 44.882 |
| Porto (11,024) | 1.180 | 1.812 | 4.006 | 10.369 | 33.238 |
| San Francisco (27,187) | 2.360 | 3.380 | 6.479 | 14.264 | 39.720 |
| Setting | Value |
|---|---|
| Optimizer | AdamW |
| Learning rate | 5e-4 |
| Weight decay | 1e-4 |
| Learning-rate schedule | constant |
| Warmup steps | 3000 |
| Total optimizer updates | 60000 |
| Method / Variant | Distance JSD | Radius JSD | DTW | EDR | Hausdorff |
|---|---|---|---|---|---|
| Dijkstra | 2.47 0.082 | 1.31 0.052 | 12.74 0.27 | 0.358 0.009 | 0.481 0.011 |
| Yen- | 2.36 0.116 | 1.29 0.077 | 13.18 0.34 | 0.386 0.013 | 0.503 0.016 |
| Markov | 2.61 0.238 | 1.46 0.171 | 15.42 0.71 | 0.462 0.021 | 0.613 0.025 |
| SemRoute | 1.68 0.204 | 1.07 0.143 | 13.42 0.68 | 0.384 0.019 | 0.514 0.022 |
| HOSER | 1.57 0.183 | 0.96 0.137 | 12.28 0.66 | 0.317 0.017 | 0.431 0.020 |
| TS-TrajGen | 3.24 0.287 | 1.83 0.219 | 16.18 0.89 | 0.481 0.024 | 0.641 0.029 |
| Method / Variant | Distance JSD | Radius JSD | DTW | EDR | Hausdorff |
|---|---|---|---|---|---|
| Dijkstra | 2.18 0.076 | 1.29 0.049 | 11.18 0.24 | 0.305 0.008 | 0.399 0.010 |
| Yen- | 2.34 0.123 | 1.39 0.082 | 13.16 0.37 | 0.377 0.013 | 0.497 0.016 |
| Markov | 2.39 0.244 | 1.42 0.176 | 15.31 0.73 | 0.458 0.020 | 0.602 0.024 |
| SemRoute | 1.69 0.204 | 0.91 0.148 | 12.74 0.70 | 0.363 0.018 | 0.481 0.021 |
| HOSER | 1.82 0.187 | 0.98 0.139 | 11.47 0.67 | 0.306 0.017 | 0.412 0.019 |
| TS-TrajGen | 3.06 0.294 | 1.86 0.216 | 15.43 0.87 | 0.462 0.023 | 0.608 0.028 |
| Method / Variant | Distance JSD | Radius JSD | DTW | EDR | Hausdorff |
|---|---|---|---|---|---|
| Dijkstra | 2.64 0.084 | 1.56 0.053 | 16.28 0.29 | 0.341 0.009 | 0.449 0.011 |
| Yen- | 2.78 0.127 | 1.67 0.086 | 18.92 0.38 | 0.414 0.013 | 0.552 0.017 |
| Markov | 2.88 0.263 | 1.72 0.187 | 22.34 0.82 | 0.503 0.022 | 0.681 0.026 |
| SemRoute | 2.16 0.218 | 1.19 0.157 | 18.21 0.76 | 0.414 0.019 | 0.548 0.022 |
| HOSER | 2.04 0.196 | 1.09 0.146 | 16.73 0.72 | 0.351 0.017 | 0.463 0.020 |
| TS-TrajGen | 3.42 0.314 | 2.16 0.226 | 22.19 0.92 | 0.503 0.024 | 0.684 0.030 |
| Method / Variant | Distance JSD | Radius JSD | DTW | EDR | Hausdorff |
|---|---|---|---|---|---|
| Foresight -F | 1.53 0.18 | 0.79 0.11 | 11.84 0.64 | 0.312 0.014 | 0.401 0.018 |
| Foresight -M | 1.01 0.08 | 0.71 0.05 | 11.58 0.25 | 0.285 0.008 | 0.375 0.010 |
| Foresight w/o | 2.25 0.24 | 1.35 0.18 | 13.90 0.72 | 0.390 0.018 | 0.500 0.022 |
| Foresight w/o | 2.55 0.27 | 1.55 0.20 | 14.80 0.80 | 0.420 0.020 | 0.550 0.024 |
| Foresight w/o | 2.05 0.22 | 1.20 0.16 | 13.20 0.68 | 0.360 0.017 | 0.460 0.020 |
| Method / Variant | Distance JSD | Radius JSD | DTW | EDR | Hausdorff |
|---|---|---|---|---|---|
| Foresight -F | 1.39 0.16 | 0.71 0.10 | 11.01 0.59 | 0.298 0.013 | 0.386 0.017 |
| Foresight -M | 2.68 0.180 | 0.65 0.110 | 22.92 0.64 | 0.415 0.014 | 0.542 0.018 |
| Foresight w/o | 2.10 0.22 | 1.25 0.16 | 13.20 0.68 | 0.380 0.017 | 0.480 0.020 |
| Foresight w/o | 2.40 0.25 | 1.45 0.18 | 14.20 0.76 | 0.410 0.019 | 0.530 0.022 |
| Foresight w/o | 1.95 0.20 | 1.15 0.15 | 12.60 0.64 | 0.350 0.016 | 0.450 0.019 |
| Method / Variant | Distance JSD | Radius JSD | DTW | EDR | Hausdorff |
|---|---|---|---|---|---|
| Foresight -F | 1.68 0.19 | 0.88 0.12 | 16.34 0.88 | 0.326 0.015 | 0.418 0.019 |
| Foresight -M | 1.87 0.21 | 1.01 0.13 | 17.90 0.88 | 0.344 0.016 | 0.438 0.020 |
| Foresight w/o | 2.55 0.27 | 1.50 0.20 | 19.50 0.95 | 0.400 0.020 | 0.520 0.024 |
| Foresight w/o | 2.90 0.30 | 1.75 0.23 | 20.80 1.02 | 0.440 0.022 | 0.580 0.027 |
| Foresight w/o | 2.40 0.25 | 1.35 0.18 | 18.70 0.90 | 0.380 0.019 | 0.490 0.023 |
Trajectory Generation
Trajectory generation creates plausible, goal-directed paths and motion sequences for people, vehicles, and robots.
See all 182 papers