MauryaHub PYQ Practice

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

Question 2 MCQ · 3.0 marks

In the context of Denoising Diffusion Probabilistic Models (DDPM), the trained noise predictor
Source diagram or notation
approximates the score function of the noisy data distribution via
Source diagram or notation
Suppose at timestep
Source diagram or notation
, the cumulative noise schedule is
Source diagram or notation
. For the noisy input
Source diagram or notation
, the model predicts the noise vector:
Source diagram or notation
Compute the estimated score vector
Source diagram or notation
.
6406536036711.Source diagram or notation
6406536036712.Source diagram or notation
6406536036713.Source diagram or notation
6406536036714.Source diagram or notation

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
Source diagram or notation
. At a particular denoising timestep, the model produces: • Unconditional output:
Source diagram or notation
• Conditional output (given text prompt
Source diagram or notation
):
Source diagram or notation
Using the classifier-free guidance formula
Source diagram or notation
compute the guided prediction
Source diagram or notation
.
6406536036715.Source diagram or notation
6406536036716.Source diagram or notation
6406536036717.Source diagram or notation
6406536036718.Source diagram or notation

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
Source diagram or notation
is
Source diagram or notation
. Assume that at initialization, the function
Source diagram or notation
(Attention + FFN) outputs values with variance roughly
Source diagram or notation
. After 10 layers, assuming independence, approximately how much has the signal variance increased relative to the input variance
Source diagram or notation
? (Approximation:
Source diagram or notation
).
6406536036719.
It remains the same
Source diagram or notation
.
6406536036720.
It doubles
Source diagram or notation
.
6406536036721.
It increases 10-fold.
6406536036722.
It increases by a factor of
Source diagram or notation
.

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
Source diagram or notation
. At step
Source diagram or notation
, you have two active beams with accumulated log-probabilities: • Beam A:
Source diagram or notation
(ending in token 'hello') • Beam B:
Source diagram or notation
(ending in token 'hi') At step
Source diagram or notation
, the model outputs the following top log-probabilities: • Given 'hello': 'world' (
Source diagram or notation
), 'there' (
Source diagram or notation
) • Given 'hi': 'there' (
Source diagram or notation
), 'you' (
Source diagram or notation
) Using standard beam search with additive log-probabilities, which two paths form the new beams after step
Source diagram or notation
?
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
Source diagram or notation
based on the optimal policy
Source diagram or notation
and reference policy
Source diagram or notation
. Given: •
Source diagram or notation
•
Source diagram or notation
•
Source diagram or notation
(KL penalty coefficient) Calculate the implicit reward value assigned to this response.
6406536036727.Source diagram or notation
6406536036728.Source diagram or notation
6406536036729.Source diagram or notation
6406536036730.Source diagram or notation

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
Source diagram or notation
. Suppose the vocabulary size is
Source diagram or notation
and we generate a sequence of length
Source diagram or notation
.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:
Source diagram or notation
.
6406536036732.
Output dim: 32000; Trajectory space:
Source diagram or notation
.
6406536036733.
Output dim: 32000; Trajectory space:
Source diagram or notation
.
6406536036734.
Output dim: 1; Trajectory space:
Source diagram or notation
.

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.Source diagram or notation
6406536036736.Source diagram or notation
6406536036737.Source diagram or notation
6406536036738.Source diagram or notation

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
Source diagram or notation
. If we introduce a baseline
Source diagram or notation
that depends only on state, the term becomes
Source diagram or notation
. What is the expected value of the baseline term?
Source diagram or notation
6406536036739.Source diagram or notation
6406536036740.Source diagram or notation
6406536036741.Source diagram or notation
6406536036742.Source diagram or notation

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
Source diagram or notation
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
Source diagram or notation
given the history
Source diagram or notation
. In the RL interpretation used for alignment, which of the following correspondences between LM objects and RL objects are correct?
6406536036747.
The state
Source diagram or notation
corresponds to the current context: prompt plus all tokens generated so far.
6406536036748.
The reward
Source diagram or notation
is necessarily the log-likelihood of the token under the pretraining.
6406536036749.
The trajectory
Source diagram or notation
corresponds to the full sequence of (prompt, generated tokens) over time.
6406536036750.
The policy
Source diagram or notation
corresponds to the LM’s conditional distribution
Source diagram or notation
.

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:
Source diagram or notation
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
Source diagram or notation
.
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
Source diagram or notation
. You are given the following Query (
Source diagram or notation
) and Key (
Source diagram or notation
) matrices for a sequence length of
Source diagram or notation
.
Source diagram or notation
Calculate the raw attention scores (before Softmax) scaled by the factor
Source diagram or notation
. What is the value of the element at position
Source diagram or notation
(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
Source diagram or notation
. Before applying softmax, we add a causal mask
Source diagram or notation
. Let the raw scores for a sequence
Source diagram or notation
be:
Source diagram or notation
The mask
Source diagram or notation
sets future positions to
Source diagram or notation
. Calculate the probability
Source diagram or notation
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
Source diagram or notation
is defined as
Source diagram or notation
. Given: • Reward model score
Source diagram or notation
. •
Source diagram or notation
. •
Source diagram or notation
. • KL coefficient
Source diagram or notation
. Calculate the total reward. (Use
Source diagram or notation
).

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
Source diagram or notation
, you have a preferred completion
Source diagram or notation
and a non-preferred completion
Source diagram or notation
. The RM predicts the following scalar rewards:
Source diagram or notation
Compute the negative log-likelihood loss for this comparison:
Source diagram or notation

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
Source diagram or notation
(representing decay). You discretize this system with a step size
Source diagram or notation
using the Zero-Order Hold (ZOH) method. Compute the discretized state transition parameter
Source diagram or notation
. Formula:
Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q17