Question 1 | MCQ
THIS IS QUESTION PAPER FOR THE SUBJECT "DEGREE LEVEL : DEEP LEARNING (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)
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
What is a co-occurrence matrix in the context of Natural Language Processing?
Solution
Which of the following is not true about multi-head cross attention?
Solution
Consider the masked self-attention mechanism in the decoder of the Transformer architecture. Let
be the additive mask matrix applied to the scaled dot-product scores (logits) before the softmax operation. If the sequence length is
, what is the summation of all the diagonal elements of
(i.e.,
)?
Solution
Consider an input of
grayscale images. Two neural network architectures are proposed:
- Model A: The input is flattened into a 64-dimensional vector, followed by a fully-connected layer with 10 neurons with bias.
- Model B: A sequence of convolution layers without bias:
– Conv1: 8 filters of size 3×3, stride = 1, no padding.
– Conv2: 10 filters of size 3×3, stride = 2, padding = 1.
The output is passed through a 3×3 average pooling layer.
Let
and
denote the total number of learnable parameters in Model A and Model B respectively. Which of the following relationships is correct?
- Model A: The input is flattened into a 64-dimensional vector, followed by a fully-connected layer with 10 neurons with bias.
- Model B: A sequence of convolution layers without bias:
– Conv1: 8 filters of size 3×3, stride = 1, no padding.
– Conv2: 10 filters of size 3×3, stride = 2, padding = 1.
The output is passed through a 3×3 average pooling layer.
Let
Solution
Regarding the specific gating mechanisms used to control information flow and gradients in LSTMs and GRUs, which statement is correct?
Solution
You are training a neural network with an initial learning rate (
) of 0.1. The training setup involves a batch size of 64, resulting in 100 mini-batch updates per epoch. You utilize a "Step Decay" schedule where the learning rate is halved (multiplied by 0.5) after every 150 mini-batch updates. What will be the learning rate at the completion of the second epoch?
Solution
Why is the sigmoid activation function often preferred over the step activation function in neural networks?
Solution
Consider the sigmoid activation function defined as:

Assume that the weight
is a positive quantity (
). Select all the correct statements regarding the parameters
and
:
Assume that the weight
Solution
Consider a simplified Image Captioning model with the following architecture:
1. Encoder (CNN):
- Input: A grayscale image (1 channel).
- Convolution Layer: 2 filters, kernel size
, stride
, padding
(ignore bias).
- Pooling: Global Average Pooling (output is a vector of size equal to the number of filters).
2. Decoder (RNN):
- Initial hidden state: The output vector from the Encoder is fed directly into the RNN as initial hidden state
.
- Input: Assume input
vector dimension as
.
- RNN Layer: A standard Vanilla RNN cell. The recurrence formula is:

- Output Layer: A fully connected softmax layer mapping the final hidden state to a vocabulary of size
(bias enabled).
Calculate the total number of trainable parameters in this entire architecture.
(Note: Exclude bias parameters for the CNN Encoder, but include them for the RNN and Output layers.)
1. Encoder (CNN):
- Input: A grayscale image (1 channel).
- Convolution Layer: 2 filters, kernel size
- Pooling: Global Average Pooling (output is a vector of size equal to the number of filters).
2. Decoder (RNN):
- Initial hidden state: The output vector from the Encoder is fed directly into the RNN as initial hidden state
- Input: Assume input
- RNN Layer: A standard Vanilla RNN cell. The recurrence formula is:
- Output Layer: A fully connected softmax layer mapping the final hidden state to a vocabulary of size
Calculate the total number of trainable parameters in this entire architecture.
(Note: Exclude bias parameters for the CNN Encoder, but include them for the RNN and Output layers.)
Solution
Comprehension Passage
You are given a simplified Continuous Bag-of-Words (CBOW) model designed to predict a missing word represented as ??? in the sentence given below based on its context.
The sentence is: red green ??? are colors
Vocabulary = {0 : are , 1 : blue , 2 : colors , 3 : green , 4 : pink , 5 : red , 6 : white, 7 : yellow }
Use the one-hot vector representation of each word in the sentence, represented in the matrix below of size
, where each column corresponds to the one-hot vector of size V=8 of a word.

The model's weight matrices are given below:
Context Weight Matrix (
):

Word Matrix (
):

For a one hot representation (
) of a word , the context embedding is given by :

The combined context representation
is obtained by summing the embeddings of all context words in a window of size d:

