TrAISformer -- A Transformer Network with Sparse Augmented Data Representation and Cross Entropy Loss for AIS-based Vessel Trajectory Prediction
Duong Nguyen, Ronan Fablet
TL;DR
TrAISformer tackles medium-range AIS-based vessel trajectory prediction by explicitly modeling heterogeneity and multimodality through a discrete four-hot representation of AIS features and a probabilistic transformer. The method reframes prediction as a multimodal classification problem using a cross-entropy loss over four feature heads, enabling sampling of multiple plausible futures. On public DMA AIS data, it substantially outperforms state-of-the-art approaches, achieving sub-1 nmi errors at short horizons and below 10 nmi up to around 10 hours, with ablations confirming the necessity of its encoding, sparsity, and multimodal loss. The work advances maritime surveillance and routing applications and opens avenues for weather-conditioned predictions, interaction modeling, and model compression for operational deployment.
Abstract
Vessel trajectory prediction plays a pivotal role in numerous maritime applications and services. While the Automatic Identification System (AIS) offers a rich source of information to address this task, forecasting vessel trajectory using AIS data remains challenging, even for modern machine learning techniques, because of the inherent heterogeneous and multimodal nature of motion data. In this paper, we propose a novel approach to tackle these challenges. We introduce a discrete, high-dimensional representation of AIS data and a new loss function designed to explicitly address heterogeneity and multimodality. The proposed model-referred to as TrAISformer-is a modified transformer network that extracts long-term temporal patterns in AIS vessel trajectories in the proposed enriched space to forecast the positions of vessels several hours ahead. We report experimental results on real, publicly available AIS data. TrAISformer significantly outperforms state-of-the-art methods, with an average prediction performance below 10 nautical miles up to ~10 hours.
