NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Hierarchical Spatial-Temporal Embedding Method Based on Enhanced Trajectory Features for Ship Type Classification

Tao Sun, Yongjun Xu, Zhao Zhang, Lin Wu, Fei Wang

TL;DR

This paper introduces Hi-STEM, a novel hierarchical spatial-temporal embedding method for ship type classification. By transforming raw ship trajectories into "moored records" that focus on port visits and then embedding these records, Hi-STEM achieves high accuracy in classifying ship types, outperforming existing methods, especially when training data is limited.

What Problem Does This Paper Address?

Accurately classifying ship types is crucial for maritime monitoring, analysis, and forecasting. While Automatic Identification System (AIS) data provides ship type information, it's often manually entered and can be inaccurate or deliberately falsified. Ship trajectories offer a more reliable alternative, but real-world trajectory data is notoriously sparse and unevenly distributed geographically. This sparsity makes it difficult for traditional sequence analysis and even some deep learning methods to accurately infer a ship's movement patterns and, consequently, its type. The paper aims to overcome these challenges by developing a method that can effectively leverage trajectory data despite its inherent limitations.

Methods

The core of the proposed method, Hi-STEM, involves two main stages:

  1. Data Preprocessing: From Trajectories to Moored Records:
    • Stop Point Detection: The method first identifies "stop points" in the original ship trajectories. This is done by analyzing the ship's speed; if the speed drops below a certain threshold for a sustained period, it's considered a stop.
  2. Port Matching: These detected stop points are then matched with a comprehensive database of global ports. A stop point within a defined radius (e.g., 10 nautical miles) of a port is considered a "mooring event."
    • Moored Records Generation: The original trajectory data (latitude, longitude, time) is transformed into "moored records." Each record represents a ship's stay at a port, denoted by the port's identifier, the "stay behavior," and the time of occurrence. This process effectively filters out sparse navigation points and enhances the semantic information associated with port visits.
  3. Hierarchical Spatial-Temporal Embedding (Hi-STEM):
    • Spatial Embedding (Port Representation): Ports are treated as functional entities that carry semantic meaning. An unsupervised learning approach, inspired by word embedding techniques, is used to map each port into a low-dimensional vector space. This embedding captures relationships between ports based on their co-occurrence in ship trajectories, effectively learning port semantics.
  4. Temporal Embedding: The temporal information (year, month, day, hour, minute, second) of each moored record is processed and embedded into a continuous vector representation, ensuring it's compatible with neural network inputs.
  5. Spatial-Temporal Sequence Classification: The embedded spatial and temporal features are then fed into a recurrent neural network (RNN), specifically an LSTM (Long Short-Term Memory) unit, to capture the sequential patterns of moored records.
  6. Attention Mechanism: To further enhance classification accuracy, an attention mechanism is incorporated. This mechanism allows the model to dynamically focus on the most important moored records (i.e., critical ports) within a sequence, improving its ability to distinguish between ship types that might have similar overall movement patterns but differ in key port interactions.
  7. Classification: Finally, the output from the RNN with attention is passed through a multi-layer perceptron (MLP) with a softmax layer for final ship type classification.

Datasets

The paper utilizes real-world ship movement data collected from AIS. They also incorporate a database of global ports, including location, name, and country information. The specific datasets used for training and testing are described as consisting of:

  • Ship moored records (20572 lines of data).
  • Basic information about ships.
  • Basic information about ports.

The authors state that the source code and datasets are publicly available at: https://github.com/taos123/Ship_Classification_Moored.

Key Insights and Ideas

  • Moored Records as a Powerful Representation: Transforming raw, sparse trajectories into "moored records" that focus on port visits is a key innovation. This approach effectively handles data sparsity and highlights semantically rich events (port calls) that are more indicative of ship type than general navigation.
  • Port Semantics Matter: Recognizing that ports are not just locations but carry functional meaning (e.g., cargo export/import, passenger terminals) and embedding them allows the model to learn nuanced relationships between different types of maritime activities.
  • Attention for Critical Port Identification: The attention mechanism is crucial for focusing on the most informative parts of a ship's mooring history, improving the model's ability to differentiate between similar ship types by highlighting key port interactions.
  • Robustness to Data Scarcity: Hi-STEM demonstrates remarkable robustness when the amount of training data is reduced, outperforming other methods significantly. This suggests the learned spatial and temporal embeddings, along with the attention mechanism, make the model less dependent on sheer data volume.

Key Results

  • High Accuracy: The proposed Hi-STEM method achieves high accuracy in ship classification on moored records, with results often exceeding 80% for four categories (cargo ship, fishing ship, oil ship, and passenger ship).
  • Superiority over Original Trajectories: Classification based on moored records consistently outperforms classification based on original, raw ship trajectories across various methods (LCSS, DTW, HMM).
  • Outperforms Baselines: Hi-STEM significantly outperforms traditional trajectory classification methods like LCSS, DTW, and HMM, as well as standard RNN-based models (LSTM, GRU) on moored records.
  • Robustness to Data Size: Even when training data is reduced to one month, Hi-STEM maintains competitive accuracy, while other methods see a drastic drop.
  • Parameter Sensitivity: The model shows good robustness to parameter choices, particularly the hidden layer size, with optimal performance observed around 300.

Limitations and Future Work

  • Limitations:
    • The paper acknowledges that while Hi-STEM is robust to data scarcity, the accuracy of all methods decreases as training data is reduced.
  • The performance of Hi-STEM with GRU units was observed to be slightly worse than with LSTM or Bi-LSTM.
  • Future Work:
    • The authors plan to develop and make available more comprehensive ship classification datasets for researchers.
  • While not explicitly stated as future work, the paper's focus on moored records suggests potential for further exploration of other event-based representations of ship behavior.

Summary updated

BibTeX
@inproceedings{sun2022hierarchical,
  author = {Tao Sun and Yongjun Xu and Zhao Zhang and Lin Wu and Fei Wang},
  title = {{A Hierarchical Spatial-Temporal Embedding Method Based on Enhanced Trajectory Features for Ship Type Classification}},
  booktitle = {Sensors},
  year = {2022},
  url = {https://openreview.net/forum?id=QA1Y3JguRa},
}
Figure