Quiz Space

January 2024 term · Deep Learning · BSCS3004

Deep Learning End Term: 28 April 2024, Set QDB1 (January 2024 term)

The IIT Madras BS Deep Learning (Deep Learning) End Term paper sat on 28 Apr 2024, in the January 2024 term, set QDB1: 18 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.

Questions
18
Marks
50
Duration
180 min
MCQ
8
Numerical
9
MSQ
1

Updated

Official paper: IIT M DEGREE AN EXAM QDB3 28 Apr 2024 · No negative marking.

Question 1

+3 marksOne correct option

Consider a scenario where you have a dataset with overlapping classes (that is instances from different classes share similar or identical feature values), and you decide to train a perceptron model for classification.
Assertion (A): The perceptron model may struggle to classify instances accurately when classes overlap in the feature space.
Reason (R): The perceptron learning algorithm aims to find a linear decision boundary that separates the classes, and in the presence of overlapping classes, it may not be able to capture the underlying patterns effectively.
Select the correct option:

  1. A

    Both A and R are true, and R is the correct explanation of A.

  2. B

    Both A and R are true, but R is not the correct explanation of A.

  3. C

    A is true, but R is false.

  4. D

    A is false, but R is true.

Show answer

Correct answer

  • A

    Both A and R are true, and R is the correct explanation of A.

Question 2

+3 marksOne correct option

Consider a feedforward neural network with one hidden layer trained using backpropagation for a binary classification task. The network has the following architecture:

  • Input layer with 15 neurons
  • Hidden layer with 25 neurons
  • Output layer with 1 neuron

During the backpropagation process, the derivative of the sigmoid activation function σ(z)\sigma(z) with respect to its argument zz is given by:

σ′(z)=σ(z)⋅(1−σ(z))\sigma'(z) = \sigma(z) \cdot (1 - \sigma(z))

If the loss function used for binary classification is the binary cross-entropy loss, and the activation fuction at hidden layer and output layer is sigmoid. The output of the neural network is denoted as y^\hat{y}, and the true label is denoted as yy, what is the expression for ∂L∂wj\frac{\partial L}{\partial w_j}, where wjw_j represents the weights connecting the jjth neuron of hidden layer to the output layer? Assume that the output of jjth neuron of hidden layer is hjh_j and no biases in the network.

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • D

Question 3

+3 marksOne correct option

In the context of mini-batch gradient descent, if doubling the size of the mini-batch makes your model take twice as many epochs to reach convergence, how does this affect the total number of parameter updates compared to using the original mini-batch size? Assume everything else remains constant.

  1. A

    The number of updates required is doubled.

  2. B

    The number of updates required is four times.

  3. C

    The number of updates required is halved.

  4. D

    The number of updates remains the same.

Show answer

Correct answer

  • D

    The number of updates remains the same.

Question 4

+3 marksOne correct option

Suppose you are working with a sparse dataset and using Momentum-based Gradient Descent (GD) and AdaGrad algorithms for optimization. Which of the following statements accurately describes the behavior of weight and bias term updates?

  1. A

    Bias vector will update frequently only in the case of the AdaGrad algorithm.

  2. B

    Weight vector will have very few updates in the case of Momentum-based GD.

  3. C

    Weight vector will have frequent updates in both cases.

  4. D

    Bias vector will have very few updates in the case of Momentum-based GD.

Show answer

Correct answer

  • B

    Weight vector will have very few updates in the case of Momentum-based GD.

Question 5

+2 marksOne correct option

State True or False. Sigmoid activation function helps mitigating vanishing gradient problem better than ReLU activation function.

  1. A

    FALSE

  2. B

    TRUE

Show answer

Correct answer

  • A

    FALSE

Question 6

+2 marksOne correct option

How many weight matrices does a LSTM unit and GRU unit learns respectively during backpropagation?

  1. A

    2,3

  2. B

    3,4

  3. C

    4,3

  4. D

    8,6

Show answer

Correct answer

  • D

    8,6

Question 7

+2 marksOne correct option

Which statements about LSTM and GRU units in handling the problem of exploding/vanishing gradients are correct?

  1. A

    LSTM units are more susceptible to exploding gradients compared to GRU units due to their complex gating mechanisms.

  2. B

    The gating mechanisms in LSTM and GRU units implicitly handle exploding gradients without the need for additional techniques.

  3. C

    GRU units mitigate both vanishing and exploding gradient problems more effectively than LSTM units due to their simplified architecture.

  4. D

    Both LSTM and GRU units utilize gating mechanisms to address vanishing gradient problems, but GRU units typically converge faster due to their simpler design.

Show answer

Correct answer

  • D

    Both LSTM and GRU units utilize gating mechanisms to address vanishing gradient problems, but GRU units typically converge faster due to their simpler design.

Question 8

+3 marksNumerical answer

Consider an ensemble consisting of 3 models, where each model has an individual error rate of 50% on the test set. Assuming a simple majority voting scheme, what is the probability that a given instance is misclassified by the ensemble?
Assume that the models are independent and their errors are uncorrelated.

Show answer

Correct answer: 0.5 (accepted within ±0.05)

Question 9

+3 marksNumerical answer

Given the true outputs for a dataset, y = [1,2,3,4], and the predictions from three different models (A, B, and C) trained on different subsets of the training data, as follows:
Model A predictions: A = [1.1,1.9,3.1,3.9]
Model B predictions: B = [0.9,2.1,2.9,4.1]
Model C predictions: C = [2,2,3,4]
Calculate the squared bias (bias²) for these models evaluated in a regression task. Assume that each model uses the same parameters but is trained on different subsets of the training data. (Enter your answer up to 3 decimal places.)

