M3-Former: Multimodal Transformer with Mixture-of-Experts for Long-Term Vessel Trajectory Prediction
Researchers have developed M3-Former, a multimodal transformer framework that uses large language models and a Mixture-of-Experts architecture to improve long-term vessel trajectory prediction.
Intelligence analysis by Gemini 2.5 Flash

M3-Former addresses challenges in vessel trajectory prediction, such as behavioral multimodality and error accumulation, by integrating static vessel attributes and navigational intent as semantic priors. It employs a dual-granularity Mixture-of-Experts and a specialized loss function to achieve superior accuracy over prediction horizons up to four hours.
Imagine you're trying to guess where a toy boat will go in a big bathtub over a long time. It's tricky because boats can turn, speed up, or slow down. This new AI, called M3-Former, is like a super-smart guesser for real ships. It not only looks at where the ship has been but also knows what kind of ship it is and where it's trying to go, like knowing if your toy boat is a fast speedboat or a slow cargo ship. This helps it guess much better, especially for a long time, so ships can travel safer and smarter.
Analysis
The M3-Former framework represents a notable advancement in the field of vessel trajectory prediction, specifically targeting the complexities of long-term forecasting. The core innovation lies in its multimodal approach, which moves beyond purely dynamic data to incorporate static semantic information, such as vessel attributes and navigational intent. This semantic guidance, encoded by a pre-trained large language model (LLM) and aligned with dynamic trajectory features via self-attention, is critical for reducing the long-term trajectory drift that plagues existing models.
M3-Former
At its heart, M3-Former is designed to overcome the inherent challenges of behavioral multimodality and the accumulation of errors over extended prediction horizons. By constructing a unified multimodal representation space, the model can leverage a richer context than traditional methods. The integration of LLMs for encoding static semantic information is particularly innovative, allowing the model to 'understand' the underlying purpose and characteristics of a vessel's movement, rather than just observing its path. This semantic fusion is empirically shown to be effective in maintaining prediction accuracy over longer durations.
Danish AIS Dataset
The efficacy of M3-Former was rigorously tested using a real-world Danish AIS dataset, providing a robust validation of its performance. Experiments demonstrated that the proposed method consistently surpassed state-of-the-art baselines across various prediction horizons, ranging from one to four hours. Notably, in the challenging four-hour prediction task, M3-Former achieved significant reductions in both Average Displacement Error (ADE) and Final Displacement Error (FDE) by 4.4% and 5.1% respectively, compared to the strongest competitor. These quantitative results underscore the model's practical utility and superior predictive capabilities in real-world maritime scenarios.
Steering-Weighted Cross-Entropy
To further enhance prediction accuracy, especially in critical maneuvering situations, the researchers introduced a novel Steering-Weighted Cross-Entropy loss function. This specialized loss is engineered to address the long-tail distribution of sparse turning samples, which are often underrepresented in standard datasets but are vital for accurate navigation. By assigning greater weight to these crucial turning events, the model is better equipped to learn and predict complex maneuvering behaviors. This targeted optimization improves the model's robustness, particularly in intricate waterways and scenarios involving route branching, where precise steering predictions are paramount for safe and efficient vessel operation.
Key points
- M3-Former is a multimodal transformer framework for long-term vessel trajectory prediction.
- It integrates static vessel attributes and navigational intent using a pre-trained large language model (LLM).
- A dual-granularity Mixture-of-Experts (MoE) architecture captures both global route planning and local motion variations.
- A Steering-Weighted Cross-Entropy loss addresses sparse turning samples to improve accuracy in critical maneuvers.
- Experiments on a Danish AIS dataset show M3-Former outperforms state-of-the-art baselines, reducing ADE by 4.4% and FDE by 5.1% in 4-hour predictions.
The M3-Former framework promises significant improvements in maritime safety and operational efficiency by providing highly accurate long-term vessel trajectory predictions. This could lead to better traffic management in busy shipping lanes, reduced collision risks, and more optimized fuel consumption through precise route planning, ultimately supporting the development of fully autonomous shipping.



