Krypton

GitHub →

Krypton is a learning-focused tensor library: dynamic tensors, broadcasting, and autograd built from scratch, with matmul as the performance centerpiece.

  • Kernel ladder from naive → L1/L2 tiled → SIMD (NEON/AVX2) → parallel (Rayon), with ~80× speedup from naive to optimized at 512² and peak throughput in the ~50–70 GFLOPS range on typical hardware.
  • Systems techniques: cache-friendly tile sizes (~64×64 in L1), register-blocked micro-kernels, B packing so SIMD loads are contiguous, and row-chunk parallelism without false sharing.
  • Define-by-run autograd: gradients flow through the same matmul kernels used in the forward pass.
  • End-to-end validation: MNIST MLP training binary compares backends: naive matmul can take tens of minutes per epoch while SIMD+parallel finishes an epoch in seconds; 86+ tests, clippy-clean.

Rust · SIMD · Rayon · Autograd

Multi-Method MRI Reconstruction from Undersampled K-Space

  • Built and benchmarked five reconstruction methods for undersampled MRI on UPenn-GBM brain cancer data, achieving 33 dB PSNR with a zero-filled FFT + residual CNN pipeline: a 9 dB improvement over the naive baseline.
  • Implemented Bayesian hyperparameter optimization (Gaussian process) across training slices to learn shared kernel width, count, and regularization parameters that generalize to held-out test data.
  • Designed k-space data consistency layers enforcing measurement fidelity across CNN architectures (residual CNN, SRCNN, U-Net), with full train/val/test evaluation using MSE, PSNR, and SSIM.

PyTorch · MRI · k-space · UPenn-GBM

Early Warning Unemployment Forecasting

  • Engineered an XGBoost forecasting pipeline integrating six high-frequency economic signals (Yelp activity, job postings, eviction filings, S&P 500, housing data) to predict Pennsylvania’s monthly unemployment ahead of official BLS releases.
  • Benchmarked four models (baseline lag, linear regression, Random Forest, XGBoost) with GridSearchCV hyperparameter tuning; XGBoost achieved lowest RMSE (1.13) and outperformed all alternatives on held-out test data.

XGBoost · scikit-learn · pandas · economic signals