Skip to content
StackDecode
AI & ML Atlas
Deep LearningarchitectureAnimated walkthrough

Contractive Autoencoders

An autoencoder penalised for being sensitive to small changes in its input.

The idea

The loss adds the squared Frobenius norm of the encoder's Jacobian, which punishes codes that change a lot when the input changes slightly. The learnt representation is therefore locally stable, a "contraction" around the data manifold.

loss = ‖x − x̂‖² + λ‖∂h/∂x‖²_F

Watch it run

The pipeline lights up one step at a time. Use the controls to pause or step through it.

  1. 1Encode and decode the input.
  2. 2Compute reconstruction error.
  3. 3Compute the Jacobian of the code with respect to the input.
  4. 4Add its squared norm as a penalty and minimise both.

loss = ‖x − x̂‖² + λ‖∂h/∂x‖²_F

1/4

Step by step

  1. 1Encode and decode the input.
  2. 2Compute reconstruction error.
  3. 3Compute the Jacobian of the code with respect to the input.
  4. 4Add its squared norm as a penalty and minimise both.

Where it is used

Robust representation learning.

Watch out for

The Jacobian term adds computation.

Related