MauryaHub PYQ Practice

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

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

← 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 / 20 published solutions

Question 2 MSQ · 3.0 marks

Which of the following statements correctly describe the learned reverse process in a DDPM?
6406537408008.
The reverse process is parameterized by a neural network that predicts the noise component at a given timestep.
6406537408009.
The reverse process gradually transforms a noisy sample into a sample resembling the data distribution.
6406537408010.
The reverse process is completely fixed once the forward noise schedule is chosen.
6406537408011.
The neural network is trained to predict the class label of the original clean sample.
6406537408012.
Each reverse step is deterministic and does not involve any randomness.

A published solution is not available for this question yet.

Report a correction for Q2

Question 3 MSQ · 3.0 marks

You are training a Conditional GAN to generate labelled chest X-ray images. The dataset
Source diagram or notation
is small, where
Source diagram or notation
is a one-hot class label (e.g., "pneumonia'' vs. "normal''). Both the generator
Source diagram or notation
and discriminator
Source diagram or notation
are conditioned on
Source diagram or notation
. To improve training, you consider applying the following image augmentation operations to real samples before feeding them to the discriminator: 1. **Random horizontal flip** of the X-ray image 2. **Random Gaussian noise** added to pixel intensities 3. **Global contrast inversion** (replace each pixel
Source diagram or notation
with
Source diagram or notation
) 4. **Random crop and resize** to the original resolution The goal is to augment the training distribution of
Source diagram or notation
without distorting the class-conditional structure
Source diagram or notation
that the discriminator must learn to classify. Which augmentation operations are appropriate for this setting? Select **all** that apply.
6406537408013.
Random horizontal flip - preserves anatomical class-discriminative features in X-rays and increases effective dataset size without corrupting the label
Source diagram or notation
.
6406537408014.
Random Gaussian noise - introduces realistic sensor-level variation consistent with imaging conditions; the class label
Source diagram or notation
is unaffected by low-magnitude pixel-level noise.
6406537408015.
Global contrast inversion - this inverts the radiological convention (bone appears dark instead of bright).
6406537408016.
Random crop and resize - crops preserve local texture statistics while varying the global composition, increasing effective sample diversity without altering the class label
Source diagram or notation
.

A published solution is not available for this question yet.

Report a correction for Q3

Question 4 MSQ · 3.0 marks

Trajectories are collected under
Source diagram or notation
. The importance-sampling surrogate and PPO clipped objectives are:
Source diagram or notation
where
Source diagram or notation
. For a single step:
Source diagram or notation
,
Source diagram or notation
,
Source diagram or notation
,
Source diagram or notation
. What is the effect of this clip on the gradient update to
Source diagram or notation
? Select all that apply.
6406537408030.
The gradient is doubled because the clipped ratio is larger than 1.
6406537408031.
The gradient from
Source diagram or notation
with respect to
Source diagram or notation
is zero for this step.
6406537408032.
The clip reverses the sign of the gradient, decreasing
Source diagram or notation
.
6406537408033.
The gradient is unchanged.

A published solution is not available for this question yet.

Report a correction for Q4

Question 5 MSQ · 3.0 marks

Which among the following about DDPM and DDIM are correct?
6406537408040.
Both DDPM and DDIM require simulating a Markov chain for many steps in order to produce a sample.
6406537408041.
Both DDPM and DDIM follow the same process for training.
6406537408042.
DDIM produces higher-quality samples than DDPM only when the number of sampling steps is very large.
6406537408043.
DDIM accelerates sampling by randomly dropping selected denoising steps while keeping the Markovian transition structure.
6406537408044.
The objective function for both DDPM and DDIM are same.
6406537408045.
The forward process in DDIM is a first-order Markov chain while the reverse process is non-Markovian.
6406537408046.
DDIM re-trains only the final layer of the DDPM network.

A published solution is not available for this question yet.

Report a correction for Q5

Question 6 MCQ · 2.0 marks

In classifier-free guidance, the conditional score is approximated as:
Source diagram or notation
where
Source diagram or notation
is a hyperparameter. Which option correctly identifies the key advantage of this approach over classifier guidance?
6406537408017.
It trains a separate classifier on clean images to provide the gradient
Source diagram or notation
at each noise level.
6406537408018.
It conditions generation purely on the unconditional score, removing the need for any class label
Source diagram or notation
.
6406537408019.
It eliminates the need for a separately trained classifier by running the same U-Net twice.
6406537408020.
It replaces the U-Net with a lightweight classifier that predicts
Source diagram or notation
directly from
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

