CS58700 - Foundations of Deep Learning¶

Spring 2026¶

Instructor and Copyright: Bruno Ribeiro¶


Disentangled Representations¶

Reading¶

  • Goodfellow, Bengio & Courville (2016), Deep Learning, Chapter 15: Representation Learning.
  • Bengio, Courville & Vincent (2013), "Representation Learning: A Review and New Perspectives," IEEE TPAMI 35(8):1798–1828.
  • Locatello et al. (2019), "Challenging Common Assumptions in the Unsupervised Learning of Disentangled Representations," ICML.
  • Higgins et al. (2018), "Towards a Definition of Disentangled Representations," arXiv:1812.02230.
  • Consider the task of building a car detector
No description has been provided for this image
  • Task: put a bounding box $Y_i \in \mathbb{R}^{2 \times 2}$ for each car in the 2D image $X_i \in \mathbb{R}^{h \times w}$
    • This is a regression task, where $f(\Gamma(X ; {\bf W}_\Gamma); {\bf W}_f) \in \mathbb{R}^{2 \times 2}$ outputs the 2 coordinates that form a box
      • That is, the input is processed as follows $X_i \xrightarrow{\Gamma} Z_i \xrightarrow{f} Y_i$
  1. What properties would we like $Z_i = \Gamma(X_i)$ to have?
  2. How do we define the objective for $\Gamma$ to achieve these properties?

Desired Properties of a Representation¶

No description has been provided for this image
  • Equivariance:
    • For car detection: If the car changes location by some horizontal $t$ and vertical $v$ amounts, the bounding box also changes location by $(t,v)$.
    • Formally: $\Gamma(g \cdot X) = g' \cdot \Gamma(X)$ for some corresponding transformation $g'$ in the representation space.
  • Invariance:
    • For car detection: We should find the correct location irrespective of day/night, car color, among other environment variables.
    • Formally: Invariance is a special case of equivariance where the transformation in the representation space is the identity, i.e., $\Gamma(g \cdot X) = \Gamma(X)$.
    • Which factors we want invariance vs. equivariance to depends on the downstream task.

Why Do We Care About Disentanglement?¶

  • A good representation should support many downstream tasks, not just one.
  • If $Z$ is disentangled into independent factors, then:
    1. Transfer learning: A new task can select which factors are relevant via a simple linear head.
    2. Sample efficiency: The downstream task $f$ only needs to learn a mapping from the relevant subset of factors, requiring far fewer labeled examples.
    3. Interpretability: Individual dimensions of $Z$ correspond to human-understandable concepts.
    4. Robustness to causal interventions: Interventions on one factor (e.g., changing color) do not affect other factors (e.g., shape), leading to more robust predictions.

Supervised Learning Needs a Lot of Data to Learn Correct Invariance / Equivariance¶

  • In our car detection task, $\Gamma$ needs to learn to be invariant to lighting, car color, camera pose, texture, material, scene background, etc.

  • For instance, consider the over-simplifying case where there are only 100 possible values for each of the above variables (lighting, car color, camera pose, texture, material, scene background).

    • There would be $10^{12}$ possible images.
  • That is, $\Gamma$ needs to see enough examples to learn the correct invariance: That the output $Y$ is not associated with any of these variations.

  • This data-driven invariance approach is too data hungry for most tasks.

  • Key insight: if we could disentangle the factors of variation in an unsupervised (or weakly supervised) way, we could learn invariance from a much smaller labeled dataset by simply ignoring the irrelevant factors.

