Papers
Topics
Authors
Recent
Search
2000 character limit reached

Fair-ICD in Tabular In-Context Learning

Updated 9 July 2026
  • Fair-ICD is a framework that ensures fairness in in-context learning by selecting and transforming labeled demonstrations without fine-tuning the underlying model.
  • It employs methods like correlation removal, group-balanced selection, and uncertainty-based filtering to reduce sensitive attribute leakage and improve fairness metrics.
  • Experimental evidence shows that uncertainty-based selection consistently reduces fairness gaps (e.g., demographic parity) with only minimal decreases in accuracy.

Fair-ICD denotes fairness in in-context demonstrations for tabular foundation models: a preprocessing-centered framework in which group fairness is shaped by how labeled demonstrations are selected or transformed before in-context prediction, without parameter updates or fine-tuning of the underlying foundation model. In the tabular setting, the term is grounded in "Towards Fair In-Context Learning with Tabular Foundation Models" (Kenfack et al., 14 May 2025), where Fair-ICD comprises correlation removal, group-balanced demonstration selection, and uncertainty-based demonstration selection, with experiments indicating that conformal-prediction-based uncertainty filtering consistently improves fairness metrics such as demographic parity and equalized odds with only small accuracy costs.

1. Scope, paradigm, and nomenclature

Fair-ICD arises from the shift from conventional supervised training to in-context learning (ICL) on structured data. Tabular foundation models such as TabPFN and TabICL are transformer-based models pretrained on large, synthetic tabular tasks; at inference time they receive labeled demonstrations {(xj,yj)}\{(x_j,y_j)\} in context and predict labels for new rows xx without parameter updates. In this regime, the context itself becomes the main control surface for both predictive performance and fairness, because the model’s outputs are induced by patterns present in the selected demonstrations rather than by a task-specific fine-tuning stage (Kenfack et al., 14 May 2025).

The core idea is therefore not fairness through retraining, adversarial optimization, or post hoc threshold adjustment, but fairness through context design. This suggests a different causal locus for bias mitigation: if the demonstration set CC is the object through which the model conditions on the task, then representation bias, leakage of sensitive information, and subgroup imbalance can all be mediated through CC.

The label “Fair-ICD” is also used more broadly in adjacent literatures. In multimodal medical diagnosis with MLLMs, a related interpretation appears in "Fairness in Multi-modal Medical Diagnosis with Demonstration Selection" (Li et al., 20 Nov 2025), where fairness-aware in-context demonstrations are built through balanced and semantically relevant retrieval. By contrast, fair ICD coding work such as DECI treats ICD as International Classification of Diseases coding and addresses demographic and expert bias in multi-label text classification through causal pathway subtraction rather than demonstration selection (Zhang et al., 2024). These usages share a fairness objective but refer to distinct technical settings.

2. Formal problem setting and fairness criteria

The tabular Fair-ICD formulation considers binary classification on a dataset

D={(xi,yi,si)}i=1N,D=\{(x_i,y_i,s_i)\}_{i=1}^N,

where xiRdx_i \in \mathbb{R}^d is the non-sensitive feature vector, yi{0,1}y_i \in \{0,1\} is the label, and si{0,1}s_i \in \{0,1\}, more generally si{0,1,}s_i \in \{0,1,\ldots\}, is the sensitive attribute AA. The in-context learner produces predictions

xx0

with xx1 the demonstration set. Group fairness is then defined over the statistical properties of xx2 across sensitive groups under the ICL paradigm (Kenfack et al., 14 May 2025).

The study centers evaluation on demographic parity (DP), equalized odds (EO), and equal opportunity (EOP), rather than calibration. The demographic parity difference is

xx3

with empirical form

xx4

Equalized odds is decomposed into true-positive-rate and false-positive-rate gaps:

xx5

xx6

and the combined EO gap is

xx7

Equal opportunity uses only the TPR term:

xx8

A central implication of this formulation is that fairness is attributed to in-context predictions themselves, not merely to a static trained classifier. This suggests that fairness evaluation in ICL must account for the interaction between a query instance and the chosen demonstration context.

