NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Disentangling Factors of Variation by Mixing Them

Qiyang Hu, Attila Szabó, Tiziano Portenier, Paolo Favaro, Matthias Zwicker

Introduction

In computer vision, the goal of disentangled representation learning is to decompose an image's feature vector into independent components, each controlling a specific semantic attribute such as pose, color, or identity. While supervised and weakly supervised methods have seen success, unsupervised disentanglement remains a challenge due to the "shortcut problem," where neural networks collapse information into a single feature or fail to capture complex semantics. This paper proposes a novel unsupervised strategy based on "mixing and unmixing" feature chunks to achieve robust disentanglement without manual labels.

The Mixing/Unmixing Strategy

The proposed method utilizes a specialized autoencoder architecture designed to enforce invariance across different factors of variation through a cycle-consistency objective.

The Mixing/Unmixing Architecture

The process involves several key components:

  1. Feature Chunking: The encoder maps an image $x$ to a feature vector $f$, which is partitioned into $n$ equal-sized chunks ($f^1, f^2, \dots, f^n$).
  2. Mixing (Invariance Objective): Given two random images $x_1$ and $x_2$, the model creates a "mixed" feature vector by swapping a subset of chunks from $f_1$ with those from $f_2$. This vector is decoded into a synthetic image $x_3$.
  3. Unmixing (Cycle Consistency): The model encodes $x_3$ and attempts to "unmix" it by restoring the original chunks from $f_1$. The resulting reconstruction $x_4$ must match the original $x_1$, enforced by an $L_2$ loss.
  4. The Classifier (Shortcut Prevention): To ensure every chunk carries meaningful information, a classifier (Cls) is trained to identify which source image ($x_1$ or $x_2$) provided the data for each chunk in $x_3$. This "stick" forces the model to distribute information across the entire feature vector rather than taking a shortcut and using only one chunk.
  5. Adversarial Loss: A discriminator (Dsc) ensures that the mixed images $x_3$ are indistinguishable from real dataset samples, maintaining visual fidelity.

Experimental Results

The authors evaluated the model on three standard benchmarks: MNIST, Sprites, and CelebA.

Qualitative Performance

On MNIST, the model successfully separates digit identity from stylistic variations like stroke width and rotation. As shown in the figure below, swapping "style" chunks between different digit identities results in consistent transformations across the grid.

Disentanglement on MNIST

On the more complex CelebA dataset, the model isolated attributes such as hair style, presence of glasses, and facial pose. By swapping specific chunks, one can visually transfer glasses from one subject to another while maintaining the target's identity, demonstrating competitive performance with state-of-the-art unsupervised methods like $\beta$-VAE.

Quantitative Performance

On the Sprites dataset, which contains ground-truth labels for attributes like skin color and hairstyle, the proposed method (MIX+C+G) achieved a Mean Average Precision (mAP) of 0.70. This significantly outperforms a standard vanilla autoencoder (0.46) and demonstrates the necessity of the classifier and GAN components for effective disentanglement.

Discussion and Limitations

The method provides a powerful framework for unsupervised disentanglement without requiring domain-specific knowledge (e.g., whether a factor is discrete or continuous). However, it requires a pre-defined number of chunks ($n$), and the visual fidelity of reconstructions can be sensitive to chunk size. Future work may explore dynamic chunk allocation or methods to further reduce residual entanglement in highly correlated datasets.

Summary updated

BibTeX
@inproceedings{hu2018disentangling,
  author = {Qiyang Hu and Attila Szabó and Tiziano Portenier and Paolo Favaro and Matthias Zwicker},
  title = {{Disentangling Factors of Variation by Mixing Them}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2018},
  doi = {10.1109/cvpr.2018.00358},
}
Figure