M8-069M8: ML Systems, Engineering & ResearchModel Governance & Risk ManagementEasy
⚡Flashcard Drill➔Mastery:

Explain Primary Algorithmic Fairness Formulations and the Impossibility Theorem of Machine Learning Fairness

📐 Mathematical Definition
DP: Pr⁡[Y^=1∣A=0]=Pr⁡[Y^=1∣A=1];EO: Pr⁡[Y^=1∣Y,A]=Pr⁡[Y^=1∣Y,A′]\text{DP}:\ \Pr[\hat Y{=}1\mid A{=}0]=\Pr[\hat Y{=}1\mid A{=}1];\quad \text{EO}:\ \Pr[\hat Y{=}1\mid Y,A]=\Pr[\hat Y{=}1\mid Y,A']
⚡ One-Sentence Core Answer
Mathematical definitions of fairness—Demographic Parity, Equal Opportunity, Equalized Odds, and Predictive Rate Parity—cannot be simultaneously satisfied in the presence of unequal base rates (the Impossibility Theorem), requiring domain-specific objective selection and explicit trade-off governance.

📌 Key Takeaways

  • •
    Statistical definitions: Demographic Parity (P(Y^=1∣A=0)=P(Y^=1∣A=1)P(\hat{Y}=1 \mid A=0) = P(\hat{Y}=1 \mid A=1)), Equal Opportunity (equal true positive rates across groups), Equalized Odds (equal TPR and FPR across groups), and Calibration within Groups (equal positive predictive value).
  • •
    The Impossibility Theorem (Kleinberg, Chouldechova): If the base rates P(Y=1∣A=0)≠P(Y=1∣A=1)P(Y=1 \mid A=0) \ne P(Y=1 \mid A=1), then a non-trivial predictor cannot simultaneously achieve equalized odds and calibration within groups.
  • •
    Regulatory & domain alignment: Selecting metrics based on legal doctrine (e.g., EEOC 80% four-fifths rule for disparate impact vs. Equal Credit Opportunity Act) and documenting irreducible Pareto trade-offs.

📐 Mathematical Derivations

Mathematical Formalisms & The Impossibility Proof:

(1) Core Fairness Formulations:
Let A∈{0,1}A \in \{0, 1\} be a binary protected attribute, Y∈{0,1}Y \in \{0, 1\} the ground-truth label, and Y^∈{0,1}\hat{Y} \in \{0, 1\} the model prediction (R∈[0,1]R \in [0, 1] the predicted probability).
- 1. Demographic Parity (Statistical Parity):
P(Y^=1∣A=0)=P(Y^=1∣A=1)P(\hat{Y}=1 \mid A=0) = P(\hat{Y}=1 \mid A=1)
Acceptance rate is invariant to group membership. Completely ignores ground-truth YY.
- 2. Equal Opportunity (Hardt et al.):
P(Y^=1∣Y=1,A=0)=P(Y^=1∣Y=1,A=1)(Equal TPR / Recall)P(\hat{Y}=1 \mid Y=1, A=0) = P(\hat{Y}=1 \mid Y=1, A=1) \quad (\text{Equal TPR / Recall})
- 3. Equalized Odds:
∀y∈{0,1}:P(Y^=1∣Y=y,A=0)=P(Y^=1∣Y=y,A=1)(Equal TPR and FPR)\forall y \in \{0, 1\}: \quad P(\hat{Y}=1 \mid Y=y, A=0) = P(\hat{Y}=1 \mid Y=y, A=1) \quad (\text{Equal TPR and FPR})
Equivalently, prediction Y^\hat{Y} is conditionally independent of protected attribute AA given true label YY: Y^⊥A∣Y\hat{Y} \perp A \mid Y.
- 4. Predictive Rate Parity (Calibration by Group):
P(Y=1∣R=r,A=0)=P(Y=1∣R=r,A=1)=r∀r∈[0,1]P(Y=1 \mid R=r, A=0) = P(Y=1 \mid R=r, A=1) = r \quad \forall r \in [0, 1]

(2) The Impossibility Theorem (Kleinberg et al., Chouldechova 2017):
- Theorem: If the underlying base rates differ between groups, i.e., p0=P(Y=1∣A=0)≠P(Y=1∣A=1)=p1p_0 = P(Y=1 \mid A=0) \ne P(Y=1 \mid A=1) = p_1, and predictions are imperfect (AUC <1.0< 1.0), then Calibration within Groups and Equalized Odds are mathematically incompatible.
- Algebraic Mechanism: By Bayes' rule, the False Positive Rate can be expressed via positive predictive value (PPV vv) and base rate pp:
FPR=p1−p⋅1−vv⋅TPR\text{FPR} = \frac{p}{1-p} \cdot \frac{1-v}{v} \cdot \text{TPR}
If PPV (vv) is calibrated across groups and TPR is equalized, then whenever p0≠p1p_0 \ne p_1, the term p1−p\frac{p}{1-p} forces FPR0≠FPR1\text{FPR}_0 \ne \text{FPR}_1, directly violating Equalized Odds.

🏭 Production Trade-offs

In-Depth Analysis & Engineering Trade-offs: ① The Impossibility Theorem proves there is no universally fair model—attempting to satisfy all definitions simultaneously is mathematically impossible whenever underlying historical base rates diverge; teams must make an explicit, documented choice. ② Demographic Parity penalizes qualification-based selection when base rates differ—if group base rates differ, forcing equal positive rates forces either accepting lower-qualified candidates from one group or rejecting qualified candidates from another. ③ Calibration is essential for risk scoring, Equal Opportunity is essential for opportunity access—underwriting requires well-calibrated probabilities for pricing interest rates; employment screening prioritizes equal chance of selection for qualified applicants (Equal Opportunity). ④ Post-processing thresholds trade off global utility—setting group-specific thresholds τ0≠τ1\tau_0 \ne \tau_1 to enforce Equal Opportunity reduces global classification accuracy and may face legal restrictions under anti-discrimination statutes against explicit race/gender scoring. ⑤ Fairness interventions span three tiers—Pre-processing (re-weighting/re-sampling data), In-processing (adversarial debiasing loss penalties), and Post-processing (threshold tuning). ⑥ Interview takeaway—write down the mathematical definitions of DP, EO, and Calibration, sketch the algebraic proof of why p0≠p1p_0 \ne p_1 forces incompatibility, and explain how domain context dictates the optimal Pareto compromise.
⚠️ Common Interview Pitfalls
  • ✕
    Claiming a model satisfies all algorithmic fairness metrics simultaneously, displaying complete ignorance of Kleinberg's Impossibility Theorem.
  • ✕
    Enforcing Demographic Parity indiscriminately in high-stakes risk prediction where true base rates differ, distorting probability calibration and downstream utility.
  • ✕
    Applying group-specific post-processing thresholds in production environments without verifying whether disparate treatment statutes prohibit explicit group-conditioned decision rules.
🎯 Interviewer Follow-up Inquiries
  • ?
    Why does enforcing Equalized Odds via group-specific thresholding often reduce global overall accuracy?
  • ?
    How does the U.S. EEOC 80% (four-fifths) rule translate into an empirical Demographic Parity threshold?
  • ?
    Under what conditions can individual fairness (treating similar individuals similarly) be aligned with group fairness metrics?
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.
🎯 Drill This Card Now➔
📚

Associated Knowledge Base Guides & Mindmaps

Explore the comprehensive technical article, exam cards, and global architecture tree.

← PreviousM8-068: Explain the Purpose, Structural Architecture, and Governance Utility of Model Cards in Machine Learning📋Back to BankNext →M8-070: Explain the Lifecycle Taxonomy of Machine Learning Bias and the Three-Tier Mitigation Hierarchy
中文速览与面试要点

解释公平性度量的主要定义与不可能定理。

常见定义有人口统计均等(DP)、均等机会(EO)、均等赔率;多个定义通常不可同时满足(不可能定理),需按场景与法规选主指标并明确权衡。

核心要点

  • 数学机理: 主要公平性定义 ——设 A 为受保护属性,Y 为真实标签,Ŷ 为预测。(1) 人口统计均等(demographic parity / statistical parity) ——(a) 定义——Pr[Ŷ=1 | A=0] = Pr[Ŷ=1 | A=1);(b) 含义——各群体被预测为正的比例相同;(c) 不看真实标签 ——故若真实基率不同,则必然导致某群体被错误对待('公平'但可能牺牲精度);(d) 适用——正例率本身就是关注目标时。(2) 均等机会(equal opportunity) ——(a) 定义——Pr[Ŷ=1 | Y=1, A=0] = Pr[Ŷ=1 | Y=1, A=1);(b) 含义—— 真阳性率(TPR/召回)在各群体相同 ;(c) 关注——'该被选中的都该被选中'(如招聘中合格者应被录取);(d) 允许 FPR 不同。(3) 均等赔率(equalized odds) ——(a) 定义——Pr[Ŷ=1 | Y=y, A=0] = Pr[Ŷ=1 | Y=y, A=1) 对 y ∈ 0,1 都成立;(b) 含义—— TPR 与 FPR 都相同 (比 EO 更强);(c) 即预测在给定真实标签下与受保护属性独立。(4) 预测率均等(predictive rate parity) ——Pr[Y=1 | Ŷ=1, A] 相同(精确率相同); 与 EO/均等赔率冲突 (Chouldechova 的结果)。(5) 不可能定理(impossibility) ——(a) Chouldechova / Kleinberg 结果 ——若各群体的 基率(base rate)不同 ,则 校准(calibration)+ 均等赔率 不可同时满足(除非完美预测或随机);(b) 直觉——基率不同时,'校准'要求不同群体的风险分数含义一致,而'均等赔率'要求错误率一致,二者数学上冲突;(c) 结论 ——公平是 多目标权衡 ,不存在'对所有定义都公平'的模型。(6) 其他度量 ——(a) 平等化赔率 ;(b) 条件使用准确率 ;(c) 个人公平 (相似个体相似对待);(d) 反事实公平 (改变受保护属性不改变预测)。(7) 缓解方法 ——(a) 预处理 ——重加权、数据增强、去偏表示;(b) 处理中 ——正则项(在损失中加公平约束)、对抗训练;(c) 后处理 ——按群体调整阈值(满足 EO/均等赔率)。(8) 选择与治理 ——(a) 按场景选主指标 ——招聘看 EO、信贷看预测率均等(与法规相关);(b) 法规 ——如美国 EEOC 的 four-fifths(80%)规则(通过率比 ≥ 0.8);(c) 记录权衡 ——明确选了什么、牺牲了什么、为什么。 与其他问题的关系 ——(a) 与偏见来源与缓解;(b) 与高风险场景验证;(c) 与模型卡(披露分群指标);(d) 与合规(法规要求)。 度量 ——(a) 各定义下的群体差异(ΔDP、ΔEO、ΔTPR、ΔFPR);(b) 精度-公平权衡曲线;(c) 与法规阈值(80% 规则)的比较。
  • 深度剖析与工程权衡:① 不可能定理是核心 ——基率不同时公平定义冲突,不存在全公平的模型;面试中能指出这点是深度理解的标志。② DP 不看真实标签 ——基率不同时会导致错误对待。③ EO 关注 TPR、均等赔率关注 TPR+FPR ——强度递增。④ 校准与均等赔率冲突 ——需明确取舍。⑤ 后处理调阈值可满足 EO ——但会牺牲整体精度。⑥ 选主指标需结合场景与法规 ——并记录权衡。⑦ 面试要点 ——被问怎么保证公平,应给出' 明确主定义(DP/EO/均等赔率)+ 承认不可能定理 + 按场景与法规选择 + 记录权衡 + 分群评估与缓解 ';能指出基率不同导致冲突是深度理解的标志。
  • 人口统计均等(demographic parity)——各群体正例率相同,不看真实标签
  • 均等机会(equal opportunity)——各群体真阳性率(TPR)相同
  • 均等赔率(equalized odds)——各群体 TPR 与 FPR 都相同(更强)
  • 不可能定理——除退化情形外,多个公平定义不可同时满足(尤其基率不同时)
  • 选择依据——场景(谁受影响)、法规(如美国 EEOC 的 80% 规则)、以及明确记录的权衡

常见陷阱

  • 声称同时满足多个公平定义(忽略不可能定理)
  • 用人口统计均等却不看真实基率