3. Preprocessing methods that define Fair-ICD

Fair-ICD explores three model-agnostic preprocessing strategies that act before ICL prediction and do not require parameter updates of the foundation model (Kenfack et al., 14 May 2025).

Correlation removal aims to reduce linear dependence between the sensitive attribute xx9 and each non-sensitive feature CC0. Linear dependence is measured with Pearson’s CC1,

CC2

Using the Correlation Remover of Feldman et al. and the Fairlearn implementation, the data are decomposed as CC3, where CC4 is the sensitive column or columns and CC5 the non-sensitive features. For each non-sensitive feature vector CC6, weights CC7 are obtained by least squares on centered CC8,

CC9

The transformed features are then

CC0

and a trade-off parameter CC1 combines transformed and original features as

CC2

with CC3 dropped for modeling. The method targets linear dependence rather than mutual information CC4.

Group-balanced demonstration selection mitigates representation bias by enforcing balanced group ratios in the context set CC5. The procedure selects CC6 demonstrations per group CC7, aiming for CC8 constant across groups. When context size is constrained, majority groups are downsampled uniformly at random. If CC9 is the set of groups, one may set D={(xi,yi,si)}i=1N,D=\{(x_i,y_i,s_i)\}_{i=1}^N,0 or use a preset budget per group, and construct

D={(xi,yi,si)}i=1N,D=\{(x_i,y_i,s_i)\}_{i=1}^N,1

where D={(xi,yi,si)}i=1N,D=\{(x_i,y_i,s_i)\}_{i=1}^N,2 is a stratified random sample of size D={(xi,yi,si)}i=1N,D=\{(x_i,y_i,s_i)\}_{i=1}^N,3 from group D={(xi,yi,si)}i=1N,D=\{(x_i,y_i,s_i)\}_{i=1}^N,4. This guarantees equal group presence but does not directly alter within-group label distributions or more complex historical or measurement biases.

Uncertainty-based demonstration selection is the key contribution. Its hypothesis is that if the sensitive attribute is hard to infer for the selected demonstrations, the foundation model will encode less group information in context and therefore produce fairer predictions. The sensitive attribute classifier D={(xi,yi,si)}i=1N,D=\{(x_i,y_i,s_i)\}_{i=1}^N,5 is trained on a held-out 20% split without using task labels D={(xi,yi,si)}i=1N,D=\{(x_i,y_i,s_i)\}_{i=1}^N,6; the study instantiates two variants, Uncertain+LR and Uncertain+TabPFN. Conformal prediction defines a nonconformity score, for example

D={(xi,yi,si)}i=1N,D=\{(x_i,y_i,s_i)\}_{i=1}^N,7

a calibration threshold D={(xi,yi,si)}i=1N,D=\{(x_i,y_i,s_i)\}_{i=1}^N,8, and prediction sets

D={(xi,yi,si)}i=1N,D=\{(x_i,y_i,s_i)\}_{i=1}^N,9

Samples with xiRdx_i \in \mathbb{R}^d0 are treated as uncertain because the prediction set contains both sensitive labels. The demonstration rule is

xiRdx_i \in \mathbb{R}^d1

where xiRdx_i \in \mathbb{R}^d2 is the training fold. With xiRdx_i \in \mathbb{R}^d3, more samples are uncertain; with xiRdx_i \in \mathbb{R}^d4, fewer are uncertain. The method can optionally cap xiRdx_i \in \mathbb{R}^d5 to model context limits and apply secondary stratification by xiRdx_i \in \mathbb{R}^d6 or xiRdx_i \in \mathbb{R}^d7.

4. Experimental evidence and empirical behavior

The empirical evaluation spans ACSIncome, ACSEmployment, ACSTravelTime, ACSMobility, ACSPublicCoverage, Diabetes, German Credit, and CelebA, with sensitive attributes including gender, race, and age group. For each dataset, 20% is held out to train and calibrate the sensitive-attribute classifier, and the remaining 80% is evaluated with 5-fold cross-validation over 10 random seeds. Demonstration construction varies by method, and ICL is performed with TabPFN and TabICL; baselines are Vanilla random selection, Balanced stratified selection, Correlation Remover, Uncertain+LR, and Uncertain+TabPFN (Kenfack et al., 14 May 2025).

