3.2. Linear Networks with Time-Feature Decomposition
Due to the challenges described in the
Section 1, a large portion of samples in the AIS ship trajectory dataset are random and unpredictable. Therefore, it is hard to effectively predict ship trajectories based on AIS signals using conventional long-term sequence prediction models. In our experiments, the Autoformer, Informer, and transformer models all performed poorly in predicting AIS trajectories.
In contrast, the DLinear model [
10] is a linear model specifically designed for long-term time series prediction, challenging the effectiveness of transformer models in long-term time series prediction tasks. The DLinear model is more suitable than other models for large-scale ship trajectory prediction because it has a linear structure and thus is capable of capturing linear relationships. It also incorporates deep feature representation to extract high-level features and exhibits long-term prediction ability as well as good generalization capability.
The core idea behind linear networks with time-feature decomposition is directly regressing historical time series data to predict future time series. This differs from traditional methods such as the sliding windows and ARIMA methods, which treat time series data as random processes and require multiple iterations to obtain useful prediction results.
The proposed model is based on decomposing time features and motion features using the look-back window, and it is applicable in long-term ship prediction in wider sea areas. The look-back window refers to a data window that looks back a certain specific time duration from the current moment when predicting ship trajectories. Through the look-back window, we can obtain historical trajectory information of ships over a period of time. The selection of this time window depends on the requirements of the prediction task, and the appropriate window size can be set according to specific circumstances. Using the look-back window, we can decompose time features and motion features. Time features refer to time-related information such as hours and weeks. These features can be used to capture the periodicity and trend of time factors affecting ship behavior. Motion features describe the ship’s motion behavior, such as speed, acceleration, steering angle, etc., within the look-back window. By decomposing time features and motion features, we can model and predict the dynamic changes in ship behavior.
Furthermore, the look-back window provides a continuous data stream that enables models to better capture the time series relationship of ship trajectories. Ship behavior often exhibits time correlations, where past and future behaviors may have certain associations and regularities. By leveraging the look-back window, models can learn time series patterns and trends, which contributes to more accurate predictions of future ship behavior.
Ship trajectory prediction tasks require considering various factors, such as time series properties, historical behavior, and environmental factors. Using the look-back window and decomposition strategy allows us to obtain information more comprehensively and perform modeling and prediction.
When dealing with AIS data, the DLinear model decomposes the original data into trend components and remainder (temporal) components using a moving average kernel. It applies a linear layer to each of these components separately and then combines their features to obtain the final prediction result. This approach can capture the periodicity and trends in AIS data better than other approaches, thus improving the prediction accuracy. The structure of the basic linear model is shown in
Figure 1.
The DLinear model encompasses three variants: Vanilla Linear, DLinear, and NLinear. Vanilla Linear is the most fundamental version of these three and employs only linear functions for regressing historical time series data. DLinear enhances performance by combining position encoding strategies with linear layers, while NLinear introduces addition and subtraction operations for normalization, enabling the model to better adapt to diverse time series data [
10].
Specifically, the DLinear model transforms historical time series data into vector representations and employs linear layers to regressively predict these vectors. Compared to the deconstruction of Autoformer and Fedformer, DLinear further utilizes certain position encoding strategies to enhance model performance. These position encodings consist of absolute position encodings that combine time steps with absolute positional information and relative position encodings arranged periodically. We can understand the basic structure of the model in
Figure 2.
3.3. Improved Linear Networks with Multiple Feature Processing Capabilities
The proposed model is used to learn the patterns of individual ship trajectories. By analyzing the motion data of a single ship, it extracts patterns and features to predict the ship’s future trajectory. This model is highly effective in studying ship movements within a local range, but it is inadequate for handling numerous ship trajectories in a large-scale area.
When there are many ship trajectories in a wide area, individually modeling and predicting each ship becomes extremely difficult. Furthermore, the movement trajectory of a single ship can be influenced by various factors, such as other ships, ocean currents, and wind direction, making the prediction more complex.
We have conducted a reconstruction of the model in order to enhance its training efficiency and improve its ability to learn multiple features. The original model could only extract and learn the trajectory features of one ship at a time, resulting in low training efficiency and limited generalization ability. However, in this experiment, we have employed a method of sequentially concatenating the extracted input features and feeding them into the model.
For individual trajectory inputs, the approach remains consistent with the previously mentioned model methods. The key lies in concatenating the extracted features and uniformly inputting them into the model for learning. Through this approach, the information of multiple ships is integrated into a single input sample, enabling the model to simultaneously learn patterns and features from multiple ship trajectories and capture more comprehensive and diverse ship behaviors and relationships. As a result, the performance of the model is significantly enhanced. With the reconstructed model, we are able to train the model more efficiently and improve its generalization ability, thus extracting and learning a wider range of ship features.
This improvement significantly enhanced the training efficiency of the model. The current linear networks with a time-feature decomposition model can handle a larger amount of data simultaneously than the previous model, which can learn only one trajectory at a time. The improved linear networks with a time-feature decomposition model can effectively leverage the correlations and shared feature information among different trajectories during the learning process.
The proposed model integrates multiple ship trajectories to learn patterns and features, enabling the prediction of future trajectories for individual ships based on analysis of their motion data. It is designed to adapt to large-scale and long-duration marine environments that are complex and constantly changing. Although there is some randomness in the short-term trajectories of vessels, overall trends can still be clearly observed. Training the model on tens of thousands of vessel trajectories enhances its understanding of vessel motion and captures universal patterns. This innovative approach endows linear networks with a time-feature decomposition model with improved generalizability, enabling vessel motion trends to be accurately predicted in extensive and prolonged scenarios. This approach also provides strong support for applications such as marine environment monitoring and maritime safety.
Through this enhancement, we can train linear networks with a time-feature decomposition model faster, while maintaining accuracy, improving the overall training efficiency. This is crucial for processing large-scale AIS data and for real-time predictions, providing better support for shipping operations and underwater research needs. We can see that the improvement of the model structure is shown in
Figure 3.
In NLinear, addition and subtraction operations are introduced for normalization. Specifically, NLinear divides historical time series data into multiple regions and calculates an average value for addition and subtraction in each region. These averaged values serve as normalization factors to better adapt the model to various time series data. In addition, to improve performance in long-term prediction problems with data distribution shifts, the NLinear model adopts a novel normalization method. It subtracts the last value of the sequence from the input, processes it through linear layers, and then adds back the previously subtracted portion before making the final prediction, completing a simple normalization of the input sequence. This subtraction and addition process scales and shifts the input sequence, effectively eliminating distribution shifts in the sequence.
The linear networks with the time-feature decomposition model exhibit superior performance to the NLinear model in long-term prediction. The proposed model is a machine learning-based approach for time series forecasting that is applicable to the time series prediction tasks of various industries. By incorporating strategies such as time feature advance and positional encoding, linear networks with a time-feature decomposition model can effectively handle long-term time series data. The vector representation transforms time series data into continuous vector forms, enabling the model to better capture the structure and trends of the sequence. Meanwhile, positional encoding assigns specific positional information to each element in the sequence, assisting the model in capturing changes at different time points. With these strategies, the proposed model can effectively handle long-term time series and overcome challenges faced by traditional methods in long-term prediction problems. The model accurately captures long-term dependencies and trends within the sequences, improving prediction accuracy and stability.
In summary, the proposed model is a deep learning-based approach for time series prediction that utilizes time feature advancements and positional encoding strategies to effectively handle long-term time series and achieve efficient forecasting. The proposed model demonstrates superior performance to the NLinear model in long-term prediction. The proposed model is a worthwhile and promising choice for time series prediction problems regardless of the industry. From Algorithm 1, we can see the execution process of the improved linear networks with the time-feature decomposition model.
Algorithm 1 Pseudocode of the improved multi-input multi-output linear networks with time-feature decomposition mode. |
- 1:
Input: A series of multiple sets of ship trajectory sequences , - 2:
represents the t-th time step in the future. - 3:
Outupt: Prediction of trajectories within a specific time step in the future - 4:
Initialization: = 0, = 0, = 0, window_size denotes the length of the sliding - 5:
window. - 6:
For in 0, …, do: - 7:
Initialize temporal and spatial weight features - 8:
Input initial sequence set , window_size - 9:
Window feature = [] - 10:
If channel individual is False: - 11:
num_windows = len() − window_size + 1 - 12:
For to num_windows: - 13:
window = time_series [i: i + window_size] - 14:
Decomposing time features through moving windows - 15:
Decomposing motion features through moving windows - 16:
End For - 17:
Else: - 18:
For sequence in each channel: - 19:
For in 1, …, do: - 20:
num_windows = len() − window_size + 1 - 21:
For to num_windows: - 22:
window = time_series [i: i + window_size] - 23:
Decompose time and motion trends in channels and update network - 24:
layer parameters - 25:
Learning sequence changes over time and motion through moving - 26:
windows - 27:
End for - 28:
End for - 29:
End for - 30:
End If - 31:
End for - 32:
Restructure the obtained features as the input of the improved DLinear model - 33:
Train the DLinear model until the training iterations are finished - 34:
Apply a trained DLinear model to predict the ship trajectories of step in the - 35:
future sequence - 36:
Output: Prediction of trajectories within a specific time step in the future
|
3.4. AIS Data Pre-Processing
Several issues arise when processing and analyzing AIS information, such as missing data and erroneous data. Data cleaning and pre-processing are necessary for several reasons [
18]:
First, AIS data may be incomplete or missing. These problems are often caused by equipment malfunctions, network issues, signal interference, etc. Before analyzing AIS data, the data must be cleaned to ensure their integrity and accuracy. AIS data may also have duplicated data records containing the same vessel information, which can lead to errors or distortions in the data analysis results. Therefore, deduplicating and addressing duplicate data rows is needed. AIS data also suffer from inconsistent time intervals, nonstandard formats, and misclassified vessel types. To facilitate efficient data processing, these issues must be addressed by standardizing and normalizing the data format and using interpolation to ensure consistent data time intervals.
Second, due to the wide range of obtained data and the significant differences between ships, we must filter the ship motion trajectories. We selected the corresponding vessels based on the longitude and latitude ranges within the Gulf of Mexico. To ensure modeling accuracy, we deleted vessels with a length less than 3 m and a width less than 2 m during the data preprocessing stage. We adopted this strategy because small vessels are often more influenced by environmental factors such as ocean currents and waves, making determining their trajectories more difficult and significantly impacting subsequent analysis and modeling. Next, we extracted the MMSI (Maritime Mobile Service Identity) number for each ship on each day and removed isolated data rows, as well as repetitive data with the same MMSI number caused by duplicated data. When multiple data rows of the same ship were present, we sorted them in chronological order to determine the movement trajectory of the ship.
Finally, as tracking the long-term motion of ships in vast waters is a complex process, more features must be added for training. To identify ship features, we extracted turning features based on the difference in COC (course over ground) values between each ship. This enables us to represent the distance and angle at which each ship initiates a turn, considering its current navigational initial speed. Because AIS data come from different time points with different time intervals, these data are asynchronous. To further improve the modeling accuracy, in the data preprocessing stage, we processed the time difference between the previous and next points of the same MMSI and added the resulting time interval feature Δ time as a one-dimensional feature to the model input feature. With this processing method, we can more accurately describe the changes in ship motion status, providing a more reliable data basis for subsequent modeling. In addition, we also calculated and interpolated the longitude, latitude, velocity, heading, and trajectory angle characteristics of each ship’s route trajectory.
After processing the data in the process shown in
Figure 4, we need to input the preprocessed time series into the model for learning. By feeding data into the model, the model can extract valuable information and update model weights by learning the relationships and patterns between the data. The input of a time series is divided into seq_len, pred_len, and label_len. These parameters are used in time series prediction models to describe the length of the time series data and the predicted target.
Table 1 provides a summary of the meaning and significance of the parameters seq_len, pred_len, label_len, and predict_len. These parameters are crucial for describing the time series data lengths, prediction results, and target sequences used for training and evaluation purposes. The partitions of these parameters in the input sequence are shown in
Figure 5.
When referring to various series data, we found that some time series are actually unpredictable. The predictability of a time series generally depends on its nature and trend characteristics. The future trends of relatively stable and regular time series, such as sales revenue or temperature, can often be predicted based on historical data. These time series thus exhibit a certain level of predictability. However, the future trends of irregular and nonlinear time series, such as stock prices in financial markets or traffic congestion indices, are often influenced by multiple complex factors. As a result, these series are difficult to predict using simple models and thus have lower predictability. Additionally, some time series that exhibit obvious temporal and periodic patterns can be more accurately predicted by considering historical data when assessing the current time point. These series thus demonstrate higher predictability.
On the other hand, the prediction of ship AIS trajectories is feasible but not easy, as they exhibit certain regularity and predictability in their behavior. This is because AIS trajectories are influenced by various factors, such as routes, ship speeds, weather conditions, and sea states, which can be controlled and predicted to some extent.
However, in practical applications, AIS trajectories may also exhibit random behavior to some degree. For instance, when ships encounter sudden weather or sea condition anomalies their navigation paths may experience significant disturbances; it is difficult to predict the ship trajectory in this situation.
AIS trajectories under irregular vessel behaviors, such as illegal fishing or theft, may exhibit random and unpredictable characteristics. In this scenario, as shown in
Figure 6, it is difficult to predict the AIS trajectory of ships. Therefore, filtering and cleaning the data before training is necessary for the model to better identify temporal and spatial motion patterns within these irregular trajectories. The AIS trajectories of ships in stable motion in the ocean are often clear and regular, as shown in
Figure 7, which is relatively easy to predict.