Lesson 6 of 7
AI Ethics
Examine algorithmic bias, training data rights, energy consumption, and how to build fair, responsible AI systems.
Learn it
Because AI systems are built by humans and learn from human data, they can pick up human mistakes, unfairness, and biases. For example, if a medical AI only learns from data about adults, it might give poor advice for children!
Using AI responsibly means thinking about fairness, privacy, and the planet. Training massive AI models uses lots of electricity and water, so scientists are working hard to build greener, fairer algorithms that help everyone equally.
Key terms
- Algorithmic Bias
- Systematic and unfair discrimination in an AI system's outputs caused by biased training data or flawed models.
- Explainable AI (XAI)
- Methods and techniques that allow human experts to understand and trace how an AI model reached a decision.
- Data Privacy
- The proper handling, consent, and protection of personal data used to train and query AI models.
- Carbon Footprint
- The total greenhouse gas emissions generated by the electrical compute power needed to train and run AI.
Auditing an AI System for Fairness
Step through an ethical audit of a fictional automated university admissions screener.
- 1Inspect Training Demographics: Check whether past student acceptance datasets underrepresent applicants from specific regions or backgrounds.
- 2Evaluate Proxy Variables: Ensure the model is not using postcodes or extracurricular activities as hidden proxies for wealth or demographic traits.
- 3Test Disparate Impact: Run benchmark tests across diverse subgroups to confirm acceptance rates are statistically equitable.
- 4Implement Human Oversight: Establish a mandatory human review panel for borderline or rejected applications rather than relying solely on automated outputs.
- 5Publish Transparency Reports: Document the system's operational parameters, known error rates, and appeal procedures for affected applicants.
Detecting Imbalanced Training Sets
python# Demonstrating dataset imbalance that can lead to algorithmic bias
training_samples = {
'Group_A_Applicants': 950,
'Group_B_Applicants': 50
}
total = sum(training_samples.values())
ratio_b = (training_samples['Group_B_Applicants'] / total) * 100
print(f'Group B representation: {ratio_b:.1f}%')
if ratio_b < 20:
print('Warning: High risk of algorithmic bias due to severe data imbalance!')Severely imbalanced training data causes machine learning classifiers to underperform on minority groups because the model lacks sufficient examples to learn accurate patterns.
Try it
Fill in the missing metric to calculate the error rate disparity between two demographic evaluation groups.
error_group_1 = 0.04
error_group_2 = 0.22
# Calculate disparity gap
disparity = ______
print('Ethical audit gap:', round(disparity, 2))Challenge
Imagine a company wants to use an AI to review CVs for job openings. Propose three strict rules the company must enforce to prevent gender and cultural bias.
Pick whichever way suits you — every mode earns the same bonus XP.
Write at least 40 more characters to submit.
Mark your own work
Guided walkthrough — 0/5 clues revealed
- Clue 1 locked — reveal it only if you get stuck.
- Clue 2 locked — reveal it only if you get stuck.
- Clue 3 locked — reveal it only if you get stuck.
- Clue 4 locked — reveal it only if you get stuck.
- Clue 5 locked — reveal it only if you get stuck.
Each clue costs 5 XP (never below 23 XP). You'd earn 45 XP right now.
Extension: Explain how an algorithm might still remain biased even if names and gender pronouns are completely deleted from CVs.