Question 1 | MCQ
THIS IS QUESTION PAPER FOR THE SUBJECT "DEGREE LEVEL : MATHEMATICAL FOUNDATIONS
OF GENERATIVE AI (COMPUTER BASED EXAM)"
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
OF GENERATIVE AI (COMPUTER BASED EXAM)"
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
Solution
Consider two discrete probability distributions
and
, defined over a sample space
. The probability mass functions are given as follows:

Compute
. Use
for the calculation.
Compute
Solution
Which among the following statements are correct?
Solution
Consider the ELBO objective in a Variational Autoencoder (VAE):

Which of the following statements are correct?
Which of the following statements are correct?
Solution
Inscript
In a Generative Adversarial Network, suppose for a data point
, the real data distribution assigns
probability
, while the generator assigns probability
. If
is the optimal discriminator, what probability does it assign to
being generated? Enter the answer correct to two decimal places.
In a Generative Adversarial Network, suppose for a data point
probability
Solution
Inscript
A Gaussian Mixture Model has two components,
and
, with prior probabilities
. The components are 1D Gaussians with parameters
and
. For a data point
, calculate the responsibility (posterior probability) of component
for this point, i.e.,
. Provide the answer to three decimal places.
A Gaussian Mixture Model has two components,
Solution
Comprehension Passage
In a self-attention mechanism, each input vector has dimension
. The queries, keys, and values are computed using separate linear transformations, each mapping from
. Suppose there are
input vectors.
Based on the above data, answer the given subquestions.
Based on the above data, answer the given subquestions.
How many learnable parameters (including both weights and biases) are used to compute the queries, keys, and values?
Solution
Comprehension Passage
In a self-attention mechanism, each input vector has dimension
. The queries, keys, and values are computed using separate linear transformations, each mapping from
. Suppose there are
input vectors.
Based on the above data, answer the given subquestions.
Based on the above data, answer the given subquestions.
Inscript
How many attention weights
are computed in total if we have
and
?
How many attention weights
Solution
Comprehension Passage
A sampled generated response produces rewards

with discount factor
Suppose the value function values for different states are

The sampled log-policy gradient scalars
are given as

Based on the above data, answer the given subquestions.
with discount factor
The sampled log-policy gradient scalars
Based on the above data, answer the given subquestions.
Inscript
Compute the full discounted return
. Enter the answer correct to two decimal places.
Compute the full discounted return
Solution
Comprehension Passage
A sampled generated response produces rewards

with discount factor
Suppose the value function values for different states are

The sampled log-policy gradient scalars
are given as

Based on the above data, answer the given subquestions.
with discount factor
The sampled log-policy gradient scalars
Based on the above data, answer the given subquestions.
Inscript
Compute the gradient estimate

where
is the advantage estimate given by
Enter the answer correct to three decimal places.
Compute the gradient estimate
where
Solution
Comprehension Passage
A sequence of length
is represented by

where each row of
represents a token. A single-head attention module uses

Hence

Each row of
and
correspond to the representation of a single input token. Use scaled dot- product attention with
and scale factor
.
For the first query only, use the approximations

Based on the above data, answer the given subquestions.
where each row of
Hence
Each row of
For the first query only, use the approximations
Based on the above data, answer the given subquestions.
Inscript
Which token receive the lowest attention score from the query
before scaling? (For token 1, enter your answer as 1, and so on.)
Which token receive the lowest attention score from the query
Solution
Comprehension Passage
A sequence of length
is represented by

where each row of
represents a token. A single-head attention module uses

Hence

Each row of
and
correspond to the representation of a single input token. Use scaled dot- product attention with
and scale factor
.
For the first query only, use the approximations

Based on the above data, answer the given subquestions.
where each row of
Hence
Each row of
For the first query only, use the approximations
Based on the above data, answer the given subquestions.
Inscript
Compute the attention weight on token 3 for query 1. Enter the answer correct to three decimal places.
Compute the attention weight on token 3 for query 1. Enter the answer correct to three decimal places.
Solution
Comprehension Passage
A sequence of length
is represented by

where each row of
represents a token. A single-head attention module uses

Hence

Each row of
and
correspond to the representation of a single input token. Use scaled dot- product attention with
and scale factor
.
For the first query only, use the approximations

Based on the above data, answer the given subquestions.
where each row of
Hence
Each row of
For the first query only, use the approximations
Based on the above data, answer the given subquestions.
Inscript
Compute the sum of the first and the second coordinate of the attention output for query 1. Enter the answer correct to two decimal places.
Compute the sum of the first and the second coordinate of the attention output for query 1. Enter the answer correct to two decimal places.
Solution
Comprehension Passage
A decoder has the pre-mask scaled score matrix

Causal masking is applied to the scores exactly as in autoregressive transformers. The masking uses

for the mask matrix
. Use

