Self-Supervised Learning • Behavioral Representation Learning • HNSW Similarity Search • Explainable AI • Counterfactual Threat Simulation • Maritime Intelligence
NaviSight is a behavioral intelligence platform for maritime anomaly detection built around self-supervised representation learning.
The system transforms raw AIS telemetry into latent behavioral embeddings using a Masked Autoencoder Transformer and detects anomalous activity through cohort-aware similarity search, behavioral profiling, and contextual risk fusion.
The architecture was designed to answer a fundamental question:
Can vessel behavior itself become the primary signal for maritime threat detection?
Rather than relying on manually engineered rules, NaviSight learns behavioral manifolds directly from historical trajectories and identifies deviations in latent space.
The platform combines:
- Self-Supervised Transformers
- Geospatial Feature Engineering
- Behavioral Embedding Learning
- HNSW Similarity Search
- Rolling Profile Modeling
- Counterfactual Threat Simulation
- Explainable Risk Attribution
into a unified operational intelligence system.
The result is a framework capable of detecting subtle behavioral anomalies that would remain invisible to threshold-based monitoring systems.
- 192M+ AIS observations processed
- Self-supervised Transformer encoder
- 128-dimensional behavioral embeddings
- Cohort-aware HNSW similarity search
- AUROC up to 0.93
- Interactive Streamlit intelligence dashboard
- Counterfactual threat simulation
| Item | Status |
|---|---|
| Research Paper | Submitted to Ocean Engineering (2026) |
| Codebase | Public |
| Reproducibility | Supported |
| Documentation | Active |
| License | Apache 2.0 |
| Development Status | Research Prototype |
NaviSight was evaluated on approximately 192 million AIS observations from the Aegean Sea.
Key results:
| Method | AUROC |
|---|---|
| One-Class SVM | 0.5007 |
| LOF | 0.5431 |
| Isolation Forest | 0.6252 |
| LSTM AutoEncoder | 0.5617 |
| NaviSight Reconstruction | 0.8737 |
| NaviSight Behavioural Drift | 0.9309 |
Evaluation followed a strictly chronological train-calibration-test protocol.
This project demonstrates experience in:
- Self-Supervised Learning
- Transformer Architectures
- Representation Learning
- Geospatial Analytics
- Time-Series Modelling
- Feature Engineering
- Large-Scale Data Processing
- Approximate Nearest Neighbour Search
- Explainable AI
- Scientific Software Engineering
- Maritime Domain Intelligence
NAVISIGHT: A Self-Supervised Maritime Anomaly Detection Framework for AIS Trajectories
Submitted to:
Ocean Engineering Special Issue: Ocean-Aware Detection and Tracking in Maritime Environments
Status: Under Review (2026)
The repository contains the implementation used to produce the results reported in the manuscript.
Disclaimer: This repository is released independently of the review process. Public code availability does not imply acceptance of the associated manuscript.
AI Engineer • Machine Learning Engineer • Applied AI Research Enthusiast
Focused on:
- Representation Learning
- Self-Supervised Sequence Systems
- RAG Systems
- Agentic AI
- Geospatial Intelligence
- Large Language Models
- Anomaly Detection
If you use NaviSight in academic work, please cite:
@article{korupoju2026navisight,
title={NAVISIGHT: A Self-Supervised Maritime Anomaly Detection Framework for AIS Trajectories},
author={Korupoju, Anil Kumar},
journal={Ocean Engineering},
year={2026},
note={Under Review}
}NaviSight exists to transform maritime monitoring from rule-based alerting into behavioral intelligence.
The long-term objective is to build systems capable of understanding how vessels behave, not simply where they are.
By learning latent behavioral patterns directly from telemetry, NaviSight aims to enable earlier detection of emerging maritime threats while reducing analyst workload.
NaviSight is an end-to-end maritime behavioral intelligence platform that learns latent vessel behavior directly from AIS telemetry and detects anomalous activity using self-supervised representation learning, cohort-aware similarity search, rolling behavioral profiling, and contextual risk fusion.
Unlike traditional maritime monitoring systems that depend on manually crafted rules and thresholds, NaviSight learns behavioral manifolds from historical vessel movement patterns and identifies deviations through representation-space reasoning.
The platform combines:
- Self-Supervised Masked Autoencoder Transformers
- Behavioral Embedding Learning
- Cohort-Gated HNSW Similarity Search
- Rolling Vessel Behavior Profiling
- Dual-Channel Contextual Risk Fusion
- Counterfactual Threat Simulation
- Explainable Anomaly Analysis Dashboard
to create a modern behavioral intelligence framework for maritime anomaly detection.
Interactive dashboard for behavioral analysis, risk assessment, and trajectory visualization.
Counterfactual loitering scenario illustrating behavioral drift detection and risk assessment.
Simulated heading drift used to evaluate deceptive navigation detection and anomaly localization.
Synthetic near-shore trajectory demonstrating detection of suspicious coastal navigation behavior.
- End-to-end AIS processing
- Self-supervised transformer
- Behavioral embeddings
- Approximate nearest-neighbor retrieval
- Rolling behavioral profiles
- Explainable anomaly scoring
- Counterfactual simulation
- Interactive dashboard
Unlike conventional maritime anomaly detection systems, NaviSight combines:
- Self-supervised representation learning
- Multimodal AIS + weather + geospatial fusion
- Behavioural manifold monitoring
- Approximate nearest-neighbour retrieval
- Counterfactual anomaly simulation
- Explainable anomaly analysis
within a single end-to-end framework.
Most maritime anomaly systems focus on trajectories.
NaviSight focuses on behaviour.
NaviSight demonstrates how modern self-supervised learning, approximate nearest-neighbour search, geospatial analytics, and maritime domain knowledge can be combined into a unified anomaly detection framework.
The project was developed as both a research contribution and an exploration of scalable behavioural AI for real-world maritime surveillance systems.
More than 80% of global trade travels by sea.
Every day, millions of AIS transmissions are generated by vessels operating across:
- international shipping lanes
- territorial waters
- ports
- coastal regions
- offshore facilities
Most monitoring systems still rely on:
- static rules
- speed thresholds
- geofencing alerts
- manually engineered heuristics
These approaches struggle to detect:
- covert loitering
- route manipulation
- smuggling activity
- AIS spoofing
- deceptive navigation
- slow behavioral drift
Traditional systems ask:
Did the vessel violate a predefined rule?
NaviSight asks:
Does the vessel still behave like vessels that belong to its behavioral cohort?
This shifts anomaly detection from rule matching to behavioral intelligence.
Rather than relying on fixed thresholds, NaviSight learns normal vessel behavior directly from historical trajectories and identifies subtle deviations that may indicate emerging threats.
| Statistic | Value |
|---|---|
| AIS Records | ~192 Million |
| Evaluation Windows | 262,287 |
| Calibration Windows | 309,268 |
| Transformer Forward Passes | 833,000+ |
| Embedding Dimension | 128 |
| ANN Backend | HNSW |
| Feature Count | 35 |
The published results were generated using:
- Python 3.11
- PyTorch 2.5
- CUDA 12.1
- Random seed 42
- Chronological train-calibration-test split
Key model parameters:
| Parameter | Value |
|---|---|
| Sequence Length | 60 |
| Mask Ratio | 75% |
| Embedding Dimension | 128 |
| Transformer Layers | 4 |
| Attention Heads | 8 |
| Batch Size | 256 |
| Optimizer | AdamW |
| Random Seed | 42 |
NaviSight is trained on large-scale Automatic Identification System (AIS) telemetry collected from commercial maritime traffic operating within the Eastern Mediterranean maritime domain.
The dataset captures vessel movement behavior at scale and serves as the foundation for self-supervised behavioral representation learning.
The following statistics correspond to AIS telemetry snapshot used for exploratory analysis, feature validation, and data quality assessment.
| Attribute | Value |
|---|---|
| AIS Observations | ~192 Million |
| Calibration Windows | 309,268 |
| Evaluation Windows | 262,287 |
| Geographic Region | Aegean Sea |
| Coverage Area | Piraeus Maritime Domain |
| Data Type | Vessel Telemetry |
| Learning Paradigm | Self-Supervised |
| Sequence Length | 60 Steps |
| Engineered Features | 35 |
| Embedding Dimension | 128 |
| ANN Backend | HNSW |
| Storage Format | Partitioned Parquet |
| Inference Backend | PyTorch |
Dataset statistics generated from exploratory profiling and validation pipelines.
Raw vessel telemetry includes:
- Latitude
- Longitude
- Speed Over Ground (SOG)
- Course Over Ground (COG)
- Heading
- Navigation Status
- Timestamp
- Vessel Metadata
- Voyage Context
These signals are transformed into a high-dimensional behavioral representation through extensive feature engineering.
NaviSight augments vessel telemetry with operational maritime context.
Derived geospatial features include:
- Distance to Coast
- Distance to Port
- Distance to Terminal
- Harbor Proximity
- Land Ingress Detection
- Voyage Phase Indicators
- Spatial Density Features
- Regional Context Encoding
This enables the model to reason not only about vessel motion but also about environmental and operational conditions.
To model vessel behavior under realistic operating conditions, AIS trajectories are fused with spatiotemporal weather data.
| Attribute | Value |
|---|---|
| Records | 10,800 |
| Temporal Coverage | September 2018 |
| Time Resolution | 6-Hour Intervals |
| Spatial Representation | Rectilinear Grid |
| Weather Variables | 18 |
| Interpolation Strategy | Trilinear Spatiotemporal Interpolation |
NaviSight incorporates:
| Variable | Description |
|---|---|
| TMP | Temperature |
| RH | Relative Humidity |
| PRMSL | Mean Sea Level Pressure |
| VIS | Visibility |
| WSPD | Wind Speed |
| GUST | Wind Gust |
| UGRD | Zonal Wind Component |
| VGRD | Meridional Wind Component |
| DPT | Dew Point |
| APCP | Accumulated Precipitation |
Weather observations are transformed into vessel-centric behavioral features:
- Headwind Component
- Crosswind Component
- Environmental Resistance
- Visibility Exposure
- Weather Severity Indicators
- Atmospheric Stability Signals
This allows the behavioral encoder to distinguish operational behavior from weather-driven motion changes.
Raw AIS Telemetry
│
▼
Trajectory Cleaning
│
▼
Voyage Segmentation
│
▼
Kinematic Feature Extraction
│
├── Speed
├── Acceleration
├── Turn Rate
├── Jerk
└── Heading Dynamics
│
▼
Geospatial Enrichment
│
├── Port Distance
├── Coast Distance
├── Harbor Features
└── Terminal Context
│
▼
Weather Fusion
│
├── Wind Speed
├── Gusts
├── Visibility
├── Pressure
└── Humidity
│
▼
Temporal Context Encoding
│
├── Hour-of-Day
├── Day-of-Week
└── Voyage Phase
│
▼
35-Dimensional Feature Space
NaviSight's feature registry currently spans four primary domains:
| Category | Purpose |
|---|---|
| Kinematic Features | Vessel motion dynamics |
| Geospatial Features | Environmental context |
| Weather Features | Operational conditions |
| Quality-Control Features | Data reliability signals |
This multimodal representation enables the system to learn behavioral manifolds rather than relying solely on trajectory geometry.
| Domain | Features |
|---|---|
| Physics | 13 |
| Weather | 9 |
| Context | 8 |
| Quality | 5 |
| Total | 35 |
192M+ AIS Observations
│
▼
Trajectory Segmentation
│
▼
Window Generation
│
▼
60-Step Sequences
│
▼
Masked Token Corruption
│
▼
Self-Supervised Training
│
▼
Transformer Encoder
│
▼
128-D Behavioral Embeddings
Most maritime anomaly detection systems focus exclusively on:
- positional tracks
- speed thresholds
- geofencing rules
NaviSight instead learns from a richer behavioral state space combining:
Movement
+
Environment
+
Weather
+
Context
+
Historical Behavior
This enables detection of subtle anomalies that may remain invisible to traditional rule-based monitoring systems.
Learn compact latent representations of vessel behavior.
Compare vessels against historical behavioral peers rather than global populations.
Surface risk drivers and nearest historical behavioral matches.
Generate realistic adversarial vessel trajectories.
Interactive intelligence hub for monitoring, validation, and analysis.
Raw AIS Telemetry
│
▼
Geospatial Feature Engineering
│
▼
Sequence Construction
│
▼
Masked Autoencoder Transformer
│
▼
128-D Behavioral Embeddings
│
┌──────┴──────────────┐
▼ ▼
HNSW Index Behavior Profiles
│ │
└──────────┬──────────┘
▼
Dual-Channel Detector
│
▼
Counterfactual Simulator
│
▼
Interactive Maritime Analytics Dashboard
flowchart TD
A[AIS Telemetry]
A --> B[Feature Engineering]
B --> C[Sequence Builder]
C --> D[Masked Autoencoder Transformer]
D --> E[128-D Behavioral Embeddings]
E --> F[HNSW Similarity Search]
E --> G[Rolling Behavioral Profiles]
F --> H[Dual Channel Detector]
G --> H[Risk Fusion Engine]
H --> I[Counterfactual Threat Simulator]
I --> J[Tactical Intelligence Dashboard]
The framework operates in three stages:
AIS trajectories are transformed into multimodal behavioral sequences containing:
- Kinematic features
- Environmental features
- Contextual features
- Data quality features
A Maritime Masked Autoencoder is trained using:
- Reconstruction loss
- Contrastive consistency loss
to learn vessel behavior embeddings without anomaly labels.
Trajectory embeddings are:
- L2 normalized
- Indexed using HNSW
- Stored as behavioral memory
This enables efficient retrieval of historically similar vessel behavior.
Two complementary anomaly signals are computed:
Measures local trajectory reconstruction failure.
Measures distance from historical behavioral neighbors.
The final anomaly score is obtained through calibrated fusion.
NaviSight introduces several architectural concepts inspired by modern representation learning and behavioral intelligence systems.
Rather than training directly on anomaly labels, NaviSight learns vessel behavior through reconstruction objectives.
Benefits:
- reduced labeling requirements
- improved generalization
- richer latent representations
Instead of comparing all vessels globally, NaviSight isolates comparisons to behaviorally similar vessel classes.
Benefits:
- lower false positive rates
- improved contextual relevance
- more meaningful peer comparisons
Historical behavior is continuously tracked using exponentially weighted profile updates.
Benefits:
- adaptive baselines
- temporal awareness
- behavior drift detection
The system can inject realistic behavioral perturbations.
Examples:
- Covert Loitering
- Dead Reckoning Drift
- Coastal Creep
Benefits:
- validation
- robustness testing
- explainability
NaviSight Maritime Behavioral Encoder
v1.0
Masked Autoencoder Transformer
Learn vessel behavioral representations from AIS trajectories.
| Attribute | Value |
|---|---|
| Model Type | Masked Autoencoder Transformer |
| Learning Paradigm | Self-Supervised |
| Domain | Maritime AIS |
| Embedding Dimension | 128 |
| Input Type | Sequential Telemetry |
| Output | Behavioral Embedding |
60-step telemetry sequences.
Features include:
- position
- velocity
- heading
- turn rate
- harbor proximity
- coast distance
- terminal distance
- derived motion features
128-dimensional latent representation
0.0 → 1.0
NOMINAL
WARNING
CRITICAL
- Anomaly Detection
- Vessel Similarity Search
- Threat Assessment
- Behavioral Clustering
- Operational Monitoring
Operational maritime intelligence.
- dependent on AIS quality
- vulnerable to missing transmissions
- limited environmental context
NaviSight follows a strictly chronological evaluation protocol.
| Period | Purpose |
|---|---|
| Jan 2018 – Jun 2019 | Training |
| Jul 2019 – Sep 2019 | Calibration |
| Oct 2019 – Dec 2019 | Testing |
This prevents temporal leakage and evaluates generalization to future vessel traffic patterns.
Thresholds are estimated from the calibration period using the 99.5th percentile.
No manually tuned thresholds are used.
- AUROC
- AUPRC
- Precision
- Recall
- F1 Score
- Confusion Matrix
Global AIS telemetry contains hundreds of millions of records.
Partitioned Parquet Lakehouse architecture.
Benefits:
- efficient storage
- lazy loading
- parallel processing
Exhaustive pairwise vessel comparison is computationally infeasible.
Hierarchical Navigable Small World (HNSW) graphs.
Benefits:
- logarithmic search complexity
- real-time retrieval
- scalable indexing
Different vessel classes naturally exhibit different behaviors.
Cohort-Gated ANN Search.
Benefits:
- class-aware comparisons
- stronger contextual relevance
Deep anomaly models are often opaque.
Risk attribution engine.
Provides:
- nearest historical matches
- feature contributions
- counterfactual validation
Every trajectory window is transformed into:
Trajectory
↓
Transformer Encoder
↓
CLS Token
↓
128-D Embedding
The embedding captures:
- movement style
- route characteristics
- maneuvering behavior
- environmental interaction
HNSW
Each embedding tracks:
embedding_id
vessel_id
timestamp
trip_id
superclass
allowing traceability from latent vectors back to raw trajectories.
NaviSight contains a dedicated adversarial simulation engine.
Simulates circular holding patterns.
Use cases:
- surveillance
- rendezvous behavior
- illegal waiting
Simulates deceptive heading drift.
Use cases:
- AIS spoofing
- route manipulation
Simulates constrained coastal movement.
Use cases:
- smuggling
- illegal fishing
- shoreline monitoring
The platform includes a professional operational dashboard.
Features:
- live risk scoring
- anomaly classification
- behavioral diagnostics
Interactive geospatial intelligence map.
Displays:
- observed route
- simulated route
- vessel status
- environmental context
Trend visualization:
- speed
- heading
- course
- maneuvering dynamics
Displays:
- nearest behavioral neighbors
- embedding distance
- similarity confidence
navisight/
│
├── configs/ # Configuration
│ ├── threshold/
│ └── weather/
│
├── data/ # Raw, processed, and embedding datasets
│ ├── raw/
│ ├── processed/
│ └── embeddings/
│
├── models/ # Trained checkpoints and ANN indices
│ ├── checkpoints/
│ └── state/
│
├── navisight/
│ ├── pipeline/ # Data ingestion & feature engineering
│ ├── geo/ # Geospatial and weather enrichment
│ ├── engine/ # Training pipeline
│ ├── models/ # Transformer architecture
│ └── evaluation/ # Embeddings, ANN search & anomaly detection
│
├── scripts/ # End-to-end pipeline entry points
│
├── dashboard/ # Streamlit tactical intelligence dashboard
│
├── assets/ # Figures, screenshots and logs
│
├── requirements.txt
├── README.md
└── LICENSE
| Module | Purpose |
|---|---|
pipeline |
Data ingestion, cleaning, segmentation, and feature engineering |
geo |
Weather interpolation and geospatial enrichment |
engine |
Training pipeline and feature scaling |
models |
Transformer encoder and neural network components |
evaluation |
Embedding extraction, HNSW indexing, behavioral profiling, and anomaly detection |
dashboard |
Interactive Streamlit interface for visualization and validation |
scripts |
Executable entry points for training, evaluation, and benchmarking |
| Metric | Value |
|---|---|
| Embedding Size | 128 |
| Sequence Length | 60 |
| ANN Backend | HNSW |
| Storage Format | Parquet |
| Inference Framework | PyTorch |
| Dashboard | Streamlit |
| Analytics Engine | Polars |
| Search Complexity | O(log N) |
| Layer | Technology |
|---|---|
| Deep Learning | PyTorch |
| Dashboard | Streamlit |
| Data Processing | Polars |
| Visualization | Plotly |
| Similarity Search | HNSW |
| Storage | Parquet |
| Numerical Computing | NumPy |
| Language | Python |
git clone https://github.com/yourusername/navisight.git
cd navisightpip install -r requirements.txtRemove legacy embeddings, processed data, and index files to ensure a fresh run.
rm -rf data/embeddings/* data/processed/* models/state/index/*Initialize the geospatial normalization statistics used throughout the pipeline.
python scripts/compute_global_stats.pyProcess raw telemetry, resample trajectories, and generate the processed dataset.
python scripts/train_pipeline.pyGenerate latent representations and create the initial embedding index.
python scripts/build_embeddings.pyPopulate the class-specific HNSW indices and prepare the retrieval database.
python scripts/eval_pipeline.pystreamlit run dashboard/view_validation_dashboard.py- lower retrieval latency
- excellent recall
- dynamic insertions
Higher memory consumption.
Decision:
Prioritized retrieval quality and operational latency.
- minimal labeling requirements
- better scalability
Interpretability challenges.
Decision:
Added explainability layers through similarity retrieval and feature attribution.
Behavior First, Rules Second
Traditional systems:
Rule → Alert
NaviSight:
Behavior → Embedding → Risk
Cohort-Aware Similarity
Rejected:
Global vessel comparisons.
Implemented:
Superclass-isolated HNSW indices.
Reason:
Different vessel classes exhibit fundamentally different movement patterns.
Explainability as a First-Class Citizen
Every anomaly score must be traceable through:
- nearest neighbors
- feature attribution
- counterfactual simulation
Most gains came from improving trajectory quality rather than increasing model complexity.
Many anomalies become obvious when viewed through behavioral neighbors.
Operational users require trust before they accept anomaly alerts.
Counterfactual simulation revealed failure modes that traditional evaluation never exposed.
The same trajectory may be normal for one vessel class and anomalous for another.
AIS Data
↓
Feature Engineering
↓
Embedding Generation
↓
ANN Indexing
↓
Behavior Profiling
↓
Threat Detection
↓
Dashboard Visualization
- Graph Neural Networks
- Multi-Vessel Interaction Modeling
- Online Learning
- Satellite Data Fusion
- Global Traffic Forecasting
- Streaming Inference
- Distributed HNSW Infrastructure
- Explainable Attention Maps
- Real-Time Alerting
- Maritime Security
- Illegal Fishing Detection
- Port Intelligence
- Offshore Asset Monitoring
- Trade Route Analysis
Relevant fields:
- Representation Learning
- Self-Supervised Learning
- Geospatial AI
- Maritime Informatics
- Anomaly Detection
- Approximate Nearest Neighbor Search
- Explainable AI
Contributions are welcome.
Areas of interest:
- anomaly detection
- geospatial analytics
- transformer architectures
- behavioral modeling
- visualization
- performance optimization
Licensed under the Apache 2.0 License.
Built using open-source technologies from:
- PyTorch
- Streamlit
- Plotly
- Polars
- NumPy
and inspired by research across:
- Self-Supervised Learning
- Geospatial Intelligence
- Maritime Analytics
- Behavioral Modeling
If you found NaviSight useful:
⭐ Star the repository
🍴 Fork the project
🛰️ Build the future of maritime intelligence





