An Explainable Gaussian Process Auto-encoder for Tabular Data

Wei Zhang, Brian Barr, John PaisleyarXiv 2025 · DOI

Introduction

Counterfactual explanations serve as a cornerstone for interpreting black-box machine learning models, particularly in high-stakes domains like finance and law. They answer the fundamental question: "What minimal changes to an input would result in a different model prediction?" For instance, a loan applicant might be told, "If your annual income were $10,000 higher, your loan would have been approved."

While generative models like Variational Autoencoders (VAEs) are frequently used to produce these explanations, they face three significant hurdles: the generation of unrealistic or out-of-distribution samples, the difficulty of preserving "immutable" features (such as age or race) during the generation process, and the computational bottlenecks associated with more robust probabilistic methods like Gaussian Processes (GPs). This paper introduces the Gaussian Process Auto-Encoder (GPAE), a framework designed to provide realistic, actionable, and fair counterfactual explanations for tabular data.

Methodology

The GPAE architecture integrates the probabilistic strengths of Gaussian Processes with the generative capabilities of auto-encoders, optimized for the specific constraints of tabular datasets.

Efficient Scaling with Random Fourier Features

Standard Gaussian Processes are notoriously difficult to scale due to the $O(N^3)$ complexity of matrix inversion. While sparse GPs using inducing points are a common solution, the authors found them insufficiently fast for the iterative nature of counterfactual searching. Instead, the GPAE utilizes Random Fourier Features (RFF) to approximate the GP kernel. This approach transforms the GP into a two-layer network with fixed random weights and cosine activations, significantly reducing the number of trainable parameters and accelerating inference without sacrificing performance.

Supervised Latent Space and Density Estimation

To ensure the latent space is useful for classification, the model is trained with a linear probit regression classifier embedded directly within it. This forces the latent representations to be highly discriminative. Furthermore, the authors introduce a novel Latent Density Estimator. During the search for a counterfactual, this estimator acts as a regularizer, pulling the generated sample toward high-density regions of the target class. This prevents the model from generating "adversarial" counterfactuals that technically flip a label but do not resemble real-world data points.

Direct Feature-Space Masking

A key innovation of the GPAE is its approach to "immutable" features. Rather than relying on the decoder to maintain certain attributes, the model searches for counterfactuals by back-propagating gradients directly into the input feature space. This allows for the application of a simple binary mask, ensuring that protected attributes (like gender or race) remain strictly unchanged, thereby guaranteeing the fairness and actionability of the explanation.

Experimental Setup

The authors evaluated the GPAE across five large-scale tabular datasets focused on financial and social impact metrics:

  • FICO: Credit scoring.
  • Adult: Income prediction based on census data.
  • LAW: Law school admissions and bar passage.
  • LCD (Lending Club Data): Credit lending.
  • GMC (Give Me Some Credit): Credit lending.

Performance was measured based on classification accuracy (AUC), counterfactual quality (L2 distance, diversity, and instability), and plausibility (using IM1 and IM2 reconstruction metrics).

Key Insights and Results

Classification and Plausibility

The GPAE encoder proved to be a robust standalone classifier, achieving an AUC of 93.2% on the LCD dataset and 79.0% on FICO, matching or exceeding standard neural network baselines. More importantly, the GPAE achieved some of the lowest IM1 and IM2 scores, indicating that its counterfactuals stay very close to the true data manifold compared to traditional VAE-based methods.

Handling Immutable Features

The model's ability to handle constraints is perhaps its most significant advantage. When masking features in the Adult dataset to fix attributes like "Race" and "Gender," the GPAE maintained a 99% validity rate (the rate at which the counterfactual successfully flipped the prediction). In comparison, baseline methods like Wachter saw validity rates drop as low as 48% when forced to navigate around immutable features.

The RFF Advantage

The experiments confirmed that RFF-based approximations are superior to inducing-point methods for counterfactual generation. RFF provided the necessary speed for the iterative optimization process while maintaining high-quality probabilistic outputs.

Limitations and Future Work

Despite its strengths, the GPAE is not without trade-offs. The authors noted a sensitivity to class imbalance in datasets like Adult and LAW, which can lead to slightly lower AUC scores if classifier thresholds are not carefully tuned. Additionally, there is an inherent tension between realism and proximity; forcing a counterfactual to be highly plausible (low IM1/IM2) often requires a larger change in the input space (higher L2 distance).

Future research may explore further refinements to the density regularization algorithm and the extension of the RFF-GP auto-encoder framework to non-tabular data modalities, such as time-series or image data, where interpretability remains a critical challenge.

Summary updated

BibTeX
@misc{zhang2025explainable,
  author = {Wei Zhang and Brian Barr and John Paisley},
  title = {{An Explainable Gaussian Process Auto-encoder for Tabular Data}},
  year = {2025},
  eprint = {2509.00884},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.00884},
}
Figure