Weakly Supervised Representation Learning with Sparse Perturbations

Kartik Ahuja, Jason S. Hartford, Yoshua Bengio

Introduction

A fundamental goal in artificial intelligence is representation learning: the ability for a model to observe raw data (like pixels) and automatically discover the high-level, "latent" factors that generated it (such as the position, color, and size of an object).

The primary technical challenge in this domain is identifiability. Typically, there are infinitely many ways to represent the same data, and most of these representations are "tangled" versions of the underlying truth. Standard methods, like Variational Autoencoders (VAEs), often fail to recover the true independent factors unless researchers impose very strong assumptions—for example, assuming all factors are statistically independent or relying on explicit labels.

However, the real world provides a different kind of clue: sparsity. When you move a coffee cup on a desk, its coordinates change, but the coordinates of the lamp next to it remain static. This paper investigates whether we can use the knowledge that changes in the environment are often sparse to "untangle" latent factors from raw data, without relying on restrictive distributional assumptions.

Methods: Weak Supervision from Sparse Changes

The authors propose a framework for Weakly Supervised Representation Learning. In this context, "weak supervision" is derived from pairs of observations $(x, \tilde{x})$, where $\tilde{x}$ is a version of $x$ after a sparse change has occurred in the underlying latent space.

Diagram illustrating the weakly supervised learning framework where an encoder learns representations by observing sparse perturbations between image pairs.

The Learning Objective

The core idea is to train an encoder $f$ and a set of "guessed" perturbations $\delta'$ such that the change in the learned representation matches the guessed perturbation:

$$f(\tilde{x}) \approx f(x) + \delta'$$

The model minimizes the Mean Squared Error (MSE) between the encoded perturbed image and the encoded original image plus the sparse perturbation vector. To prevent the model from trivially collapsing all representations to zero, the framework requires the "span" of these guessed perturbations to cover the full dimensionality of the latent space.

Theoretical Guarantees

The paper provides rigorous proofs detailing exactly what can be recovered under different sparsity conditions:

  1. 1-Sparse Perturbations: If only one latent factor changes at a time, the true factors can be recovered up to a simple reordering and scaling.
  2. Block-Sparse Perturbations: If groups of factors change together (e.g., the $x$ and $y$ coordinates of a specific object), the factors are recovered up to an affine transformation of those specific blocks.
  3. Overlapping Blocks: Crucially, if perturbation blocks overlap (e.g., one action changes factors $\{1, 2\}$ and another changes $\{2, 3\}$), the model achieves even finer identification. It can isolate individual factors by leveraging the intersection of these overlapping sets, even if those factors never change in complete isolation.

Key Insights

  • Sparsity as Supervision: The model does not need to know what the factors are or how much they changed. Simply knowing that only a few elements changed at once provides a sufficiently powerful constraint to solve the identifiability problem.
  • Distribution Independence: Unlike previous "Non-linear ICA" methods that require latent variables to follow specific distributions (like the Laplace distribution), this method is provably effective for any continuous distribution.
  • Action-Linked Representations: This theory offers a formal justification for why agents in reinforcement learning environments often learn excellent representations. An agent's actions naturally provide the exact "sparse perturbations" required to map the structure of the world.

Experiments and Results

The authors validated their theory using two primary experimental setups, measuring success via the Mean Correlation Coefficient (MCC) (where 1.0 indicates perfect recovery of the true factors up to scaling and permutation).

  • Low-Dimensional Synthetic Data: Using an invertible Multi-Layer Perceptron (MLP) to mix latent variables into observed data, the model was tested across different latent distributions (Uniform and Normal) and dimensions ($d=6, 10, 20$). In the 1-sparse case, the model achieved nearly perfect recovery (MCC $\approx$ 0.99).
  • Image-Based Data: The method was tested on a 2D physics-like environment featuring colored balls rendered as $64 \times 64$ pixel images. The true latents were the $x,y$ coordinates of the balls. Using a ResNet-18 encoder, the model successfully handled high-dimensional, non-linear pixel data, achieving an MCC of 0.97 to 0.99 for component-wise recovery. Visual evidence confirmed that when only one ball moved in the input images, the encoder correctly isolated the movement to that specific ball's representation while keeping others static.

Limitations and Future Work

While promising, the framework has a few limitations that pave the way for future research:

  • Injective Mapping Assumption: The theory assumes the data generation process is "injective" (no information is lost). In real-world images with heavy occlusion, this assumption may break down.
  • Known Dimensionality: The mathematical proofs assume the true number of latent factors $d$ is known beforehand, which is rarely the case in complex, real-world datasets.
  • Temporal Dynamics: The current methodology relies on discrete "before and after" snapshots. Extending this framework to handle continuous video streams or complex causal chains—where one sparse change triggers downstream effects—remains an exciting open challenge.

Summary updated

BibTeX
@inproceedings{ahuja2022weakly,
  author = {Kartik Ahuja and Jason S. Hartford and Yoshua Bengio},
  title = {{Weakly Supervised Representation Learning with Sparse Perturbations}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=_WC46qU4eR},
}
Figure