← Back to Curriculum
Responsible AI·30 min·Beginner
⚖️

Ethics & Fairness

Bias, privacy, and responsible use

AI reflects the data and choices we feed it. Here we confront bias, respect privacy, and discuss what it means to deploy AI responsibly.

Before We Begin

What we are learning today

A facial recognition system that works well on some skin tones but fails on others. A hiring tool that penalizes resumes with women's colleges. A language model that amplifies stereotypes. These are not hypothetical—they are real headlines. This lesson examines where bias enters the ML pipeline (data collection, labeling, feature choice, evaluation), explores privacy concerns from data collection to model outputs, and discusses misuse scenarios. The goal is not to scare students away from AI but to empower them to build it better.

How this lesson fits

A model that works is not enough—it also has to be understandable, fair, and ready for the real world. This module covers the human side of AI: explaining predictions, confronting bias, and deploying models responsibly.

The big question

How do we make sure an AI system is not just accurate but also transparent, fair, and safe to deploy?

Explain a model's prediction using interpretability toolsIdentify sources of bias and propose mitigation strategiesDescribe the basics of serving, monitoring, and handling drift in production

Why You Should Care

AI systems increasingly affect who gets hired, who gets a loan, who gets surveilled, and who receives medical care. Students entering this field need ethical muscle memory—the automatic habit of asking "who might this hurt?" before deploying a model.

Where this is used today

  • Facial recognition audits revealing racial performance gaps (Gender Shades study)
  • Differential privacy in Apple and Google data collection
  • Content moderation: balancing free speech with harmful content removal

Think of it like this

Think of a mirror. A mirror does not lie, but it does not show you everything either—it reflects whatever is placed in front of it, including the flaws. AI models are mirrors of their training data. If the data carries bias, the model reflects it, often at scale. Our job is to recognize the distortion and correct it.

Easy mistake to make

Removing protected attributes like race or gender from the data does not eliminate bias. Correlated features (zip code, school name) can serve as proxies, and bias can hide in the structure of the data itself.

By the end, you should be able to say:

  • Trace how bias enters at data collection, labeling, and evaluation stages
  • Explain differential privacy at an intuitive level
  • Identify at least three categories of potential AI misuse
  • Propose concrete fairness checks for a model before deployment

Think about this first

If a model is trained only on data from one city, what might go wrong when it is deployed in a different country? List as many issues as you can.

Words we will keep using

biasfairnessdifferential privacyconsentaccountabilitydisparate impactaudit

AI Is a Mirror

A facial recognition system that works well on some skin tones but fails on others. A hiring tool that penalizes resumes with women's colleges. A language model that amplifies stereotypes. These are not hypothetical \u2014 they are real headlines. AI reflects the data and choices we feed it, including the flaws.

Data BiasTraining data underrepresents or misrepresents certain groups.
Labeling BiasHuman annotators encode their own stereotypes into labels.
Deployment BiasA model trained in one context is deployed in another where it breaks.

Interactive: Loan Approval Fairness

Two groups with similar qualification rates apply for loans. Adjust the bias slider to introduce systematic disadvantage for Group B. Watch the fairness metrics change.

\u25a0 Approval Rate\u25a0 TPR (qualified approved)
Disparate Impact: 0.874

✓ Passes the 80% rule

Equalized Odds Gap: 0.033

✓ TPR is similar across groups

No bias \u2014 both groups have similar approval rates.

Fairness Metrics

Demographic Parity

Approval rates should be equal across groups. Simple but may conflict with base rate differences.

Rule of thumb: P(approveA)/P(approveB)0.8P(\text{approve}|A) / P(\text{approve}|B) \geq 0.8

Equalized Odds

True positive AND false positive rates should be equal across groups. Stricter, more fair.

Predictive Parity

Precision should be equal across groups. The model is equally "right" for everyone.

No Silver Bullet

It is mathematically impossible to satisfy all fairness criteria simultaneously when base rates differ. Choose the metric that fits your context.

Removing Protected Attributes Isn't Enough

Simply dropping race or gender from the data does not eliminate bias. Correlated features \u2014 zip code, school name, name spelling \u2014 act as proxies. The model can still infer the protected attribute and discriminate through the back door.

# Proxy variables
zip_code \u2192 correlates with race
name \u2192 correlates with gender
school \u2192 correlates with income/class
# Removing "race" doesn't help if zip_code still encodes it

Differential Privacy

Differential privacy adds calibrated noise to data or model updates so that no single individual's data can be reverse-engineered from the output. It is the mathematical guarantee that "your participation doesn't change the result by much."

A mechanism MM is ϵ\epsilon-differentially private if for all datasets differing in one person:

P(M(D))eϵP(M(D))P(M(D)) \leq e^{\epsilon} \cdot P(M(D'))

Smaller ϵ\epsilon = stronger privacy = more noise = less accuracy. It's a trade-off.

AppleUses DP for keyboard and emoji usage data collection.
GoogleUses DP for Chrome usage statistics and Census data.
Federated LearningCombines DP with on-device training for privacy-preserving ML.