Show answer

Correct answer: 0.025 (accepted within ±0.005)

Question 10

+3 marksNumerical answer

Consider a Convolutional Neural Network (CNN) architecture for image classification with the following layers:
1. Convolutional layer with 32 filters of size 3 × 3, with a stride of 1 and no padding.
2. Max pooling layer with a pool size of 2 × 2 and a stride of 2.
3. Convolutional layer with 64 filters of size 4 × 4, with a stride of 1 and no padding.
4. Max pooling layer with a pool size of 2 × 2 and a stride of 2.
5. Fully connected layer with 128 neurons.
6. Output layer with 10 neurons (for 10 classes) using softmax activation.
If the input image size is 64 × 64 × 3, and the network has no bias term, how many parameters are there in the CNN?

Show answer

Correct answer: 28256

Question 11

+3 marksNumerical answer

Suppose you have a vocabulary of 10,000 unique words and you want to train a CBOW model with a window size of 2 (on each side) and with an embedding dimension of 300. How many parameters (weights) will the embedding layer have?

Show answer

Correct answer: 3000000

Question 12

+3 marksNumerical answer

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.02, calculate the cross-entropy loss for this prediction.

Show answer

Correct answer: 3.95 (accepted within ±0.05)

Question 13

+3 marksNumerical answer

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:
‘The idea is to die young as late as possible’

Show answer

Correct answer: 31

Question 14

+3 marksNumerical answer

In a Skip-gram model with a vocabulary of 15000 words, if you choose a negative sampling rate of 10 negative samples for each positive sample, how many total samples will be generated for a sentence with 8 unique words and a window size of 3 (on each side)?

Show answer

Correct answer: 396

Question 15

+2 marksNumerical answer

Given a scenario where there are 5 possible letters represented as one-hot encoded vectors of length 5, the RNN employs the following formulas for the state vector and output at time step tt:

st=σ(Uxi+Wst−1+b)y^t=O(Vst+c)\begin{aligned} s_t &= \sigma(Ux_i + Ws_{t-1} + b) \\ \hat{y}_t &= O(Vs_t + c) \end{aligned}

Here, σ\sigma and OO denote the sigmoid and softmax functions, respectively. Assume that st∈R2s_t \in \mathbb{R}^2 and yt∈R5y_t \in \mathbb{R}^5

Based on the above data, answer the given subquestions.

With a total of 10 time steps (T = 10, implying prediction for a word of length 9), what is the total count of parameters (including bias) within the network?

Show answer

Correct answer: 31

Question 16

+3 marksOne correct option

Given a scenario where there are 5 possible letters represented as one-hot encoded vectors of length 5, the RNN employs the following formulas for the state vector and output at time step tt:

st=σ(Uxi+Wst−1+b)y^t=O(Vst+c)\begin{aligned} s_t &= \sigma(Ux_i + Ws_{t-1} + b) \\ \hat{y}_t &= O(Vs_t + c) \end{aligned}

Here, σ\sigma and OO denote the sigmoid and softmax functions, respectively. Assume that st∈R2s_t \in \mathbb{R}^2 and yt∈R5y_t \in \mathbb{R}^5

Based on the above data, answer the given subquestions.

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • D

Question 17

+3 marksNumerical answer

Given a scenario where there are 5 possible letters represented as one-hot encoded vectors of length 5, the RNN employs the following formulas for the state vector and output at time step tt:

st=σ(Uxi+Wst−1+b)y^t=O(Vst+c)\begin{aligned} s_t &= \sigma(Ux_i + Ws_{t-1} + b) \\ \hat{y}_t &= O(Vs_t + c) \end{aligned}

Here, σ\sigma and OO denote the sigmoid and softmax functions, respectively. Assume that st∈R2s_t \in \mathbb{R}^2 and yt∈R5y_t \in \mathbb{R}^5

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 [0, 0, 1, 0, 0]^(T) ? assume the loss to be cross-entropy at each time step. Write your answer correct to two decimal places.

Show answer

Correct answer: 16.1 (accepted within ±0.1)

Question 18

+3 marksOne or more correct options

Select the correct statement regarding the vanishing and exploding gradient problem in RNN.

Select all that apply.

  1. A

    The vanishing gradient problem in RNNs occurs when the gradient approaches zero during backpropagation, hindering the training of long sequences.

  2. B

    The exploding gradient problem in RNNs occurs when the gradient grows uncontrollably during backpropagation, leading to numerical instability and difficulty in training.

  3. C

    The vanishing gradient problem in RNNs can be mitigated by using the Rectified Linear Unit (ReLU) activation function

  4. D

    The vanishing gradient problem in RNNs can be mitigated by using gradient clipping, where gradients are capped to a maximum value during training.

  5. E

    Both vanishing and exploding gradient problems in RNNs can occur due to the nature of the recurrent connections and the repeated multiplication of weight matrices.

Show answer

Correct answers

  • A

    The vanishing gradient problem in RNNs occurs when the gradient approaches zero during backpropagation, hindering the training of long sequences.

  • B

    The exploding gradient problem in RNNs occurs when the gradient grows uncontrollably during backpropagation, leading to numerical instability and difficulty in training.

  • D

    The vanishing gradient problem in RNNs can be mitigated by using gradient clipping, where gradients are capped to a maximum value during training.

  • E

    Both vanishing and exploding gradient problems in RNNs can occur due to the nature of the recurrent connections and the repeated multiplication of weight matrices.