Generating factors¶

  • Consider a small supervised dataset $\{(X_i,Y_i)\}_{i=1}^n$ for our bounding box task, where $X_i \in \mathbb{R}^{h \times w}$ and $Y_i \in \mathbb{R}^{2 \times 2}$.

    • But we have a lot of unlabeled data $\{X_j\}_{j=1}^m$, $m \gg n$.
  • Then, we want to learn $\Gamma$ in an unsupervised fashion

    • E.g., $\Gamma$ could be the encoder of an autoencoder.
  • Challenge:

    • Invariance to color is not something that $\Gamma$ will learn as an encoder.
    • Maybe we will want $\Gamma$ for other tasks, such as identifying the color of the car.
    • We want $\Gamma$ to preserve all factors while separating them, so the downstream task can choose what to keep and what to discard.

Generating factors¶

  • Generating factors: the underlying variables that fully characterize the variation of the data (seen or yet-to-be-seen)

  • How many variables are in a scene with a car?

    • Type of car, model year
    • Camera position
    • Car color
    • Possible accidents
    • Lighting effects (day/night, position of sun, ...)
    • Distance to camera
    • Camera lens
    • Background
    • Towing cargo
    • ...
No description has been provided for this image
  • Assumption: There exists some (unknown) generative process $X = h(z_1, z_2, \ldots, z_k, \epsilon)$ where $z_i$ are the generating factors and $\epsilon$ is noise.
    • The goal of disentanglement is to recover (up to permutation and element-wise reparameterization) the true factors $z_1, \ldots, z_k$ from observations $X$ alone.

Disentangled Representations¶

  • The idea is to learn $\Gamma$ by separating it into generating factors

    • Then, for final output $f \circ \Gamma$, $f$ can select which generating factors of $\Gamma$ it must be invariant to.
  • Goal of disentangled representations is to capture factors of variation while discarding as little information as it is practical.

  • Two complementary viewpoints:

    1. Statistical: Each dimension $Z_j$ of the representation should be statistically independent of the others, and each $Z_j$ should capture a single generating factor.
    2. Group-theoretic: The representation should decompose into subspaces, each of which transforms independently under the action of a single generating factor (Higgins et al., 2018).

Formal Definition (Group-Theoretic View)¶

  • Let
    • $g \in G$ be an element of a transformation set $G$.
      • For instance, change the color of the car.
      • If this transformation can be undone (has an inverse) $G$ is a group.
      • Color changes do not need to have an inverse, but let's assume they do.
    • $\Gamma: \mathbb{R}^{h\times w} \to \mathbb{R}^{k}$ be the neural network that gives the input $X \in \mathbb{R}^{h\times w}$ representation.
    • Note that since $Z = \Gamma(X)$, $Z \in \mathbb{R}^{k}$.
    • $\rho_x:G \to \mathbb{R}^{h w \times h w}$ be a representation of group $G$ that transforms $X$.
    • $\rho_z:G \to \mathbb{R}^{k \times k}$ be a representation of group $G$ that transforms $Z$.

Consider the transformations:

No description has been provided for this image
  • We say $Z$ is disentangled if $\omega_z = \rho_z(g)$.
  • Understanding this definition: The encoder $\Gamma$ is equivariant with respect to $G$ if the following diagram commutes: $$\Gamma(\rho_x(g) \cdot X) = \rho_z(g) \cdot \Gamma(X), \quad \forall g \in G, \forall X$$

  • Disentanglement adds structure to $\rho_z$: We require that $\rho_z$ decomposes as a direct sum of subrepresentations: $$\rho_z(g) = \rho_{z_1}(g) \oplus \rho_{z_2}(g) \oplus \cdots \oplus \rho_{z_m}(g)$$

    • This means $\rho_z(g)$ is block-diagonal, and each block $\rho_{z_i}(g)$ acts on a disjoint subspace of $Z$.
    • Each subspace captures one factor of variation.
    • Example: If $G = G_{\text{color}} \times G_{\text{position}} \times G_{\text{lighting}}$, then changing color (applying $g_{\text{color}}$) only affects the subspace corresponding to color and leaves position/lighting subspaces unchanged.
  • Connection to invariance: Given a disentangled $Z = (Z_1, Z_2, \ldots, Z_m)$, a downstream task that should be invariant to factor $i$ simply ignores $Z_i$.