Setting Vanilla Uncertain-based
ACSIncome (TabPFN) Acc 80.76%; xiRdx_i \in \mathbb{R}^d8 14.21; xiRdx_i \in \mathbb{R}^d9 5.46; yi{0,1}y_i \in \{0,1\}0 5.89 Acc 80.13%; yi{0,1}y_i \in \{0,1\}1 8.90; yi{0,1}y_i \in \{0,1\}2 3.33; yi{0,1}y_i \in \{0,1\}3 3.56
ACSEmployment (TabPFN) Acc 82.18%; yi{0,1}y_i \in \{0,1\}4 1.11; yi{0,1}y_i \in \{0,1\}5 8.17 Acc 81.69%; yi{0,1}y_i \in \{0,1\}6 0.80; yi{0,1}y_i \in \{0,1\}7 6.99
CelebA (TabPFN) Acc 80.55%; yi{0,1}y_i \in \{0,1\}8 14.54; yi{0,1}y_i \in \{0,1\}9 12.03 Acc 79.86%; si{0,1}s_i \in \{0,1\}0 10.01; si{0,1}s_i \in \{0,1\}1 3.54; si{0,1}s_i \in \{0,1\}2 5.46
Diabetes (Vanilla vs Uncertain+LR) Acc 64.59%; si{0,1}s_i \in \{0,1\}3 1.74; si{0,1}s_i \in \{0,1\}4 2.74 Acc 64.39%; si{0,1}s_i \in \{0,1\}5 0.77; si{0,1}s_i \in \{0,1\}6 2.52

Across datasets and both foundation models, uncertainty-based selection consistently improves fairness with minimal loss in accuracy. On ACSIncome with TabPFN, for example, si{0,1}s_i \in \{0,1\}7 decreases by si{0,1}s_i \in \{0,1\}8, si{0,1}s_i \in \{0,1\}9 by si{0,1,}s_i \in \{0,1,\ldots\}0, and si{0,1,}s_i \in \{0,1,\ldots\}1 by si{0,1,}s_i \in \{0,1,\ldots\}2, while accuracy changes by si{0,1,}s_i \in \{0,1,\ldots\}3. On CelebA, the fairness effect is larger: si{0,1,}s_i \in \{0,1,\ldots\}4 decreases by si{0,1,}s_i \in \{0,1,\ldots\}5, si{0,1,}s_i \in \{0,1,\ldots\}6 by si{0,1,}s_i \in \{0,1,\ldots\}7, and si{0,1,}s_i \in \{0,1,\ldots\}8 by si{0,1,}s_i \in \{0,1,\ldots\}9, with a AA0 accuracy change.

Two negative or weak findings are equally important. Group-balanced selection shows only marginal fairness gains on most datasets, indicating that representation bias is not the dominant source of unfairness in these experiments. Correlation removal frequently amplifies unfairness when applied to both train and test data: on ACSIncome with TabPFN, AA1 rises from AA2 to AA3, and AA4 rises to AA5. A variant that applies correlation removal only to training features improves fairness relative to the both-train-and-test condition.

Pareto analysis reinforces the same pattern. Varying AA6 for uncertainty-based selection and AA7 for correlation removal produces fairness–accuracy frontiers, and uncertainty-based selection yields Pareto-dominant points compared to Vanilla and CR on ACSIncome and ACSMobility, with similar behavior on other datasets. Under Uncertain+TabPFN selection, TabPFN and TabICL show similar fairness, while TabPFN often attains slightly higher accuracy.

5. Mechanisms, trade-offs, and implementation constraints

The main explanatory hypothesis is sensitive-attribute leakage. When demonstrations are chosen so that the sensitive attribute is difficult to infer, the model has less group information available in context, and group-conditioned behavior weakens. On ACSIncome, ICL accuracy for predicting the sensitive attribute on test data falls from approximately AA8 to approximately AA9 under Uncertain+TabPFN selection, whereas correlation removal applied to transformed test features yields approximately xx00 sensitive-attribute reconstruction accuracy. This supports the claim that some preprocessing schemes do not hide xx01 from a tabular transformer, but instead create an invertible proxy (Kenfack et al., 14 May 2025).

