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

Tree Variational Autoencoders

Laura Manduchi, Moritz Vandenhirtz, Alain Ryser, Julia E Vogt

Introduction

Hierarchical structure is a fundamental characteristic of real-world data, ranging from biological taxonomies to digital file systems. In machine learning, capturing these hierarchies in an unsupervised manner remains a significant challenge. While traditional hierarchical clustering methods struggle with high-dimensional data, modern deep generative models often rely on flat or strictly sequential latent structures.

Researchers from ETH Zurich introduced Tree Variational Autoencoders (TreeVAE) at NeurIPS 2023. This framework learns to "grow" an optimal tree structure that mirrors natural dependencies within a dataset, enhancing both interpretability and generative performance.

The Challenge of Latent Hierarchy

Standard Variational Autoencoders (VAEs) typically map data into a continuous latent space, often overlooking the discrete, branching nature of many datasets. Sequential hierarchical models, such as LadderVAE, utilize a fixed stack of latent variables, assuming a uniform path for every data point. However, data often follows a branching structure where different groups share broad characteristics but diverge in specific details. For instance, "planes" and "ships" share the concept of transportation but require distinct latent features for their unique attributes. TreeVAE addresses this by discovering branching structures automatically without labels.

Methodology

TreeVAE integrates the probabilistic framework of VAEs with the structural logic of decision trees.

  1. Tree Architecture: The model defines a global binary tree where each node represents a latent variable ($z$).
  2. Probabilistic Routing: Router neural networks at each split determine the probability of a sample moving to a specific child node.
  3. Conditional Transformations: As samples descend the tree, latent representations are refined through neural networks that learn child-parent dependencies.
  4. Specialized Leaf Decoders: TreeVAE employs separate decoders for every leaf, allowing the model to become an "expert" in reconstructing specific clusters.
  5. Iterative Growing: The tree begins with a root and two leaves, expanding by splitting leaves that meet specific criteria, such as sample density.
  6. Contrastive Learning: For complex datasets like CIFAR-10, a contrastive loss (NT-Xent) is integrated to ensure the model focuses on semantic features rather than nuisance factors like background color.
TreeVAE discovers intuitive hierarchical relationships, such as separating animals from vehicles and further refining those categories.

Key Insights

TreeVAE treats topology as a learnable parameter, adapting its depth and branching to match data complexity. Higher nodes capture broad, shared features, while deeper nodes focus on fine-grained details. This specialization leads to improved reconstruction quality as the model avoids wasting capacity on representing the entire dataset with a single set of parameters.

Experimental Results

The authors evaluated TreeVAE across various benchmarks, including MNIST, Fashion-MNIST, CIFAR-10/100, and 20Newsgroups.

TreeVAE consistently outperforms baselines in clustering metrics (DP, LP, ACC, NMI) across diverse datasets.

TreeVAE consistently outperformed baselines like Agglomerative Clustering and DeepECT in Dendrogram Purity (DP) and Leaf Purity (LP). On MNIST, it achieved a DP of 87.9%, significantly higher than the 81.6% achieved by the best baseline. Furthermore, TreeVAE provided a tighter Evidence Lower Bound (ELBO) than standard VAEs and LadderVAEs, indicating a better fit for the data distribution.

Qualitatively, the model discovered intuitive hierarchies. On Fashion-MNIST, it successfully separated "tops" from "shoes/bags," while on CelebA, the root split corresponded primarily to gender, with subsequent branches focusing on hair color and facial features.

Limitations

Despite its strengths, TreeVAE relies on heuristic splitting based on sample counts, which may not be optimal for all datasets. It can also struggle with extremely unbalanced clusters. While it improves upon standard VAEs, its raw image synthesis quality still trails behind state-of-the-art diffusion models. Additionally, training the full tree is more computationally intensive than flat models, though inference remains efficient.

Summary updated

BibTeX
@inproceedings{manduchi2023tree,
  author = {Laura Manduchi and Moritz Vandenhirtz and Alain Ryser and Julia E Vogt},
  title = {{Tree Variational Autoencoders}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=adq0oXb9KM},
}
Figure