CoolFace
Apppublic

rudrani-rane/ATIS

sourceHugging Facemitupdated 7mo agoView on Hugging Face
0likes
App README

🛰️ ATIS — Automated Threat Intelligence System

Planetary Defense Mission Control · Near-Earth Object Monitoring · v1.0

ATIS is a research-grade planetary defense intelligence platform that ingests real NASA JPL asteroid data, runs a Graph Neural Network to learn orbital threat relationships, and surfaces results through an interactive multi-page mission-control dashboard.


Demo

PageURL
Mission Controlhttp://localhost:8000/
3D Galaxy Viewhttp://localhost:8000/galaxy
Threat Watchlisthttp://localhost:8000/watchlist
ML Dashboardhttp://localhost:8000/ml-dashboard

Features

AI Threat Engine

  • Graph Attention Network (GAT) trained on 12,054 Near-Earth Objects
  • GNN + Gradient Boosting hybrid classifier — 5-fold cross-validated accuracy: 99.7%, Recall: 99.1%, F1: 99.2%, ROC-AUC: 0.9999
  • Orbital-only input (neo/pha columns stripped to prevent label leakage)
  • 17 orbital features → 32-dimensional latent embedding space
  • Probabilistic output heads: mean (µ) + uncertainty (σ) per asteroid
  • Hybrid threat score combining GNN intelligence with physical orbital parameters (MOID, H, eccentricity, inclination)
  • PHA probability per asteroid from dedicated classifier head trained with weighted BCE loss

Live Data Integration

  • Real-time asteroid ingestion from NASA JPL Small Body Database (SBDB) API
  • Background updater polling for new close-approach events
  • WebSocket broadcast of live threat score changes to all connected clients

Dashboard Pages (Version 1.0)

PageDescription
HomeMission overview with live dynamic stats from /api/stats — total objects, critical count, PHAs, low-risk count
GalaxyThree.js WebGL 3D orbital visualization of all 12,054 NEOs color-coded by threat level
RadarMOID vs. threat scatter plot — Earth proximity analysis
WatchlistRanked table of top 50 threat asteroids with sortable columns and JPL links
TrajectoryAI-powered orbital path forecast for any asteroid using Kepler propagation
AnalyticsSystem statistics, model performance metrics, and distribution charts
ML DashboardGNN model explainability, 5-fold CV performance metrics, feature importance, embedding clusters, confusion matrix
AlertsReal-time alert feed auto-generated from watchlist threat scores with live 25s refresh
Orbital MechanicsInteractive Kepler equation solver with vis-viva, period, and true anomaly calculations; presets for Apophis, Bennu, Halley, Eros, Earth
Impact CalculatorPi-scaling crater diameter, kinetic energy, and Palermo scale calculator with configurable impactor parameters
N-Body SimulatorVelocity Verlet gravitational simulation with configurable bodies and energy conservation display
Approach CorridorClose approach corridor visualization per asteroid
Impact SimulationGround track and damage zone impact overlay
Historical TimelineHistorical close approach events charted over time (NASA CAD database)

Alert System

  • Auto-generates alerts from watchlist when no history is available
  • Classifies alerts as critical, high, warning, or info based on GNN threat score
  • Live update events injected every 25 seconds from top-threat asteroids

Tech Stack

LayerTechnology
BackendPython 3.x, FastAPI 0.129, Uvicorn
ML / GNNPyTorch 2.10, PyTorch Geometric 2.7
ClassifierScikit-learn GradientBoostingClassifier (on GNN embeddings)
Data / ScienceNumPy, Pandas, SciPy, Scikit-learn
ChartingPlotly 6.5
3D RenderingThree.js (WebGL, CDN)
FrontendVanilla JS, HTML5, CSS3 (custom design system)
TemplatesJinja2
Real-timeWebSockets (websockets 16.0)
Data SourceNASA JPL SBDB API

Getting Started

Prerequisites

  • Python 3.10+
  • pip

Installation

