Home / Study library / Mathematical Foundations of Generative AI / End Term · May 2026 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
Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10 Q11 Q12 Q13 Q14 Q15 Q16 Q17 Q18 Q19 Q20 Q21
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
is small, where
is a one-hot class label (e.g., "pneumonia'' vs. "normal''). Both
the generator
and discriminator
are conditioned on
. 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
with
)
4. **Random crop and resize** to the original resolution
The goal is to augment the training distribution of
without distorting the class-conditional
structure
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
.
6406537408014. Random Gaussian noise - introduces realistic sensor-level variation consistent
with imaging conditions; the class label
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
.
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
. The importance-sampling surrogate and PPO clipped
objectives are:
where
.
For a single step:
,
,
,
. What is the effect of
this clip on the gradient update to
? Select all that apply.
6406537408030. The gradient is doubled because the clipped ratio is larger than 1.
6406537408031. The gradient from
with respect to
is zero for this step.
6406537408032. The clip reverses the sign of the gradient, decreasing
.
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:
where
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
at each noise level.
6406537408018. It conditions generation purely on the unconditional score, removing the need
for any class label
.
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
directly from
.
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
and an
encoder (invertor)
- to edit a real image
by manipulating its latent code.
Which sequence of steps correctly implements this editing pipeline?
6406537408060. Apply the edit directly to the pixels of
; the encoder
and generator
are
not involved.
6406537408061. Invert: obtain the latent code
corresponding to
. Edit: apply the
desired transformation in latent space,
. Decode: generate the edited image,
.
6406537408062. Generate first:
, treating
itself as a latent code. Invert: then
apply
to
to obtain the edited image.
6406537408063. Fine-tune the discriminator weights
on
until
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
and
attention heads with per-head
dimension
. Each head
has projection matrices
. In a single-head setup (
,
), there is one
set
. 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
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
,
attention heads with
. The layer includes all query, key, and value projection matrices
for
, an output projection
,
and a two-layer position-wise fully connected layer (FCL) with weights
and
. All biases are ignored. The total number of learnable parameters in this layer
is
. Compute the FCL hidden dimension
.
A published solution is not available for this question yet.
Report a correction for Q10
Question 11 MSQ · 4.0 marks Let
be a value function,
be a
-function and
be the
advantage function for state
and action
. Then, which of the following are correct?
6406537408035. Policy weighted average advantage
for every state
.
6406537408036. If
, the policy gradient update increases the policy
; if
, it decreases the policy
.
6406537408037. can be negative for all actions
in some state
.
6406537408038. is an unbiased single-sample estimator of
, where
is
the reward-to-go from time
.
6406537408039. The policy gradient update is
always increases
regardless of the sign of
.
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
.
Based on the above data, answer the given subquestions.
Using the backwards recursion
, compute
, where
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
.
Based on the above data, answer the given subquestions.
Compute
for each
, 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
tokens with model dimension
using
attention heads, each with
.
The input embedding matrix is:
Head 1 uses projections:
Head 2 uses projections:
Use
for scaling. All biases are zero.
Based on the above data, answer the given subquestions.
Compute
,
,
for Head 1 and the scaled score matrix . Enter the value of the
entry of
. 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
tokens with model dimension
using
attention heads, each with
.
The input embedding matrix is:
Head 1 uses projections:
Head 2 uses projections:
Use
for scaling. All biases are zero.
Based on the above data, answer the given subquestions.
Causal masking is applied on
. 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
tokens with model dimension
using
attention heads, each with
.
The input embedding matrix is:
Head 1 uses projections:
Head 2 uses projections:
Use
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
Enter the fourth entry of the third row of
. 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
-prediction parameterization. The forward process corrupts data as:
The model learns a noise predictor
, which is equivalent to predicting the score function of
the noisy marginal
via :
Following are the values given:
, true data point
, sampled noise
.
The trained model predicts
.
Based on the above data, answer the given subquestions.
Compute the noisy observation
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
-prediction parameterization. The forward process corrupts data as:
The model learns a noise predictor
, which is equivalent to predicting the score function of
the noisy marginal
via :
Following are the values given:
, true data point
, sampled noise
.
The trained model predicts
.
Based on the above data, answer the given subquestions.
Compute the model's predicted clean data point
. 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
-prediction parameterization. The forward process corrupts data as:
The model learns a noise predictor
, which is equivalent to predicting the score function of
the noisy marginal
via :
Following are the values given:
, true data point
, sampled noise
.
The trained model predicts
.
Based on the above data, answer the given subquestions.
Compute both the noise-prediction error
and the data-prediction error
,
and compute their ratio:
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
diffusion steps. Using DDIM, samples are generated along a
sub-sequence
of length
(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
. At a particular
timestep,
. Which of the following statements are correct?
6406537408056. The noise coefficient
exceeds the signal coefficient
, so noise
dominates the representation at this timestep.
6406537408057. The signal coefficient
exceeds the noise coefficient
, so signal
dominates the representation at this timestep.
6406537408058. The signal-to-noise ratio
is greater than
, indicating the original
data still dominates.
6406537408059. As the forward process progresses,
converges to pure Gaussian noise
.
A published solution is not available for this question yet.
Report a correction for Q21