STID-Mixer: A Lightweight Spatio-Temporal Modeling Framework for AIS-Based Vessel Trajectory Prediction

L X Wang, Jian Zhang, Guangyin Jin, Xinyu DongEng—Advances 2025 · DOI

TL;DR

This paper introduces STID-Mixer, a novel, lightweight framework for predicting vessel trajectories using Automatic Identification System (AIS) data. By combining a unique spatio-temporal identity encoding with an efficient MLP-Mixer architecture, STID-Mixer achieves state-of-the-art accuracy while significantly reducing computational costs, making it ideal for large-scale maritime applications.

What Problem Does This Paper Address?

Maritime traffic management and safety are increasingly reliant on data from the Automatic Identification System (AIS). AIS provides real-time vessel information, making it crucial for predicting future trajectories. However, AIS data presents significant challenges: it's often sparse, irregularly sampled, and comes in various formats. Vessel movements themselves exhibit complex spatial and temporal dependencies. Existing deep learning models, like LSTMs and Transformers, while powerful, often suffer from high computational demands, slow training times, and large model sizes, limiting their practical deployment in real-time or large-scale maritime scenarios. This paper aims to bridge this gap by proposing a lightweight yet effective solution.

Methods

The core innovation of STID-Mixer lies in its two main components:

  • Spatial-Temporal Identity (STID) Encoding: This method transforms raw, often messy AIS data into a structured, unified representation. It discretizes continuous temporal features (like hour of day and day of week) and spatial features (by dividing the maritime region into a 50x50 grid) into categorical "IDs." These IDs are then embedded into dense vectors. This approach aims to capture periodic behavior patterns and spatial aggregation more effectively than raw continuous data.
  • MLP-Mixer Architecture: Instead of relying on traditional convolutional or attention mechanisms, STID-Mixer uses a pure Multi-Layer Perceptron (MLP) based architecture. The MLP-Mixer processes the spatio-temporal features in two distinct ways: "token mixing" (modeling temporal dependencies across time steps) and "channel mixing" (fusing multi-dimensional attributes within each time step). This dual-axis approach allows for efficient parallel computation and captures complex interactions without the quadratic complexity of self-attention.

The prediction task is framed as a multi-class classification problem, where the model predicts the grid cell a vessel will occupy in the future.

Datasets

The study utilizes a large-scale, real-world AIS trajectory dataset obtained from the South China Sea Navigation Service Center of the China Maritime Safety Administration. This dataset comprises 24,174,306 AIS message records, covering continuous sailing trajectories of hundreds of vessels over several days. The data was preprocessed to extract key features like MMSI, timestamp, longitude, latitude, SOG, and COG. The dataset was split into training (70%), validation (15%), and testing (15%) sets using a trajectory-level partitioning strategy to ensure data independence.

Key Insights and Ideas

  • Discretization for Efficiency: By converting continuous spatial and temporal features into discrete IDs and then embedding them, the model can potentially learn more robust patterns with less computational overhead compared to directly processing raw continuous data.
  • MLP-Mixer's Potential: The paper demonstrates that a pure MLP-based architecture, like MLP-Mixer, can achieve competitive or superior performance to attention-based models for trajectory prediction, challenging the notion that attention is always necessary for complex sequence modeling.
  • Unified Representation is Key: The STID encoding, which combines temporal and spatial information into a single representation, is shown to be critical for accurate trajectory prediction, especially the spatial component.
  • Lightweight Design Matters: The focus on a lightweight architecture is crucial for practical deployment, especially with the massive volume of AIS data generated daily.

Key Results

STID-Mixer significantly outperforms several baseline models, including LSTM, Transformer, GBDT, Linformer, and Fastformer, across various metrics:

  • Accuracy: Achieved a test accuracy of 83.53%, an improvement of approximately 11.2% over LSTM and 22% over Transformer.
  • F1 Score: Reached a Macro F1 score of 0.4599, indicating strong performance even on minority classes.
  • Training Efficiency: Demonstrated substantially lower training costs and time per epoch compared to LSTM and Transformer models, highlighting its scalability. For instance, the total training time for STID-Mixer was 3452.80 seconds, compared to 19,342.97 seconds for LSTM.

Ablation studies confirmed that all components of STID-Mixer (STID encoding and MLP-Mixer backbone) are essential for its superior performance.

Limitations and Future Work

The authors acknowledge that the current STID-Mixer model does not explicitly account for inter-vessel interactions. This is a significant limitation, especially in dense maritime traffic environments where vessels influence each other's movements.

Future work suggested includes:

  • Exploring graph-based architectures (like Graph Neural Networks) to model cooperative dynamics among multiple vessels.
  • Investigating multi-step trajectory forecasting.
  • Developing methods for modeling behavioral uncertainty.

Summary updated

Abstract

The Automatic Identification System (AIS) has become a key data source for ship behavior monitoring and maritime traffic management, widely used in trajectory prediction and anomaly detection. However, AIS data suffer from issues such as spatial sparsity, heterogeneous features, variable message formats, and irregular sampling intervals, while vessel trajectories are characterized by strong spatial–temporal dependencies. These factors pose significant challenges for efficient and accurate modeling. To address this issue, we propose a lightweight vessel trajectory prediction framework that integrates Spatial–Temporal Identity encoding with an MLP-Mixer architecture. The framework discretizes spatial and temporal features into structured IDs and uses dual MLP modules to model temporal dependencies and feature interactions without relying on convolution or attention mechanisms. Experiments on a large-scale real-world AIS dataset demonstrate that the proposed STID-Mixer achieves superior accuracy, training efficiency, and generalization capability compared to representative baseline models. The method offers a compact and deployable solution for large-scale maritime trajectory modeling.
BibTeX
@inproceedings{wang2025stid,
  author = {L X Wang and Jian Zhang and Guangyin Jin and Xinyu Dong},
  title = {{STID-Mixer: A Lightweight Spatio-Temporal Modeling Framework for AIS-Based Vessel Trajectory Prediction}},
  booktitle = {Eng—Advances},
  year = {2025},
  doi = {10.3390/eng6080184},
}
Figure