Tom Charnock
Institut d'Astrophysique de Paris
Slides available at presentations.charnock.fr/MPP
A measurement of the information loss by approximating a distribution, $P(y|x)$, with some other distribution, $q(y|x,w,a)$.
$$\mathbb{D}[P(y|x)||q(y|x,w,a)]=\int_{E_y}dyP(y|x)\ln\frac{P(y|x)}{q(y|x,w,a)}$$
The cross-entropy measures the average number of bits of information needed to tell that an event is drawn from $q(y|x,w,a)$ rather than $P(y|x)$
We just have distribution of observed samples, $P(\{x,y\}_\textrm{train})$, made up of
$$\{x_i,y_i\sim P(x,y)|i\in[1,n_\textrm{train}]\}$$(hopefully very close to $\approx P(x,y)$)
Using this sampling distribution we can rewrite the relative entropy as
$$\mathbb{D}[P(y|x)||q(y|x,w,a)]=-\sum_{i=1}^{n_\textrm{train}}P(y_i|x_i)\ln q(y_i|x_i,w,a)+\sum_{i=1}^{n_\textrm{train}}P(y_i|x_i)\ln P(y_i|x_i)$$By minimising the relative entropy we can attempt to bring $q(y|x,w,a)$ close to $P(y|x)$
(or at least $P(y_\textrm{train}|x_\textrm{train})$).
Entropy term, $P(y|x)$ is independent of $w$, so optimising the parameters of $q(y|x,w,a)$ is equivalent to minimising the cross-entropy
$$\begin{align*} \widehat{w}&=\underset{w\in E_w}{\textrm{arg min}}\,\mathbb{D}[P(y|x)||q(y|x,w,a)]\\ &=\underset{w\in E_w}{\textrm{arg min}}\,-\sum_{i=1}^{n_\textrm{train}}P(y_i|x_i)\ln q(y_i|x_i,w,a) \end{align*}$$The likelihood of a training set is
Taking the logarithm (divided by the number of training samples) gives
$$\begin{align*} \frac{1}{n_\textrm{train}}\ln L(y_\textrm{train}|x_\textrm{train})&=\frac{1}{n_\textrm{train}}\ln\prod_{i=1}^{n_\textrm{train}}q(y_i|x_i,w,a)^{n_\textrm{train}P(y_i|x_i)}\\ &=\sum_{i=1}^{n_\textrm{train}}P(y_i|x_i)q(y_i|x_i,w,a) \end{align*}$$where $\gamma$ are the parameters of our distribution describing the probability of our data
$$q(y|x,w,a) \propto \textrm{Loss}(\gamma, y)$$Mean square error: $\gamma$ is the mean of a unit variance Gaussian likelihood for $y$
Softmax (sigmoid) output: $\gamma$ is the probability of the occurance of $y$ in a Bernoulli distribution
Absolute error: $\gamma$ is the diversity of a zero centred Laplace distribution for the probability of $y$
Neural networks are highly complex functions with no specific reason to be globally smooth.
The $\gamma$ describing targets $y$ or $y'$ from inputs $x$ and $x'$ have no reason to be consistent, even if $x$ and $x'$ are infinitessimally close.
Very difficult to make a predictive statement about how likely is any $y$ when given a neural network
$\displaystyle B = (\ln)\frac{p(D|a_2)}{p(D|a_1)}$
i.e. we prefer ΛCDM over a polynomial fit with tons of parameters and therefore fits the data perfectly, but is not predictive.
Although predictions can be validated using a test set there is no physical principle which will tell us the general behaviour for any new piece of data... we just have to hope!
Of course there is...
We can see that neural networks are able to extract ridiculously large amounts of information directly from the data.
We just need to use the extracted information in a way that does not depend on the neural network as a model or only use them in the case when the model isn't important for scientific results...
(Charnock, Lavaux, Wandelt, Sarma Boruah, Jasche and Hudson 2020)
(We can marginalise out these parameters to ignore the effect of the network on the overall physics)
(Charnock, Lavaux and Wandelt 2018)
This makes use of the deep learning framework, and the neural network, but for a very different purpose!
Then maximise $\ln\det{\bf F}_{\alpha\beta}$ where
$${\bf F}_{\alpha\beta} = \frac{\partial\mu(f_{w,a}(x(y)))}{\partial y_\alpha}^T{\bf C}(f_{w,a}(x(y)))^{-1}\frac{\partial\mu(f_{w,a}(x(y)))}{\partial y_\beta}$$Calculate the mean of the derivative of the network outputs with respect to the parameters, $\displaystyle \frac{\partial\mu(f_{w,a}(x(y)))}{\partial y_\alpha}$
Calculate the covariance of the network outputs with respect to the parameters, ${\bf C}(f_{w,a}(x(y)))$
We also want to set the scale of the summaries which we can do with a regulariser (which is arbitrary) like $$\Lambda_2 = \|{\bf C}(f_{w,a}(x(y)))-\mathbb{I}\|+\|{\bf C}(f_{w,a}(x(y)))-\mathbb{I}\|$$
This is all very easy to do using modern frameworks