---
title: Equity-Conformalized Quantile Regression
url: https://www.emergentmind.com/topics/equity-conformalized-quantile-regression
type: topic
---

# Equity-Conformalized Quantile Regression

Equity-Conformalized Quantile Regression (ECQR) designates a class of nonparametric predictive interval procedures that unite three critical statistical demands: (1) finite-sample, distribution-free marginal coverage, (2) adaptivity to local distributional features such as heteroscedasticity, and (3) certified fairness—specifically, demographic parity—across sensitive subpopulations. This methodology synthesizes split conformal prediction, quantile regression, and post-hoc optimal transport synchronization, providing a distribution-free pipeline for learning quantile functions that respect fairness constraints and yield reliable, fair prediction intervals for continuous outcomes [1905.03222][2210.02015].

## 1. Formal Framework and Motivations

Let $(X, S, Y)$ denote the covariates, sensitive group indicator, and continuous response. The foundational goal is to construct, for each $(x, s)$, a predictive interval $C(x, s)$ such that the marginal coverage (over the data-generating distribution) satisfies $\Pr\{Y \in C(X,S)\} \geq 1-\alpha$ for a chosen miscoverage rate $\alpha \in (0, 1)$, and, crucially, both endpoints of $C(x, s)$ are Demographic Parity (DP)–fair under the empirical group-wise distribution of predicted quantiles. Demographic Parity at quantile level $\tau$ demands that $\mathsf{Law}(Q_s(X;\tau))$ be invariant across all sensitive attribute values $s$.

These methods arose in response to the observation that vanilla conformal prediction, while affording valid marginal coverage, ignores subpopulation representation and can yield systematically unequal intervals—typically, wider for underrepresented or noisier groups—thus violating algorithmic fairness criteria [2210.02015].

## 2. Base Methodology: Conformalized Quantile Regression

The standard Conformalized Quantile Regression (CQR) algorithm operates in two main stages [1905.03222]:

1. **Quantile Regression Step**: Fit lower and upper quantile regression models on the training set,
   $$
   \hat q_{\alpha/2}(x) \approx Q_{Y|X}\left(\alpha/2 \mid x\right), \qquad
   \hat q_{1-\alpha/2}(x) \approx Q_{Y|X}\left(1 - \alpha/2 \mid x\right)
   $$
   by check-loss minimization.

2. **Split Conformal Calibration**: Compute nonconformity scores $s_j = \max\{\hat q_{\alpha/2}(X_j)-Y_j, Y_j-\hat q_{1-\alpha/2}(X_j)\}$ on a calibration set. The $(1-\alpha)$-quantile of the calibration set's scores, $\hat s$, is used to form the prediction interval
   $$
   C_{\rm CQR}(x) = [\hat q_{\alpha/2}(x) - \hat s,\, \hat q_{1-\alpha/2}(x)+\hat s].
   $$

This procedure yields marginal finite-sample coverage under the sole assumption of data exchangeability
$$
\Pr\left\{Y_{n+1} \in C_{\rm CQR}(X_{n+1}) \right\} \geq 1-\alpha.
$$
CQR intervals exhibit local adaptivity to heteroscedasticity owing to data-adaptive quantile regression levels, yet the conformal correction is global and does not address group fairness [1905.03222].

## 3. Fairness Constraints and Demographic Parity for Quantiles

