The demographic parity risk of a classifier is a measure of the disparity in the probability of positive classification across different demographic groups. It quantifies the extent to which the classifier's predictions are independent of sensitive attributes (e.g., race, gender, age), which is a key requirement for fairness in machine learning.
Formal Definition:
Let:
- ( Y ) be the true label (binary or multiclass).
- ( \hat{Y} ) be the predicted label from the classifier.
- ( A ) be a sensitive attribute (e.g., race, gender) with possible values ( a \in \mathcal{A} ).
- ( P(\hat{Y} = 1 | A = a) ) be the probability of a positive prediction for group ( A = a ).
Demographic Parity (DP) is satisfied if:
[
P(\hat{Y} = 1 | A = a) = P(\hat{Y} = 1) \quad \forall a \in \mathcal{A}.
]
This means the classifier's positive prediction rate is the same across all demographic groups.
The demographic parity risk (or demographic parity violation) measures the deviation from this ideal. A common way to quantify it is using the difference in positive prediction rates between groups:
[
\text{DP Risk} = \max_{a, a' \in \mathcal{A}} \left| P(\hat{Y} = 1 | A = a) - P(\hat{Y} = 1 | A = a') \right|.
]
Alternatively, it can be defined as the variance or standard deviation of ( P(\hat{Y} = 1 | A = a) ) across groups:
[
\text{DP Risk} = \text{Var}_{a \in \mathcal{A}} \left( P(\hat{Y} = 1 | A = a) \right).
]
Interpretation:
- A DP Risk of 0 means perfect demographic parity (no disparity).
- A higher DP Risk indicates greater unfairness in predictions across groups.
Relation to Other Fairness Metrics:
Demographic parity is a group fairness criterion and is distinct from other fairness notions like:
- Equalized Odds: Requires independence between predictions and sensitive attributes conditional on the true label.
- Equal Opportunity: Focuses on true positive rates across groups.
Would you like a discussion on how to mitigate demographic parity risk in practice?