03. Projects

FFI Stability Classifier

GitHub repo

Scientific machine learning pipeline for fast flavor instability detection in neutrino astrophysics. This is the same project presented in my DNP poster.

This classifier turns simulation-derived neutrino data into a stability signal: FFI present vs stable. The model is intentionally compact and interpretable, and every training run writes out plots and metrics so the physics story stays traceable from raw data to final decision thresholds.

The training pipeline is built around reproducible configs, deterministic splits, and threshold sweeps that emphasize physics-meaningful tradeoffs (precision vs recall) rather than a single default cutoff.

Neutrino astrophysics Scientific ML MLP classifier HPC training

Poster Presentation

The DNP poster covers the same data sources, model family, and evaluation logic. Use it as a compact overview while the sections below go deeper into the pipeline and results.

View DNP Poster PDF

Data

Four simulation-derived NPZ datasets are pooled into a single training set. Each file provides 27-dimensional features alongside binary instability labels, so the model sees multiple regimes and learns a shared decision boundary rather than a single-scenario heuristic.

  • Sources: zero-flux-factor, one-flavor, random, and NSM-stable runs.
  • Files: train_data_stable_zerofluxfac.npz, train_data_stable_oneflavor.npz, train_data_random.npz, train_data_NSM_stable.npz.
  • Features: X_* arrays with shape (N, 27).
  • Labels: unstable_* arrays (FFI present = 1, stable = 0).
  • Keys follow X_* / unstable_* pairs (e.g., X_zerofluxfac, unstable_zerofluxfac).
  • Random slice can be upweighted to counter class imbalance.
  • Train/validation split uses a fixed seed; scaling uses training stats only.

Methodology

A multi-layer perceptron ingests standardized features and is trained with BCEWithLogitsLoss plus per-sample weights. The schedule includes warmup, reduce-on-plateau learning rate decay, and early stopping. Metrics are logged per epoch at a 0.5 threshold, then swept from 0.01 to 0.99 to maximize F1.

  • Model: configurable MLP with dropout for regularization.
  • Optimizer: AdamW with weight decay.
  • Training: early stopping + LR warmup + ReduceLROnPlateau.
  • Outputs: model weights, loss/F1 plots, and aggregated results.
  • Inference timing is benchmarked on CPU (and GPU when available).

Results

Loss curves show steady convergence across seeds and a stable validation floor. The F1 threshold sweeps reveal a broad optimum, indicating the classifier remains reliable across a range of decision thresholds rather than a single fragile cutoff. These runs correspond to the plots below.

  • Training and validation loss tracked every epoch.
  • F1 vs threshold sweeps used to select the operating point.
  • Runs are tagged with seed and hyperparameters for traceability.
Loss curves for seed 17
Training vs validation loss for seed 17 (MLP, weighted data).
Loss curves for seed 43
Training vs validation loss for seed 43.
F1 threshold sweep for seed 17
F1 vs threshold sweep to locate the optimal decision boundary.
F1 threshold sweep for seed 43
Second seed sweep highlighting the same plateau behavior.

03. Projects

Qubit RL: Time-Optimal Control

GitHub repo

A lightweight PPO pipeline that learns to steer a single qubit across the Bloch sphere with minimal time and control energy. Built for interpretability and quick iteration without heavy frameworks.

The environment simulates pure-state qubit dynamics in Bloch form with a goal-conditioned observation that includes the current and target states. Actions map to bounded control amplitudes, and an RK4 integrator evolves the Bloch vector while enforcing normalization.

PPO is implemented from scratch for transparency. The buffer computes generalized advantage estimates, then the actor-critic updates with clipped policy loss, entropy regularization, and value loss.

Reinforcement learning Quantum control PPO Bloch dynamics

Project Repo

The starter repo includes training scripts, evaluation rollouts, and plotting utilities for fidelity, control pulses, and Bloch-sphere trajectories.

View GitHub Repo

Environment + Data

Each episode samples an initial and target Bloch vector separated by a minimum angle. Observations are goal-conditioned (current + target state), and optional domain randomization perturbs drift and control amplitude to improve robustness.

  • Dynamics: r_dot = Omega(u) x r with drift Delta.
  • Integration: fourth-order Runge-Kutta, renormalized to stay on S^2.
  • Actions: bounded controls mapped to u_x, u_y with amplitude limits.
  • Reward: time penalty + energy penalty + progress in fidelity.

Methodology

PPO collects rollouts across parallel environments, computes GAE returns, and updates a compact actor-critic network with clipped policy ratios. Entropy regularization preserves exploration while the value head stabilizes training.

  • Policy: Gaussian actions with tanh squashing.
  • Optimization: Adam with gradient clipping and KL monitoring.
  • Config-driven runs: smoke, fast, and default settings.

Results

Evaluation rollouts show the agent quickly increasing fidelity while keeping control pulses smooth. The Bloch trajectory arcs toward the target, and the component plots confirm convergence of x, y, z to the desired state.

  • Fidelity rises early and stabilizes near the target.
  • Control pulses peak early, then settle as the target is reached.
  • Trajectories remain on the Bloch sphere throughout.
Fidelity over time
Fidelity vs time for a representative rollout.
Control pulses for u_x and u_y
Learned control pulses for the two drive axes.
Bloch sphere trajectory
Bloch-sphere trajectory from start to target.
Bloch vector components
Component-wise convergence of the Bloch vector.

03. Projects

Other Noteworthy Projects

View complete list of projects

Proj 1

Placeholder summary describing the project focus and impact.

PythonDataVisualization

Proj 2

Placeholder summary describing the tools, methods, or outcomes.

ResearchClinicalUX

Proj 3

Placeholder summary describing the scope and key learning.

WorkflowAutomationInsight

Proj 4

Placeholder summary describing a standout result or collaboration.

DesignStrategyPrototype