MauryaHub PYQ Practice

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

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 data distribution via
Source diagram or notation
Consider a specific timestep
Source diagram or notation
where the cumulative noise variance schedule is given by
Source diagram or notation
. At this timestep, for a specific input
Source diagram or notation
, the model predicts a noise vector:
Source diagram or notation
Calculate the estimated score vector,
Source diagram or notation
.
6406536024990.Source diagram or notation
6406536024991.Source diagram or notation
6406536024992.Source diagram or notation
6406536024993.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

You are performing inference using a Guided Diffusion model with Classifier-Free Guidance (CFG) with a guidance scale
Source diagram or notation
. At a specific step, the model outputs:
Source diagram or notation
• Unconditional prediction:
Source diagram or notation
• Conditional prediction (given class
Source diagram or notation
): Using the standard CFG formula, calculate the final guided noise vector
Source diagram or notation
.
6406536024994.Source diagram or notation
6406536024995.Source diagram or notation
6406536024996.Source diagram or notation
6406536024997.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
).
6406536024998.
It remains the same
Source diagram or notation
.
6406536024999.
It increases by a factor of
Source diagram or notation
.
6406536025000.
It doubles
Source diagram or notation
.
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
Source diagram or notation
. At step
Source diagram or notation
, you have two active beams with accumulated log-probs: Beam A:
Source diagram or notation
(ending in token 'cat') Beam B:
Source diagram or notation
(ending in token 'dog') At step
Source diagram or notation
, 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

Source diagram or notation
6406536025006.Source diagram or notation
6406536025007.Source diagram or notation
6406536025008.Source diagram or notation
6406536025009.
Undefined

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
Source diagram or notation
. If 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 output distribution at a single timestep, and what is the dimensionality of the trajectory space?
6406536025010.
Output dim:
Source diagram or notation
; Trajectory space:
Source diagram or notation
.
6406536025011.
Output dim:
Source diagram or notation
; Trajectory space:
Source diagram or notation
.
6406536025012.
Output dim: 1; Trajectory space:
Source diagram or notation
.
6406536025013.
Output dim: 50,000; 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?
6406536025014.Source diagram or notation
6406536025015.Source diagram or notation
6406536025016.Source diagram or notation
6406536025017.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 following baseline term?
Source diagram or notation
6406536025018.Source diagram or notation
6406536025019.Source diagram or notation
6406536025020.Source diagram or notation
6406536025021.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:
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
Source diagram or notation
.

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?
6406536025026.
The state
Source diagram or notation
corresponds to the current context: prompt plus all tokens generated so far.
6406536025027.
The action
Source diagram or notation
corresponds to selecting the next token from the vocabulary.
6406536025028.
The trajectory
Source diagram or notation
corresponds to the full sequence of (prompt, generated tokens) over time.
6406536025029.
The reward
Source diagram or notation
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:
Source diagram or notation
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
Source diagram or notation
.
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
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
Compute the raw attention scores (before Softmax) and scale them by the factor
Source diagram or notation
. What is the value of the element at position
Source diagram or notation
(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
Source diagram or notation
. You employ
Source diagram or notation
parallel attention heads. The output of the heads is concatenated and projected by a matrix
Source diagram or notation
. If the input batch size is
Source diagram or notation
and sequence length is
Source diagram or notation
, 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
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 model. For a specific prompt
Source diagram or notation
, you have a winning completion
Source diagram or notation
and a losing completion
Source diagram or notation
. The RM currently predicts the scalar rewards as:
Source diagram or notation
Calculate the negative log-likelihood loss for this pair:
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 (or approximation thereom). Calculate 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