Equity-Conformalized Quantile Regression extends CQR by enforcing Demographic Parity for the induced distributions of quantile predictions. For categorical $S \in \{1, ..., K\}$, DP at quantile level $\tau$ is defined as
$$
\mathsf{Law}(Q_s(X;\tau)) = \mathsf{Law}(Q_{s'}(X;\tau)) \qquad \forall\, s,s'.
$$
In practice, let $q_\tau(x,s)$ be a base quantile regressor. One forms the group-$s$ marginal CDF $F_{q_\tau|s}(t) = \mathbb{P}(q_\tau(X,s) \leq t\,|\,S=s)$ and its generalized inverse (quantile function) $Q_{q_\tau|s}(u)$. Demographic Parity then becomes
$$
\forall y,\quad \mathbb{P}(Q_{s}(X;\tau) \leq y) = \mathbb{P}(Q_{s'}(X;\tau) \leq y).
$$
Thus, a quantile prediction rule is DP-fair if, across all groups, the marginal distribution of predicted quantiles coincides [2210.02015].

## 4. Pipeline: Fair Post-processing and Split Conformalization

The ECQR pipeline proceeds as follows [2210.02015]:

1. **Data Splitting**: Partition $n$ data points $(X_i, S_i, Y_i)$ into
   - Proper training set $I_1$
   - Calibration set $I_2$

2. **Base Quantile Regression**: Fit quantile regression models (possibly including $S$ as input)
   $$
   \hat q_{\alpha_{\text{lo}}}(x,s),\; \hat q_{\alpha_{\text{hi}}}(x,s).
   $$

3. **Functional Synchronization (Fair Quantile Post-processing)**:
   - For each group and each $\tau \in \{\alpha_\mathrm{lo}, \alpha_\mathrm{hi}\}$, estimate the groupwise CDF and invert/smooth to obtain an empirical quantile function.
   - Form the Wasserstein-2 (W$_2$) barycenter quantile:
     $$
     \hat Q_B(u) = \sum_{s'} \hat p_{s'}\, \hat Q_{q_\tau|s'}(u),
     $$
     where $\hat p_{s'}$ is the empirical weight for group $s'$.
   - For each prediction, map the base quantile $\hat q_\tau(x,s)$ through its group-specific CDF and into the barycenter quantile (the monotone transport step):
     $$
     \hat g_\tau(x,s) = \hat Q_B(\hat F_{q_\tau|s}(\hat q_\tau(x,s))).
     $$
   - This guarantees that the distribution of $\hat g_\tau(X,S)$ is identical across groups (exact DP).

4. **Split-Conformal Calibration**:
   - Using the calibration set, compute nonconformity scores
     $$
     E_i = \max\{\hat g_{\alpha_{\text{lo}}}(X_i, S_i) - Y_i,\; Y_i - \hat g_{\alpha_{\text{hi}}}(X_i, S_i)\}.
     $$
   - Set $q^*$ as the empirical $\lceil (1-\alpha)(|I_2|+1) \rceil$-th smallest among $\{E_i\}$.
   - The final prediction interval is
     $$
     C(x,s) = [\hat g_{\alpha_{\text{lo}}}(x,s) - q^*,\; \hat g_{\alpha_{\text{hi}}}(x,s) + q^*].
     $$

This procedure is model-agnostic in the quantile regression step and post-processes the learned quantile predictions to enforce fairness with negligible computational overhead [2210.02015].

## 5. Theoretical Guarantees

### Coverage
Under the assumption of exchangeable samples, split-conformalization ensures that
$$
\Pr\left\{Y_{n+1} \in C(X_{n+1}, S_{n+1})\right\} \geq 1-\alpha,
$$
with at most $1/(|I_2|+1)$ overcoverage when the conformity scores are non-tied. The construction is distribution-free and holds for arbitrary finite samples [2210.02015].

### Exact Demographic Parity
The functional synchronization step guarantees
$$
\mathsf{Law}(\hat g_{\tau}(X,S)|S=s) = \mathsf{Law}(\hat g_{\tau}(X,S)|S=s') \quad \forall s,s',
$$
where $\hat g_\tau$ denotes the barycenter-transported predictor at level $\tau$ [2210.02015].

### Optimality under Fairness Constraint
Given any base quantile predictor $q_\tau$, the barycenter-transported version $g_\tau$ uniquely minimizes the squared L$_2$ distance to $q_\tau$ among all Demographic Parity–fair functions:
$$
g_\tau = \arg\min_{g~\text{DP-fair}} \mathbb{E}[ (q_\tau(X,S) - g(X,S))^2 ].
$$
The minimized excess risk equals the barycenter objective $\min_\nu \sum_s p_s W_2^2(\nu_{q_\tau|s}, \nu)$, indicating that the W$_2$ barycenter synchronizes groupwise distributions with minimal distortion [2210.02015].

## 6. Practical Considerations and Empirical Performance

Empirical evaluations confirm that ECQR methods deliver marginal coverage near the nominal level (e.g., $1-\alpha=0.90$ within $\pm0.01$) and achieve group-level parity in the distribution of interval bounds [2210.02015]. The average interval length is generally competitive with or shorter than classical conformal approaches, especially in regimes with groupwise heteroscedasticity or imbalanced representation. The fairness-accuracy trade-off is precisely characterized: the barycenter transport achieves the smallest loss to the original quantiles among all fair solutions.

All standard quantile regression learners are supported, including linear methods, random forests, and neural networks. The additional computational burden is minimal—consisting primarily of one sort and basic post-processing per group—and the procedure supports fully nonparametric, high-dimensional settings.

## 7. Limitations and Directions for Extension

ECQR provides only marginal, not conditional, coverage:
$$
\Pr\{Y \in C(X,S) \mid X = x, S = s\}
$$
may differ across $x$ and $s$ except under restrictive assumptions. The method attains exact DP at the interval endpoints but does not address more stringent fairness notions, such as equalized coverage conditional on covariates or landscape-level risk parity. Extensions could incorporate groupwise or intersectional splits (stratified conformalization) and leverage Mondrian conformal prediction to further localize coverage control. The methodology is applicable to any setting where equitable treatment across sensitive groups and robust, interpretable uncertainty quantification are simultaneous requirements [2210.02015][1905.03222].

Source: https://www.emergentmind.com/topics/equity-conformalized-quantile-regression