Papers
Topics
Authors
Recent
Search
2000 character limit reached

FairStacks: Fair Model Stacking

Updated 29 June 2026
  • FairStacks is a convex fair model stacking meta-learner that uses linear combinations of pre-trained classifiers to expand the fairness–accuracy Pareto frontier.
  • It employs a constrained convex optimization framework integrating score-bias constraints, regularization, and a bias-budget parameter to enforce group fairness.
  • Empirical evaluations demonstrate that FairStacks consistently improves both fairness and accuracy across diverse datasets and benchmark tasks.

FairStacks is a convex “fair model stacking” meta-learner designed to expand and optimize the empirical Pareto frontier of the fairness–accuracy tradeoff in machine learning, enabling practitioners to maximize accuracy for a prescribed level of group fairness. By leveraging linear combinations of pre-trained base classifiers and enforcing a strict score-bias constraint, FairStacks consistently improves both the best-achievable fairness and accuracy on benchmark tasks, providing a model-agnostic and post-processing approach to algorithmic fairness (Little et al., 2022).

1. Formalization of the Fairness–Accuracy Pareto Frontier

Let HH denote any finite collection of pre-trained predictors hHh \in H, where each hh maps features xx to a probability score h^(x)[0,1]\hat h(x) \in [0,1] or a hard label {0,1}\{0,1\}. Each model is evaluated by:

  • an accuracy measure Accuracy(h)[0,1]\mathrm{Accuracy}(h) \in [0,1], increasing in “better” fits (e.g., classification accuracy, 1MSE1-\mathrm{MSE}, etc.)
  • a group-fairness measure Fairness(h)[0,1]\mathrm{Fairness}(h)\in[0,1], increasing in “more fair” behavior (e.g., Fairness=1Demographic Parity gap\mathrm{Fairness}=1-|\text{Demographic Parity gap}|)

Pareto Optimal Model: A model hHh \in H0 is Pareto-optimal if there is no hHh \in H1 with hHh \in H2 and hHh \in H3, with at least one inequality strict.

TAF Curve: The Tradeoff-between-Fairness-and-Accuracy curve for hHh \in H4 is hHh \in H5, where

hHh \in H6

hHh \in H7 reports the best achievable accuracy by any model in hHh \in H8 meeting at least fairness level hHh \in H9. Practically, this is computed by sorting hh0 in decreasing fairness and tracking the running maximum of accuracy.

FAUC: For a nonnegative weight function hh1, the weighted Fairness-Area-Under-the-Curve is

hh2

Unweighted (hh3), hh4 is the ordinary area under the TAF curve. This enables direct, model-agnostic comparison of model families on fairness and accuracy, even when their tradeoff curves cross.

2. Score Bias and Group Fairness Constraint

FairStacks ensembles are constructed as linear combinations of base models hh5. For two contrast groups hh6 (e.g., hh7 vs hh8 for a binary attribute):

  • Score Bias: For weight vector hh9 and score matrix xx0,

xx1

  • For each base model xx2, xx3. By linearity,

xx4

The ensemble bias constraint directly encodes any group fairness constraint definable as a difference in expectation between groups.

3. FairStacks Convex Optimization Framework

FairStacks solves the constrained optimization:

xx5

where:

  • xx6 are training features and labels,
  • xx7 is the vector of base-model scores,
  • xx8 is a convex surrogate loss (e.g., squared error, binomial deviance),
  • xx9 is a ridge penalty for regularization,
  • h^(x)[0,1]\hat h(x) \in [0,1]0 is a bias-budget parameter (smaller h^(x)[0,1]\hat h(x) \in [0,1]1 enforces stricter fairness).

Alternatively, a penalized form may be solved:

h^(x)[0,1]\hat h(x) \in [0,1]2

where h^(x)[0,1]\hat h(x) \in [0,1]3 is varied across a grid to trace the fairness–accuracy frontier.

4. Algorithmic Solution and Implementation

The FairStacks algorithm proceeds as follows:

  1. Inputs: Pre-trained base models h^(x)[0,1]\hat h(x) \in [0,1]4; training data h^(x)[0,1]\hat h(x) \in [0,1]5; protected groups h^(x)[0,1]\hat h(x) \in [0,1]6.
  2. Precompute:
    • h^(x)[0,1]\hat h(x) \in [0,1]7 for all h^(x)[0,1]\hat h(x) \in [0,1]8.
    • h^(x)[0,1]\hat h(x) \in [0,1]9.
  3. Grid search: Select grid {0,1}\{0,1\}0 for bias penalty; grid for {0,1}\{0,1\}1 (via cross-validation).
  4. For each {0,1}\{0,1\}2: Solve convex program for weights {0,1}\{0,1\}3 (via Newton or QP solvers):

{0,1}\{0,1\}4

  • Compute fairness {0,1}\{0,1\}5; accuracy {0,1}\{0,1\}6 or direct {0,1}\{0,1\}7.
  • Accumulate {0,1}\{0,1\}8 pairs to form taf curve and compute area under it for fauc.
  1. Output: {0,1}\{0,1\}9, Accuracy(h)[0,1]\mathrm{Accuracy}(h) \in [0,1]0, ensemble weights Accuracy(h)[0,1]\mathrm{Accuracy}(h) \in [0,1]1.

5. Theoretical Guarantees

FairStacks provides several formal properties:

  • Frontier Expansion (Proposition 1): For original models Accuracy(h)[0,1]\mathrm{Accuracy}(h) \in [0,1]2 and FairStacks solutions Accuracy(h)[0,1]\mathrm{Accuracy}(h) \in [0,1]3,

Accuracy(h)[0,1]\mathrm{Accuracy}(h) \in [0,1]4

