Unsupervised Disentanglement of Content and Style via Variance-Invariance Constraints

Yuxuan Wu, Ziyu Wang, Bhiksha Raj, Gus Xia

TL;DR

The paper introduces V3 (Variance-versus-Invariance), a fully unsupervised framework that disentangles content and style from sequential data without relying on domain-specific labels. By leveraging the core statistical insight that content changes frequently within a sample while style remains stable, V3 achieves state-of-the-art disentanglement, superior out-of-distribution generalization, and highly interpretable symbolic codebooks.

What Problem Does This Paper Address?

In machine learning, separating the core meaning of data (content) from its variations in appearance or delivery (style) is known as representation disentanglement. For example, humans easily recognize the number "8" whether it is written in blue ink, red paint, or a cursive font.

While humans do this effortlessly, teaching machines to separate pitch from timbre in audio, or text from font in images, usually requires extensive supervision—such as explicit labels, paired datasets, or domain-specific priors. Existing unsupervised methods are often unstable or tailored to a single modality. The authors of this paper tackle a fundamental question: Can we achieve robust, domain-general content-style disentanglement completely unsupervised?

Figure 1: An illustration of the variance-versus-invariance constraints in content and style. Here, content refers to the symbols. Each row represents a data sample, which is divided into multiple fragments along columns. Each fragment contains one content-style pair. For example, digits (e.g., 9, 8, 6) can represent content, while colors (e.g., orange, brown, teal) represent style.

Methods

The authors introduce V3, named after its core principle: Variance-versus-Invariance. The method relies on a domain-general statistical meta-prior:

  1. Content changes frequently within a single data sample (e.g., different digits in a phone number) but draws from a consistent vocabulary across different samples.
  2. Style remains stable within a single sample (e.g., the same handwriting style throughout a note) but varies significantly across different samples.

V3 builds this inductive bias directly into a Vector-Quantized Autoencoder (VQ-AE) architecture. The encoder splits the latent space into two branches: a continuous branch for style ($z^s$) and a discrete, vector-quantized branch for content ($z^c$).

Figure 2: The model architecture of V3. Left: The autoencoder has two branches for content and style respectively, where the content branch has a VQ layer at the encoder output. Right: the V3 constraints, where double-dashed arrows represent measuring the variability by νk(·), and solid arrows represent taking the average.

To enforce the variance-invariance dynamics, the authors introduce a novel regularization loss ($\mathcal{L}_{V3}$) composed of four hinge-loss constraints that compare the degree of variability within and across samples. Crucially, instead of standard deviation, V3 uses Mean Pairwise Distance (MPD) to measure variability, making the model highly sensitive to the multi-peak distributions typical of discrete content symbols.

Datasets

V3 was evaluated across multiple modalities using five distinct datasets:

  • PhoneNums (Synthetic Images): Strings of digits rendered in a handwritten-like font with varying ink colors.
  • InsNotes (Synthetic Audio): Monophonic music clips featuring 12 instruments playing 12 different pitches across an octave.
  • SVHN (Real-world Images): Street View House Numbers, presenting highly diverse, continuous styles (blurry text, shadows, varying fonts).
  • Sprites (Video/Animation): Animated cartoon characters performing 9 distinct actions, where actions represent content and character appearance represents style.
  • Libri100 (Real-world Speech): A 100-hour subset of the LibriSpeech corpus, mapping phonemes (content) against speaker voices (style).

Key Insights and Ideas

  • The Power of the Right Metric: Replacing standard deviation with Mean Pairwise Distance (MPD) was a crucial "aha" moment. Standard deviation struggles to constrain multi-peak distributions, whereas MPD successfully guides the model to cluster distinct, discrete content symbols.
  • Emergent Symbolic Interpretability: Without any label guidance, V3's discrete codebook naturally aligns with human concepts. For instance, when training on digits, specific codebook slots automatically mapped to specific numbers (0-9) with near one-to-one precision.
  • Disentanglement Drives Generalization: By cleanly separating style from content, V3 achieves excellent few-shot learning capabilities when exposed to entirely unseen, out-of-distribution (OOD) styles, even outperforming weakly supervised models.

Key Results

V3 consistently outperformed unsupervised baselines (such as MINE-based models, Cycle-loss autoencoders, and $\beta$-VAEs) across all tasks:

  • Latent Retrieval: On the PhoneNums dataset, V3 achieved a content retrieval PR-AUC of 93.0% (with a codebook size $K=20$), vastly outperforming the MINE baseline (41.9%) and Cycle loss (52.0%).
  • Audio Disentanglement: On InsNotes, V3 reached 89.9% PR-AUC for pitch retrieval, showing clean separation from instrument timbre.
  • Linear Probing on Real Data: On the challenging SVHN dataset, a linear classifier trained on V3’s unsupervised content features achieved 40.6% accuracy, outperforming all other unsupervised baselines. On the Sprites dataset, V3 achieved an action classification accuracy of 88.2%.
  • Few-Shot OOD Adaptation: When evaluated on unseen styles (e.g., new colors or instruments) in a 5-shot setting, V3 achieved 97.1% accuracy on PhoneNums and 97.8% on InsNotes, outperforming standard supervised CNN classifiers.

Limitations and Future Work

Despite its strong performance, the authors note a few limitations:

  • Codebook Collisions: The model is not yet flawless; occasionally, visually similar but distinct concepts (like the digits "8" and "9") can get mapped to the same latent code.
  • Requirement for Defined Fragments: V3 currently relies on pre-segmented data sequences. Extending this capability to unsegmented, continuous data streams (like raw, unaligned audio) remains an open challenge.
  • No Overlapping Content: The framework assumes content elements do not overlap, meaning it cannot currently handle complex scenarios like polyphonic music or mixed audio sources.

Summary updated

BibTeX
@inproceedings{wu2025unsupervised,
  author = {Yuxuan Wu and Ziyu Wang and Bhiksha Raj and Gus Xia},
  title = {{Unsupervised Disentanglement of Content and Style via Variance-Invariance Constraints}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=Lut5t3qElA},
}
Figure