METHODOLOGY

1. AIS Data and Preprocessing

The Automatic Identification System (AIS) is mandatory for vessels > 300 GT under IMO SOLAS. Class A transponders transmit every 2-12 seconds when the vessel is underway.

Fields used:
MMSI, timestamp, lat, lon, SOG, COG, heading, navstat, vessel_type

Data Quality Issues

  • GPS noise: ±10m typical, ±100m in poor conditions
  • Timestamp gaps: normal in high-traffic areas (VHF congestion)
  • Erroneous MMSI: some vessels transmit invalid identifiers
  • Spoofing: deliberately false positions (active research area)

Preprocessing Pipeline

1. Remove invalid MMSI (length ≠ 9)
2. Filter SOG > 50 kn (physically impossible)
3. Remove jump points > 30 kn implied speed
4. Linear interpolation for gaps < 5 min
5. Segment trajectories at gaps > 30 min

2. ML Anomaly Detection

Feature Vector per vessel-day

mean_sog, std_sog
Speed by vessel type
cog_change_rate
Turning behavior
total_gap_minutes
Total AIS gap time while SOG > 0.5
loitering_index
Fraction of time within 2nm
destination_consistency
Cosine similarity with declared destination
route_deviation
Hausdorff distance from DBSCAN cluster

Model: Isolation Forest

IsolationForest(n_estimators=200, contamination=0.02, random_state=42)

Trained on Danish Maritime Authority open dataset (2022-2023, 4.2M vessel-days). Domain adaptation using CORAL for Aegean vs Baltic.

Performance (DMA test set)

0.71
Precision
0.62
Recall
0.66
F1

3. Data Gateway and Production Flow

AISHub
Feed
Pre-process
Clean
Features
Extract
IF Score
Model
Rules
Overlay
Frontend
Display

Data Sources

DataSourceAccessUse
AIS positionsAISHubFreeLive feed
Historical AISDanish Maritime AuthorityOpenModel training
Marine Protected AreasEEA Natura 2000CC-BYFishing zones
BathymetryGEBCO 2024OpenDepth check
Port dataPiraeus Port AuthorityPublicPort reference
Demo: Static pre-computed snapshot. In production: 10-minute refresh cycle.

References

• MDPI Marine Science 2023 - Isolation Forest + trajectory clustering

• ScienceDirect Ocean Engineering 2024 - STAD dynamic pattern clustering

• AIS-LLM Paper 2025 - Port of Piraeus anomaly detection benchmarks