About this lesson
Sometimes we write and post things on social media in a hurry. Such posts can hurt people and even make them feel bullied. Wouldn't it be great if an Artificial Intelligence application could check our posts as we write them, and warn us if they were potentially hurtful?
Year band: 5-6, 7-8Curriculum Links Assessment
Links with Digital Technologies Curriculum Area.
Examine the main components of common digital systems and how they may connect together to form networks to transmit data (ACTDIK014)
Examine how whole numbers are used to represent all data in digital systems (ACTDIK015)
Define problems in terms of data and functional requirements drawing on previously solved problems (ACTDIP017)
Explain how student solutions and existing information systems are sustainable and meet current and future local community needs (ACTDIP021)
Investigate how data is transmitted and secured in wired, wireless and mobile networks, and how the specifications affect performance (ACTDIK023)
Investigate how digital systems represent text, image and audio data in binary (ACTDIK024)
Define and decompose real-world problems taking into account functional requirements and economic, environmental, social, technical and usability constraints (ACTDIP027)
Evaluate how student solutions and existing information systems meet needs, are innovative, and take account of future risks and sustainability (ACTDIP031)
Links with Health and Physical Education Curriculum Area.
|Communicating and interacting for health and wellbeing|
Practise skills to establish and manage relationships (ACPPS055)
Examine the influence of emotional responses on behaviour and relationships (ACPPS056)
Recognise how media and important people in the community influence personal attitudes, beliefs, decisions and behaviours (ACPPS057)
Investigate the benefits of relationships and examine their impact on their own and others’ health and wellbeing (ACPPS074)
Analyse factors that influence emotions, and develop strategies to demonstrate empathy and sensitivity (ACPPS075)
Typically, by the end of year 6, students:
Typically, by the end of Year 8, students:
Choose the task that will best suit your students from these suggested assessment approaches.
|Possible tasks||Relevant content description(s)|
Draw a labelled diagram of the AI in action. Identify the perceptrons and their inputs and outputs:
How does the ANN use numbers and binary data to represent information?
Represent the learning data as a binary matrix.
Describe the steps you used to train your AI to recognise posts.
Imagine how the AI works internally and represent the basic function as pseudo-code or a flowchart.
How might this type of AI be used in our daily lives?
What similar application can you envisage using this kind of classification technology for?
Learning sequenceDownload Lesson
MyComputerbrain is the tool used in the plugged activity below. You can use this link to access this program.
The above image shows the view, consisting of an Artificial Neural Network (ANN) and a table with expressions that most people would consider either ‘kind’ (left-hand column) or ‘mean’ (right-hand column).
The grey boxes in the input, hidden and output layer are called ‘perceptrons’. A perceptron is a model or program that simulates mental decision making. Perceptrons can be likened to neurons in the brain. On the far left-hand side of the ANN, we see all words from the ‘kind’ and ‘mean’ expressions in the table. They are provided to the ANN as learning (or training) data. The ANN calculates whether those words are more likely to fit the ‘Kind things’ or the ‘Mean things’ category based upon the data the user supplied it (in the table).
- Use a suitable hook to discuss bullying.
- What is bullying? Have you been bullied?
- Why is it important to recognise bullying?
- What effect does bullying have on someone?
- Are cases of bullying always intentional, or can you think of instances where they may not be?
- In daily conversation, what words or phrases might be considered ‘mean’ and potentially a form of bullying? You may wish to create a table on the whiteboard separating out nice and mean words/phrases—you can keep this list up for the plugged activity later.
- Students increasingly use social media messaging to communicate with their friends.
- What are the social media communication tools that students use?
- In an effort to message back quickly, what do you think might occur? Have you made spelling or grammatical mistakes, or has your message been misunderstood?
- How might sarcasm or irony be interpreted as, or lead to, bullying?
Students who have experienced bullying in the past may require a level of support to engage with this activity. For example, you may decide to pair affected students with a trusted partner.
- Explain that computers can be programmed to be intelligent or at least smart. Ask the class if they think a computer could work out whether something they write is kind or mean? How would it do this?
- Use the application My Computer brain, which lets you train an AI application to recognise posts and match them to a particular output. No coding is required. We have provided an example of what it might look like in the image above. Students can enter a total of 12 expressions, including single words and whole sentences.
- The instructions in the right-hand menu of the application will guide students through the process, which consists of:
- creating training data
- training the ANN via the ‘Start Learning’ button (you need to let the application cycle through all the training cycles—it will say ‘Learning Completed’ when finished)
- testing the ANN by entering short sentences in the input field (where it says “enter post” at the top of the window. Please note, when you test out to see if the AI is smart, it uses black for the predicted category (e.g. “Mean things”) and not a more obvious colour such as green.
Students may need help with spelling and grammar.
- As a special feature, the ANN will be constructed in real time, while students enter the training data. This is intended to help students understand how the input data influences the topology of the ANN. It is also an opportunity for the teacher to discuss data input, and more general human sensory perception.
Note: The student input is not stored. When the browser window is reloaded, the experiment is reset. This is to ensure that especially mean expressions are not used for purposes other than the experiment.
- Share what you have learned about AI and how ‘intelligent’ a computer can be.
- Students may come up with their own training data and project to test the AI further. Here are some prompts:
- How will the AI decide when kind and mean words are used in combination?
- Can the AI pick up sarcasm or irony?
- How could the AI be improved (eg by adding a thesaurus that could recognise similar words)?
For students who finish early, they could choose their own topic (e.g. ‘healthy vs unhealthy ingredients’ or ‘formal vs informal emails’).
- In the example below, the AI is 0.93 sure that ‘I like you’ is a ‘kind thing’. Discuss the scale used in the ‘Kind things’ and ‘Mean things’ boxes to display the confidence level. A fully black box means the AI was very sure. A light grey box means it was not quite sure. When was the AI very sure of its guess? When was it not so sure?
Image: confidence level
- Look at the table on the right-hand side with ‘Input’, ‘Weight’, ‘Product’, ‘Sum’ and ‘Output’. Each perceptron receives Input data from other perceptrons. Each Input is multiplied by a Weight, leading to a Product. The Products are added up to create a Sum, and then pushed through a function that determines the Output of the perceptron. Note that the mathematics is quite effective, despite its relative ease. Hover your mouse over each perceptron to check its data. Observe that the colour of the lines that connect to the Input of a perceptron correspond to the colours in the Weight column of the table.
- Observe how the colours of the lines change as the AI learns. Green means positive values, red means negative values, and black means neutral values. These lines mimic the synapses in our brain and regulate the dataflow between the perceptrons.
- Is green more valuable to the AI’s learning mechanism than red or black? No. They are all equally required to achieve the learning outcome.
Note that the words from the training data are provided to the ANN as binary numbers. The ANN’s internal representation of the data is 1’s and 0's.
Note: The function depicted above is a Sigmoid function: f(x)= 1 / (1 + e^(-x)). The ANN also uses the following derivative of the Sigmoid function during the learning process: df(x)/dx = f(x) * (1 - f(x)).
Why is this relevant?
AI refers to the ability of machines to mimic human capabilities in a way that we would consider intelligent.
Machine learning is an application of AI. With ML, we give the machine lots of examples of data, demonstrating what we would like it to do so that it can figure out how to achieve the goal on its own. The machine learns and adapts its strategy to achieve this goal.
In our example, we are feeding the machine with data in the form of words. The more varied the data we provide, the more likely the AI system is to correctly classify the input as an appropriate output. In ML, the system will give a confidence value of how sure it is of the classification it has provided; in this case:
- a decimal value between 0 and 1
- white, black and shades of grey to the output box.
This lesson focuses on the concept of ‘classification’, which, in the context of AI, is a learning technique used to group data based on attributes or features.
To learn more about ANNs, explore the other experiments in this course at https://mycomputerbrain.net/php/courses/ai.php . The first experiment is free and provides a good introduction to ANNs.