Inferensys

Glossary

Demographic Parity

A group fairness metric requiring that a model's positive prediction rate is equal across different demographic groups, often evaluated in a federated context to ensure equitable healthcare outcomes.
ML engineer managing model training cluster on laptop, GPU utilization visible, technical deep learning setup.
FAIRNESS METRIC

What is Demographic Parity?

Demographic parity is a group fairness criterion requiring a model's positive prediction rate to be statistically equal across all protected demographic subgroups, ensuring no group is disproportionately favored or disadvantaged by an algorithmic decision.

Demographic parity, also known as statistical parity, is satisfied when the probability of a model assigning a positive outcome is identical regardless of an individual's membership in a sensitive attribute group, such as race or gender. Formally, this requires that P(ŷ=1 | A=a) = P(ŷ=1 | A=b) for all groups a and b. In a federated learning context, validating this constraint demands secure, decentralized computation of prediction rates across institutional silos without centralizing patient-level demographic data.

While foundational, demographic parity has a critical limitation: it ignores the ground-truth base rates of outcomes across groups. If the actual prevalence of a disease differs between populations, enforcing equal prediction rates may require the model to make systematic errors, such as over-diagnosing one group. Consequently, stricter metrics like equalized odds are often preferred in clinical AI, and federated bias detection frameworks must audit for both parity and calibration to ensure equitable healthcare outcomes.

FAIRNESS METRIC

Key Characteristics of Demographic Parity

The defining statistical properties and operational constraints that make demographic parity a foundational, albeit debated, group fairness criterion in distributed clinical model evaluation.

01

Independence from Ground Truth

Demographic parity is a statistical independence metric, meaning it evaluates the model's prediction rate alone, without requiring access to the true labels. This makes it uniquely suited for federated model evaluation where ground truth validation data may be siloed or unavailable. A model satisfies demographic parity if the probability of a positive prediction is identical across all protected groups, formally expressed as:

  • Formula: P(ŷ=1 | A=a) = P(ŷ=1 | A=b) for all groups a, b
  • Key Implication: The metric ignores whether predictions are correct, focusing solely on outcome distribution
  • Federated Advantage: Can be computed securely by aggregating only prediction counts and group membership tallies, not individual labels
Label-Free
Ground Truth Required
02

The Disparate Impact Ratio

The standard operationalization of demographic parity is the Disparate Impact Ratio (DIR), which quantifies the relative difference in positive prediction rates between a privileged and unprivileged group. In a federated context, this is computed by securely summing the positive prediction counts per group across all nodes.

  • Calculation: DIR = P(ŷ=1 | unprivileged) / P(ŷ=1 | privileged)
  • Threshold: A model is typically considered fair if 0.8 ≤ DIR ≤ 1.25, following the EEOC's 80% rule
  • Federated Aggregation: Each institution computes local positive rates per group; the global DIR is derived from the sum of numerators and denominators, never exposing patient-level predictions
0.8–1.25
Acceptable DIR Range
03

Tension with Predictive Accuracy

A critical limitation of demographic parity is its inherent conflict with calibrated risk prediction. When base rates of a condition differ across demographic groups due to genuine epidemiological factors, enforcing equal positive prediction rates forces the model to:

  • Over-predict the condition in the group with a lower natural prevalence
  • Under-predict the condition in the group with a higher natural prevalence
  • Violate calibration: The predicted probability no longer reflects the true likelihood of the outcome

This tension is particularly acute in federated healthcare settings where disease prevalence varies significantly across geographic or socioeconomic client nodes.

04

Federated Computation via Secure Aggregation

Computing demographic parity across a decentralized network requires a privacy-preserving aggregation protocol to avoid exposing per-institution group statistics. The standard approach uses Secure Aggregation (SecAgg) to sum the following atomic counts from each client:

  • Count of positive predictions for each demographic group
  • Total count of individuals in each demographic group
  • No raw predictions or labels are ever transmitted

The central server then divides the aggregated sums to compute the global positive prediction rate per group. This ensures that no single institution's demographic distribution is revealed, satisfying HIPAA minimum necessary requirements.

Zero
Raw Predictions Exposed
05

Conditional Demographic Parity

To address the limitations of standard demographic parity, a refined variant called Conditional Demographic Parity incorporates legitimate risk factors. This metric requires equal positive prediction rates across groups only after controlling for a set of resolving variables—features that justify differential treatment.

  • Example: In a cardiac risk model, age and smoking status may be legitimate resolving variables; gender and race are not
  • Federated Implementation: Requires stratified computation of positive rates within each resolving variable stratum, then aggregation across strata
  • Regulatory Alignment: More closely aligns with EEOC guidance that permits business necessity defenses for statistical disparities
06

Auditability and Regulatory Reporting

Demographic parity serves as a primary audit metric for demonstrating compliance with anti-discrimination regulations in automated clinical decision systems. In a federated evaluation framework, the audit trail must include:

  • Cryptographic proof that only aggregated counts were shared, not individual records
  • Versioned snapshots of the demographic parity calculation at each evaluation round
  • Threshold breach alerts when the Disparate Impact Ratio falls outside the acceptable range

This supports FDA SaMD and EU AI Act requirements for continuous bias monitoring of high-risk medical AI systems deployed across multiple institutions.

FAIRNESS AUDIT

Frequently Asked Questions

Common questions about evaluating demographic parity in federated healthcare AI systems, where patient data cannot be centralized for bias testing.

Demographic parity is a group fairness metric requiring that a model's positive prediction rate—the proportion of individuals predicted to have a positive outcome—is equal across different protected demographic groups (e.g., race, gender, age). Mathematically, it is satisfied when P(ŷ=1 | A=a) = P(ŷ=1 | A=b) for any two groups a and b, where ŷ is the model's prediction and A is the protected attribute.

In a federated context, calculating demographic parity requires a federated confusion matrix approach. Each institution computes its local positive prediction rate per demographic group and securely shares only the aggregate counts (true positives, false positives, etc.) with a central aggregator. The global parity difference is then computed as:

code
Demographic Parity Difference = |P(ŷ=1 | A=group_a) - P(ŷ=1 | A=group_b)|

A value of 0 indicates perfect parity, while values approaching 1 indicate severe disparity. This metric is often evaluated alongside equalized odds and federated bias detection frameworks to provide a comprehensive fairness audit without exposing individual patient records.

FAIRNESS METRIC COMPARISON

Demographic Parity vs. Other Fairness Metrics

A comparison of group fairness criteria evaluated in federated contexts to audit model bias across protected demographic groups without centralizing patient data.

FeatureDemographic ParityEqualized OddsEqual Opportunity

Definition

Equal positive prediction rate across all groups

Equal TPR and FPR across all groups

Equal TPR across all groups

Mathematical Condition

P(ŷ=1|A=a) = P(ŷ=1|A=b)

P(ŷ=1|Y=y,A=a) = P(ŷ=1|Y=y,A=b) for y∈{0,1}

P(ŷ=1|Y=1,A=a) = P(ŷ=1|Y=1,A=b)

Accounts for Ground Truth

Permits Perfect Predictor

Federated Computation Method

Federated confusion matrix aggregation

Federated confusion matrix aggregation

Federated confusion matrix aggregation

Sensitive to Class Imbalance

Typical Use Case

Loan approval, hiring pipelines

Recidivism prediction, clinical diagnosis

Disease screening programs

Regulatory Alignment

EU AI Act high-risk systems

US EEOC algorithmic fairness guidance

Healthcare equity audits

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.