Strong Gravitational Lensing and ML: generative models for galaxies
Adam Coogan
Dark Machines workshop ICTP , 8-12 April 2019
Strong Gravitational Lensing and ML: generative models for galaxies - - PowerPoint PPT Presentation
Strong Gravitational Lensing and ML: generative models for galaxies Adam Coogan Dark Machines workshop ICTP , 8-12 April 2019 Observed galaxy p ( src | x ) Generative model p ( lens | x ) Bayesian inference p ( sub | x ) Model
Adam Coogan
Dark Machines workshop ICTP , 8-12 April 2019
Observed galaxy
p(θsrc|x) p(θlens|x) p(θsub|x)
Generative model
Model physics when possible, use machine learning for the rest
Bayesian inference
Observed galaxy
http://great3.jb.man.ac.uk/
p(θsrc|x) p(θlens|x) p(θsub|x)
Generative model Bayesian inference
Observed galaxy
Machine learning for generatively modeling the source light
http://great3.jb.man.ac.uk/
p(θsrc|x) p(θlens|x) p(θsub|x)
Generative model Bayesian inference
Observed galaxy
Machine learning for generatively modeling the source light
http://great3.jb.man.ac.uk/
p(θsrc|x) p(θlens|x) p(θsub|x)
Generative model Bayesian inference
Observed galaxy
Machine learning for generatively modeling the source light
http://great3.jb.man.ac.uk/
p(θsrc|x) p(θlens|x) p(θsub|x)
Generative model Bayesian inference
Observed galaxy
Machine learning for generatively modeling the source light
http://great3.jb.man.ac.uk/
p(θsrc|x) p(θlens|x) p(θsub|x)
Generative model Bayesian inference
Observed galaxy
Machine learning for generatively modeling the source light
http://great3.jb.man.ac.uk/
p(θsrc|x) p(θlens|x) p(θsub|x)
Generative model Bayesian inference
➡ Captures range of galaxy morphologies ➡ Has a latent space compatible with Bayesian inference
Kingma & Welling 2013, Rezende et al 2014
➡ Captures range of galaxy morphologies ➡ Has a latent space compatible with Bayesian inference
Latent space z
Data
Kingma & Welling 2013, Rezende et al 2014
Variational autoencoder
➡ Captures range of galaxy morphologies ➡ Has a latent space compatible with Bayesian inference
Latent space z
Data
Kingma & Welling 2013, Rezende et al 2014
Variational autoencoder
qϕ(z|x)
Encoder
➡ Captures range of galaxy morphologies ➡ Has a latent space compatible with Bayesian inference
Latent space z
Data
Kingma & Welling 2013, Rezende et al 2014
Variational autoencoder
qϕ(z|x)
Encoder
pθ(x|z)
Decoder
➡ Captures range of galaxy morphologies ➡ Has a latent space compatible with Bayesian inference
Latent space z
Data
p(z) = N(0, I)
Kingma & Welling 2013, Rezende et al 2014
Variational autoencoder
qϕ(z|x)
Encoder
pθ(x|z)
Decoder
➡ Captures range of galaxy morphologies ➡ Has a latent space compatible with Bayesian inference
Latent space z
Data
p(z) = N(0, I)
Kingma & Welling 2013, Rezende et al 2014
Variational autoencoder
qϕ(z|x)
Encoder
pθ(x|z)
Decoder
➡ Captures range of galaxy morphologies ➡ Has a latent space compatible with Bayesian inference
Latent space z
Data
p(z) = N(0, I)
Kingma & Welling 2013, Rezende et al 2014
Train encoder, decoder by maximizing lower bound on p(data)
Variational autoencoder
qϕ(z|x)
Encoder
pθ(x|z)
Decoder
http://great3.jb.man.ac.uk/
S/N < 10 S/N ~ 20 S/N > 100
http://great3.jb.man.ac.uk/
S/N < 10 S/N ~ 20 S/N > 100
This talk: train on ~10,000 images with S/N = 15 - 50
http://great3.jb.man.ac.uk/
Radford et al 2015 (DCGAN)
S/N < 10 S/N ~ 20 S/N > 100
This talk: train on ~10,000 images with S/N = 15 - 50 Eg, decoder:
http://great3.jb.man.ac.uk/
z ∼ qϕ(z|x)
Original Reconstruction Original Reconstruction Original Reconstruction
z ∼ qϕ(z|x)
Original Reconstruction Original Reconstruction Original Reconstruction
z ∼ qϕ(z|x)
Original Reconstruction Original Reconstruction Original Reconstruction
z ∼ qϕ(z|x)
Original Reconstruction Original Reconstruction Original Reconstruction
1. 2. 1. 2.
z ∼ qϕ(z|x)
Original Reconstruction Original Reconstruction Original Reconstruction
1. 2. 1. 2.
z ∼ qϕ(z|x)
Original Reconstruction Original Reconstruction Original Reconstruction
1. 2. 1. 2.
Rezende & Viola 2018, Zhao et al 2017
z ∼ qϕ(z|x)
z ∼ p(z) = N(0, I)
Hoffman & Johnson 2016, Alemi et al 2018
z ∼ p(z) = N(0, I)
Hoffman & Johnson 2016, Alemi et al 2018
z ∼ p(z) = N(0, I)
Hoffman & Johnson 2016, Alemi et al 2018
z ∼ p(z) = N(0, I)
z distribution for training data
Hoffman & Johnson 2016, Alemi et al 2018
z ∼ p(z) = N(0, I)
z distribution for training data
Hoffman & Johnson 2016, Alemi et al 2018
≠ N(0, I) →open issue with VAEs!
z ∼ p(z) = N(0, I)
Our approach: sample z from here to generate better galaxies z distribution for training data
Hoffman & Johnson 2016, Alemi et al 2018
≠ N(0, I) →open issue with VAEs!
z ∼ N(0, I) z′ ∼
Rezende & Mohamed 2015, Kingma et al 2016, …
Jacobians to reshape distributions
z ∼ N(0, I) z′ ∼
fT ∘ . . . ∘ f2 ∘ f1(z)
Rezende & Mohamed 2015, Kingma et al 2016, …
Jacobians to reshape distributions
z ∼ N(0, I) z′ ∼
fT ∘ . . . ∘ f2 ∘ f1(z)
Rezende & Mohamed 2015, Kingma et al 2016, …
Jacobians to reshape distributions
which enable efficient sampling of the latent variable
z ∼ N(0, I) z′ ∼
fT ∘ . . . ∘ f2 ∘ f1(z)
Rezende & Mohamed 2015, Kingma et al 2016, …
z distribution for training data z samples from IAF fit
x
z ∼ IAF(z)
Generated galaxies z distribution for training data z samples from IAF fit
x
z ∼ IAF(z)
True source Observation
*Very preliminary, simplified analysis
True source Observation
*Very preliminary, simplified analysis
Best-fit source
True source Observation
True Einstein radius: 2.3 Best-fit value: 2.29 *Very preliminary, simplified analysis
Best-fit source
Tomczak & Welling 2018 Higgins et al 2017
Tomczak & Welling 2018 Higgins et al 2017
True source
Simplified lens with one parameter, rein Poissonian
noise
Observation
Outputs from simplified analysis
True source
Simplified lens with one parameter, rein Poissonian
noise
Observation Best-fit source from VAE
Outputs from simplified analysis
True source
Simplified lens with one parameter, rein Poissonian
noise
Observation Best-fit source from VAE
1.63 1.64 1.65 1.66 1.67 rein 20 40 60 80 100 p(rein|obs)
True rein HMC SVI
Lens parameter inference
Outputs from simplified analysis
ELBO(x(i)) = 𝔽e(z|x(i)) [log d(x(i)|z)] − KL [e(z|x(i))||m(z)]
Encoded means for MNIST
p(x(i))
Source
ELBO(x(i)) = 𝔽e(z|x(i)) [log d(x(i)|z)] − KL [e(z|x(i))||m(z)]
Encoded means for MNIST
p(x(i))
Source
ELBO(x(i)) = 𝔽e(z|x(i)) [log d(x(i)|z)] − KL [e(z|x(i))||m(z)]
Encoded means for MNIST
p(x(i))
Source
ELBO(x(i)) = 𝔽e(z|x(i)) [log d(x(i)|z)] − KL [e(z|x(i))||m(z)]
Encoded means for MNIST
p(x(i))
Source