📚 Course contents

AI & Computer Vision, lesson 43 of 52

Bias, Fairness & the Model Card

advanced28 min readFull course

Introduction

Your detector scores 85% overall. But is that 95% in sunshine and 40% under floodlights? 95% for the home kit and 50% for the away kit? An average can hide a group your system treats badly. Today you'll find out where bias comes from, measure your system situation by situation, and write a model card: an honest label on the box.

By the end of this lesson you'll be able to:

  • Explain bias as a systematic difference in how well a system works for different groups or situations
  • Name five places bias can enter: data, labels, measurement, deployment, feedback
  • Evaluate a model by slices and compare each slice with the overall score
  • Audit a dataset by class and session
  • Write a model card with honest limitations
  • Explain why we do not infer personal attributes about people from video

Working principle

A model is not neutral

A model learns from the examples it is given. If those examples are mostly one kind of situation, the model will work well there and badly elsewhere. Bias here means a systematic difference in how well the system works for different groups or situations. It is usually not anyone's intention. It comes from the data, the labels, the way we measure, and where we use it.

Where bias comes from

SourceExample in our project
DataAll videos filmed on a sunny morning on one pitch
LabelsThe person labelling only marked the ball when it was clearly visible, so blurry balls were never learned
MeasurementWe measured success only on frames where the ball was easy
DeploymentBuilt for a school pitch with a tripod, used at a muddy tournament with a handheld phone
FeedbackThe reel shows only the goals the system finds, so we only ever study those

Averages hide groups

An overall score is one number for everyone. Splitting the test into slices shows who is served well and who is not. In Cell 1 the average was 82%, but one situation got 42%. The habit is simple: never report a score without the worst group beside it.

People are different from balls

Our test slices were about light and kit. When a system finds or analyses people, the stakes are higher. Real research has found that some commercial face-analysis systems made many more errors for darker-skinned women than for lighter-skinned men (the "Gender Shades" study, 2018). Nobody planned that; the training data and the testing data did not include enough of everyone.

For this course: do not build features that guess a person's gender, age, skin colour, religion or ability from a video. You do not need them to count goals. If you ever test fairness across groups of people, it needs consent, care and a teacher's guidance, because the labels themselves are personal data about children.

Fairness has no single formula

People disagree about what "fair" means. Equal accuracy for everyone? Equal chances? Equal costs of mistakes? Different definitions can conflict. So fairness is not only a number; it is a conversation with the people affected. What we can do is: look, measure, write it down, and fix what we can.

What a model card does

A model card (from a 2019 paper by Mitchell and colleagues) is a one-page honest description:

SectionQuestion it answers
What it is forWhat was it built to do?
What it is NOT forWhat should nobody use it for?
DataWhat did it learn from? Who or what is missing?
How well it worksOverall and by group
LimitationsWhere does it fail?
People and privacyWhat happens to anyone's data?
ContactWho do I tell if it fails me?

Check the data first

Many fairness problems are visible before any training. Count your data by class and by session (Cell 2). Look at the pictures. Ask who is not in them.

Fixing, and not fixing

You can often improve a weak group: collect more of that situation (lesson 29), augment (lesson 13), change the camera, change the threshold, or add a warning light (lesson 36). Sometimes you cannot. Then the honest thing is to write the limit down and to not use the system where it fails. A model card that says "do not use in the shade" is a better product than one that hides it.

Data about children (again)

India's Digital Personal Data Protection Act applies stricter rules to children's data. lesson 14 covers the dates. In practice: collect less, keep it for a shorter time, share it with fewer people, and ask for consent. A model card is a good place to say how you did that.

Bias, Fairness & the Model Card | Electronics Simplified