betaFeedback

WorksComputer Science

Fairness under Prediction Error in Predict-then-Optimize Pipelines

Abstract

Fairness constraints in predict-then-optimize pipelines are necessarily enforced on predicted outcomes y^\hat{y}, since true outcomes yy are unobserved at decision time. We study whether a demographic parity constraint enforced this way continues to hold against yy, and how the resulting violation scales with prediction error. Using a budget-constrained allocation problem solved as a linear program, we show empirically that the true-outcome fairness gap grows with prediction error σσ and saturates, well fit by c(1−e−σ/τ)c(1 - e^{-σ/τ}) with c=0.1545±0.0103c = 0.1545 \pm 0.0103 and τ=3.9045±0.3745τ= 3.9045 \pm 0.3745; its mean is invariant to sample size while its variance decays at the standard O(1/n)O(1/\sqrt{n}) rate. We derive a two-part theoretical bound: a closed-form local sensitivity result showing the gap's first-order response to prediction error depends on only two individuals per group, validated against the solver to within three significant figures; and a universal, error-independent ceiling following from the boundedness of the decision variable, confirmed consistent with but looser than the empirical saturation level. On US Census income data, enforcing demographic parity on a trained predictor's output reduces an unconstrained disparity in true income to roughly one-third of its original size, leaving 34.4% ±\pm 3.3% (California) and 35.7% ±\pm 1.8% (Texas) of the disparity intact and undetectable from the predictions alone – consistent not only in mechanism but in approximate magnitude across two states with different demographics and income distributions, and stable across ten independent train/test splits in each. A fairness constraint that appears fully satisfied at decision time can mask a substantial, systematic violation of the outcome it was meant to protect.

Introduction

A prediction y^\hat{y} that feeds a downstream decision is not evaluated on its own terms. In predict-then-optimize pipelines – allocating a budget across loan applicants, prioritizing recipients of a limited intervention, and distributing aid across a population – a model’s output is consumed by an optimizer that chooses an action before the true outcome yy is observed. Any fairness constraint placed on that optimizer is therefore necessarily a constraint on y^\hat{y}, not on yy: the quantity a practitioner can certify as fair at decision time is not the quantity the fairness guarantee is meant to protect.

This study asks whether a demographic parity constraint enforced on y^\hat{y} continues to hold when evaluated against yy and characterizes the gap between the two as a function of the prediction error. We study this in a budget-constrained resource-allocation problem solved as a linear program with demographic parity imposed on per-capita benefit at decision time.

Our contributions are as follows.

(1) Empirical characterization. Using synthetic data with controllable prediction error σ\sigma, we show that the true-outcome fairness gap grows with σ\sigma and saturates toward a fixed ceiling rather than increasing without bound, well fit by c⋅(1−e−σ/τ)c \cdot(1-e^{-\sigma/\tau}) across more than an order of magnitude of σ\sigma (Section 4). We further show that the gap’s mean is approximately invariant to the sample size nn, while its variance across draws shrinks at the standard O(1/n)O(1/\sqrt{n}) rate – indicating a systematic bias that additional data does not correct, distinct from ordinary estimation noise.

(2) A two-part theoretical bound. We derive a structural result (§ 5): at any optimum of this allocation problem, at most two individuals per group have a fractional allocation, and the gap’s first-order sensitivity to prediction error depends only on these two “marginal” individuals – every other individual’s prediction error has zero local effect. This reduces the local sensitivity to a closed-form expression, which we validate numerically against the solver to within three significant figures. We pair this local result with a universal, σ\sigma-independent ceiling that follows directly from the boundedness of the decision variable and holds for arbitrarily large prediction error, and we show that it is consistent with, though looser than, the empirically observed saturation level.

(3) Validation on real data. We confirm the mechanism using a trained income predictor on US Census data (ACSIncome; Ding et al. [2021]) (§ 7). Enforcing demographic parity on the predictor’s output reduces the unconstrained disparity in true income by approximately two-thirds but leaves the remainder intact and undetectable from the predictions alone, a result stable across ten independent train/test splits and consistent in both mechanism and approximate magnitude across two states with different demographics (California and Texas).

Scope. We isolate the estimation error – predictions drawn from the same distribution as the true outcome, corrupted by noise – as the source of prediction imperfection. We do not study distribution shift, in which the feature-outcome relationship itself changes between training and deployment (§ 8). We restrict our attention to demographic parity on continuous per-capita benefit; other fairness definitions, such as equal opportunity, are not addressed here and may exhibit different behavior under the same mechanism.

Section 2 positions this work relative to existing literature on fairness in predict-then-optimize pipelines. Section 3 formalizes the decision problem and fairness gap. Sections 4–6 present the empirical study, theoretical bound, and their comparison. Section 7 presents the real-data experiment. Section 8 discusses limitations and future work, and Section 9 concludes.

Related Work

This work sits at the intersection of predict-then-optimize decision-making and algorithmic fairness. We organize related work by the question each line addresses and state after each how it differs from ours.

