How to Teach AI and ML to Middle Schoolers

Artificial intelligence (AI) has become a revolution in the last few years, and the number of developers, graduate students, and even high schoolers exploring the field has exploded. This begs a fundamental question: When is it the right time to start learning AI? We hypothesized that teaching students AI from a young age, specifically in middle school, is a perfect time to start. After teaching an intro to AI/ML course this summer, we realized that middle schoolers are indeed able to understand AI/ML, though with a few caveats.

Let’s establish a few baselines of what most middle schoolers know. In terms of coding, most sixth- to eighth-graders understand the fundamentals of coding, whether it be block coding, like Scratch, or even an actual language such as Java. If lucky, some students may even know Python. As long as students understand basic coding concepts such as loops and if statements, they will be able to learn the concepts of AI, as in-depth coding skills aren’t needed to learn AI at a surface level.

In terms of math, most students will know up to basic algebra concepts, unless they are really advanced. Most students will understand coordinate planes, such as x-y axes and slopes, which is a good start for sure. However, this means it is incredibly difficult to teach the true theory behind concepts, such as loss functions and gradient descent. Instead, it’s far better to explain the overarching topics without going too in-depth and to show how to implement these in the real world.

Image for post

The general math level of most middle school students (Image source: Authors via Desmos)

Teaching Philosophy

The most effective way to keep young students engaged is to use positive reinforcement and encouragement to help them feel like they are understanding the concepts.

To introduce middle schoolers to AI, it is imperative to start with extreme basics. This begins by eliminating the perception that AI is terrifying robots that can operate completely independently. From our experience, most students instantly thought of AI as something out of Avengers: Age of Ultron. We needed to dispel their theories, first by clarifying exactly what AI is and by giving precise, accurate examples. We showed how AI is all around them, from Amazon Alexa to Netflix recommendations, which helped them gain a better understanding of what AI really is.

Image for post

What most middle schoolers think AI is (Image source — Avengers: Age of Ultron)

Most importantly, to keep students engaged, they must understand why AI is important for them to learn. They should understand that most job opportunities in the future will require AI, and learning the concepts now will give them an advantage in high school and college. Additionally, providing some examples of fields that are shifting to the use of AI, such as medicine and economics, will interest students with all sorts of different interests.

Artificial intelligence is the simulation of human intelligence in machines that are programmed to think and act like humans.

To help middle schoolers understand AI/ML, the topics should be defined very simply and intuitively. We explained that machines will learn from their own results and run thousands of tests to improve. One great example for middle schoolers is as follows: An AI is a small infant that is shown squares and triangles over and over again until it can determine between a square and a triangle. This explains the basic concept of providing data and labels for a model to learn from in a commonly understandable way.

Image for post

This is what you shouldn’t teach (Image source: KDnuggets)

Instead of trying to distinguish AI from ML, it is much easier to just say that they are very similar and essentially the same thing. Trying to differentiate the two will just confuse the already confused middle schoolers even more. This is a similar strategy to teaching elementary kids that 0 is the smallest number but then later teaching them about the existence of negative numbers.

Deep Learning vs. Standard ML

Teaching deep learning is honestly not the most effective move. Starting with the basics of standard machine learning algorithms, like linear and logistic regression, will help students ease into the concepts rather than being overwhelmed. If a student has taken algebra, or even understands basic linear equations (y = mx + b) they will be able to understand how linear regression works. Again, positive reinforcement keeps students engaged.

If teaching DL and neural networks is necessary, keep it as simple as possible. Explain that a neural network is simply a function, just like ƒ(x), where ƒ is the network and x is the data. The goal of the function is to have the output of the function as close to the real label of the data. During training, the equation continues to improve to always get the correct output. This makes deep learning seem like a basic algebraic function, making it comprehensible for a middle schooler.

Image for post

The simplest way to explain AI vs ML vs DL (Image source: Edureka)

Projects and Problems

Again, since the target group is very young, the primary goal should be to keep them engaged and interested. Without a doubt, projects are the best way to do so. The real-world experience that comes from coding these projects is critical to help them understand how all the pieces fit together.

This also means that projects should be as easy as possible and universally interesting. For example, a breast cancer classification project proved to be very popular; many students felt they were “curing cancer,” which was an incredible motivator.

In general, the code will obviously involve a lot more than the actual model — for example, syntax and data preprocessing. Remember that the goal here is to focus on the actual model, meaning that many of these other parts are irrelevant to the goal of teaching students about ML. Above all, teachers shouldn’t get caught in the trap of forgetting about the actual ML involved during a project.

Image for post

A simple and effective project to start with (Image source: Author notebooks)

Final Thoughts

For middle schoolers, all that really matters is helping them develop interest. When it really comes down to it, with enough passion, anyone can learn the high-level concepts later in their education.

From our experiences, we found that it is completely feasible to teach AI/ML to middle schoolers, thus planting the seed of inspiration early. However, given their still-developing math and coding skills, it is incredibly important to avoid burnout. When teaching AI to a middle schooler, the goal shouldn’t be to make them build companies or conduct research. While it may seem they’re learning more in the short-term, this mindset will hinder them on a long-term basis. The goal is to inspire and interest the next generation about the field of AI, and how fun and important it is. Scaring students away with overwhelming complexities impedes any chance of interest.

More AI engineers in the future are absolutely key. To pull more students to the field, it’s absolutely critical to make sure they have a strong foundational base of these rigorous concepts. For middle schoolers, all that really matters is helping them develop interest. When it really comes down to it, with enough passion, anyone can learn the high-level concepts later in their education. Regardless, for the most ambitious students, building interest and understanding at an early age will undoubtedly go a long way.

Our GitHub organization for the course can be found here:

Our lesson materials can be found here:

Authored by Ayaan Haque and Viraaj Reddi

Original post:

Leave a Reply

Your email address will not be published. Required fields are marked *