Manuscript Offprint

arXiv:2610.13557

Probabilistic Ship Trajectory Forecasting using Transformer Models on AIS Data

Frederik E. T. Schöller

Abstract

Anticipation of vessel trajectories is an essential task when navigating at sea. This applies to both human navigators and autonomous surface vessels. Trajectory forecasting enables sub-routines such as collision avoidance to assess the situation and react accordingly in time. This paper investigates Transformer and Performer models for trajectory prediction of surface vessels in confined waters. Using widely available position data from the Automatic Identification System (AIS), candidate models are trained and evaluated. Historical information on how other vessels have moved in the local area surrounding each agent is conveyed using positional heat maps. The heat maps are generated using Kernel Density Estimation (KDE) and encoded with a Convolutional Neural Network (CNN) before entering the Transformer models. The models are trained with quantile loss to efficiently obtain a model-aware prediction interval, as this is crucial for timely collision avoidance. The proposed model architectures are shown to greatly outperform previous work while the inclusion of local heat maps enables the prediction of vessel movement that is not otherwise indicated from the previous positions.

Keywords: Trajectory Prediction, Autonomous Marine Vessels, Machine Learning, Autonomous Navigation, AIS Data

1 Introduction

Recently, autonomous surface vessels have gained notable research interest. Services such as decision support or full autonomy are envisaged to be a crucial part of the future of shipping. This, however, requires excellent situational awareness [1,2][1, 2].

Situational awareness is obtained through three main steps: perception, understanding of the environment, and anticipation of how the situation develops [3]. While nearby vessels can be detected on both radar and cameras [4], estimation of future trajectories is needed if a short term path should be planned. A human navigator will use information about surrounding waters from the Electronic Chart Display and Information System (ECDIS) together with the past motion of vessels to assess the current situation. The past motion of nearby ships can be obtained e.g. by detection and tracking using radar [5, 6] or tracking camera detections [7, 8]. Commercial vessels and some large leisure crafts use Automatic Identification System (AIS) to broadcast current position, speed and heading among others.

Trajectory forecasting is a widely researched area, especially for pedestrian motion prediction. Many methods use Long short-term memory (LSTM) networks for motion prediction such

∗^{*}This work was carried out while the author was with the Automation and Control Group, Department of Electrical Engineering, Technical University of Denmark, Kgs. Lyngby, Denmark. The author is now an independent researcher.

as [9–11]. While Recurrent neural networks (RNN) are commonly used for tasks such as time series forecasting and Natural Language Processing (NLP), Transformer networks, first described in [12], have recently had immense success, especially for NLP, where models such as Bidirectional Encoder Representations from Transformers (BERT) [13], BART [14] and GPT-3 [15] outperformed previous LSTM models. Transformer networks have also shown their strengths in pedestrian trajectory forecasting [16], where they were shown to outperform the previous LSTM state of the art. One drawback of Transformers is that the computational burden increases quadratically with input sequence length. Multiple recent studies have investigated methods to introduce Transformer models with linear complexity [17, 18], though these often do not match the performance of the original Transformer. One study introduced the Performer [19] that incorporates Fast Attention Via Positive Orthogonal Random Features (FAVOR+) and obtains linear complexity. Their Performer-ReLU model showed to outperform a similar Transformer configuration with quadratic complexity while being more efficient.

If a trajectory forecast is to be used for risk assessment in the area of short term path planning for autonomous vessels, it is crucial not to obtain a single prediction, but to produce a prediction interval in which the observed vessel could go. A prediction interval can be obtained in numerous ways. For example by using Monte Carlo dropout [20], using Bayesian neural networks with probabilistic layer weights [21] or training the model as a conditional generative adversarial network (GAN) [22]. Common for these methods is that a prediction interval is not obtained directly from the network, but by running the network multiple times to approximate a prediction interval. This might result in a misleading prediction interval, as the network is trained to output a prediction close to the mean prediction and the prediction interval is approximated by drawing from a distribution. To circumvent these problems, this work utilizes quantile loss [23] to estimate prediction quantiles during training, which generates a model that is both aware of its prediction interval and can supply this in a single forward pass.

References (34)