Decision-focused learning. Elmachtoub and Grigas [ [2] formalize predict-then-optimize as a learning problem and propose training predictors to minimize downstream decision regret rather than prediction error alone. Wilder et al. [ [3] extend this idea to combinatorial optimization problems, differentiating through the optimization step during training so the predictor is shaped by the decisions it will induce. Neither considers a fairness constraint on the resulting decisions; both aim to make the decision better, not fairer. We take a trained predictor’s error as given, rather than optimizing against it, and ask a narrower question: holding the predictor fixed, how does its error propagate into a fairness violation.

Fairness in predict-then-optimize pipelines. Closest to this work, Wang and Chen [ [4] introduced decision regret as the gap between a fairness objective evaluated on a prediction-based decision and on the full-information (true-outcome) decision – the same quantity we study. Their method, fair decision-focused learning, minimizes this gap during training: predictions are optimized jointly for accuracy and fairness of the decisions they induce, using a differentiable relaxation of the downstream optimization problem. This requires retraining the predictor and assumes that the fairness objective is available as a training signal. We do not propose a training method; instead, we characterize how this gap behaves as a function of prediction error alone, for a fixed, already trained predictor, via a closed-form local sensitivity result and a universal bound requiring no retraining or differentiable relaxation to apply. Our results could determine, prior to any retraining, whether a given predictor’s error already makes their training-time correction necessary.

Fairness in budget-constrained decision-making. Corbett-Davies et al. [ [5] study fairness constraints in threshold-based decisions under a budget (e.g. a limited number of interventions), and show that imposing standard fairness criteria can trade off against the decision-maker’s objective – the “cost of fairness.” Their analysis takes the risk score (our y^\hat{y}) as exact; it does not consider how error in that score affects whether the fairness criterion holds against the true outcome. Our budget-constrained allocation problem is structurally similar to theirs, but our question – does the constraint survive contact with yy – is orthogonal to the cost-of-fairness trade-off they study, which concerns y^\hat{y} throughout.

Fairness under finite-sample uncertainty. Cousins [2022] bound how finite sample size distorts estimates of a fairness objective, where uncertainty arises from estimating group-level statistics from a limited number of individuals. This is structurally different from our setting: their uncertainty source is how many people are observed, ours is *how accurately each individual’s outcome is predicted. Consistent with this distinction, we find in Section 4 that our fairness gap does not vanish as sample size grows, whereas sample-complexity bounds of this type generally do – the two sources of uncertainty have different asymptotic behavior, not merely different derivations.

Where fairness should be enforced. De Vos et al. [2025] argue that fairness should be measured in the region of the score distribution where decisions actually change, rather than globally. This is a question of where to measure fairness; our question is, given a fixed, sensible place to enforce it (at decision time, on the available prediction), whether the resulting guarantee survives contact with the true outcome. The two questions are complementary rather than competing.

Demographic parity. We adopt the demographic parity criterion of Dwork et al. [2012], applied here to a continuous per-capita benefit rather than a binary classification rate. We do not consider alternative criteria such as equal opportunity; Section 8 discusses this as a direction for future work.

Summary. No existing work, to our knowledge, derives an explicit bound relating a true-outcome fairness violation to prediction error and sample size for a demographic-parity-constrained allocation problem, built from first principles (LP sensitivity and duality) and validated against both a controlled synthetic study and real data. This is the gap this paper addresses.

Problem Setup

Notation

Table 1 summarizes the notation used throughout the paper. Once introduced here, each symbol retains its meaning in every subsequent section.

SymbolMeaning
nnPopulation size
ai∈{0,1}a_i \in\{0,1\}Group membership of individual ii
G0,G1G_0, G_1The two groups, Gg={i:ai=g}G_g = \{i : a_i = g\}
n0,n1n_0, n_1Group sizes, ng=∣Gg∣n_g = \lvert G_g \rvert
yi∈Ry_i \in\mathbb{R}True outcome of individual ii
y^i∈R\hat{y}_i \in\mathbb{R}Predicted outcome of individual ii
zi∈[0,1]z_i \in[0,1]Allocation decision for individual ii
BBTotal budget, B=βnB = \beta n for budget fraction β∈(0,1)\beta\in(0,1)
σ\sigmaPrediction error scale (synthetic study only)
gap⁡(v,z)\operatorname{gap}(v,z)Fairness gap, evaluated at value vector vv and allocation zz

Table 1. Notation used throughout the paper.

Assumptions

Assumption 1 (Two groups). Each individual belongs to exactly one of two groups, G0G_0 or G1G_1, with n0,n1≥1n_0, n_1 \ge1.

Assumption 2 (Divisible allocation). The decision ziz_i is a continuous fraction in [0,1][0,1], not a binary selection. This is standard in resource-allocation settings where the allocated quantity (e.g. funding, service hours) is itself divisible.

Assumption 3 (Prediction available, outcome unobserved at decision time). At decision time, y^i\hat{y}_i is known for every ii, and yiy_i is not. Any constraint imposed on the decision can therefore be a function of y^\hat{y}, but not of yy.

The Allocation Problem

Given predictions y^∈Rn\hat{y} \in\mathbb{R}^n and group labels a∈{0,1}na \in\{0,1\}^n, the decision-maker solves

max⁡z∈Rny^Tzs.t.0≤zi≤1∀i,∑i=1nzi≤B,gap⁡(y^,z)≤ϵ,gap⁡(y^,z)≥−ϵ,(1)\begin{aligned} \max_{z \in\mathbb{R}^n}\quad& \hat{y}^{\mathsf{T}} z \\ \text{s.t.}\quad& 0 \le z_i \le1 && \forall i, \\ & \sum_{i=1}^{n} z_i \le B, \\ & \operatorname{gap}(\hat{y},z) \le\epsilon,\quad\operatorname{gap}(\hat{y},z) \ge-\epsilon, \tag*{(1)} \end{aligned}

where the fairness constraint is written as two one-sided inequalities rather than a single equality to match the implementation used throughout the paper; the two coincide exactly when ϵ=0\epsilon= 0, which we use throughout unless stated otherwise. Problem (1) is a linear program: the objective and every constraint are linear in zz.

The Fairness Gap

For any value vector v∈Rnv \in\mathbb{R}^{n} (either y^\hat{y} or yy) and allocation zz, define the per-capita benefit of group gg as 1ng∑i∈Ggvizi\frac{1}{n_g}\sum_{i \in G_g} v_i z_i, and the fairness gap as the difference between groups:

gap⁡(v,z)=1n1∑i∈G1vizi−1n0∑i∈G0vizi.(2)\operatorname{gap}(v,z) = \frac{1}{n_1}\sum_{i \in G_1}v_i z_i - \frac{1}{n_0}\sum_{i \in G_0}v_i z_i. \tag*{(2)}

This is linear in zz for fixed vv, which is what makes it usable directly as an LP constraint in (1).

The central object of this paper is the distinction between two evaluations of (2) at the solution z∗(y^)z^*(\hat{y}) of problem (1):

  • gap⁡(y^,z∗(y^))\operatorname{gap}(\hat{y},z^*(\hat{y})) – the enforced gap, constrained to lie in [−ϵ,ϵ][-\epsilon,\epsilon] by construction, and the only quantity observable at decision time (Assumption 3);

  • gap⁡(y,z∗(y^))\operatorname{gap}(y,z^*(\hat{y})) – the true gap: the same allocation z∗(y^)z^*(\hat{y}), evaluated against the true outcomes once observed.

These coincide only when y^=y\hat{y}=y. The remainder of the paper studies how large ∣gap⁡(y,z∗(y^))∣\lvert\operatorname{gap}(y,z^*(\hat{y}))\rvert can be as a function of the discrepancy between y^\hat{y} and yy, given that gap⁡(y^,z∗(y^))≈0\operatorname{gap}(\hat{y},z^*(\hat{y})) \approx0 by construction.

A Minimal Example

We anchor the formalism with the smallest nontrivial instance: n=2n=2, one individual per group (n0=n1=1n_0=n_1=1), budget B=1B=1, and ϵ=0\epsilon=0. Writing y^1,y^2\hat{y}_1,\hat{y}_2 for the two individuals’ predictions (group 0 and group 1 respectively), the fairness constraint gap⁡(y^,z)=0\operatorname{gap}(\hat{y},z)=0 reduces to y^1z1=y^2z2\hat{y}_1z_1=\hat{y}_2z_2, and combined with the budget constraint z1+z2=1z_1+z_2=1 (binding, since increasing either ziz_i only helps the objective), the unique solution is

z1∗=y^2y^1+y^2,z2∗=y^1y^1+y^2.(3)z_1^*=\frac{\hat{y}_2}{\hat{y}_1+\hat{y}_2},\qquad z_2^*=\frac{\hat{y}_1}{\hat{y}_1+\hat{y}_2}. \tag*{(3)}

Substituting (3) into (2) evaluated at the true outcomes y1,y2y_1,y_2 gives the true gap in closed form:

gap⁡(y,z∗(y^))=y1y^2−y2y^1y^1+y^2.(4)\operatorname{gap}(y,z^*(\hat{y}))=\frac{y_1\hat{y}_2-y_2\hat{y}_1}{\hat{y}_1+\hat{y}_2}. \tag*{(4)}

Equation (4) is zero exactly when y^=y\hat{y}=y (up to scale), confirming that the enforced and true gaps coincide only in the absence of prediction error, and is nonzero otherwise – the simplest possible instance of the phenomenon this paper studies at general nn. We refer to the two individuals appearing in (3)–(4) as marginal: Section 5 shows that for general nn, the solution to problem (1) reduces to exactly this two-variable structure, restricted to at most one marginal individual per group, with every other individual’s allocation pinned to 0 or 1.

Empirical Study

Experimental Design

We generate synthetic populations with two groups of controllable size and outcome gap, and a controllable amount of prediction error, so that every quantity affecting the true-outcome fairness gap is under direct experimental control. For a population of size nn, group membership aia_i is drawn Bernoulli with P(ai=1)=0.3\mathbb{P}(a_i=1)=0.3 (group 1 the minority); true outcomes are drawn yi∼N(μai,0.52)y_i \sim\mathcal{N}(\mu_{a_i},0.5^2) with μ0=2.0,μ1=1.4\mu_0=2.0,\mu_1=1.4, so that group 1 has strictly lower expected outcome and an unconstrained allocation is unfair by construction; predictions are generated as y^i=yi+σ⋅εi\hat{y}_i=y_i+\sigma\cdot\varepsilon_i for εi∼N(0,1)\varepsilon_i\sim\mathcal{N}(0,1), so σ\sigma is the sole, directly controlled knob governing prediction error, with σ=0\sigma=0 recovering perfect prediction. For each generated population, we solve problem (1) with ϵ=0\epsilon=0 and budget fraction β=0.3\beta=0.3, and record gap⁡(y,z∗(y^))\operatorname{gap}(y,z^*(\hat{y})) – the true gap, under the allocation that was constrained to satisfy parity only on y^\hat{y}.

Two quantities were varied across experiments: σ\sigma to trace how the true gap depends on the prediction error, and nn to determine whether the gap is a finite-sample artifact or persists asymptotically. Every other generative parameter (μ0,μ1,group proportion,β)(\mu_0,\mu_1,\text{group proportion},\beta) was held fixed throughout, so that the observed changes in the gap could be attributed to σ\sigma and nn alone. Each reported configuration was repeated over multiple random seeds; we report the mean and standard error (SE) over seeds throughout, never a single run, because any individual draw of a,y,εa,y,\varepsilon is itself a random quantity.

Dependence on Prediction Error

We first sweep σ∈{0,0.2,0.4,…,2.0}\sigma\in\{0, 0.2, 0.4, \ldots, 2.0\} at a fixed n=2000n = 2000, with 20 seeds per value. The mean true gap grows monotonically from ≈0\approx0 at σ=0\sigma= 0 to −0.077-0.077 at σ=2.0\sigma= 2.0, but the per-step increase shrinks as σ\sigma grows (first differences fall from ≈0.009\approx0.009 near σ≈0.3\sigma\approx0.3 to ≈0.006\approx0.006 near σ=2.0\sigma= 2.0), indicating concave, not linear, growth. This is structurally expected: z∈[0,1]nz \in[0, 1]^n is bounded and budget-constrained (Assumption 2, Eq. (1)), so gap⁡(y,z)\operatorname{gap}(y, z) is itself bounded regardless of how large σ\sigma becomes, ruling out unbounded (e.g. linear) growth on structural grounds alone.

Dependence on Sample Size

Next, we sweep n∈{500,1000,2000,4000,8000}n \in\{500, 1000, 2000, 4000, 8000\} at three fixed values of σ∈{0.5,1.0,1.5}\sigma\in\{0.5, 1.0, 1.5\}, with 20 seeds per configuration. The mean true gap appears to decrease in magnitude from n=2000n = 2000 to n=8000n = 8000 at every tested σ\sigma (e.g. at σ=0.5\sigma= 0.5: −0.0204→−0.0180→−0.0154-0.0204 \to-0.0180 \to-0.0154 for n=2000,4000,8000n = 2000, 4000, 8000), suggesting the gap might vanish as n→∞n \to\infty. We report this intermediate result because it did not survive closer scrutiny: the standard error at n=500n = 500 (SE ≈0.006\approx0.006 at σ=0.5\sigma= 0.5) is nearly as large as the mean itself (−0.0042-0.0042), indicating 20 seeds is insufficient to resolve the small-nn behavior, and the apparent downward trend could reflect sampling noise rather than a real effect.

Repeating with 100 seeds per configuration resolves this. The mean true gap is now approximately constant across nn at every tested σ\sigma (e.g., at σ=0.5\sigma= 0.5: −0.0131,−0.0152,−0.0154,−0.0159,−0.0154-0.0131, -0.0152, -0.0154, -0.0159, -0.0154 for n=500,1000,2000,4000,8000n = 500, 1000, 2000, 4000, 8000, each within 1–2 SE of the others), while the standard deviation across seeds shrinks systematically with nn (from 0.0241 at n=500n = 500 to 0.0061 at n=8000n = 8000, a ≈3.95×\approx3.95\times reduction for a 16×16\times increase in nn, matching the 16=4\sqrt{16} = 4 predicted by standard sampling theory). We interpret this as two distinct components of the true gap: a systematic bias that does not vanish with nn, and ordinary O(1/n)O(1/\sqrt{n}) sampling noise around it. We return to this distinction structurally in § 5.

Functional Form

Having established that the gap’s dependence on nn is limited to variance, not mean, we fix n=4000n = 4000 (where the standard deviation is already small) and focus sampling effort on resolving the σ\sigma dependence precisely, using 100 seeds per value of σ∈{0,0.2,…,3.0}\sigma\in\{0, 0.2, \ldots, 3.0\}. We compared five candidate functional forms using weighted least squares, using each point’s standard error as the weight: linear (cσc\sigma), square root (cσc\sqrt{\sigma}), power law (cσpc\sigma^p), rational saturating (cσ/(k+σ)c\sigma/(k+\sigma)), and exponential saturating (c(1−e−σ/τ)c(1-e^{-\sigma/\tau})). Over this range, the square-root form is decisively rejected (RMSE 10×10\times worse than the alternatives); the power-law fit returns p≈0.97p \approx0.97, which is indistinguishable from linear; and while the saturating forms fit measurably better, their fitted saturation parameters (k≈16k \approx16, τ≈8.3\tau\approx8.3) lie well outside the tested range of σ\sigma, meaning the data over [0,3][0,3] cannot yet distinguish genuine saturation from a slowly bending curve that merely resembles it.

We therefore extend the sweep to σ∈{0,1,2,3,4,6,8,10,14,20}\sigma\in\{0, 1, 2, 3, 4, 6, 8, 10, 14, 20\}, with 60 seeds per value (sufficient to resolve the shape at this coarser resolution). Over this wider range, linear growth is decisively ruled out (RMSE 30×30\times worse than the best fit), and the exponential saturating form fits best, with parameters that now fall within the tested range (τ≈3.95\tau\approx3.95, compared to τ≈8.3\tau\approx8.3 fitted from the shorter range alone) – indicating the earlier, short-range fit was extrapolating, while this one is interpolating. Combining both sweeps into a single weighted fit gives

∣gap⁡(y,z∗(y^))∣≈c(1−e−σ/τ),c=0.1545±0.0103,τ=3.9045±0.3745.(5)\lvert\operatorname{gap}(y, z^*(\hat{y}))\rvert\approx c\left(1-e^{-\sigma/\tau}\right), \qquad c = 0.1545 \pm0.0103, \quad\tau= 3.9045 \pm0.3745. \tag*{(5)}

Figure 1 shows the empirical means with standard error bars alongside the fitted curve of Eq. (5): the gap rises steeply and nearly linearly for σ≲1\sigma\lesssim1, then bends over and flattens toward a ceiling of c≈0.155c \approx0.155 by σ≈14\sigma\approx14–20, with the fitted curve passing through the error bars at every tested point.

Fairness gap grows and saturates with prediction error

Figure 1. True-outcome fairness gap as a function of prediction error σ\sigma (n=4000n = 4000, 60–100 seeds per point, error bars show ±1\pm1 SE), with the fitted curve of Eq. (5).

Summary

Two findings from this section are used directly in what follows. First, the true-outcome fairness gap is well described by the saturating form of Eq. (5), growing approximately linearly for small σ\sigma and flattening to a finite ceiling for large σ\sigma – § 6 compares this empirical shape against the theoretical bound derived in § 5. Second, the gap’s mean is approximately invariant to sample size while its variance decays at the standard O(1/n)O(1/\sqrt{n}) rate – a signature § 5 explains structurally by showing the gap’s sensitivity to prediction error depends on only a bounded number of individuals regardless of nn.

Theoretical Analysis

This section derives a theoretical characterization of the true-outcome gap in two parts: a structural result reducing the optimal allocation’s dependence on y^\hat{y} to at most two individuals per group (§ 5.1), from which a closed-form local sensitivity formula follows (§ 5.2), and a universal, σ\sigma-independent ceiling following from boundedness alone (§ 5.3). Every derived expression in this section is validated numerically against the solver used in § 4, with the validation stated immediately after each result.

The Active Set Reduces to One Marginal Individual per Group

Proposition 1 (Active-set reduction). Let z∗z^* be an optimal solution to problem (1) with ϵ=0\epsilon= 0, and suppose no two individuals within the same group share an identical predicted value y^i\hat{y}_i. Then at most one individual in each group GgG_g satisfies 0<zi∗<10 < z_i^* < 1; every other individual satisfies zi∗∈{0,1}z_i^* \in\{0, 1\}.

Proof. Fix g∈{0,1}g \in\{0, 1\} and the total allocation to group gg, Sg=∑i∈GgziS_g = \sum_{i \in G_g} z_i, at its value under z∗z^*. Among all allocations within GgG_g summing to SgS_g with 0≤zi≤10 \le z_i \le1, the one maximizing ∑i∈Ggy^izi\sum_{i \in G_g} \hat{y}_i z_i – the only part of the objective in (1) depending on {zi}i∈Gg\{z_i\}_{i \in G_g} for fixed SgS_g – is obtained by fully funding the highest-y^i\hat{y}_i individuals in GgG_g first. Suppose instead zi∗,zj∗∈(0,1)z_i^*, z_j^* \in(0, 1) for two individuals i,j∈Ggi, j \in G_g with y^i≠y^j\hat{y}_i \ne\hat{y}_j (w.l.o.g. y^i>y^j\hat{y}_i > \hat{y}_j). Let δ=min⁡(1−zi∗,zj∗)>0\delta= \min(1 - z_i^*, z_j^*) > 0 and define z′z' by zi′=zi∗+δz_i' = z_i^* + \delta, zj′=zj∗−δz_j' = z_j^* - \delta, zk′=zk∗z_k' = z_k^* otherwise. Then z′z' is feasible for problem (1): SgS_g is unchanged, so both the budget constraint (which depends only on ∑izi\sum_i z_i) and the fairness constraint (which depends only on S0,S1S_0, S_1 through (2)) are unaffected. The objective strictly increases, y^⊤z′−y^⊤z∗=δ(y^i−y^j)>0\hat{y}^{\top}z' - \hat{y}^{\top}z^* = \delta(\hat{y}_i - \hat{y}_j) > 0, contradicting optimality of z∗z^*. Hence at most one individual per group is fractional. □\square

We write mgm_g for the (at most one) marginal individual in group gg under z∗z^*, when one exists, and refer to individuals with zi∗=1z_i^* = 1 as fully funded and those with zi∗=0z_i^* = 0 as excluded. Proposition 1 shows that for fixed total allocations S0,S1S_0, S_1, the within-group structure is fully determined (fully fund by descending y^i\hat{y}_i until the budget for that group is exhausted, with at most one fractional remainder); the only remaining freedom is in (S0,S1)(S_0, S_1) itself, governed jointly by the budget and fairness constraints across both groups. This is exactly the two-variable system solved explicitly for n=2n = 2 in § 3.5, now shown to govern the general-nn problem as well, restricted to whichever two individuals happen to be marginal.

Corollary 1 (Non-marginal insensitivity). For any individual ii that is fully funded or excluded under z∗(y^)z^*(\hat{y}), and for sufficiently small perturbations δ\delta of y^i\hat{y}_i that do not change which individuals are fully funded, excluded, or marginal, ∂gap⁡(y,z∗(y^))/∂y^i=0\partial\operatorname{gap}(y, z^*(\hat{y}))/\partial\hat{y}_i = 0.

Proof. By Proposition 1, ii’s status (fully funded or excluded) and every other individual’s allocation are determined by the ranking of y^\hat{y} within each group and the two marginal individuals’ values, not by y^i\hat{y}_i’s exact value, provided the perturbation is small enough that ii’s rank relative to its group’s marginal individual is unchanged. Under this condition z∗(y^)z^*(\hat{y}) is locally constant in y^i\hat{y}_i, and since gap⁡(y,⋅)\operatorname{gap}(y,\cdot) in (2) is a fixed linear functional of zz for fixed yy, it is locally constant in y^i\hat{y}_i as well.

Numerical validation. We verified Corollary 1 directly: perturbing a non-marginal individual’s y^i\hat{y}_i by 10−410^{-4} in the n=4000n=4000, σ=0.3\sigma=0.3 configuration of Section 4 changed the true gap by ≈3.6×10−12\approx3.6 \times10^{-12}, consistent with floating-point noise rather than a real effect.

Local Sensitivity to Prediction Error

Write nm0,nm1n_{m_0}, n_{m_1} for the group sizes containing the marginal individuals, FgF_g for the fully funded set in group gg, Ag=1ng∑i∈Fgy^iA_g = \frac{1}{n_g}\sum_{i\in F_g}\hat{y}_i for the fixed per-capita contribution of the fully funded individuals (as measured by y^\hat{y}, the quantity the constraint is enforced on), and bg=y^mg/ngb_g = \hat{y}_{m_g}/n_g. Let R=B−∑i∈F0∪F11R = B - \sum_{i\in F_0\cup F_1}1 be the remaining budget for the marginal pair.

Lemma 1 (Closed form for the marginal allocations). Suppose both the budget and fairness constraints of problem (1) bind at z∗z^*, and both groups have a marginal individual. Then

zm0∗=A1−A0+b1Rb0+b1,zm1∗=R−zm0∗.(6)z^*_{m_0} = \frac{A_1-A_0+b_1R}{b_0+b_1}, \qquad z^*_{m_1}=R-z^*_{m_0}. \tag*{(6)}

Proof. With the within-group structure fixed by Proposition 1, the budget constraint restricted to the marginal pair is zm0+zm1=Rz_{m_0}+z_{m_1}=R, and the fairness constraint gap⁡(y^,z)=0\operatorname{gap}(\hat{y},z)=0 becomes A0+b0zm0=A1+b1zm1A_0+b_0z_{m_0}=A_1+b_1z_{m_1}. Substituting zm1=R−zm0z_{m_1}=R-z_{m_0} and solving the resulting linear equation for zm0z_{m_0} gives (6).

Theorem 1 (Local sensitivity of the true gap). Under the conditions of Lemma 1, and for perturbations of y^m0,y^m1\hat{y}_{m_0},\hat{y}_{m_1} small enough that the identity of the marginal pair and the fully-funded/excluded sets are unchanged,

∂gap⁡(y,z∗)∂y^m0=−zm0∗n0(b0+b1)(ym0n0+ym1n1),∂gap⁡(y,z∗)∂y^m1=−zm1∗n1(b0+b1)(ym0n0+ym1n1).(7)\frac{\partial\operatorname{gap}(y,z^*)}{\partial\hat{y}_{m_0}}=-\frac{z^*_{m_0}}{n_0(b_0+b_1)}\left(\frac{y_{m_0}}{n_0}+\frac{y_{m_1}}{n_1}\right), \qquad \frac{\partial\operatorname{gap}(y,z^*)}{\partial\hat{y}_{m_1}}=-\frac{z^*_{m_1}}{n_1(b_0+b_1)}\left(\frac{y_{m_0}}{n_0}+\frac{y_{m_1}}{n_1}\right). \tag*{(7)}

Proof. Write N=A1−A0+b1RN=A_1-A_0+b_1R, so zm0∗=N/(b0+b1)z^*_{m_0}=N/(b_0+b_1) by Lemma 1, and b0=y^m0/n0b_0=\hat{y}_{m_0}/n_0 is the only term depending on y^m0\hat{y}_{m_0} (for fixed y^m1\hat{y}_{m_1}, A0A_0, A1A_1, RR depend on neither). Then ∂zm0∗/∂b0=−N/(b0+b1)2=−zm0∗/(b0+b1)\partial z^*_{m_0}/\partial b_0=-N/(b_0+b_1)^2=-z^*_{m_0}/(b_0+b_1), and by the chain rule with ∂b0/∂y^m0=1/n0\partial b_0/\partial\hat{y}_{m_0}=1/n_0, ∂zm0∗/∂y^m0=−zm0∗/(n0(b0+b1))\partial z^*_{m_0}/\partial\hat{y}_{m_0}=-z^*_{m_0}/(n_0(b_0+b_1)). By Corollary 1 the true gap depends on y^m0\hat{y}_{m_0} only through zm0∗z^*_{m_0} and zm1∗=R−zm0∗z^*_{m_1}=R-z^*_{m_0}: differentiating gap⁡(y,z)=1n1∑G1yizi−1n0∑G0yizi\operatorname{gap}(y,z)=\frac{1}{n_1}\sum_{G_1}y_iz_i-\frac{1}{n_0}\sum_{G_0}y_iz_i (Eq. (2)) with respect to y^m0\hat{y}_{m_0} gives ym1n1∂zm1∗∂y^m0−ym0n0∂zm0∗∂y^m0\frac{y_{m_1}}{n_1}\frac{\partial z^*_{m_1}}{\partial\hat{y}_{m_0}}-\frac{y_{m_0}}{n_0}\frac{\partial z^*_{m_0}}{\partial\hat{y}_{m_0}}, and substituting ∂zm1∗/∂y^m0=−∂zm0∗/∂y^m0\partial z^*_{m_1}/\partial\hat{y}_{m_0}=-\partial z^*_{m_0}/\partial\hat{y}_{m_0} gives the first expression in (7). The second follows symmetrically, differentiating Lemma 1 with respect to y^m1\hat{y}_{m_1} through b1b_1.

Numerical validation. We validated Theorem 1 against the real solver at n=4000n=4000, σ=0.3\sigma=0.3 (seed 1), where the marginal pair had n0=2820n_0=2820, n1=1180n_1=1180, zm0∗=0.632z^*_{m_0}=0.632, zm1∗=0.368z^*_{m_1}=0.368. Central finite differences with step 10−410^{-4}–10−510^{-5} (small enough not to disturb the active set—a step of 10−310^{-3} was large enough to push the group-0 marginal individual to z=1z=1, giving a spurious slope) gave 0.0002300.000230 for ∂gap⁡/∂y^m0\partial\operatorname{gap}/\partial\hat{y}_{m_0} against (7)’s prediction of 0.0002290.000229, and −0.000327-0.000327 for ∂gap⁡/∂y^m1\partial\operatorname{gap}/\partial\hat{y}_{m_1} against a prediction of −0.000318-0.000318—agreement to 2–3 significant figures in both cases. We note as a methodological point that an earlier derivation of Theorem 1 carried a sign error (the two terms of (2) transposed), caught precisely by this numerical check rather than by inspection; every analytical result in this section was validated this way before being accepted.

A Universal Ceiling

Theorem 2 (Universal ceiling). For any feasible zz in problem (1) (i.e. 0≤zi≤10\le z_i\le1 for all ii and ∑izi≤B\sum_i z_i\le B) and any value vector vv,

∣gap⁡(v,z)∣≤Bmin⁡(n0,n1)max⁡i∣vi∣.(8)|\operatorname{gap}(v,z)| \le\frac{B}{\min(n_0,n_1)}\max_i |v_i|. \tag*{(8)}

Proof. By the triangle inequality applied to (2), ∣gap⁡(v,z)∣≤1n1∑G1∣vi∣zi+1n0∑G0∣vi∣zi≤max⁡i∣vi∣(1n1∑G1zi+1n0∑G0zi)≤max⁡i∣vi∣min⁡(n0,n1)∑izi≤Bmax⁡i∣vi∣min⁡(n0,n1)|\operatorname{gap}(v,z)| \le\frac{1}{n_1}\sum_{G_1}|v_i|z_i+\frac{1}{n_0}\sum_{G_0}|v_i|z_i \le\max_i|v_i|\left(\frac{1}{n_1}\sum_{G_1}z_i+\frac{1}{n_0}\sum_{G_0}z_i\right) \le\frac{\max_i|v_i|}{\min(n_0,n_1)}\sum_i z_i \le\frac{B\max_i|v_i|}{\min(n_0,n_1)}, using zi≤1z_i \le1 and ∑izi≤B\sum_i z_i \le B in the last step.

Unlike Theorem 1, Theorem 2 requires no assumption on which constraints bind, which individuals are marginal, or how large the prediction error is; it holds even as σ→∞\sigma\to\infty, when predictions carry no information about yy. This is the sense in which it is universal; it is correspondingly loose, as it does not use the fact that z∗z^* is chosen by an optimizer at all. In our experiments, outcomes are nonnegative (yi≥0y_i \ge0, by construction in the synthetic study and by the clipping step of § 7), so max⁡i∣yi∣=max⁡iyi\max_i|y_i| = \max_i y_i; evaluating Eq. (8) at n=4000n = 4000, σ=1.0\sigma= 1.0, β=0.3\beta= 0.3 gives a ceiling of 4.04, compared to the empirically observed saturation level of c≈0.155c \approx0.155 from Eq. (5) – consistent with, though substantially looser than, the saturation § 4 observes. We compare the two results directly in § 6.

Bound Validation

This section compares the theoretical results of § 5 to the empirical curve of § 4; it introduces no new derivations.

The universal ceiling is loose, as expected. Theorem 2 provides a ceiling of 4.04 at n=4000n = 4000, σ=1.0\sigma= 1.0, β=0.3\beta= 0.3, roughly 26×26\times the empirically observed saturation level c≈0.155c \approx0.155 from Eq. (5). This looseness is expected rather than a shortcoming: Theorem 2 uses only the boundedness of zz, not the fact that z∗z^* is chosen by an optimizer balancing a budget and fairness constraint against the objective. It is a worst-case bound over all feasible zz, not a description of the z∗z^* the LP actually produces, so a substantial gap between the two is exactly what should be expected of a bound this general. Across every (σ,n)(\sigma,n) configuration in § 4, the empirical gap never approached, let alone exceeded, the corresponding ceiling – the bound is never violated, which is the property it was constructed to guarantee.

The local sensitivity result is validated as a mechanism, not as a direct predictor of the population-level curve. Theorem 1 was validated in § 5.2 at the level it was derived: the sensitivity of the true gap to one marginal individual’s prediction, at one specific realization of (y^,a)(\hat{y},a), confirmed against finite differences on the solver to 2–3 significant figures. This is a different quantity from the population-averaged slope in Eq. (5) near σ=0\sigma= 0, which would additionally require taking an expectation over the identity and values of the marginal pair as σ\sigma varies across random draws, a step we do not attempt here. What Theorem 1 and Corollary 1 do establish, and what the empirical curve is consistent with, is the mechanism: that the gap’s response to prediction error is governed by a small, bounded number of individuals rather than growing with nn, matching the nn-invariance of the mean gap observed in § 4.3, and that this local, per-individual sensitivity is well-defined only while the active set is stable, consistent with the near-linear behavior of Eq. (5) for small σ\sigma, before repeated swaps of the marginal pair at larger σ\sigma average into the observed saturation.

What this does not achieve. Neither theoretical result derives Eq. (5)’s exponential saturating form, or the specific values of cc and τ\tau, from first principles. Doing so would require a distributional assumption on how the identity of the marginal pair changes under repeated independent draws of the noise ϵ\epsilon – the population-level analog of the per-draw mechanism Theorem 1 characterizes – which we leave as an open direction (§ 8) rather than introduce unjustified assumptions to close it here. The two-part result of § 5 is deliberately an envelope, not a reconstruction of the fitted curve: a provable local mechanism plus a provable universal ceiling, between which the empirically observed curve must lie, and does.

Real-Data Experiment

Data and Task

We use the ACSIncome task from the folktables package [1] with 2018 1-year ACS PUMS vintage. In place of the task’s default binary income threshold, we use the continuous reported income (PINCP) directly as yy, consistent with the continuous-outcome setting of § 3–§ 5. We define the two groups as White (RAC1P=1) and Black (RAC1P=2) respondents, the standard comparison for this dataset in the fairness literature. We run the full pipeline on two states, California and Texas, to assess whether the results are specific to one state’s income distribution and demographics (§ 7.4).

For California, after removing missing income values, clipping negative income to zero, and winsorizing the top 1% to limit the influence of extreme earners, n0=121,006n_0 = 121{,}006 and n1=8,557n_1 = 8{,}557, with group 1’s mean income ($50,985) below group 0’s ($70,039), consistent with the sign convention used throughout the paper.

Pulling PINCP and RAC1P naively from the source dataframe by the processed feature table’s index produced silently misaligned income values (confirmed by the near-zero correlation between income and hours worked or education, which should correlate positively): folktables’s internal preprocessing resets the feature, label, and group arrays to a fresh index disconnected from the original dataframe’s row labels. We corrected this by extracting income from the library’s own filtering step (ACSIncome._preprocess) directly, which restored the expected positive correlations before proceeding, and confirmed the same fix is required and sufficient on Texas’s data (§ 7.4).

Predictor

We train a random forest regressor (200 trees, max depth 10) to predict income from the task’s remaining features, excluding the group attribute RAC1P so that any resulting prediction error reflects ordinary predictive difficulty rather than direct use of group membership. We use a 70/30 train/test split and evaluate y^\hat{y} only on the held-out test set to avoid overfitting and understating the true prediction error, which is the central quantity studied in this paper. In California, one representative split achieves R2=0.407R^2 = 0.407 with negligible bias (mean residual ≈15\approx15, against incomes on the order of 10410^4–10510^5); in Texas, R2=0.417R^2 = 0.417 with similarly negligible bias (mean residual ≈89\approx89). Both are realistic, non-overfit predictors, and are not particularly strong or weak for this task.

Results: California

On the representative California split above, solving problem (1) with β=0.3\beta= 0.3 yields an unconstrained true gap of −$19,417; enforcing the fairness constraint on y^\hat{y} reduces this to gap⁡(y^,z∗)≈0\operatorname{gap}(\hat{y}, z^*) \approx0 (as designed) while the true gap gap⁡(y,z∗)\operatorname{gap}(y, z^*) is −$6,910 – nonzero, but substantially smaller than the unconstrained disparity.

Because any single split is itself a random quantity (§ 4.1), we repeated this procedure – retraining the predictor from scratch each time – across 10 independent train/test splits. The result was stable: unconstrained gap, −$19,112 ± $872; constrained true gap, −$6,577 ± $738; and, expressing the constrained gap as a fraction of the unconstrained one, 34.4% ± 3.3% of the original disparity survives the constraint, consistently across all 10 splits (never below 29% or above 40%). This was the headline California result; the single-split numbers above are an illustrative first pass, not independent evidence of the result.

Cross-State Robustness: Texas

To test whether the California result reflects a general mechanism or is specific to California’s income distribution and demographics, we repeat the entire pipeline unchanged – same task, same group pair, same predictor architecture and hyperparameters, same cleaning procedure – on Texas. Texas has a meaningfully different group balance (n1/n0≈11.8%n_1/n_0 \approx11.8\%, vs. California’s ≈7.1%\approx7.1\%) and a different absolute income distribution (group 0 mean $58,539, group 1 mean $42,092, both lower than California’s), providing a genuinely independent test rather than a near-duplicate of the California setting.

The 10-split result on Texas is −$16,357 ± $826 (unconstrained), −$5,846 ± $431 (constrained true gap), and 35.7% ± 1.8% of the disparity retained. Table 2 summarizes both states. While the absolute dollar magnitudes differ between states, consistent with their different income distributions, the fraction of the unconstrained disparity that survives the constraint is nearly identical – 34.4% vs. 35.7%, well within each other’s uncertainty – despite the two states differing in group balance, absolute income levels, and predictor error (R2=0.407R^2 = 0.407 vs. 0.417). This indicates the phenomenon studied in this paper is not an artifact of one state’s data, and that its approximate magnitude, not only its existence, may generalize.

CaliforniaTexas
Group sizes (n0,n1n_0, n_1)121,006, 8,557105,835, 12,529
Predictor R2R^20.4070.417
Unconstrained gap−$19,112 ± $872−$16,357 ± $826
Constrained true gap−$6,577 ± $738−$5,846 ± $431
Fraction of disparity retained34.4% ± 3.3%35.7% ± 1.8%

Table 2. Real-data results, California vs. Texas (10-split mean ± std).

Scope of this Experiment

Two aspects of this setup remain worth noting as scope. We use a single task (income) and a single group pair (White/Black); we do not claim that the specific retained-disparity figures generalize beyond this comparison –other group pairs or outcome variables may behave differently, and two states, while a genuine robustness check, are not a representative sample of all fifty. The consistency observed here is evidence against the result being a California-specific artifact, not proof of universal generalization. We discuss this boundary further in Section 8.

Discussion

Fairness definition. Every result in this study concerns demographic parity on continuous per-capita benefits (Eq. (2)); we do not study how prediction error propagates under other common fairness criteria, such as equal opportunity, which conditions on the true outcome rather than comparing unconditional group averages. Because the definition of equal opportunity already references yy in its standard form, the mechanism studied here – a constraint stated purely in terms of y^\hat{y} silently drifting from its true-outcome counterpart – may not transfer directly; characterizing this for conditional fairness criteria is a natural and, we expect, non-trivial extension.

Decision structure. Problem (1) is a specific linear program: continuous allocation, a single budget constraint, a single pairwise fairness constraint. The active-set reduction (Proposition 1) relies on this specific structure – in particular, on there being exactly two non-trivial constraints beyond the box constraints on zz. Decision problems with more constraints (e.g. multiple budgets, more than two groups) would admit a correspondingly larger, but still bounded, active set, and we expect the qualitative conclusion (a small, fixed number of individuals governing local sensitivity, independent of nn) to generalize; we have not verified this beyond the two-constraint case analyzed here.

The active-set stability threshold. Theorem 1 holds only for perturbations small enough that the marginal pair’s identity does not change (Section 5.2); we verified that this condition holds for specific, small finite-difference steps, but we do not derive a general formula for how large a perturbation is permissible before a rank swap occurs. Such a formula would depend on the gap between the marginal individual’s value and their nearest competitor within the group, and deriving it in general would likely require a distributional assumption on the noise – precisely the kind of assumption we deliberately avoided in favor of the looser, assumption-free envelope of Section 6. Formalizing this threshold, and using it to derive the population-averaged small-σ\sigma slope directly (rather than validating the per-draw mechanism only, as done here), is an open technical question.

Estimation error versus distribution shift. This paper isolates estimation error: y^\hat{y} is a noisy estimate of yy, drawn from the same underlying relationship between features and outcome. A distinct and arguably more consequential source of prediction unreliability is distribution shift, where the feature-outcome relationship itself differs between the data a predictor was trained on and the population it is deployed on. The mechanism studied here – sensitivity concentrated in a small active set – was derived without reference to how y^−y\hat{y}-y arises, and may or may not extend unchanged to shift-induced error, which need not resemble the symmetric, mean-zero noise assumed in Section 4.1. Extending this analysis to distribution shift is, in our view, the most consequential direction for future work.

Practical implications. For a practitioner auditing a fairness-constrained allocation system, the results of Sections 4 and 7 imply that verifying a demographic parity constraint against the predictions used at decision time is not sufficient evidence that the constraint holds in reality, even when the predictor is reasonably accurate (R2≈0.4R^2 \approx0.4 in our real-data experiment) and the verification is numerically exact. The size of the resulting true-outcome violation is not negligible or catastrophic in our experiments – roughly a third of the unconstrained disparity survived the constraint – but it is systematic rather than reducible by collecting more data (Section 4.3), meaning an audit that checks predictions alone will report a false sense of certainty regardless of how much data informed the predictor.

Conclusion

Enforcing a demographic parity constraint on predicted outcomes does not guarantee that the constraint holds against true outcomes, and the resulting violation is systematic, governed by a small, bounded number of individuals regardless of population size, not an artifact that more data resolves, a pattern we establish theoretically, validate numerically, and confirm on real income data, where roughly a third of an unconstrained disparity survives a constraint that appears, by every measure available at decision time, to have eliminated it. The most consequential extension of this result is to distribution shift, where prediction error arises not from estimation noise but from a changing relationship between features and outcomes, a setting that this paper’s mechanism was not derived for, and where the size of the resulting fairness violation may behave very differently.

Code Availability

All code, including the full synthetic and real-data pipelines, is available at https://github.com/hildaadwubiosei/predict-then-optimize. The repository contains a single Jupyter notebook reproducing every result and figure reported in this paper, executed end-to-end with no manual intervention between cells. Code is released under the MIT License; written content (this paper’s text and figures) is released separately under CC BY 4.0, as noted in the repository’s LICENSE and LICENSE-CONTENT files. Raw Census data used in § 7 is not redistributed in the repository due to its size, but is downloaded automatically on first run via the folktables package [1].

References

  1. [1]Frances Ding, Moritz Hardt, John Miller, and Ludwig Schmidt. Retiring adult: New datasets for fair machine learning. Advances in Neural Information Processing Systems, 2021.arxiv.org/abs/2108.04884
  2. [2]Adam N. Elmachtoub and Paul Grigas. Smart “predict, then optimize”. Management Science, 2022.arxiv.org/abs/1710.08005
  3. [3]Bryan Wilder, Bistra Dilkina, and Milind Tambe. Melding the data-decisions pipeline: Decision-focused learning for combinatorial optimization. In Proceedings of the AAAI Conference on Artificial Intelligence, 2019.arxiv.org/abs/1809.05504
  4. [4]Yu Wang and Violet Xinying Chen. End-to-end fairness optimization with fair decision-focused learning, 2026. URL https://arxiv.org/abs/2607.29441.
  5. [5]Sam Corbett-Davies, Emma Pierson, Avi Feller, Sharad Goel, and Aziz Huq. Algorithmic decision making and the cost of fairness. In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2017.

Paper details

vlnc:W_weups3zz
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents