Inspiration
Until 2021, the kidney formula most US labs used multiplied every Black patient's result by 1.159, making their kidneys look healthier than they were. From 2023 to mid-2025, the US transplant network gave back waiting time to 21,119 Black candidates, a median of 1.7 years each.
The formula lasted over a decade because its overall accuracy looked fine: the harm only shows when you check each group separately. Clinical AI has the same blind spot, so I built a tool that checks every group and explains what it finds in plain English.
What it does
EquityPanel audits a clinical risk model and produces a live report and an interactive demo:
- Who the model misses, per group (race, sex, age), with 95% confidence intervals: $$ \text{miss rate} = \frac{\text{readmitted patients not flagged}}{\text{all readmitted patients}} $$
- Small groups are flagged as uncertain, not dropped.
- An eGFR module shows who crosses clinical lines when race is removed from the kidney formula.
- A plain-English summary by Claude, where code checks that every number matches a computed result.
Who it helps: hospital quality and equity teams checking the models they build or buy.
What it found: on real public hospital data (20,997 patients), a readmission model misses 87% of readmitted under-50s versus 74.5% of 70–79-year-olds (gap 95% CI 7.1 to 18.1 points). On synthetic patients, the race-free kidney formula moves 29 more Black patients to the transplant line.
What's new: to my knowledge, the first open-source tool that puts the race-based kidney formula change in the same report as model fairness metrics, with an AI summary checked number by number.
How I built it
- Python (pandas, numpy, scikit-learn) with stratified bootstrap confidence intervals; the audit itself needs only pandas and numpy.
- The kidney equations reproduce all 8 of the National Kidney Foundation's official test cases.
- Claude only sees aggregate numbers, each with an ID. My code extracts every number it writes and rejects any that doesn't match a cited fact; the model gets one retry.
- Privacy: groups under 11 patients are suppressed before anything is sent, and nothing is sent without confirmation.
- 557 tests on Windows and Linux, with the report on GitHub Pages and the demo on Streamlit.
Challenges I ran into
- Keeping the AI honest. Claude once wrote "0.5 is chance": true, but not a number I computed. The checker had to handle rounding, signs and thousands separators without letting anything invented through.
- Small groups. Dropping them would hide the patients most at risk, so I flag them and show the uncertainty instead.
Accomplishments that I'm proud of
- A working path from public data to model, audit, checked summary and live report.
- A live number check anyone can try in the demo.
- A legal and privacy review turned into concrete safeguards.
What I learned
- How to train a logistic regression risk model and audit its performance on each patient demographic.
- An overall accuracy number can hide a group that is missed almost every time.
- To keep an LLM honest, check its output in code, not just in the prompt.
What's next for EquityPanel
- Hospital pilot: one quality team runs it locally on its own model, so patient data never leaves the building.
- Groups within groups, such as Black women under 50.
- Audit every retrain, so new gaps are caught before deployment.
Built during ForgeHacks
Before the event, the repo had only a scaffold (packaging, tooling, schema checks, two data loaders, CI), marked by the pre-hackathon tag in commit history. Everything else was built during ForgeHacks: see every change.
References and credits
Data
- Readmission data: Clore, Cios, DeShazo & Strack (2014), Diabetes 130-US Hospitals for Years 1999–2008, UCI Machine Learning Repository, doi:10.24432/C5230J, CC BY 4.0 (results aggregated and modified). Related paper: Strack et al., BioMed Research International 2014, doi:10.1155/2014/781670.
- Synthetic patients: Synthea (The MITRE Corporation, Apache 2.0) sample data; Walonoski et al., JAMIA 2018, doi:10.1093/jamia/ocx079.
Research and articles
- CKD-EPI 2009 equation (the 1.159 race coefficient): Levey et al., Annals of Internal Medicine 2009, doi:10.7326/0003-4819-150-9-200905050-00006.
- Race-free CKD-EPI 2021 equation: Inker et al., NEJM 2021, doi:10.1056/NEJMoa2102953.
- National Kidney Foundation test cases for the 2021 equation, used to verify the implementation.
- 21,119 candidates and the 1.7-year median: Khazanchi et al., JAMA Internal Medicine 2026, as reported by Healio.
AI models and APIs
- Claude via the Anthropic API writes the checked plain-English summary.
- Development was assisted by Claude Code, an AI coding tool (allowed by the ForgeHacks rules).
Open-source libraries: pandas, NumPy, scikit-learn, Matplotlib, Jinja, Streamlit, pytest, Ruff. Hosting: GitHub Pages and Streamlit Community Cloud.
Independent project, not affiliated with or endorsed by any organization above.
Research and education tool, not a clinical tool. The demo uses only public and synthetic data. MIT License.
Log in or sign up for Devpost to join the conversation.