Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 21 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,9 @@ Three of the seven audits are healthcare or welfare-system models. Each demonstr
- [Miscalibration in Clinical Risk Scores Across Groups](explainers/clinical-score-miscalibration.md) - why a risk score well-calibrated on average can still mean a different real-world risk depending on the patient's group
- [Missing Data as Bias in Electronic Health Records](explainers/missing-data-bias-ehr.md) - why unequal access to care turns into unequal missingness, and how naive imputation makes it worse
- [Why Medical Imaging Models Fail on Underrepresented Groups](explainers/medical-imaging-representation-gaps.md) - representation gaps and shortcut learning on device/site artifacts in dermatology, radiology, and retinal imaging models

**On the roadmap (the freeze-safe focus while new audits are on hold):**

- Race Correction in Clinical Algorithms - why "race-adjusted" formulas (eGFR, spirometry, VBAC) bake bias into the math itself
- The Obermeyer Case: When Cost Becomes a Proxy for Health Need
- Underdiagnosis Bias: When the Label Itself Is Sicker for One Group
- [Underdiagnosis Bias in Healthcare AI](explainers/underdiagnosis-bias.md) - why historical gaps in diagnostic testing cause ground-truth labels to under-count active disease in underserved groups
- [Race Correction in Clinical Algorithms](explainers/race-correction-clinical-algorithms.md) - why race-adjusted clinical formulas (eGFR, spirometry, VBAC) bake bias into the math and delay care for minority patients
- [The Obermeyer Case: When Cost Becomes a Proxy for Health Need](explainers/obermeyer-cost-proxy.md) - why predicting healthcare spending instead of illness systematically under-refers sicker Black patients

This directly connects Fair Code to the broader responsible AI in healthcare conversation - where CardioAI, clinical risk scores, and insurance triage tools are increasingly making consequential decisions without demographic audits.

