ATSCC — ADS-B Trajectory Self-Supervised Contrastive Encoder
Istanbul Airport (LTFM) · Arrival & Departure Flights
Trained as part of a graduation project at Hacettepe University, Department of Statistics.
Project: Multimodal Flight Post-Terminal Duration Prediction via Cross-Modality Adaptation of Large Language Models and Self-Supervised Trajectory Representation
Author: Yaşar Yiğit Turan · Supervisor: Prof. Dr. Serpil Aktaş Altunay
What is ATSCC?
ATSCC is a self-supervised contrastive encoder for ADS-B flight trajectories. It learns meaningful trajectory representations without any labels by pulling together timesteps belonging to the same flight segment (positive pairs) and pushing apart timesteps from different segments (negative pairs) using an SNN-style contrastive loss.
The resulting embeddings are used as inputs to a Multimodal LLM Regressor that predicts post-terminal duration — the time an arriving aircraft spends inside the Terminal Maneuvering Area (TMA, ~120 km radius around LTFM) from airspace entry until landing.
Architecture
| Component | Details |
|---|---|
| Input features | 11D: position (e, n, u), direction (ux, uy, uz), polar coords (r, sinθ, cosθ), Δt, gap_flag |
| Input projection | Linear(11 → 192) + LayerNorm + L2 Norm |
| Backbone | 4-layer Causal Transformer (masked self-attention, no future leakage) |
| Attention heads | 8 |
| d_model | 192 |
| d_ff | 768 |
| Output projection | Linear(192 → 256) + LayerNorm + L2 Norm |
| Embedding dim | 256 |
| Max sequence length | 256 timesteps |
| Loss | SNN Contrastive Loss (temperature=0.10) |
| Regularization | Dropout=0.25, RandomMaskProb=0.15, DropPath=0.10 |
Training
| Setting | Value |
|---|---|
| Dataset | ADS-B trajectories · Istanbul Airport (LTFM) |
| Raw flights | 566,791 |
| Sampled flights | 100,000 |
| Arrival flights | 40,450 |
| Departure flights | 41,318 |
| Train / Val split | 73,592 / 8,176 (90/10) |
| Optimizer | AdamW (lr=7e-6, wd=5e-4) |
| LR schedule | Warmup (4 epochs) + Cosine Annealing |
| Effective batch size | 64 (32 × 2 grad accum) |
| Best epoch | 17 |
| Best val loss | 0.6045 |
| Hardware | Apple M-series (MPS) |
Embedding Quality
| Metric | Value | Interpretation |
|---|---|---|
| Alignment | ~0.297 | Similarity of same-segment pairs (lower = better) |
| Uniformity | ~−3.23 | Global spread in embedding space (closer to 0 = better) |
Downstream Task Performance (Post-Terminal Duration Prediction)
Monthly MAE on the full multimodal system (ATSCC + LLM Regressor):
Usage
Install dependencies
pip install torch pandas numpy
Load model and extract embeddings
import torch
import numpy as np
import pandas as pd
from atscc_model import ATSCCEncoder, ATSCCConfig, load_model, extract_embeddings, load_trajectories
# Load checkpoint
model, cfg = load_model("atscc_best.pt", device="cpu")
# Prepare your trajectory data (parquet with required columns)
# Required columns: e_m, n_m, u_m, ux, uy, uz, r, sin_theta, cos_theta,
# delta_t, gap_flag, flight_id, point_timestamp, segment_id
cfg.traj_path = "your_trajectory_data.parquet"
flight_groups = load_trajectories(cfg)
# Extract 256-dim embeddings
flight_ids = list(flight_groups.keys())
emb_df = extract_embeddings(model, flight_groups, flight_ids, cfg)
# emb_df has columns: flight_id, emb (np.array of shape [256])
print(emb_df.head())
Expected input format
Each flight trajectory must have the following columns:
| Column | Type | Description |
|---|---|---|
flight_id |
str | Unique flight identifier |
point_timestamp |
datetime (UTC) | Timestamp of each ADS-B point |
segment_id |
int | RDP-based segment ID |
e_m, n_m, u_m |
float32 | ENU position (meters) |
ux, uy, uz |
float32 | Direction unit vector |
r |
float32 | Polar radius |
sin_theta, cos_theta |
float32 | Polar angle |
delta_t |
float32 | Time gap to previous point (seconds) |
gap_flag |
float32 | 1.0 if data gap > threshold, else 0.0 |
Files
| File | Description |
|---|---|
atscc_best.pt |
Best checkpoint (epoch 17, val_loss=0.6045) |
atscc_last.pt |
Final checkpoint (epoch 25) |
atscc_training.ipynb |
Full training notebook |
embedding_viz.ipynb |
Embedding visualization (UMAP/t-SNE) |
export_full_embeddings.py |
Script to export all embeddings to parquet |
training_history.csv |
Loss, alignment, uniformity per epoch |
training_plot.png |
Training curves |
Project
This model is part of a larger Istanbul Airport Decision Support System.
- 📁 GitHub: yyigitturan/ist-airport-decision-support-system
- 🔗 LinkedIn: yaşar-yiğit-turan
- 📧 Contact: yasaryigitturan@gmail.com
Citation
If you use this model or code, please cite:
@misc{turan2026atscc, title = {Multimodal Flight Post-Terminal Duration Prediction via Cross-Modality Adaptation of Large Language Models and Self-Supervised Trajectory Representation}, author = {Turan, Yaşar Yiğit}, year = {2026}, note = {Undergraduate Final Project, Department of Statistics, Hacettepe University} }
