Home / Study library / Mathematical Foundations of Generative AI / End Term · Sep 2025 Mathematical Foundations of Generative AI · End Term · Sep 2025 · FN
Mathematical Foundations of Generative AI · End Term · Sep 2025 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 / 16 published solutions
Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10 Q11 Q12 Q13 Q14 Q15 Q16 Q17
Question 2 MCQ · 3.0 marks In the context of Denoising Diffusion Probabilistic Models (DDPM), the trained noise predictor
approximates the score function of the data distribution via
Consider a specific timestep
where the cumulative noise variance schedule is given by
. At this timestep, for a specific input
, the model predicts a noise vector:
Calculate the estimated score vector,
.
6406536024990. 6406536024991. 6406536024992. 6406536024993. A published solution is not available for this question yet.
Report a correction for Q2
Question 3 MCQ · 3.0 marks You are performing inference using a Guided Diffusion model with Classifier-Free Guidance (CFG)
with a guidance scale
. At a specific step, the model outputs:
• Unconditional prediction:
• Conditional prediction (given class
):
Using the standard CFG formula, calculate the final guided noise vector
.
6406536024994. 6406536024995. 6406536024996. 6406536024997. A published solution is not available for this question yet.
Report a correction for Q3
Question 4 MCQ · 3.0 marks In a Deep Transformer with Residual connections, the output of layer
is
.
Assume that at initialization, the function
(Attention + FFN) outputs values with variance
roughly
.
After 10 layers, assuming independence, approximately how much has the signal variance
increased relative to the input variance
?
(Approximation:
).
6406536024998. It remains the same
.
6406536024999. It increases by a factor of
.
6406536025000. It doubles
.
6406536025001. It increases 10-fold.
A published solution is not available for this question yet.
Report a correction for Q4
Question 5 MCQ · 3.0 marks You are performing Beam Search with width
. At step
, you have two active beams with
accumulated log-probs: Beam A:
(ending in token 'cat') Beam B:
(ending in token 'dog')
At step
, the model gives the following top log-probs: Given 'cat': 'sits' (-0.5), 'naps' (-1.0)
Given 'dog': 'barks' (-0.1), 'runs' (-0.4) Which two paths form the new beams?
6406536025002. ('cat', 'sits') and ('dog', 'barks')
6406536025003. ('cat', 'sits') and ('cat', 'naps')
6406536025004. ('dog', 'barks') and ('dog', 'runs')
6406536025005. ('cat', 'naps') and ('dog', 'runs')
A published solution is not available for this question yet.
Report a correction for Q5
Question 6 MCQ · 3.0 marks 6406536025006. 6406536025007. 6406536025008. A published solution is not available for this question yet.
Report a correction for Q6
Question 7 MCQ · 3.0 marks When treating an Auto-Regressive Language Model as an RL policy:
• The **State** is the context (prompt + generated tokens so far).
• The **Action Space** is the vocabulary
.
If the vocabulary size is
and we generate a sequence of length
.
What is the dimension of the policy output distribution at a single timestep, and what is the
dimensionality of the trajectory space?
6406536025010. Output dim:
; Trajectory space:
.
6406536025011. Output dim:
; Trajectory space:
.
6406536025012. Output dim: 1; Trajectory space:
.
6406536025013. Output dim: 50,000; Trajectory space:
.
A published solution is not available for this question yet.
Report a correction for Q7
Question 8 MCQ · 3.0 marks Trust Region Policy Optimization (TRPO) maximizes the surrogate objective subject to a constraint
on the KL divergence between the old and new policies. What is the nature of this constraint?
6406536025014. 6406536025015. 6406536025016. 6406536025017. A published solution is not available for this question yet.
Report a correction for Q8
Question 9 MCQ · 3.0 marks The Policy Gradient theorem states
. If we introduce a baseline
that depends only on state, the term becomes
. What is the
expected value of the following baseline term?
6406536025018. 6406536025019. 6406536025020. 6406536025021. A published solution is not available for this question yet.
Report a correction for Q9
Question 10 MCQ · 3.0 marks DDIMs are faster than DDPM mainly because:
6406536025022. They remove the neural network entirely.
6406536025023. They require more noise steps.
6406536025024. They require additional forward passes.
6406536025025. The sampling process is deterministic when
.
A published solution is not available for this question yet.
Report a correction for Q10
Question 11 MSQ · 4.0 marks An auto-regressive language model predicts the next token
given the history
. In the RL
interpretation used for alignment, which of the following correspondences between LM objects
and RL objects are correct?
6406536025026. The state
corresponds to the current context: prompt plus all tokens
generated so far.
6406536025027. The action
corresponds to selecting the next token from the vocabulary.
6406536025028. The trajectory
corresponds to the full sequence of (prompt, generated
tokens) over time.
6406536025029. The reward
is necessarily the log-likelihood of the token under the
pretraining objective.
A published solution is not available for this question yet.
Report a correction for Q11
Question 12 MSQ · 4.0 marks The sinusoidal positional encoding (PE) for Transformers is defined as:
Based on the properties of sinusoidal positional encodings, identify all correct statements:
6406536025030. Positional encodings allow the model to incorporate order information that
attention alone cannot provide.
6406536025031. The sinusoidal frequencies grow geometrically with the dimension index
.
6406536025032. Sinusoidal positional encodings are learned parameters updated during
training.
6406536025033. Adding positional encodings to token embeddings guarantees each position
has a unique representation.
A published solution is not available for this question yet.
Report a correction for Q12
Question 13 NAT · 3.0 marks Consider a single-head self-attention mechanism with
. You are given the following Query (
) and Key (
) matrices for a sequence length of
:
Compute the raw attention scores (before Softmax) and scale them by the factor
. What is
the value of the element at position
(i.e., row 1, column 2) of the scaled score matrix?
A published solution is not available for this question yet.
Report a correction for Q13
Question 14 NAT · 3.0 marks You have a Transformer with model dimension
. You employ
parallel
attention heads. The output of the heads is concatenated and projected by a matrix
. If the
input batch size is
and sequence length is
, what is the total number of floating
point elements in the final output tensor of the Multi-Head Attention block (before the residual
connection)?
A published solution is not available for this question yet.
Report a correction for Q14
Question 15 NAT · 3.0 marks In RLHF (Reinforcement Learning from Human Feedback), the reward used to update the
language model
is defined as
Given:
• Reward model score
•
•
• KL coefficient
Calculate the total reward. (Use
.)
A published solution is not available for this question yet.
Report a correction for Q15
Question 16 NAT · 3.0 marks You are training a Reward Model (RM) using the Bradley-Terry model.
For a specific prompt
, you have a winning completion
and a losing completion
. The RM
currently predicts the scalar rewards as:
Calculate the negative log-likelihood loss for this pair:
.
A published solution is not available for this question yet.
Report a correction for Q16
Question 17 NAT · 3.0 marks A continuous time State-Space Model (SSM) has a scalar state parameter
(representing
decay). You discretize this system with a step size
using the Zero-Order Hold (ZOH)
method (or approximation thereom).
Calculate the discretized state transition parameter
.
Formula:
.
A published solution is not available for this question yet.
Report a correction for Q17