Identifiability¶

  • Disentanglement:

    • Learning disentangled representations without supervision is impossible in general (as shown by (Locatello et al., 2019)).
    • Possible only on specific settings
  • Causality

    • Given an input $X$, there is an infinite number of generative models that could have generated a sample from its marginal distribution $X \sim p(x)$
  • Non-Linear ICA result by (Hyvarinen & Pajunen, 1999):

    • A parameterized model is identifiable if the following holds: $$ p(x | \theta) = p(x | \theta') \implies \theta = \theta'$$
  • Why identifiability matters: Without identifiability, two different encoders $\Gamma$ and $\Gamma'$ could achieve the same reconstruction loss but learn completely different (and potentially entangled) representations. We need guarantees that the learned factors correspond to the true generating factors.

  • The core obstacle (Non-Linear ICA): For linear ICA, independent components are identifiable up to permutation and scaling (Comon (1994)). For non-linear mixing functions, this fails catastrophically: given any distribution $p(x)$ and any factored prior $\prod_i p(z_i)$, there exist infinitely many non-linear maps $h$ such that $X = h(Z)$ and the components of $Z$ are independent. This is the fundamental reason unsupervised disentanglement is impossible in general.

Unsupervised disentanglement¶

  • Learning $\Gamma$ that contains true disentangled representations without supervision is impossible in all settings.
    • Theorem 1 of (Locatello et al., 2019)

Theorem 1 was expected:

  • Suppose $Z \in \mathbb{R}^k$ were a sample of a multivariate Gaussian distribution with diagonal covariance matrix.
    • Collapsing two Gaussian latents by summing is also a Gaussian independent of other dimensions.

More concretely: Let $p(z) = \prod_{i=1}^k p(z_i)$ be a factored prior, and let $h: \mathcal{Z} \to \mathcal{X}$ be the true (injective) generative function so $X = h(Z)$. For any orthogonal matrix $A$, define $\tilde{Z} = AZ$ and $\tilde{h} = h \circ A^{-1}$. If $p(z_i)$ are all Gaussian, then $\tilde{Z}$ also has independent components and $\tilde{h}(\tilde{Z}) = X$. So the model $(p, h)$ is indistinguishable from $(\tilde{p}, \tilde{h})$. That is, we cannot recover the true factors.

In [3]:
"""Gaussian latent factors are non-identifiable under orthogonal rotations."""
import numpy as np, matplotlib.pyplot as plt

np.random.seed(42)
N = 5000
theta = np.pi / 3
A = np.array([[np.cos(theta), -np.sin(theta)], [np.sin(theta), np.cos(theta)]])

h = lambda z: np.array([z[0] + 0.5*z[1]**2, 0.8*np.tanh(z[0]) + z[1]])  # injective map
h_vec = lambda Z: np.array([h(Z[:, i]) for i in range(Z.shape[1])]).T

def mi_binned(x, y, bins=30):
    p = np.histogram2d(x, y, bins=bins)[0]; p = p / p.sum()
    px, py = p.sum(1), p.sum(0); m = p > 0
    return max(np.sum(p[m] * np.log(p[m] / (px[:,None]*py[None,:])[m])), 0.0)

Z = np.random.randn(2, N)
Zt = A @ Z
X, Xt = h_vec(Z), h_vec(np.linalg.inv(A) @ Zt)

# ─── Plot ───────────────────────────────────────────────────────────────────
fig, axes = plt.subplots(1, 4, figsize=(18, 5))
fig.suptitle("Non-Identifiability of Gaussian Latent Factors", fontsize=18, fontweight="bold")
kw = dict(s=3, alpha=0.25, rasterized=True)

titles = [f"$Z \\sim \\mathcal{{N}}(0,I)$\nMI ≈ {mi_binned(Z[0],Z[1]):.4f}",
          f"$\\tilde{{Z}}=AZ$  (Rot {int(np.degrees(theta))}°)\nMI ≈ {mi_binned(Zt[0],Zt[1]):.4f}",
          "$X = h(Z)$",
          "$X = \\tilde{h}(\\tilde{Z}) = h(A^{-1}\\tilde{Z})$"]
data = [(Z, "#2563EB"), (Zt, "#DC2626"), (X, "#2563EB"), (Xt, "#DC2626")]
labels = ["Independent ✓", "Still independent ✓", None, None]
colors = ["#16A34A", "#16A34A", None, "#7C3AED"]

for ax, (d, c), t, lbl, lc in zip(axes, data, titles, labels, colors):
    ax.scatter(d[0], d[1], c=c, **kw); ax.set_title(t, fontsize=12)
    if lbl: ax.annotate(lbl, xy=(0.5,0.02), xycoords="axes fraction",
                         ha="center", fontsize=11, color=lc, fontweight="bold")

for ax in axes[:2]: ax.set_aspect("equal"); ax.set_xlim(-4,4); ax.set_ylim(-4,4)
xl = [min(axes[2].get_xlim()[0], axes[3].get_xlim()[0]), max(axes[2].get_xlim()[1], axes[3].get_xlim()[1])]
yl = [min(axes[2].get_ylim()[0], axes[3].get_ylim()[0]), max(axes[2].get_ylim()[1], axes[3].get_ylim()[1])]
for ax in axes[2:]: ax.set_xlim(xl); ax.set_ylim(yl)

plt.tight_layout(); plt.show()
No description has been provided for this image

Implication: Any method (VAE, GAN, etc.) that only optimizes a marginal likelihood $p(x)$ with an independent prior $\prod_i p(z_i)$ cannot guarantee disentanglement without additional assumptions.

In practice we need to further bias which functions $\Gamma$ we will learn:

  • Supervision (data): full supervision, semi-supervised or weak
  • May also need inductive biases (hard constraints on $\Gamma$)

Identifiability Solution: Inductive Bias¶

Inductive biases have been important for deep learning successes:

  • CNNs feature maps are approximately translation equivariant
  • GNNs are permutation equivariant
  • ViTs: Patch tokenization introduces a weak locality prior; self-attention is permutation equivariant over patches, with positional embeddings re-injecting spatial structure: far fewer hard-coded spatial biases than CNNs, relying on data scale instead (Dosovitskiy et al., 2021)
  • Transformers for LLMs: Self-attention is permutation equivariant over tokens; causal masking enforces an autoregressive factorization $p(x_1, \dots, x_T) = \prod_t p(x_t \mid x_{<t})$. RoPE encodes relative position by rotating query/key vectors as to make attention scores a function of relative distance $(i - j)$ of tokens in the sequence rather than absolute position: this injects a translation-like equivariance over token positions while preserving length generalization (Su et al., 2024); (Vaswani et al., 2017)
  • Disentangled representations aim to give structure to the learned representations:
    • Useful bias implies identifiable models
  • Examples of inductive biases for disentanglement:
    • Architectural: Restricting the capacity of the decoder so it cannot entangle factors (e.g., spatial broadcast decoder).
    • Regularization: Penalizing the total correlation of the latent distribution (as in $\beta$-VAE, FactorVAE).
    • Temporal: Assuming slow-changing factors across consecutive frames (Klindt et al., 2021); non-stationary noise signals (Hyvarinen et al., 2019).
    • Weak supervision: Knowing that two observations share all but $k$ factors (Locatello et al., 2020).
    • Causal structure: Imposing a known or learned DAG structure on the latent variables.

Some Identifiability Results¶

  • iVAE (Khemakhem et al., 2020): Non-linear ICA becomes identifiable (up to permutation and element-wise transformation) when an auxiliary observed variable $u$ (e.g., time index, class label) modulates the prior $p(z | u)$, and the prior is from an exponential family with sufficient variability across $u$.

    • Key condition: the prior must vary enough across values of $u$ so that the sufficient statistics are not degenerate.
  • Slow feature analysis / temporal structure (Hyvarinen & Morioka, 2016): If data comes in temporal segments and the source distributions change across segments, non-linear ICA is identifiable.

  • Ada-GVAE (Locatello et al., 2020): Weak supervision where pairs of observations share all but a small number of factors is sufficient for identifiability.

  • These results unify the message: some form of structured variation or supervision is necessary and sufficient for identifiability.

Data biases: Correlation in the factors¶

  • Most of synthetic / toy data assume independent factors

  • Not true in reality

    • Can we have a car driving without wheels?
    • Can we have an apartment building without a sidewalk?
  • Some combinations will never happen

    • Some are determined only when other factors are present
  • Implications for evaluation: Standard benchmarks (dSprites, 3DShapes, MPI3D) use independent factors by design. Performance on these benchmarks may not reflect real-world disentanglement quality.

  • Correlated factors and identifiability: When factors are correlated, the problem becomes harder — the model must distinguish between statistical dependence due to entanglement and dependence due to true correlations in the data-generating process.

How to find disentangled representations?¶

  • Goal: learn a good disentangled $Z$ through the encoder $\Gamma: \mathcal{X} \to \mathcal{Z}$, where $\mathcal{X}$ is the domain of the input and $\mathcal{Z}$ is the image of the representation.

  • Simple view: consider that each dimension in $Z$ is unrelated to one another

    • Note that different works interpret this condition differently
  • Ideally we would like to do this unsupervised

    • In the end, we can't
  • Simple idea: what if our task is to reconstruct input $X$

    • Encoder $\Gamma: \mathcal{X} \to \mathcal{Z}$
    • Decoder $f_x: \mathcal{Z} \to \mathcal{X} $ (trying to get output from input)
    • Must assume $\Gamma$ and $f_x$ are not universal approximators
  • Tension: The better the decoder reconstructs, the less pressure there is to disentangle. A perfect autoencoder can memorize the data with an arbitrary (entangled) code. This motivates explicit regularization of the latent space.

Disentanglement models with Encoder & Decoder structure¶

  • The methods used to create $\Gamma$ are:

    • Variational AutoEncoder (VAE) (we will cover)
    • Generative Adversarial Networks (GANs) (we will cover)
    • Normalizing flows (we will not cover)
  • Using the above methods alone is not enough

VAE-Based Disentanglement Methods (we will cover VAEs later in the course)¶

Recall the VAE objective (ELBO): $$\mathcal{L}_{\text{VAE}} = \mathbb{E}_{q_\Gamma(z|x)}[\log p_{f_x}(x|z)] - D_{\text{KL}}(q_\Gamma(z|x) \| p(z))$$

where $q_\Gamma(z|x)$ is the encoder, $p_{f_x}(x|z)$ is the decoder, and $p(z) = \mathcal{N}(0, I)$ is the prior.

The KL term already encourages some independence (since the prior is factored), but this is often insufficient.

$\beta$-VAE (Higgins et al., 2017): $$\mathcal{L}_{\beta\text{-VAE}} = \mathbb{E}_{q_\Gamma(z|x)}[\log p_{f_x}(x|z)] - \beta \cdot D_{\text{KL}}(q_\Gamma(z|x) \| p(z))$$

  • $\beta > 1$ puts extra pressure on the aggregate posterior $q(z) = \mathbb{E}_{p(x)}[q(z|x)]$ to match the factored prior.
  • Tradeoff: Higher $\beta$ improves disentanglement but degrades reconstruction quality. The latent bottleneck forces the encoder to allocate capacity to the most salient factors first.
  • Information-theoretic view: Increasing $\beta$ reduces the mutual information $I(X; Z)$ between input and latent code, forcing the model to compress more aggressively.

Decomposing the KL term (Hoffman & Johnson, 2016): $$D_{\text{KL}}(q(z,x) \| p(z)p(x)) = \underbrace{I_q(x; z)}_{\text{mutual info}} = \underbrace{D_{\text{KL}}(q(z) \| p(z))}_{\text{marginal KL}}$$

The marginal KL can be further decomposed: $$D_{\text{KL}}(q(z)\|p(z)) = \underbrace{D_{\text{KL}}\!\left(q(z) \Big\| \prod_j q(z_j)\right)}_{\text{Total Correlation (TC)}} + \underbrace{\sum_j D_{\text{KL}}(q(z_j)\|p(z_j))}_{\text{Dimension-wise KL}}$$

This decomposition reveals that the standard KL penalty conflates three distinct objectives. Disentanglement is primarily driven by minimizing the Total Correlation term.

FactorVAE (Kim & Mnih, 2018):

  • Directly penalizes the Total Correlation using a density-ratio trick with an auxiliary discriminator: $$\mathcal{L}_{\text{FactorVAE}} = \mathcal{L}_{\text{VAE}} - \gamma \cdot D_{\text{KL}}\!\left(q(z) \Big\| \prod_j q(z_j)\right)$$
  • The TC is estimated via an adversarial classifier that distinguishes $z \sim q(z)$ from $\tilde{z} \sim \prod_j q(z_j)$ (obtained by randomly permuting each dimension across a batch).

$\beta$-TCVAE (Chen et al., 2018):

  • Also targets the TC term but estimates it using a tractable minibatch-weighted sampling estimator (no discriminator needed).
  • Upweights the TC term while keeping the mutual information and dimension-wise KL at standard weight: $$\mathcal{L}_{\beta\text{-TCVAE}} = \mathbb{E}[\log p(x|z)] - \alpha \cdot I_q(x;z) - \beta \cdot \text{TC}(q(z)) - \gamma \cdot \sum_j D_{\text{KL}}(q(z_j)\|p(z_j))$$
    • Typically $\alpha = \gamma = 1$ and $\beta > 1$.

DIP-VAE (Kumar et al., 2018):

  • Regularizes the moments of $q(z)$ directly:
    • DIP-VAE-I: Penalizes off-diagonal entries of $\text{Cov}_{q(z)}[z]$ (encourages uncorrelated marginals).
    • DIP-VAE-II: Additionally penalizes $\mathbb{E}_{p(x)}[\text{Cov}_{q(z|x)}[z]]$ (encourages low variance within each encoding).
  • Does not require density estimation or adversarial training.

Disentanglement Metrics¶

How do we evaluate whether a representation is disentangled? Several metrics have been proposed, each capturing different aspects:

BetaVAE metric (Higgins et al., 2017):

  • Fix a factor $k$, generate pairs of images that differ only in factor $k$, encode them, take the absolute difference of the latent codes, and train a linear classifier to predict $k$ from the difference vector.
  • Accuracy of this classifier = disentanglement score.

FactorVAE metric (Kim & Mnih, 2018):

  • Similar to BetaVAE metric but uses a majority-vote classifier on the dimension with the smallest variance in the difference vector, avoiding the need to train a classifier.

DCI Disentanglement (Eastwood & Williams, 2018):

  • Trains a predictor (e.g., Lasso or gradient-boosted trees) from each latent dimension to each ground-truth factor.
  • Measures: Disentanglement (each code dimension captures at most one factor), Completeness (each factor is captured by at most one code dimension), Informativeness (prediction error).

Mutual Information Gap (MIG) (Chen et al., 2018):

  • For each factor $k$, compute the mutual information $I(z_j; v_k)$ between each latent dimension $z_j$ and ground-truth factor $v_k$.
  • MIG = average over factors of the normalized gap between the top two latent dimensions.

Limitation of all metrics: They require access to ground-truth factors, which are only available in synthetic settings. Evaluating disentanglement on real data remains an open problem.

"Self-supervised" Image Translation¶

  • A mapping of one image (domain) to another
    • Could be mapping a segmentation map to its image
    • Could be mapping images in two different environments ("self-supervision")
      • Use day image to predict night image or vice-versa
      • B/W image to predict colored image
No description has been provided for this image

Another approach: Cross-variable disentanglement¶

Above "self-supervision" relies on having ground truth for factors of variation

  • We now introduce another approach

  • Consider two distinct tasks $l$ and $l'$ over the same input $X$

  • Consider two latent variables $C$ and $S$, both obtained by the encoder $\Gamma$

Cross-variable disentanglement (see (Liu et al., 2020)) is illustrated below

  • Measures the degree of disentanglement between two latent variables $C$ and $S$
    • Uncorrelation
      • One should contain no information about the other
    • Informativeness
      • Each variable must be able to help predict something about one of the tasks
No description has been provided for this image
  • The independence between $C$ and $S$ can be achieved by adding a dependence loss
    • Empirical Distance Correlation (DC) is widely used but not theoretically sound, since it only measures the linear correlation between $C$ and $S$
    • Kernel target alignment (Cristianini et al., 2001) is a better loss to get independence
    • A better way is to use the Hilbert-Schmidt independence criterion, see (Gretton et al., 2007) for the loss function.
      • We will cover the Hilbert-Schmidt independence criterion later in the course
    • Can also be achieved by a minimax game where an adversarial link function $g(C)$ tries to predict $S$ and vice-versa.
      • We will cover this minimax objective later in the course

Formal objective for cross-variable disentanglement:

$$\mathcal{L} = \underbrace{\mathcal{L}_{\text{task}_l}(C)}_{\text{task } l \text{ from } C} + \underbrace{\mathcal{L}_{\text{task}_{l'}}(S)}_{\text{task } l' \text{ from } S} + \lambda \underbrace{\widehat{\text{HSIC}}(C, S)}_{\text{independence penalty}}$$

where $\widehat{\text{HSIC}}$ is an empirical estimator of the Hilbert-Schmidt Independence Criterion: $$\text{HSIC}(C, S) = \| \mathbb{E}_{c,s}[\phi(c) \otimes \psi(s)] - \mathbb{E}_c[\phi(c)] \otimes \mathbb{E}_s[\psi(s)] \|_{\text{HS}}^2$$

with $\phi, \psi$ being feature maps of universal reproducing kernels. HSIC = 0 if and only if $C \perp\!\!\!\perp S$.

Advantages of HSIC over alternatives:

  • Distance Correlation only captures linear dependence (despite claims otherwise — the original DC does detect non-linear dependence, but the empirical estimator used in practice has limited power for high-dimensional latents).
  • Adversarial methods (minimax) can be unstable and hard to train.
  • HSIC has efficient $O(n^2)$ biased estimators and $O(n)$ unbiased estimators (Song, Smola, Gretton, Bedo & Borgwardt (2012)), and does not require inner-loop optimization.

Summary: A Taxonomy of Approaches¶

Approach Supervision Required Key Mechanism Example Methods
$\beta$-VAE family None (but no identifiability guarantee) Regularize latent distribution $\beta$-VAE, FactorVAE, $\beta$-TCVAE, DIP-VAE
Weak supervision Pairs sharing factors Constrain shared/differing factors Ada-GVAE, GroupVAE
Temporal structure Time-ordered data Slow-changing or non-stationary priors SlowVAE, iVAE, PCL
Cross-variable Task labels for two tasks Independence penalty between latent groups HSIC-based, adversarial
Self-supervised translation Paired domains Cycle consistency + domain separation CycleGAN variants
Architectural bias None Restrict decoder capacity Spatial broadcast decoder

Useful Libraries for Two+ Latent Variables¶

  • Vector-based disentanglement library
  • C-S disentanglement library

In [ ]: