Project · Astrophysics × Deep Learning
Generating and classifying strong gravitational lensing imagery: a DDPM for synthesis, and a residual network for substructure classification
Strong gravitational lensing is one of the few direct probes we have into dark matter substructure. The trouble is data: real lensing systems are rare, and the traditional route to more examples, physical simulation, is computationally expensive and slow.
GravLens is two halves of the same problem. GravLensDiffusion asks whether a generative model can stand in for simulation and produce usable lensing imagery cheaply. GravLensNet asks whether substructure can be read off those images automatically at all. Together they were my first end-to-end diffusion project, built from scratch on free Colab GPUs.
A DDPM implemented closely following the original denoising-diffusion paper[1], trained on 10,000 strong lensing images. The aim was data augmentation: generating high-fidelity lensing images to counter scarcity and class imbalance in the real dataset.
A custom 20-layer ResNet[2] that sorts strong lensing images into three substructure categories, trained on 30,000 images with data augmentation, L2 regularisation, and a learning-rate scheduler that drops the rate when validation loss plateaus.
| Metric | Value |
|---|---|
| Test-set accuracy (best model) | 89.6% |
AUC, Class 0 (no substructure) | 0.987 |
AUC, Class 1 (sphere) | 0.979 |
AUC, Class 2 (vort) | 0.968 |