MauryaHub PYQ Practice

Mathematical Foundations of Generative AI · End Term · May 2026 · FN

Mathematical Foundations of Generative AI · End Term · May 2026 FN

← Course papers · Start practice / exam

Questions and published explanations below are available without starting a test. Some questions may not have a published solution yet.

0 / 19 published solutions

Question 2 NAT · 2.0 marks

An agent receives rewards
Source diagram or notation
over an episode (
Source diagram or notation
) with the discount factor equal to 0.5. Compute the full discounted return
Source diagram or notation
for the trajectory
Source diagram or notation
. Enter your answer correct to three decimal places.

A published solution is not available for this question yet.

Report a correction for Q2

Question 3 MSQ · 3.0 marks

Source diagram or notation
6406537372413.
Both TRPO and PPO aim to prevent the updated policy from deviating too far from
Source diagram or notation
.
6406537372414.
PPO always produces a smaller policy update than TRPO for the same
Source diagram or notation
and
Source diagram or notation
.
6406537372415.
When
Source diagram or notation
is within
Source diagram or notation
, the PPO clip is inactive and
Source diagram or notation
reduces to the unclipped surrogate
Source diagram or notation
.
6406537372416.
Computing the PPO objective requires solving a constrained optimisation subproblem at each step, making it more expensive than TRPO.

A published solution is not available for this question yet.

Report a correction for Q3

Question 4 MSQ · 3.0 marks

In Proximal Policy Optimization (PPO), the clipped surrogate objective for a single state-action pair is:
Source diagram or notation
Which of the following statements are correct?
6406537372417.
When
Source diagram or notation
and
Source diagram or notation
, the clipped objective prevents the gradient from further increasing
Source diagram or notation
, effectively imposing a trust region.
6406537372418.
When
Source diagram or notation
and
Source diagram or notation
, the clipped objective prevents the gradient from further decreasing
Source diagram or notation
.
6406537372419.
The clipping mechanism is equivalent to adding an explicit KL-divergence penalty
Source diagram or notation
to the objective.
6406537372420.
If
Source diagram or notation
, then
Source diagram or notation
regardless of the sign of
Source diagram or notation
.

A published solution is not available for this question yet.

Report a correction for Q4

Question 5 MSQ · 3.0 marks

In multi-head self-attention with
Source diagram or notation
heads, the queries, keys, and values for each head have dimension
Source diagram or notation
where
Source diagram or notation
is the model dimension. Which of the following correctly explain why this choice makes the implementation efficient?
6406537372421.
Choosing
Source diagram or notation
ensures that every head learns the same attention pattern while reducing the number of parameters.
6406537372422.
The total parameters across
Source diagram or notation
query projections
Source diagram or notation
equal
Source diagram or notation
, the same as a single-head projection
Source diagram or notation
. The same holds for key and value projections.
6406537372423.
Since
Source diagram or notation
, all
Source diagram or notation
heads can be computed as a single batched matrix multiplication, enabling parallel execution across heads on a GPU.
6406537372424.
Using
Source diagram or notation
, the total computational cost across all
Source diagram or notation
heads is reduced by a factor of
Source diagram or notation
compared to single-head attention with
Source diagram or notation
.

A published solution is not available for this question yet.

Report a correction for Q5

Question 6 NAT · 3.0 marks

Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q6

Question 7 MCQ · 2.0 marks

What is the role of layer normalization in a transformer block?
6406537372426.
It eliminates the need for residual connections.
6406537372427.
It normalizes the hidden representation across its features for each token, helping maintain a stable scale of activations during training.
6406537372428.
It normalizes the hidden representations across different examples in a mini- batch.
6406537372429.
It introduces the nonlinearity needed by the transformer through a learnable activation function.

A published solution is not available for this question yet.

Report a correction for Q7

Question 8 MCQ · 2.0 marks

Which among the following is true for a VAE and a diffusion model?
6406537372451.
Both models use an encoder and decoder to map between the input and a low-dimensional representation.
6406537372452.
Both the encoder and decoder are learned in VAE and diffusion.
6406537372453.
The hidden variables in a diffusion model are deterministic, whereas the latent variable in a VAE is stochastic.
6406537372454.
Both VAE and diffusion model use stochastic latent representations.

A published solution is not available for this question yet.

Report a correction for Q8

Question 9 MSQ · 2.0 marks

Which of the following statements about Denoising Diffusion Implicit Models (DDIMs) are correct? Select all that apply.
6406537372430.
The forward process is non-Markovian, unlike the Markovian forward process in DDPM.
6406537372431.
DDIM achieves a tighter ELBO than DDPM.
6406537372432.
DDIM requires a separate training procedure from DDPM.
6406537372433.
When
Source diagram or notation
for all
Source diagram or notation
, the DDIM sampling process is deterministic.

