Source-linked AI summary
Deep Learning Methods for Vessel Trajectory Prediction based on Recurrent Neural Networks
Samuele Capobianco, Leonardo M. Millefiori, Nicola Forti, Paolo Braca, Peter Willett
TL;DR
The paper addresses the challenge of predicting vessel trajectories several hours ahead from historical AIS observations. It develops LSTM encoder-decoder sequence-to-sequence models with alternative aggregation layers and optional high-level intention inputs, finding better performance than linear-regression and MLP baselines, especially with attention and labeled trajectories.
Problem
Several-hour vessel trajectory prediction from historical AIS data is difficult because AIS observations are irregular and imperfect, while vessel behaviors are diverse.
Method
The paper trains sequence-to-sequence LSTM encoder-decoder models on segmented historical AIS trajectories, using aggregation layers and optional motion-pattern or intention information.
Results
Attention aggregation outperforms MAX and AVG pooling, while labeled models substantially outperform unlabeled models and achieve lower error than the stated linear-regression and MLP baselines.
Takeaways & Limitations
Trajectory prediction improves when models use learned spatio-temporal aggregation and available high-level vessel intention information such as destination.
Takeaways & Limitations
Reliable accuracy depends heavily on a large, representative historical dataset containing paths from the test trajectory’s motion pattern.
Abstract
from arXiv · showhide
Data-driven methods open up unprecedented possibilities for maritime surveillance using Automatic Identification System (AIS) data. In this work, we explore deep learning strategies using historical AIS observations to address the problem of predicting future vessel trajectories with a prediction horizon of several hours. We propose novel sequence-to-sequence vessel trajectory prediction models based on encoder-decoder recurrent neural networks (RNNs) that are trained on historical trajectory data to predict future trajectory samples given previous observations. The proposed architecture combines Long Short-Term Memory (LSTM) RNNs for sequence modeling to encode the observed data and generate future predictions with different intermediate aggregation layers to capture space-time dependencies in sequential data. Experimental results on vessel trajectories from an AIS dataset made freely available by the Danish Maritime Authority show the effectiveness of deep-learning methods for trajectory prediction based on sequence-to-sequence neural networks, which achieve better performance than baseline approaches based on linear regression or on the Multi-Layer Perceptron (MLP) architecture. The comparative evaluation of results shows: i) the superiority of attention pooling over static pooling for the specific application, and ii) the remarkable performance improvement that can be obtained with labeled trajectories, i.e., when predictions are conditioned on a low-level context representation encoded from the sequence of past observations, as well as on additional inputs (e.g., port of departure or arrival) about the vessel's high-level intention, which may be available from AIS.
I. INTRODUCTION
Vessel trajectory prediction is important for maritime safety and surveillance, but AIS-based forecasting remains difficult because maritime motion is complex and AIS data are irregular and imperfect. The paper therefore proposes a data-driven sequence-to-sequence approach for extended-horizon prediction.
- Motivation: Predicting future vessel positions over extended horizons supports maritime safety systems, hazard awareness, emergency response, piracy prevention, and satellite interception planning.These applications require estimating probable future vessel locations when direct observations may be delayed or unavailable.
- Problem: Maritime trajectories are less constrained than road traffic because sea lanes govern motion only in specific areas.This makes vessel behavior prediction more complex than vehicle prediction in structured road environments.
- Problem: Historical AIS trajectory prediction remains an open and challenging problem because observations have irregular sampling, poor quality, and varied vessel behaviors.Behavioral variation depends on factors including vessel size, navigational status, and traffic regulations.
- Contribution: The paper proposes a fully data-driven LSTM encoder-decoder framework to predict future vessel trajectory states from past AIS observations.The approach builds on sequence-to-sequence modeling previously used in applications such as machine translation and speech recognition.
- Related work: Recent deep-learning methods aim to learn complex motion patterns directly from massive AIS datasets for prediction in complex traffic scenarios.Neural sequence models can encode input observations and generate output sequences step by step.
II. CONTRIBUTION
The paper develops an end-to-end LSTM encoder-decoder framework for vessel trajectory prediction that combines motion-pattern extraction, sequence modeling, aggregation layers, and optional intention information. It extends earlier work through a more complex dataset, attention-based aggregation, and bidirectional encoding.
- Establishing a novel deep-learning framework: The framework learns a mapping from sequences of past vessel states to future trajectory samples using an LSTM encoder-decoder architecture.It is designed for sequence-to-sequence prediction from historical AIS observations.
- Contribution: Compared with earlier work, the study uses a larger and more complex dataset, multiple aggregation layers, high-level intention information, a bidirectional encoder, and optimized hyperparameters.It also uses custom decoder-state initialization as an architectural improvement.
- Establishing a novel deep-learning framework: The method uses LSTM RNNs to encode past context and generate future predictions while capturing long-range temporal dependencies.Intermediate aggregation layers connect encoder and decoder networks to capture space-time dependencies in sequential data.
- Establishing a novel deep-learning framework: The approach extracts vessel motion patterns from large AIS datasets and trains RNNs to sequentially predict trajectories from AIS observations.Historical trajectories are aggregated into sets whose members share a common motion pattern.
- Comparing different deep learning methods: The architecture can incorporate non-kinematic information such as destination through additional features in the predictive model.Models using external features are called labeled, whereas models using only kinematic features are called unlabeled.
III. MARITIME TRAFFIC PATTERNS
The paper organizes historical AIS observations into homogeneous vessel motion patterns and uses these sequences to formulate supervised trajectory prediction. Pattern labels can provide optional high-level context alongside kinematic observations.
- Traffic structure: Historical ship mobility data reveal regular maritime routes and shipping-lane structure, motivating the extraction of recurring traffic patterns.Vessels often follow planned courses between waypoints toward destinations.
- Traffic structure: AIS density maps visualize the spatial distribution of vessel messages across an area of interest.The simplest construction counts AIS messages within grid cells over a specified time window.
- Trajectory construction: A vessel trajectory is an ordered temporal sequence of positions formed by aggregating and time-ordering AIS observations by MMSI.The dataset focuses on trajectories sharing a common motion pattern, such as a journey’s origin and destination.
- Pattern construction: The dataset groups AIS trajectories into predefined motion patterns, illustrated by trajectories associated with patterns (O, A) and (O, B).The pattern descriptor can be based on destination PGA or practical information such as declared destination, departure port, or vessel category.
- Problem definition: Each trajectory contains time points, state vectors, and an optional categorical motion-pattern label that may be represented using one-hot encoding.Experimental states use longitude and latitude, while other kinematic features are possible.
- Problem definition: The prediction task learns a spatio-temporal mapping from historical trajectories to future kinematic states over horizons generally measured in hours.A sliding-window segmentation procedure converts trajectories into input and output sequences for supervised learning.
B. Data segmentation
The paper converts irregular historical trajectories into regularly sampled, fixed-length input/output sequence pairs for supervised sequence-to-sequence learning.
- Preprocessing: Irregularly sampled trajectories are interpolated at a fixed sampling interval before segmentation.The procedure uses times t_k = k∆ to regularize the original trajectories.
- Windowing: Sliding windows split each trajectory into ℓ observed input samples and h future output samples with a one-step stride.Each window predicts the next h time steps from the preceding ℓ steps.
- Dataset representation: The resulting dataset contains input sequences, output sequences, and an optional categorical trajectory-pattern label.The label can represent a motion-pattern class and may be available or unavailable during prediction.
- Prediction task: The sequence-to-sequence model learns a predictive distribution for future vessel states conditioned on observed states and, when available, a journey descriptor.The learned distribution can be sampled to generate a target trajectory.
- Learning objective: Supervised training fits a parameterized mapping from each input sequence and descriptor to an output sequence by minimizing a task-dependent loss.The loss measures prediction error across the training samples.
D. Recurrent networks for sequence modeling
Recurrent networks model sequential vessel data by updating hidden states as they read observations, while LSTMs are used to better preserve long-term dependencies.
- RNN sequence modeling: RNNs summarize sequential inputs in hidden states that serve as memory for temporal dependencies.Their cyclical connections support pattern recognition in sequential data.
- RNN sequence modeling: A recurrent network reads each input x_t sequentially and updates its hidden state h_t through a nonlinear function of the current input and previous state.The recurrent function has learnable parameters.
- RNN sequence modeling: RNN output layers can use hidden states to make sequential predictions.These additional networks accept the recurrent hidden state as input.
- Training limitation: Standard RNNs are difficult to train over long sequences because exploding and vanishing gradients hinder learning long-range temporal dependencies.Gradients can increase or decrease exponentially during backpropagation.
- LSTM modeling: LSTMs address long-term dependency learning with memory blocks containing a cell state and input, forget, and output gates.The cell and gates update the hidden state using the current input and previous hidden state.
V. ENCODER-DECODER ARCHITECTURE
The proposed architecture uses recurrent encoder-decoder networks connected by an aggregation function to generate future vessel states from observed states and journey information.
- Encoder: The encoder reads observed kinematic states and maps them to a sequence of hidden representations.The encoder is a bidirectional RNN whose combined hidden state has dimension 2q.
- Aggregation: An aggregation function compresses encoder hidden states into a continuous context representation for prediction.The aggregation can also use the decoder state to produce step-specific context vectors.
- Decoder: The autoregressive decoder predicts each future vessel state from the previous predicted state, journey descriptor, and context vector.It generates the output trajectory step by step.
- Output: Applying the encoder, decoder, and aggregation functions sequentially produces an output sequence of h future states.The predicted trajectory is conditioned on observed kinematic states and the journey descriptor.
- Architecture: The encoder and decoder are both RNNs, forming an end-to-end trainable sequence-to-sequence architecture.The architecture learns the mapping from observed sequences to future trajectories.
A. Encoder network
The encoder uses a bidirectional LSTM to transform the observed vessel-state sequence into a compact representation containing information from both temporal directions.
- A. Encoder network: The bidirectional encoder processes the input simultaneously in positive and negative temporal directions using two recurrent networks.The two LSTMs learn long-term patterns from opposite temporal orders.
- A. Encoder network: Concatenating forward and backward hidden states produces each encoder output vector h_t ∈ R^2q.Each vector encodes bidirectional spatio-temporal information around the corresponding input position.
- A. Encoder network: The aggregation function compresses the encoder sequence H_ℓ into a contextual representation z for the decoder.Pooling summarizes the encoded sequence while retaining important information and discarding irrelevant features.
1) Max pooling over time (MAX):
The architecture compares static pooling with attention-based aggregation to compress encoder states into decoder context representations. Attention instead produces a context sequence conditioned on decoder states.
- 1) Max pooling over time (MAX):: Max pooling selects the highest value for each hidden unit across the temporal encoder sequence.The resulting vector z is repeatedly supplied to the decoder for sequential prediction.
- 1) Max pooling over time (MAX):: The proposed encoder-decoder architecture places attention-based aggregation between the encoder and decoder networks.Figure 4 depicts the encoder, aggregation layer, motion-pattern descriptor, and decoder sequence-generation path.
- 1) Max pooling over time (MAX):: Average pooling computes the mean value of each hidden unit across the entire encoded sequence H_ℓ.The resulting context vector is repeatedly used by the decoder.
- 1) Max pooling over time (MAX):: Unlike static aggregation, attention represents the input with a sequence of fixed-size context vectors z = {z_1, . . . , z_h}.This allows the decoder to assign context selectively while generating each output step.
- 1) Max pooling over time (MAX):: Attention computes each context vector z_j as a weighted sum of encoder hidden states using decoder-state-dependent scores.The scores represent spatio-temporal relations between input positions and output positions during trajectory generation.
C. Decoder network
The autoregressive decoder generates future vessel states from encoded context, previous predictions, and optionally a journey-intention descriptor. Its recurrent formulation supports output sequences of arbitrary length.
- C. Decoder network: The decoder generates the future trajectory from the input context representation and optionally the vessel’s intended journey descriptor ψ.The descriptor can encode departure or arrival information and augment the context used for prediction.
- C. Decoder network: At each step, the decoder predicts the next vessel state from context, previous predicted states, and the journey descriptor.This autoregressive formulation conditions each prediction on all earlier generated states.
- C. Decoder network: The decoder factorizes the predicted-sequence probability into ordered conditional probabilities.The conditionals assume the past and future are independent given context and previously predicted states.
- C. Decoder network: A unidirectional LSTM decoder iteratively generates an output sequence of length h.Its recursive architecture can model sequences of arbitrary length.
- C. Decoder network: The decoder input concatenates the previous prediction, context information, and one-hot descriptor ψ when available.The context-vector dimension depends on whether static or attention aggregation is used.
- C. Decoder network: The proposed sequence-to-sequence model is trained end-to-end with stochastic gradient descent.Figure 4 illustrates the attention-based encoder-decoder arrangement.
VI. EXPERIMENTAL SETUP
The experiments construct a benchmark from Danish AIS data and compare encoder-decoder variants with linear regression and MLP baselines. The setup also tests unlabeled versus destination-labeled prediction.
- VI. EXPERIMENTAL SETUP: Trajectories are formed by grouping AIS messages by vessel, splitting large temporal gaps, interpolating to a fixed interval, and windowing input-target sequences.The preparation pipeline also filters geography, vessel type, and selected motion patterns before K-fold splitting.
- VI. EXPERIMENTAL SETUP: The benchmark uses freely available Danish Maritime Authority AIS data and focuses on tanker trajectories in complex maritime traffic.The tanker-only selection supports a more homogeneous dataset and reduces computational demands.
- VI. EXPERIMENTAL SETUP: The selected scenarios contain departures through area O toward destination area A or B, with destination encoded as the categorical descriptor ψ.The experiments therefore distinguish two destination-conditioned motion patterns.
- VI. EXPERIMENTAL SETUP: Sampling uses Δ = 15 minutes, and the final dataset contains 394 trajectories.The original AIS interval averages about 10 seconds, while trajectory durations can reach thirteen hours.
- VI. EXPERIMENTAL SETUP: The evaluation compares the encoder-decoder architecture’s MAX, AVG, and ATTN aggregations with linear regression and MLP baselines.Hyperparameters were selected through extensive optimization.
- VI. EXPERIMENTAL SETUP: Unlabeled models use only low-level context from past observations, whereas labeled models additionally receive high-level vessel intention information.In these experiments, the intention descriptor specifies the destination area A or B.
D. Training settings
The paper trains trajectory-prediction networks after normalizing geographic coordinates and evaluates them with haversine-based mean absolute error. Initialization differs for MLP and LSTM encoder-decoder models, while five-fold cross-validation compares labeled and unlabeled approaches.
- Latitude and longitude pairs are linearly transformed to zero mean and unit variance before neural-network training with ADAM.
- MLP weights use He initialization, whereas LSTM encoder-decoder transition matrices use orthogonal initialization and other weights use Xavier initialization.
- Prediction error is measured as great-circle distance between true and predicted geographic positions, expressed in nautical miles.
- The haversine distance is preferred because longitude-latitude Euclidean distance can be inaccurate near waypoints and over long prediction horizons.
F. Results: quantitative analysis
The quantitative and qualitative evaluations consistently favor encoder-decoder attention models and labeled inputs. Intended-journey information particularly improves long-horizon predictions and helps resolve branching trajectories.
- Encoder-decoder models achieve the best performance at every considered prediction horizon in both labeled and unlabeled experiments.
- Attention aggregation outperforms MAX and AVG because it can learn spatio-temporal relationships among input and output states.
- At a 3-hour horizon, labeled neural models achieve approximately half the MAE of models using unlabeled inputs.
- Labeled information becomes especially important for long-term prediction, where unlabeled EncDec and MLP performance degenerates quickly.
- In the branching WP area between 80 and 100 nmi, labeled EncDec predictions have substantially lower error and exploit intended-journey information to select among paths.
- The labeled architecture produces trajectories consistently more similar to targets, while unlabeled predictions can average incompatible trajectory modes.
- The labeled EncDec-ATTN model has final displacement error below 2.5 nmi in approximately 90% of cases, versus approximately 70% for unlabeled neural models.
- Labeled models forecast the vessel’s position before the maneuvering point, whereas unlabeled models identify the correct direction only after observing the branching position.
H. Attention weight scores analysis
The analysis visualizes attention weights to interpret which historical positions recurrent models use when generating future trajectories. Across consecutive inputs, both models emphasize waypoint regions, while labeled models outperform unlabeled counterparts in this context.
- Model comparison: In the illustrated context, labeled models outperform unlabeled models for both the MLP and EncDec-ATTN architectures.The comparison is specific to the trajectory sequences shown in Fig. 9.
- Interpretation: Attention weights provide an interpretable distribution over input positions used to generate each predicted trajectory.Each matrix column shows the weight distribution over the input sequence.
- Figure organization: Fig. 9 compares unlabeled and labeled MLP and EncDec-ATTN models across four consecutive input-target sequences.Rows follow increasing temporal index k; columns show predictions and attention scores for the two recurrent models.
- Waypoint emphasis: At k + 1 and k + 2, both labeled and unlabeled models emphasize input positions corresponding to the ship’s direction change at the waypoint.The authors suggest the unlabeled model recognizes the turning maneuver from the input pattern.
- Limitations and extensions: The encoder-decoder approach remains sensitive to training-data size and representativeness, while intention information cannot fully resolve multimodality when trajectories share the same intention.Future work targets mixture-density prediction, multimodality, and prediction uncertainty.