Lion Cipher Lab
Test an AI model for bias with Fairlearn
- AI Security
- Beginner
- ~40 min
- Free · no account required
Why it matters
Models increasingly make or shape decisions about people — who gets flagged, screened, approved, or shown something — and a model that looks accurate overall can still fail one group badly, because the single accuracy number hides that. The skill that matters is not training a model but interrogating it: breaking its performance apart by group and reading whether it treats people evenly. Fairlearn is a free, open-source tool built for exactly this, and doing the measurement yourself — rather than trusting a vendor's claim that a system is fair — is the difference between assuming fairness and…
What you'll learn
- measuring fairness in an ML model
- disaggregating metrics by group with MetricFrame
- reading a disparity metric (demographic parity difference)
- knowing demographic parity and equalized odds can conflict
- understanding the limits of any single fairness number
Steps in this lab
- Why a model can be biased in the first place
- Two fairness metrics — and why they can disagree
- Install Fairlearn
- Load a sample dataset and train a quick model
- Evaluate the model by group with MetricFrame
- Read a disparity metric: demographic parity difference
- The honest limits — no single number is "fair"
- What to carry out of this