Downloads · 30 days
0
rsd-06/periodyx-exoplanet-classifier-v5
periodyx-exoplanet-classifier-v5 is a machine learning model from rsd-06. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
ISRO BAH 2026 — Problem Statement 07: AI-enabled Detection of Exoplanets from Noisy Astronomical Light Curves
Downloads · 30 days
0
Access
Public
Updated Jul 12, 2026
Repo size
98.5 MB
Likes
0
Public
Click a slice to open those files.
.joblib98.5 MB · 100%
From the Hugging Face model README
ISRO BAH 2026 — Problem Statement #07: AI-enabled Detection of Exoplanets from Noisy Astronomical Light Curves
Team: PeriodyX Goal: Build a robust, interpretable, end-to-end machine learning pipeline to detect exoplanets from raw astronomical light curves, strictly avoiding data leakage and prioritizing physical priors over black-box shape matching.
To find exoplanets, we monitor the brightness of stars over time. When a planet passes in front of its host star (a "transit"), it temporarily blocks a fraction of the star's light. This creates a periodic, box-shaped dip in the star's light curve:

A detected periodic dip signal is called a Threshold Crossing Event (TCE). A TCE is characterized by three main parameters:
Our goal is to build a machine learning model that classifies whether a given TCE is a genuine planet transit or a false positive caused by another astronomical phenomenon — most commonly an eclipsing binary star or background stellar contamination (a "blend").
This is an end-to-end pipeline that takes raw stellar brightness measurements (light curves) from NASA's Kepler/TESS missions and automatically:
Design philosophy: unlike many published systems (e.g. AstroNet) that rely on NASA's proprietary detection pipeline to isolate signals before feeding them into a classifier, PeriodyX owns the entire chain end-to-end — detection through classification — using physically interpretable features rather than a black-box network, and runs on a single commodity machine with no GPU required.
lightkurve (MAST archive access), urllib (NASA Exoplanet Archive TAP API)wotan (biweight filter)astropy.timeseries.BoxLeastSquares, transitleastsquareslmfit (non-linear least squares)xgboost, scikit-learn, optuna (hyperparameter search)pandas, numpyjoblibFastAPI, uvicornThe pipeline is deployed as a full-stack web application on Hugging Face Spaces.
Architecture:
main.py): FastAPI loads the v5 Two-Stage .joblib model at startup and exposes three endpoints:
POST /api/run_synthetic — generates a synthetic Kepler-like light curve, runs the full pipeline, and returns classification probabilities plus a 3-panel visualization.POST /api/run_custom — accepts a user-uploaded CSV (time, flux columns) plus astrophysical priors (stellar radius, temperature, etc.), runs the same pipeline, and returns results.POST /api/run_batch — accepts multiple CSV files for batch processing, perfect for reviewing multiple light curves at once.static/): a dark glassmorphism UI in vanilla HTML/CSS/JS, featuring animated pipeline step indicators, batch-upload support, per-class confidence bars, and a physical diagnostics grid.pipeline.py and all core modules are untouched by the web layer. The backend only calls the pipeline and forwards results to the frontend.Raw Light Curve (Kepler/TESS, via MAST)
|
v
[1] DETRENDING (wotan, biweight filter)
|--------------------------------------------+
v v
[2] PERIODIC SEARCH -- tiered [2b] SINGLE-TRANSIT SCAN
BLS (fast triage, runs on every star) (Sliding window matched filter
| for non-repeating long-period
v (if BLS > noise floor) dips)
TLS (slow, high-sensitivity refinement) |
| v
v (Flagged for human review)
[3] SHAPE CHARACTERIZATION (lmfit)
-> Fits depth, duration, ingress/egress
|
v
[4] FEATURE ENGINEERING & PHYSICAL PRIORS (the "v4/v5" architecture)
-> 1D shape features (SNR, odd-even depth diff, secondary eclipse)
-> Independent stellar priors (radius, temperature, gravity, magnitude)
-> Centroid motion (pixel-level offset magnitude)
-> Stellar Density Ratio (Kepler's Third Law sanity check constraint)
|
v
[5] CLASSIFICATION ENSEMBLE (N=20 XGBoost models)
-> Stage 1: Transit vs. Not Transit
-> Stage 2: Eclipsing Binary vs. Blend vs. Other
-> Outputs final 4-class probabilities + Bootstrap Uncertainty Bounds
Building an astronomical ML pipeline is notoriously susceptible to data leakage. This section documents how the pipeline was iteratively debugged and improved.
fpflag_*) and NASA-computed planetary radius (koi_prad).koi_srad, koi_steff) and pixel-level centroid motion (koi_dicco_mra/mdec) to break the blend degeneracy.eclipsing_binary returned to high levels.Overall held-out test accuracy: ~74% (F1-macro 0.67)
| Class | Precision | Recall | F1-Score | v1/v3 Baseline F1 | v4 F1 |
|---|---|---|---|---|---|
| Transit (Planet) | 0.87 | 0.89 | 0.88 | 0.62 | 0.88 |
| Eclipsing Binary | 0.84 | 0.60 | 0.70 | 0.65 | 0.72 |
| Blend | 0.56 | 0.68 | 0.62 | 0.33 | 0.61 |
| Other | 0.38 | 0.51 | 0.44 | 0.32 | 0.44 |
stellar_density_ratio give the XGBoost ensemble direct access to physics constraints (Kepler's Third Law) that it would otherwise struggle to infer from raw duration/period values alone.git clone https://github.com/rsd-06/periodyx-exoplanet-pipeline.git
cd periodyx-exoplanet-pipeline
pip install -r requirements.txt
Downloads the Kepler KOI Cumulative Table, including the physical columns required for v4 (koi_srad, centroid motion, etc.).
python -c "import urllib.request; urllib.request.urlretrieve('https://exoplanetarchive.ipac.caltech.edu/TAP/sync?query=select+kepid,kepoi_name,koi_disposition,koi_srad,koi_steff,koi_slogg,koi_kepmag,koi_dicco_mra,koi_dicco_mdec,koi_fpflag_nt,koi_fpflag_ss,koi_fpflag_co,koi_fpflag_ec,koi_period,koi_duration,koi_depth+from+cumulative&format=csv', 'data/koi_cumulative.csv')"
Runs the pipeline entirely on synthetic, locally generated data to confirm the environment (lightkurve, wotan, XGBoost) is functioning correctly.
python3 scripts/validate_fixes.py
Phase-scrambles real Kepler data to establish an empirical noise floor, determining the Signal Detection Efficiency (SDE) threshold required to trigger TLS.
python3 scripts/calibrate_threshold.py --koi-csv data/koi_cumulative.csv --sample 150
The heavy step. Downloads raw FITS light curves from MAST, detrends, searches, fits trapezoids, and exports the shape + physical-prior feature table.
python3 scripts/build_training_set.py --koi-csv data/koi_cumulative.csv --bls-threshold 10.77 --workers 8
(Replace 10.77 with your own calibrated threshold from Step 3. This step takes hours for the full 7,000+ star dataset.)
Merges extracted shape features with NASA archival stellar priors, drops rows with missing physical data (MNAR-safe), optimizes hyperparameters via Optuna, and trains the Two-Stage Bootstrap Ensemble (N=20) for uncertainty quantification.
python3 scripts/train_classifier.py --features data/training_features.csv --optuna-trials 50
export HF_TOKEN="your_token"
python3 upload_model.py
koi_prad and (initially, before the physical explanation held up) the centroid data.