Artificial Intelligence and Machine Learning (REVISED 2021)¶
Time Estimate: 90 minutes
Introduction and Goals¶
Can a computer recognize your doodles?
Artificial intelligence (AI) is sometimes described as getting a computer to do complex tasks that humans find easy. Examples would be walking, seeing, and understanding speech. These activities, which come naturally to us, are very difficult to develop traditional step-by-step algorithms for.
But AI researchers have developed an approach known as machine learning that enables computers to perform these complex tasks. With machine learning a computer learns how to perform a task or solve a problem not by being given a traditional program to solve the problem, but by being given lots of examples of correct and incorrect solutions to the problem.
- explain the basics of machine learning
- identify aspects of every day life that use AI
- describe how computing innovations that use machine learning have biases
- explain how computing innovations that use AI can raise ethical concerns
- use target vocabulary, such as neural network while describing the beneficial and harmful effects of AI, with the support of concept definitions from this lesson
Learning Activities¶To give you a sense of what such a trained computer can do, here's an interactive Google application that has learned (and is continuing to learn) how to recognize doodles -- i.e., free-hand drawn images of typical objects. Certainly, the ability to recognize a person's doodles, is something we humans do quite easily. But it is a skill that would be very nearly impossible to specify by means of a traditional algorithm.
Give it a try yourself! Click on the flag doodle to see how well the computer can recognize your doodles.
Video: What is Machine Learning?Watch the following short video (2 minutes) introducing Machine Learning.
Activity: Google's Teachable Machine ExperimentsIn this activity you will use your browser to train a neural network to associate inputs from the camera on your computer or tablet or phone camera with certain sounds and images. Before you get started, here's a short (3:20) video demo that shows you how it works.
As you saw in the video, you can train a simple neural network to distinguish between three classes: green, purple, and orange. The network will associate a certain inputs from your video camera (hand up, funny face) with certain GIF images (cat, dog) or sounds (hello, hey). Once you've trained the network to make the desired associations, you have created a model.
Now it's your turn to try it. If your computer does not have a camera, use your tablet or phone for this activity. When you click on the link to the Teachable Machine Version 1, you should see the following interface (note there is also a version 2 that you could try by deleting /v1 from the URL).
Here are some exercises and experiments to try:
- Do the tutorial by clicking on the "Let's Go!" button. The tutorial will lead you through creating the model that you saw in the demo video (hand up, funny face).
- Tweak the model by replacing the GIFs with sounds, creating your own sounds.
- Customize a model with your own inputs and outputs.
- Here's an experiment to try: Does it take more training cycles to train a model to distinguish between left-hand-up/right-hand-up than a model that distinguishes between hand-up/no-hand-up?
- Facial recognition? Pair up with one or two of your classmates and explore whether the network can be trained to distinguish between your faces.
- Design your own experiment(s) with or without classmates. For example, can you find two or three inputs that the machine cannot distinguish between no matter how many learning cycles you do?
Algorithmic BiasCan an algorithm be biased? Yes, even though computers are machines, they are not free from the intentional or unintentional bias of the people who program them and the input data generated by humans. Computing innovations can reflect existing human biases because of biases written into the algorithms at all levels of software development or biases in the data used by the innovation. Machine learning and data mining have enabled innovation in medicine, business, and science, but information discovered in this way could be biased depending on the data source and the information can also be used to discriminate against groups of individuals. Programmers need to take action to reduce bias in algorithms used for computing innovations as a way of combating existing human biases.
Watch the following video about algorithmic bias.
Algorithmic bias describes systematic errors in a computer system that create unfair outcomes, due to the algorithm design or how the data used by the program is collected or used to train the algorithm.
Five Types of Algorithmic Bias
- The data reflects an existing bias in society. For example, an image search for nurses may return more female nurses than male nurses.
- The training data is biased or incomplete. For example, facial recognition algorithms that are trained on photos of mostly white faces may not work as well for other skin colors.
- The data is oversimplified into quantitative values. The data may be too complicated to measure so simpler quantitative measures are used that may cause bias, for example counting the sentence length as an oversimplified measure of good writing.
- Data can be affected by a feedback loop. If biased data is fed back into the algorithm that then generates new data, it causes a feedback loop of more biased data. For example, predictive policing software may recommend an increased police presence in neighborhoods based on previous arrests, ignoring other neighborhoods, but this could form a feedback loop where the increased police presence leads to more arrests and more bias in the decision.
- Data can be manipulated. In 2016 Microsoft launched the virtual assistant Tay. People on Twitter bombarded Tay with racist comments and soon many of the responses were racist in nature. Microsoft pulled the plug on Tay after 24 hours.
POGIL Activity: Analyze an App for Bias¶In this POGIL activity, you will analyze an app that determines membership in a club. Break into POGIL teams of 4 and assign each team member one of the POGIL roles. Open this worksheet to complete this POGIL Activity. You can make a copy of it with File/Make a Copy. Discuss the results with your class.
In this lesson, you learned how to:
There are lots of interesting videos and presentations online to help you learn more about AI and the impact it is having in the world.
- In this video two Googlers, Nat and Lo, interview a couple of Google AI researchers who describe how machine learning works. This video was made as part of their "20% project". One of the cool features of working at Google and other technology companies is that employees get to spend part of their time (1 day per week in this case) working on projects that they themselves choose.
- The Google Self-Driving Car is an example of the research being done by car industry researchers to create fully autonomous vehicles. As the video points out, an autonomous vehicle is much different than the computer-assisted vehicles that are currently available today.
- Computer vision is a long-standing AI research area. In this TED talk, Wei-wei Li from Stanford University describes how she used machine learning and crowd source to to teach a computer to understand pictures.
- The machinelearningforkids.co.uk/ site uses IBM's machine learning processors online to train and use models in Scratch and in an App Inventor extension. Using these materials does require setting up accounts with IBM and some set up time.
- Here is a Ted Talk video on Bias in Facial Recognition by Joy Buolamwini and another on Blind Faith in Big Data Must End by Cathy O'Neil.
- This video is on the use of Facial Recognition in China and privacy concerns.
- This is a report on police crime prediction software and bias.
- Microsoft had to silence its new AI chat bot.
- Bias in Health tracking
- Bias in college acceptance
Optional: App Inventor Artificial Intelligence TutorialsCheck out these AI tutorials in MIT App Inventor. The Image Classifier tutorials require an AI extension that some mobile devices can use (list of compatible devices and an apk that you can test on your device to see if it can use these extensions). The Therapist Bot tutorial and the Rock-Paper-Scissors Tutorials do not require this AI extension and can be implemented on any device. They are a lot of fun!
Here is a table of the technical terms we've introduced in this lesson. Hover over the terms to review the definitions.
Reflection: For Your Portfolio¶
Answer the following portfolio reflection questions as directed by your instructor. Questions are also available in this Google Doc where you may use File/Make a Copy to make your own editable copy.