1. Introduction
As global economic integration deepens, maritime trade has become the nexus of the world economy, handling over 80% of international trade transportation. Recently, with the International Maritime Organization (IMO) advancing regulations for Maritime Autonomous Surface Ships (MASS), the digitalization and intelligent transformation of the shipping industry have accelerated [
1]. In intelligent navigation scenarios, accurate spatiotemporal positioning is a prerequisite for safety. Vessels typically rely on the Global Navigation Satellite System (GNSS) as their primary source [
2]. However, satellite signals are prone to interruption, drift, or denial in complex sea states or port environments, compromising the continuity and reliability of positioning [
3,
4]. Maintaining situational awareness through effective modeling of vessel motion during GNSS anomalies has thus become a critical safety issue. Trajectory prediction serves as a foundational technology bridging historical observations with future motion states, supporting autonomous collision avoidance and intelligent decision-making.
The Automatic Identification System (AIS), a standardized global maritime monitoring technology, provides spatiotemporal data such as position, speed, and course [
5]. Although it relies on onboard GNSS, it offers rich high-dimensional data for maritime research. By analyzing historical and current AIS data, researchers have developed various trajectory prediction models, achieving significant success on public datasets and supporting Vessel Traffic Services (VTS) [
6,
7,
8]. Beyond directly safeguarding navigational safety, high-precision, maneuverability-aware trajectory prediction can also serve as foundational data input for broader maritime operational analyses. Consequently, it is capable of supporting various downstream maritime decision-making processes, such as berth congestion mitigation and demurrage pattern analysis [
9]. However, modeling based solely on historical AIS trajectories struggles to cover all maneuvering encountered situations in actual navigation. Specifically, under high-dynamic conditions—such as emergency avoidance, sharp turning, or rapid speed changes—relevant motion patterns are often scarce or under-observed in historical data, rendering models ineffective for such states. Moreover, existing studies are largely trained on idealized, massive public datasets, which differ significantly from practical engineering scenarios. In real-world maritime intelligent traffic systems, models universally face small sample sizes and long-tailed distributions: newly launched or mission-specific vessels lack long-term data accumulation, and the vast majority of samples correspond to steady-state straight sailing, while high-dynamic maneuvering samples are extremely rare. Deep learning models trained on such imbalanced data tend to overfit to straight-line modes, failing to capture instantaneous motion changes. This leads to severe prediction lag or divergence during the maneuver initiation phase. Therefore, an effective approach is required to enhance the model’s maneuver perception capability without compromising its ability to learn from historical features.
Existing models relying solely on AIS data are insufficient for practical engineering needs. To address performance degradation caused by AIS observation lag and the scarcity of complex maneuvering samples, this paper introduces the Inertial Measurement Unit (IMU) as a physical supplement. The IMU provides high-frequency attitude vessel (roll, pitch, heading) and acceleration data. Physically, changes in attitude and acceleration precede changes in position, meaning IMU data contains prior dynamic information reflecting maneuvering intention. Based on this, we propose a vessel trajectory prediction method based on IMU enhancement, which utilizes synchronized AIS and IMU raw data collected from real vessel experiments to construct a multimodal deep learning model. While retaining the modeling advantages of historical AIS trajectory features, this model further enhances the model’s perception ability and trajectory prediction accuracy for high-dynamic maneuvering behavior.
This paper focuses on the physical observability constraint in practical engineering. During the transition from steady sailing to maneuvering (e.g., turning), AIS-derived kinematic information (position, speed, course) inherently lags behind the vessel’s true dynamic state. Given the large inertia of vessels and limited sensor sampling rates, relying solely on AIS leads to insufficient perception during the maneuver initiation phase, affecting prediction stability. Unlike studies pursuing marginal accuracy improvements on idealized datasets, this research systematically analyzes the physical boundaries of trajectory prediction under engineering constraints (small samples, long-tailed distributions, limited sensors) and explores a feasible breakthrough. We prioritize stability, physical consistency, and safety availability in engineering applications, in order to provide practical technical support for the safe navigation of intelligent vessels. Building upon the clarification of the aforementioned engineering objectives, it is necessary to further elucidate the fundamental methodological distinctions between the proposed framework and existing approaches. Compared to classical sensor fusion techniques widely adopted in the robotics domain (e.g., the Extended Kalman Filter, EKF)—which fundamentally focus on short-term state estimation and smoothing under the Markov assumption—our framework targets long-horizon trajectory prediction (up to 180 s). EKF-based methods struggle to extrapolate complex, non-linear, and human-driven maneuvering intentions over extended time scales. Within our framework, Inertial Measurement Unit (IMU) data is not utilized merely for instantaneous state filtering. Instead, it serves as a high-frequency dynamic trigger, empowering the deep learning attention mechanism to proactively anticipate macroscopic trajectory shifts before low-frequency AIS records any significant spatial displacement. Furthermore, compared to recent deep learning-based maritime trajectory prediction models, our approach introduces a physics-aware paradigm. Due to the inherent “kinematic lag” of AIS and the long-tailed distribution of maritime maneuvers, traditional deep models suffer severe performance degradation in sparse data scenarios. Our framework structurally compensates for this deficiency by directly embedding physical kinematic constraints (IMU dynamic priors) and a maneuver-aware dynamic loss function, thereby transforming the model from a “passive data fitter” into a “proactive, physics-informed predictor. The main contributions of this study are as follows:
Construction of a Physics-Aware Multimodal Fusion Framework: We propose a deep learning model fusing AIS position data with IMU attitude features. By integrating attitude dynamics, we compensate for the limitations of kinematic-only AIS data, significantly enhancing prediction accuracy in complex maneuvering scenarios.
Benchmark comparison and model evaluation: To comprehensively evaluate the contribution of IMU features to prediction performance, we selected the Transformer attention model and the LSTM recurrent model, and conducted experimental comparative analysis before and after integrating IMU features into both models.
Effectiveness verification in practical engineering: By constructing a deep learning model using synchronous AIS and IMU raw data collected from real vessel experiments, it is proven that in practical engineering scenarios with small samples and long-tailed distributions, the introduction of inertial information is crucial for overcoming the physical limits of a single modality and achieving robust trajectory prediction.
This study unfolds as follows:
Section 2 reviews relevant work on vessel trajectory prediction,
Section 3 proposes a physical perception multimodal fusion method, detailing data preprocessing, model structure, loss function, and engineering constraints,
Section 4 describes the real-vessel experimental platform, dataset, and comparison setup,
Section 5 verifies the effectiveness of the method through multi-scenario experiments and ablation analysis, and
Section 6 summarizes the full paper and outlines future research directions.
2. Related Work
Vessel trajectory prediction has consistently been a research hotspot in the fields of intelligent navigation and ocean engineering [
10,
11,
12]. Depending on the modeling mechanisms and input data, existing prediction methods can be broadly categorized into two main classes: physics-based kinematic methods and data-driven methods. Furthermore, multi-source data fusion methods, which have emerged in recent years, are gradually becoming a new trend in research.
Regarding physics-based kinematic methods, early vessel trajectory prediction primarily relied on vessel hydrodynamic equations and state estimation techniques. These approaches focused on intrinsic driving factors, utilizing only the target vessel’s historical motion patterns for prediction [
13,
14,
15,
16]. The Kalman Filter (KF) and its variants—such as the Extended Kalman Filter (EKF) and Unscented Kalman Filter (UKF)—are the most classical methods in this domain. Perera et al. [
17] implemented real-time trajectory estimation by combining EKF with a vessel maneuvering motion model. Laxhammar [
18] employed unsupervised clustering methods to predict vessel traffic patterns, utilizing Gaussian Mixture Models (GMM) as the clustering model and the Expectation-Maximization (EM) algorithm. These methods possess the advantages of computational efficiency and strong physical interpretability. However, physical models are typically established on assumptions of idealized force states or linear motion and rely heavily on precise hydrodynamic coefficients. In actual sea conditions, when facing strong non-linear disturbances from wind, waves, and currents, or when vessels undergo complex maneuvers, the long-term prediction accuracy of such methods is often difficult to guarantee due to the challenges in establishing precise mathematical model parameters in real-time, rendering them prone to cumulative errors.
Regarding data-driven methods, with the proliferation of AIS data and the enhancement of computational power, these approaches have gradually assumed a dominant role, primarily comprising traditional machine learning and deep learning methods. In the realm of traditional machine learning, methods such as Support Vector Regression (SVR) and Gaussian Process Regression (GPR) have been widely applied to trajectory regression tasks. Liu et al. [
19] utilized an improved SVR model to enhance trajectory prediction accuracy. Although these methods perform acceptably with small sample sizes, their feature extraction capabilities and generalization often prove insufficient when processing massive, high-dimensional AIS data characterized by temporal dependencies. In contrast, deep learning methods have demonstrated superior advantages. Recurrent Neural Networks (RNN) and their variants—Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU)—have become the mainstream choices for trajectory prediction due to their unique gating mechanisms, which effectively handle long-term dependencies in time-series data. Chen et al. [
20] proposed a deep learning model for curve fitting and analysis based on AIS data. This method consists of a forward GRU and a backward Bi-directional GRU (Bi-GRU) network, thereby reducing the scope of the trajectory to be fitted by scaling in both directions. Zhang et al. [
21] proposed a trajectory prediction method combining AIS information with LSTM networks, achieving real-time prediction of future vessel trajectories. Billah et al. [
22] introduced a prediction model based on an encoder–decoder architecture, which encodes past temporal AIS data to generate future trajectory samples. Recently, following the success of attention mechanisms in Natural Language Processing (NLP), Transformer-based architectures have also been introduced to trajectory prediction. Transformers can parallelly capture global dependencies within sequences through self-attention mechanisms. Xue et al. [
23] proposed the G-Trans model based on the Transformer architecture, further improving prediction accuracy and demonstrating the potential of advanced deep learning architectures in mining spatiotemporal trajectory features.
Despite the excellent performance of the aforementioned methods on large-scale public datasets, they often falter when addressing small sample problems in practical engineering contexts. Most studies rely on training with massive historical data, overlooking the issue of data sparsity for specific vessels in real-world applications. Particularly when confronting long-tailed distribution characteristics, existing models tend to minimize average error by memorizing high-frequency straight-sailing patterns. Consequently, when rare maneuvering behaviors (such as large-angle turns) occur in testing scenarios, models suffer from distribution shift due to the lack of sufficient feature mapping samples, leading to trajectory divergence. This indicates that end-to-end learning relying solely on AIS data exhibits a significant robustness bottleneck in scenarios lacking the support of massive datasets.
While existing deep learning models have enhanced prediction performance, relying solely on AIS data (position, speed, course) presents inherent limitations. AIS data is characterized by low update frequencies (typically ranging from seconds to minutes) and is highly susceptible to signal packet loss and noise interference. To mitigate this issue, some scholars have explored multi-source data fusion to construct vessel trajectory prediction models. For instance, Murray and Huang et al. [
24,
25] incorporated external factors such as meteorological and hydrological conditions, as well as interactive trajectories of neighboring vessels, to enrich input features for auxiliary prediction. Zhang et al. [
26] attempted to introduce environmental data (wind, waves, currents) to correct prediction results, aiming to improve accuracy through environmental constraints within the model. Lin et al. [
27] utilized visual imagery and radar data to enhance perception of the surrounding environment and assist in determining vessel position. However, the aforementioned multi-source fusion methods predominantly focus on traffic flow prediction in macro-scale waters or rely heavily on interactive information from neighboring vessels. In practical navigation, the primary concern for a vessel is the safety of its own motion state. Particularly in extreme areas where satellite signals are subject to interference, not only may the own vessel’s high-precision positioning signals be lost, but obtaining position information of surrounding vessels also faces significant difficulties [
28,
29]. This exposes prediction models relying on global spatiotemporal dependencies or neighbor interactions to the risk of failure in practical applications. Therefore, research on independent trajectory prediction focused on the local scale of the own vessel, decoupled from excessive reliance on external environmental information, holds significant engineering significance [
30].
Furthermore, research addressing the impact of vessel body attitude—specifically roll, pitch, and high-frequency acceleration—on trajectory prediction remains relatively scarce. In the fields of autonomous driving and robotics, the Inertial Measurement Unit (IMU) has been proven to significantly enhance the robustness of localization and prediction, especially when GPS signals are limited or vehicles undergo highly dynamic maneuvers [
31,
32,
33]. In the maritime domain, IMU data is typically restricted to stability monitoring, and its application value in trajectory prediction has not yet been fully exploited. Crucially, the high-frequency dynamic features provided by the IMU can physically compensate for the kinematic lag of AIS data, providing the model with more direct perception of maneuvering intentions. Consequently, we propose a multi-source data fusion model integrating AIS and IMU data to enhance vessel trajectory prediction capabilities.
In summary, existing studies have predominantly concentrated on improving deep learning network structures or fusing external environmental information to boost trajectory prediction performance, while largely overlooking the dynamic trend information embedded in the vessel’s own high-frequency attitude data—information that can often anticipate vessel maneuvering intentions. To address this problem, this paper constructs a vessel trajectory prediction framework tailored for engineering scenarios characterized by small samples and long-tailed distributions, by fusing high-frequency IMU data with AIS data. This approach aims to enhance the prediction stability and reliability of the model under complex maneuvering conditions.
3. Methodology
To address the challenges of long-tailed distributions and small-sample constraints prevalent in practical engineering scenarios, a Physics-Aware Multimodal Fusion Framework is proposed. This framework comprises three integral components: data preprocessing, a multimodal deep prediction network, and engineering-constrained post-processing. AIS data primarily provides kinematic observations based on position and speed, which inevitably suffer from kinematic lag during the maneuver initiation phase. In contrast, the angular velocity and linear acceleration collected by the IMU more directly reflect variations in the vessel’s attitude and force states. Leveraging these complementary characteristics, a multimodal feature fusion mechanism is incorporated into the model design. This mechanism enhances the perception of maneuvering intention, laying a foundation for improving trajectory prediction robustness during both the initial maneuvering stage and over long prediction horizons. The overall fusion framework is illustrated in
Figure 1. It consists of three main components: a data preprocessing module, a multimodal deep prediction network, and an engineering-constrained post-processing module.
Data Preprocessing Module: To address the issues of noise interference and mixed operating conditions inherent in raw AIS and IMU data collected from real-world trials, preprocessing subject to physical consistency constraints is first applied to the sensor data. Considering that vessels in anchoring or ultra-low speed drifting states exhibit a high ratio of random noise in their AIS position and attitude information, and that such data lacks distinct maneuvering behavioral features in a dynamic sense, direct utilization for model training would likely interfere with the learning of valid navigation states. Therefore, a kinetic energy threshold filtering mechanism based on vessel speed is constructed. Trajectory segments below a preset speed threshold are excluded, effectively removing low-information samples such as anchoring and low-speed drifting, ensuring that the training data primarily covers navigation conditions with definitive motion significance. Furthermore, under conditions of small samples and long-tailed distributions, relying directly on training data statistics for normalization can easily lead to feature scale instability due to fluctuations in sample composition. To mitigate this, an offline parameter locking strategy is introduced. By incorporating statistical features from typical vessel navigation states, normalization parameters are pre-fixed. This prevents the introduction of additional bias caused by data distribution shifts between training and inference phases, providing stable data input conditions for subsequent model learning.
Multimodal Deep Prediction Network: upon completion of data preprocessing, we construct a multimodal deep learning prediction model fusing AIS and IMU information to model and predict future vessel trajectories. This model is primarily composed of three key sub-modules: modal feature encoding, feature fusion, and temporal modeling. First, AIS kinematic features and IMU dynamic features are encoded separately. Subsequently, given that IMU data can directly reflect changes in vessel attitude and force status—changes that typically precede significant displacements in the positional trajectory—it aids the model in capturing vessel maneuvering trends early during the initial stages of turning or speed variations. Consequently, inertial features are fused with AIS kinematic information at the feature level to form a unified multimodal historical state sequence. Finally, the fused historical feature sequence is processed by the temporal modeling network to extract implicit motion pattern representations, which are then utilized for the prediction of future trajectories. In light of the issue where steady-state straight samples dominate actual navigation data while complex maneuvering samples remain scarce, a dynamic sample weighting mechanism is introduced during model training. This mechanism adjusts the weight of each sample in the loss function according to its maneuvering intensity. This approach enables the model to prioritize the learning of complex maneuvering behaviors while ensuring overall prediction stability, thereby effectively mitigating the adverse effects of the long-tailed distribution on model performance.
Engineering-Constrained Post-processing Module: To address the potential problem of high-frequency jitter in the normalized predicted trajectories output by the deep learning model, an inertial smoothing post-processing module is introduced during the inference phase to further refine the prediction results. Based on the inertial characteristics of vessel motion, this module performs smoothing on the predicted trajectory sequence to suppress non-physical high-frequency oscillations caused by model errors or cumulative effects. Through inertial smoothing, the predicted trajectory maintains consistency with the overall trend while exhibiting smoother and more continuous temporal evolution, thereby contributing to enhanced stability and usability of the prediction results in practical engineering applications.
3.1. Problem Definition
Vessel trajectory prediction is fundamentally formulated as a spatiotemporal sequence regression problem. Given the AIS kinematic sequences and IMU dynamic sequences within a historical observation time window (
), the objective is to map these inputs to a sequence of vessel positions (
) over future time steps (
). Formally, the vessel state vector at time step
is defined as:
At time step , the vessel position is denoted by (Lat, Lon), and the course information is encoded as (sin (COG), cos (COG)). The inertial measurements consist of linear acceleration and angular velocity , while the vessel attitude is represented by (Roll, Pitch, Heading).
Based on these features, the vessel state at time step
is defined as a vector
This state vector is composed of normalized AIS trajectory features (position and speed), time-interval features, and inertial sensor features, including acceleration, angular velocity, and attitude angles. The detailed physical meaning of each feature dimension and its corresponding data source are summarized in
Table 1.
Given a historical observation sequence:
The objective is to predict the future trajectory sequence:
where
denotes the relative position offset with respect to the current time step, and
represents the prediction horizon.
3.2. Data Preprocessing
In practical engineering environments, raw AIS and IMU data collected from real vessels often contain a substantial number of non-navigational samples, such as anchoring, berthing, or low-speed drifting. While these samples may occupy a large proportion of the temporal duration, their motion is primarily dominated by environmental disturbances or random noise, lacking clear maneuvering inputs and dynamic response characteristics. Indiscriminate use of such data for model training can interfere with the representation learning of genuine navigation and maneuvering behaviors, thereby weakening the model’s sensitivity to dynamic changes during the maneuver initiation phase. To address this, based on the fundamental characteristics of vessel maneuvering motion, we introduce a kinetic energy threshold filtering strategy based on vessel speed to screen the raw trajectory data. Under ultra-low speed conditions, rudder effectiveness significantly diminishes, and changes in position and attitude are driven more by external disturbances (wind, waves, currents) than by control inputs, rendering such trajectory segments of limited value for maneuvering modeling. Existing studies typically employ low-speed thresholds to identify and exclude stationary or anchoring states; for instance, Wijaya et al. [
34] utilized a threshold of approximately 0.5 kn to distinguish anchoring from navigation, while Cerderio et al. [
35] similarly adopted a condition below 0.5 kn to construct mooring and anchoring datasets. Building on this, and combining the speed distribution characteristics of our experimental data with engineering experience, we set the effective speed threshold
as 2.0 kn, retaining only trajectory segments satisfying
for training. This threshold selection follows specific engineering considerations: for conventional merchant vessels, maneuvering response becomes unstable when speed falls below approximately 2.0 kn, where rudder effectiveness and propulsion efficiency drop significantly, making it difficult to form continuous, identifiable maneuvering patterns. Conversely, above this threshold, vessel motion is progressively dominated by control inputs, enhancing the value of its dynamic features for modeling. Therefore, this kinetic energy threshold strategy effectively eliminates noise from anchoring and low-speed drifting while maximizing the retention of navigation and maneuvering samples with clear dynamic features, thereby improving the Signal-to-Noise Ratio (SNR) and physical validity of the training data.
Vessel navigation data in practical engineering scenarios is characterized by sample sparsity and a significant long-tailed distribution. Under these conditions, directly adopting online normalization methods based on training set statistics is prone to diluting the feature scale of maneuvering samples due to the dominance of straight-line samples, which can subsequently trigger distribution shift problems during the testing phase. To address the issue where online normalization tends to fail under small-sample and long-tailed conditions, we further propose a Domain-Prior-Based Parameter Locking Strategy to replace the reliance on training data statistics. This strategy aims not to fit the empirical distribution of the training set, but to pre-set normalization parameters for key dynamic features based on the physical boundaries of vessel motion, thereby ensuring the stability and consistency of the normalization process across different data scales and distributions. Specifically, for the speed feature in the state vector (), we set the standard deviation kn. This value is not derived from training data statistics but is determined based on the navigation characteristics of merchant vessels and engineering experience: during normal navigation and common speed-changing maneuvers, speed variations are typically concentrated within a range of a few knots, while extreme high speeds or rapid acceleration/deceleration are rare in practice. Setting kn covers speed fluctuations in the vast majority of normal navigation and maneuvering states, while avoiding the compression of normalization scales caused by outliers or the dominance of straight-line samples. For linear acceleration features, we set the standard deviation m/s2. This value is consistent with the magnitude of dynamic limits achievable by vessels during actual maneuvering. Due to the large mass and inertia of vessels, their longitudinal and lateral accelerations are typically far smaller than those of road vehicles or UAVs; excessive acceleration values are physically unattainable. By limiting m/s2 to a reasonable physical magnitude range, we effectively suppress the numerical amplification effects introduced by sensor noise or a minimal number of anomalous maneuvering samples. Through this domain-prior-based parameter locking strategy, the normalization process is no longer dependent on the specific distribution shape of the training samples but is explicitly constrained by reasonable vessel dynamic boundaries. This significantly reduces the risk of statistical instability and distribution shift under small-sample and long-tailed distribution conditions.
A further point of discussion pertains to the sensitivity of the aforementioned domain-prior parameters and the engineering generalizability of the model. The kinetic energy filtering threshold (2.0 kn) and the physical prior variance established in this study are fundamentally coupled with the mass, inertia, and maneuverability indices (e.g., the K and T indices in the Nomoto model) of the specific experimental vessel. For other vessel types exhibiting significant disparities in displacement and hydrodynamic characteristics (e.g., Very Large Crude Carriers, VLCCs), the direct application of these specific values may induce parameter mismatch, subsequently leading to state misclassification during low-speed maneuvers. Nevertheless, the proposed multimodal fusion architecture and the domain-prior-based parameter locking strategy inherently possess broad engineering applicability. When extrapolating to vessels of varying tonnages or speed classes, redesigning the deep learning network architecture is unnecessary. Instead, it merely requires a one-time sensitivity calibration of these physical anchor parameters based on the target vessel’s maximum design speed and fundamental turning test data.
3.3. Temporal Feature Extraction Network
In
Section 3.1, the vessel trajectory prediction problem is formalized as a sequence-to-sequence mapping process: Given the historical state sequence
obtained from the fusion of AIS and IMU data:
The state vector
at each time step contains the kinematic and dynamic features of the vessel, the objective is to predict the vessel trajectory
Y within the future prediction horizon. Centering on this problem definition, a temporal feature encoder (corresponding to the Temporal Backbone module in
Figure 1) is introduced into the model structure. This module is designed to model the fused historical multimodal observation sequence and extract its latent temporal dependencies and motion pattern representations.
As a key component of the entire prediction model, this encoder receives the fused feature sequence
defined in
Section 3.1 as input and maps it to an implicit state representation through a sequence modeling network to characterize the overall motion trend and maneuvering state of the vessel at the current moment. This implicit representation is then fed into the prediction module to generate regression results for future trajectories. To evaluate the actual contribution of the proposed AIS-IMU multimodal fusion mechanism in improving the accuracy and stability of vessel trajectory prediction under different sequence modeling assumptions, this paper uses two representative deep learning architectures to instantiate temporal encoding layers as the backbone network of the prediction model under a unified input-output interface:
(1) LSTM-based Temporal Encoding Network: This architecture leverages its gating mechanisms (Forget, Input, and Output Gates) to simulate the inertial retention characteristics of physical systems. LSTM explicitly transmits historical cumulative information through hidden states, naturally aligning with the continuity of vessel motion. It is well-suited for processing variable-length sequences and exhibits high training stability under small-sample conditions [
36].
(2) Transformer-based Temporal Encoding Network: This architecture utilizes multi-head self-attention mechanisms to capture global spatiotemporal dependencies. It models correlations between different time steps in the historical sequence in parallel, thereby capturing global dependencies over longer time spans. This characteristic offers potential advantages when dealing with long historical windows or complex temporal relationships [
37].
(3) To distinguish the impact of data fusion from model architecture, we selected these sequence modeling architectures, which have been widely validated in vessel trajectory prediction tasks, as backbones. By performing unified temporal modeling on the AIS-IMU fused feature sequences, we assess the impact of IMU information on prediction accuracy and stability, minimizing interference from structural differences in the models.
3.4. Dynamic Maneuver-Aware Loss
In the task of vessel trajectory prediction, the contribution of individual training samples to the model’s learning objective is non-equivalent. In steady-state straight sailing scenarios, vessel motion patterns are relatively simple and dominated by inertial translation, resulting in low prediction complexity. In contrast, under maneuvering conditions such as turning, yawing, or speed variation, vessel motion exhibits distinct non-linear characteristics, imposing higher demands on the model’s capabilities for temporal modeling and dynamic understanding. However, in real-world engineering datasets, steady-state straight samples typically constitute the vast majority, whereas high-dynamic maneuvering samples exhibit a pronounced long-tailed distribution. Relying solely on the conventional Mean Squared Error (MSE) as the training objective causes parameter updates to be dominated by the multitude of simple samples, leading to insufficient attention to maneuvering behaviors that are critical for navigational safety and decision-making.
To address this, we propose a Dynamic Maneuver-Aware Loss Function. The core philosophy is to adaptively adjust the gradient contribution of training samples based on their maneuvering intensity, without altering the regression target. By explicitly differentiating between steady navigation and high-dynamic maneuvering samples, this loss function guides the model to pay more attention to maneuvering samples with complex trajectory shapes and high prediction difficulty during the training process. Consequently, this effectively mitigates the training bias induced by the long-tailed distribution, ensuring that the model captures critical dynamic behaviors.
Therefore, we introduced a dynamic sample weighting mechanism based on trajectory curvature during the training phase, as illustrated in
Figure 2, the “maneuvering intensity” indicator
of sample
is defined as the cumulative heading change in the vessel within the predicted horizon. For the future trajectory sequence
of the i-th sample, calculate the instantaneous heading angle
for each step:
Furthermore, the dynamic gradient weight
of the sample is calculated using the following formula:
Among them,
represents the minimum angle difference operation for handling periodic angle jumps (such as
). The larger the
, the more curved the vessel’s path and the stronger its maneuverability. Based on this, the dynamic gradient weight
is designed as follows:
where
denotes the maximum gain coefficient (configured to yield a maximum weight of 5.0), and
represents the sensitivity coefficient. The hyperbolic tangent function (
) is employed to smoothly map the weights onto the interval
, thereby effectively preventing training instability induced by extreme outliers. Consequently, the final total loss function is formulated as:
where
denotes the training batch size, while
and
represent the predicted trajectory sequence and the corresponding ground truth trajectory sequence for the i-th sample, respectively. Through this mechanism, the model effectively amplifies the relative weight of high-dynamic maneuvering samples during parameter updates, significantly enhancing the precision in capturing non-linear maneuvering behaviors.
In this section, the selection of values for and is primarily governed by constraints regarding gradient stability and engineering controllability. Specifically, serves to cap the maximum amplification ratio of high-maneuver samples during parameter updates, preventing a minority of extreme outliers from dominating the training process; whereas modulates the response interval of the weight function to variations in maneuvering intensity, ensuring a smooth and continuous transition of weights from steady-state navigation to high-dynamic maneuvering.
The aforementioned weight allocation mechanism, which calculates the cumulative heading change based on future ground-truth trajectories, is a strictly offline training mechanism. During the model training phase, this mechanism utilizes known future ground-truth data as a modulator for the supervisory signal, compelling the network to learn and memorize complex non-linear maneuvering features. Conversely, during the model deployment and online inference phases, the prediction process relies exclusively on historical observation sequences (AIS and IMU inputs) without any dependence on future information. This design effectively enhances the model’s sensitivity to maneuvering intentions without increasing the computational burden of online inference. Furthermore, this weight calculation formula based on future ground-truth trajectories may introduce potential bias, as it is highly dependent on the quality of the ground-truth data. If the raw AIS or GNSS data exhibits severe positioning drift or high-frequency noise in certain straight-sailing segments, the formula might misclassify them as high-intensity maneuvers and assign unreasonably high weights. It is precisely to address this issue that this paper introduces the saturation characteristics of the tanh function alongside a maximum weight upper bound . This implements a physical truncation of such abnormally high weights at the algorithmic level, thereby suppressing the risk of noise amplification. Despite this potential bias, in practical engineering applications, this offline weighting strategy—which trades the sacrifice of a negligible minority of anomalous noise conditions for a substantial improvement in overall maneuvering prediction accuracy—is highly rational.
3.5. Horizon-Adaptive Scenario Segmentation
In the performance assessment of vessel trajectory prediction models, standard practice involves categorizing samples into distinct motion scenarios—such as straight sailing and turning—based on the magnitude of heading change within the prediction horizon, followed by a separate statistical analysis of prediction errors. However, existing studies predominantly employ a fixed heading threshold (e.g., 10°) for scenario classification, failing to explicitly account for the impact of the prediction horizon length on the maneuver determination scale.
In reality, as dynamic entities characterized by significant inertia, the process of vessel heading change exhibits a pronounced time-scale dependency: within a short prediction horizon, even a minor heading variation may correspond to high-frequency, rapid maneuvering behaviors; conversely, over a longer prediction horizon, an equivalent magnitude of heading change often signifies merely a slow, gradual course adjustment. Adopting a unified fixed threshold for scenario classification is prone to misclassifying genuine maneuvers as straight sailing in short-term predictions, or misinterpreting slow turns as straight conditions in long-term predictions, thereby diminishing the discriminative power of the evaluation results regarding the model’s maneuvering prediction capability. To comprehensively assess model performance across different time scales, this paper proposes a Horizon-Adaptive Scenario Segmentation Strategy. This strategy dynamically adjusts the turning determination threshold according to the prediction horizon length, aligning the scenario classification scale with the inherent time scale of the prediction task. For a given prediction horizon
(in seconds), the heading angle threshold
for determining whether a sample constitutes a turning condition is defined as:
In this formulation, the turning determination threshold decreases linearly as the prediction horizon shortens, with a lower bound of explicitly imposed to filter out sensor background noise. This dynamic segmentation strategy ensures that the evaluation metrics precisely capture valid maneuvering behaviors across varying time scales. Consequently, it effectively prevents short-term minor fluctuations from being misclassified as turns, while simultaneously precluding the misidentification of long-term gradual turns as straight sailing conditions.
3.6. Post-Processing Mechanism
While deep learning models excel at capturing the non-linear mapping relationships between historical observations and future trajectories, their raw outputs often exhibit physical inconsistencies when applied in engineering contexts. Specifically, subject to training data noise, normalization errors, and the intrinsic regression characteristics of the model, prediction results frequently suffer from local high-frequency jitter or abrupt curvature changes. Although these discontinuous or non-smooth trajectory artifacts may be negligible in terms of numerical error metrics, they often lack explicit physical feasibility in the context of actual vessel motion and autonomous collision avoidance decision-making, thereby compromising the engineering usability and safety reliability of the prediction results.
From the perspective of vessel maneuvering hydrodynamics, a vessel constitutes a large inertia system. Its evolution in position and heading inherently possesses significant temporal continuity and curvature smoothness; rapid mutations in speed or course are physically impossible within short time intervals. To correct the non-physical jitter and drift in the model output that violate this physical law, the domain of classical trajectory processing conventionally relies on the Extended Kalman Filter (EKF) and its derivative algorithms [
38], alongside data assimilation and smoothing techniques based on Back and Forth Nudging [
39,
40]. These methods excel in short-term state estimation and smoothing. Serving as a complement to the long-term prediction results of deep learning, imposing moderate physical constraints on predicted trajectories—without introducing external control inputs—effectively enhances their consistency with actual vessel motion laws. Guided by these considerations, as illustrated in
Figure 3, this paper introduces an inertially constrained post-processing smoothing mechanism during the inference phase. This mechanism is designed to suppress non-physical high-frequency noise generated by the deep network, thereby augmenting the usability and stability of the predicted trajectories in practical engineering scenarios.
We employ a sliding window technique (Window Size = 30 s) to perform mean filtering on the predicted coordinate sequence, aiming to suppress high-frequency jitter induced by sensor background noise. The formulation is expressed as:
where
denotes the size of the sliding window (set to 30 in this experiment), and
represents the raw predicted coordinate. This procedure effectively eliminates quantization noise arising from the discretization of AIS data, rendering the generated trajectory more consistent with vessel kinematic characteristics.
To ensure absolute fairness in model evaluation, the aforementioned smoothing post-processing step is uniformly applied to all physics baseline models and deep learning models (including both single-modal and multimodal architectures) across all comparative experiments in this study. Regarding its impact on evaluation metrics, the primary function of this smoothing step is to suppress non-physical high-frequency oscillations within the predicted trajectories. Consequently, its influence on the whole-process Average Displacement Error (ADE) and Final Displacement Error (FDE) is relatively marginal, as it does not alter the macroscopic evolution direction or the long-term trend of the trajectory. In other words, this filtering effect serves merely as a physical safeguard for trajectory continuity; it cannot fundamentally rectify long-term trajectory divergence arising from the model’s inadequate early maneuver perception capability. The decoupling and quantification of the respective contributions to performance enhancement from the deep network’s multimodal fusion mechanism and the post-processing filtering effect will be comparatively discussed in the subsequent cross-ablation experiments (detailed in
Section 5.2).
4. Experimental Description
To comprehensively evaluate the effectiveness of the proposed framework in practical engineering scenarios—particularly its robustness under conditions of data sparsity and large-angle turning maneuvers—comparative experiments were conducted utilizing data collected from real-vessel sea trials. This section details the construction of the experimental dataset, the configuration of baseline models, and the specific evaluation metrics employed.
4.1. Experimental Platform and Data Acquisition
The data acquisition for this study relies on real-vessel sea trials. The experimental environments encompass a variety of typical operating conditions, ranging from open-water cruising to inland river navigation in the Beijing–Hangzhou Grand Canal. A Fiber-Optic Gyroscope Inertial Navigation System (FOG-INS) was employed for the experiments. This system is capable of outputting raw IMU data at a frequency of 100 Hz and providing integrated navigation parameter reference values. Detailed technical specifications of the equipment are presented in
Table 2. Regarding data processing, a post-processing approach based on real-time acquisition mode was adopted.
To validate the model’s robustness under small-sample and long-tailed distribution conditions, we performed a quantitative statistical analysis on the collected real-ship data. After applying the kinetic threshold filtering (<2.0 kn), the final dataset comprises a total effective navigation duration of approximately 6.0 h, yielding 21,697 continuous trajectory sequences using the sliding window approach. The statistical results indicate an extreme long-tailed distribution characteristic: steady-state straight-sailing samples (with a cumulative heading change of less than 10°) heavily dominate the dataset, accounting for 80.3%, whereas dynamic maneuvering samples account for merely 19.7%.
Furthermore, instead of a conventional random shuffle, we adopted a strict chronological splitting strategy. The earlier continuous voyages were used as the training set (accounting for approximately 90.5%), while the final trajectory segments were held out entirely as the test set (accounting for 9.5%). This chronological split ensures no future information leakage and naturally introduces a “Distribution Shift.” Because the test set contains specific complex maneuvers that are under-represented in the training phase, this data splitting strategy provides a rigorous engineering benchmark for evaluating the effectiveness of our dynamic maneuver-aware loss and multimodal fusion mechanism.
4.2. Baseline Models and Comparative Experimental Setup
To precisely quantify the contribution of the Inertial Measurement Unit (IMU) to trajectory prediction and validate its effectiveness in enhancing accuracy during non-linear maneuvers, a controlled variable experiment was designed. To ensure the fairness of comparison, all models described below (including both single-modal and multimodal fusion models) are trained and tested based on the unified data preprocessing pipeline described in
Section 3.2, sharing identical kinetic energy filtering thresholds and offline parameter locking normalization parameters.
(1) Linear Extrapolation Model (Physics Baseline): A physics-based model relying on the instantaneous motion state. This model utilizes the average velocity and heading vectors within a sliding window (past 10 s) to perform tangential prediction. It incorporates no data-driven non-linear modeling capabilities. This baseline serves to characterize the baseline error level achievable in straight and turning scenarios when relying solely on local kinematic information. It is worth noting that although methods like the Extended Kalman Filter (EKF) exhibit excellent performance in state estimation tasks, their primary objective lies in current state filtering rather than long-term future trajectory prediction. Given that this study focuses on the capability of data-driven models to model motion trends over long prediction horizons, the linear extrapolation model is adopted as the representative lower bound for physics-based methods.
(2) Single-modal Ablation Group: This group is designed to evaluate the prediction capability of models relying exclusively on AIS kinematic information. They maintain an identical backbone network architecture, loss function weights, and parameter configurations to the proposed fusion models. The sole distinction lies in the removal of the IMU dynamic feature branch at the input layer. Specifically, this group includes: Transformer (No-IMU): A self-attention model based solely on AIS position, speed, and heading features. It is used to assess the modeling capability of the attention architecture for complex maneuvering scenarios under high-quality preprocessing conditions; LSTM (No-IMU): A recursive model based solely on AIS inputs. As a classical time-series prediction benchmark, it is used to analyze the error accumulation characteristics of recursive structures in long-term prediction when dynamic constraints are absent.
(3) Multimodal Fusion Models: Building upon the aforementioned single-modal models, this group incorporates dynamic features such as acceleration and angular velocity provided by the IMU. These models are used to evaluate whether fusing inertial information can enhance the model’s perception of vessel maneuvering changes and improve trajectory prediction stability and precision under identical data quality and model structure conditions. Specifically, this group includes: Transformer (Full): An attention model fusing AIS and IMU features; LSTM (Full): A recursive model fusing AIS and IMU features.
Through this multi-level comparative experimental design, we systematically analyze the impact of different model structures and input modalities on vessel trajectory prediction performance within a unified experimental framework. It is important to emphasize that the comparative design in this study does not seek to maximize the performance of a single model in isolation, but rather, through strict variable control, to evaluate the specific impact of introducing IMU dynamic information on prediction stability and maneuver perception capability under practical engineering constraints.
4.3. Evaluation Metrics
To quantitatively evaluate the prediction performance under different prediction horizons, the Average Displacement Error (ADE) and Final Displacement Error (FDE) are adopted as the primary evaluation metrics. Both metrics are ultimately reported in meters. As the original data are represented in geographic coordinates (latitude and longitude), the Haversine great-circle distance is employed to eliminate projection distortions induced by the Earth’s curvature. Specifically, the distance computation consists of two steps. First, the great-circle distance is calculated in nautical miles, followed by a unit conversion to meters. For a predicted position
and the corresponding ground-truth position
the spherical distance
(in nautical miles) between the two points is computed by converting the latitude and longitude from degrees to radians as:
where
and
denote the latitude and longitude expressed in radians, respectively, and
represents the Earth’s radius in nautical miles. The obtained distance is then converted into physical distance (meters) using the internationally standardized conversion factor:
ADE quantifies the average trajectory fitting accuracy of the model over the entire prediction horizon, characterizing the model’s capability to capture the overall vessel motion trend; whereas FDE evaluates the positional deviation at the final prediction timestamp
(e.g.,
) primarily highlighting the cumulative error level in long-term predictions:
where
denotes the total number of samples in the test set. This evaluation framework not only eliminates geometric distortion induced by geographic projection but also strictly adheres to the “nautical mile-to-meter” metric conversion standards prevalent in maritime engineering, thereby ensuring the engineering applicability of the experimental results. Furthermore, to investigate the model’s robustness under non-linear maneuvering conditions, we partitioned the test set into two subsets—steady-state straight sailing and dynamic turning—based on the adaptive threshold
defined in
Section 3.5, for separate evaluation. This scenario-segmented evaluation strategy effectively prevents the dominating influence of straight-line samples from masking the model’s true performance in critical turning scenarios.
6. Conclusions
To address the issue of insufficient accuracy in vessel trajectory prediction under sparse data conditions, this paper proposes a multimodal deep learning prediction framework fusing AIS and IMU information, and conducts systematic experimental validation based on real-vessel data. The following conclusions are drawn: (1) By employing offline parameter locking based on domain priors and weighted loss training oriented towards maneuvering samples, the problem of model divergence under small-sample conditions is successfully resolved, achieving robust trajectory prediction performance. (2) Vessel trajectory prediction relying solely on AIS kinematic information suffers from an inevitable physical blind zone during the maneuver initiation phase. This issue stems from the lag in kinematic observation rather than algorithmic deficiencies. The high-frequency dynamic information provided by the IMU significantly enhances the model’s capability to perceive early maneuvering intentions, thereby effectively mitigating the prediction lag phenomenon. (3) Multimodal fusion not only bridges this physical blind zone but also significantly enhances the shape fidelity of the trajectory in 180 s long-term predictions by reducing the Average Displacement Error (ADE). It achieves a long-term robustness superior to the single-modal AIS model by 23.3% and the physics baseline by 46.2%. The research results indicate that in safety-critical scenarios for practical marine engineering applications, the IMU should not be regarded as an optional auxiliary sensor, but as a core component of the vessel trajectory prediction system.
Furthermore, although this study primarily focuses on the micro-level task of ship trajectory prediction, its practical engineering value extends significantly to macro-level maritime operational analyses. As demonstrated by recent studies on maritime operations (such as the demurrage pattern analysis by Kweon et al. [
9]), AIS-based motion analysis is crucial for identifying issues such as delay propagation, berth congestion, and vessel underutilization. By overcoming kinematic lag and accurately predicting complex maneuvering intentions over extended temporal horizons, our proposed multimodal fusion framework can directly support these downstream operational decisions. Ultimately, the enhanced predictive performance not only facilitates immediate collision avoidance but also contributes to broader operational applications, including berth allocation optimization, congestion mitigation, and demurrage risk management.
Future work will further systematically verify the universality and applicability boundaries of the conclusions through data experiments expanded to multiple vessel types, operating conditions, and navigation environments. Concurrently, we will explore the introduction of attention mechanisms to enhance the adaptive utilization of IMU features, and combine transfer learning and few-shot learning methods to further reduce the model’s dependence on large-scale labeled data.