The fairness–utility trade-off is expressed through

xx02

for example xx03, and

xx04

Observed behavior is systematic: uncertainty-based selection typically yields substantial positive xx05, with xx06 reductions of xx07–xx08 points and larger reductions on CelebA and ACSIncome, while xx09 usually lies in the range xx10 to xx11 percentage points. Balanced selection gives small xx12 with negligible xx13, whereas correlation removal can produce negative xx14 despite occasional slight accuracy gains.

Implementation is operationally simple. The recommended pipeline is to choose xx15, xx16, and features xx17; reserve 20% of data for the sensitive-attribute classifier; train xx18 with logistic regression or TabPFN; compute xx19 using conformal prediction, with xx20 as the main default; retain demonstrations with xx21; optionally cap xx22 to model limits and stratify within the uncertain set; then run ICL with TabPFN or TabICL and evaluate accuracy, xx23, xx24, and xx25. MAPIE supports conformal prediction efficiently, and the added overhead is modest because no foundation-model updates are required.

Context size remains a practical constraint. TabPFN supports up to approximately xx26k samples and approximately xx27 features in context, whereas TabICL scales to approximately xx28k samples. Accuracy improves with larger xx29, and fairness saturates beyond approximately xx30 demonstrations, so the practical recommendation is to preserve as many uncertain demonstrations as the model permits.

The main limitations are explicit. Uncertainty-based selection requires sensitive labels to train and calibrate xx31; in some jurisdictions even that use may be restricted. Very small xx32 can shrink xx33 excessively and reduce accuracy. Conformal guarantees depend on calibration, so distribution shift between calibration and training folds can affect uncertainty estimates. Most experiments use binary xx34, and multi-group extensions, while described as straightforward, may require careful stratification.

6. Broader research landscape and open directions

Fair-ICD in the tabular sense belongs to a broader family of fairness-aware ICL methods. In multimodal medical diagnosis, FADS builds a fairness-aware demonstration set by embedding each labeled case, clustering candidates with k-means, filtering clusters with near-uniform subgroup distributions, and then selecting semantically relevant exemplars under demographic and label balancing constraints. Its primary fairness metric is Accuracy Disparity,

xx35

and experiments show that conventional demonstration-selection strategies can produce inconsistent fairness, whereas balanced, semantically relevant selection reduces disparities across gender, race, and ethnicity (Li et al., 20 Nov 2025). This suggests that Fair-ICD is not specific to tabular transformers, even though the leakage mechanisms and selection operators differ by modality.

A distinct but related line of work addresses fairness in ICD coding rather than in-context demonstrations. DECI models prediction through three pathways—aggregated knowledge xx36, direct demographic influence xx37, and irrelevant expert activation xx38—and debiases at inference via

xx39

This is a causal pathway-subtraction approach for multi-label clinical text classification rather than a context-selection method (Zhang et al., 2024). Another neighboring framework, FairICP, is an in-processing adversarial method for equalized odds with multiple sensitive attributes, using inverse conditional permutation to match xx40 to xx41 without estimating xx42 directly (Lai et al., 2024). Together, these works delineate three different fairness loci: context preprocessing, causal path subtraction, and adversarial in-processing.

For tabular Fair-ICD, several open questions remain explicit. Post-processing in ICL and in-processing alternatives such as FairPFN have not been fully compared with preprocessing. Fairness under distribution shift between context and test data remains unresolved. Reweighting-based fairness is limited by the fact that sample weights are currently not supported by TabPFN or TabICL. Extensions to multi-attribute fairness and individual fairness also remain open. The uncertainty-based strategy is described as modality-agnostic and, with appropriate serialization, could be applied to LLM-based ICL; however, tabular transformers outperform LLMs on numeric tables and avoid LLM context-window constraints (Kenfack et al., 14 May 2025).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Fair-ICD.