A Transformer uses sinusoidal positional encodings instead of learned positional embeddings. Which statement best explains why sinusoidal encodings can be used for sequence lengths not seen during training?
6406537408025.
Require retraining to extend to longer sequences.
6406537408026.
Enable length extrapolation without retraining.
6406537408027.
Directly encode relative positions via learned per-head bias.
6406537408028.
Remove the need for token embeddings.
6406537408029.
The sinusoidal functions are orthogonal to all token embeddings, so they do not interfere with semantic information regardless of sequence length.

A published solution is not available for this question yet.

Report a correction for Q7

Question 8 MCQ · 2.0 marks

A practitioner wants to use a trained GAN - consisting of a generator
Source diagram or notation
and an encoder (invertor)
Source diagram or notation
- to edit a real image
Source diagram or notation
by manipulating its latent code. Which sequence of steps correctly implements this editing pipeline?
6406537408060.
Apply the edit directly to the pixels of
Source diagram or notation
; the encoder
Source diagram or notation
and generator
Source diagram or notation
are not involved.
6406537408061.
Invert: obtain the latent code
Source diagram or notation
corresponding to
Source diagram or notation
. Edit: apply the desired transformation in latent space,
Source diagram or notation
. Decode: generate the edited image,
Source diagram or notation
.
6406537408062.
Generate first:
Source diagram or notation
, treating
Source diagram or notation
itself as a latent code. Invert: then apply
Source diagram or notation
to
Source diagram or notation
to obtain the edited image.
6406537408063.
Fine-tune the discriminator weights
Source diagram or notation
on
Source diagram or notation
until
Source diagram or notation
outputs the desired edited image directly.

A published solution is not available for this question yet.

Report a correction for Q8

Question 9 MCQ · 3.0 marks

A transformer block has model dimension
Source diagram or notation
and
Source diagram or notation
attention heads with per-head dimension
Source diagram or notation
. Each head
Source diagram or notation
has projection matrices
Source diagram or notation
. In a single-head setup (
Source diagram or notation
,
Source diagram or notation
), there is one set
Source diagram or notation
. Excluding biases, which of the following is correct?
6406537408021.
The multi-head setup has more parameters in the query, key, and value projection matrices than single-head.
6406537408022.
The multi-head setup has fewer parameters in the query, key, and value projection matrices than single-head.
6406537408023.
Both setups have the same total number of parameters in the query, key, and value projection matrices.
6406537408024.
The comparison depends on the sequence length
Source diagram or notation
and cannot be determined from the given information.

A published solution is not available for this question yet.

Report a correction for Q9

Question 10 NAT · 2.0 marks

A single transformer layer has model dimension
Source diagram or notation
,
Source diagram or notation
attention heads with
Source diagram or notation
. The layer includes all query, key, and value projection matrices
Source diagram or notation
for
Source diagram or notation
, an output projection
Source diagram or notation
, and a two-layer position-wise fully connected layer (FCL) with weights
Source diagram or notation
and
Source diagram or notation
. All biases are ignored. The total number of learnable parameters in this layer is
Source diagram or notation
. Compute the FCL hidden dimension
Source diagram or notation
.

A published solution is not available for this question yet.

Report a correction for Q10

Question 11 MSQ · 4.0 marks

Let
Source diagram or notation
be a value function,
Source diagram or notation
be a
Source diagram or notation
-function and
Source diagram or notation
be the advantage function for state
Source diagram or notation
and action
Source diagram or notation
. Then, which of the following are correct?
6406537408035.
Policy weighted average advantage
Source diagram or notation
for every state
Source diagram or notation
.
6406537408036.
If
Source diagram or notation
, the policy gradient update increases the policy
Source diagram or notation
; if
Source diagram or notation
, it decreases the policy
Source diagram or notation
.
6406537408037.Source diagram or notation
can be negative for all actions
Source diagram or notation
in some state
Source diagram or notation
.
6406537408038.Source diagram or notation
is an unbiased single-sample estimator of
Source diagram or notation
, where
Source diagram or notation
is the reward-to-go from time
Source diagram or notation
.
6406537408039.
The policy gradient update is
Source diagram or notation
always increases
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 Q11