Based on the above data, answer the given subquestions.
Causal masking is applied to the scores exactly as in autoregressive transformers. The masking uses
for the mask matrix
Based on the above data, answer the given subquestions.
Inscript
For token 3, compute the attention probability assigned to position 4.
For token 3, compute the attention probability assigned to position 4.
Solution
Comprehension Passage
A decoder has the pre-mask scaled score matrix

Causal masking is applied to the scores exactly as in autoregressive transformers. The masking uses

for the mask matrix
. Use

Based on the above data, answer the given subquestions.
Causal masking is applied to the scores exactly as in autoregressive transformers. The masking uses
for the mask matrix
Based on the above data, answer the given subquestions.
Inscript
Which position receives the highest attention weight for token 4? Enter your answer as either 1 or 2 or 3 or 4.
Which position receives the highest attention weight for token 4? Enter your answer as either 1 or 2 or 3 or 4.
Solution
Comprehension Passage
A decoder has the pre-mask scaled score matrix

Causal masking is applied to the scores exactly as in autoregressive transformers. The masking uses

for the mask matrix
. Use

Based on the above data, answer the given subquestions.
Causal masking is applied to the scores exactly as in autoregressive transformers. The masking uses
for the mask matrix
Based on the above data, answer the given subquestions.
Inscript
Compute the ratio
. Use the masked attention weights. Enter the answer correct to three decimal places.
Compute the ratio
Solution
Comprehension Passage
For a token at position
, the base embedding is

A sinusoidal positional encoding with
is used:

Use


Based on the above data, answer the given subquestions.
A sinusoidal positional encoding with
Use
Based on the above data, answer the given subquestions.
Compute the position-enhanced embedding
.
Solution
Comprehension Passage
For a token at position
, the base embedding is

A sinusoidal positional encoding with
is used:

Use


Based on the above data, answer the given subquestions.
A sinusoidal positional encoding with
Use
Based on the above data, answer the given subquestions.
The sinusoidal positional encoding is added to the token embedding
to form
. Which of the following statements is true?
Solution
Comprehension Passage
For two sampled states, the old and new full action distributions over two actions are:
State 1:

State 2:

Assume the sampled actions were the first action in both states.The advantages are

Use PPO clipping with
. Use natural logarithms with


Based on the above data, answer the given subquestions.
State 1:
State 2:
Assume the sampled actions were the first action in both states.The advantages are
Use PPO clipping with
Based on the above data, answer the given subquestions.
Inscript
Compute the sampled-action ratio for state 1. Enter the answer correct to one decimal place.
Compute the sampled-action ratio for state 1. Enter the answer correct to one decimal place.
Solution
Comprehension Passage
For two sampled states, the old and new full action distributions over two actions are:
State 1:

State 2:

Assume the sampled actions were the first action in both states.The advantages are

Use PPO clipping with
. Use natural logarithms with


Based on the above data, answer the given subquestions.
State 1:
State 2:
Assume the sampled actions were the first action in both states.The advantages are
Use PPO clipping with
Based on the above data, answer the given subquestions.
Inscript
Compute the clipped PPO contribution for state 1. Enter the answer correct to two decimal places.
Compute the clipped PPO contribution for state 1. Enter the answer correct to two decimal places.
Solution
Comprehension Passage
For two sampled states, the old and new full action distributions over two actions are:
State 1:

State 2:

Assume the sampled actions were the first action in both states.The advantages are

Use PPO clipping with
. Use natural logarithms with


Based on the above data, answer the given subquestions.
State 1:
State 2:
Assume the sampled actions were the first action in both states.The advantages are
Use PPO clipping with
Based on the above data, answer the given subquestions.
Inscript
Compute the sampled-action ratio for state 2. Enter the answer correct to one decimal place.
Compute the sampled-action ratio for state 2. Enter the answer correct to one decimal place.
Solution
Comprehension Passage
For two sampled states, the old and new full action distributions over two actions are:
State 1:

State 2:

Assume the sampled actions were the first action in both states.The advantages are

Use PPO clipping with
. Use natural logarithms with


Based on the above data, answer the given subquestions.
State 1:
State 2:
Assume the sampled actions were the first action in both states.The advantages are
Use PPO clipping with
Based on the above data, answer the given subquestions.
Inscript
Compute the clipped PPO contribution for state 2. Enter the answer correct to one decimal place.
Compute the clipped PPO contribution for state 2. Enter the answer correct to one decimal place.
Solution
Comprehension Passage
For two sampled states, the old and new full action distributions over two actions are:
State 1:

State 2:

Assume the sampled actions were the first action in both states.The advantages are

Use PPO clipping with
. Use natural logarithms with


Based on the above data, answer the given subquestions.
State 1:
State 2:
Assume the sampled actions were the first action in both states.The advantages are
Use PPO clipping with
Based on the above data, answer the given subquestions.
Inscript
Compute
for state 1. Enter the answer correct to four decimal places.
Compute
Solution
Shape
Thickness [ / ]
3
All colors