Expand Down Expand Up @@ -226,10 +223,20 @@ Fair-Code/
│ ├── model-drift.md
│ ├── selection-bias.md
│ ├── automation-bias.md
│ ├── roc-curve-auc.md
│ ├── class-imbalance.md
│ ├── bias-variance-tradeoff.md
│ ├── confusion-matrix.md
│ └── protected-attribute.md
│ ├── protected-attribute.md
│ ├── accuracy-not-enough-healthcare-ai.md
│ ├── clinical-score-miscalibration.md
│ ├── missing-data-bias-ehr.md
│ ├── medical-imaging-representation-gaps.md
│ ├── obermeyer-cost-proxy.md
│ ├── underdiagnosis-bias.md
│ ├── race-correction-clinical-algorithms.md
│ ├── reject-inference.md
│ └── base-rate-fallacy.md
├── CHANGELOG.md
├── CITATION.cff
Expand Down Expand Up @@ -701,10 +708,10 @@ features = [

## Explainers

39 short, plain-language write-ups of individual fairness concepts, each with runnable detection code. The healthcare-focused ones are called out above in [Healthcare AI Bias Focus](#healthcare-ai-bias-focus).
44 short, plain-language write-ups of individual fairness concepts, each with runnable detection code. The healthcare-focused ones are called out above in [Healthcare AI Bias Focus](#healthcare-ai-bias-focus).

<details>
<summary><strong>Show all 39 explainers →</strong></summary>
<summary><strong>Show all 44 explainers →</strong></summary>

| Explainer | What it covers |
|-----------|----------------|
Expand Down Expand Up @@ -737,6 +744,7 @@ features = [
| [What Is Unsupervised Learning?](explainers/unsupervised-learning.md) | How k-means clustering on the Benefits Denial dataset recovers a strong sex split and a real race split without sex, race, or national origin ever being part of the feature set |
| [What Is Model Drift?](explainers/model-drift.md) | Why a fairness gap measured once at launch isn't guaranteed to hold months later, and how rolling-window monitoring (PSI, Page-Hinkley) catches the drift a single audit snapshot can miss |
| [What Is Selection Bias?](explainers/selection-bias.md) | Why the process that decides who enters a dataset at all can bias a model before any protected attribute or proxy is even considered - and why the German Credit Lending dataset's 700/300 split contains zero rejected applicants |
| [What Is Reject Inference?](explainers/reject-inference.md) | Why models trained only on approved applicants miss the risk of everyone else - sample selection bias, missing ground-truth outcomes, and IPW/parceling corrections |
| [What Is Automation Bias?](explainers/automation-bias.md) | Why judges, recruiters, and clinicians follow AI scores even when they know the scores are biased - and how automation bias amplifies disparities beyond what the model alone produces |
| [What Is the Bias-Variance Trade-off?](explainers/bias-variance-tradeoff.md) | Why an overfit model can memorize the majority and fail the minority |
| [What Is Class Imbalance?](explainers/class-imbalance.md) | Why skewed positive/negative ratios wreck naive accuracy and disproportionately hurt minority subgroups |
Expand All @@ -747,6 +755,10 @@ features = [
| [Miscalibration in Clinical Risk Scores Across Groups](explainers/clinical-score-miscalibration.md) | Why a clinical risk score well-calibrated on average can still mean a different real-world risk depending on the patient's group, and why small subgroups make that hardest to verify at the score that matters most |
| [Missing Data as Bias in Electronic Health Records](explainers/missing-data-bias-ehr.md) | Why unequal access to care turns into unequal missingness in EHR data, and why a model reading a blank field as "nothing notable" is really reading "less-observed" |
| [Why Medical Imaging Models Fail on Underrepresented Groups](explainers/medical-imaging-representation-gaps.md) | Why dermatology, radiology, and retinal models underperform on groups thin in the training data, and the more insidious failure mode: shortcut learning on a scanner or hospital site instead of the pathology |
| [Underdiagnosis Bias in Healthcare AI](explainers/underdiagnosis-bias.md) | Why historical gaps in diagnostic testing cause ground-truth labels to under-count active disease in underserved groups - training models to systematically under-flag those exact patients |
| [Race Correction in Clinical Algorithms](explainers/race-correction-clinical-algorithms.md) | Why race-adjusted clinical formulas (eGFR, spirometry, VBAC) bake bias into the math and delay care for minority patients |
| [The Obermeyer Case: When Cost Becomes a Proxy for Health Need](explainers/obermeyer-cost-proxy.md) | Why predicting healthcare spending instead of illness systematically under-refers sicker Black patients - target proxy bias, spending disparities, and care re-allocation |
| [What Is the Base Rate Fallacy?](explainers/base-rate-fallacy.md) | Why ignoring background prevalence makes screening tools mostly wrong, and why differing base rates across demographic groups drive fairness metric conflicts |

</details>

Expand Down
55 changes: 55 additions & 0 deletions assets/explainers-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,5 +381,60 @@ window.FAIR_CODE_EXPLAINERS = [
"data",
"detection"
]
},
{
"slug": "obermeyer-cost-proxy",
"title": "The Obermeyer Case: When Cost Becomes a Proxy for Health Need",
"subtitle": "How predicting healthcare spending instead of illness systematically under-refers sicker Black patients.",
"summary": "Explore the canonical case study of Obermeyer et al. (2019): why using healthcare cost as a target variable creates racial bias, how historical spending disparities corrupt algorithm predictions, and how to audit models for proxy label bias using the Healthcare Readmission audit.",
"tags": [
"data",
"detection",
"metrics"
]
},
{
"slug": "underdiagnosis-bias",
"title": "Underdiagnosis Bias in Healthcare AI",
"subtitle": "When the label itself is sicker for one group.",
"summary": "Learn how historical gaps in diagnostic testing and healthcare access cause ground-truth labels to under-count active disease in underserved groups - training models to systematically under-flag those exact patients. Covers the gap between true disease state and recorded EHR labels, why standard audits fail to catch unobserved false negatives, and biomarker-to-label consistency detection code.",
"tags": [
"data",
"detection",
"metrics"
]
},
{
"slug": "race-correction-clinical-algorithms",
"title": "Race Correction in Clinical Algorithms",
"subtitle": "Why race-adjusted clinical formulas bake bias directly into the math.",
"summary": "Learn how race coefficients in formulas like eGFR kidney function, spirometry lung reference values, and the VBAC calculator delay care for Black and minority patients, why removing them is complex, and how to detect explicit race multipliers in clinical code.",
"tags": [
"data",
"detection",
"metrics"
]
},
{
"slug": "reject-inference",
"title": "What Is Reject Inference?",
"subtitle": "Why models trained only on approved applicants miss the risk of everyone else.",
"summary": "Learn how missing ground-truth outcomes for rejected applicants create sample selection bias in lending, hiring, and insurance models, and how correction techniques like IPW, parceling, and Heckman models attempt to fix it. Anchored to German Credit Lending with Python simulation and correction code.",
"tags": [
"data",
"detection",
"metrics"
]
},
{
"slug": "base-rate-fallacy",
"title": "What Is the Base Rate Fallacy?",
"subtitle": "Why ignoring background prevalence makes screening tools mostly wrong - and drives fairness metric conflicts.",
"summary": "Learn how ignoring base rates leads to high false-alarm rates in screening algorithms, and why differing base rates across demographic groups make predictive parity and equalized odds mathematically incompatible. Covers Bayes' Theorem, PPV under low prevalence, the Chouldechova trade-off identity, and COMPAS audit detection code.",
"tags": [
"metrics",
"detection",
"explainability"
]
}
];
37 changes: 37 additions & 0 deletions assets/explainers-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,5 +271,42 @@
"subtitle": "A model trained mostly on one group's images has barely seen the others.",
"summary": "Learn why dermatology, radiology, and retinal imaging models underperform on groups thin in the training data, and the more insidious failure mode of shortcut learning, where a model keys off a confounder like scanner type or hospital site instead of the pathology. Covers the difference between a representation gap and shortcut confounding, why internal validation cannot rule out either, and per-group AUC plus proxy-detection code. Anchored to two documented real-world cases: Zech et al. (2018)'s hospital-site shortcut in pneumonia detection and Larrazabal et al. (2020)'s sex-imbalance study in chest X-ray diagnosis.",
"tags": ["data", "detection"]
},
{
"slug": "obermeyer-cost-proxy",
"title": "The Obermeyer Case: When Cost Becomes a Proxy for Health Need",
"subtitle": "How predicting healthcare spending instead of illness systematically under-refers sicker Black patients.",
"summary": "Explore the canonical case study of Obermeyer et al. (2019): why using healthcare cost as a target variable creates racial bias, how historical spending disparities corrupt algorithm predictions, and how to audit models for proxy label bias using the Healthcare Readmission audit.",
"tags": ["data", "detection", "metrics"]
},
{
"slug": "underdiagnosis-bias",
"title": "Underdiagnosis Bias in Healthcare AI",
"subtitle": "When the label itself is sicker for one group.",
"summary": "Learn how historical gaps in diagnostic testing and healthcare access cause ground-truth labels to under-count active disease in underserved groups - training models to systematically under-flag those exact patients. Covers the gap between true disease state and recorded EHR labels, why standard audits fail to catch unobserved false negatives, and biomarker-to-label consistency detection code.",
"tags": ["data", "detection", "metrics"]
},
{
"slug": "race-correction-clinical-algorithms",
"title": "Race Correction in Clinical Algorithms",
"subtitle": "Why race-adjusted clinical formulas bake bias directly into the math.",
"summary": "Learn how race coefficients in formulas like eGFR kidney function, spirometry lung reference values, and the VBAC calculator delay care for Black and minority patients, why removing them is complex, and how to detect explicit race multipliers in clinical code.",
"tags": ["data", "detection", "metrics"]
},
{
"slug": "reject-inference",
"title": "What Is Reject Inference?",
"subtitle": "Why models trained only on approved applicants miss the risk of everyone else.",
"summary": "Learn how missing ground-truth outcomes for rejected applicants create sample selection bias in lending, hiring, and insurance models, and how correction techniques like IPW, parceling, and Heckman models attempt to fix it. Anchored to German Credit Lending with Python simulation and correction code.",
"tags": ["data", "detection", "metrics"]
},
{
"slug": "base-rate-fallacy",
"title": "What Is the Base Rate Fallacy?",
"subtitle": "Why ignoring background prevalence makes screening tools mostly wrong - and drives fairness metric conflicts.",
"summary": "Learn how ignoring base rates leads to high false-alarm rates in screening algorithms, and why differing base rates across demographic groups make predictive parity and equalized odds mathematically incompatible. Covers Bayes' Theorem, PPV under low prevalence, the Chouldechova trade-off identity, and COMPAS audit detection code.",
"tags": ["metrics", "detection", "explainability"]
}
]


Binary file added assets/og-light/base-rate-fallacy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/og-light/obermeyer-cost-proxy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/og-light/reject-inference.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/og-light/underdiagnosis-bias.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/og/base-rate-fallacy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/og/obermeyer-cost-proxy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/og/reject-inference.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/og/underdiagnosis-bias.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading