Thursday, December 3, 2026 | London 11°C · Drizzle
DailyGlimpse

AI

Deriving Backpropagation Through Time (BPTT) for RNNs: Truncated BPTT and Teacher Forcing Explained

Agha Ali Raza - Youtube Channel 1 min read

In this lecture, we dive deep into the mathematics of training Recurrent Neural Networks (RNNs) using Backpropagation Through Time (BPTT). We start with a step-by-step derivation of BPTT for RNNs, covering the gradients for weight matrices W_hy, W_hh, and W_xh. The lecture then introduces truncated BPTT, a practical approximation that limits the number of time steps considered during backpropagation to reduce computational cost and mitigate vanishing/exploding gradients. Finally, we discuss teacher forcing, a technique where the true target output is fed as input during training instead of the model's own prediction, which can speed up convergence and improve stability. This session is part of the Generative AI (Advanced NLP) course taught by Agha Ali Raza in Urdu/Hindi.

React