Theory of Intelligence
DEEP LEARNING•Sequences And Transformers•Recurrent Neural Networks•1.4 Handling Long Sequences

Introduction

Why simple RNNs struggle with long sequences: unstable gradients through time and the fixes that help, and the short-term memory problem that motivated LSTMs and GRUs.

Introduction

Simple RNNs work well for short patterns, like the weekly cycle in the last topic. But ask one to remember something from 100 steps ago, like the subject of a long sentence or a spike in a sensor reading two days earlier, and it usually fails.

There are two related problems:

  1. unstable gradients: when training through many time steps, gradients vanish or explode, so the network can't learn long-range patterns;
  2. short-term memory: even in the forward pass, the hidden state is overwritten a little at every step, so information from early steps fades away.

Think of a game of "telephone" again (Training tab, topic 1.1), but this time with 100 people and a message that changes slightly at each person. By the end, almost nothing of the original message remains. Simple RNNs are like that. This topic covers the partial fixes, and why they led to the gated cells of Chapter 02.

Discuss theoretical concepts, mathematical formulas, and architectural foundations.

Supports inline code with `backticks`
No comments yet. Be the first to start the discussion!