dl metrics - feliyur/exercises GitHub Wiki
(from Wikipedia)
Following the Kantorovich-Rubinstein duality - taken from the Wasserstein GAN paper Arjovsky17icml - under the paper assumptions and notations:
$$ \max_{\lvert\rvert f \lvert\rvert_L \leq 1} \mathbb{E}{x\sim \mathbb{P}r}\left[f(x)\right] - \mathbb{E}{x\sim \mathbb{P}\theta}\left[f(x)\right]
\max_{\lvert\rvert f \lvert\rvert_L \leq 1} \mathbb{E}{x\sim \mathbb{P}r}\left[f_w(x)\right] - \mathbb{E}{z\sim \mathbb{P}(z)}\left[f_w(g\theta(z))\right] $$
Introduced in Sohn16nips. Used in e.g. Pirk19arxiv. Analyzed in a 2020 Hinton paper Hinton20arxiv.
$$
\mathcal{L}{\text{N-pair-mc}} \left( { (x_i, x_i^{\pmb +}) }{i=1}^N; f \right)
= \frac{1}{N} \sum_{i=1}^N\log \left( 1 + \sum_{j\neq i} \exp \left( f_i^\top f_j^+ - f_i^\top f_i^+ \right) \right)
$$
Where
As presented in Sohn16nips. Introduced in Hadsell05cvpr, Hadsell06cvpr.
As presented in Sohn16nips. Introduced in Weinberger09jmlr.
Introduced in Salimans16nips. Explanation taken from Barratt18arxiv.
The IS uses an Inception v3 Network pre-trained on ImageNet and calculates a statistic of the network’s outputs when applied to generated images.
(from Wikipedia) $$ {\displaystyle {\text{FID}}=|\mu -\mu _{w}|^{2}+\operatorname {tr} (\Sigma +\Sigma _{w}-2(\Sigma \Sigma _{w})^{1/2}).} $$
Where
This metric can be computed for images, as well as for computed feature maps along the network (usually deeper ones, close to the output).
(from Wikipedia) $$ \mathcal{I}(\theta) = \mathop{\mathbb{E}}{x}\left\lbrace \nabla\theta \log f(X; \theta)\cdot\nabla_\theta \log f(X; \theta)^T \right\rbrace $$ Or, by-element: $$ \left[\mathcal{I}(\theta)\right]{i,j} = \mathop{\mathbb{E}}{x}\left\lbrace \left(\frac{\partial }{\partial \theta_i}\log f(X; \theta)\right)\cdot\left(\frac{\partial }{\partial \theta_j}\log f(X; \theta)\right) \right\rbrace $$