Quiz Space

May 2024 term · Deep Learning · BSCS3004

Deep Learning Quiz 1: 7 July 2024 (May 2024 term)

The IIT Madras BS Deep Learning (Deep Learning) Quiz 1 paper sat on 7 Jul 2024, in the May 2024 term: 16 questions for 50 marks in 120 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.

Questions
16
Marks
50
Duration
120 min
Numerical
6
MCQ
9
MSQ
1

Updated

Official paper: IIT M DEGREE AN EXAM QDB2 7 July 2024 · No negative marking.

Question 1

+3 marksNumerical answer

Consider a dataset of 100 points x1,x2,⋯ ,x100\mathbf{x_1}, \mathbf{x_2}, \cdots, \mathbf{x_{100}}.

First 50 points are x1=x2=⋯=x50=[aa]\mathbf{x_1} = \mathbf{x_2} = \cdots = \mathbf{x_{50}} = \begin{bmatrix} a \\ a \end{bmatrix} and next 50 points are x51=x52=⋯=x100=[−a−a]\mathbf{x_{51}} = \mathbf{x_{52}} = \cdots = \mathbf{x_{100}} = \begin{bmatrix} -a \\ -a \end{bmatrix}, where a>0a > 0. The first 50 data points belong to the positive class (denoted as 1) and the next 50 data points belong to the negative class (denoted by 0). Suppose that the perceptron learning algorithm is used to find the decision boundary that separates these data points with the following rule,

