Skip to main content
Back to timeline
arXivSource publication:

Ship track forecasts move to Transformers: 0.18 km average error, prediction interval in one pass

Synopsis

Ship trajectory forecasting no longer needs recurrent networks or repeated sampling. Earlier AIS-based models either used only the target vessel's history or relied on clustering other vessels, and approximated probability intervals through multiple forward passes. Here the vessel's past positions and a local KDE heat map are fed to a Transformer trained with quantile loss, reaching about 0.18 km average displacement error across three Danish water areas while emitting a prediction interval in a single forward pass.

Source-provided article image: Probabilistic Ship Trajectory Forecasting using Transformer Models on AIS Data
Figure 1 · arXiv

Interpretation

Short-term surface-vessel trajectory prediction now comes directly from Transformer-type models that output a prediction interval, rather than a single track with uncertainty estimated separately. Earlier AIS-based prediction largely relied on recurrent networks such as LSTM, while probability intervals were approximated by Monte Carlo dropout or GAN sampling, which costs noticeably more inference time. On 20,000 trajectories each from the Great Belt, Falsterborev and Oresund test areas, the Transformer and Performer reach about 0.18 km average displacement error, against 0.378 km for the LSTM-GAN and higher values for the linear and Gaussian process baselines.

The model encodes the vessel's past position sequence together with the historical traffic density of the surrounding local water, so it can anticipate turns that past positions alone do not reveal. Methods using only the target vessel's history cannot see the fairway and tend to predict straight-ahead motion, while clustering-only approaches ignore the target vessel's own movement. The local heat map is produced by two-dimensional kernel density estimation and cropped around the vessel, then encoded by a convolutional network and concatenated with temporal features; in the Great Belt and Falsterborev, models with heat maps outperform those without.

The prediction interval is learned directly during training through quantile loss and is available in one forward pass, without repeated sampling. Sampling-based methods must run the network multiple times to approximate an interval, multiplying inference time. Transformer and Performer predictions take about 6 to 7 ms, against about 157 ms for the LSTM-GAN; average interval accuracy across the three test areas is 90.7% and 91.2% respectively.

Perspective

Results cover three Danish water areas, the Great Belt, Falsterborev and Oresund, with AIS position sequences as input and 30 predicted steps of 20 seconds each, about 10 minutes. The method targets short-term path planning for onboard collision avoidance and decision support. For onboard deployment it should preferably be pretrained on data from the planned route.

In the unseen Oresund area, models without heat maps performed slightly better than their heat-map counterparts, which the authors suggest may indicate overfitting of the spatial feature extraction subnetwork to the training areas. When trained on Oresund data itself, heat maps again gave lower displacement errors but at a lower interval accuracy. The Performer's linear attention was not faster than the Transformer for the short 15-step input used here.