# TABCF: Counterfactual Explanations for Tabular Data Using a Transformer-Based VAE

arXiv: https://arxiv.org/abs/2410.10463 · HTML: https://mlsanity.com/paper/2410.10463/

## Key facts

- Cited by 8 papers in the map (data through 14 Oct 2026).
- Builds on 18 of its 33 references that are in the map.
- First posted on arXiv 14 Oct 2024.

## Builds on (most cited first, 18 of 18)

- [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://mlsanity.com/paper/2010.11929/) (2020)
- [A Unified Approach to Interpreting Model Predictions](https://mlsanity.com/paper/1705.07874/) (2017)
- [Categorical Reparameterization with Gumbel-Softmax](https://mlsanity.com/paper/1611.01144/) (2016)
- [Counterfactual Explanations without Opening the Black Box: Automated Decisions and the GDPR](https://mlsanity.com/paper/1711.00399/) (2017)
- [Revisiting Deep Learning Models for Tabular Data](https://mlsanity.com/paper/2106.11959/) (2021)
- [Explaining Machine Learning Classifiers through Diverse Counterfactual Explanations](https://mlsanity.com/paper/1905.07697/) (2019)
- [Explanations based on the Missing: Towards Contrastive Explanations with Pertinent Negatives](https://mlsanity.com/paper/1802.07623/) (2018)
- [Mixed-Type Tabular Data Synthesis with Score-based Diffusion in Latent Space](https://mlsanity.com/paper/2310.09656/) (2023)
- [Multi-Objective Counterfactual Explanations](https://mlsanity.com/paper/2004.11165/) (2020)
- [Learning Model-Agnostic Counterfactual Explanations for Tabular Data](https://mlsanity.com/paper/1910.09398/) (2019)
- [Towards Realistic Individual Recourse and Actionable Explanations in Black-Box Decision Making Systems](https://mlsanity.com/paper/1907.09615/) (2019)
- [Getting a CLUE: A Method for Explaining Uncertainty Estimates](https://mlsanity.com/paper/2006.06848/) (2020)
- [CARLA: A Python Library to Benchmark Algorithmic Recourse and Counterfactual Explanation Algorithms](https://mlsanity.com/paper/2108.00783/) (2021)
- [Robust Counterfactual Explanations on Graph Neural Networks](https://mlsanity.com/paper/2107.04086/) (2021)
- [ECINN: Efficient Counterfactuals from Invertible Neural Networks](https://mlsanity.com/paper/2103.13701/) (2021)
- [Amortized Generation of Sequential Algorithmic Recourses for Black-box Models](https://mlsanity.com/paper/2106.03962/) (2021)
- [Explainable AI in Credit Risk Management](https://mlsanity.com/paper/2103.00949/) (2021)
- [Consequence-aware Sequential Counterfactual Generation](https://mlsanity.com/paper/2104.05592/) (2021)

## Built on by (most cited first, 8 of 8)

- [Explanations as Bias Detectors: A Critical Study of Local Post-hoc XAI Methods for Fairness Exploration](https://mlsanity.com/paper/2505.00802/) (2025)
- [DiCoFlex: Model-agnostic diverse counterfactuals with flexible control](https://mlsanity.com/paper/2505.23700/) (2025)
- [RealAC: A Domain-Agnostic Framework for Realistic and Actionable Counterfactual Explanations](https://mlsanity.com/paper/2508.10455/) (2025)
- [Close to Reality: Interpretable and Feasible Data Augmentation for Imbalanced Learning](https://mlsanity.com/paper/2603.13927/) (2026)
- [Density-Guided Robust Counterfactual Explanations on Tabular Data under Model Multiplicity](https://mlsanity.com/paper/2605.30901/) (2026)
- [TabChange: Precise Attribute Changes in Tabular Data](https://mlsanity.com/paper/2606.00503/) (2026)
- [Class-Aware Reinforcement Learning for Counterfactual Explanation Generation](https://mlsanity.com/paper/2607.27905/) (2026)
- [Diverse and Plausible Algorithmic Recourse via Tractable Recourse Distributions](https://mlsanity.com/paper/2608.04677/) (2026)

## Abstract (arXiv)

In the field of Explainable AI (XAI), counterfactual (CF) explanations are one prominent method to interpret a black-box model by suggesting changes to the input that would alter a prediction. In real-world applications, the input is predominantly in tabular form and comprised of mixed data types and complex feature interdependencies. These unique data characteristics are difficult to model, and we empirically show that they lead to bias towards specific feature types when generating CFs. To overcome this issue, we introduce TABCF, a CF explanation method that leverages a transformer-based Variational Autoencoder (VAE) tailored for modeling tabular data. Our approach uses transformers to learn a continuous latent space and a novel Gumbel-Softmax detokenizer that enables precise categorical reconstruction while preserving end-to-end differentiability. Extensive quantitative evaluation on five financial datasets demonstrates that TABCF does not exhibit bias toward specific feature types, and outperforms existing methods in producing effective CFs that align with common CF desiderata.
