Using variational inference to estimate the existence of objects and their redshifts from COSMOS2020

Tom Charnock

Institut d'Astrophysique de Paris

Slides available at presentations.charnock.fr/ppzeds


Sorbonne Université
Alliance Sorbonne Université          Émergence
IAP
CNRS
Aquila

AIMS

Target rare objects in deep fields, such as COSMOS2020
Accelerate science using machine learning by obtaining new information
Avoid scientific bias by proposing only a searching algorithm and not "results"
Targetted search

How do we choose where to target follow-up observations?

Build a probabilistic model of known spectroscopic objects
Condition the model on pixel values from photometric surveys
This is a data model and not a physical model... any physics is correlation and not causation

Catalogue of known objects from spectroscopy

Spectroscopic Sample
$$i = \textrm{RA}\text{ and }\textrm{Dec}$$

RA and Dec of $\sim$ 20,000 spectroscopically observed objects, $\textsf{obj}_{\textsf{spec},i}$

$$\begin{align*} \textsf{obj}_{\textsf{spec},i}&\sim P(\textsf{obj}|\textsf{spec}_i)\\ &=\delta(i)\,\,\,\,\forall i\in\textrm{Catalogue} \end{align*}$$

Error model for redshifts, $z_i$, given the spectroscopy, $\textsf{spec}_i$

$$\begin{align*} z_{\textsf{spec}, i} &\sim P(z|\textsf{spec}_i)\\ &\approx\mathcal{N}(\mu_{z_{\textsf{spec},i}}, \sigma_{z_{\textsf{spec},i}}) \end{align*}$$

Joint distribution - $\displaystyle\textsf{obs}_{\textsf{spec},i}, z_{\textsf{spec}, i} \sim P(\textsf{obj}, z|\textsf{spec}_i)$

Modeling the existance of objects and their properties

We could model the probability of redshifts of objects from pixel values in photometric surveys, $\textsf{pix}_i$

$$z_{\textsf{phot},i}\sim P_\mathscr{w}(z|\textsf{obj}_i,\textsf{pix}_i)$$

In fact we can model the joint distributions

$$z_{\textsf{phot},i}, \textsf{obj}_i \sim P_\mathscr{w}(z, \textsf{obj}|\textsf{pix}_i)$$

Which comes from the conditional distribution using the chain rule

$$P_\mathscr{w}(z|\textsf{obj},\textsf{pix}_i) = P_\mathscr{w}(z|\textsf{obj}_i, \textsf{pix}_i)P_\mathscr{w}(\textsf{obj}|\textsf{pix}_i)$$

Or the marginals

$$P_\mathscr{w}(z|\textsf{pix}_i) = \int_\textsf{OBJ} \hskip-0.6em d\textsf{obj}\,P_\mathscr{w}(z| \textsf{obj}, \textsf{pix}_i)P_\mathscr{w}(\textsf{obj}|\textsf{pix}_i)\,\,\,\,\text{and}\,\,\,\,P_\mathscr{w}(\textsf{obj}|\textsf{pix}_i)=\int_\textsf{REDSHIFT} \hskip-2.5em dz \,P_\mathscr{w}(\textsf{obj}|z, \textsf{pix}_i)P_\mathscr{w}(z|\textsf{pix}_i)$$

Targetting rare objects

Calculate the marginal distribution for the probability of objects given particular properties, i.e.

High redshift objects, i.e. $z > 6$

$$P_\mathscr{w}(\textsf{obj}|\textsf{pix}_i, z>6)=\int_6^\infty dz \,P_\mathscr{w}(\textsf{obj}|z, \textsf{pix}_i)P_\mathscr{w}(z|\textsf{pix}_i)$$

Naïvely seach for maximal probability of objects

$$\hat{i} = \underset{i\in\textrm{Survey}}{\textrm{argmax}}~P_\mathscr{w}(\textsf{obj}|\textsf{pix}_i, z>6)$$

This could be effectively extended to any desired attributes

The data model

Select patches/pixels from COSMOS2020 by RA and Dec

HSC $g$, $r$, $i$, $z$, $y$

ULTRAVista $y$, $h$, $j$, $ks$

u* 1, 2

Error model for pixel values, $\textsf{pix}$:


$$\begin{align*} \textsf{pix}_i &\sim P(\textsf{pix}|\{\text{CCD read out}\}_i)\\ & \approx \mathcal{N}(\boldsymbol{\mu}_{\textsf{pix},i},\boldsymbol{\Sigma}_{\textsf{pix},i}) \end{align*}$$

Could use patches or single pixels


We've found little difference between the two forms of inputs

COSMOS2020 patches COSMOS2020 pixels

Assume a model of the objects given the input pixels at the same position as objects in the spectroscopic catalogue

$$\begin{align*} \textsf{obj}_i&\sim P(\textsf{obj}|\textsf{pix}_i)\\ &=\delta(i)\,\,\,\,\forall i\in\textrm{Catalogue} \end{align*}$$

Build model of suspected background

$$\begin{align*} \textsf{pix}_{\textsf{background},i}&\sim \mathcal{N}(\boldsymbol{\mu}_{\textsf{background}}, \boldsymbol{\Sigma}_{\textsf{background}})\\ \textsf{obj}_{\textsf{background},i}&\sim P(\textsf{obj}|\textsf{pix}_{\textsf{background},i})\\ &=0 \end{align*}$$
$$\begin{align*} z_{\textsf{background},i}&\sim \textrm{Uniform}(0, \infty)\\ z_i&\sim P(z|\textsf{obj}_{\textsf{background},i}=0, \textsf{pix}_{\textsf{background},i})\\ &=1/\infty \end{align*}$$
HSC g background
HSC r background
HSC i background
HSC z background
HSC y background

The model

