Notes

← Back to home

A collection of fragments of understanding in the pursuit of deeper questions.

Non-Probabilistic UL - Autoencoders & Supervised Autoencoders

Autoencoders

  • gϕg\phi: encoding function.
  • fϕf\phi: decoding function.
  • ϕ\phi: parameters of encoding function (trainable).
  • θ\theta: parameters of decoding function (trainable).
  • MSE Loss:

LAE=12xx2,x=fθ(gϕ(x))L_{AE} = \frac{1}{2}\left\| \mathbf{x -}\mathbf{x}^{\mathbf{'}} \right\|^{2},\mathbf{x}^{\mathbf{'}} = f_{\theta}\left( g_{\phi}(x) \right)

The autoencoder is trained by gradient descent.

image133

Semi-Supervised Autoencoder Paper: "Supervised Autoencoders: Improving Generalization Performance with Unsupervised Regularizers".

The supervised AE uses the latent space to define a second decoding pathway. This path is added as another term to the loss and one calculates the gradients from two different ends. In the shared part, these gradients then merge. This is called multi-task learning (having a shared pathway for different objectives).

LSAE=1ti=1t[LP(xi,W1:2,yi)+Lv(xi,W1:4,x^i)]L_{SAE} = \frac{1}{t}\sum_{i = 1}^{t}\left\lbrack L_{P}\left( \mathbf{x}_{\mathbf{i}},\mathbf{W}_{\mathbf{1:2}},\mathbf{y}_{\mathbf{i}} \right) + L_{v}\left( \mathbf{x}_{\mathbf{i}},\mathbf{W}_{\mathbf{1:4}},{\widehat{\mathbf{x}}}_{\mathbf{i}} \right) \right\rbrack

where:

  • LPL_{P} is the loss of label yiy_{i}
  • LvL_{v} is the loss of reconstruction x^i{\widehat{x}}_{i}
  • W1:2\mathbf{W}_{\mathbf{1:2}} are the weights of encoder (that produce label y)
  • W1:4\mathbf{W}_{\mathbf{1:4}} are the weights of encoder + decoder.
image134