Since all Accuracy(h)[0,1]\mathrm{Accuracy}(h) \in [0,1]5 can be realized as stacking solutions with Accuracy(h)[0,1]\mathrm{Accuracy}(h) \in [0,1]6, and the stacking set is a superset of Accuracy(h)[0,1]\mathrm{Accuracy}(h) \in [0,1]7, stacking always expands the Pareto frontier.

  • Monotonicity in Fairness (Theorem 2): Under mild assumptions on the decision function Accuracy(h)[0,1]\mathrm{Accuracy}(h) \in [0,1]8 (e.g., thresholding), the decision-level fairness of weights Accuracy(h)[0,1]\mathrm{Accuracy}(h) \in [0,1]9 improves (bias decreases) as 1MSE1-\mathrm{MSE}0, so the constraint yields (approximately) monotonic increases in group fairness.

6. Empirical Evaluation

Performance of FairStacks was evaluated on five benchmark datasets:

Dataset Size / Features Protected Attributes
Adult Income 1MSE1-\mathrm{MSE}1k, 1MSE1-\mathrm{MSE}2 gender, race
Bank Marketing 1MSE1-\mathrm{MSE}3k, 1MSE1-\mathrm{MSE}4 age 1MSE1-\mathrm{MSE}5?
COMPAS Recidivism 1MSE1-\mathrm{MSE}6k, 1MSE1-\mathrm{MSE}7 race, gender
Default of Credit Card 1MSE1-\mathrm{MSE}8k, 1MSE1-\mathrm{MSE}9 gender
Communities & Crime Fairness(h)[0,1]\mathrm{Fairness}(h)\in[0,1]0k, Fairness(h)[0,1]\mathrm{Fairness}(h)\in[0,1]1 race

Base learners included standard random-forest trees, “minipatch” trees (1,000 sub-sample trees), Scikit-learn/XGBoost classifiers, and three in-processing fairness methods: Adversarial Debiasing [Zhang et al. 2018], Reduction-Based Fair Classification [Agarwal et al. 2018], and Fair Adversarial GBT [Grari et al. 2019]. Data were split Fairness(h)[0,1]\mathrm{Fairness}(h)\in[0,1]2 train / Fairness(h)[0,1]\mathrm{Fairness}(h)\in[0,1]3 stacking-CV / Fairness(h)[0,1]\mathrm{Fairness}(h)\in[0,1]4 test; 5-fold CV for Fairness(h)[0,1]\mathrm{Fairness}(h)\in[0,1]5 was performed within the stacking split to optimize the Fairness(h)[0,1]\mathrm{Fairness}(h)\in[0,1]6-step-weighted fauc. Brier score was used for Fairness(h)[0,1]\mathrm{Fairness}(h)\in[0,1]7 to emphasize calibrated probabilities.

Selected results (FAUC, Demographic Parity, mean Fairness(h)[0,1]\mathrm{Fairness}(h)\in[0,1]8 SE, 10 random splits):

Method Adult (gender) COMPAS (race) Default (gender) C&C (race)
Random Forest Fairness(h)[0,1]\mathrm{Fairness}(h)\in[0,1]9 Fairness=1Demographic Parity gap\mathrm{Fairness}=1-|\text{Demographic Parity gap}|0 Fairness=1Demographic Parity gap\mathrm{Fairness}=1-|\text{Demographic Parity gap}|1 Fairness=1Demographic Parity gap\mathrm{Fairness}=1-|\text{Demographic Parity gap}|2
Zhang et al. (2018) Fairness=1Demographic Parity gap\mathrm{Fairness}=1-|\text{Demographic Parity gap}|3 Fairness=1Demographic Parity gap\mathrm{Fairness}=1-|\text{Demographic Parity gap}|4 Fairness=1Demographic Parity gap\mathrm{Fairness}=1-|\text{Demographic Parity gap}|5
Grari et al. (2019) Fairness=1Demographic Parity gap\mathrm{Fairness}=1-|\text{Demographic Parity gap}|6 Fairness=1Demographic Parity gap\mathrm{Fairness}=1-|\text{Demographic Parity gap}|7 Fairness=1Demographic Parity gap\mathrm{Fairness}=1-|\text{Demographic Parity gap}|8
Agarwal et al. (2018) Fairness=1Demographic Parity gap\mathrm{Fairness}=1-|\text{Demographic Parity gap}|9 hHh \in H00 hHh \in H01
FS on minipatch trees hHh \in H02 hHh \in H03 hHh \in H04 hHh \in H05
FS on RF trees hHh \in H06 hHh \in H07 hHh \in H08 hHh \in H09
FS on all classifiers hHh \in H10 hHh \in H11 hHh \in H12 hHh \in H13
FS Kitchen-Sink (all) hHh \in H14 hHh \in H15 hHh \in H16 hHh \in H17

In all settings, FairStacks ensembles dominate competing methods—their taf curves are strictly above all baselines for every fairness level, yielding the highest area (FAUC). The “kitchen-sink” ensemble, pooling all base learners, consistently achieves the best fairness–accuracy balance.

7. Relevance and Context

FairStacks is a simple, entirely model-agnostic, post-processing meta-learner. It can accept any collection of pre-fitted predictors and, by solving a single convex program per fairness budget hHh \in H18, efficiently traces and expands the empirical Pareto frontier between fairness and accuracy. Theoretical guarantees and empirical results demonstrate pointwise expansion of the frontier and consistently higher FAUC on diverse real-world datasets, providing practitioners and researchers with an effective plug-and-play approach to optimize the fairness–accuracy tradeoff (Little et al., 2022).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

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 FairStacks.