Question 1
5
3
1
0
The IIT Madras BS Deep Learning (Deep Learning) End Term paper sat on 22 Dec 2024, in the September 2024 term: 21 questions for 50 marks in 180 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.
5
3
1
0
Correct answer
5
You are given a dataset of grayscale images. Your goal is to build a 5-class classifier. You have to adopt one of the following two options:
Suppose you make your choice on the basis of the number of parameters in the models, = number of parameters in ModelA, and similarly let = number of parameters in ModelB.
Correct answer
In the context of RNNs, what structural feature of LSTMs helps reduce the impact of vanishing gradients?
Skip connections
Gated mechanisms like forget and input gates
Weight sharing across layers
Use of dropout
Correct answer
Gated mechanisms like forget and input gates
As per gradient descent, we should move towards 180 degrees with respect to gradient direction. What will happen if we move between 90 and 180 degrees? Consider the loss function to be convex.
The loss function will increase.
The loss function will decrease, although not to the maximum possible extent.
The loss function will remain the same.
Can’t say. It depends on other parameters of the convex function.
Correct answer
The loss function will decrease, although not to the maximum possible extent.
Which of the following statements about the parameter β in RMSProp is correct?
A higher value of β means that past gradients retain more influence on the moving average.
A lower value of β means past gradients have a lesser influence on the moving average.
A higher value of β means the current gradient will have lesser influence than past gradients.
A lower value of β means the current gradient will have higher influence than past gradients.
All of these
Correct answer
All of these
Consider a feed-forward neural network containing three inputs and one output. It consists of 50 hidden layers, each with two neurons. The activation function used in all the hidden layers is ReLU, the output layer uses the Sigmoid activation function for binary classification. The network is trained with a binary cross-entropy loss function.
The network architecture is as follows:
- Input layer: 3 nodes
- Hidden layer: 2 nodes each
- Output layer: 1 node
Assume all weights are initialized to 1 and all biases to 0. For an input of [-10, 5, -20], what will be the output of the neural network?
0
1
0.5
0.25
-25
Insufficient information
Correct answer
0.5
[0.7, 0.3, 0.6]
[0.4, 0.2, 0.8]
[0.7, 0.6, 0.3]
[0.2, 0.4, 0.8]
Correct answer
[0.2, 0.4, 0.8]
In the transformer model, how are self-attention weights calculated for a given token?
By passing the token’s embeddings to softmax function.
Using a feedforward neural network applied to the token’s embeddings.
Through a convolutional operation applied to the token’s neighborhood.
As the dot product between the token’s embeddings and those of all other tokens, followed by a softmax operation.
Correct answer
As the dot product between the token’s embeddings and those of all other tokens, followed by a softmax operation.
Consider a sigmoid neuron that takes in an input vector . The weight vector is initialized to and . The output from the sigmoid neuron is
Suppose we use the following loss function
Based on the above data, answer the given subquestions.
Correct answer: 2.5 (accepted within ±0.03)
Consider a sigmoid neuron that takes in an input vector . The weight vector is initialized to and . The output from the sigmoid neuron is
Suppose we use the following loss function
Based on the above data, answer the given subquestions.
Correct answer: 0.92 (accepted within ±0.03)
Consider a sigmoid neuron that takes in an input vector . The weight vector is initialized to and . The output from the sigmoid neuron is
Suppose we use the following loss function
Based on the above data, answer the given subquestions.
Correct answer: 0.39 (accepted within ±0.03)
Which of the following techniques does NOT help prevent a model from overfitting?
Data augmentation
Dropout
Early stopping
None of these
Correct answer
None of these
Suppose you have a vocabulary of 5,000 unique words and you want to train a CBOW model with a window size of 3 (on each side) and with an embedding dimension of 100. How many parameters (weights) will the embedding layer have?
Correct answer: 500000
Assume that your CBOW model outputs a probability distribution over a vocabulary of 20,000 words for a given context. If the correct target word is word number 150, and the model’s predicted probability for this word is 0.2, calculate the cross-entropy loss for this prediction. (use natural log)
Correct answer: 1.6 (accepted within ±0.03)
In a Skip-gram model with a window size of 2 (on each side), how many unique pairs of target and context words will be generated for the following sentence:
‘Predicting the future is not magic, it is artificial intelligence’
Note: Ignore the punctuations in your calculation
Correct answer: 32
Correct answer: 126
Based on the above data, answer the given subquestions.
With a total of 7 time steps (T = 7), implying prediction for a word of length 6), what is the total count of parameters (including bias) within the network?
Correct answer: 33
Based on the above data, answer the given subquestions.
Correct answer
Based on the above data, answer the given subquestions.
If all the parameters (including bias) in the network are initialized to zero, what will be the total loss after 10 time steps (assume that indices start with 1) for the input ? The ground truth () for each time step is given by the following sequence . Assume the loss to be cross-entropy at each time step. (Use natural log and write the answer correct up to two decimal places.) each is one-hot encoder (i.e means )
Correct answer: 16.1 (accepted within ±0.1)
In the context of the Transformer model’s encoder-decoder architecture, which of the following statements are accurate?
The encoder in a Transformer model is responsible for converting the input sequence into a continuous representation that the decoder can then use to generate the output sequence.
The decoder in a Transformer model only attends to the encoder’s output without any form of self-attention on its own inputs.
Multi-head attention in the encoder allows the model to jointly attend to information from different representations at different positions.
The decoder’s self-attention mechanism includes a masking component to prevent attending to future positions, ensuring the model generates outputs one step at a time.
Correct answers
The encoder in a Transformer model is responsible for converting the input sequence into a continuous representation that the decoder can then use to generate the output sequence.
Multi-head attention in the encoder allows the model to jointly attend to information from different representations at different positions.
The decoder’s self-attention mechanism includes a masking component to prevent attending to future positions, ensuring the model generates outputs one step at a time.
Consider a Transformer model with the following specifications for the decoder part: • Input dimension (embedding size): 16
• Number of heads in multi-head attention: 2
• Head output dimension: 8
• Dimension of the feed-forward network: 32
• Number of layers in the decoder: 2
Note: The final output from the attention heads is obtained by concatenating the outputs from the individual heads and hence does not cost any additional parameters.
Assume that each decoder layer contains:
• One multi-head attention mechanism for self-attention.
• One multi-head attention mechanism for encoder-decoder attention.
• One feed-forward network.
• No bias terms are included.
Calculate the total number of parameters in the decoder part.
Correct answer: 5120