Towards Fair In-Context Learning with Tabular Foundation Models

Patrik Joslin Kenfack, Samira Ebrahimi Kahou, Ulrich Aïvodji · DOI

Towards Fair In-Context Learning with Tabular Foundation Models

Abstract

In-Context Learning (ICL) has enabled Tabular Foundation Models (TFMs) to achieve state-of-the-art performance on structured data tasks without retraining. However, these models risk propagating biases present in the context examples. This paper evaluates pre-processing interventions to enhance group fairness in TFMs. We demonstrate that uncertainty-based sample selection—using examples where sensitive attributes are most ambiguous—consistently outperforms traditional methods. Our findings reveal that linear debiasing techniques can paradoxically increase unfairness due to non-linear feature "leakage," whereas uncertainty-based selection offers a robust fairness-utility tradeoff across diverse benchmarks.

Introduction

The rise of specialized Tabular Foundation Models like TabPFN has revolutionized structured data analysis, offering superior performance compared to traditional gradient-boosted trees and general-purpose Large Language Models (LLMs). These models leverage In-Context Learning (ICL), where a few examples provided in the prompt guide the model's predictions. Despite their efficiency, TFMs are susceptible to historical biases embedded in the context data. Addressing these biases without the prohibitive cost of model retraining is critical for the ethical deployment of TFMs in sensitive domains like finance and healthcare.

Methods

The study explores three primary pre-processing interventions designed to modify the context examples before inference:

  1. Correlation Remover (CR): A linear transformation aimed at removing information related to sensitive attributes (e.g., race, gender) from the feature set.
  2. Group-Balanced Selection: A strategy ensuring equal representation of demographic groups within the context examples.
  3. Uncertainty-Based Selection: A novel approach utilizing Conformal Prediction to select context examples where a classifier is most uncertain about the sensitive attribute. This method aims to provide the model with "hard" cases where the link between features and sensitive labels is weak, discouraging reliance on biased proxies.

Key Results and Insights

The evaluation across eight fairness benchmarks (including ACS tasks, German Credit, and CelebA) yields several key insights regarding the effectiveness of these interventions.

The "Leakage" Trap: Surprisingly, the standard Correlation Remover often increased unfairness. Because TFMs are powerful non-linear transformers, they can "see through" linear transformations. The CR method inadvertently creates a unique signature in the data that the model uses as a proxy for the sensitive attribute, leading to bias amplification.

Uncertainty as a Fairness Shield: The uncertainty-based strategy consistently achieved the best "Pareto-dominant" results, meaning it provided the highest fairness gains with the lowest drop in accuracy. As illustrated in the performance curves across ACS datasets, the uncertainty-based methods (particularly Uncertain+TabPFN) maintain high accuracy while significantly reducing fairness violations compared to vanilla or correlation-based approaches.

Accuracy vs. Fairness Violation across ACS datasets for various mitigation strategies.

Tabular Models vs. LLMs: The paper confirms that specialized tabular models like TabPFN significantly outperform LLMs (like LLaMA-2) in both accuracy and fairness on structured data. For example, on the Adult dataset, TabPFN achieved ~85% accuracy compared to LLaMA's ~76%, while maintaining better fairness metrics.

Limitations and Future Work

While effective, the uncertainty-based method requires training a separate classifier to predict the sensitive attribute, which may be restricted in certain legal jurisdictions. Additionally, while current TFMs like TabPFN are highly efficient, they have context window limits (e.g., 10k samples). Future work is needed to explore how these fairness interventions scale to "long-context" tabular models and how they perform under significant distribution shifts between context and test data.

Summary updated

BibTeX
@inproceedings{kenfack2025towards,
  author = {Patrik Joslin Kenfack and Samira Ebrahimi Kahou and Ulrich Aïvodji},
  title = {{Towards Fair In-Context Learning with Tabular Foundation Models}},
  booktitle = {FMSD @ ICML},
  year = {2025},
  url = {https://openreview.net/forum?id=91SqyYQjiN},
}
Figure