Handling incomplete heterogeneous data using VAEs

Alfredo Nazábal, Pablo M. Olmos, Zoubin Ghahramani, Isabel Valera

Abstract

Variational autoencoders (VAEs), as well as other generative models, have been shown to be efficient and accurate for capturing the latent structure of vast amounts of complex high-dimensional data. However, existing VAEs can still not directly handle data that are heterogenous (mixed continuous and discrete) or incomplete (with missing data at random), which is indeed common in real-world applications. In this paper, we propose a general framework to design VAEs suitable for fitting incomplete heterogenous data. The proposed HI-VAE includes likelihood models for real-valued, positive real valued, interval, categorical, ordinal and count data, and allows accurate estimation (and potentially imputation) of missing data. Furthermore, HI-VAE presents competitive predictive performance in supervised tasks, outperforming supervised models when trained on incomplete data.

Introduction

Deep generative models, such as Variational Autoencoders (VAEs), have revolutionized our ability to learn underlying distributions in high-dimensional data. However, most research in this field assumes data is homogeneous (e.g., all pixels or all text) and complete. In contrast, real-world tabular data—like electronic health records or customer databases—is often both heterogeneous and incomplete. It mixes continuous values with categorical, ordinal, and count data, and is frequently riddled with missing entries.

Overview of heterogeneous data with missing values and the corresponding generative and recognition models.

Standard VAEs struggle with these datasets because they typically rely on uniform likelihood functions (like Gaussian) and cannot natively process missing inputs. Practitioners often resort to ad-hoc preprocessing like mean imputation, which can introduce significant bias and obscure true statistical relationships. This paper introduces the Heterogeneous-Incomplete VAE (HI-VAE), a framework designed to natively handle mixed data types and missingness during both training and inference.

The HI-VAE Framework

The HI-VAE addresses the complexities of real-world data through several architectural innovations.

Factorized Heterogeneous Likelihoods

Instead of assuming a single distribution for all features, the HI-VAE decoder employs a factorized approach. It applies specific probability distributions tailored to each feature's data type: Gaussian for real numbers, log-Normal for positive reals, Poisson for counts, and multinomial or ordinal logits for categorical and ordinal data. This allows the model to accurately capture the unique statistics of each column in a database.

Hierarchical Latent Space

Tabular features often exhibit complex, non-linear correlations. To capture these, HI-VAE utilizes a hierarchical latent structure. As shown in Figure 5, it uses a Gaussian Mixture Model (GMM) prior ($s_n$) and a shared intermediate layer ($z_n$) to capture joint correlations before branching into feature-specific likelihood networks ($\gamma_{ni}$).

The hierarchical architecture of HI-VAE, showing the latent variables and feature-specific parameters.

Handling Missingness

To manage incomplete data, the model introduces two key mechanisms:

  1. Observation-Only ELBO: The Evidence Lower Bound (ELBO) objective is modified so that the reconstruction loss is computed only on the observed features. This allows the model to learn from partial data without being penalized for missing entries.
  2. Input Drop-out Encoder: The recognition network (encoder) treats missing values as zeroed-out inputs. In a Multi-Layer Perceptron (MLP), these zeroed inputs do not contribute to the weighted sums of neurons, effectively preventing missing data from skewing the learned latent representation.

Experimental Results

The authors evaluated HI-VAE on six heterogeneous datasets from the UCI Machine Learning Repository, including Adult, Breast Cancer, and Wine.

Imputation and Prediction

HI-VAE consistently outperformed established baselines like MICE (Multiple Imputation by Chained Equations) and GAIN (Generative Adversarial Imputation Nets) across missing data rates ranging from 10% to 50%. The model was particularly effective at imputing nominal (categorical) data. For example, on the Adult dataset with 20% missing values, HI-VAE achieved an error rate of 0.304, significantly better than GAIN's 0.660.

Furthermore, the model proved robust for downstream supervised tasks. When predicting a target variable with 50% of input features missing, HI-VAE achieved a 0.052 error rate on the Breast dataset, outperforming Deep Logistic Regression (0.080).

Conclusion

HI-VAE provides a principled framework for applying generative modeling to messy, real-world tabular data. By integrating specialized likelihoods and a hierarchical latent space, it avoids the pitfalls of traditional imputation methods. While currently limited to data Missing Completely at Random (MCAR), future work aims to extend this framework to more complex missingness patterns and mixed-modality datasets, such as those combining tabular data with images or time-series records.

Summary updated

BibTeX
@article{nazabal2018handling,
  author = {Alfredo Nazábal and Pablo M. Olmos and Zoubin Ghahramani and Isabel Valera},
  title = {{Handling incomplete heterogeneous data using VAEs}},
  journal = {Pattern Recognition},
  year = {2018},
  url = {https://openreview.net/forum?id=YgMX4ePEoE},
}
Figure