f(x)={1if wTx≥00if wTx<0f(\mathbf{x}) = \begin{cases} 1 & \text{if } \mathbf{w^T x} \ge 0 \\ 0 & \text{if } \mathbf{w^T x} < 0 \end{cases}

The algorithm checks the data points in order. How often do the weights get updated until convergence? The weights do not include bias. If the algorithm does not converge, enter the answer as −1-1

Show answer

Correct answer: 1

Question 2

+3 marksNumerical answer

Consider a single McCulloch-Pitts (MP) neuron with four binary inputs x1x_1, x2x_2, x3x_3, and x4x_4. The neuron produces an output yy based on a threshold function. The MP neuron uses the following decision rule

y^={1,if x1+x2+x3+x4>θ0,otherwise\hat{y} = \begin{cases} 1, & \text{if } x_1 + x_2 + x_3 + x_4 > \theta \\ 0, & \text{otherwise} \end{cases}

Given the following input combinations and their corresponding outputs:

Inputs: x1=1,x2=0,x3=1,x4=1x_1 = 1, x_2 = 0, x_3 = 1, x_4 = 1 Output: y=1y = 1
Inputs: x1=0,x2=1,x3=1,x4=0x_1 = 0, x_2 = 1, x_3 = 1, x_4 = 0 Output: y=0y = 0
Inputs: x1=1,x2=1,x3=0,x4=1x_1 = 1, x_2 = 1, x_3 = 0, x_4 = 1 Output: y=1y = 1

What minimum threshold value is required for the neuron to produce an output of 1? If the threshold can not be determined using the given information, enter the answer as −1-1.

Show answer

Correct answer: 2

Question 3

+3 marksNumerical answer

Consider a feedforward neural network with one hidden layer trained using backpropagation for a binary classification task with classes labeled as 1 and 0. The network architecture is structured as follows:

  • Input layer consisting of 5 neurons
  • Hidden layer containing 3 neurons
  • Output layer comprising 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 utilized for binary classification is the binary cross-entropy loss, and both the hidden layer and output layer use the sigmoid activation function, the cross-entropy loss is represented by:

L(y,y^)=−ylog⁡2(y^)−(1−y)log⁡2(1−y^)L(y, \hat{y}) = -y\log_2(\hat{y}) - (1 - y)\log_2(1 - \hat{y})

Here, y^=P(y=1∣x)\hat{y} = P(y = 1|\mathbf{x}).

Given that the true label yy for a data point x\mathbf{x} is 1 and the predicted value y^\hat{y} is 0.9, and the activation at the hidden layer is represented by h1=[121]h_1 = \begin{bmatrix} 1 \\ 2 \\ 1 \end{bmatrix}, what is the value of ∂L∂W200\frac{\partial L}{\partial W_{200}}? Here, W200W_{200} denotes the weight connecting the first neuron of the hidden layer to the output layer neuron.

Show answer

Correct answer: -0.1 (accepted within ±0.1)

Question 4

+3 marksOne correct option
  1. A

    YES

  2. B

    NO

Show answer

Correct answer

  • B

    NO

Question 5

+3 marksOne correct option

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.

  1. A

    The loss function will increase.

  2. B

    The loss function will decrease, although not to the maximum possible extent.

  3. C

    The loss function will remain the same.

  4. D

    Can’t say. It depends on other parameters of the convex function.

Show answer

Correct answer

  • B

    The loss function will decrease, although not to the maximum possible extent.

Question 6

+3 marksOne correct option

Which of the following best describes the objective of gradient descent in relation to the Taylor series expansion of a function f(x) around a given point x0?

  1. A

    Gradient descent aims to minimize the first-order term of the Taylor series expansion to approximate the function f(x) globally.

  2. B

    Gradient descent seeks to minimize the first-order term of the Taylor series expansion to efficiently navigate the local neighborhood around the given point x0.

  3. C

    Gradient descent utilizes the entire Taylor series expansion to approximate the function f(x) and find its global minimum.

Show answer

Correct answer

  • B

    Gradient descent seeks to minimize the first-order term of the Taylor series expansion to efficiently navigate the local neighborhood around the given point x0.

Question 7

+2 marksOne correct option

Any boolean function of n inputs can be represented exactly by a network of perceptrons containing at least ____________ hidden layer(s) with at least ___________ perceptrons (each) and one output layer containing one perceptron.

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

Correct answer

  • D

Question 8

+5 marksOne correct option

Consider the plot shown below:

Which of the following could be the correct equation for this plot?

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

Correct answer

  • B

Question 9

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

+2 marksNumerical answer

Consider a feed-forward neural network shown below

Based on the above data, answer the given subquestions.

What is the total number of parameters (excluding bias) in the network?

Show answer

Correct answer: 12

Question 11

+2 marksNumerical answer

Consider a feed-forward neural network shown below

Based on the above data, answer the given subquestions.

The true label for a data point x\mathbf{x} is given by [010]\begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix}. Assume that h1=[0.51]h_1 = \begin{bmatrix} 0.5 \\ 1 \end{bmatrix} and W2=[101110]W_2 = \begin{bmatrix} 1 & 0 \\ 1 & 1 \\ 1 & 0 \end{bmatrix}.

If the network has no bias, find the loss value.

Use natural logrithm for loss calculation.

Enter your answer correct to two decimal places.

Show answer

Correct answer: 0.55 (accepted within ±0.05)

Question 12

+2 marksNumerical answer

Consider a feed-forward neural network shown below

Based on the above data, answer the given subquestions.

The true label for a data point x\mathbf{x} is given by [010]\begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix}. Assume that h1=[0.51]h_1 = \begin{bmatrix} 0.5 \\ 1 \end{bmatrix} and W2=[101110]W_2 = \begin{bmatrix} 1 & 0 \\ 1 & 1 \\ 1 & 0 \end{bmatrix}. If the network has no bias, compute the gradient of loss with respect to y^\hat{\mathbf{y}} and enter the sum of the elements.

Show answer

Correct answer: -1.74 (accepted within ±0.06)

Question 13

+4 marksOne correct option
  1. A

    0.09

  2. B

    0.06

  3. C

    0.001

  4. D

    0.0001

Show answer

Correct answer

  • A

    0.09

Question 14

+4 marksOne correct option

Assume you are using mini-batch gradient descent with a total dataset size of 1,000 and a batch size of 20. If you process 10,000 mini-batches, how many epochs have been completed?

  1. A

    5 epochs

  2. B

    10 epochs

  3. C

    20 epochs

  4. D

    200 epochs

Show answer

Correct answer

  • D

    200 epochs

Question 15

+4 marksOne correct option

If the batch size in mini-batch gradient descent is increased from 32 to 128 while keeping all other parameters constant, what is the likely impact on the variance of the gradient estimates per update?

  1. A

    Increases the variance

  2. B

    Decreases the variance

  3. C

    No impact on the variance

  4. D

    Initially decreases then increases the variance

Show answer

Correct answer

  • B

    Decreases the variance

Question 16

+4 marksOne correct option

What do contour lines on a contour plot represent?

  1. A

    The areas where the function value increases most rapidly

  2. B

    Lines connecting points where the function has the same output value

  3. C

    The maximum and minimum values of a function

  4. D

    The gradient of the function at those points

Show answer

Correct answer

  • B

    Lines connecting points where the function has the same output value