Happy or Sad? Exploring Bias in Machine Learning
Classifying happy and sad faces is an easy task for most humans, but can we teach a machine to do it? In this fun lesson, students will use machine learning to try this out and see how easy it is for bias to creep in. This experiment requires no computer programming skills! In an optional extension, students will also use their imaginations to explore the potential benefits and dangers of artificial intelligence solutions. This lesson will give students an awareness of how prevalent artificial intelligence is, see its benefits, and realize its challenges.
Remote learning adaptation: This lesson plan can be conducted remotely. Students can work independently on the Explore section of the lesson plan using the Student Worksheet and the slides as guides. The Engage and Reflect sections can be conducted over a video chat. The optional reflect section can be done remotely.
- Know that machine learning is a type of artificial intelligence (AI).
- Train and test a machine learning tool to classify drawings of happy and sad faces.
- Give examples of a bias that can arise in machine learning and understand how biases may arise.
- Revise the learning data to reduce bias and increase accuracy.
- Recognize that new AI inventions can help people but can also have unintended effects.
NGSS AlignmentThis lesson helps students prepare for these Next Generation Science Standards Performance Expectations:
- MS-ETS1-1. Define the criteria and constraints of a design problem with sufficient precision to ensure a successful solution, taking into account relevant scientific principles and potential impacts on people and the natural environment that may limit possible solutions.
- MS-ETS1-2. Evaluate competing design solutions using a systematic process to determine how well they meet the criteria and constraints of the problem.
Science & Engineering Practices
Planning and Carrying Out Investigations. Collect data about the performance of a proposed object, tool, process or system under a range of conditions.
Analyzing and Interpreting Data. Analyze and interpret data to provide evidence for phenomena.
Disciplinary Core Ideas
ETS1.B: Developing Possible Solutions. A solution needs to be tested, and then modified on the basis of the test results, in order to improve it.
Influence of Science, engineering and Technology on Society and the Natural World. The use of technologies and any limitations on their use are driven by individual and societal needs, desires, and values; by the findings of scientific research; and by differences in such factors as climate, natural resources, and economic conditions. Thus, technology use varies from region to region and over time.
For each group of 2–3 students.
- Face template, 1 per student and one extra per group.
- Construction paper, the same color for all groups.
- Coloring pencils, crayons, or markers
- Access to a computer with a webcam. [Note: cell phones and tablets will not work. Instead of a webcam, digital photos can be taken with another device and uploaded, but this will take more time. ]
- Access to the internet, specifically, the Teachable Machine web page.
Background Information for TeachersThis section contains a quick review for teachers of the science and concepts covered in this lesson.
Artificial intelligence (AI) is a branch of computer science that tries to build machines that demonstrate intelligence. Machine learning is a sub-division of AI; its goal is to create machines that can improve and learn over time using data.
Figure 1. Machine learning is a branch of artificial intelligence and is part of computer science.
A widely used machine learning application is image recognition. In image recognition, a computer learns to classify images by analyzing and finding patterns. AIs that use image recognition can do many things like classifying cancerous from non-cancerous tissue in medical images or recognizing a person's face in digital pictures. Interactions with the outside world, for example, a doctor re-classifying an image that the program wrongly classified as cancerous, can help the application refine and improve the accuracy of its algorithm.
Unlike classical computer programs where the decisions and rules are built into the program, machine learning programs construct their algorithm from data and feedback. This allows machine learning programs to find trends and patterns in enormous quantities of data, including patterns that are hard for humans to catch. They can also make predictions and improve themselves without human intervention and can handle complex, changing environments. But machine learning has its limitations. It requires a neutral and complete set of data to learn from, it uses a lot of computer power, and the results need to be taken with some precaution as it is susceptible to systematic errors.
In machine learning, a repeatable and systematic error that favors a specific incorrect outcome is referred to as a bias. It can have a racial or gender component—for example, some commercial face recognition programs are more likely to misclassify female dark-skinned people compared to male light-skinned people—but it can also be as simple as misclassifying high heeled shoes more often than sneakers. The video Machine Learning and Human Bias explains how human bias can creep into machine learning tools.
Learning to write a machine learning program takes dedication and work. Programmers have developed many ways to make machine learning more accessible, and Teachable Machine is one answer to these attempts. It is a web-based tool that allows users to quickly and easily make a teachable computer program without programming. It allows users with no computer programming background to experience the power of artificial intelligence.
In this lesson, students will develop an AI machine that can recognize drawings of happy and sad faces as shown in Figure 2.
Figure 2. Examples of happy and sad face classifications.
After building and testing their AI machines, students can use their first-hand experiences to imagine and explore the potential benefits and dangers of artificial intelligence solutions.