Local Disentanglement in Variational Auto-Encoders Using Jacobian $L_1$ Regularization

Travers Rhodes, Daniel Lee

TL;DR

Researchers have introduced the JL1-VAE, a Variational Auto-Encoder that uses $L_1$ regularization on the generator's Jacobian matrix to achieve better "disentanglement." By encouraging the model to have a sparse Jacobian, they ensure that changing a single latent variable affects only a small, localized portion of the generated image. This effectively separates independent objects or parts without needing manual labels.

The Challenge: Model Identification and Rotational Invariance

In unsupervised representation learning, the goal is to take raw data (like images) and automatically discover the underlying "factors of variation"—such as the position of an object, its scale, or its color. Variational Auto-Encoders (VAEs) are a popular tool for this, but they suffer from a model identification problem.

Specifically, VAEs are often "rotationally invariant" in their latent space. While extensions like the $\beta$-VAE help align latent dimensions with Principal Component Analysis (PCA) directions, they struggle when multiple factors of variation have similar statistical importance. In these cases, the model might learn a "rotated" representation where one latent variable controls a messy mixture of two different real-world factors. The authors seek a way to "break" this rotational symmetry to ensure each latent dimension corresponds to exactly one independent physical factor.

The Solution: JL1-VAE

The authors propose the Jacobian $L_1$ Regularized VAE (JL1-VAE). The core innovation is adding a new penalty term to the standard VAE loss function based on the Jacobian matrix:

  1. The Jacobian ($J_g$): This matrix represents the sensitivity of the output pixels to changes in the latent variables. If you turn a "knob" in the latent space, the Jacobian tells you which pixels change and by how much.
  2. $L_1$ Regularization: By applying an $L_1$ norm to this Jacobian, the authors force the matrix to be sparse.
  3. The Intuition: A sparse Jacobian means that a change in one latent variable should only modify a few pixels in the output image. This mimics "local receptive fields" found in biological vision and encourages the model to assign different latent variables to different objects or localized parts of an image.

To implement this, they estimate the full Jacobian during training using the finite difference method along each latent dimension.

Datasets

The paper evaluates the JL1-VAE on three distinct types of data:

  • Natural Images: $16 \times 16$ grayscale patches of natural scenes used to visualize learned receptive fields.
  • Three-Dots Dataset: A simulated dataset of $64 \times 64$ images containing three black dots on a white background. The ground-truth factors are the x/y coordinates of each dot.
  • MPI3D-Multi: A more complex dataset created by tiling four random images of a robotic arm into a $2 \times 2$ grid, testing the model's ability to disentangle multiple independent objects in a single scene.

Key Insights

  • Local vs. Global Disentanglement: The authors argue that while global disentanglement (one variable = one factor everywhere) is the "holy grail," it is often mathematically impossible without specific inductive biases. They focus instead on local disentanglement, where the model is biased toward separating factors within local regions of the latent space.
  • Inspiration from ICA: The work draws a direct line from Independent Component Analysis (ICA) and sparse coding to modern deep learning. Just as ICA uses $L_1$ to find independent sources in linear signals, JL1-VAE uses it to find independent factors in non-linear image generation.
  • Breaking PCA Limitations: Standard VAEs behave like PCA, which tends to produce "global" components that affect the whole image. The $L_1$ penalty pushes the model beyond PCA toward localized, object-based representations.

Key Results

Receptive Fields: On natural images, the JL1-VAE learned localized, edge-like receptive fields similar to those found in the primary visual cortex and those produced by ICA. In contrast, PCA-based methods and standard VAEs produced blurry, global patterns.

Comparison of learned receptive fields on natural images. JL1-VAE learns localized, edge-like features similar to ICA, unlike the global patterns of PCA and standard VAEs.

Qualitative Success: In the "Three-Dots" and "MPI3D-Multi" datasets, the JL1-VAE successfully assigned individual latent variables to specific dots or specific quadrants of the tiled image. In contrast, the standard $\beta$-VAE often produced latent variables that moved multiple dots simultaneously.

Qualitative results on the Three-Dots dataset. JL1-VAE successfully isolates the movement of individual dots, demonstrating local disentanglement.

Quantitative Gains: The authors introduced "Local MIG" (Mutual Information Gap) and "Local Modularity" metrics. The JL1-VAE significantly outperformed baselines (including FactorVAE and $\beta$-TCVAE) on these local metrics ($p < 0.001$), especially when evaluated at a small "locality radius."

Limitations and Future Work

  • Computational Cost: Calculating the full Jacobian matrix is expensive. The training time scales linearly with the number of latent dimensions. Future work could use sampling-based methods to approximate the $L_1$ cost more efficiently.
  • Global Consistency: Because the bias is local, the model might assign a factor to latent variable $A$ in one part of the space and latent variable $B$ in another. It does not strictly guarantee global alignment across the entire latent manifold.
  • Scope of Inductive Bias: The "sparsity" bias is perfect for images with moving objects or parts, but it might be less useful for global changes, like shifting the overall brightness or rotating an entire scene.

Summary updated

BibTeX
@inproceedings{rhodes2021local,
  author = {Travers Rhodes and Daniel Lee},
  title = {{Local Disentanglement in Variational Auto-Encoders Using Jacobian $L\_1$ Regularization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=8xyNqPvFZwC},
}
Figure