A published solution is not available for this question yet.

Report a correction for Q9

Question 10 MSQ · 2.0 marks

Consider two DDPMs at the same timestep
Source diagram or notation
. For Model A,
Source diagram or notation
, while for Model B,
Source diagram or notation
. Recall that
Source diagram or notation
Which of the following statements are correct?
6406537372443.
The sample
Source diagram or notation
of Model A is more strongly influenced by the original sample
Source diagram or notation
than that of Model B.
6406537372444.
The sample
Source diagram or notation
of Model B is closer to
Source diagram or notation
than that of Model A.
6406537372445.
As
Source diagram or notation
decreases, the contribution of
Source diagram or notation
to
Source diagram or notation
increases.
6406537372446.
Model B produces a noisier representation at timestep
Source diagram or notation
than Model A.

A published solution is not available for this question yet.

Report a correction for Q10

Question 11 MSQ · 2.0 marks

Which of the following statements correctly describe the forward diffusion process in a DDPM?
6406537372447.
The forward process gradually corrupts
Source diagram or notation
by adding Gaussian noise according to a predefined noise schedule.
6406537372448.
The parameters of the forward process are learned using the training data.
6406537372449.
The forward process requires a neural network to predict the noise added at every timestep.
6406537372450.
Given
Source diagram or notation
,
Source diagram or notation
can be sampled directly without simulating all intermediate timesteps.

A published solution is not available for this question yet.

Report a correction for Q11

Question 12 MSQ · 2.0 marks

You are training a GAN with generator
Source diagram or notation
,
Source diagram or notation
, to generate handwritten digit images spanning all 10 digit classes. After training, you suspect that
Source diagram or notation
has not converged to
Source diagram or notation
and that the generator is suffering from mode collapse. Which of the following could be indicators of this problem? Select all that apply.
6406537372455.
Samples
Source diagram or notation
for many different
Source diagram or notation
all resemble the digit "3".
6406537372456.
The discriminator loss
Source diagram or notation
drops close to zero while the generator loss
Source diagram or notation
remains persistently high.
6406537372457.
The discriminator loss remains persistently high while the generator loss drops to zero.
6406537372458.
The generator loss and discriminator loss both decrease monotonically to zero, indicating the adversarial objective
Source diagram or notation
has reached a global saddle point.

A published solution is not available for this question yet.

Report a correction for Q12

Question 13 MSQ · 5.0 marks

Source diagram or notation
6406537372434.Source diagram or notation
: both actions are equally good relative to the policy average in state B, so no policy gradient update will change
Source diagram or notation
.
6406537372435.
In state C, action
Source diagram or notation
has a higher advantage than action
Source diagram or notation
; so a policy gradient update increases
Source diagram or notation
and decreases
Source diagram or notation
.
6406537372436.
In state C, action
Source diagram or notation
has a higher advantage than action
Source diagram or notation
; so a policy gradient update decreases
Source diagram or notation
and increases
Source diagram or notation
.
6406537372437.
If a sampled trajectory from state
Source diagram or notation
yields the discounted return
Source diagram or notation
, then the estimated advantage
Source diagram or notation
; so the policy gradient update will decrease
Source diagram or notation
.
6406537372438.
If a sampled trajectory from state
Source diagram or notation
yields the discounted return
Source diagram or notation
, then the estimated advantage
Source diagram or notation
; so the policy gradient update will increase
Source diagram or notation
.
6406537372439.
The expected return obtained by taking
Source diagram or notation
in state
Source diagram or notation
must be negative.

A published solution is not available for this question yet.

Report a correction for Q13

Question 14 NAT · 3.0 marks

A transformer processes a sequence of
Source diagram or notation
tokens with model dimension
Source diagram or notation
using
Source diagram or notation
attention heads, each with
Source diagram or notation
. The input embedding matrix is:
Source diagram or notation
Head 1 uses projections:
Source diagram or notation
Head 2 uses projections:
Source diagram or notation
Use
Source diagram or notation
for scaling. All biases are zero. Based on the above data, answer the given subquestions.
Source diagram or notation
Compute
Source diagram or notation
,
Source diagram or notation
,
Source diagram or notation
for Head 1 and the scaled score matrix , and enter the value of the
Source diagram or notation
entry of
Source diagram or notation
. Enter the answer correct to two decimal places.

A published solution is not available for this question yet.

Report a correction for Q14

Question 15 NAT · 3.0 marks

