Counted from the questions in the past papers listed on this site. Repeated = how many times the topic came in those papers.
Deep and Reinforcement Learning important questions with answers
Each answer starts with the short answer. Then come the points to write, a diagram and an exam tip. The questions under each topic are copied from the RGPV papers.
Q1. Recurrent neural networks, BPTT and gradient problems
Asked 3 times in 2020, 2023, 2025 · Unit 1
From the papers
“Describe the challenges of vanishing and exploding gradients in Recurrent Neural Networks (RNNs). How do GRUs and LSTMs mitigate these issues?” (Jun 2025)
“What are Recurrent Neural Networks?” (Nov 2023)
“What is PCA (Principle Component Analysis) and RNN?” (Nov 2023)
“Derive the Back Propagation Through Time (BPTT) algorithm used to train the recurrent neural network.” (Dec 2020)
The short answer
A recurrent neural network (RNN) is a neural network with a loop: the hidden state from one time step is fed back as input at the next step. This lets it remember earlier inputs, so it suits sequences such as text, speech and time series.
Write these points
Input: a sequence x1, x2, ..., xT, read one item per time step.
Hidden state: at each step h_t = tanh(W_xh x_t + W_hh h_(t-1) + b). The same weights are used at every step.
Output: y_t = W_hy h_t, for example the next word or a class label.
Memory: h_t carries a summary of everything seen so far.
Uses: language models, speech recognition, machine translation, stock and weather series.
Back Propagation Through Time (BPTT)
Unroll the RNN for T steps. It now looks like a deep feed forward network with T layers that share weights.
Forward pass: compute h_1 to h_T and the loss at each step. Total loss L = L_1 + L_2 + ... + L_T.
Backward pass: start at the last step and move back. At each step the error comes from the output at that step and from the next hidden state.
The gradient for a shared weight is the sum of its gradients at all time steps: dL/dW = sum over t of dL_t/dW.
Update the weights once with gradient descent: W = W minus (learning rate x dL/dW).
Truncated BPTT: for long sequences, go back only k steps (for example 20) to save memory and time.
Vanishing and exploding gradients
Going back one step multiplies the gradient by W_hh and by the slope of tanh. Over many steps this product is repeated many times.
Vanishing gradient: if the factors are below 1, the gradient shrinks towards zero. The network cannot learn links between far apart words.
Exploding gradient: if the factors are above 1, the gradient grows very large. The weights jump and the loss becomes NaN.
Fixes for exploding: gradient clipping (cap the gradient size), a smaller learning rate.
Fixes for vanishing: LSTM or GRU cells, ReLU activations, good weight initialization, truncated BPTT.
Remember. LSTM and GRU fix vanishing gradients with gates and an additive cell state. Gradient clipping fixes exploding gradients.
One RNN step by hand.
Take a scalar RNN: h_t = tanh(w × h_(t−1) + u × x_t), with w = 0.5, u = 1 and h_0 = 0.
Input x_2 = 0: h_2 = tanh(0.5 × 0.76 + 0) = tanh(0.38) = 0.36. The first input is still remembered.
Vanishing gradient: the gradient back through 20 steps is multiplied by about w = 0.5 each step. 0.5²⁰ is about 0.000001, so early steps stop learning.
Real-life example
When you type on a phone keyboard, it suggests the next word. To suggest "chai" after "Let us have a cup of", it must remember the earlier words. An RNN reads the words one by one and keeps a memory of them. The keyboard is the RNN, each word is a time step and the memory is the hidden state.
Figure: an RNN rolled (left) and unrolled over three time steps (right)Figure: steps of BPTT
Same or opposite: vanishing and exploding gradients
Point
Vanishing
Exploding
Same or opposite
Gradient size
Shrinks towards zero
Grows very large
Opposite
Effect
Early steps stop learning
Weights jump, loss becomes NaN
Opposite
Main fix
LSTM or GRU
Gradient clipping
Opposite
Cause
Repeated multiplication in BPTT
Repeated multiplication in BPTT
Same
Exam tip. Draw the rolled RNN with its loop and the unrolled chain beside it. Write the hidden state formula. For BPTT, say clearly that the gradient of a shared weight is summed over all time steps.
“Describe the challenges of vanishing and exploding gradients in Recurrent Neural Networks (RNNs). How do GRUs and LSTMs mitigate these issues?” (Jun 2025)
“Explain LSTM (Long Short Term Memory).” (Nov 2023)
“Explain following term: LSTM” (Dec 2020)
The short answer
LSTM (Long Short Term Memory) is an RNN cell with a separate cell state and three gates that decide what to forget, store and output. The cell state is updated by addition, so gradients survive long sequences.
Write these points
Parts of an LSTM cell
Cell state c_t: the long term memory line that runs through the cell.
Forget gate: f_t = sigmoid(W_f [h_(t-1), x_t] + b_f). A value near 0 forgets, near 1 keeps.
Input gate: i_t = sigmoid(W_i [h_(t-1), x_t] + b_i) decides how much new information to store.
Candidate memory: g_t = tanh(W_g [h_(t-1), x_t] + b_g) is the new information.
Cell update: c_t = f_t * c_(t-1) + i_t * g_t. This addition is what keeps gradients alive.
Output gate: o_t = sigmoid(W_o [h_(t-1), x_t] + b_o) and the hidden state h_t = o_t * tanh(c_t).
GRU (Gated Recurrent Unit)
A simpler cell with two gates and no separate cell state.
Update gate z_t: how much of the old state to keep and how much new state to take.
Reset gate r_t: how much of the old state to use when making the new candidate.
Fewer weights than LSTM, so it trains faster. Accuracy is often close to LSTM.
How they fix vanishing gradients
The forget gate can stay near 1, so the cell state passes back almost unchanged.
The gradient travels along the additive path, not through many tanh slopes.
So the network can link a word to another word 50 or 100 steps earlier.
Forget gate with numbers.
Old cell state c(t-1) = 0.8. Forget gate f = 0.9, input gate i = 0.5, candidate g = 0.6.
c(t) = 0.9 x 0.8 + 0.5 x 0.6 = 0.72 + 0.30 = 1.02.
Most of the old memory stays, because f is close to 1.
Real-life example
Think of a student preparing notes for the semester. After each lecture they cross out what is no longer needed (forget gate). They add the new points that matter (input gate). In the exam they write only what the question asks (output gate). The notebook is the cell state and it lasts the whole semester.
Figure: inside an LSTM cellFigure: one step of an LSTM cell
Same or opposite: LSTM and GRU
Point
LSTM
GRU
Same or opposite
Gates
Three: forget, input, output
Two: update, reset
Opposite
Separate cell state
Yes
No
Opposite
Number of weights
More
Fewer
Opposite
Fixes vanishing gradient
Yes
Yes
Same
Type of network
Recurrent
Recurrent
Same
Exam tip. Draw the LSTM cell with the cell state line on top and the three gates below it. Write the cell update equation and say that the addition keeps the gradient flowing. One line on GRU gives extra marks when the question names it.
“Explain Policy Gradient Algorithm for Full RL.” (Dec 2020, Nov 2023)
“Define the Policy Gradient method in reinforcement learning. How does it differ from Q-learning?” (Jun 2025)
The short answer
A policy gradient method learns the policy directly as a network with weights theta that gives the probability of each action. It moves theta in the direction that raises the expected total reward.
Write these points
Policy: pi_theta(a | s) = probability of taking action a in state s.
Goal: maximise J(theta) = expected total reward when the agent follows pi_theta.
Policy gradient theorem: grad J(theta) = E[ grad log pi_theta(a | s) x G_t ], where G_t is the return from time t.
Meaning: an action that led to a high return is made more likely. An action that led to a low return is made less likely.
Update: theta = theta + alpha x grad J(theta). This is gradient ascent, because we want more reward.
Baseline: subtract a baseline b(s), often the average return, from G_t. The direction stays correct and the variance drops.
REINFORCE algorithm (full RL, Monte Carlo policy gradient)
Start with random weights theta
Repeat for each episode:
Play one full episode with pi_theta: s0, a0, r1, s1, a1, r2, ...
For each step t:
G_t = r(t+1) + gamma r(t+2) + gamma^2 r(t+3) + ...
theta = theta + alpha * G_t * grad log pi_theta(a_t | s_t)
Policy gradient and Q-learning
Policy gradient learns the policy itself. Q-learning learns action values and then picks the best action.
Policy gradient gives a stochastic policy and works for continuous actions such as a steering angle.
Q-learning needs a max over all actions, so it suits a small, discrete set of actions.
Policy gradient is on-policy and has high variance. Q-learning is off-policy and can reuse old data.
REINFORCE update for one episode.
A policy picks left or right. In one episode it picked right, with probability π(right) = 0.4. The total reward was G = 10.
Update: θ ← θ + α × G × ∇ log π(right | s). With α = 0.01, the step is 0.01 × 10 = 0.1 times the gradient of log 0.4.
The update raises the probability of right, because it led to a good return. A negative return would lower it.
Using a baseline b = 6 gives G − b = 4, a smaller and steadier step in the same direction.
Real-life example
A new delivery rider tries different routes to deliver food. When a route gets the order there fast and the customer tips well, the rider uses that route more often. When a route causes delay, the rider uses it less. The rider is the policy, the route choice is the action and the tip is the reward.
Figure: the agent and environment loop of reinforcement learningFigure: one round of REINFORCE
Same or opposite: policy gradient and Q-learning
Point
Policy gradient
Q-learning
Same or opposite
What it learns
The policy directly
Action values Q(s, a)
Opposite
Actions
Discrete or continuous
Discrete
Opposite
On or off policy
On-policy
Off-policy
Opposite
Aim
Maximise total reward
Maximise total reward
Same
Exam tip. Write the policy gradient formula with grad log pi and the return G_t. Then write the REINFORCE steps. When asked how it differs from Q-learning, give at least four points in a table.
“Explain the Q Function and Q Learning Algorithm.” (Dec 2020, Nov 2023)
“Define the Policy Gradient method in reinforcement learning. How does it differ from Q-learning?” (Jun 2025)
The short answer
The Q function Q(s, a) is the expected total reward when the agent takes action a in state s and then follows its policy. Q-learning is an off-policy method that learns the best Q values from experience, without a model of the environment.
Write these points
State value V(s): expected return from state s. Action value Q(s, a): expected return from state s after action a.
Optimal Q: Q*(s, a) = E[ r + gamma max over a' of Q*(s', a') ]. This is the Bellman optimality equation.
Best policy: in each state pick the action with the highest Q value.
Q table: a table with one row per state and one column per action, filled with learned values.
Discount factor gamma (0 to 1): how much future rewards count. Learning rate alpha: how big each update is.
Q-learning algorithm
Set Q(s, a) = 0 for all s, a
Repeat for each episode:
Start in state s
Repeat until the episode ends:
Choose a by epsilon-greedy (random with probability epsilon, else best Q)
Take a, observe reward r and next state s'
Q(s, a) = Q(s, a) + alpha [ r + gamma max_a' Q(s', a') - Q(s, a) ]
s = s'
Off-policy: it learns the greedy policy while it explores with epsilon-greedy.
It converges to Q* if every state and action is tried often enough and alpha is reduced slowly.
Deep Q Network (DQN): when states are too many for a table, a neural network estimates Q(s, a).
Example of one update.
Q(s, a) = 2, reward r = 5, gamma = 0.9, alpha = 0.5 and the best Q in s' is 10.
Target = 5 + 0.9 x 10 = 14. Error = 14 minus 2 = 12.
New Q(s, a) = 2 + 0.5 x 12 = 8.
Real-life example
A new student in a city finds the best route to college by trial. Each day they try a road and note how long it took. Over the weeks they build a mental table of which turn is best at each crossing. The crossing is the state, the turn is the action and the time saved is the reward. The mental table is the Q table.
Figure: the agent and environment loop that Q-learning learns fromFigure: one step of Q-learning
Same or opposite: Q-learning and SARSA
Point
Q-learning
SARSA
Same or opposite
Policy type
Off-policy
On-policy
Opposite
Target uses
Best next action (max)
Next action actually taken
Opposite
Needs a model of the environment
No
No
Same
Learns from
Temporal difference error
Temporal difference error
Same
Exam tip. Write the Q-learning update rule exactly and name each symbol. A small worked update like the one above shows you understand it. Mention epsilon-greedy for exploration.
“Compare the Actor-Critic method with traditional reinforcement learning techniques. What advantages does it provide?” (Jun 2025)
“Write short notes: Actor-Critic Method” (Dec 2020, Nov 2023)
The short answer
Actor-Critic is a reinforcement learning method in which an actor (the policy) chooses actions. A critic (a value function) judges each action so that the actor can improve.
Write these points
Actor: a network pi_theta(a | s) that picks actions. It is updated by policy gradient.
Critic: a network V_w(s) or Q_w(s, a) that estimates value. It is updated by temporal difference learning.
TD error: delta = r + gamma V(s') - V(s). A positive delta means the action was better than expected.
Actor update: theta = theta + alpha x delta x grad log pi_theta(a | s).
Critic update: w = w + beta x delta x grad V_w(s).
Advantage: A(s, a) = Q(s, a) minus V(s). Using the advantage gives A2C and A3C.
Compared with traditional methods
Pure policy gradient (REINFORCE) waits for the full episode and has high variance. Actor-Critic updates at every step with lower variance.
Pure value methods (Q-learning) struggle with continuous actions. The actor handles them easily.
So Actor-Critic joins the strengths of both families.
Advantages
Learns online, step by step.
Lower variance than REINFORCE, so training is more stable.
Works with continuous action spaces, such as robot arm angles.
One TD error.
Critic says V(s) = 4. The agent gets r = 2 and V(s') = 5, with gamma = 0.9.
delta = 2 + 0.9 x 5 minus 4 = 2.5. The action was better than expected, so the actor makes it more likely.
Real-life example
Think of a cricket batsman and the coach. The batsman (actor) plays the shots. The coach (critic) watches and says after each ball whether the shot was better or worse than expected. The batsman changes the style using that feedback. Over time both get better: the coach judges more correctly and the batsman plays better shots.
Figure: how the actor and the critic work togetherFigure: one step of Actor-Critic
Same or opposite: actor and critic
Point
Actor
Critic
Same or opposite
Learns
Policy pi(a given s)
Value V(s) or Q(s, a)
Opposite
Job
Chooses the action
Judges the action
Opposite
Update rule
Policy gradient
TD learning
Opposite
Uses the TD error
Yes
Yes
Same
Exam tip. Draw the two boxes, actor and critic, with arrows to and from the environment. Write the TD error formula. Then list three advantages over REINFORCE and Q-learning.
“How do visualization techniques like Deep Dream and Guided Backpropagation help in understanding neural networks?” (Jun 2025)
“Explain following term: Guided Back propagation” (Dec 2020)
The short answer
Guided backpropagation is a way to see which pixels of an input image made a CNN neuron fire. It is normal backpropagation to the image, except that at every ReLU only positive gradients are passed back where the forward activation was also positive.
Write these points
Pick a neuron or a class score to explain, for example the "cat" output.
Do a forward pass and remember where each ReLU was active.
Backward pass from that neuron to the input image.
At each ReLU pass a gradient back only if the forward input was positive and the gradient is positive. Set the rest to zero.
The result is an image of the same size. It shows sharp edges and parts that support the chosen output.
Other ways to visualise CNNs
Plain saliency map: the gradient of the class score with respect to the input pixels. It is noisy.
Deconvolution network: a similar idea that also keeps only positive signals at ReLU.
Grad-CAM: a coarse heat map from the last convolution layer. Guided Grad-CAM multiplies it with guided backpropagation.
Deep Dream: change the input image itself to make chosen neurons fire more. Patterns the network has learned then appear in the image.
Why it helps
Shows whether the model looks at the right part of the image.
Finds bias: a model that spots "wolf" only by the snow behind it.
Builds trust in medical and safety uses.
The ReLU rule on numbers.
At one ReLU the forward inputs are [3, minus 1, 2] and the gradients coming back are [0.5, 0.4, minus 0.2].
Only the first value has a positive input and a positive gradient.
Real-life example
A doctor checks an AI that marks X-rays as pneumonia or normal. Guided backpropagation lights up the parts of the lung the model used. If it lights up a hospital label in the corner instead, the doctor knows the model learned the wrong clue. The X-ray is the input and the bright areas are the pixels that drove the decision.
Figure: guided backpropagation
Same or opposite: guided backpropagation and Deep Dream
Point
Guided backpropagation
Deep Dream
Same or opposite
What changes
Nothing, only gradients are read
The input image is changed
Opposite
Output
Map of important pixels
A new dream-like image
Opposite
Purpose
Explain one decision
Show learned patterns
Opposite
Uses gradients of the network
Yes
Yes
Same
Exam tip. Write the ReLU rule clearly: pass back only where both the activation and the gradient are positive. Draw the three steps of forward pass, guided backward pass and output map. Name one other method such as Grad-CAM.
“Draw and explain McCulloch Pitts neuron Model.” (Dec 2020, Nov 2023)
The short answer
The McCulloch Pitts (MP) neuron, proposed in 1943, is the first mathematical model of a neuron. It takes binary inputs, adds them and fires (output 1) only when the sum reaches a fixed threshold.
Write these points
Inputs x1, x2, ..., xn are binary: 0 or 1.
Inputs are excitatory or inhibitory. If any inhibitory input is 1, the output is 0.
Sum: g(x) = x1 + x2 + ... + xn.
Output: y = 1 if g(x) is at least the threshold theta, else y = 0.
Weights are fixed and there is no learning. The threshold is set by hand.
It can make AND, OR and NOT gates. It cannot make XOR, because XOR is not linearly separable.
Gate
Inputs
Threshold
AND
x1, x2
2
OR
x1, x2
1
NOT
x1 as inhibitory
0
AND gate check with threshold 2.
x1 = 1, x2 = 1: sum 2, so output 1.
x1 = 1, x2 = 0: sum 1, below 2, so output 0.
x1 = 0, x2 = 0: sum 0, so output 0. This matches AND.
Remember. The perceptron later added real valued weights and a learning rule. The MP neuron has neither.
Real-life example
A hostel warden allows a late night outing only if two things are true: the student has a pass and a parent has called. Each condition is an input of 1 or 0. The warden says yes only when the count reaches 2. The warden is an MP neuron with threshold 2, which is an AND gate.
Figure: a McCulloch Pitts neuron with one inhibitory inputFigure: working of an MP neuron
Same or opposite: MP neuron and perceptron
Point
MP neuron
Perceptron
Same or opposite
Weights
Fixed (all 1)
Real values, learned
Opposite
Learning
None
Perceptron learning rule
Opposite
Inputs
Binary only
Real valued
Opposite
Output
Step function, 0 or 1
Step function, 0 or 1
Same
Solves XOR alone
No
No
Same
Exam tip. Draw the neuron: inputs on the left, the sum box, the threshold and the output. Show one gate, AND or OR, with its truth table. Say clearly that it has no learning.
“Explain sparse and contractive auto encoders.” (Dec 2020, Nov 2023)
The short answer
An autoencoder learns to copy its input to its output through a small hidden code. Sparse autoencoders keep few hidden units active while contractive ones keep the code steady for small input changes.
Write these points
Basic autoencoder
Encoder: h = f(Wx + b) turns the input x into a code h.
Decoder: x' = g(W'h + b') rebuilds the input from the code.
Loss: reconstruction error, for example the squared difference between x and x'.
The code learns the main features of the data.
Sparse autoencoder
The hidden layer may even be larger than the input, but most units must stay near zero.
Penalty: an L1 term on the activations, or a KL divergence term that keeps the average activation rho_hat close to a small target rho such as 0.05.
Loss = reconstruction error + beta x sparsity penalty.
Each unit learns to detect one specific feature, such as one edge direction.
Contractive autoencoder
Penalty: the squared Frobenius norm of the Jacobian of the encoder, that is the sum of the squares of dh_j / dx_i.
Loss = reconstruction error + lambda x ||J(x)||^2.
The code stays stable under small changes in the input, such as noise.
It learns the shape of the data and ignores directions in which the data does not vary.
Remember. Both are regularised autoencoders. Sparse controls how many units fire. Contractive controls how much the code moves with the input.
Sparse penalty on one hidden layer.
A sparse autoencoder has 100 hidden units and a target activation ρ = 0.05, so about 5 units should fire for each input.
On a batch, one unit has an average activation ρ̂ = 0.2. It fires far too often.
For this unit: 0.05 ln 0.25 + 0.95 ln 1.19 = −0.069 + 0.163, which is about 0.094.
Training lowers this penalty, so the unit learns to fire only for the inputs it really stands for.
Real-life example
Think of a college library that keeps a short index card for each book. A sparse index uses only a few keywords per card, so each keyword means something clear. A contractive index gives the same card to two copies of a book even if one has a torn cover. The book is the input, the card is the code and the librarian is the encoder.
Figure: an autoencoder squeezes the input into a small codeFigure: an autoencoder
Same or opposite: sparse and contractive autoencoders
Point
Sparse
Contractive
Same or opposite
Penalty on
Hidden activations
Jacobian of the encoder
Opposite
Aim
Few active units
Code stable under small input changes
Opposite
Penalty term
L1 or KL divergence
Frobenius norm of Jacobian
Opposite
Has encoder and decoder
Yes
Yes
Same
Trained to rebuild the input
Yes
Yes
Same
Exam tip. Draw one autoencoder diagram: input, encoder, code, decoder, output. Then write the two loss formulas side by side. The penalty term is the key difference, so write it clearly.
“Draw and explain the architecture of convolutional network.” (Dec 2020, Nov 2023)
The short answer
A convolutional neural network (CNN) is a deep network for grid data such as images. Convolution layers slide small filters to find features, pooling layers shrink the maps and fully connected layers give the class.
Write these points
Input layer: the image, for example 32 x 32 x 3 for a colour image.
Convolution layer: filters (for example 3 x 3) slide over the input. Each gives a feature map. Weights are shared across positions, so there are few parameters.
Stride and padding: stride is the step of the filter. Padding adds zeros at the border to keep the size.
Activation: ReLU, f(x) = max(0, x), applied to every value of the feature map.
Pooling layer: max pooling (for example 2 x 2) keeps the largest value in each window. It halves the size and adds small shift tolerance.
Flatten and fully connected layers: turn the maps into a vector and combine the features.
Output layer: softmax gives the probability of each class.
Layer
Job
Learns weights
Convolution
Find features
Yes
ReLU
Add non-linearity
No
Pooling
Reduce size
No
Fully connected
Combine features, classify
Yes
Output size.
Input 32 x 32, filter 5 x 5, stride 1, no padding.
Output size = (32 minus 5) / 1 + 1 = 28, so the feature map is 28 x 28.
Real-life example
Face lock on a phone uses a CNN. The first layers find edges and corners. The middle layers find eyes, nose and lips. The last layers decide whether the face is yours. Each layer is a team member who passes a simpler summary to the next.
Figure: layers and sizes of a CNN (LeNet-5)Figure: layers of a CNN
Same or opposite: convolution layer and pooling layer
Point
Convolution
Pooling
Same or opposite
Learnable weights
Yes
No
Opposite
Job
Detect features
Reduce size
Opposite
Slides a window over the input
Yes
Yes
Same
Changes depth
Can change (number of filters)
Keeps depth
Opposite
Exam tip. Draw the full chain from input to softmax with sizes written below each block. Write the output size formula (N minus F + 2P) / S + 1. Name one known CNN such as LeNet or ResNet for an extra mark.
“Explain Better Weight Initialization Methods.” (Dec 2020, Nov 2023)
The short answer
Weight initialization is the choice of starting weights before training. Good methods set the scale of the random weights so that signals and gradients keep about the same size in every layer, which avoids vanishing and exploding gradients.
Write these points
All zeros: every neuron in a layer gets the same gradient and stays the same. This is called the symmetry problem. Never use it for weights.
Too large random values: activations saturate (sigmoid, tanh) or blow up. Gradients explode.
Too small random values: signals shrink layer by layer. Gradients vanish.
Xavier (Glorot) initialization: variance = 2 / (n_in + n_out), or 1 / n_in. Best for sigmoid and tanh.
He (Kaiming) initialization: variance = 2 / n_in. Best for ReLU, which sets half of the values to zero.
LeCun initialization: variance = 1 / n_in. Used with SELU.
Biases: usually start at zero. That is safe, because the random weights already break the symmetry.
Other helpers: batch normalization reduces the effect of a poor start. Pre-training with autoencoders was used earlier.
Method
Variance of weights
Best with
Xavier
2 / (n_in + n_out)
tanh, sigmoid
He
2 / n_in
ReLU
LeCun
1 / n_in
SELU
He initialization.
A layer has 256 inputs and uses ReLU.
Variance = 2 / 256 = 0.0078. Standard deviation = square root of 0.0078 = 0.088.
So the weights are drawn from a normal distribution with mean 0 and standard deviation 0.088.
Real-life example
Think of tuning the volume on a long chain of loudspeakers at a college event. If each speaker turns the sound down, the last one is silent. If each turns it up, the last one screams. Good initialization sets every speaker so the sound stays at the same level. The speakers are the layers and the sound is the signal.
Figure: weight initialization methods
Same or opposite: Xavier and He initialization
Point
Xavier
He
Same or opposite
Variance
2 / (n_in + n_out)
2 / n_in
Opposite
Activation
tanh, sigmoid
ReLU
Opposite
Mean of weights
0
0
Same
Keeps signal size steady
Yes
Yes
Same
Exam tip. Start with why zero initialization fails. Then give Xavier and He with their formulas and activations. A three-row table like the one above is quick to draw and scores well.
Q11. Value iteration, policy iteration and temporal difference learning
Asked 2 times in 2020, 2023 · Unit 4
From the papers
“Explain value iteration, policy iteration and Temporal Difference Learning.” (Dec 2020, Nov 2023)
The short answer
Value iteration and policy iteration are dynamic programming methods that find the best policy when the model of the environment is known. Temporal difference (TD) learning learns values from experience without a model, by updating after every step.
Write these points
Value iteration
Start with V(s) = 0 for every state.
Repeat for every state: V(s) = max over a of sum over s' of P(s' | s, a) [ R + gamma V(s') ].
Stop when values change less than a small number.
Policy: in each state pick the action that gives the max.
Policy iteration
Start with any policy pi.
Policy evaluation: find V_pi(s) for the current policy with the Bellman expectation equation.
Policy improvement: in each state pick the action that is best using V_pi.
Repeat until the policy stops changing. It needs fewer rounds than value iteration, but each round costs more.
Learns from each step, without waiting for the episode to end like Monte Carlo.
Needs no model of P or R. SARSA and Q-learning are TD control methods.
One value iteration step.
State s has two actions. Action 1 gives reward 2 and leads to s' with V(s') = 10. Action 2 gives reward 5 and leads to s'' with V(s'') = 4. gamma = 0.9.
Action 1: 2 + 0.9 x 10 = 11. Action 2: 5 + 0.9 x 4 = 8.6.
New V(s) = max(11, 8.6) = 11. The best action is action 1.
Real-life example
Planning a trip with a full map is like dynamic programming. You know every road and its time, so you can work out the best route before you leave. Learning the city by driving and fixing your guess after every crossing is like TD learning. The map is the model, each crossing is a state and the time is the reward.
Figure: policy iteration loop
Same or opposite: value iteration and policy iteration
Point
Value iteration
Policy iteration
Same or opposite
Each round
One Bellman max update
Full evaluation, then improvement
Opposite
Number of rounds
More
Fewer
Opposite
Needs a model
Yes
Yes
Same
Finds the optimal policy
Yes
Yes
Same
Exam tip. Write the three update rules: value iteration, policy evaluation and TD(0). Draw the evaluate and improve loop of policy iteration. Say that value and policy iteration need the model while TD does not.
“Discuss Bandit Algorithms in details.” (Dec 2020, Nov 2023)
The short answer
A multi-armed bandit problem has one state and k arms, each with an unknown reward. The agent picks arms again and again and must balance exploring new arms with exploiting the best one known.
Write these points
Value of an arm: Q(a) = average reward seen from arm a.
Incremental update: Q(a) = Q(a) + (1 / N(a)) [ R - Q(a) ], where N(a) is how many times a was pulled.
Greedy: always pick the arm with the highest Q. It can get stuck on a poor arm.
Epsilon-greedy: with probability epsilon pick a random arm, else the best arm. Epsilon of 0.1 is common.
Upper Confidence Bound (UCB): pick the arm with the highest Q(a) + c x square root of (ln t / N(a)). Arms tried less get a bonus.
Thompson sampling: keep a probability distribution for each arm, draw a sample from each and pick the highest.
Gradient bandit: learn a preference for each arm and choose with softmax.
Regret: total reward lost compared with always picking the best arm. Good algorithms keep regret low.
Epsilon-greedy step.
Arm A has Q = 4.0 after 3 pulls. A new pull of A gives reward 8.
N becomes 4. New Q = 4.0 + (1/4)(8 minus 4.0) = 5.0.
Real-life example
A food delivery app has to choose which of five new restaurants to show on top. It mostly shows the restaurant with the best rating so far. Sometimes it shows a new one to see if it is even better. Each restaurant is an arm, an order is the reward and this mix is epsilon-greedy.
Figure: epsilon-greedy bandit loop
Same or opposite: epsilon-greedy and UCB
Point
Epsilon-greedy
UCB
Same or opposite
How it explores
Random arm with probability epsilon
Bonus for less tried arms
Opposite
Uses uncertainty
No
Yes
Opposite
Keeps an average reward per arm
Yes
Yes
Same
Balances exploration and exploitation
Yes
Yes
Same
Exam tip. Define the problem with the slot machine picture. Explain exploration and exploitation first. Then give epsilon-greedy and UCB with their formulas.
“Write short notes: Group Normalization” (Dec 2020, Nov 2023)
The short answer
Group normalization (GN) is a normalization layer that splits the channels of each sample into groups and normalizes each group with its own mean and variance. It does not depend on the batch size, so it works well even with batches of 1 or 2.
Write these points
Take one sample with C channels and split the channels into G groups, for example 32 groups.
For each group find the mean mu and variance sigma squared over the channels in the group and all spatial positions.
Scale and shift: y = gamma x_hat + beta, with gamma and beta learned per channel.
Batch normalization fails with small batches because its batch mean is noisy. GN uses no batch statistics.
Special cases: G = 1 gives layer normalization. G = C gives instance normalization.
Uses: object detection and segmentation, where images are large and batches are small.
Method
Statistics computed over
Batch norm
Batch, height, width
Layer norm
All channels, height, width
Instance norm
One channel, height, width
Group norm
Channels of one group, height, width
Group sizes.
A layer has C = 64 channels and G = 32 groups.
Each group has 64 / 32 = 2 channels. The mean and variance are found over those 2 channels and every pixel.
Real-life example
Think of a school that grades each student's subjects in groups: languages, sciences and arts. Marks in each group are compared with the student's own average in that group, not with the whole class. So grading still works even if only one student sits the exam. The student is the sample and the subject groups are the channel groups.
Figure: steps of group normalization
Same or opposite: group normalization and batch normalization
Point
Group norm
Batch norm
Same or opposite
Depends on batch size
No
Yes
Opposite
Statistics over
Channel groups of one sample
Whole batch
Opposite
Learns gamma and beta
Yes
Yes
Same
Works with batch of 1
Yes
No
Opposite
Exam tip. Write the normalization formula and show the four methods in a small table. The key line examiners want is that GN does not depend on batch size.
“What is PCA (Principle Component Analysis) and RNN?” (Nov 2023)
“Write short notes (any three): PCA” (Dec 2020)
The short answer
Principal Component Analysis (PCA) is a method that reduces the number of features by finding new directions, called principal components, along which the data varies the most. The data is then described with only the first few components.
Write these points
Standardize the data: subtract the mean of each feature (and divide by its standard deviation if units differ).
Find the covariance matrix of the features.
Find the eigenvalues and eigenvectors of the covariance matrix.
Sort the eigenvectors by eigenvalue, largest first. The first one is the first principal component.
Choose the top k components, enough to keep most of the variance, for example 95 percent.
Project the data: new data = original data x matrix of the top k eigenvectors.
Components are orthogonal, so the new features are uncorrelated.
Explained variance of a component = its eigenvalue / sum of all eigenvalues.
Uses: shrinking input size before a neural network, plotting high dimension data in 2D, removing noise.
Link to deep learning: a linear autoencoder with squared error learns the same space as PCA.
Limit: PCA finds only linear directions. Autoencoders can find curved ones.
Explained variance.
Eigenvalues are 5, 3, 1.5 and 0.5. Total = 10.
First two components keep (5 + 3) / 10 = 80 percent of the variance, so 4 features can become 2.
Real-life example
A college ranks students by 10 marks, but most of the spread comes from two things: overall study habit and maths skill. PCA finds these two summary scores. Two numbers now describe most of what the ten marks said. The marks are the features and the two scores are the principal components.
Figure: PC1 lies along the spread of the data, PC2 at right angles to itFigure: steps of PCA
Same or opposite: PCA and an autoencoder
Point
PCA
Autoencoder
Same or opposite
Type of mapping
Linear only
Linear or non-linear
Opposite
How it is found
Eigenvectors, exact
Training by gradient descent
Opposite
Reduces dimensions
Yes
Yes
Same
Unsupervised
Yes
Yes
Same
Exam tip. Write the six steps in order and draw a 2D scatter with the first component along the long axis. Mention explained variance with a small number example.
Deep and Reinforcement Learning (CS-702 B) is an elective in Semester 7 of RGPV B.Tech CSE. It goes deeper than the Semester 6 machine learning course: advanced training methods, autoencoders, modern network designs, and reinforcement learning with its algorithms. Build and train small models alongside the theory.
Deep and Reinforcement Learning unit-wise brief
Unit 1: History of deep learning and recurrent networks
This unit starts with the McCulloch Pitts neuron, activation functions, and gradient descent with its variants (momentum, Nesterov, stochastic, AdaGrad, RMSProp and Adam). It then covers recurrent networks: backpropagation through time, vanishing and exploding gradients, GRU and LSTM, encoder-decoder models and attention. Compare the optimisers in a short table.
Unit 2: Autoencoders and regularisation
Here you study autoencoders and their link to PCA, and denoising, sparse and contractive autoencoders. You also learn regularisation: bias-variance trade-off, L2, early stopping, data augmentation, noise injection, ensembles, dropout, and batch, instance and group normalisation.
Unit 3: Pre-training, word vectors and convolutional networks
This unit covers greedy layerwise pre-training, better activation functions and weight initialisation, word vector representations, and convolutional networks such as LeNet, AlexNet, ZF-Net, VGGNet, GoogLeNet and ResNet. It also covers visualising networks with guided backpropagation, Deep Dream and Deep Art. Learn what each famous network added.
Unit 4: Introduction to reinforcement learning
The unit introduces reinforcement learning with bandit algorithms, policy gradient, full reinforcement learning and Markov decision processes, Bellman optimality, dynamic programming (value and policy iteration), Q-learning, temporal difference learning, eligibility traces and function approximation. Learn the Bellman equation well.
Unit 5: Deep reinforcement learning
The last unit covers fitted Q and deep Q-learning, advanced Q-learning, learning from optimal controllers, DQN and policy gradient methods, hierarchical reinforcement learning, POMDPs, actor-critic methods, inverse reinforcement learning and generative adversarial imitation learning. Explain DQN's two key tricks.
Units follow the RGPV scheme and syllabus, B.Tech Computer Science and Engineering, Semester 7 (AICTE flexible curriculum, w.e.f. July 2020) (copy hosted by VIT Bhopal (RGPV-affiliated)). For the full topic list of each unit, open the Deep and Reinforcement Learning notes.
What are the most important topics in Deep and Reinforcement Learning?
By how often they were asked in the papers on this site: Recurrent neural networks, BPTT and gradient problems (3 times); LSTM (and GRU) (3 times); Policy gradient algorithm (3 times); Q function and Q-learning (3 times); Actor-Critic method (3 times).
How were these Deep and Reinforcement Learning important questions chosen?
Each topic was counted from the questions in the past papers listed on this site (2020-2025). Repeated is the number of times the topic came. The counts come from keyword matching and the answers are not teacher-reviewed, so use them together with your syllabus.
Is there a PDF of Deep and Reinforcement Learning important questions with answers?
Yes. The Paperwala Imp Question & Answer PDF for Deep and Reinforcement Learning is free to download from this page.
The 14 most repeated topics of Deep and Reinforcement Learning (CS-702-B) for RGPV B.Tech CSE semester 7, counted from the previous year papers on this site. Deep and Reinforcement Learning is also searched for as CY-802-B.