🌍 Deep Learning · subject
Deep Learning Sequence Models and Recurrent Networks Syllabus
Every chapter and topic of Sequence Models and Recurrent Networks examined in Deep Learning — 4 chapters, 13 topics, plus 50 flashcards written against it.
Sequence Models and Recurrent Networks syllabus — full chapter and topic list
Expand any chapter to see its topics and sub-topics. This is the whole examinable outline for Sequence Models and Recurrent Networks in Deep Learning, not a summary of it.
-
Recurrent Neural Networks
3 topics- RNN Architecture
- Sequence Modeling Tasks
- Bidirectional RNNs
-
Gated Recurrent Architectures
3 topics- Long Short-Term Memory (LSTM)
- Gated Recurrent Units (GRU)
- Long-Range Dependencies
-
Sequence-to-Sequence Models
4 topics- Encoder-Decoder Architecture
- Attention Mechanism
- Beam Search Decoding
- Teacher Forcing
-
Word Embeddings and Text Representation
3 topics- Word2Vec and GloVe
- Tokenization and Subword Units
- Contextual Embeddings
Sequence Models and Recurrent Networks flashcards for Deep Learning
24 of 50 cards from the Sequence Models and Recurrent Networks deck — real questions with worked answers.
What is the defining recurrence relation of a vanilla (Elman) RNN's hidden state?
$h_t = \tanh(W_{hh} h_{t-1} + W_{xh} x_t + b_h)$, with output $y_t = W_{hy} h_t + b_y$. The same weight matrices are shared across all time steps.
Why do RNNs share weights across time steps?
Weight sharing lets the network process sequences of arbitrary length with a fixed number of parameters and enforces the assumption that the same transition dynamics apply at every position (a form of temporal translation invariance).
In RNN backpropagation, what is Backpropagation Through Time (BPTT)?
BPTT unrolls the RNN across time steps into a deep feedforward graph and applies standard backpropagation, summing gradient contributions of the shared weights over all time steps: $\frac{\partial L}{\partial W} = \sum_{t} \frac{\partial L_t}{\partial W}$.
What causes the vanishing and exploding gradient problems in RNNs?
Gradients propagate through repeated multiplication by the recurrent Jacobian. Over $k$ steps the factor behaves like $\prod \|W_{hh}\|$; if the relevant eigenvalues are $<1$ gradients vanish exponentially, if $>1$ they explode, making long-range learning unstable.
What is gradient clipping and which RNN problem does it address?
Gradient clipping rescales the gradient when its norm exceeds a threshold: if $\|g\| > \theta$, set $g \leftarrow \frac{\theta}{\|g\|} g$. It mitigates the exploding gradient problem, not vanishing gradients.
Classify the four canonical RNN input/output configurations by shape.
One-to-one (fixed vector, e.g. plain classification), one-to-many (image captioning), many-to-one (sentiment classification), and many-to-many (sequence labeling if aligned, or encoder-decoder translation if unaligned).
What distinguishes a sequence labeling task from a sequence classification task?
Sequence labeling produces one output per input token (e.g. POS tagging, NER), so outputs are aligned and equal in length to inputs. Sequence classification produces a single label for the whole sequence (e.g. sentiment).
What is a language modeling task, and what quantity does it estimate?
Language modeling estimates the probability of a sequence via the chain rule $P(w_1,\dots,w_T) = \prod_{t=1}^{T} P(w_t \mid w_{1:t-1})$. Each step predicts the next token given the preceding context.
How is perplexity defined and what does it measure for a language model?
$\text{PPL} = \exp\!\left(-\frac{1}{T}\sum_{t=1}^{T} \log P(w_t \mid w_{1:t-1})\right)$. It is the exponentiated average negative log-likelihood; lower perplexity means the model assigns higher probability to the held-out text.
How does a bidirectional RNN compute its representation at each position?
It runs a forward RNN and an independent backward RNN, then concatenates their hidden states: $h_t = [\overrightarrow{h}_t ; \overleftarrow{h}_t]$, so each position sees both past and future context.
What is the main limitation of bidirectional RNNs regarding usage?
They require the entire input sequence to be available before producing outputs, so they cannot be used for real-time/online generation or autoregressive next-token prediction—only for tasks where the full sequence is known (e.g. tagging, encoding).
List the three gates of an LSTM cell and what each controls.
Forget gate $f_t$ (how much of the previous cell state to keep), input gate $i_t$ (how much new candidate information to write), and output gate $o_t$ (how much of the cell state to expose as the hidden state).
Write the full set of LSTM equations.
$f_t=\sigma(W_f[h_{t-1},x_t]+b_f)$, $i_t=\sigma(W_i[h_{t-1},x_t]+b_i)$, $o_t=\sigma(W_o[h_{t-1},x_t]+b_o)$, $\tilde{c}_t=\tanh(W_c[h_{t-1},x_t]+b_c)$, $c_t=f_t\odot c_{t-1}+i_t\odot\tilde{c}_t$, $h_t=o_t\odot\tanh(c_t)$.
Why does the LSTM cell state help preserve long-range gradients?
The cell-state update $c_t = f_t \odot c_{t-1} + i_t \odot \tilde{c}_t$ is additive (a near-linear 'constant error carousel'). When $f_t \approx 1$, gradients flow through $c_t$ with minimal decay, avoiding the multiplicative vanishing seen in vanilla RNNs.
What are the two roles of the LSTM's hidden state $h_t$ versus cell state $c_t$?
$c_t$ is the internal long-term memory carried mostly linearly through time; $h_t = o_t \odot \tanh(c_t)$ is the gated, exposed output used for predictions and passed to the next step's gates.
List the gates of a GRU and their roles.
Update gate $z_t$ (interpolates between previous hidden state and new candidate) and reset gate $r_t$ (controls how much past state influences the candidate). GRU has no separate cell state or output gate.
Write the GRU equations.
$z_t=\sigma(W_z[h_{t-1},x_t])$, $r_t=\sigma(W_r[h_{t-1},x_t])$, $\tilde{h}_t=\tanh(W[r_t\odot h_{t-1},x_t])$, $h_t=(1-z_t)\odot h_{t-1}+z_t\odot\tilde{h}_t$.
Compare GRU and LSTM in structure and parameter count.
GRU has 2 gates and merges cell and hidden state into one vector; LSTM has 3 gates plus a separate cell state. GRU has roughly 3/4 the parameters of an LSTM per unit, trains faster, and often performs comparably; LSTM can be stronger on very long or complex sequences.
In the GRU update $h_t=(1-z_t)\odot h_{t-1}+z_t\odot\tilde{h}_t$, what does $z_t \approx 0$ imply?
When $z_t \approx 0$ the unit copies the previous hidden state almost unchanged ($h_t \approx h_{t-1}$), letting information persist over many steps and preserving gradient flow for long-range dependencies.
What is a 'long-range dependency' and why is it hard for vanilla RNNs?
It is a statistical dependency between elements far apart in a sequence (e.g. subject-verb agreement across a long clause). Vanilla RNNs struggle because gradients over many steps vanish/explode, so the influence of distant inputs is lost.
Besides gating, name two architectural strategies to help RNNs capture long-range dependencies.
Skip/residual connections across time steps (shorter gradient paths) and attention mechanisms that create direct connections between distant positions, bypassing the sequential bottleneck entirely.
Describe the encoder-decoder (seq2seq) architecture.
An encoder RNN compresses the input sequence into a context representation (e.g. its final hidden state $c$); a decoder RNN generates the output sequence autoregressively, conditioned on $c$ and its own previously generated tokens.
What is the 'information bottleneck' problem in a basic encoder-decoder?
Compressing the entire source sequence into a single fixed-length context vector forces long inputs through a narrow bottleneck, degrading performance as sequence length grows. Attention was introduced to solve this.
What quantities does an attention mechanism compute (query, key, value framing)?
For query $q$ and keys $k_i$/values $v_i$: scores $e_i = \text{score}(q,k_i)$, weights $\alpha_i=\text{softmax}(e_i)=\frac{\exp(e_i)}{\sum_j \exp(e_j)}$, and context $c=\sum_i \alpha_i v_i$.
See more Sequence Models and Recurrent Networks flashcards →
Planning Sequence Models and Recurrent Networks for Deep Learning
Sequence Models and Recurrent Networks is about 13% of the Deep Learning syllabus by topic count — 13 of 103 topics, spread over 4 chapters. At roughly 45 minutes per topic plus 12 minutes per sub-topic, a first pass runs to about 10 hours.
The heaviest chapters are Sequence-to-Sequence Models (4 topics), Recurrent Neural Networks (3 topics), Gated Recurrent Architectures (3 topics) . Front-load those while your energy is high; the short chapters are better revision filler later.
Work top-down: read the chapter, then tick topics off individually rather than marking the whole chapter done. Sub-topics are where silent gaps hide.
Sequence Models and Recurrent Networks (Deep Learning) FAQ
What is in the Deep Learning Sequence Models and Recurrent Networks syllabus?
Sequence Models and Recurrent Networks is split into 4 chapters — Recurrent Neural Networks, Gated Recurrent Architectures, Sequence-to-Sequence Models and Word Embeddings and Text Representation, containing 13 topics and 0 sub-topics in total.
How many chapters are there in Sequence Models and Recurrent Networks for Deep Learning?
4 chapters. Sequence Models and Recurrent Networks accounts for about 13% of the topics in the whole Deep Learning syllabus (13 of 103).
How long should I spend on Sequence Models and Recurrent Networks for Deep Learning?
Budget around 10 hours for a first pass through Sequence Models and Recurrent Networks — about 45 minutes per topic plus 12 minutes per sub-topic across its 13 topics. Add revision cycles on top.
Are there flashcards for Deep Learning Sequence Models and Recurrent Networks?
Yes — a 50-card Sequence Models and Recurrent Networks deck. Sample cards are printed on this page, and the full deck is free in the Examius app with spaced repetition scheduling.