From abstract items to latent spaces to observed data and back: Compositional Variational Auto-Encoder

Victor Berger, Michèle Sebag

Abstract Generative modeling typically focuses on monolithic objects, mapping entire data points to single latent vectors. However, real-world data is often compositional, consisting of varying numbers of interacting parts. We present the Compositional Variational Auto-Encoder (CompVAE), a framework designed to handle such "multi-ensemblist" structures. CompVAE employs an order-invariant latent architecture and a Graph Neural Network (GNN) for inference, enabling structural disentanglement and programmable generation. Our results on synthetic 1D and 2D benchmarks demonstrate that CompVAE effectively separates local and global information and generalizes to ensemble sizes beyond those seen during training.

1. Introduction

Standard generative models, such as traditional Variational Auto-Encoders (VAEs), excel at generating single entities like faces or digits. However, they struggle with compositional data where a single observation is an ensemble of parts, such as a neighborhood's energy consumption or a complex visual scene. This paper introduces the Compositional VAE (CompVAE), which shifts the perspective from modeling monolithic objects to modeling data as an ensemble of parts.

2. Problem Formulation

The primary challenge in modeling compositional data is achieving structural disentanglement. Unlike coordinate-wise disentanglement, which focuses on individual attributes, structural disentanglement requires handling:

  1. Variable Size: The number of components ($K$) can vary between observations.
  2. Order Invariance: The aggregate representation must be invariant to the permutation of its parts.
  3. Non-Linear Interaction: Components often share a global context and interact non-linearly, meaning the whole is not a simple sum of its parts.

3. Methodology

The CompVAE architecture addresses these challenges through a hierarchical Bayesian framework.

Graphical model of the CompVAE architecture, showing the aggregation of local latents $w_i$ into a global representation.

The model is defined by the following components:

  • Local Latents ($w_i$): Each part $i$ is mapped to a latent variable $w_i$ capturing its specific features.
  • Order-Invariant Aggregation: Local latents are summed to create an intermediate representation $\tilde{w}$. This summation ensures the model is naturally invariant to the order of parts.
  • Global Latent ($z$): A global variable $z$ is conditioned on $\tilde{w}$ to capture shared external factors or interactions across the ensemble.
  • GNN Inference: To encode an ensemble, the model uses a Graph Neural Network (GNN) with message-passing, allowing the encoder to account for correlations between parts during reconstruction.

4. Experiments and Datasets

The authors evaluated CompVAE on two synthetic benchmarks:

  • 1D Synthetic Problem: Generates complex signals by combining multiple sine waves through a non-linear tanh transformation, mimicking interacting audio signals.
  • 2D Synthetic Problem: Generates images where colored "sites" create gradients. The final image is a non-linear blend of these sites based on distance and intensity.

5. Results

The experimental results highlight several key strengths of the CompVAE:

  • Division of Labor: The model successfully separates local information (stored in $w_i$) from global interaction factors (stored in $z$).
  • Size Generality: CompVAE can be trained on small ensembles (e.g., $K \le 16$) and successfully generate data for much larger ensembles (e.g., $K=30$) without retraining.
  • Programmable Generation: The structured latent space allows for "latent surgery," where adding or removing a specific $w_i$ precisely alters the generated whole, demonstrating effective structural disentanglement.

6. Conclusion and Future Work

CompVAE provides a scalable approach to modeling compositional data. While the current model uses summation for aggregation, future research could explore attention-based mechanisms. Additionally, combining CompVAE with advanced decoders like PixelCNN could enhance the generation of realistic textures in complex multi-object scenes.

Summary updated

BibTeX
@inproceedings{berger2019from,
  author = {Victor Berger and Michèle Sebag},
  title = {{From abstract items to latent spaces to observed data and back: Compositional Variational Auto-Encoder}},
  booktitle = {ECML/PKDD},
  year = {2019},
  doi = {10.1007/978-3-030-46150-8\_17},
}
Figure