A transformer processes a sequence of
Source diagram or notation
tokens with model dimension
Source diagram or notation
using
Source diagram or notation
attention heads, each with
Source diagram or notation
. The input embedding matrix is:
Source diagram or notation
Head 1 uses projections:
Source diagram or notation
Head 2 uses projections:
Source diagram or notation
Use
Source diagram or notation
for scaling. All biases are zero. Based on the above data, answer the given subquestions.
Causal masking is applied on
Source diagram or notation
. Compute the attention weights for the third query and enter the value of the largest weight among the three, correct to two decimal places.

A published solution is not available for this question yet.

Report a correction for Q15

Question 16 NAT · 3.0 marks

A transformer processes a sequence of
Source diagram or notation
tokens with model dimension
Source diagram or notation
using
Source diagram or notation
attention heads, each with
Source diagram or notation
. The input embedding matrix is:
Source diagram or notation
Head 1 uses projections:
Source diagram or notation
Head 2 uses projections:
Source diagram or notation
Use
Source diagram or notation
for scaling. All biases are zero. Based on the above data, answer the given subquestions.
Using causal masking, compute the attention outputs for the third token from both heads and concatenate them as
Source diagram or notation
Enter the fourth entry of the third row of
Source diagram or notation
. Enter the answer correct to two decimal places.

A published solution is not available for this question yet.

Report a correction for Q16

Question 17 NAT · 3.0 marks

In classifier-free guidance, a single diffusion model is jointly trained for both conditional and unconditional generation. During training, the conditioning information
Source diagram or notation
is randomly replaced with a null token
Source diagram or notation
with probability
Source diagram or notation
. During sampling at timestep
Source diagram or notation
, the model produces two noise predictions: 1. Conditional prediction:
Source diagram or notation
(model receives conditioning
Source diagram or notation
) 2. Unconditional prediction:
Source diagram or notation
(model receives null token) The classifier-free guided noise prediction is defined as :
Source diagram or notation
where
Source diagram or notation
is the guidance scale. This follows from the guided score formulation:
Source diagram or notation
Source diagram or notation
The predicted clean data point is recovered via . Following are the values given:
Source diagram or notation
Based on the above data, answer the given subquestions.
Compute the predicted clean data point
Source diagram or notation
. Enter the answer correct to one decimal place.

A published solution is not available for this question yet.

Report a correction for Q17

Question 18 MCQ · 2.0 marks

In classifier-free guidance, a single diffusion model is jointly trained for both conditional and unconditional generation. During training, the conditioning information
Source diagram or notation
is randomly replaced with a null token
Source diagram or notation
with probability
Source diagram or notation
. During sampling at timestep
Source diagram or notation
, the model produces two noise predictions: 1. Conditional prediction:
Source diagram or notation
(model receives conditioning
Source diagram or notation
) 2. Unconditional prediction:
Source diagram or notation
(model receives null token) The classifier-free guided noise prediction is defined as :
Source diagram or notation
where
Source diagram or notation
is the guidance scale. This follows from the guided score formulation:
Source diagram or notation
Source diagram or notation
The predicted clean data point is recovered via . Following are the values given:
Source diagram or notation
Based on the above data, answer the given subquestions.
If the guidance scale is set to
Source diagram or notation
, which of the following correctly describes the effect on
Source diagram or notation
and
Source diagram or notation
?
6406537372460.Source diagram or notation
reduces to the conditional prediction
Source diagram or notation
alone, giving
Source diagram or notation
.
6406537372461.Source diagram or notation
reduces to the unconditional prediction
Source diagram or notation
alone, giving
Source diagram or notation
.
6406537372462.Source diagram or notation
reduces to the conditional prediction
Source diagram or notation
alone, giving
Source diagram or notation
.
6406537372463.Source diagram or notation
remains unchanged from
Source diagram or notation
case because the guidance scale only affects the output projection layer of the U-Net.

A published solution is not available for this question yet.

Report a correction for Q18

Question 19 NAT · 4.0 marks

Consider a 1-dimensional VAE with: 1. Encoder:
Source diagram or notation
,
Source diagram or notation
,
Source diagram or notation
2. Decoder:
Source diagram or notation
, with fixed decoder variance
Source diagram or notation
Use the reparameterization trick to express the latent sample
Source diagram or notation
. The reconstruction loss
Source diagram or notation
for a single sample is given by
Source diagram or notation
. Following are the values given:
Source diagram or notation
, input
Source diagram or notation
, sampled noise
Source diagram or notation
. Compute
Source diagram or notation
. Enter the answer correct to three decimal places.

A published solution is not available for this question yet.

Report a correction for Q19

Question 20 MCQ · 1.0 marks

Inference in DDPM is much slower as compared to GAN or VAE.
6406537372465.
True
6406537372466.
False

A published solution is not available for this question yet.

Report a correction for Q20