-
-
Start of audit process, FairLens generates a data set with 600 population and 250 matched base cases
-
Part 1 of our simulated bank AI model, trained off of 3 real life data sets
-
Part 2 of our simulated bank AI model, upload the generated data set from FairLens to get approve/deny
-
Upload and Check portion of FairLens, upload the approved and denied data set from the bank AI model to get report
-
Audit results after uploading the approved and denied data set with statistics
-
Example of one of our test, "swap test", showing that neighborhood discrimination in the bank AI model is at high
-
Bias summary by factor
-
Start of FairLens automated report for human review
We believe people should not be treated differently because of where you're from, your race, or your age. Most people have, and today those decisions are increasingly made by AI that no one can see inside.
Lending is a clear example. Banks remove race from their models and assume that makes them fair. But a model can still learn to discriminate through stand-ins, like an applicant's neighborhood. For example, in 2023, City National Bank paid $31 million to settle allegations of redlining in Los Angeles County. We wanted a way to catch this kind of hidden bias before it reaches customers.
Fair Lens is an auditor for loan-approval AI. It treats the bank's model as a black box, it only needs the model's decisions, never its code.
- Generates test applicants from real 2018 LA mortgage data (HMDA): a realistic population, plus matched twins who are identical except for one factor (neighborhood, race, ethnicity, sex, or age).
- The bank's model decides: It only receives what a bank would see; demographics stay with the auditor.
- Fair Lens audits the decisions:
- Group fairness: the approval ratio between the worst- and best-treated groups, flagged below the four-fifths rule:
- Swap test: how often a twin's decision flips, and how much the same applicant's approval chance moves when only one factor changes, with a paired t-test so we only flag clear effects:
- Proxy detection: how well each model input alone predicts race, sex, or age (AUC; 0.5 = no signal, 1.0 = perfect stand-in).
- Consistency: whether identical applications ever get different answers.
- Explains the results: a verdict (Fair / Needs Review / Unfair), the evidence behind each flag, and a plain-English report. Every run is saved with its date and time for comparison.
How we built it:
- Part 1, the simulated bank: a scikit-learn random forest trained on public HMDA mortgage decisions, run in Google Colab with a simple point-and-click app. For the demo it has an optional, disclosed neighborhood penalty, like a fire drill, so we can prove the auditor catches a known bias.
- Part 2, the auditor: a Python backend (pandas, scikit-learn, SciPy) that we planned and built with IBM Bob, using Plan mode for the architecture and Orchestrator/Code modes for the modules and tests cases, plus the user interface itself.
- The two parts only talk through CSV files moved by hand, which keeps the auditor independent of the bank.
- We collaborated through GitHub.
Challenges:
- Messy data: HMDA stores ranges like
"30%-<36%"and"Exempt", has no credit scores, and single-bank files had very few denials to learn from. - Our synthetic data stored income in dollars while real HMDA uses thousands, so the model briefly approved 99.9% of applicants.
- Data leakage: columns like interest rate only exist after a loan is approved, so we had to block them from the model.
- Bias that hides in the averages: with ~93% approval, few decisions flip even when the bank clearly penalizes a neighborhood. We added the probability-shift measure so a real penalty isn't missed.
- Avoiding false alarms: we had to make sure the auditor reports zero effect when the bank couldn't see a change, and catches when identical applications get different answers.
- Keeping files matched: we added run tags to applicant IDs and automatic selection of the newest matching results file, so an old file can't be audited by mistake.
We learned that:
- Removing race from a model doesn't make it fair; stand-ins like location carry the same information.
- Overall statistics can look fine while individual applicants are treated differently.
- Known-biased and known-fair models were essential to trust our results so we have a comparison.
- Responsible claims matter: a gap in public data is a disparity worth reviewing, not proof of discrimination.
Sustainability of our project:
- Train on all LA County lenders and richer data to make the simulated bank more realistic, then we can move to cities, states, and the country.
- Extend the same test to other types of loans like auto, personal, student, and business. Other areas we can use this in is hiring, college admissions, insurance, and tenant screening.
- Map results to emerging rules, like NYC's bias audits for hiring AI and the EU AI Act's high-risk categories, and pilot Fair Lens with a lender or regulator.
Log in or sign up for Devpost to join the conversation.