Based on the above data, answer the given subquestions.
The sentence is: red green ??? are colors
Vocabulary = {0 : are , 1 : blue , 2 : colors , 3 : green , 4 : pink , 5 : red , 6 : white, 7 : yellow }
Use the one-hot vector representation of each word in the sentence, represented in the matrix below of size
The model's weight matrices are given below:
Context Weight Matrix (
Word Matrix (
For a one hot representation (
The combined context representation
Based on the above data, answer the given subquestions.
What is the combined context representation
of the missing word represented as "???" for a window of size
(
tokens from both the sides). Sum all the values in
and provide the answer correct up to two decimal places.
Solution
Comprehension Passage
You are given a simplified Continuous Bag-of-Words (CBOW) model designed to predict a missing word represented as ??? in the sentence given below based on its context.
The sentence is: red green ??? are colors
Vocabulary = {0 : are , 1 : blue , 2 : colors , 3 : green , 4 : pink , 5 : red , 6 : white, 7 : yellow }
Use the one-hot vector representation of each word in the sentence, represented in the matrix below of size
, where each column corresponds to the one-hot vector of size V=8 of a word.

The model's weight matrices are given below:
Context Weight Matrix (
):

Word Matrix (
):

For a one hot representation (
) of a word , the context embedding is given by :

The combined context representation
is obtained by summing the embeddings of all context words in a window of size d:

Based on the above data, answer the given subquestions.
The sentence is: red green ??? are colors
Vocabulary = {0 : are , 1 : blue , 2 : colors , 3 : green , 4 : pink , 5 : red , 6 : white, 7 : yellow }
Use the one-hot vector representation of each word in the sentence, represented in the matrix below of size
The model's weight matrices are given below:
Context Weight Matrix (
Word Matrix (
For a one hot representation (
The combined context representation
Based on the above data, answer the given subquestions.
Identify the word in the vocabulary with the highest predicted probability for the missing word (???), and provide its corresponding integer index (key) from the vocabulary list as your final answer.
Solution
Comprehension Passage
You are given a simplified Continuous Bag-of-Words (CBOW) model designed to predict a missing word represented as ??? in the sentence given below based on its context.
The sentence is: red green ??? are colors
Vocabulary = {0 : are , 1 : blue , 2 : colors , 3 : green , 4 : pink , 5 : red , 6 : white, 7 : yellow }
Use the one-hot vector representation of each word in the sentence, represented in the matrix below of size
, where each column corresponds to the one-hot vector of size V=8 of a word.

The model's weight matrices are given below:
Context Weight Matrix (
):

Word Matrix (
):

For a one hot representation (
) of a word , the context embedding is given by :

The combined context representation
is obtained by summing the embeddings of all context words in a window of size d:

Based on the above data, answer the given subquestions.
The sentence is: red green ??? are colors
Vocabulary = {0 : are , 1 : blue , 2 : colors , 3 : green , 4 : pink , 5 : red , 6 : white, 7 : yellow }
Use the one-hot vector representation of each word in the sentence, represented in the matrix below of size
The model's weight matrices are given below:
Context Weight Matrix (
Word Matrix (
For a one hot representation (
The combined context representation
Based on the above data, answer the given subquestions.
In this setup, during backpropagation with cross-entropy loss, how many total weights (combining both
and
) are updated in a single iteration? Assume that any one word from the vocabulary can be the correct output.
Solution
Comprehension Passage
Given the following simple Recurrent Neural Network (RNN), which is unrolled for two timesteps. The network's forward propagation is defined by the following equations:


Where the hidden activation
is the sigmoid function, and the output activation
is a softmax function. The network's parameters (
) are shared across all timesteps.

The initial hidden state
, the input sequence (
), the network parameters, and the target sequence (
) are given in the table below. Note that for this simple network, all variables are scalars.

Based on the above data, answer the given subquestions.
Where the hidden activation
The initial hidden state
Based on the above data, answer the given subquestions.
Compute the output
at the first timestep (
). Choose the closest option from below
Solution
Comprehension Passage
Given the following simple Recurrent Neural Network (RNN), which is unrolled for two timesteps. The network's forward propagation is defined by the following equations:


Where the hidden activation
is the sigmoid function, and the output activation
is a softmax function. The network's parameters (
) are shared across all timesteps.

The initial hidden state
, the input sequence (
), the network parameters, and the target sequence (
) are given in the table below. Note that for this simple network, all variables are scalars.

Based on the above data, answer the given subquestions.
Where the hidden activation
The initial hidden state
Based on the above data, answer the given subquestions.
Compute the output
at the second timestep (
). Choose the closest option from below
Solution
Comprehension Passage
Given the following simple Recurrent Neural Network (RNN), which is unrolled for two timesteps. The network's forward propagation is defined by the following equations:


Where the hidden activation
is the sigmoid function, and the output activation
is a softmax function. The network's parameters (
) are shared across all timesteps.

The initial hidden state
, the input sequence (
), the network parameters, and the target sequence (
) are given in the table below. Note that for this simple network, all variables are scalars.

Based on the above data, answer the given subquestions.
Where the hidden activation
The initial hidden state
Based on the above data, answer the given subquestions.
Assume this network is used for email spam detection. Compute the cross entropy loss
at the final time step (
). Provide the answer correct to two decimal places.
Solution
Comprehension Passage
Given the following simple Recurrent Neural Network (RNN), which is unrolled for two timesteps. The network's forward propagation is defined by the following equations:


Where the hidden activation
is the sigmoid function, and the output activation
is a softmax function. The network's parameters (
) are shared across all timesteps.

The initial hidden state
, the input sequence (
), the network parameters, and the target sequence (
) are given in the table below. Note that for this simple network, all variables are scalars.

Based on the above data, answer the given subquestions.
Where the hidden activation
The initial hidden state
Based on the above data, answer the given subquestions.
Using the loss used in previous question update the recurrent weight
once using gradient descent and Backpropagation Through Time (BPTT). Use a learning rate of
and the total loss computed previously. Provide the updated weight
correct to two decimal places.
Solution
Shape
Thickness [ / ]
3
All colors