Skip to content
StackDecode
AI & ML Atlas
Neural NetworksalgorithmAnimated walkthrough

Real-Time Recurrent Learning (RTRL)

Computes recurrent-network gradients forward in time, so it can learn online.

The idea

Rather than unrolling and going backwards, RTRL carries along the sensitivities ∂hₜ/∂w of every state with respect to every weight and updates them at each step. The gradient is available immediately, letting the network learn while a sequence is still arriving, but the cost is very high, about O(n⁴) per step.

Watch it run

The pipeline lights up one step at a time. Use the controls to pause or step through it.

  1. 1At each step compute the new hidden state.
  2. 2Update the sensitivity of every state to every weight using the previous sensitivities.
  3. 3Combine the sensitivities with the current output error to get the gradient.
  4. 4Update the weights immediately.
1/4

Step by step

  1. 1At each step compute the new hidden state.
  2. 2Update the sensitivity of every state to every weight using the previous sensitivities.
  3. 3Combine the sensitivities with the current output error to get the gradient.
  4. 4Update the weights immediately.

Where it is used

Online learning in small recurrent networks.

Watch out for

Prohibitively expensive for large networks; approximations (such as UORO) exist.

Related