Optimized Score Transformation for Consistent Fair Classification

Dennis Wei, Karthikeyan Natesan Ramamurthy, Flávio du Pin Calmon

TL;DR

Most algorithmic fairness interventions focus strictly on binary classifications, leaving applications that rely on continuous risk scores (such as healthcare triage and lending) underserved. FairScoreTransformer (FST) solves this by framing fair probabilistic scoring as a cross-entropy minimization problem under linear fairness constraints. It yields an exact closed-form score transformation parametrized by a low-dimensional convex dual problem, providing strong finite-sample guarantees while outperforming existing baselines on score-level calibration and ranking metrics.

What Problem Does This Paper Address?

In many real-world machine learning deployments—such as assessing clinical risk for ICU admission or calculating loan default probabilities—the primary output of interest is not an immediate 0/1 binary decision, but rather a calibrated probability score $r(x) = \Pr(Y=1 \mid X=x)$.

However, the fairness literature predominantly targets binary thresholded predictions (e.g., standard Equalized Odds or Demographic Parity). Applying binary fair classifiers to probabilistic pipelines destroys downstream utility and calibration, while existing score-level interventions are often heuristic, lack finite-sample consistency guarantees, or strictly require knowing protected attributes (like race or gender) at test time.

This paper asks: How can we transform continuous probabilistic scores to satisfy group-fairness constraints while minimally distorting the true conditional probabilities?

Methods

The authors formalize fair score transformation as an optimization problem: minimize the cross-entropy (log loss) between the true conditional probability and the transformed score $r'(x)$, subject to fairness constraints expressible as linear inequalities in conditional score means: $$\sum_{j=1}^J b_{lj} \mathbb{E}[r'(X) \mid \mathcal{E}_{lj}] \le c_l, \quad l = 1, \dots, L$$ This accommodates Mean Score Parity (MSP) and Generalized Equalized Odds (GEO).

  • Closed-Form Score Transformation: By taking the Lagrangian dual, the authors prove that for any dual vector $\lambda$, the optimal transformed score $r^*(x)$ has an exact closed-form solution controlled by a single scalar modifier $\mu(x) = \lambda^T f(x)$: $$r^*(\mu(x); \hat{r}(x)) = \frac{1 + \mu(x) - \sqrt{(1+\mu(x))^2 - 4\hat{r}(x)\mu(x)}}{2\mu(x)}$$
  • Low-Dimensional Dual Convex Optimization: Because the dual variables $\lambda$ only scale with the number of protected groups $|A|$ (e.g., dimension $|A|$ for MSP and $2|A|$ for GEO), the dual optimization is tiny, convex, and solved efficiently via ADMM (Alternating Direction Method of Multipliers). In each step, single-parameter subproblems reduce to root-finding of a cubic polynomial with analytical solutions.
  • Plug-In Estimation & Pre/Post-Processing Modes: FST can directly post-process base model predictions (in both streaming and batch test settings). If regulations prohibit using protected attribute $A$ at test time, FST infers $A$ probabilistically via $\Pr(A \mid X)$. It also supports a pre-processing variant that outputs a sample-weighted dataset to train downstream fair models.
  • Theoretical Guarantees: Under mild calibration and convergence conditions on base estimator $\hat{r}(x)$, the authors establish finite-sample error bounds and prove asymptotic feasibility (fairness consistency) and primal optimality.

Datasets

The authors evaluate FST on four benchmark tabular datasets from the AI Fairness 360 toolkit:

  1. Adult Income (sensitive attributes: gender, race; evaluated individually and as an intersectional 4-group combination)
  2. ProPublica COMPAS Recidivism (gender, race)
  3. German Credit Risk (age)
  4. Medical Expenditure Panel Survey (MEPS) (race)

Each dataset was evaluated over 10 random 75/25 train-test splits. No new benchmarks were introduced.

Key Insights and Ideas

  • Sufficiency of Score Transformation in Pre-Processing: In the pre-processing setting, the authors show via Markov properties that transforming features $X$ is unnecessary—re-weighting or transforming scores alone is sufficient to achieve optimal trade-offs under conditional-mean fairness constraints.
  • Rank Preservation: For individuals within the same demographic group (or identical $\mu(x)$), the transformation is strictly monotonic. It never swaps relative score order among peers.
  • Computational Efficiency: Unlike in-processing reduction methods that repeatedly retrain base models (averaging ~30 training runs), FST trains the base estimator only once (or twice for pre-processing) and resolves a dual optimization over very few variables.

Key Results

FST was benchmarked against 10 existing methods (including reductions, reject option, HPS, WPP, and fair ERM) using Logistic Regression and Gradient Boosted Trees:

  • Score-Based Metrics (Brier Score, Log Loss, AUC): Post-processing variants (FSTpost and FSTbatch) consistently defined or extended the Pareto frontier over all 10 competitors, achieving much lower unfairness (MSP and GEO disparities) at lower Brier score and higher AUC.
  • Binary Label-Based Metrics (Accuracy vs. SP/EO): Despite optimizing continuous cross-entropy rather than 0-1 loss, simply thresholding FST's output scores remained competitive with top-performing binary fair learners (such as the reductions approach).
  • Missing Sensitive Attributes at Test Time: When $A$ was withheld at test time, FST successfully maintained favorable fairness-utility trade-offs by plugging in predictive estimates of $\Pr(A \mid X)$.

Limitations and Future Work

  • Reliance on Base Calibration: Theoretical guarantees assume the initial estimator $\hat{r}(x)$ converges to the true distribution $r(x)$. Severe miscalibration or limited sample sizes in minority slices will degrade downstream fairness.
  • Thresholding Degradation: While thresholded scores perform reasonably well, converting scores to hard binary decisions lacks direct theoretical fairness guarantees and can cause slight slippage on discrete parity metrics.
  • Future Directions: Extending FST to multiclass targets ($Y \in \{1, \dots, K\}$), non-linear moment fairness metrics (such as multigroup calibration), unstructured modalities (text and vision), and establishing formal ADMM convergence rates.

Summary updated

BibTeX
@article{wei2021optimized,
  author = {Dennis Wei and Karthikeyan Natesan Ramamurthy and Flávio du Pin Calmon},
  title = {{Optimized Score Transformation for Consistent Fair Classification}},
  journal = {J. Mach. Learn. Res.},
  year = {2021},
}
Figure