# Machine Learning & The Ethics of AI

- **Track:** Cambridge IGCSE™ Computer Science (0478 / 0984) (CAMBRIDGE IGCSE 0478)
- **Module:** Section 6: Automated Systems & AI
- **Estimated Duration:** 15 minutes
- **Access:** Open Theory (All-Access for Interactive IDE &amp; Autotests)

---

## Theory & Conceptual Background

Machine learning is an approach to AI in which a system improves its performance at a task by identifying patterns in data, rather than a programmer writing every decision rule explicitly. Learning can support predictions, recommendations or classification. It does not guarantee correct answers.

## Worked example: sorting photographs

A model is trained on labelled photographs of different plant species. During training it adjusts its model to associate image features with labels. It is then evaluated on photographs that were not used in training. Using the same photographs for both steps can hide poor performance on new examples.

A conventional program applies rules written by a programmer. Those rules can handle new input values; they do not necessarily fail on unseen inputs. An expert system draws conclusions from explicit facts and rules, whereas a trained model learns patterns from data. Not every AI system learns while it is being used.

## Data and limitations

Training data should be relevant and representative. A plant model trained only on bright close-up photographs may perform poorly on shaded distant images. Incorrect labels can teach incorrect patterns. Human choices about data, objectives and deployment can introduce bias; removing one sensitive field does not guarantee fairness because other fields may act as proxies.

## Independent application

A recycling centre trains a model to recognise glass and plastic. Explain what training examples it needs, why a separate test set matters and what can go wrong if training photographs contain only clean bottles. Compare your explanation against the plant example without copying its nouns.

## Optional vocabulary

Supervised learning uses labelled examples. Unsupervised learning identifies patterns in unlabelled data. Reinforcement learning uses feedback about actions. These labels are optional extension here; the required foundation is learning from data, applying the resulting model and recognising limitations.

---

## Interactive Exercises & Autotest Specifications

### Exercise 1: Application: A recycling classifier (Fill in blank, 30 XP)

**Instructions:**
Work out each answer before submitting. After training, use the same or separate photographs to evaluate generalisation? A model trained only on clean bottles may struggle with dirty bottles: yes or no? A system applying explicitly entered IF rules is an expert system or machine learning model?


**Starter Code:**
```text
{"prompt":"Application: A recycling classifier","template":"1. After training, use the same or separate photographs to evaluate generalisation? [blank_1]\n2. A model trained only on clean bottles may struggle with dirty bottles: yes or no? [blank_2]\n3. A system applying explicitly entered IF rules is an expert system or machine learning model? [blank_3]","blanks":[{"id":"blank_1"},{"id":"blank_2"},{"id":"blank_3"}],"word_bank":["separate","same","yes","no","expert system","machine learning model"]}
```


### Exercise 2: Concept Check: Learning from examples (Fill in blank, 30 XP)

**Instructions:**
Work out each answer before submitting. Input/output examples used to learn patterns are training what? Does a conventional program always fail on a new input value: yes or no?


**Starter Code:**
```text
{"prompt":"Concept Check: Learning from examples","template":"1. Input/output examples used to learn patterns are training what? [blank_1]\n2. Does a conventional program always fail on a new input value: yes or no? [blank_2]","blanks":[{"id":"blank_1"},{"id":"blank_2"}],"word_bank":["data","set","yes","no","rules"]}
```


### Exercise 3: Application: Check the reasoning (Fill in blank, 30 XP)

**Instructions:**
Work out each answer before submitting. Does machine learning identify patterns in training data: yes or no? Does removing a sensitive field guarantee unbiased results: yes or no? Should a model be checked on data separate from training data: yes or no?


**Starter Code:**
```text
{"prompt":"Application: Check the reasoning","template":"1. Does machine learning identify patterns in training data: yes or no? [blank_1]\n2. Does removing a sensitive field guarantee unbiased results: yes or no? [blank_2]\n3. Should a model be checked on data separate from training data: yes or no? [blank_3]","blanks":[{"id":"blank_1"},{"id":"blank_2"},{"id":"blank_3"}],"word_bank":["yes","no","never","always"]}
```


