Quiz Space

January 2024 term · Deep Learning · BSCS3004

Deep Learning End Term: 28 April 2024, Set QDB3 (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 QDB3: 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
MSQ
3
Numerical
10
MCQ
5

Updated

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

Question 1

+3 marksOne or more correct options

Consider the MP neuron model and its applicability to representing boolean functions. Select the correct statements:

Select all that apply.

  1. A

    The MP neuron model can represent a wide range of boolean functions (not all) by appropriately adjusting its weights and thresholds.

  2. B

    The MP neuron model can approximate arbitrary boolean functions, including non-linear ones.

  3. C

    The MP neuron model can accurately represent the XOR function by adjusting its weights and thresholds.

  4. D

    The representation power of the MP neuron model increases when multiple neurons are combined in a network architecture.

Show answer

Correct answers

  • A

    The MP neuron model can represent a wide range of boolean functions (not all) by appropriately adjusting its weights and thresholds.

  • D

    The representation power of the MP neuron model increases when multiple neurons are combined in a network architecture.

Question 2

+2 marksNumerical answer

How many sigmoid neurons do we require to construct a tower function using single hidden layer to approximate a 2 dimensional continuous function ?

Show answer

Correct answer: 4

Question 3

+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 4

+3 marksOne correct option

In the context of mini-batch gradient descent, if reducing the size of the minibatch to half makes your model take thrice 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 increases by 2/3 times.

  2. B

    The number of updates required increases by six times.

  3. C

    The number of updates required increases by 3/2 times.

  4. D

    The number of updates required decreases by 2/3 times.

  5. E

    The number of updates required decreases by six times.

  6. F

    The number of updates required decreases by 3/2 times.

Show answer

Correct answer

  • B

    The number of updates required increases by six times.

Question 5

+3 marksOne correct option

Which of the following statements about AdaMax optimisation algorithm are True?

  1. A

    It updates the learning rate using the average of past gradients.

  2. B

    It updates learning rates adaptively based on past gradients.

  3. C

    It uses the maximum of past gradients instead of the root mean square of past gradients.

  4. D

    It does not involve any adaptive learning rate mechanism.

Show answer

Correct answer

  • C

    It uses the maximum of past gradients instead of the root mean square of past gradients.

Question 6

+2 marksOne or more correct options

Choose all the correct options from below.

Select all that apply.

  1. A

    In Triangular Cyclic Learning rate scheme,learning rate changes abruptly after certain number of iteration.

  2. B

    In Cosine Annealing learning rate changes abruptly after certain number of iterations.

  3. C

    In Step Decay learning rate scheme we halve the learning rate after an epoch if the validation error is less than what it was for previous epoch.

  4. D

    In Warm Start method we start with high initial learning rate and then decay it.

Show answer

Correct answers

  • B

    In Cosine Annealing learning rate changes abruptly after certain number of iterations.

  • D

    In Warm Start method we start with high initial learning rate and then decay it.

Question 7

+3 marksNumerical answer

Consider an ensemble consisting of 5 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 8

+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 average variance 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.06 (accepted within ±0.01)

Question 9

+3 marksNumerical answer

Consider a Convolutional Neural Network (CNN) architecture for image classification with the following layers:
1. Convolutional layer with 24 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 56 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 108 neurons.
6. Output layer with 10 neurons (for 10 classes) using softmax activation.
If the input image size is 84 × 84 × 3, and the network has no bias term, how many parameters are there in the CNN?

Show answer

Correct answer: 41612

Question 10

+3 marksNumerical answer

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 500. How many parameters (weights) will the embedding layer have?

Show answer

Correct answer: 2500000

Question 11

+3 marksNumerical answer

Assume that your CBOW model outputs a probability distribution over a vocabulary of 10,000 words for a given context. If the correct target word is word number 200, and the model’s predicted probability for this word is 0.3, calculate the cross-entropy loss for this prediction.

Show answer

Correct answer: 1.2 (accepted within ±0.1)

Question 12

+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:
‘Finish easy questions as early as possible’

Show answer

Correct answer: 19

Question 13

+3 marksNumerical answer

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

Show answer

Correct answer: 204

Question 14

+2 marksNumerical answer

Given a scenario where there are 8 possible letters represented as one-hot encoded vectors of length 8, 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∈R8y_t \in \mathbb{R}^8

Based on the above data, answer the given subquestions.

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

Show answer

Correct answer: 46

Question 15

+3 marksOne correct option

Given a scenario where there are 8 possible letters represented as one-hot encoded vectors of length 8, 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∈R8y_t \in \mathbb{R}^8

Based on the above data, answer the given subquestions.

  1. A

    [0, 0, 0.5, 0.5, 0, 0, 0, 0]^(T)

  2. B

    [0.1, 0.1, 0.1, 0.3, 0.1, 0.1, 0.1,0.1]^(T)

  3. C

    [0, 0, 0, 1, 0, 0, 0, 0]^(T)

  4. D

    [1/8, 1/8, 1/8, 1/8, 1/8, 1/8, 1/8, 1/8]^(T)

Show answer

Correct answer

  • D

    [1/8, 1/8, 1/8, 1/8, 1/8, 1/8, 1/8, 1/8]^(T)

Question 16

+3 marksNumerical answer

Given a scenario where there are 8 possible letters represented as one-hot encoded vectors of length 8, 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∈R8y_t \in \mathbb{R}^8

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 20 time steps (assume that indices start with 1) for the input [0, 0, 0, 1, 0, 0, 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: 41.58 (accepted within ±0.08)

Question 17

+3 marksOne or more correct options

Consider training a Recurrent Neural Network (RNN) for a sequence prediction task. Which of the following statements accurately describe challenges in training RNNs?

Select all that apply.

  1. A

    RNNs suffer from the problem of ”short-term memory,” where they struggle to retain information from earlier time steps when processing long sequences, leading to limitations in capturing long-term dependencies.

  2. B

    RNNs do not suffer from the problem of ’short-term memory’ and can effectively retain information from earlier time steps even when processing long sequences.

  3. C

    Training RNNs requires careful initialization of weights and biases to ensure stable convergence during training, as poorly initialized weights can lead to gradient saturation and slow learning.

  4. D

    Architectural modifications such as Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU) have been introduced to address the problem of ”short-term memory” in RNNs and improve their ability to capture long-term dependencies.

Show answer

Correct answers

  • A

    RNNs suffer from the problem of ”short-term memory,” where they struggle to retain information from earlier time steps when processing long sequences, leading to limitations in capturing long-term dependencies.

  • C

    Training RNNs requires careful initialization of weights and biases to ensure stable convergence during training, as poorly initialized weights can lead to gradient saturation and slow learning.

  • D

    Architectural modifications such as Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU) have been introduced to address the problem of ”short-term memory” in RNNs and improve their ability to capture long-term dependencies.

Question 18

+2 marksOne correct option

State True or False. GRUs are popular variant of LSTMs in which output and forget gates are combined.

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • B

    FALSE