Question 12 NAT · 3.0 marks

A language model policy generates a response of length 4. A single trajectory yields the data below. The discount factor is
Source diagram or notation
.
Source diagram or notation
Based on the above data, answer the given subquestions.
Using the backwards recursion
Source diagram or notation
, compute
Source diagram or notation
, where
Source diagram or notation
denotes the reward-to- go. Enter the answer correct to two decimal places.

A published solution is not available for this question yet.

Report a correction for Q12

Question 13 NAT · 3.0 marks

A language model policy generates a response of length 4. A single trajectory yields the data below. The discount factor is
Source diagram or notation
.
Source diagram or notation
Based on the above data, answer the given subquestions.
Source diagram or notation
Compute
Source diagram or notation
for each
Source diagram or notation
, then compute the policy gradient estimate . Enter the answer correct to three decimal places.

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 . 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 attention weight assigned to the third position, 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 · 1.0 marks

A DDPM is trained with the
Source diagram or notation
-prediction parameterization. The forward process corrupts data as:
Source diagram or notation
The model learns a noise predictor
Source diagram or notation
, which is equivalent to predicting the score function of the noisy marginal
Source diagram or notation
via :
Source diagram or notation
Following are the values given:
Source diagram or notation
, true data point
Source diagram or notation
, sampled noise
Source diagram or notation
. The trained model predicts
Source diagram or notation
. Based on the above data, answer the given subquestions.
Compute the noisy observation
Source diagram or notation
produced by the forward process.

A published solution is not available for this question yet.

Report a correction for Q17

Question 18 NAT · 2.0 marks

A DDPM is trained with the
Source diagram or notation
-prediction parameterization. The forward process corrupts data as:
Source diagram or notation
The model learns a noise predictor
Source diagram or notation
, which is equivalent to predicting the score function of the noisy marginal
Source diagram or notation
via :
Source diagram or notation
Following are the values given:
Source diagram or notation
, true data point
Source diagram or notation
, sampled noise
Source diagram or notation
. The trained model predicts
Source diagram or notation
. Based on the above data, answer the given subquestions.
Compute the model's predicted clean data point
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 Q18

Question 19 NAT · 2.0 marks

A DDPM is trained with the
Source diagram or notation
-prediction parameterization. The forward process corrupts data as:
Source diagram or notation
The model learns a noise predictor
Source diagram or notation
, which is equivalent to predicting the score function of the noisy marginal
Source diagram or notation
via :
Source diagram or notation
Following are the values given:
Source diagram or notation
, true data point
Source diagram or notation
, sampled noise
Source diagram or notation
. The trained model predicts
Source diagram or notation
. Based on the above data, answer the given subquestions.
Compute both the noise-prediction error
Source diagram or notation
and the data-prediction error
Source diagram or notation
, and compute their ratio:
Source diagram or notation
Express the answer correct to two decimal places.

A published solution is not available for this question yet.

Report a correction for Q19

Question 20 NAT · 1.0 marks

A model is trained with
Source diagram or notation
diffusion steps. Using DDIM, samples are generated along a sub-sequence
Source diagram or notation
of length
Source diagram or notation
(each step is one network evaluation). How many network evaluations does one DDIM sample require?

A published solution is not available for this question yet.

Report a correction for Q20

Question 21 MSQ · 2.0 marks

In a DDPM, the forward process is
Source diagram or notation
Source diagram or notation
. At a particular timestep,
Source diagram or notation
. Which of the following statements are correct?
6406537408056.
The noise coefficient
Source diagram or notation
exceeds the signal coefficient
Source diagram or notation
, so noise dominates the representation at this timestep.
6406537408057.
The signal coefficient
Source diagram or notation
exceeds the noise coefficient
Source diagram or notation
, so signal dominates the representation at this timestep.
6406537408058.
The signal-to-noise ratio
Source diagram or notation
is greater than
Source diagram or notation
, indicating the original data still dominates.
6406537408059.
As the forward process progresses,
Source diagram or notation
converges to pure Gaussian noise
Source diagram or notation
.

A published solution is not available for this question yet.

Report a correction for Q21