DeepLLM Quiz
Neural Network Architectures

Training recurrent networks: backpropagation through time, bottlenecks and why transformers replaced them

10 questions on backpropagation through time, vanishing gradients, the bottleneck, gated units, sequential processing and the move to transformers.

  • 10 questions
  • Stopwatch
  • Instant feedback

Shown publicly with your score. Don’t use your full real name.

Sample questions

Play now ↑

Answers stay hidden. Start the quiz to play them.

  1. Sample 1

    In an encoder-decoder translator, the whole input sentence must be summarised in one vector of fixed length before the output begins. What is this problem called?

    • Over-fitting
    • Early stopping
    • The bottleneck problem

How it works

  • One question per screen. An answer is final once sent.
  • You see right away whether you were right, with a short explanation.
  • The stopwatch runs: on equal scores, the faster player ranks first.
  • Only your best attempt counts, so replaying is never risky.

About this quiz

A recurrent network is trained by the same method as any other: compute the error, send gradients back, adjust the weights. Because the network is a long chain of copies of itself, the gradients have to travel back along the whole chain, step after step. That works on paper, and it is called backpropagation through time. In practice it runs into trouble when the chain is long, and the troubles explain why recurrent networks, for all their elegance, have been largely replaced by transformers for language. This quiz traces the troubles one by one.

The first is the old enemy of deep networks: gradients that vanish or explode as they pass through many layers. A long sentence is effectively a very deep network. The second is specific to sequence models. In translation, the whole input sentence has to be squeezed into a single hidden vector of fixed length before the output can begin, and the longer the sentence, the less likely it is that the vector can hold what matters. This is the bottleneck problem. You will see why it also means that output cannot start until the whole input has been read.

Gated designs were invented to ease these problems by adding extra paths along which information can skip many steps. You will see what they achieve, what they do not, and what they cost. The quiz then looks at two structural limits that no gating can remove: signal paths that grow in length with the number of steps, and the impossibility of processing the steps of one sequence in parallel, which wastes the power of modern graphics processors. The questions ask how transformers answer these limits.

Misconceptions to watch for: that backpropagation through time is a different algorithm from ordinary backpropagation, when it is the same method applied to the unrolled network; that gated networks fully solve long-range dependencies, when they only improve on plain recurrent networks; and that the problems come from the data, when they come from the architecture.

The quiz suits learners who know how recurrent networks work and want to understand why the field moved on, and practitioners who meet recurrent models in older code. It needs no mathematics. There are 10 questions, each with an explanation, and it takes about four minutes. The story of recurrent networks is a good lesson in how the field progresses. A natural design runs into specific, understood limits, each one is addressed by a targeted modification, and eventually a different architecture removes the limits at the root. The vanishing gradient, the bottleneck and the lack of parallelism are not historical curiosities. They are the problems that every sequence model has to face, and knowing them shows what a new proposal must achieve. They also explain why attention became so central, since it answers all three of them at once, and in the same stroke made much larger models practical to train on modern hardware. Anyone reading about the limits of any sequence model will meet these same three themes again and again.

Questions and answers

›How long does the quiz take?

About 3 to 4 minutes for 10 questions, at roughly 20 seconds each. An explanation follows each answer, so the story of the limits of recurrent networks builds up as you go.

›Do I need to know how recurrent networks work?

Yes, in outline. The previous quiz on recurrent networks explains the hidden state and the chain of shared-weight copies. This one picks up from there, and the questions recall what they need.

›What is backpropagation through time?

It is ordinary backpropagation applied to a recurrent network drawn out as a chain of copies, one per step. Activations are propagated forward from the first input to all the outputs, and error signals are then propagated back along the same paths. The network is trained by gradient descent in the usual way, with gradients obtained by automatic differentiation.

›What are vanishing and exploding gradients?

When error signals pass back through a very deep chain, they are multiplied by many factors. If most of the factors are smaller than one, the signal shrinks to nothing, and if most are larger than one, it grows without limit. For very long sequences, training a plain recurrent network is difficult for this reason.

›What is the bottleneck problem?

In an encoder-decoder network, the entire meaning of an input sequence of arbitrary length has to be summarised in one hidden vector of fixed length. For long inputs, this vector can hold only so much. The decoder also cannot begin to generate the output until the whole input has been processed.

›What do LSTM and GRU models add?

They add extra signal paths that bypass many of the processing steps within each stage, so information can be remembered over more steps. They improve on plain recurrent networks, but their ability to model long-range dependencies is still limited, and the extra complexity of each cell makes them slower to train.

›What structural limits remain for all recurrent networks?

The signal paths grow in length in proportion to the number of steps in the sequence, so distant elements stay far apart. And the sequential nature of the computation means the steps for a single sequence cannot be done in parallel, so recurrent networks use highly parallel hardware inefficiently.

›How do transformers answer these problems?

Attention connects every position directly to every other position in a single step, so the path between any two elements is short and there is no single bottleneck vector. And all the positions can be processed simultaneously, which makes good use of graphics processors. These advantages are why transformers replaced recurrent networks.

More quizzes