Original Research
Frontiers in Future Transportation ·
Volume 7 - 2026 | https://doi.org/10.3389/ffutr.2026.1804269
Detecting CycleGAN-Spoofed AIS data using a GAN fingerprinting method with LSTM-Based classification
- S. M. Ashfaq uz Zaman1
- Faizan Qamar1*corresponding author
- Masnizah Mohd1
- Nur Hanis Sabrina Suhaimi1
- Amith Khandakar2*corresponding author
- 1Center for Cyber Security (CYBER), Faculty of Information Science and Technology, Universiti Kebangsaan Malaysia, Bangi, Selangor, Malaysia
- 2Department of Electrical Engineering, Qatar University, Doha, Qatar
Abstract
The identification of spoofed AIS data is crucial for ensuring secure and dependable maritime navigation, vessel tracking, and surveillance systems. Recent advances in generative modeling, particularly CycleGANs, have made identifying falsified AIS trajectories significantly more difficult as synthetic data can closely replicate the spatiotemporal characteristics of genuine vessel movements. Conventional anomaly detection and supervised learning approaches often fail to generalize to such sophisticated spoofing strategies. This paper presents an LSTM-based fingerprinting framework for robust detection of CycleGAN-generated AIS spoofing. The proposed method learns intrinsic spatiotemporal fingerprints of authentic AIS trajectories by modeling long-term temporal dependencies and vessel motion dynamics, without requiring labeled synthetic data during training. Incoming AIS sequences are classified as real or spoofed by comparing their learned fingerprint representations using a similarity-based decision mechanism. Experimental evaluations conducted on a large dataset comprising real AIS data and CycleGAN-generated synthetic trajectories demonstrate that the proposed approach achieves a precision of 0.95, recall of 0.96, F1-score of 0.955, outperforming state-of-the-art anomaly detection methods including kinematic interpolation, GeoTrackNet, and Transformer-based classifiers. Furthermore, the method exhibits strong generalization to unseen GAN variants, with only a marginal recall degradation from 0.96 to 0.93 and a consistently low false positive rate of 0.02–0.03. These findings demonstrate the effectiveness and robustness of the proposed fingerprinting approach in real-world maritime security scenarios, offering a dependable mechanism for mitigating sophisticated AIS spoofing attacks.
Keywords
1 Introduction
The Automatic Identification System (AIS) is a fundamental technology in maritime security, facilitating real-time tracking of vessel positions, velocities, and headings. AIS data is used for collision avoidance, route management, and monitoring the movements of ships globally. However, AIS data are highly susceptible, particularly through spoofing attacks. In spoofing attacks, malicious actors broadcast deceptive AIS messages that compromise vessel tracking accuracy and may enable illegal operations including unauthorized transits, smuggling, and illicit fishing activities. Traditional AIS detection methods are often ineffective at identifying such manipulated data, especially when advanced techniques like Generative Adversarial Networks (GANs) are used to produce realistic synthetic AIS trajectories. Synthetic AIS signals produced using approaches such as CycleGAN closely imitate real vessel movement patterns, enabling them to bypass traditional detection methods based on spatial and speed-related irregularities.
Numerous studies have attempted to address AIS spoofing by focusing on various statistical or machine learning-based detection techniques. Early methods typically relied on spatial statistics or basic classification algorithms to identify anomalies in vessel trajectories. For example, kinematic models and rule-based detectors have been used to identify large discrepancies in speed or course changes. However, these methods struggle to distinguish between real AIS data and GAN-generated synthetic trajectories, as the latter can accurately replicate the spatiotemporal patterns of real vessel movements. Other machine learning approaches, including LSTM and Transformer-based classifiers, have been developed to analyze vessel trajectories. While these techniques are more advanced, they often overfit to specific patterns of spoofed data and fail to generalize across unseen spoofing strategies, especially those generated by more sophisticated GANs.
The paper presents a novel approach to detect GAN-generated AIS spoofing using a fingerprinting method based on an LSTM-based Deep Neural Network (DNN). Our method leverages the unique temporal dependencies and motion patterns inherent in real vessel trajectories to differentiate between authentic and synthetic data. Specifically, we utilize an LSTM-based DNN to learn the fingerprint of real AIS data, identifying subtle inconsistencies in trajectories generated by CycleGAN models. This paper presents the following main contributions:
- A GAN fingerprinting-based AIS spoofing detection framework that learns intrinsic motion patterns of real vessel trajectories.
- A trajectory-level detection approach capable of identifying sophisticated spoofing attacks generated by generative models such as CycleGAN.
- Construction of a real-world AIS trajectory dataset combined with GAN-generated spoofing samples for evaluating maritime cybersecurity systems.
- Extensive comparison with state-of-the-art AIS anomaly detection methods, demonstrating superior performance in precision, recall, and generalization.
- The proposed method generalizes effectively to spoofing samples produced by unseen GAN architectures, highlighting its robustness for practical maritime security deployment.
In the following sections, we describe the details of our proposed methodology, experimental setup, and results, highlighting the effectiveness of our approach in detecting synthetic AIS trajectories generated by CycleGAN models.
2 Related work
2.1 AIS spoofing and maritime cybersecurity
There is increasing concern in the maritime domain about the security and reliability of the Automatic Identification System (AIS), particularly due to the possibility of AIS spoofing and other forms of data manipulation. AIS spoofing refers to the dissemination of deceptive vessel data, such as identity, position, or trajectory information, thereby degrading maritime situational awareness and safety of navigation. Androjna et al. (2021) documented a notable AIS spoofing incident near Elba in 2019, demonstrating how easily AIS signals can be manipulated to create misleading vessel positions and behaviors (Androjna et al., 2021). Their study highlights the urgent need for robust anomaly detection mechanisms within maritime cybersecurity frameworks.
Several surveys have emphasized the vulnerability of AIS systems and the importance of detection approaches. Wolsing and Zhang (2022) provide a comprehensive review of AIS anomaly detection techniques, covering approaches ranging from statistical outlier detection to modern deep learning models (Wolsing and Zhang, 2022). Their work highlights that rule-based detection methods alone are insufficient and should be complemented by behavior-based methods that analyze vessel motion patterns and operational context.
Beyond AIS specifically, maritime cybersecurity encompasses protection of a wide range of shipboard and port systems, including navigation sensors, communication networks, and operational technology infrastructures. Brandsæter and Knutsen (2018) proposed an online anomaly detection framework for marine operational data that relies on predictive thresholds derived from normal system behavior, demonstrating the feasibility of real-time anomaly monitoring in maritime environments. The above studies collectively highlight the growing importance of cybersecurity and anomaly detection in maritime digital infrastructures.
2.2 Machine learning approaches for AIS anomaly detection
Recent research has progressively adopted machine learning methods for anomaly detection and spoofing identification in AIS data. Pohontu et al. (2025) investigated stochastic kinematic properties of vessel trajectories in the Black Sea and demonstrated that machine learning models can effectively distinguish genuine AIS tracks from simulated spoofed tracks by identifying the absence of realistic navigation errors in fabricated signals (Pohontu and Ionescu, 2025). Their method achieved detection accuracy exceeding 98%.
Similarly, Raj and Kumar (2025) proposed a Bidirectional Long Short-Term Memory (Bi-LSTM) network designed to analyze vessel trajectories and identify potential GPS spoofing points along maritime routes (Raj and Kumar (2025). Their model significantly outperformed traditional rule-based approaches by capturing temporal dependencies in vessel movement patterns.
Deep learning models have also been applied to detect complex AIS anomalies in real time. Lv et al. (2025) introduced a multidimensional Conv-LSTM architecture capable of modeling both spatial and temporal dependencies in vessel trajectories, enabling effective detection of intentional AIS signal tampering (Lv et al., 2025). Earlier work by Campbell et al. (2022) explored classical machine learning methods, including decision trees, Random Forest, and feed-forward neural networks, to detect fabricated AIS messages, achieving F1-scores above 93% (Campbell et al., 2022). These studies illustrate the effectiveness of machine learning methods in recognizing abnormal vessel activities and detecting AIS spoofing transmissions.
2.3 GAN-based synthetic trajectory generation and data augmentation
GANs have emerged as effective tools for generating synthetic data and augmenting datasets across various domains. In the context of maritime data, GAN-based approaches have been applied to reconstruct missing AIS information and generate realistic vessel trajectories.
Anshelevich and Katz. (2025) proposed T-VAE-GAN, a hybrid framework combining Variational Autoencoders (VAEs) and GANs to generate high-quality synthetic tabular data while accurately capturing underlying data distributions (Anshelevich and Katz, 2025). Their approach demonstrates improved computational efficiency and sample quality compared to traditional generative models.
Chatterjee et al. (2025) developed a Conditional Wasserstein GAN with Gradient Penalty (CWGAN-GP) to generate synthetic time-series data for improving demand prediction in shared electric mobility systems (Chatterjee et al., 2025). Their results show that combining real and synthetic data can significantly enhance predictive performance.
In the maritime domain specifically, Zhang et al. (2023) proposed TLGAN, a GAN-based AIS data repair model that integrates Temporal Convolutional Networks (TCN) and Bidirectional LSTM networks to reconstruct missing or abnormal AIS trajectory data (Zhang et al., 2023). The generated trajectories were further refined using Savitzky–Golay filtering and cubic exponential smoothing to improve trajectory continuity and realism.
Recent improvements in GAN architectures have also addressed common challenges such as mode collapse. For example, UGA-GAN introduced by Ahmad et al. (2025) improves sample diversity and stability in generated datasets (Ahmad et al., 2025). These developments highlight the growing importance of generative models for synthetic trajectory generation and data augmentation in AIS-related research.
2.4 Sequence-based and forecasting-based anomaly detection
Sequence modeling and forecasting techniques have been extensively employed for anomaly detection in time-series data. where models learn normal temporal patterns and identify anomalies when prediction errors exceed a predefined threshold. Traditional statistical methods such as ARIMA have largely been replaced by deep learning models capable of capturing complex temporal dependencies.
Su et al. introduced OmniAnomaly, a stochastic recurrent neural network that leverages variational inference to detect anomalies based on reconstruction probabilities, achieving state-of-the-art results in KPI monitoring datasets (Su et al., 2019). Similarly, Audibert et al. (2020) proposed the USAD framework, which combines autoencoder-based reconstruction with adversarial training to detect anomalies in multivariate time-series data (Audibert et al., 2020).
More recently, attention-based architectures, such as Transformers, have shown strong performance in anomaly detection tasks. Xu et al. (2022) introduced the Anomaly Transformer, a model that identifies anomalies by analyzing inconsistencies in attention-based associations across different time points. TranAD, introduced by Tuli et al. (2022), employs a dual-attention Transformer architecture to detect and diagnose anomalies in multivariate time-series streams (Tuli et al., 2022).
Hybrid deep learning architectures have also been explored in prior work. Shen et al. introduced the Temporal Hierarchical One-Class (THOC) network, combining dilated recurrent networks with hierarchical one-class classification to identify anomalies across multiple temporal scales (Shen et al., 2020). In addition, graph-based methods enhance anomaly detection by modeling inter-variable relationships. For example, the Graph Deviation Network (GDN) learns correlations among sensors and detects contextually abnormal readings using graph convolutional forecasting (Deng and Hooi, 2021). Similarly, Zhou et al. proposed a temporal convolution and graph attention framework for detecting anomalies in industrial multi-sensor systems (Zhou et al., 2022).
Overall, recent advances indicate that models capable of capturing temporal dependencies, contextual relationships, and multi-scale patterns are particularly effective in identifying anomalies across complex time-series environments (Chalapathy and Chawla, 2019; Pang et al., 2021; Wang et al., 2025; Nguyen et al., 2022). These methods establish a solid foundation for detecting irregular patterns in AIS trajectory data and related maritime cyber-physical systems.
3 Methodology
This section presents a GAN-based fingerprinting framework for detecting synthetic AIS trajectories generated by CycleGAN models. In our previous paper (uz Zaman et al., 2026), shows the usefulness and capability of CycleGAN models in terms of generating synthetic AIS trajectories. Although such synthetic data may appear visually realistic, it often fails to preserve the complex temporal dynamics and physical constraints inherent to real vessel motion. The proposed method leverages an LSTM-based deep learning model trained exclusively on authentic AIS data to learn these spatiotemporal dependencies. By forecasting future vessel states and using the resulting prediction error as an anomaly score, the framework constructs a distinctive behavioral “fingerprint” of legitimate trajectories. Incoming AIS sequences are evaluated by comparing their learned representations against real-data fingerprints using cosine similarity, enabling reliable discrimination between real and synthetic data without requiring labeled spoofed samples during training. This approach demonstrates strong generalization across spoofing strategies and consistently outperforms conventional anomaly detection methods, achieving high precision and recall by focusing on intrinsic vessel motion patterns rather than surface-level statistical features. Figure 1 presents an overview of the proposed methodology.

3.1 Dataset description and synthetic data generation
A comprehensive dataset containing real and synthetic AIS trajectories was developed to assess the performance of the proposed detection framework. The real AIS data were sourced from the publicly available AccessAIS dataset, which provides detailed vessel trajectory records including key features such as latitude, longitude, speed over ground (SOG), and course over ground (COG). These records cover U.S. waters and include timestamped AIS transmissions from various vessels.
This study utilizes a CycleGAN-based framework for the generation of synthetic AIS data. The CycleGAN consists of two main components: the Generator (G and F) and the Discriminator (Ds and Dt). The generator maps real AIS data to synthetic data, while the discriminator attempts to distinguish between real and generated AIS data. This architecture is especially effective since it eliminates the need for paired training data, which is advantageous for generating realistic AIS trajectories.
The generator G and its counterpart F learn mappings between real and synthetic AIS data. The goal is to minimize the discrepancy between the real data and the generated data by using an adversarial loss function. The key objective of the generator is to generate data G ( X ) from real data X such that the discriminator D t cannot distinguish between real and generated data:where D t is the discriminator for real and generated data, and G ( x ) represents the generated data for a real input x.
L G = E x ∼ p data ( x ) [ log D t ( G ( x ) ) ]
The generator tries to fool the discriminator, while the discriminator is trained to accurately distinguish between real and synthetic data. The discriminator D t learns to differentiate between real data x and fake data G ( x ). The adversarial loss for the discriminator is defined as:where the first term represents the likelihood of real data being classified as real, and the second term represents the likelihood of generated data being classified as fake.
L D t = E x ∼ p data ( x ) [ log D t ( x ) ] + E x ∼ p G ( x ) [ log ( 1 − D t ( G ( x ) ) ) ]
In CycleGAN, both generators G and F are optimized to learn cycle-consistent mappings, such that data generated by G from real inputs can be mapped back to the original real domain by F.
L cycle = E x ∼ p data ( x ) [ ‖ F ( G ( x ) ) − x ‖ 1 ] + E y ∼ p data ( y ) [ ‖ G ( F ( y ) ) − y ‖ 1 ]
Cycle consistency loss ensures reconstruction close to the original input while preserving structure. The architecture includes convolutional, residual, and deconvolutional layers. Below, we provide a detailed breakdown of the parameters for the 1D Cycle-GAN used in generating AIS data.
The proposed LSTM-based fingerprinting model is trained on authentic AIS trajectories to learn the intrinsic spatiotemporal dynamics of legitimate vessel motion. By excluding synthetic data during training, the model avoids learning generator-specific artifacts and instead detects deviations from natural navigation patterns. This design reduces overfitting to a particular generative model and improves robustness against spoofed trajectories produced by similar or unseen generation methods.
3.2 Problem formulation
In this study, we propose a fingerprinting-based method (Figure 2) to detect synthetic AIS trajectories generated by a CycleGAN model (Table 1) using an LSTM-based DNN. The underlying hypothesis is that real AIS data exhibits distinctive temporal and spatial patterns (fingerprints) that differentiate it from synthetic data generated by GANs. The objective is to extract unique fingerprints from real AIS trajectories and employ them as a reference for differentiating between real and spoofed data.

TABLE 1. Detail parameters of 1D Cycle-GAN.
| Module | Layer type | Kernel size × Stride | Channel number | Activation: Output size |
|---|---|---|---|---|
| Generators G and F | ||||
| Input | — | — | — | (20, 8) |
| Conv 1 | Conv | (64, 1) × 8 | 20 | ReLU: (20, 249, 1) |
| Conv 2 | Conv | (24, 1) × 3 | 30 | ReLU: (30, 76, 1) |
| Conv 3 | Conv | (12, 1) × 3 | 40 | ReLU: (40, 23, 1) |
| Res-Conv 1 | Res-Conv | (12, 1) × 1 | 40 | ReLU: (40, 23, 1) |
| Res-Conv 2 | Res-Conv | (12, 1) × 1 | 40 | ReLU: (40, 23, 1) |
| Res-Conv 3 | Res-Conv | (12, 1) × 1 | 40 | ReLU: (40, 23, 1) |
| Deconv 1 | Deconv | (12, 1) × 1 | 30 | ReLU: (30, 76, 1) |
| Deconv 2 | Deconv | (24, 1) × 1 | 20 | ReLU: (20, 249, 1) |
| Deconv 3 | Deconv | (64, 1) × 1 | 1 | /: (2048, 1) |
| Output | — | — | — | Tanh: (2048, 1) |
| Discriminators ds and Dt | ||||
| Conv 1 | Conv | (64, 1) × 8 | 20 | ReLU: (20, 249, 1) |
| Conv 2 | Conv | (24, 1) × 3 | 30 | ReLU: (30, 76, 1) |
| Conv 3 | Conv | (12, 1) × 3 | 40 | /: (40, 23, 1) |
| Output | — | — | — | Sigmoid: (40, 23, 1) |
Let an AIS trajectory be represented as a sequence of time steps:where each x t ∈ R 4 is a feature vector at time step t, containing the vessel’s latitude (lat t), longitude (lon t), speed over ground (SOG t), and course over ground (COG t).
X = { x 1 , x 2 , … , x T }
This method aims to learn a distinctive fingerprint f θ ( X ) from AIS trajectory sequences X, where f θ is implemented as an LSTM-based deep neural network. This model is trained to capture the spatiotemporal dependencies of real AIS data, which define the fingerprint of legitimate vessel behavior. Specifically, we aim to learn the function:where f θ ( X ) is a representation that encodes the temporal and spatial dynamics characteristic of real AIS trajectories.
f θ ( X ) = { fingerprint of X }
Once the model is trained on authentic AIS data, we use this fingerprinting method to evaluate incoming AIS trajectories. For each new trajectory X ′, we extract its fingerprint f θ ( X ′ ) and compare it to the fingerprint of real AIS data. If the extracted fingerprint of the incoming trajectory deviates significantly from the real AIS fingerprint, it is classified as synthetic or “fake.”
The classification decision is made by measuring the cosine similarity between the fingerprint of the incoming trajectory f θ ( X ′ ) and the fingerprint of real AIS data f θ ( X ). Cosine similarity is employed to quantify the cosine of the angle between two fingerprint vectors, reflecting the similarity of trajectories based on their spatial and temporal characteristics.where ⋅ denotes the dot product, and ‖ ⋅ ‖ represents the Euclidean norm (magnitude) of the fingerprint vectors.
Cosine Similarity ( f θ ( X ) , f θ ( X ′ ) ) = f θ ( X ) ⋅ f θ ( X ′ ) ‖ f θ ( X ) ‖ ‖ f θ ( X ′ ) ‖
The similarity score is then compared against a threshold τ, determined from the training data, to classify the trajectory as either real or synthetic.
Label = Real if Cosine Similarity ( f θ ( X ) , f θ ( X ′ ) ) ≥ τ Fake if Cosine Similarity ( f θ ( X ) , f θ ( X ′ ) ) < τ
This cosine similarity-based method facilitates the identification of synthetic AIS trajectories by comparing their fingerprints against real AIS data representations. Since the model is trained on authentic AIS data, it does not require labeled synthetic data for training and is robust to various spoofing methods. By focusing on the unique spatiotemporal fingerprint of real vessel trajectories, our method offers a highly effective solution for distinguishing between real and GAN-generated AIS data without relying on forecasting errors.
3.3 Data preprocessing
A compact preprocessing pipeline is used on AIS trajectory data to ensure stable training and reliable fingerprint extraction. The pipeline standardizes input features, suppresses noise, and enhances motion-related dynamics through mathematically defined transformations.
3.3.1 Feature selection
Each AIS trajectory is represented as a multivariate time serieswhere t = 1,2 , … , T. Feature relevance is assessed using the Spearman rank correlation coefficientwhich models monotonic dependencies among AIS variables and enables redundancy-aware feature selection. Figure 3 shows the Spearman correlation matrix.
x t = [ lat t , lon t , SOG t , COG t ] ∈ R 4 ,
ρ i j = 1 − 6 ∑ d i j 2 n ( n 2 − 1 ) ,

3.3.2 Normalization
To mitigate scale dominance, each feature is normalized using min‐max scaling.This ensures all features lie within [0,1] and improves convergence during LSTM training.
x t ( k ) ′ = x t ( k ) − min ( x ( k ) ) max ( x ( k ) ) − min ( x ( k ) ) , k ∈ { 1 , … , 4 } .
3.3.3 Temporal smoothing
A moving average filter is applied to smooth sensor noise and reduce sudden fluctuations.where w denotes the smoothing window size.
x ̃ t = 1 w ∑ i = t − ⌊ w / 2 ⌋ t + ⌊ w / 2 ⌋ x i ,
3.3.4 Feature engineering
Kinematic features are derived to capture vessel motion dynamics. These features encode velocity, acceleration, and directional change, which are important for distinguishing real trajectories from synthetic ones.
v t = ( lat t − lat t − 1 ) 2 + ( lon t − lon t − 1 ) 2 ,
a t = v t − v t − 1 Δ t , Δ θ t = COG t − COG t − 1 .
3.3.5 Sequence alignment
All trajectories are normalized to a fixed length (L) via padding or truncation.
X ′ = [ x 1 , … , x T , 0 ] , T < L , [ x 1 , … , x L ] , T ≥ L .
Algorithm 1 AIS Spoofing Detection via CycleGAN-Assisted LSTM Fingerprinting.
This guarantees uniform input dimensions for batch-based training.
The preprocessing strategy emphasizes mathematical consistency and motion realism, enabling the LSTM-based model to learn robust spatiotemporal AIS representations.
Algorithm 1 presents the complete algorithmic representation of the fingerprinting process.
3.4 Model architecture
The primary objective of this paper is to detect synthetic AIS data generated by CycleGAN using an LSTM-based fingerprinting model (Table 2). The model aims to learn the unique spatiotemporal patterns of real AIS trajectories and use this learned fingerprint to classify incoming AIS data as either real or generated (fake). The architecture consists of LSTM layers followed by fully connected layers that output a binary classification decision.
TABLE 2. Detailed parameters of LSTM-Based fingerprinting model.
| Module | Layer type | Units | Activation: Output size |
|---|---|---|---|
| Input | — | — | (20, 8) |
| LSTM 1 | LSTM | 64 | ReLU: (20,64) |
| LSTM 2 | LSTM | 128 | ReLU: (20, 128) |
| LSTM 3 | LSTM | 256 | ReLU: (20, 256) |
| Fully connected 1 | Dense | 256 | ReLU: (256) |
| Fully connected 2 | Dense | 128 | ReLU: (128) |
| Output | — | 1 | Sigmoid: (1) |
The model includes the following key components:
- Input Layer: The model accepts AIS trajectory sequences, including features such as latitude, longitude, speed over ground (SOG), and course over ground (COG).
- LSTM Layers: The LSTM layers capture the temporal dependencies and long-range correlations in the AIS trajectory data. These layers process the sequential nature of the AIS data and learn its underlying patterns.
- Fingerprinting Layer: After processing the sequence through the LSTM layers, the network produces a fixed-size fingerprint representation that encodes the spatiotemporal features of the AIS trajectory. This fingerprint serves as the unique identifier of the trajectory.
- Fully Connected Layers: These layers map the learned temporal and spatial features from the LSTM layers into a decision space, helping the model make a classification decision.
- Output Layer: The output layer uses a sigmoid function to output probabilities between 0 and 1. If the output is close to 1, the model classifies the data as real AIS data, and if the output is close to 0, the model classifies the data as generated (fake).
The primary objective is to enable the model to capture the intrinsic characteristics of real AIS data and detect deviations from these patterns in CycleGAN-generated synthetic data.
The LSTM layers process the sequential input data at each time step t, updating the hidden state h t and cell state C t according to the following equations:
Forget Gate:Input Gate:Cell State Update: New Cell State:Output Gate:Hidden State:
f t = σ ( W f ⋅ [ h t − 1 , x t ] + b f )
i t = σ ( W i ⋅ [ h t − 1 , x t ] + b i )
C ̃ t = tanh ( W C ⋅ [ h t − 1 , x t ] + b C )
C t = f t ⋅ C t − 1 + i t ⋅ C ̃ t
o t = σ ( W o ⋅ [ h t − 1 , x t ] + b o )
h t = o t ⋅ tanh ( C t )
Where: − x t is the input at time step t (features such as latitude, longitude, SOG, and COG). - h t − 1 is the hidden state from the previous time step. - C t is the cell state at time step t. - f t , i t , o t are the forget, input, and output gates, respectively. - σ is the sigmoid activation function, and tanh is the hyperbolic tangent activation function.
After the sequence has been processed by the LSTM layers, the model produces a fixed-size fingerprint representation of the AIS trajectory. This fingerprint is a vector that encodes the temporal and spatial dynamics of the vessel’s motion.
Specifically, the fingerprint corresponds to the final hidden state of the LSTM network, which serves as a compact embedding summarizing the temporal motion dynamics of the trajectory. To classify incoming AIS trajectories as real or generated, the model computes the Euclidean distance between the fingerprint of the incoming data and the fingerprints of real AIS data. The classification is done using the following decision rule:where: − y is the binary classification output, where y = 1 indicates real AIS data, and y = 0 indicates generated AIS data. - h t is the final hidden state after processing the sequence. - σ is the sigmoid activation function, which outputs a probability value between 0 and 1.
y = σ ( W f ⋅ h t + b )
The model is trained using binary cross-entropy loss, which is defined as:where: − y true is the true label (1 for real, 0 for generated). - y pred is the predicted probability for the data being real.
L = − y true log ( y pred ) + ( 1 − y true ) log ( 1 − y pred )
The loss function guides the model to classify real and generated AIS data using learned fingerprint features.
4 Discussion and evaluation
4.1 Visual comparison of real and synthetic trajectories
First, we examine the synthetic and real trajectory samples side by side to compare them visually. Figure 4 shows the trajectories in the closed waterway of Mississippi River on the banks of New Orleans. We can see that the generated trajectories align with the real trajectories quite well. However, these trajectories exhibit small deviations from real trajectories, which the proposed method seeks to detect.

4.2 Performance comparison with state‐of‐the‐art (SOTA)
We compare the proposed method with several SOTA AIS spoofing detection methods. GeoTrackNet (Nguyen et al., 2022), a kinematic interpolation model Guo et al. (2021), LSTM and Transformer-based classifiers, and a simple statistical threshold model based on speed and course. Performance is measured using standard classification metrics, including Precision, Recall, F1-score, Area Under the Curve (AUC), Detection Rate, and False Positive Rate (FPR).
Table 3 shows the metrics for all methods on the test set.
TABLE 3. Performance comparison of anomaly detectors on CycleGAN-generated AIS spoofing data.
| Method | Prec | Rec | F1 | AUC | Det. | FPR |
|---|---|---|---|---|---|---|
| This study | 0.95 | 0.96 | 0.955 | 0.99 | 0.96 | 0.02 |
| GeoTrackNet Nguyen et al. (2022) | 0.90 | 0.85 | 0.88 | 0.95 | 0.85 | 0.05 |
| Kinematic Interp. Guo et al. (2021) | 0.85 | 0.80 | 0.82 | 0.90 | 0.80 | 0.08 |
| d’Afflisio et al. (2021) | 0.91 | 0.902 | 0.91 | 0.96 | 0.89 | 0.04 |
| Louart et al. (2024) | 0.92 | 0.90 | 0.90 | 0.96 | 0.90 | 0.01 |
| Pohontu et al. (2025) | 0.96 | 0.94 | 0.96 | 0.99 | 0.95 | 0.04 |
| Karim et al. (2021) | 0.84 | 0.82 | 0.85 | 0.93 | 0.81 | 0.08 |
| Ray et al. (2015) | 0.87 | 0.86 | 0.87 | 0.92 | 0.85 | 0.09 |
| Zheng et al. (2023) | 0.92 | 0.90 | 0.91 | 0.96 | 0.90 | 0.04 |
| Transformer classifier | 0.93 | 0.93 | 0.93 | 0.97 | 0.93 | 0.03 |
Bold values indicate the best-performing results
In contrast, methods like GeoTrackNet and the kinematic interpolation approach perform moderately well but fall short in recall and precision, missing finer temporal inconsistencies. Zheng et al. and Transformer classifiers achieve high accuracy but may overfit GAN-specific patterns.
4.3 Classifier evaluation
Figure 5 confusion matrix shows high classification performance in separating the “Real” and “Synthetic” classes. The high number of correctly classified real instances suggests that the model accurately identifies most real samples while maintaining a low number of misclassifications. The classifier also achieves a strong true positive rate for synthetic trajectories, confirming balanced and effective performance across both classes.

The ROC curve in Figure 6 further shows the strong discriminative capability of the classifier. Both classes achieve high AUC scores, indicating that the model reliably separates real AIS trajectories from synthetic ones.

4.4 Baseline model comparison
Table 4 compares the proposed fingerprinting method against baseline models (SVM, KNN, Random Forest, XGBoost, CNN), showing superior precision and recall with a low false positive rate. Among the baselines, CNN and XGBoost shows strong performance, while SVM and KNN perform significantly worse.
TABLE 4. Performance comparison of fingerprinting method with different baseline models.
| Model | Precision | Recall | FPR |
|---|---|---|---|
| This study | 0.95 | 0.96 | 0.02 |
| SVM | 0.65 | 0.64 | 0.24 |
| KNN | 0.61 | 0.59 | 0.2 |
| Random forest | 0.74 | 0.72 | 0.13 |
| XGBoost | 0.79 | 0.794 | 0.09 |
| CNN | 0.83 | 0.85 | 0.06 |
4.5 Generalization to unseen GAN attacks
To assess robustness, we evaluated all detectors on AIS data generated by an unseen CycleGAN variant. The fingerprinting method maintains strong performance, with only a slight decrease in recall, whereas other models show noticeable degradation.
Table 5 shows generalization performance in terms of recall and FPR.
TABLE 5. Generalization performance on unseen GAN-generated AIS data.
| Method | Recall (Known) | Recall (Unseen) | FPR (Known) | FPR (Unseen) |
|---|---|---|---|---|
| This study | 0.96 | 0.93 | 0.02 | 0.03 |
| Zheng et al. (2023) | 0.89 | 0.82 | 0.04 | 0.06 |
| Transformer classifier | 0.93 | 0.88 | 0.03 | 0.05 |
| GeoTrackNet Nguyen et al. (2022) | 0.85 | 0.73 | 0.05 | 0.07 |
| Kinematic Interp. Guo et al. (2021) | 0.80 | 0.75 | 0.08 | 0.10 |
The bold values showing comparably better results than other methods.
These results demonstrate the method’s ability to generalize across different types of synthetic manipulations by capturing the underlying temporal regularities of real AIS behavior rather than relying on spoofing-specific artifacts.
4.6 False positive analysis
A critical concern in real-world deployment is avoiding false alarms. The fingerprinting method again achieves the best result (FPR = 0.02), meaning it rarely misclassifies legitimate trajectories. In contrast, simple thresholding incurs a high FPR of 0.15, while GeoTrackNet and the kinematic method show moderate false alarm rates.
4.7 Ablation study
Table 6 presents an ablation study of architectural and preprocessing components. Configuration S-1, which includes only the fully connected layer, establishes the baseline and yields limited precision and recall. The incremental inclusion of dense layers and batch normalization in S-2 and S-3 leads to consistent improvements, indicating their role in stabilizing feature learning. Introducing normalization and sequence alignment in S-4 further enhances recall while reducing false positive rates, demonstrating improved temporal consistency. The complete configuration (S-7), integrating all components, achieves the best overall performance with the highest precision (0.95), recall (0.96), and the lowest FPR (0.02). The results show that each module improves performance, and their combined integration is necessary for robust and reliable detection.
TABLE 6. Ablation study of architectural and preprocessing components.
| Setting | LSTM | Fully connected | Batch norm | Normalization | Seq. Align | Precision | Recall | FPR |
|---|---|---|---|---|---|---|---|---|
| S-1 | ✓ | ✓ | | | | 0.82 | 0.81 | 0.1 |
| S-2 | ✓ | | ✓ | ✓ | ✓ | 0.93 | 0.93 | 0.06 |
| S-3 | ✓ | ✓ | ✓ | ✓ | | 0.87 | 0.86 | 0.09 |
| S-4 | ✓ | ✓ | ✓ | | ✓ | 0.92 | 0.90 | 0.08 |
| S-5 | | ✓ | ✓ | ✓ | ✓ | 0.79 | 0.77 | 0.14 |
| S-6 | ✓ | ✓ | | ✓ | ✓ | 0.94 | 0.91 | 0.02 |
| S-7 | ✓ | ✓ | ✓ | ✓ | ✓ | 0.95 | 0.96 | 0.02 |
4.8 External validation
External validation was performed using a publicly available dataset from the National Oceanic and Atmospheric Administration (NOAA), which provides comprehensive AIS data collected from vessels across global maritime routes. The validation dataset covers NOAA AIS records from 1 January 2024, to 2 January 2024. It includes high-resolution spatiotemporal information on vessel trajectories, with features such as latitude, longitude, speed over ground (SOG), course over ground (COG), vessel type, and navigation status. The wide temporal and spatial coverage of this dataset enables evaluation under diverse maritime conditions, thereby enhancing the reliability and generalizability of the proposed model. Using this dataset for external validation allows us to evaluate the generalization capability of our model on unseen and highly dynamic maritime traffic scenarios, as reported in Figure 7.

The performance on the external validation dataset illustrates a slight decrease compared to the experimental results, with metrics such as Precision, Recall, and F1-score dropping marginally. This degradation is expected, as the model is evaluated on unseen, real-world data that may contain different noise patterns, vessel behaviors, and distribution shifts. Despite this, the model still maintains strong performance with high detection capability and a low false positive rate, indicating good generalization and robustness in practical maritime scenarios.
4.9 Trajectory identification analysis
Figure 8, shows misclassifications when synthetic trajectories overlap with real trajectory clusters. This represents a minor limitation of the approach. Nevertheless, the majority of synthetic trajectories are still correctly identified, indicates strong detection capability even under challenging conditions.

4.10 Feature Importance and model interpretability
SHAP and LRP were used to explain the model’s decisions.
Figure 9 shows that COG and SOG are the most important features for distinguishing real and synthetic AIS trajectories. Longitude and Latitude also contribute to the classification, although to a lesser extent.

The LRP heatmap in Figure 10 illustrates feature contributions over time. Real AIS trajectories exhibit stable relevance patterns, while synthetic trajectories show more irregular variations, suggesting temporal inconsistencies in the generated data.

4.11 Analysis of model performance and architectural differences
The superior performance of the proposed LSTM-based fingerprinting approach can be attributed to the inherent characteristics of AIS trajectory data. Vessel trajectories represent sequential motion processes governed by physical constraints such as velocity continuity, maneuver smoothness, and course stability. LSTMs are effective for modeling such dynamics due to gated recurrence that preserves internal memory for long-term temporal dependencies across trajectory segments.
In contrast, Transformer-based classifiers primarily leverage self-attention mechanisms to model relationships among sequence elements. While Transformers have demonstrated strong performance in large-scale sequence modeling tasks, they typically require significantly larger training datasets to learn stable attention patterns. AIS trajectory datasets are often relatively limited in size and consist of moderately short sequences, making recurrent architectures more effective at capturing the temporal evolution of vessel motion.
The improved performance is also attributed to the fingerprinting strategy, where the model learns representations of real vessel motion patterns from real AIS data instead of directly using labeled synthetic data for classification. This allows the detector to identify subtle inconsistencies in generated trajectories that may arise from imperfect modeling of physical motion constraints by generative models such as CycleGAN. As a result, the method focuses on intrinsic trajectory dynamics rather than generator-specific artifacts, thereby improving robustness against different spoofing strategies.
Regarding dataset dependence, the experiments in this study were conducted using real AIS trajectories from the AccessAIS dataset in the Mississippi River region. Although this dataset represents a realistic maritime traffic environment, the proposed framework is not inherently tied to a specific geographic region or dataset. Since the model learns motion fingerprints from real AIS data, the same framework can be applied to other AIS datasets by retraining the fingerprint model on the corresponding vessel traffic patterns. Future work will extend the evaluation to additional AIS datasets and maritime regions, further validating the generalizability of the proposed detection framework.
4.12 Discussion
The main strength of the proposed method is its emphasis on motion forecasting. Unlike spatial clustering methods or GAN-specific classifiers, the forecasting-error detector captures trajectory coherence and physical realism. This enables high detection accuracy while maintaining a low false positive rate.
However, the method depends on access to high-quality real AIS sequences for training and may struggle with extremely smooth spoofing trajectories that remain within plausible motion bounds. Despite these limitations, the approach provides a practical and robust solution for maritime anomaly detection.
Even when spatially similar, synthetic trajectories show subtle temporal inconsistencies captured by the model.
4.13 Methodological comparison and dataset considerations
The experiments use real AIS trajectory data from the Mississippi River region near New Orleans, obtained via the AccessAIS dataset. This region represents an active maritime transportation corridor with structured navigation routes, dense vessel traffic, and diverse vessel movement behaviors. Such characteristics make it a suitable real-world maritime environment for evaluating AIS spoofing detection systems. It is also important to emphasize that the proposed fingerprinting model is trained only on real AIS trajectories and does not rely on synthetic data during training. As a result, the detector learns intrinsic vessel motion characteristics rather than artifacts of a specific generative model, enabling reliable performance even when synthetic trajectories are produced from distributions similar to real data.
Using real AIS traffic instead of simulated scenarios ensures that evaluation reflects realistic vessel motion, navigation constraints, and temporal dynamics in operational maritime systems. The synthetic trajectories used in the experiments are generated using CycleGAN models trained on this real AIS data, enabling controlled simulation of advanced spoofing attacks while maintaining realistic trajectory structures.
Despite these limitations, the approach provides a practical and robust solution for maritime anomaly detection. In particular, the evaluation conducted on real AIS vessel traffic from the Mississippi River demonstrates that the proposed method can effectively operate in realistic maritime monitoring scenarios.
5 Conclusion
We present an LSTM-based fingerprinting model for detecting spoofed AIS data, targeting CycleGAN-generated synthetic trajectories. Our approach leverages the temporal and spatial dependencies inherent in real AIS data to produce unique fingerprints for each trajectory. By comparing these fingerprints against incoming AIS datav, we were able to classify data as either real or generated, offering a robust solution for AIS spoofing detection. The model demonstrated superior performance compared to traditional anomaly detection methods, particularly in handling synthetic data that closely mimics real AIS trajectories. Through extensive evaluation on a dataset containing both real and fake AIS data, the model showed strong classification accuracy and robust detection performance, providing an effective tool for enhancing the security of AIS-based vessel tracking systems. Future work could focus on improving the model’s scalability for large-scale real-time applications, exploring additional data sources for training, and optimizing the model for deployment in operational maritime security systems. Integrating additional sensor modalities such as radar and GPS could improve system robustness against advanced spoofing attacks. Overall, the present study contributes to ongoing efforts to improve the integrity of AIS data, offering a promising direction for detecting and mitigating AIS spoofing in maritime security applications.
Generative AI statement
The author(s) declared that generative AI was not used in the creation of this manuscript.
Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.
Publisher’s note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
Footnotes
Edited by: Simeon Okechukwu Ajakwe, Kumoh National Institute of Technology, Republic of Korea
Reviewed by: Muhammad Sameer Sheikh, Guangdong Ocean University, China
Tasmiah Haque, West Virginia University, United States
Statements
- Conflict of interest
The author(s) declared that this work was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
- Funding
The author(s) declared that financial support was received for this work and/or its publication. This work was supported by Universiti Kebangsaan Malaysia Fundamental Research Grant Scheme (FRGS) Grant code: FRGS/1/2023/ICT07/UKM/02/1.
- Data availability
The original contributions presented in this study are included in the article and its supplementary material. Further inquiries may be directed to the corresponding authors.
- Author contributions
SA: Conceptualization, Investigation, Methodology, Visualization, Writing – original draft. FQ: Formal Analysis, Project administration, Writing – review and editing. MM: Supervision, Validation, Writing – review and editing. NS: Validation, Visualization, Writing – review and editing. AK: Project administration, Resources, Supervision, Writing – review and editing.
References
- Ahmad W., Ahamed M. F., Khandakar A., uz Zaman S. A., Ayari M. A. (2025). UGA-GAN: unified geometry-aware gan for enhanced training and generation of high-dimensional data. IEEE Access 13, 179932 – 179943. doi:10.1109/ACCESS.2025.3621108
- Androjna A., Perković M., Pavić I., Mišković J. (2021). AIS data vulnerability indicated by a spoofing case-study. Appl. Sci. 11 (11), 5015. doi:10.3390/app11115015
- Anshelevich D., Katz G. (2025). Synthetic tabular data generation using a vae-gan architecture. Knowledge-Based Syst. 326, 113997. doi:10.1016/j.knosys.2025.113997
- Audibert J., Michiardi P., Guyard F., Marti S., Zuluaga M. A. (2020). “ USAD: unsupervised anomaly detection on multivariate time series,” in Proceedings of the 26th ACM SIGKDD international conference on knowledge discovery & data mining, 3395 – 3404. doi:10.1145/3394486.3403392
- Brandsæter A., Knutsen K. E. (2018). “ Towards a framework for assurance of autonomous navigation systems in the maritime industry,” in Safety and reliability -safe societies in a changing world (CRC press), 449 – 457.
- Chalapathy R., Chawla S. (2019). Deep learning for anomaly detection: A survey. arXiv preprint arXiv:1901.03407.
- Chatterjee S., Hazra D., Byun Y.-C. (2025). Gan-based synthetic time-series data generation for improving prediction of demand for electric vehicles. Expert Syst. Appl. 264, 125838. doi:10.1016/j.eswa.2024.125838
- Deng A., Hooi B. (2021). Graph neural network-based anomaly detection in multivariate time series. in Proceedings of the AAAI conference on artificial intelligence, 35, 4027 – 4035. doi:10.1609/aaai.v35i5.16523
- d’Afflisio E., Braca P., Willett P. (2021). Malicious AIS spoofing and abnormal stealth deviations: a comprehensive statistical framework for maritime anomaly detection. IEEE Trans. Aerosp. Electron. Syst. 57 (4), 2093 – 2108. doi:10.1109/taes.2021.3083466
- Guo S., Mou J., Chen L., Chen P. (2021). An anomaly detection method for AIS trajectory based on kinematic interpolation. J. Mar. Sci. Eng. 9 (6), 609. doi:10.3390/jmse9060609
- Halawi L., Clarke A., George K. (2022). “ Decision trees and ensemble,” in Harnessing the Power of Analytics (Cham: Springer International Publishing), 61 – 81.
- Karim A., Utama S., Arifin M. A. (2021). Algorithms for detecting vessel spoofing of space-based AIS data. AIP Conf. Proc. (AIP Publishing LLC) 2366 (1), 060006. doi:10.1063/5.0060428
- Louart M., Szkolnik J.-J., Boudraa A.-O., Lann J.-C. L., Roy F. L. (2024). An approach to detect identity spoofing in AIS messages. Expert Syst. Appl. 252, 124257. doi:10.1016/j.eswa.2024.124257
- Lv X., Jiang R., Chang C., Shu N., Wu T. (2025). A deep learning approach for identifying intentional AIS signal tampering in maritime trajectories. J. Mar. Sci. Eng. 13 (4), 660. doi:10.3390/jmse13040660
- Nguyen T., Yang L., Lee Y. (2022). Anomaly detection in industrial control systems using deep learning: a survey. Sensors 22, 1923. doi:10.3390/s22061923
- Pang G., Shen C., Gao J., Zhang Y. (2021). Deep learning for anomaly detection: a review. Neural Netw. 45, 64 – 78. doi:10.1016/j.neunet.2021.03.005
- Pohontu A., Ionescu L. (2025). Analyzing stochastic kinematics of vessel tracks in the Black sea. J. Marit. Secur. 12, 45 – 60. doi:10.1016/j.jms.2025.04.005
- Pohontu A., Vertan C., Ciocioi I., Popa C. (2025). Detection of spoofed AIS: simulated tracks vs. real maritime data. Romanian J. Inf. Technol. Automatic Control 35, 37 – 50. doi:10.33436/v35i1y202503
- Raj M., Kumar A. (2025). Bi-lstm for AIS vessel trajectory spoofing detection. Marit. Technol. Rev. 17, 134 – 150. doi:10.1109/MTR.2025.8905231
- Ray C., Gallen R., Iphar C., Napoli A., Bouju A. (2015). “ Deais project: detection of AIS spoofing and resulting risks,” in OCEANS 2015-Genova, 1 – 6.
- Shen Y., Li Z., Wang X. (2020). Thoc: temporal hierarchical one-class network for unsupervised anomaly detection in time series. IEEE Trans. Neural Netw. Learn. Syst. 31, 5022 – 5034. doi:10.1109/TNNLS.2020.2991519
- Su J., Wang Y., Li Z. (2019). Omnianomaly: unsupervised anomaly detection with generative adversarial networks. IEEE Trans. Industrial Electron. 66, 8795 – 8804. doi:10.1109/TIE.2019.2901175
- Tuli S., Casale G., Jennings N. R. (2022). Tranad: deep transformer networks for anomaly detection in multivariate time series data. Proc. VLDB Endow. 15, 1201 – 1214. doi:10.14778/3514061.3514067
- uz Zaman S. A., Qamar F., Mohd M., Suhaimi N. H. S., Khandakar A. (2026). AIS-cyclegen: a cyclegan-based framework for high-fidelity synthetic AIS data generation and augmentation. doi:10.48550/arXiv.2601.06127
- Wang J., Liu T., Xu J. (2025). Survey on anomaly detection for sensor networks: a review of methods, applications, and future directions. IEEE Trans. Industrial Inf. 21, 345 – 355. doi:10.1109/TII.2025.0076559
- Wolsing R., Zhang Y. (2022). Recent approaches for maritime AIS anomaly detection. J. Marit. Surveillance 6, 45 – 61. doi:10.1016/j.jms.2022.01.004
- Xu J., Wu H., Wang J., Long M. (2022). “ Anomaly transformer: time series anomaly detection with association discrepancy,” in Proceedings of the 10th international conference on learning representations (ICLR 2022).
- Zhang W., Jiang W., Liu Q., Wang W. (2023). AIS data repair model based on generative adversarial network. Reliab. Eng. and Syst. Saf. 240, 109572. doi:10.1016/j.ress.2023.109572
- Zheng H., Hu Q., Yang C., Mei Q., Wang P., Li K. (2023). Identification of spoofing ships from automatic identification system data via trajectory segmentation and isolation forest. J. Mar. Sci. Eng. 11, 1516. doi:10.3390/jmse11081516
- Zhou Y., Tan X., Liu Y. (2022). Anomaly detection in multi-sensor time-series using temporal convolution networks with graph attention. IEEE Trans. Industrial Electron. 69, 2205 – 2215. doi:10.1109/TIE.2022.3151768
Citation
Zaman, S. M. A. u., et al. (2026). Detecting CycleGAN-Spoofed AIS data using a GAN fingerprinting method with LSTM-Based classification. Frontiers in Future Transportation, Volume 7. https://doi.org/
- Received
- Accepted
- Published
- Volume
- 7 - 2026
Copyright
Copyright © 2026 Ashfaq uz Zaman, Qamar, Mohd, Sabrina Suhaimi and Khandakar.
License: https://creativecommons.org/licenses/by/4.0/
*Correspondence: Faizan Qamar; Amith Khandakar
Article metrics
- Views
- 0
- Downloads
- 0
- Citations
- 0
- Shares
- 0
