A Unified Latent Space Disentanglement VAE Framework with Robust Disentanglement Effectiveness Evaluation
Authors: Xiaoan Lang, Md Mostafizer Rahman, Fang Liu
Organizations: Department of Applied and Computational Mathematics and Statistics University of Notre Dame, Notre Dame, IN, USA · Lucy Family Institute for Data & Society University of Notre Dame, Notre Dame, IN, USA
Evaluating and interpreting latent representations, such as variational autoencoders (VAEs), remains a significant challenge for diverse data types, especially when ground-truth generative factors are unknown. To address this, we unify several state-of-the-art disentangled VAE approaches for latent space disentanglement into one framework -- bfVAE. To assess the effectiveness of a disentangled VAE model and enhance latent space interpretability, we propose Feature Variance Heterogeneity via Latent Traversal (FVH-LT) and Dirty Block Sparse Regression in Latent Space (DBSR-LS). To ensure robust interpretability of learned latent space, we develop a greedy alignment strategy (GAS) that mitigates label switching and aligns latent dimensions across runs to set the foundation of result aggregation. We also introduce a convenient scalar latent space separation index (LSSI) based on the GAS-aligned outputs of FVH-LT and DBSR-LS to summarize the overall latent structural separation without knowledge of the ground-truth generative factors. We compare bfVAE to five VAE models and validate the effectiveness FVH-LT, DBSR-LS, and LSSI in on seven tabular and image datasets. Under our examined experimental settings, bfVAE provides a more flexible disentanglement framework achieves more favorable overall trade-off between disentanglement and reconstruction than the benchmark VAE models; FVH-LT and DBSR-LS reliably uncover semantically meaningful and domain-relevant latent structures and generally yield consistent results; and LSSI makes an effective quantitative summary of latent structural separation.
Figures & tables
Figure 1: The FVH-LT Workflow. xi contains input features for the i -th observation; zk is the k -th LD and x^ikl for k=1,…,K and l=1,…,L is reconstructed output for xi at l -th fixed value from the LT of zk ; skj is the sample variance of the restructured data for the j -th feature from the LT on LD k .
Figure 2: The GAS procedure. drk denotes the prior-posterior KL divergence of k -th LD; Cij represents the correlation between the i -th LD in reference run r∗ and the j -th LD in run r in the assocation matrix output from FVH-LT (variance matrix S ) or DBSR-LS (regression coefficient matrix ∣D∣ ).
Figure 3: Illustration of two degenerate cases resulting in LSSI =0 . Left: All entries of matrix A are 0 , indicating the complete absence of informative LDs. Right: A single LD dominates all other LDs across all input features in A , resulting in no disentanglement.
Dataset
Training n ; test n
No. of Features p
Known Ground Truth?
FA15 (tabular) †
800/200
15
Yes ( K0=4 factors)
FA100 (tabular) †
40,000/10,000
100
Yes ( K0=6 factors)
White wine (tabular) #
3,918/980
12
No
FIFA 2018 (tabular) #
102/26 (51/13 matches)
16
No
RNA-seq (tabular) #
640/161
20,264
No
MNIST (image) #
50,000/10,000
784 ( 28×28 )
No
Table 1: Datasets used in the experiments
Figure 4: Ground-truth factor-feature association and discovered LD-feature association via bfVAE assessed by FVH-LT in FA15 and FA100. Darker cells indicate stronger associations between LDs and input features. Values in the LD-feature FVH-LT matrix are not shown due to readability reasons. DBSR-LS results for bfVAE and FVH-LT and DBSR-LS in the VAE benchmarks are in Apps. D .1- D .4.
Method
Data
Metric
bfVAE
factor-VAE
β -VAE
Vanilla VAE
DIP-VAE-I
DIP-VAE-II
FVH-LT
FA15
↑ LSSI
0.891
0.807
0.366
0.544
0.633
0.498
(→0)Kmax−K0 †
0
-1
0
0
0
0
FA100
↑ LSSI
0.913
0.940
0.252
0.866
0.874
0.929
(→0)Kmax−K0 †
0
0
3
0
0
0
DBSR-LS
FA15
↑ LSSI
0.979
0.987
0.906
0.597
0.962
0.841
(→0)Kmax−K0 †
0
-1
0
0
0
-1
Table 2: LSSI, reconstruction error, and uncovered informative LD counts in synthetic FA15 and FA100.
Data
Metric
bfVAE
factor-VAE
β -VAE
Vanilla VAE
DIP-VAE-I
DIP-VAE-II
FA15
LSSI 0 FVH-LT
0.963
0.811
0.405
0.703
0.661
0.780
LSSI 0 DBSR-LS
1.000
0.999
0.972
0.851
0.995
0.578
Higgins et al., (2017) ‡
1.00±0.00
0.99±0.01
0.90±0.07
0.96±0.06
0.84±0.11
0.94±0.07
Kim and Mnih, (2018) ‡
0.99±0.03
0.90±0.06
0.89±0.09
0.84±0.07
0.84±0.13
0.81±0.06
FA100
LSSI 0 FVH-LT
0.990
0.986
0.417
0.860
0.932
0.962
LSSI 0 DBSR-LS
0.766
0.743
0.351
0.702
0.681
0.738
Table 3: LSSI 0 and baseline disentanglement scores in synthetic FA15 and FA100
Figure 5: Disentanglement effects of bfVAE assessed by FVH-LT in datasets without knowledge of ground-truth generative factors. Darker cells indicate stronger associations between LD and input features.DBSR-LS results for bfVAE and FVH-LT and DBSR-LS results for the benchmark VAE models are in Apps. D .5- D .9.
Method
Data
Metric
bfVAE
factor-VAE
β -VAE
Vanilla VAE
DIP-VAE-I
DIP-VAE-II
FVH-LT
RNA-seq
↑ LSSI
0.081
0.057
0.056
0.052
0.072
0.058
Kmax
11
14
12
12
13
14
White wine
↑ LSSI
0.390
0.308
0.175
0.220
0.090
0.280
Kmax
5
4
5
5
4
4
FIFA 2018
↑ LSSI
0.132
0.020
0.197
0.031
0.104
0
Kmax
5
2
5
2
5
3
Table 4: LSSI, reconstruction error, and uncovered informative LD counts in real tabular data.
fixed acidity
volatile acidity (VC)
citric acid
residual sugar
chlorides (C)
free SO 2
0.08
0.17
0.08
0.06
0.14
0.05
total SO 2
density (D)
pH
sulphates
alcohol (A)
quality
0.09
0.25
0.07
0.05
0.54
2.9
Table 5: Variance of reconstructed features with LT on wine quality score via FVH-LT.
Figure 6: Disentanglement effects of bfVAE on CelebA assessed by FVH-LT. FVH-LT shows which facial features correspond to what informative LD: LT of non-informative LD4 produces no visible change in the reconstruction and a completely dark heatmap in (a) and (b); in (b), LD1, 2, 12, 16, and 20 primary encode sex, hair style and color, skin tone and illumination, and azimuth (horizontal head orientation), background information, respectively. FVH-LT results for the benchmark VAE models are in Apps. D .11.
Figure 7: Disentanglement effects of bfVAE in MNIST assessed by FVH-LT. (a) and (b) show that LD1, LD10, LD11, and LD13 capture variation between digits 3 and 2, 1 and 3, 7 and 3, and 0 and 1 respectively. Key structural elements that differentiate the digits are evident such as the loops and center vertical line in LD13 and the curved regions near top-left and bottom-right in LD10. The 7 informative LDs produce obvious changes in reconstructed images under LT (first four rows in (b)) with interpretable semantic patterns. For example, LT of LD1 generates digits 2, 3, 8 and the morphing process is reflected in the last column of (b) that suggests a blend of 2,3,8. LD10 also captures directional variations in handwriting. Along the LT, the generated digit changes from a slanted 1 into a 3 which gradually changes its slant and curvature. FVH-LT results for the benchmark VAE models are in Apps. D .10.
Data
Metric
bfVAE
factor-VAE
β -VAE
Vanilla VAE
DIP-VAE-I
DIP-VAE-II
CelebA
↑ LSSI
0.116
0.052
0
0.029
0.031
0.029
↓ recon. ℓ2 ‡
11.07±0.23
10.36±0.03
19.58±0.10
10.16±0.03
10.21±0.03
10.21±0.05
Kmax
14
8
1
10
10
10
MNIST
↑ LSSI
0.184
0.089
0.053
0.078
0.088
0.095
↓ recon. ℓ2 ‡
3.10±0.11
3.46±0.02
5.11±0.00
3.28±0.01
3.30±0.02
3.33±0.02
Kmax
7
9
14
10
8
9
Table 6: LSSI, reconstruction error, and uncovered informative LD counts in CelebA and MNIST.
FA15
FIFA 2018
White wine
CVAE White wine
FA100
RNA-seq
MNIST
CelebA
n ‡
800
102
3,918
3,918
40,000
640
50,000 †
35,000
Epochs
150
350
150
75
150
100
35
50
model training time (min)
3 (M2)
1 (M2)
10 (M2)
20 (M2)
4 (G4)
1 (G4)
2 (A100)
4 (A100)
FVH-LT † time (min)
2 (M2)
< 1 (M2)
15 (M2)
16 (M2)
17 (G4)
10 (G4)
14 (A100)
60 (A100)
DBSR-LS time (min)
1 (M2)
< 1 (M2)
1 (M2)
–
2 (G4)
–
40 (A100)
–
Table 7: Approximate single-run time for VAE model training, FVH-LT, and DBSR-LS.
Figure 8: An example of posterior statistics across LDs on MNIST (15 LDs × 1000 MNIST images): (a) posterior distributions of informative LDs, (b) posterior distributions of non-informative LDs, (c) histogram of posterior means, (d) histogram of posterior variances (among the 15,000 LDs, exactly 7,000 display near-zero variances in their distribution and correspondingly exhibit large KL divergence).
Appendix figures & tables36 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 9: Conceptual illustration of DBSR-LS. Posterior means μZ in the latent space are multi-task regression responses; x are predictors; sparse regression coefficient matrix D^ summarizes latent-feature association.
Learning disentangled representations, where semantic features are independently captured in a latent space, is dominated by Variational Auto Encoders (VAE) and Adversarial Training. In this paper, we provide direct quantitative and visual evidence that these methods consistently fail to enforce the target factorized representation on the aggregate posterior, leading to entangled representations. We quantify this failure using the Latent Predictability Score (LPS), an unsupervised metric of mutual predictability that empirically lower bounds the level of entanglement in a latent space. To address these limitations, we leverage the non-parametric Maximum Mean Discrepancy (MMD) to directly sculpt the aggregate posterior enabling programmable priors. We demonstrate (1) state-of-the-art unsupervised statistical independence, with a 70% reduction in detected entanglement compared to leading baselines; (2) the flexibility to optionally inject semi-supervised information for explicit semantic alignment; and (3) precise shaping of the aggregate posterior distribution (validated through quantization-aware training) without sacrificing reconstruction quality.
Disentangled representation learning aims to map independent factors of variation to independent representation components. On one hand, purely unsupervised approaches have proven successful on fully disentangled synthetic data, but fail to recover semantic factors from real data without strong inductive biases. On the other hand, supervised approaches are unstable and hard to scale to large attribute sets because they rely on adversarial objectives or auxiliary classifiers. We introduce XFactors, a weakly-supervised VAE framework that disentangles and provides explicit control over a chosen set of factors. Building on the Disentangled Information Bottleneck perspective, we decompose the representation into a residual subspace S and factor-specific subspaces T1,…,TK and a residual subspace S. Each target factor is encoded in its assigned Ti through contrastive supervision: an InfoNCE loss pulls together latents sharing the same factor value and pushes apart mismatched pairs. In parallel, KL regularization imposes a Gaussian structure on both S and the aggregated factor subspaces, organizing the geometry without additional supervision for non-targeted factors and avoiding adversarial training and classifiers. Across multiple datasets, with constant hyperparameters, XFactors achieves state-of-the-art disentanglement scores and yields consistent qualitative factor alignment in the corresponding subspaces, enabling controlled factor swapping via latent replacement. We further demonstrate that our method scales correctly with increasing latent capacity and evaluate it on the real-world dataset CelebA. Our code is available at github.com/ICML26-anon/XFactors.
Alexandre Myara, Nicolas Bourriez, Thomas Boyer +3
The usefulness of a variational autoencoder (VAE) depends on two properties of its latent space that are hard to obtain together: high encoding capacity in the individual latent variables, and a low-dimensional, disentangled organization of those variables. Weakening the Kullback-Leibler regularization raises capacity but degrades disentanglement, while strengthening it prunes latent variables away entirely. We formulate VAE training as a soft-constrained optimization problem that addresses both. First, we impose an entropy-based constraint (EC) on individual latent variables, showing that the entropy of a latent code upper-bounds the mutual information it carries about the generative factors of the data. Second, we propose a weight-filter method that exploits the slack of the soft constraint to prune low-entropy dimensions during downstream training. On dSprites, the EC raises the aggregate latent-variable activation score by 43-62% over a vanilla VAE, attains the highest FactorVAE score among the \b{eta} \b{eta}-VAE variants (0.891 vs 0.847), and lowers reconstruction error by up to 38%. On MNIST, the weight filter reduces the latent dimensionality supplied to a downstream classifier from ten to two while holding accuracy above 90%, converging in 37% fewer epochs than the same procedure without the EC. We also find that low-entropy discrete factors tend to merge into a single latent variable, whereas high-entropy continuous factors are distributed across several.
Ye Shi
Elmore Family School of Electrical and Computer Engineering, Purdue University, West Lafayette, IN, 47906 USA