Model as a simple single parameter distribution, such as Bernoulli

$$P_\mathscr{w}(\textsf{obj}|\textsf{pix}_i) = \textrm{Bernoulli}(p(\textsf{pix}_i, \mathscr{w}))$$

Modelling the probability of redshifts given the existance of objects

Flexible enough to model the fact that the distribution of objects is skewed
Simple enough that we can perform analytical integrals

Mixture of Gaussians

$$P_\mathscr{w}(z|\textsf{obj}_i, \textsf{pix}_i) = \sum_k \alpha_k(\textsf{pix}_i, \mathscr{w})\hskip0.1em\mathcal{N}\hskip-0.25em\left(\mu_k(\textsf{pix}_i, \mathscr{w}), \sigma_k(\textsf{pix}_i, \mathscr{w})\right)$$

Distribution of spectroscopic redshifts in a spectroscopic catalogue

According to data, there should always be more likely to have objects with redshifts between 0 and 1
Spectroscopic redshift density

The first fits the data better, but we can't see it because the mean and mode are not good measures...

If we want a flat prior over physical properties, we need to reweight the effect of the data

The mean of the data distribution
(for a single Gaussian)

Unweighted spectroscopic redshift estimation

The mean of the (approximate) physical distribution
(for a single Gaussian)

Weighted spectroscopic redshift estimation
Redshift PDF estimation

Minimise the KL divergence between the joint distribution of the existance of objects and their redshifts from spectroscopy

$$\begin{align*} \textrm{KL}(P||P_\mathscr{w}) & = \left\langle\ln\frac{P}{P_\mathscr{w}}\right\rangle\\ &=\sum_{i\in\textrm{Catalogue}} \hskip-0.5em\lambda_i\big[\ln P(z=z_{\textsf{spec},i}|\textsf{spec}_i) - \ln P_\mathscr{w}(\textsf{obj}=1, z=z_{\textsf{spec},i}|\textsf{pix}_i)\big]\\ &\phantom{=}+\sum_{i\in\textrm{dim}[\textrm{Catalogue}]} \hskip-1.2em\big[\ln P(z=z_{\textsf{background},i})- \ln P_\mathscr{w}(\textsf{obj}=0, z=z_{\textsf{background},i}|\textsf{pix}_{\textsf{background},i})\big] \end{align*}$$
Training
  1. Sample
    1. $\{z_{\textsf{spec}, i\color{gray}{, j}}\sim\mathcal{N}(\mu_{z_{\textsf{spec}, i}}, \sigma_{z_{\textsf{spec}, i}})~|~i\in\textrm{Catalogue}\color{gray}{,~j\in[1, \textrm{MC samples}]}\}$
    2. $\{\textsf{pix}_{i}\sim\mathcal{N}(\boldsymbol{\mu}_{\textsf{pix},i}, \boldsymbol{\Sigma}_{\textsf{pix}, i})~|~i\in\textrm{Catalogue}\}$
    3. $\{z_{\textsf{background}, i\color{gray}{, j}}\sim\textrm{Uniform}(0,\infty)~|~i\in\textrm{dim}[\textrm{Catalogue}]\color{gray}{,~j\in[1,\textrm{MC samples}]}\}$
    4. $\{\textsf{pix}_{\textsf{background}, i}\sim\mathcal{N}(\boldsymbol{\mu}_{\textsf{background}}, \boldsymbol{\Sigma}_{\textsf{background}})~|~i\in\textrm{dim}[\textrm{Catalogue}]\}$
  2. Calculate

    1. $\{\lambda_i\ln\mathcal{N}(z=z_{\textsf{spec}, i\color{gray}{, j}}|\mu_{z_{\textsf{spec},i}}, \sigma_{z_{\textsf{spec},i}})~|~i\in\textrm{Catalogue}\color{gray}{,~j\in[1,\textrm{MC samples}]}\}$
    2. $\{\lambda_i\ln P_\mathscr{w}(\textsf{obj}=1,z=z_{\textsf{spec}, i\color{gray}{, j}}|\textsf{pix}_i)~|~i\in\textrm{Catalogue}\color{gray}{~,j\in[1,\textrm{MC samples}]}\}$
    3. $\{\ln\textrm{Uniform}(z=z_{\textsf{background}, i\color{gray}{, j}}|0,\infty)~|~i\in\textrm{dim}[\textrm{Catalogue}]\color{gray}{,~j\in[1,\textrm{MC samples}]}\}$
    4. $\{\ln P_\mathscr{w}(\textsf{obj}=0,z=z_{\textsf{background}, i\color{gray}{, j}}|\textsf{pix}_{\textsf{background},i})~|~i\in\textrm{dim}[\textrm{Catalogue}]\color{gray}{,~j\in[1,\textrm{MC samples}]}\}$

    $$\textrm{KL}=\sum_{i\color{gray}{, j}}(A - B) + \sum_{i\color{gray}{, j}}(C - D)$$

  3. Minimise the KL divergence $$\widehat{\mathscr{w}} = \underset{\mathscr{w}\in\mathscr{W}}{\textrm{argmin}}~\textrm{KL}$$

Targetting objects by maximising the probability of particular properties over entire field

$$\hat{i} = \underset{i\in\textrm{Survey}}{\textrm{argmax}}~P_\mathscr{w}(\textsf{obj}, z|\textsf{pix}_i)$$
Maximising probability of objects

A way to find rare objects

Accelerates science but doesn't bias it.

It is essential that this is used only for targetting or forcasting

There is no way to assign a priori or a posteriori belief to any neural model,
therefore they are not good predictive models and so the results can't be used as scientific products!

Future steps

Larger spectroscopic catalogues with better error models
More photometric bands for more information to distinguish the model
More properties, such as galaxy or other object type to help in the hunt for rare objects in deep fields