A research-grade ML framework and interactive application for Remaining Useful Life (RUL) prediction in aircraft turbofan engines. SHIFT-TS investigates how models learn representations under complex operational conditions, evaluates zero-shot transfer versus few-shot adaptation on unseen engines, and estimates prediction uncertainty under distribution shift.
Traditional Remaining Useful Life (RUL) models assume that training data and operational deployment conditions match. In mission-critical aerospace systems, operating regimes fluctuate, sensor channels degrade or experience noise, and newly introduced engine fleets may have little or no labeled failure trajectories.
Standard deep learning models frequently produce confident but catastrophically incorrect predictions under distribution shift.
SHIFT-TS addresses three core research questions:
- Self-Supervised Representation: Can models learn rich degradation dynamics directly from raw, unlabelled multivariate sensor streams?
- Few-Shot Adaptation: Can an agent adapt to unseen operational regimes using 1%, 5%, or 20% of labeled target fleet data under different encoder fine-tuning regimes, or does zero-shot transfer perform better?
- Epistemic Uncertainty Estimation: Can Monte Carlo Dropout uncertainty quantify when a prediction cannot be trusted, flagging high-error predictions before failure?
NASA C-MAPSS FD002 (21 Sensors, 3 Flight Settings, 6 Operating Regimes)
↓
Sliding Window Extraction (30 Cycles)
↓
2-Layer Recurrent GRU Encoder
↓
┌───────────────────────────────┐
│ Self-Supervised Learning │
├───────────────┬───────────────┤
│ Masked Recon │ Contrastive │
│ (Channel Loss)│ InfoNCE Loss │
└───────────────┴───────────────┘
↓
Few-Shot Domain Adaptation (1%, 5%, 20% Target Labels)
↓
Monte Carlo Dropout Inference (T=20 Stochastic Passes)
↓
RUL Point Estimate + 95% Credible Interval (±1.96σ)
- Dataset: NASA C-MAPSS FD002 (6 operating regimes, 260 training engines, 259 test engines).
- Target Fleet MAE / RMSE:
18.77/23.91cycles zero-shot under operational regime shift. - Uncertainty: Spearman ρ = 0.135 between MC Dropout predictive variance and absolute error — positive correlation confirms lower uncertainty tracks lower error under selective prediction.
- Selective Prediction: Risk–coverage curve shows MAE of
7.33at 5% coverage (highest-confidence predictions) rising to18.78at full coverage. - Few-Shot Adaptation: Ablation across 1%, 5%, and 20% target-engine splits under frozen-encoder, partially unfrozen, and fully fine-tuned regimes. Fully fine-tuned configurations improve MAE to 17.91 (1%) and 17.71 (20%) over held-out split baselines.
- Python 3.9+
- Node.js 18+ & npm
Clone the repository and enter the directory:
git clone https://github.com/Khushi256/Shift-TS.git
cd Shift-TSThe interactive workstation runs a client-side interface bundled with realistic C-MAPSS FD002 model trajectories, uncertainty bands, and robustness benchmarks:
# Enter frontend directory
cd frontend
# Install dependencies
npm install
# Start local development server
npm run devOpen your browser at http://localhost:5173.
To test the production build:
npm run build
npm run previewTo run the PyTorch models, SSL pretraining, few-shot adaptation, or robustness suites:
From the repository root:
pip install -r requirements.txtVerify all 6 core modules (data ingestion, baseline GRU, SSL heads, few-shot adaptation, MC dropout uncertainty, and 8-fault robustness suite):
python tests/smoke_test_all_cores.py# 1. Train Baseline GRU model on training fleet
python experiments/run_baseline.py
# 2. Run Self-Supervised Learning (Masked Reconstruction + InfoNCE)
python experiments/run_ssl.py
# 3. Run Few-Shot Adaptation across 1%, 5%, and 20% label regimes
python experiments/run_fewshot.py
# 4. Run Monte Carlo Dropout uncertainty calibration & coverage analysis
python experiments/run_uncertainty.py
# 5. Run sensor fault resilience tests (Gaussian noise, dropouts, drift)
python experiments/run_robustness.pySHIFT-TS/
├── CMAPSSData/ # NASA C-MAPSS FD002 sensor telemetry files
├── data/ # Cached tensors and operational splits
├── experiments/ # Research experiment scripts
│ ├── run_baseline.py # Standard GRU training
│ ├── run_ssl.py # Self-supervised pretraining
│ ├── run_fewshot.py # 1%, 5%, 20% adaptation experiments
│ ├── run_uncertainty.py # MC Dropout epistemic uncertainty & calibration
│ └── run_robustness.py # Sensor noise and channel dropout testing
├── frontend/ # React + Vite interactive research workstation
│ ├── src/
│ │ ├── api/ # Model inference data & telemetry feeds
│ │ ├── components/ # Workstation UI components & charts
│ │ ├── pages/ # Landing, Predict, Performance, Robustness, About
│ │ └── tokens/ # Research dark-mode design system tokens
│ ├── package.json
│ ├── vercel.json # Vercel SPA routing configuration
│ └── vite.config.js
├── models/ # PyTorch checkpoints (baseline_best.pt)
├── notebooks/ # Exploratory data analysis notebooks
├── src/ # Core ML library source code
│ ├── data/ # Sequence windowing & normalization
│ ├── evaluation/ # Metrics: RMSE, MAE, ECE, Risk-Coverage, Rho
│ ├── models/ # GRU encoder, SSL heads, MC Dropout
│ └── training/ # Losses, few-shot fine-tuning loops
├── tests/ # Validation and smoke test suites
├── requirements.txt # Python dependencies
└── README.md
- NASA C-MAPSS FD002 dataset pipeline & operational condition clustering
- Sliding-window temporal feature extraction (30-cycle windows, 24 channels)
- 2-Layer GRU baseline architecture with MC Dropout
- Self-supervised pretraining (Masked sensor recovery + InfoNCE contrastive head)
- Few-shot domain adaptation (1%, 5%, and 20% label regimes)
- Uncertainty-aware epistemic bounds (
$\pm 1.96\sigma$ , nominal 95% PI) - Sensor perturbation test suite (8 synthetic noise & dropout modes)
- React + Vite research workstation with real-time trajectory visualization
- Production build verification & Vercel deployment setup