The answersDownload the PDF
Worksheet

F12.7 AI, robots and bias

Technology and society · GCSE · OCR J277 1.6.1, AQA 8525 3.8, Edexcel 1CP2 5.2.2 · about 20 min

BugBotLab
NameClassDate

What this lesson is about

What AI is good for, where it goes wrong, and auditing a training set for bias.

Questions 6 marks in all

  1. [1 mark]What is machine learning?

    1. AA program that finds patterns from examples instead of being given the rules
    2. BA robot that moves by itself
    3. CA faster processor
    4. DA kind of database
  2. [1 mark]Why can a face recognition system work worse for some groups?

    1. AIts training data did not represent them well
    2. BTheir faces are harder to see
    3. CCameras are biased by design
    4. DThe software is too fast
  3. [1 mark]Which is a real difficulty with machine learning decisions?

    1. AIt can be hard to explain why a decision was made
    2. BThey are always wrong
    3. CThey cannot use data
    4. DThey need no electricity
  4. [1 mark]A self-driving car injures someone. What is the hard question?

    1. AWho is accountable: owner, manufacturer or programmer
    2. BWhether the car was fast
    3. CWhat colour the car was
    4. DWhich fuel it used
  5. [1 mark]A training set has 20 samples and 3 are 'night'. What percentage is that?

  6. [1 mark]What does this program print?

    counts = {}
    for s in ['day', 'day', 'night']:
        counts[s] = counts.get(s, 0) + 1
    print(counts)

The task: audit the training set

Count how many samples of each label are in samples. Print <label>: <n> (<share>%) for each, sorted from the most common to the least, with the share rounded to the nearest whole number. Any label making up less than 15% is under-represented: add UNDER-REPRESENTED to its line. At the end print labels: <n> and under-represented: <labels>, the under-represented labels joined by , .

# the two lines every program starts with: the commands, then the robot
from bugbot import *
connect()

samples = [
    "day", "day", "day", "day", "day", "day", "day", "day", "day", "day",
    "day", "day", "day", "dusk", "dusk", "night", "night", "night", "indoor", "day",
]

Plan your program here, then type it in and press Run.

QR code
Do it on the robot
www.bugbotlab.com/learn/f12-7-ai-robots-and-bias/
The simulator checks it and tells you when it passes. Nothing to install, no account.

Challenges

  1. Add ten more night samples. Which labels are still under-represented?
  2. Give an example of a decision you would not want a machine to make alone, and say why.
  3. A robot is trained only on a clean mat. What happens on a dusty one, and whose fault is that?