TESS light-curve analysis for automatic exoplanet transit detection.
A deep learning pipeline for detecting exoplanet transit candidates in TESS stellar light curves using a hybrid CNN-MLP neural network.
- Deep learning pipeline: see README_DL.md for training & performance
- Full pipeline (data → math → model): see README_PIPELINE.md
- Current DL test accuracy: 60.31% (27 epochs, early stopped from max 80)
This project analyzes TESS (Transiting Exoplanet Survey Satellite) stellar light curves to classify stars as hosting exoplanet candidates or not. The system combines:
- 1D Convolutional Neural Network (CNN) — learns patterns in brightness dips from light curves
- Multi-Layer Perceptron (MLP) — processes Box Least Squares (BLS) transit features
- Hybrid fusion — combines both feature types for improved classification
| Label | Meaning | Class |
|---|---|---|
| CP, KP, PC | Confirmed / Known / Candidate planet | 1 — Planet |
| FP, FA | False positive / False alarm | 0 — Not a planet |
Latest Results: 60.31% test accuracy with a hybrid neural network
| Metric | Score |
|---|---|
| Test Accuracy | 60.31% |
| Test F1 Score | 52.43% |
| Test ROC-AUC | 63.61% |
| Best Validation Accuracy | 69.5% |
| Training Epochs | 27 (early stopped from max 80) |
- Total Samples: 1,598 (after deduplication)
- Planet Candidates: 736
- Non-planets: 862
- Test Set Size: 320 (20% hold-out)
- Train/Val/Test Split: 64% / 16% / 20%
git clone https://github.com/Ash310u/Exoplanet-detector.git
cd Exoplanet-detector
pip install -r requirements.txtpython3 src/train_cnn.py --epochs 80 --patience 15Open src/plot.ipynb and run from the "DL MODEL" section.
├── README.md # Project overview
├── README_DL.md # DL training summary & performance
├── README_PIPELINE.md # Full pipeline: data → math → model layers
├── requirements.txt # Python dependencies
├── data/processed/
│ ├── labels_cleaned.csv # Ground truth labels
│ ├── training_tid_features.csv # BLS features
│ ├── stars/ # Light curve files (TIC_*.npy)
│ └── transit_cnn.pt # Trained model
└── src/
├── train_cnn.py # Main training script
├── plot.ipynb # Interactive notebook
├── extract_features.py # BLS feature extraction
└── build_folded_lightcurves.py # Phase-folding utility
Light Curves (.npy) BLS Features (CSV)
│ │
▼ ▼
Preprocess Normalize
│ │
└───────┬───────────────┘
▼
TransitHybrid Model
┌─────────────────┐
│ CNN Branch │
│ BLS Branch │
│ Fusion Head │
└─────────────────┘
▼
Planet Probability
CNN Branch: Conv1d → BatchNorm → ReLU → MaxPool (×2) → 32 features
BLS Branch: Linear(5→128) → Linear(128→64) → Linear(64→32)
Fusion: Concatenate + Binary classifier
| Setting | Value |
|---|---|
| Optimizer | AdamW (lr=0.001) |
| Loss | Binary cross-entropy |
| Batch Size | 32 |
| Early Stopping | 15 epochs |
| Max Epochs | 80 |
| Model | Accuracy |
|---|---|
| Original CNN | 49.4% |
| Hybrid Model | 60.3% |
| XGBoost Baseline | ~63.4% |
Light curves are not phase-folded, limiting CNN learning. To improve:
python3 src/build_folded_lightcurves.py
python3 src/train_cnn.py --epochs 80 --patience 15Phase-folding aligns repeated transit dips, making patterns clearer.
- Full pipeline guide (data extraction → formulas → DL layers): See
README_PIPELINE.md - Detailed DL documentation: See
README_DL.md - Training arguments: Use
--helpflag with training script
- PyTorch — Neural network framework
- NumPy — Numerical computing
- Pandas — Data manipulation
- Scikit-learn — Preprocessing & metrics
- Jupyter — Interactive notebooks
| File | Purpose |
|---|---|
train_cnn.py |
Main training script |
plot.ipynb |
Interactive notebook |
extract_features.py |
BLS feature extraction |
transit_cnn.pt |
Saved model & threshold |
- Light curve: 512-point normalized brightness sequence
- BLS features: Period, depth, duration, SNR, power
- Clip outliers (5th–95th percentile)
- Detrend with Savitzky–Golay filter
- Robust scale:
(x - median) / IQR
- Stratified train/val/test split
- Balanced class sampling
- Per-epoch threshold optimization (0.2–0.8)
- Model checkpointing & early stopping
- Phase-folded light curves
- Data augmentation (time warping, noise)
- Ensemble methods
- Hyperparameter optimization
- Advanced feature engineering
Research and educational use.
Input: 512-point flux + 5 BLS features
Output: Planet candidate probability
Task: Binary classification
Model: TransitHybrid (CNN + MLP)
Accuracy: 60.31% (27 epochs, early stopped from max 80)