Spatio-Temporal Graph Anomaly Benchmark
- Spatio-Temporal Graph Anomaly Benchmark is a testbed for detecting anomalies in maritime traffic using dynamic spatio-temporal graphs.
- It converts raw AIS vessel trajectories into graph structures with node, edge, and graph-level annotations to capture varied anomaly scales.
- LLM-driven agents synthesize realistic anomalies, and baseline models demonstrate improved detection using combined temporal and spatial features.
The Spatio-Temporal Graph Anomaly Benchmark is a structured testbed for evaluating anomaly detection methods in maritime traffic scenarios characterized by sparse, irregular, and non-grid spatio-temporal structures. It extends the Open Maritime Traffic Analysis Dataset (OMTAD) and introduces graph-centric representations and ground-truth anomaly annotations at multiple granularities, facilitating rigorous assessment of node-level, edge-level, and graph-level anomaly detection approaches in complex, real-world, non-grid environments (Kim et al., 23 Dec 2025).
1. Construction of the Spatio-Temporal Graph Benchmark
The foundation of the benchmark is the transformation of raw AIS (Automatic Identification System) vessel trajectories into dynamic spatio-temporal graphs. Each input trajectory is defined as
where comprises vessel identity (MMSI), temporal index, geolocation, speed over ground (SOG), and course over ground (COG), across a window of length .
These trajectories are mapped to a spatio-temporal graph: with nodes , each representing a vessel at a particular timestamp, and edges: Spatial edges connect nodes within a distance threshold or through OPTICS clustering, encoding local proximity: Temporal edges link consecutive states of each vessel:
Anomalies are considered at three granularities:
- Node-level: Set (per-vessel state anomalies).
- Edge-level: Set (anomalous vessel interactions).
- Graph-level: Set (whole-snapshot anomalies).
Formally, the benchmark defines:
- Node anomaly detection as ,
- Edge anomaly detection as ,
- Graph anomaly detection as (Kim et al., 23 Dec 2025).
2. Dataset Composition and Feature Engineering
The underlying data is sourced from OMTAD, covering 2018–2020 in Western Australia. It comprises trajectories (Cargo: 14,384; Tanker: 4,020; Fishing: 466; Passenger: 254). Spatio-temporal graphs are generated over sliding time windows (e.g., hours), each with vessels per graph.
Key statistics:
- Number of graph snapshots:
- Each graph: , (dense clustering),
Features:
- Nodes: MMSI (embedded), timestamp, latitude, longitude, SOG, COG, ΔSOG/Δt, ΔCOG/Δt, wind/wave/current bins, visibility proxy (–14).
- Edges (optional): Distance, relative bearing, ΔSOG, ΔCOG (–5).
- Preprocessing: continuous features standardized, angular features as , cyclical encoding for time.
3. Anomaly Synthesis Methodology
Two specialized agents leveraging LLMs structure the anomaly generation protocol:
- Trajectory Synthesizer: Densifies sparse subgraphs by generating “virtual neighbors” through perturbation of the focal vessel’s kinematic parameters (latitude, longitude, SOG, COG), or by allocating real nearby vessels when available.
- Anomaly Injector: Converts high-level anomaly semantics (e.g., “sudden evasive zig-zag,” “risky rendezvous,” “group loitering”) into explicit graph modifications with corresponding labels at the node (), edge (), and graph () levels.
Types of Injected Anomalies
- Node-level (kinematic): Speed spikes or drops, implemented as
for acceleration and turn rate.
- Edge-level (interaction): Near-collision events (forces trajectories to cross within distance ), pursuit/evasion via relative heading manipulation.
- Graph-level (group): Loitering (clusters reduce speed below threshold for extended period), convoy deviation (subgroups diverge from main routes).
4. Task Definition and Evaluation Procedure
The benchmark defines (semi-)supervised binary classification tasks for all three anomaly granularities. Typical data splits are 70% training, 10% validation, and 20% test by trajectories.
Loss Functions:
- Graph-level uses binary cross entropy:
- Analogous definitions apply at node and edge levels.
Evaluation Metrics:
For each granularity:
- Precision:
- Recall:
- F-score:
- AUC:
5. Baseline Methods and Empirical Results
A suite of baseline models is evaluated on the benchmark:
- Temporal baselines: LSTM (on individual trajectories) and Transformer (self-attention over time).
- Spatio-temporal GNNs (ST-GNN):
- LSTM+GNN (temporal LSTM + per-step graph convolution)
- Transformer+GNN (self-attention in time + spatial graph convolution)
- Standard STGCN, DCRNN, Graph WaveNet.
Table: Node, Edge, and Graph-Level AUC Performance
| Model | Node AUC | Edge AUC | Graph AUC (r_traj=0.1) | Graph AUC (r_traj=0.5) |
|---|---|---|---|---|
| Transformer | 0.68 | 0.70 | 0.62 | 0.68 |
| LSTM | 0.65 | 0.67 | 0.60 | 0.65 |
| LSTM+GNN | 0.82 | 0.84 | 0.78 | 0.85 |
| Transformer+GNN | 0.85 | 0.87 | 0.81 | 0.88 |
Key findings:
- Including spatial graph structure (+GNN) yields large improvements (10–25 points AUC) at all granularities.
- The Transformer+GNN hybrid consistently achieves the highest AUC across tasks, demonstrating complementarity between temporal self-attention and spatial graph convolution.
- Anomaly detection appears more tractable at the graph level (where aggregation mitigates noise) than at node or edge granularity (Kim et al., 23 Dec 2025).
6. Significance and Outlook
The Spatio-Temporal Graph Anomaly Benchmark systematically addresses challenges of anomaly detection in maritime environments lacking fixed spatial anchors and exhibiting varied anomaly scales. By repurposing OMTAD as a multi-granularity anomaly detection benchmark, augmenting with LLM-driven synthesizers and injectors, and establishing rigorous task definitions, it provides a reproducible platform for advancing graph-based methodologies in non-grid, dynamic domains. Preliminary baselines already demonstrate that robust exploitation of spatio-temporal relational structure can substantially improve detection capability—an assertion directly substantiated by AUC results. The benchmark framework invites further innovation in modeling, unsupervised detection, and dynamic graph learning tailored to highly irregular spatio-temporal systems (Kim et al., 23 Dec 2025).