Home / Study library / Mathematical Foundations of Generative AI / End Term · Jan 2026 Mathematical Foundations of Generative AI · End Term · Jan 2026 · FN
Mathematical Foundations of Generative AI · End Term · Jan 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 / 21 published solutions
Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10 Q11 Q12 Q13 Q14 Q15 Q16 Q17 Q18 Q19 Q20 Q21 Q22
Question 2 MSQ · 2.0 marks Which of the following statements about the KL divergence is true?
6406536961778. When two distributions are identical, KL divergence between them is
maximized.
6406536961779. When two distributions are identical, KL divergence between them is
minimized.
6406536961780. KL divergence between any two distributions will always lie between 0 and 1.
6406536961781. Maximizing the ELBO for a Variational Autoencoder (VAE) involves minimizing
the KL divergence between the approximate posterior and the prior.
A published solution is not available for this question yet.
Report a correction for Q2
Question 3 MSQ · 2.0 marks Consider a Generative Adversarial Network (GAN) trained to generate realistic images of cars.
Which of the following statements are true?
6406536961782. The generator tries to approximate the underlying distribution of car images.
6406536961783. The discriminator provides a probability that an input image is real or
generated.
6406536961784. At convergence, the discriminator is able to perfectly distinguish real and
generated car images.
6406536961785. The trained generator can produce novel car images that were not present in
the training dataset.
6406536961786. The generator directly maximizes the likelihood of the training data.
A published solution is not available for this question yet.
Report a correction for Q3
Question 4 NAT · 3.0 marks Consider a GAN where the training dataset contains three times as many car images as bike
images. Suppose the generator has learned to produce only high-quality car images that are
indistinguishable from real ones. The discriminator is trained to output the probability that an
input image is real. What is the optimal output of the discriminator when given a car image? Enter
the answer correct to two decimal places.
A published solution is not available for this question yet.
Report a correction for Q4
Question 5 NAT · 3.0 marks A Gaussian Mixture Model has two components,
and
, with prior probabilities
. The components are 1D Gaussians with parameters
and
. For a data point
, calculate the responsibility (posterior probability) of
component
for this point, i.e.,
. Provide the answer to three decimal places.
A published solution is not available for this question yet.
Report a correction for Q5
Question 6 MCQ · 3.0 marks Consider a VAE where we gradually increase the weight of the KL divergence term in the ELBO loss
function (i.e., increase the
parameter in
-VAE where the loss is
). Assume a standard normal prior,
. As
gradually increases from 0, what happens to the learned latent representations?
6406536961788. The distribution
approaches
but reconstructions become
worse.
6406536961789. The distribution
goes farther from
and reconstructions
become better.
6406536961790. The distribution
approaches
and reconstructions become
better.
6406536961791. The distribution
goes farther from
and reconstructions
become worse.
A published solution is not available for this question yet.
Report a correction for Q6
Question 7 MCQ · 2.0 marks For a fixed input size and embedding dimension
, consider standard multi-head attention where
the embedding dimension is evenly split across heads. Select the correct statements from the
following:
6406536961793. Query, key, and value projection layers in multi-head attention and single-
head attention contain an equal number of total learnable parameters.
6406536961794. Query, key, and value projection layers in multi-head attention contain more
learnable parameters than those in single-head attention.
6406536961795. Query, key, and value projection layers in multi-head attention contain fewer
learnable parameters than those in single-head attention.
A published solution is not available for this question yet.
Report a correction for Q7
Question 8 MSQ · 3.0 marks In the context of the Transformer model's encoder-decoder architecture, which of the following
statements are accurate?
6406536961796. The encoder in a Transformer model is responsible for converting the input
sequence into a continuous representation that the decoder can then use to generate the output
sequence.
6406536961797. The decoder in a Transformer model only attends to the encoder's output
without any form of self-attention on its own inputs.
6406536961798. Multi-head attention in the encoder allows the model to jointly attend to
information from different representations at different positions.
6406536961799. The decoder's self-attention mechanism includes a masking component to
prevent attending to future positions, ensuring the model generates outputs one step at a time.
A published solution is not available for this question yet.
Report a correction for Q8
Question 9 NAT · 3.0 marks A sequence of length
is represented by
where each row of
represents a token. The attention module uses
Thus
Each row of
and
correspond to the representation of a single input token. Use
and scaling by
.
Based on the above data, answer the given subquestions.
Let the scaled scores for query
be defined as . Compute the
norm of
this vector. Enter the answer correct to two decimal places.
A published solution is not available for this question yet.
Report a correction for Q9
Question 10 MCQ · 3.0 marks A sequence of length
is represented by
where each row of
represents a token. The attention module uses
Thus
Each row of
and
correspond to the representation of a single input token. Use
and scaling by
.
Based on the above data, answer the given subquestions.
Compute the attention output vector for the second token.
6406536961801. 6406536961802. 6406536961803. 6406536961804. A published solution is not available for this question yet.
Report a correction for Q10
Question 11 MCQ · 1.0 marks A decoder has sequence of length
and pre-mask scaled score matrix
Causal masking is applied to the scores exactly as in autoregressive transformers. The masking
uses
for the mask matrix
.Use
Based on the above data, answer the given subquestions.
Which of the following is the masked score vector for the third query?
6406536961805. 6406536961806. 6406536961807. 6406536961808. A published solution is not available for this question yet.
Report a correction for Q11
Question 12 NAT · 3.0 marks A decoder has sequence of length
and pre-mask scaled score matrix
Causal masking is applied to the scores exactly as in autoregressive transformers. The masking
uses
for the mask matrix
.Use
Based on the above data, answer the given subquestions.
For token 4, compute the attention probability assigned jointly to positions 1 and 2. Use the
masked attention weights. Enter the answer correct to three decimal places.
A published solution is not available for this question yet.
Report a correction for Q12
Question 13 MCQ · 4.0 marks
Based on the above data, answer the given subquestions.
Find the mean and variance of
.
6406536961810. Mean
, Variance
6406536961811. Mean
, Variance
6406536961812. Mean
, Variance
6406536961813. Mean
, Variance
A published solution is not available for this question yet.
Report a correction for Q13
Question 14 NAT · 3.0 marks
Based on the above data, answer the given subquestions.
Compute the second coordinate of the final layer-normalized output. Enter the answer correct to
three decimal places.
A published solution is not available for this question yet.
Report a correction for Q14
Question 15 NAT · 2.0 marks A language model is treated as a policy that generates a response of length 4. The rewards are
with discount factor
. Suppose the state-value estimates are
The sampled log-policy gradient scalars
are given as
Based on the above data, answer the given subquestions.
Compute the full discounted return
Enter the answer correct to
three decimal places.
A published solution is not available for this question yet.
Report a correction for Q15
Question 16 NAT · 2.0 marks A language model is treated as a policy that generates a response of length 4. The rewards are
with discount factor
. Suppose the state-value estimates are
The sampled log-policy gradient scalars
are given as
Based on the above data, answer the given subquestions.
Compute 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 Q16
Question 17 NAT · 3.0 marks A language model is treated as a policy that generates a response of length 4. The rewards are
with discount factor
. Suppose the state-value estimates are
The sampled log-policy gradient scalars
are given as
Based on the above data, answer the given subquestions.
Compute the gradient estimate
where
is the advantage estimate given by
Enter the answer correct to
three decimal places.
A published solution is not available for this question yet.
Report a correction for Q17
Question 18 NAT · 1.0 marks
Based on the above data, answer the given subquestions.
Compute the importance sampling ratio
for time step
. Enter the answer correct to one
decimal place.
A published solution is not available for this question yet.
Report a correction for Q18
Question 19 NAT · 2.0 marks
Based on the above data, answer the given subquestions.
Compute the clipped surrogate contribution at time 0. Enter the answer correct to one decimal
place.
A published solution is not available for this question yet.
Report a correction for Q19
Question 20 NAT · 2.0 marks
Based on the above data, answer the given subquestions.
Compute the clipped surrogate contribution at time 1. Enter the answer correct to two decimal
places.
A published solution is not available for this question yet.
Report a correction for Q20
Question 21 NAT · 2.0 marks
Based on the above data, answer the given subquestions.
Compute the clipped surrogate contribution at time 2. Enter the answer correct to one decimal
place.
A published solution is not available for this question yet.
Report a correction for Q21
Question 22 NAT · 1.0 marks
Based on the above data, answer the given subquestions.
Compute the total PPO clipped objective contribution over the three time steps. Enter the answer
correct to two decimal places.
A published solution is not available for this question yet.
Report a correction for Q22