Manuscript Offprint
arXiv:2608.14349Non-Parametric Spatiotemporal Trajectory Prediction via State-Conditioned Transition Sampling
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Conference: The 34th ACM International Conference on Advances in Geographic Information Systems; November 03–06, 2026; Riverside, CA, USAThe 34th ACM International Conference on Advances in Geographic Information Systems (SIGSPATIAL ’26), November 03–06, 2026, Riverside, CA, USADOI: 10.1145/3841645.3843393ISBN: 979-8-4007-2950-8/2026/11CCS: Information systems Geographic information systemsCCS: Mathematics of computing Nonparametric statisticsCCS: Computing methodologies Kernel methodsCCS: Applied computing Transportation
© cc
Abstract.
We present a training-free method for multi-modal trajectory prediction that achieves comparable accuracy to a 57M-parameter transformer while requiring no GPU and zero learned parameters. The method builds a transition table of historical state-to-next-position pairs and retrieves neighbors using a product kernel over spatial proximity, bearing, speed, and temporal context. Two inference modes operate over this shared representation: diversity-penalized sampling produces trajectories covering distinct plausible routes, while beam search finds the highest-likelihood path. On the TrAISformer benchmark (Danish Maritime AIS), our method achieves competitive accuracy at full data availability and dramatically outperforms the transformer in data-scarce regimes—remaining stable down to 10% of training data where TrAISformer degrades catastrophically. This enables deployment in new geographic regions from an order of magnitude less historical data.
Keywords:
trajectory prediction, nonparametric methods, kernel density estimation, maritime AIS, multi-modal prediction
Deep learning approaches frame trajectory prediction as sequence modeling. TrAISformer (Nguyen and Fablet, 2024) discretizes AIS positions into grid cells and applies a transformer architecture to achieve state-of-the-art results on maritime trajectory prediction benchmarks. However, such models require GPU training, degrade with limited training data, and must be retrained for new geographic regions.
Nonparametric methods avoid these costs. Hexeberg et al. (Hexeberg et al., 2017) proposed Single Point Neighbor Search (SPNS): retrieve the historical observations near the current position, discard those whose course deviates beyond a threshold, and dead-reckon on the median course and speed of the rest. This requires no training but produces a unimodal output and offers no uncertainty. Its successor NCDM (Dalsnes et al., 2018) samples a course from the same gated set instead of collapsing it, giving several trajectories; both were built for collision avoidance at < 15 minute horizons. Other statistical approaches (Ristic et al., 2008; Pallotta et al., 2013) similarly rely on pattern extraction but lack multi-modal output.
Our approach bridges this gap by retrieving neighbors (state-to-next-position pairs) weighted by a product kernel over spatial proximity, bearing, speed, and time-of-day/day-of-week. We introduce two inference modes over this shared representation. The first, diverse sampling, applies a spatial repulsion penalty that forces successive trajectory samples to explore different routes; the second, beam search, maintains multiple candidate paths and prunes by cumulative path likelihood, producing single-trajectory predictions.
On the TrAISformer benchmark (DMA Danish maritime AIS, 3-hour prediction horizon), our method achieves a top-1 FDE of 9.00 km vs. TrAISformer’s 9.84 km, and a best-of-16 FDE of 2.49 km vs. 2.66 km while requiring no GPU, no learned parameters, and only seconds of CPU setup. Particularly significant for deployment in new geographic regions: the method maintains its accuracy with as little as 10% of training data, a regime where the transformer degrades catastrophically. Our contributions are:
(1) A state-conditioned transition predictor that replaces the hard course gate of neighbor search (Hexeberg et al., 2017) with product-kernel weighting over spatial proximity, bearing, speed, and temporal conditioning. (2) Diversity-promoting sequential sampling (Vijayakumar et al., 2018) applied to spatial transition lookup, producing multi-modal trajectory predictions that cover distinct plausible routes. (3) Evaluation demonstrating that this training-free approach matches a 57M-parameter transformer at full data and dramatically outperforms it in data-scarce regimes, retaining its full-data accuracy on an order of magnitude less data.
2. Method
Our method operates in two phases. First, we construct a transition table with spatial indices in an offline setup step. Second, we leverage the transition table in online inference via one of two modes: diverse sampling or beam search.
2.1. Transition Table
From training trajectories sampled at regular intervals (10 minutes in our experiments), we extract all pairs of observations separated by a fixed prediction step (1 hour). Each row stores the current state —position, speed, bearing, hour-of-day, and day-of-week—along with the next position observed later. The table is a flat collection of such records (150,000 rows, eight columns, about 9.6 MB), rather than a matrix over a discretized state space: nothing is binned, and the kernel of Section 2.2 rather than a grid cell decides how much each row contributes. We build a BallTree spatial index on the current positions for neighbor retrieval.
2.2. State-Conditioned Weighted Lookup
Given a query state representing position, speed (knots), bearing (degrees), hour-of-day, and day-of-week, we retrieve all transitions within the spatial kernel’s support and assign each transition a weight that is the product of five kernel terms: ; where:
- : Quartic kernel with adaptive bandwidth on great-circle distance, following Abramson’s square-root rule (Abramson, 1982).
- : von Mises density on bearing difference.
- : Gaussian on speed difference.
- : cyclic Gaussian on hour-of-day.
- : cyclic Gaussian on day-of-week.
Here is the circular distance with period . We omit month-of-year because the benchmark data cannot support it: ten of its twelve months are represented by only two or three days each, too sparse to estimate a seasonal effect. The result is a weighted set of next-positions representing where entities in similar states went next. This is a form of Nadaraya-Watson (Nadaraya, 1964; Watson, 1964) kernel regression applied to state-conditioned spatial transitions.
2.3. Autoregressive Inference
Both inference modes generate trajectory branches autoregressively. At each step of a branch, the shared procedure is:
(1) Compute weights via the product kernel (Section 2.2). (2) Optionally modify weights (mode-specific; see below). (3) Sample one or more candidate next-positions from the weight distribution. (4) Smooth each candidate: compute the weighted mean of all next-positions, modulated by a Gaussian () on angular difference from the candidate’s bearing. This mitigates single-sample noise that would otherwise compound across steps. (5) Update the query state (position, bearing, hour-of-day) from the smoothed prediction and proceed to step .
The prediction horizon is steps of each. Speed is held fixed at the initial observed value for simplicity. Branches are ranked by cumulative unpenalized log-density.
2.4. Diverse Sampling
To produce branches that collectively cover plausible future routes, we take inspiration from Diverse Beam Search (Vijayakumar et al., 2018) by sampling branches sequentially with a spatial repulsion penalty applied to the observations in continuous space (as opposed to the discrete space version in the original paper). For branch , step (2) applies a spatial repulsion penalty:
where is the position of previously generated branch at step . This suppresses observations whose next-positions are near existing branches, forcing successive branches to explore different routes. Each branch samples one candidate per step (step 3).
2.5. Beam Search
Beam search maintains active branches in parallel. Step (2) is skipped (no diversity penalty). At step (3), candidates are sampled per active branch, yielding total candidates; only the top by cumulative log-density are retained. Paths on high-traffic corridors accumulate high scores; paths that wander off-route are pruned.
Map showing diverse trajectory predictions at a maritime route junction, with 16 colored branches covering multiple shipping corridors.
Figure 1. Diverse predictions covering multiple plausible shipping corridors at a route junction in the DMA dataset. Background shading shows traffic density (KDE, for visual context only—not used by the method). The best-of-16 branch lands within 0.5 km of ground truth.Map showing diverse trajectory predictions at a maritime route junction, with 16 colored branches covering multiple shipping corridors.
3. Experiments
3.1. Setup
Dataset. We evaluate on the DMA AIS dataset (Danish Maritime Authority, 2019), covering vessel traffic in the Danish Straits region, sampled at 10-minute intervals. We follow the split from (Nguyen and Fablet, 2024): 1,481 test trajectories (March 21–31, 2019) and 10,605 training trajectories (2,517 vessels from 2019 excluding March 21–31). Each trajectory has a 3-hour observation window followed by a 3-hour prediction horizon.
Baselines.
- Constant velocity (CV): Linear extrapolation from the last observed position and bearing.
- Hexeberg SPNS (Hexeberg et al., 2017): Dead reckoning on the median course and speed of neighbors within a radius, gated at of course deviation, applied autoregressively. Produces one trajectory (no multi-modal output).
- NCDM (Dalsnes et al., 2018): SPNS’s multi-modal successor, sampling a course per branch from the same gated neighbors instead of taking the median, giving unranked trajectories.
- Spatial-only + diversity: Ablation of our method using spatial kernel weighting only (no bearing, speed, or temporal conditioning), with diversity penalty (, km). Isolates the contribution of multi-dimensional conditioning.
- LSTM seq2seq: 2-layer encoder-decoder LSTM (401,924 parameters), trained for 50 epochs with MSE loss. Best-of-16 via Gaussian noise injection on the hidden state.
- TrAISformer (Nguyen and Fablet, 2024): 57.4M-parameter transformer trained for 50 epochs. Top-1 via argmax decoding; best-of-16 via categorical sampling.
While recent surveys (Zhang et al., 2022) cover various deep learning approaches to maritime trajectory prediction, we compare against TrAISformer as it is the only published method with both public code and multi-modal evaluation on the DMA benchmark. We report results from our own reproduction.
Metrics. We report Final and Average Displacement Error (FDE, ADE) in kilometers at 1-hour and 3-hour horizons—the haversine distance between predicted and true position at the horizon endpoint, and averaged over the path up to it. We report top-1 (error of the single best-ranked prediction) and, following standard multi-modal evaluation practice, best-of- (minimum error across predictions), with as in TrAISformer. Since our predictions are hourly and the baselines’ are every ten minutes, ADE is computed with our waypoints linearly interpolated onto the finer grid. To assess probabilistic calibration, we additionally report the Continuous Ranked Probability Score (CRPS) in its energy form: , where are samples and is the ground truth.
Parameters. We cap our transition table at 150,000 transitions subsampled from training data and select the following hyperparameters based on data characteristics (e.g., typical route separation, AIS measurement precision). Kernel bandwidths: (bearing, effective within ), knot (speed), h (hour-of-day), d (day-of-week). Beam search: , . Diverse sampling: , km. These are held fixed without systematic tuning. A formal sensitivity analysis is left to future work.
3.2. Results
Main results. Table 1 presents the comparison on the DMA test set. Beam search achieves the best 3-hour top-1 FDE and the best top-1 ADE, while diverse sampling achieves the best 3-hour best-of-16 FDE. TrAISformer retains the best 1-hour top-1 and the best 3-hour best-of-16 ADE, though neither ADE difference is significant under a paired bootstrap. On CRPS both learned baselines outperform both of our modes.
Table 1. Trajectory prediction on DMA AIS (1,481 test trajectories, 3-hour prediction). FDE and ADE in km. Single-route baselines have no best-of-16; NCDM’s samples are exchangeable, so it has no top-1.
| 1h top-1 | 1h best-16 | 3h top-1 | 3h best-16 | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Method | Params | FDE | ADE | FDE | ADE | FDE | ADE | FDE | ADE | 3h CRPS |
| Const. velocity | 0 | 3.67 | 1.79 | – | – | 19.31 | 8.17 | – | – | – |
| Hexeberg SPNS (Hexeberg et al., 2017) | 0 | 5.74 | 3.14 | – | – | 18.51 | 9.32 | – | – | – |
| NCDM (Dalsnes et al., 2018) | 0 | – | – | 4.13 | 2.41 | – | – | 11.76 | 6.54 | 15.15 |
| Spatial-only + div. | 0 | 14.92 | 8.84 | 2.72 | 1.83 | 42.00 | 22.96 | 8.90 | 5.20 | 32.52 |
| LSTM seq2seq | 402K | 3.12 | 2.70 | 1.62 | 2.11 | 9.05 | 4.86 | 4.78 | 3.58 | 7.84 |
| TrAISformer | 57.4M | 2.20 | 1.32 | 0.81 | 0.70 | 9.84 | 4.42 | 2.66 | 1.76 | 6.02 |
| Ours (beam) | 0 | 2.29 | 1.49 | 1.99 | 1.33 | 9.00 | 4.31 | 7.17 | 3.57 | 8.29 |
| Ours (diverse) | 0 | 4.29 | 2.66 | 1.01 | 0.86 | 14.10 | 7.19 | 2.49 | 1.85 | 9.00 |
Data efficiency. To evaluate how both methods degrade as training data is reduced, we train on subsets of voyages from January–November 2019 and test on December (290 trajectories), a different split from the main results (in order to vary training set size while maintaining a held-out evaluation). Full data is 10,266 voyages carrying observations on 67 days—nearer ten weeks of regional traffic than the eleven months it spans—so the 10% setting is roughly 1 week. For our method only, the transition table is capped at 150k transitions, which binds above 22% of the pool, so 50% and 100% build identical tables. Figure 2 illustrates that our method’s performance is stable from 100% down to 10% of training data (2.46–2.60 km). Degradation becomes measurable at 5% and substantial at 1% (5.24 km). TrAISformer degrades from 2.61 km at full data to 14.33 km at 1%—a 5.5 increase. At 10% of data our method is 2.2 more accurate than TrAISformer.
Line plot on logarithmic axes of best-of-16 FDE versus training data fraction, with shaded 95 percent confidence bands. Our method stays near 2.5 km from 100 percent down to 10 percent of the data before rising, while TrAISformer rises steadily from 2.6 km at full data to 14.3 km at 1 percent. Our band is several times narrower than TrAISformer's throughout.
Figure 2. Data efficiency: 3-hour best-of-16 FDE vs. training data fraction, with 95% bands over subset draws. Log axes; open markers have no interval.Line plot on logarithmic axes of best-of-16 FDE versus training data fraction, with shaded 95 percent confidence bands. Our method stays near 2.5 km from 100 percent down to 10 percent of the data before rising, while TrAISformer rises steadily from 2.6 km at full data to 14.3 km at 1 percent. Our band is several times narrower than TrAISformer's throughout.
Computational requirements. On an AMD EPYC 9R14, inference costs 46 ms per trajectory for diverse sampling and 14 ms for beam search; building the transition table takes 21 s at full data, falling to 0.3 s at 1%. The cap bounds index and per-query cost but not extraction. Training TrAISformer took 69 minutes on a T4 GPU.
4. Discussion and Conclusion
Our method is effective across a broad operating range: it matches learned models at full data availability while offering dramatically better performance in data-scarce scenarios.
Beam search’s best-of-16 (7.17 km) is weaker than diverse sampling (2.49 km), as expected—without a diversity mechanism its branches cluster on the same high-likelihood route. The spatial-only ablation’s top-1 (42.00 km) is worse than SPNS (18.51 km) for an analogous reason: diversity sampling optimizes for multi-modal coverage at the expense of top-1, whereas SPNS deterministically follows its neighbors’ median course. Adding bearing, speed, and temporal conditioning reduces best-of-16 to 2.49 km, a 72% improvement over spatial-only, quantifying the value of multi-dimensional kernel conditioning; NCDM, which samples the same neighbor set uniformly, reaches only 11.76 km. Diverse sampling’s CRPS (9.00 km) is higher than beam’s (8.29 km) because the diversity penalty deliberately places samples on routes the vessel did not take, increasing expected distance to ground truth—the same property that yields its best-of-16 advantage. Both trail learned baselines, so we claim accuracy and data efficiency rather than calibration.
TrAISformer retains an advantage at the 1-hour top-1 metric (2.20 vs. 2.29 km), where its attention over the 3-hour observation window helps disambiguate routes at junctions. At the 3-hour horizon, TrAISformer generates 16 branches by independently sampling from its categorical distribution at each step; since most probability mass concentrates in the dominant direction, repeated samples cluster on the same route. Argmax decoding selects the highest-probability bin independently at each attribute (lat, lon, SOG, COG), which can produce positions between modes at junctions. Beam search scores complete paths by cumulative log-density, naturally favoring trajectories that stay on shipping lanes throughout.
Limitations and outlook. Without physics-based conditioning, our method cannot represent behavior absent from the transition table, such as very rare maneuvers. The fixed-speed assumption limits accuracy for vessels that accelerate mid-trajectory. No single inference mode dominates all metrics, requiring practitioners to select the mode appropriate to their use case. In very dense traffic, the neighbor count per query grows; the table cap bounds this in practice, but scaling in high-density regions warrants further study.
Deployment in a new region requires only accumulating AIS data, and the transition table can be updated incrementally as it arrives. Finally, our evaluation covers a single region and a single entity type; the method’s nature suggests applicability to other domains (pedestrian traffic, aviation, etc.) but we leave this to future work.
References
I. S. Abramson On bandwidth variation in kernel estimates—a square root law. The Annals of Statistics 10 (4), pp. 1217–1223. External Links: Document Cited by: 1st item.
B. R. Dalsnes, S. Hexeberg, A. L. Flåten, B. H. Eriksen, and E. F. Brekke The neighbor course distribution method with gaussian mixture models for AIS-based vessel trajectory prediction. In Proc. 21st International Conference on Information Fusion (FUSION), Cambridge, UK, pp. 580–587. External Links: Document Cited by: §1, 3rd item, Table 1.
Danish Maritime Authority Historical AIS data. Note: https://dma.dk/safety-at-sea/navigational-information/ais-data Cited by: §3.1.
S. Hexeberg, A. L. Flaten, B. H. Eriksen, and E. F. Brekke AIS-based vessel trajectory prediction. In Proceedings of the 20th International Conference on Information Fusion, Xi’an, China, pp. 1–8. External Links: Document Cited by: item 1, §1, 2nd item, Table 1.
E. A. Nadaraya On estimating regression. Theory of Probability and Its Applications 9 (1), pp. 141–142. External Links: Document Cited by: §2.2.
D. Nguyen and R. Fablet A transformer network with sparse augmented data representation and cross entropy loss for AIS-based vessel trajectory prediction. IEEE Access 12, pp. 21596–21609. External Links: Document Cited by: §1, 6th item, §3.1.
G. Pallotta, M. Vespe, and K. Bryan Vessel pattern knowledge discovery from AIS data: a framework for anomaly detection and route prediction. Entropy 15 (6), pp. 2218–2245. External Links: Document Cited by: §1.
B. Ristic, B. La Scala, M. Morelande, and N. Gordon Statistical analysis of motion patterns in AIS data: anomaly detection and motion prediction. In Proceedings of the 11th International Conference on Information Fusion, Cologne, Germany, pp. 1–7. Cited by: §1.
A. K. Vijayakumar, M. Cogswell, R. R. Selvaraju, Q. Sun, S. Lee, D. Crandall, and D. Batra Diverse beam search for improved description of complex scenes. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 32, New Orleans, LA, USA, pp. 7371–7379. External Links: Document Cited by: item 2, §2.4.
G. S. Watson Smooth regression analysis. Sankhyā: The Indian Journal of Statistics, Series A 26 (4), pp. 359–372. External Links: Link Cited by: §2.2.
X. Zhang, X. Fu, Z. Xiao, H. Xu, and Z. Qin Vessel trajectory prediction in maritime transportation: current approaches and beyond. IEEE Transactions on Intelligent Transportation Systems 23 (11), pp. 19980–19998. External Links: Document Cited by: §1, §3.1.