Curriculum, High School

How RNNs (Recurrent Neural Networks) + Transformers Work

Download Resources
How RNNs (Recurrent Neural Networks) + Transformers Work

Lesson Description


About the lesson:
This lesson explains how neural networks work, how recurrent neural networks keep track of past information, and how transformers use attention to decide what is important in a sentence. Students explore examples of AI helping people generate new ideas in music, drawing, and writing, and learn why transformers are an improvement on RNNs.

Length: 2–4 hours

Pairs with: AI & Ethics, AI & Drawing


Lesson Preview

 

What is a recurrent neural network (RNN)?

A recurrent neural network is a network with a loop so future calculations can be based on past ones. RNNs understand the order of input and allow continued context.

What is a transformer?

A transformer is a kind of neural network designed for data where order matters. It allows parallelization, takes up less space, and uses attention to decide which parts of a sentence are most important.

How does a neural network work?

Neural networks are groups of neurons trained to perform a task. Each neuron receives input, performs a calculation, and outputs a number. Networks include an input layer, hidden layers, and an output layer.

Where do we see these models in everyday tools?

Tools that generate music, write text, describe images, or recognize speech often use an RNN or a transformer. These tools build a model from patterns found in large amounts of text, notes, or images.


To explore the full lesson, discussions, and activities, check out the rest of the materials using the link above.

Back to top

This Giving Tuesday, spark a future in AI—donate now to empower the next generation of responsible AI leaders.