Home / Study library / Mathematical Foundations of Generative AI / End Term · Sep 2025 Mathematical Foundations of Generative AI · End Term · Sep 2025 · AN
Mathematical Foundations of Generative AI · End Term · Sep 2025 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 / 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 noisy data distribution via
Suppose at timestep
, the cumulative noise schedule is
.
For the noisy input
, the model predicts the noise vector:
Compute the estimated score vector
.
6406536036711. 6406536036712. 6406536036713. 6406536036714. A published solution is not available for this question yet.
Report a correction for Q2
Question 3 MCQ · 3.0 marks During inference with a Classifier-Free Guidance (CFG) diffusion model, you apply a guidance scale
of
.
At a particular denoising timestep, the model produces:
• Unconditional output:
• Conditional output (given text prompt
):
Using the classifier-free guidance formula
compute the guided prediction
.
6406536036715. 6406536036716. 6406536036717. 6406536036718. 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:
).
6406536036719. It remains the same
.
6406536036720. It doubles
.
6406536036721. It increases 10-fold.
6406536036722. It increases by a factor of
.
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-probabilities:
• Beam A:
(ending in token 'hello')
• Beam B:
(ending in token 'hi')
At step
, the model outputs the following top log-probabilities:
• Given 'hello': 'world' (
), 'there' (
)
• Given 'hi': 'there' (
), 'you' (
)
Using standard beam search with additive log-probabilities, which two paths form the new beams
after step
?
6406536036723. ('hello', 'world') and ('hello', 'there')
6406536036724. ('hello', 'world') and ('hi', 'there')
6406536036725. ('hi', 'there') and ('hi', 'you')
6406536036726. ('hello', 'there') and ('hi', 'you')
A published solution is not available for this question yet.
Report a correction for Q5
Question 6 MCQ · 3.0 marks DPO eliminates the explicit reward model by defining an implicit reward
based on the
optimal policy
and reference policy
.
Given:
•
•
•
(KL penalty coefficient)
Calculate the implicit reward value assigned to this response.
6406536036727. 6406536036728. 6406536036729. 6406536036730. 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 + previously generated tokens).
• The **Action Space** is the vocabulary
.
Suppose the vocabulary size is
and we generate a sequence of length
.What
is the dimension of the policy’s output distribution at a single timestep, and what is the
dimensionality of the full trajectory space?
6406536036731. Output dim: 25; Trajectory space:
.
6406536036732. Output dim: 32000; Trajectory space:
.
6406536036733. Output dim: 32000; Trajectory space:
.
6406536036734. Output dim: 1; 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?
6406536036735. 6406536036736. 6406536036737. 6406536036738. 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 baseline term?
6406536036739. 6406536036740. 6406536036741. 6406536036742. 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:
6406536036743. They remove the neural network entirely.
6406536036744. The sampling process is deterministic when
6406536036745. They require more noise steps.
6406536036746. They require additional forward passes.
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?
6406536036747. The state
corresponds to the current context: prompt plus all tokens
generated so far.
6406536036748. The reward
is necessarily the log-likelihood of the token under the
pretraining.
6406536036749. The trajectory
corresponds to the full sequence of (prompt, generated
tokens) over time.
6406536036750. The policy
corresponds to the LM’s conditional distribution
.
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:
6406536036751. Sinusoidal positional encodings are learned parameters updated during
training.
6406536036752. Positional encodings allow the model to incorporate order information that
attention alone cannot provide.
6406536036753. The sinusoidal frequencies grow geometrically with the dimension index
.
6406536036754. The encoding scheme ensures that relative positions can be represented
through linear functions of the embeddings.
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
.
Calculate the raw attention scores (before Softmax) scaled by the factor
. What is the value of
the element at position
(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 In a decoder-only transformer (GPT-style), we compute attention scores
. Before applying
softmax, we add a causal mask
.
Let the raw scores for a sequence
be:
The mask
sets future positions to
.
Calculate the probability
after applying Softmax to the second
row.
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 preference model.
For a given prompt
, you have a preferred completion
and a non-preferred completion
.
The RM predicts the following scalar rewards:
Compute the negative log-likelihood loss for this comparison:
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.
Compute the discretized state transition parameter
.
Formula:
A published solution is not available for this question yet.
Report a correction for Q17