Accurate Imputation and Efficient Data Acquisitionwith Transformer-based VAEs

Sarah Lewis, Tatiana Matejovicova, Yingzhen Li, Angus Lamb, Yordan Zaykov, Miltiadis Allamanis, Cheng ZhangDGMs Applications @ NeurIPS 2021

TL;DR

This paper introduces transformer-based Variational Autoencoders (VAEs) for more accurate prediction of missing values in tabular data. By leveraging attention mechanisms, these models better capture complex feature interactions, outperforming previous state-of-the-art methods in both imputation and a crucial task of personalized data acquisition.

What Problem Does This Paper Address?

Real-world data is rarely perfect; it often contains missing values. This incompleteness poses a significant challenge for machine learning models, which typically expect complete datasets. Beyond simply filling in the blanks (imputation), understanding and quantifying uncertainty about these missing values is vital for tasks like personalized data acquisition, where we want to intelligently decide which pieces of information to collect next to reduce uncertainty about a specific outcome (e.g., a medical diagnosis). Existing methods, like the Partial Variational Autoencoder (PVAE), struggle to model the intricate relationships between different features in tabular data, especially when the observed data is treated as a set. This limitation hinders their ability to accurately impute missing values and make informed decisions about data acquisition.

Methods

The core contribution of this paper is the integration of attention mechanisms, specifically multi-head attention, into the PVAE framework. They propose two main transformer-based VAE architectures:

  • Transformer Encoder PVAE (TE-PVAE): This model enhances the encoder part of the PVAE by replacing the standard PointNet encoder with a Set Transformer. Set Transformers are known for their ability to handle permutation-invariant functions and capture complex interactions within sets of data.
  • Transformer PVAE (T-PVAE): This is a more comprehensive transformer-based approach where both the encoder and the decoder are built using Set Attention Blocks (SABs). This allows for a more powerful modeling of both the latent representation and the data generation process.

They also introduce a non-VAE model called Rupert, which uses a transformer architecture to directly estimate the conditional probability of missing values given observed ones. This model is trained using a masked language model-like objective.

For training, they adapt the standard VAE Evidence Lower Bound (ELBO) by masking out some observed features during training. This encourages the model to learn imputation directly. For Rupert, they use a negative log-likelihood objective similar to masked language model pre-training.

Datasets

The models were evaluated on a variety of datasets:

  • UCI Regression Datasets: Boston, Concrete, Energy, Iris, Kin8nm, Wine, Yacht.
  • MNIST: Used for image inpainting tasks.
  • Eedi: A dataset from an online education platform consisting of student answers to multiple-choice math questions, treated as a tabular dataset.

Key Insights and Ideas

  • Attention is Key for Tabular Data: The paper strongly suggests that attention mechanisms are crucial for effectively modeling the complex, non-linear relationships between features in tabular data, which simpler aggregation methods miss.
  • Transformer Architectures Improve Imputation: Both TE-PVAE and T-PVAE consistently outperform the baseline P-PVAE on imputation tasks across various datasets, demonstrating the benefit of transformer-based encoders and decoders.
  • Data Acquisition Benefits from Better Imputation: The improved imputation accuracy translates to better performance in the downstream task of personalized data acquisition, where the goal is to intelligently select which variables to observe to reduce uncertainty.
  • Rupert Offers a Promising Non-VAE Alternative: The Rupert model, while not a VAE, shows competitive results, especially in data acquisition, suggesting that direct transformer-based prediction can be effective. Its variance-based objective for data acquisition appears particularly well-suited.

Key Results

  • Imputation Performance: On most datasets, the transformer-based models (TE-PVAE and T-PVAE) achieved better normalized RMSE for imputation compared to the baseline P-PVAE. For example, on the Iris dataset, T-PVAE achieved an RMSE of 0.32, significantly lower than P-PVAE's 0.59. On MNIST, TE-PVAE outperformed P-PVAE.
  • Data Acquisition Performance: Table 2 shows that TE-PVAE and T-PVAE generally performed better than P-PVAE on the data acquisition task. Notably, the Rupert model, when using its variance-based objective, achieved the best results overall on several datasets, likely due to its objective aligning well with the RMSE-based metric. For instance, Rupert achieved an RMSE of 0.98 on the Yacht dataset, outperforming the PVAE variants.

Limitations and Future Work

  • Scaling to Very Large Feature Sets: The paper acknowledges that standard self-attention has quadratic complexity with respect to the number of features. For datasets with a very large number of features (like individual pixels in images), they propose using induced set attention blocks (ISABs) to reduce computational complexity.
  • Downstream Task Exploration: The authors suggest that their work raises further research questions regarding methods for downstream tasks, particularly in the area of Bayesian experimental design. This implies exploring more sophisticated ways to use these models for active learning and information gathering.
  • Rupert's Probabilistic Nature: Rupert is noted as not being a VAE and not explicitly representing dependencies between unseen features in a probabilistic manner. While it performs well, future work might explore ways to imbue it with more explicit probabilistic modeling capabilities.

Summary updated

BibTeX
@inproceedings{lewis2021accurate,
  author = {Sarah Lewis and Tatiana Matejovicova and Yingzhen Li and Angus Lamb and Yordan Zaykov and Miltiadis Allamanis and Cheng Zhang},
  title = {{Accurate Imputation and Efficient Data Acquisitionwith Transformer-based VAEs}},
  booktitle = {DGMs Applications @ NeurIPS},
  year = {2021},
  url = {https://openreview.net/forum?id=N_OwBEYTcKK},
}
Figure