bash
git clone <repo-url>
cd "Automated Intelligence Threat System"
python -m venv venv
venv\Scripts\activate        # Windows
# source venv/bin/activate   # Linux/macOS
pip install -r requirements.txt

Run the Server

bash
uvicorn src.web.main:app --port 8000

Open http://localhost:8000 in your browser.

Note: On first launch ATIS runs GNN inference, fits the PHA probability classifier, and computes 5-fold cross-validation scores. This takes ~60–90 seconds before the server accepts requests.

Retrain the GNN (optional)

bash
python -m src.models.train

GNN Model Details

ParameterValue
ArchitectureGraph Attention Network (GAT)
Input features15 orbital features (neo/pha stripped to prevent leakage)
Hidden dimensions64 (layer 1), 32 (layer 2)
Attention heads4 per layer
Embedding size32-dimensional
Training asteroids12,054 NEOs
PHA classifierGradient Boosting on GNN embeddings + raw MOID + H
CV Accuracy99.7% (5-fold stratified)
CV Recall99.1%
CV F199.2%
ROC-AUC0.9999
Outputµ (embedding mean) + σ (uncertainty) + PHA probability

Scientific Formulas & Algorithms

Keplerian Orbital Mechanics

Kepler's Equation (Eccentric Anomaly):

E - e·sin(E) = M

Solved using Newton-Raphson iteration.

Position Calculation:

x = a·(cos(E) - e)
y = a·√(1-e²)·sin(E)

Velocity (Vis-Viva Equation):

v = √[μ·(2/r - 1/a)]

Impact Energy

Kinetic Energy:

E = ½·m·v²
E_MT = E / (4.184 × 10¹⁵) joules

Crater Diameter (Scaling Law):

D_crater = 1.8 · ρ_a^0.11 · ρ_t^(-1/3) · L^0.13 · v^0.44 · g^(-0.22) · sin(θ)^(1/3)

N-Body Simulation

Gravitational Acceleration:

a_i = Σ [G·m_j·(r_j - r_i) / |r_j - r_i|³]

Verlet Integration:

v(t+Δt/2) = v(t) + a(t)·Δt/2
r(t+Δt) = r(t) + v(t+Δt/2)·Δt
a(t+Δt) = F(r(t+Δt))/m
v(t+Δt) = v(t+Δt/2) + a(t+Δt)·Δt/2

Anomaly Detection

Z-Score:

z = (x - μ) / σ

Isolation Forest Score:

s(x, n) = 2^(-E(h(x))/c(n))

VERSION 2 - LATER

The following features are planned for the next major release and are not yet available in v1.0:

Pages Reserved for v2

FeatureDescription
Timeline (Time Machine)3D time-based orbital propagation with ±10-year slider, asteroid tracking, and historical close-approach playback
Multi-ViewFour synchronized panels: orbit path, close approaches, impact assessment, radar — currently placeholder
Compare TabFull side-by-side asteroid parameter comparison with radar charts and exportable diff
Trends TabThreat score trend analysis with time series forecasting, fully furnished with live data
N-Body SimulationRunning live gravitational simulation with real planetary ephemerides (currently static Velocity Verlet demo)
Better Alert SystemPush notifications, user-configurable thresholds, email/webhook delivery, alert escalation rules

Planned Improvements

  • Proper location-based galaxy view — real Keplerian orbital positions at J2000 epoch instead of z-score approximations
  • Automated nightly sync with full JPL SBDB catalog
  • MPC (Minor Planet Center) observation data for trajectory refinement
  • Temporal GNN — model orbital evolution over time
  • SHAP-based per-asteroid local explainability
  • Monte Carlo impact probability distributions
  • Deflection mission delta-V planner
  • User accounts with personal watchlists and email alerts
  • Docker/container packaging for one-command deployment
  • Mobile-responsive layout pass
  • AR/VR mode for the 3D galaxy view (WebXR)

Data sourced from NASA/JPL — see JPL SBDB for data terms.