MauryaHub PYQ Practice

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

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,
Source diagram or notation
and
Source diagram or notation
, with prior probabilities
Source diagram or notation
. The components are 1D Gaussians with parameters
Source diagram or notation
and
Source diagram or notation
. For a data point
Source diagram or notation
, calculate the responsibility (posterior probability) of component
Source diagram or notation
for this point, i.e.,
Source diagram or notation
. 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
Source diagram or notation
parameter in
Source diagram or notation
-VAE where the loss is
Source diagram or notation
). Assume a standard normal prior,
Source diagram or notation
. As
Source diagram or notation
gradually increases from 0, what happens to the learned latent representations?
6406536961788.
The distribution
Source diagram or notation
approaches
Source diagram or notation
but reconstructions become worse.
6406536961789.
The distribution
Source diagram or notation
goes farther from
Source diagram or notation
and reconstructions become better.
6406536961790.
The distribution
Source diagram or notation
approaches
Source diagram or notation
and reconstructions become better.
6406536961791.
The distribution
Source diagram or notation
goes farther from
Source diagram or notation
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
Source diagram or notation
, 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
Source diagram or notation
is represented by
Source diagram or notation
where each row of
Source diagram or notation
represents a token. The attention module uses
Source diagram or notation
Thus
Source diagram or notation
Each row of
Source diagram or notation
and
Source diagram or notation
correspond to the representation of a single input token. Use
Source diagram or notation
and scaling by
Source diagram or notation
. Based on the above data, answer the given subquestions.
Source diagram or notation
Let the scaled scores for query
Source diagram or notation
be defined as . Compute the
Source diagram or notation
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
Source diagram or notation
is represented by
Source diagram or notation
where each row of
Source diagram or notation
represents a token. The attention module uses
Source diagram or notation
Thus
Source diagram or notation
Each row of
Source diagram or notation
and
Source diagram or notation
correspond to the representation of a single input token. Use
Source diagram or notation
and scaling by
Source diagram or notation
. Based on the above data, answer the given subquestions.
Compute the attention output vector for the second token.
6406536961801.Source diagram or notation
6406536961802.Source diagram or notation
6406536961803.Source diagram or notation
6406536961804.Source diagram or notation

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
Source diagram or notation
and pre-mask scaled score matrix
Source diagram or notation
Causal masking is applied to the scores exactly as in autoregressive transformers. The masking uses
Source diagram or notation
for the mask matrix
Source diagram or notation
.Use
Source diagram or notation
Based on the above data, answer the given subquestions.
Which of the following is the masked score vector for the third query?
6406536961805.Source diagram or notation
6406536961806.Source diagram or notation
6406536961807.Source diagram or notation
6406536961808.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 decoder has sequence of length
Source diagram or notation
and pre-mask scaled score matrix
Source diagram or notation
Causal masking is applied to the scores exactly as in autoregressive transformers. The masking uses
Source diagram or notation
for the mask matrix
Source diagram or notation
.Use
Source diagram or notation
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

Source diagram or notation
Based on the above data, answer the given subquestions.
Find the mean and variance of
Source diagram or notation
.
6406536961810.
Mean
Source diagram or notation
, Variance
Source diagram or notation
6406536961811.
Mean
Source diagram or notation
, Variance
Source diagram or notation
6406536961812.
Mean
Source diagram or notation
, Variance
Source diagram or notation
6406536961813.
Mean
Source diagram or notation
, Variance
Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q13

Question 14 NAT · 3.0 marks

Source diagram or notation
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
Source diagram or notation
with discount factor
Source diagram or notation
. Suppose the state-value estimates are
Source diagram or notation
The sampled log-policy gradient scalars
Source diagram or notation
are given as
Source diagram or notation
Based on the above data, answer the given subquestions.
Compute the full discounted return
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 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
Source diagram or notation
with discount factor
Source diagram or notation
. Suppose the state-value estimates are
Source diagram or notation
The sampled log-policy gradient scalars
Source diagram or notation
are given as
Source diagram or notation
Based on the above data, answer the given subquestions.
Compute the reward-to-go
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

A language model is treated as a policy that generates a response of length 4. The rewards are
Source diagram or notation
with discount factor
Source diagram or notation
. Suppose the state-value estimates are
Source diagram or notation
The sampled log-policy gradient scalars
Source diagram or notation
are given as
Source diagram or notation
Based on the above data, answer the given subquestions.
Compute the gradient estimate
Source diagram or notation
where
Source diagram or notation
is the advantage estimate given by
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 Q17

Question 18 NAT · 1.0 marks

Source diagram or notation
Based on the above data, answer the given subquestions.
Compute the importance sampling ratio
Source diagram or notation
for time step
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 Q18

Question 19 NAT · 2.0 marks

Source diagram or notation
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

Source diagram or notation
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

Source diagram or notation
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

Source diagram or notation
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