1. Home
  2. Explore
  3. Computer Science
  4. Neural Networks and Backpropagation

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Neural Networks and Backpropagation

  • 63Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Loss Optimization

What is the primary purpose of a loss function in supervised learning?

63 questions

  1. 1

    What is the primary purpose of a loss function in supervised learning?

    1. A

      To determine how many input features the model receives

    2. B

      To measure how far predictions are from the desired outputs

    3. C

      To specify the physical layout of the network hardware

    4. D

      To convert every input value into a probability automatically

    Correct answer
    B

    To measure how far predictions are from the desired outputs

    Explanation

    A loss function measures the error between a model's predictions and the correct outputs, providing a quantity that optimization attempts to minimize.

  2. 2

    Which statement correctly describes hinge loss compared with softmax loss?

    1. A

      Hinge loss eliminates the need to compare correct and incorrect class scores

    2. B

      Hinge loss can only be used when a network contains no hidden layers

    3. C

      Hinge loss converts every class score into a normalized probability distribution

    4. D

      Hinge loss encourages score margins but does not convert scores into probabilities

    Correct answer
    D

    Hinge loss encourages score margins but does not convert scores into probabilities

    Explanation

    Hinge loss encourages the correct class score to exceed incorrect scores by at least a margin, whereas it does not turn scores into probabilities.

  3. 3

    What does hinge loss penalize when the margin condition is violated?

    1. A

      Input features having different numerical scales

    2. B

      Correct classes receiving scores that are too high

    3. C

      Incorrect classes receiving scores that are too high

    4. D

      Weights being initialized with random values

    Correct answer
    C

    Incorrect classes receiving scores that are too high

    Explanation

    Hinge loss penalizes cases in which irrelevant or incorrect items receive scores that are too high relative to the correct item.

  4. 4

    What does the margin in hinge loss require?

    1. A

      Every class score must be separated from zero by the same amount

    2. B

      The correct score must exceed every incorrect score by a specified amount

    3. C

      Every incorrect score must be converted into a probability below one-half

    4. D

      The correct score must equal the average of all class scores

    Correct answer
    B

    The correct score must exceed every incorrect score by a specified amount

    Explanation

    The margin specifies how much larger the correct score should be than each incorrect score for the loss to become zero.

  5. 5

    Why is computing the loss and its gradient over an entire large dataset expensive?

    1. A

      The loss function must convert every example into a new class

    2. B

      The model must remove all weights before each optimization step

    3. C

      The gradient can only be computed after the data are sorted

    4. D

      Every optimization step must process all training examples

    Correct answer
    D

    Every optimization step must process all training examples

    Explanation

    Evaluating the loss and derivative over a large dataset requires processing every example, making each optimization step computationally expensive.

  6. 6

    What is the purpose of a mini-batch in gradient-based optimization?

    1. A

      To estimate gradients using a sampled subset of the training data

    2. B

      To replace the loss function with a fixed set of class scores

    3. C

      To ensure that every optimization step uses exactly one example

    4. D

      To permanently remove difficult examples from the training data

    Correct answer
    A

    To estimate gradients using a sampled subset of the training data

    Explanation

    A mini-batch is a subsample of the dataset used to estimate gradients and take an optimization step more efficiently.

  7. 7

    Which of the following was identified as a commonly used mini-batch size?

    1. A

      Only the entire dataset, regardless of its size

    2. B

      An automatically fixed size of one million examples

    3. C

      Exactly one example for every class in the dataset

    4. D

      Approximately 323232, 646464, 128128128, or 256256256 examples

    Correct answer
    D

    Approximately 323232, 646464, 128128128, or 256256256 examples

    Explanation

    The lecture listed values such as 323232, 646464, 128128128, and 256256256 as common mini-batch sizes.

  8. 8

    What is the defining update direction in gradient descent?

    1. A

      The weights move toward the largest value of the loss

    2. B

      The weights move in the negative direction of the loss gradient

    3. C

      The weights move in the positive direction of the loss gradient

    4. D

      The weights move randomly without using the loss gradient

    Correct answer
    B

    The weights move in the negative direction of the loss gradient

    Explanation

    Because the goal is to reduce loss, gradient descent takes steps opposite to the gradient.

  9. 9

    How are numerical and analytical gradients commonly used together?

    1. A

      Analytical gradients are used in practice and numerical gradients check implementations

    2. B

      Analytical gradients replace the loss function while numerical gradients initialize weights

    3. C

      Numerical gradients are always used for training and analytical gradients are discarded

    4. D

      Both gradients are averaged because neither can be used independently

    Correct answer
    A

    Analytical gradients are used in practice and numerical gradients check implementations

    Explanation

    Analytical gradients are preferred in practice for efficiency, while numerical gradients are often used to verify that an implementation is correct.

  10. 10

    What is a typical learning-rate scheduling strategy?

    1. A

      Start with zero and increase it only after the loss reaches its minimum

    2. B

      Use a separate learning rate that is unrelated to optimization

    3. C

      Keep increasing the learning rate whenever the model improves

    4. D

      Start with a larger learning rate and reduce it during training

    Correct answer
    D

    Start with a larger learning rate and reduce it during training

    Explanation

    Many optimizers begin with a relatively large learning rate and later decay or reduce it by a factor.

  11. 11

    What is the role of the first weight matrix in a two-layer fully connected network?

    1. A

      It maps the input features to the hidden-layer representation

    2. B

      It replaces the activation function in the output layer

    3. C

      It computes the regularization penalty without using the input

    4. D

      It converts the final hidden representation directly into class labels

    Correct answer
    A

    It maps the input features to the hidden-layer representation

    Explanation

    The first weight matrix, often denoted W1W_1W1​, transforms the input XXX into values for the hidden layer.

  12. 12

    In a network with input dimension DDD and CCC output classes, what does CCC represent?

    1. A

      The number of input features per example

    2. B

      The number of hidden neurons between the layers

    3. C

      The number of examples in a mini-batch

    4. D

      The number of output neurons or classes

    Correct answer
    D

    The number of output neurons or classes

    Explanation

    The quantity CCC denotes the number of classes, corresponding to the number of output nodes or neurons.

  13. 13

    What does the hidden-layer width HHH represent?

    1. A

      The number of features in each input example

    2. B

      The number of loss functions used during training

    3. C

      The number of neurons in the hidden layer

    4. D

      The number of classes in the output layer

    Correct answer
    C

    The number of neurons in the hidden layer

    Explanation

    The hidden-layer width HHH is the number of neurons or nodes in that hidden layer.

  14. 14

    Why are biases included in practical neural-network layers?

    1. A

      They guarantee that the network will not overfit

    2. B

      They convert the output scores into class probabilities

    3. C

      They force every neuron to output zero for negative inputs

    4. D

      They provide a more complete and flexible affine transformation

    Correct answer
    D

    They provide a more complete and flexible affine transformation

    Explanation

    Practical layers generally include biases in addition to weights and inputs, although biases may be omitted from simplified notation.

  15. 15

    What is the main function of an activation function between linear layers?

    1. A

      It removes the need to learn any weight parameters

    2. B

      It reduces every hidden layer to a single neuron

    3. C

      It introduces nonlinearity into the network

    4. D

      It guarantees that all class scores become probabilities

    Correct answer
    C

    It introduces nonlinearity into the network

    Explanation

    Activation functions introduce nonlinear transformations, allowing neural networks to represent nonlinear relationships.

  16. 16

    What would happen if two linear layers were composed without an activation function between them?

    1. A

      They would necessarily become a nonlinear classifier

    2. B

      They would automatically produce independent class probabilities

    3. C

      They would no longer require gradient-based optimization

    4. D

      They could be combined into one equivalent linear transformation

    Correct answer
    D

    They could be combined into one equivalent linear transformation

    Explanation

    A composition such as W2(W1X)W_2(W_1X)W2​(W1​X) can be represented by a single matrix transformation, so the network would remain linear.

  17. 17

    Why can a multilayer network solve some problems that a single linear classifier cannot?

    1. A

      Additional layers guarantee that the original data become linearly distributed

    2. B

      Hidden layers eliminate the need for labeled training examples

    3. C

      Nonlinear transformations can map the data into a separable representation

    4. D

      Multiple layers ensure that every input belongs to the same class

    Correct answer
    C

    Nonlinear transformations can map the data into a separable representation

    Explanation

    A nonlinear transformation can map data from the original space into a new space where the classes can be separated by a line or hyperplane.

  18. 18

    What is a multilayer perceptron, or MLP, in the context described?

    1. A

      A network that uses only nearest-neighbor comparisons and no learned weights

    2. B

      A network built by stacking fully connected layers and activation functions

    3. C

      A loss function that converts scores into normalized probabilities

    4. D

      A biological neuron model containing dendrites and axons

    Correct answer
    B

    A network built by stacking fully connected layers and activation functions

    Explanation

    MLPs are fully connected networks formed from weight-based layers, typically with nonlinear activations between them.

  19. 19

    What is the effect of adding more hidden layers to a fully connected network?

    1. A

      It prevents the network from learning shared patterns

    2. B

      It forces the network to remain equivalent to a single linear classifier

    3. C

      It allows the network to build increasingly complex representations

    4. D

      It removes all intermediate representations from the computation

    Correct answer
    C

    It allows the network to build increasingly complex representations

    Explanation

    Additional layers allow the network to compose transformations and learn more complex representations.

  20. 20

    How can hidden neurons be interpreted at a high level in image classification?

    1. A

      They can learn templates for parts or patterns shared across objects

    2. B

      They can only memorize the names of the output classes

    3. C

      They directly store the original image without transformation

    4. D

      They ensure that every object is represented by one complete template

    Correct answer
    A

    They can learn templates for parts or patterns shared across objects

    Explanation

    Hidden neurons can learn templates for parts of objects or patterns shared across multiple classes, rather than only whole-object templates.

  21. 21

    What is the defining behavior of the ReLU activation function?

    1. A

      It outputs zero for negative inputs and passes positive inputs through

    2. B

      It exchanges the values of neighboring neurons

    3. C

      It converts every input into a value strictly between zero and one

    4. D

      It outputs the same constant for all positive and negative inputs

    Correct answer
    A

    It outputs zero for negative inputs and passes positive inputs through

    Explanation

    ReLU, or the rectified linear unit, implements the maximum of zero and the input.

  22. 22

    What problem can ReLU sometimes create?

    1. A

      The weights are forced to have identical values

    2. B

      The network becomes unable to represent any linear relationship

    3. C

      Some neurons can become inactive and produce zero outputs

    4. D

      All neurons can become probability distributions automatically

    Correct answer
    C

    Some neurons can become inactive and produce zero outputs

    Explanation

    ReLU can create dead neurons because inputs that are not positive produce zero, potentially leaving some neurons inactive.

  23. 23

    Which activation functions were presented as alternatives intended to reduce problems associated with standard ReLU?

    1. A

      Gradient descent and momentum

    2. B

      Softmax and hinge loss

    3. C

      Jacobian and Hessian

    4. D

      Leaky ReLU and ELU

    Correct answer
    D

    Leaky ReLU and ELU

    Explanation

    Leaky ReLU and the exponential linear unit, or ELU, were identified as alternatives to help address dead-neuron behavior.

  24. 24

    What advantage of ELU was specifically highlighted?

    1. A

      It always produces class probabilities as its output

    2. B

      It provides a better zero-centered function than standard ReLU

    3. C

      It computes the gradient without using the input value

    4. D

      It eliminates the need for any hidden layers

    Correct answer
    B

    It provides a better zero-centered function than standard ReLU

    Explanation

    ELU was described as somewhat better because of its more zero-centered behavior.

  25. 25

    Which activation family was mentioned as being used in some transformer architectures?

    1. A

      GELU, or Gaussian error linear units

    2. B

      Only the hinge-loss activation

    3. C

      Only the standard linear function

    4. D

      The mini-batch activation unit

    Correct answer
    A

    GELU, or Gaussian error linear units

    Explanation

    GELU was identified as a newer activation variation often used in transformer architectures.

  26. 26

    What is another name for the SiLU activation function?

    1. A

      Softmax

    2. B

      Momentum

    3. C

      Swish

    4. D

      Hinge

    Correct answer
    C

    Swish

    Explanation

    SiLU is the sigmoid linear unit and is also called Swish.

  27. 27

    Why are sigmoid and tanh often avoided in the middle of deep neural networks?

    1. A

      They squash values into narrow ranges that can cause vanishing gradients

    2. B

      They always produce negative outputs regardless of the input

    3. C

      They remove all nonlinear behavior from the network

    4. D

      They cannot be differentiated at any point

    Correct answer
    A

    They squash values into narrow ranges that can cause vanishing gradients

    Explanation

    Sigmoid and tanh compress values into narrow ranges, which can contribute to vanishing gradients in hidden layers.

  28. 28

    Where might sigmoid or tanh still be useful according to the lecture?

    1. A

      Only in the regularizer and never in a network layer

    2. B

      Only before the input reaches the first weight matrix

    3. C

      Only when the network contains no nonlinear transformations

    4. D

      In later or output layers when bounded or binary-like outputs are desired

    Correct answer
    D

    In later or output layers when bounded or binary-like outputs are desired

    Explanation

    Although often avoided in hidden layers, sigmoid or tanh may be used in later layers when bounded or binarized outputs are useful.

  29. 29

    How is the choice of an activation function for a new problem generally made?

    1. A

      It is determined uniquely by the number of input features

    2. B

      It depends only on the number of training examples

    3. C

      It is always fixed mathematically to sigmoid for every architecture

    4. D

      It is largely empirical and informed by practices for similar architectures

    Correct answer
    D

    It is largely empirical and informed by practices for similar architectures

    Explanation

    Activation selection is largely empirical, often beginning with ReLU or functions commonly used in similar architectures.

  30. 30

    Which property is important for activation functions used with back propagation?

    1. A

      They must prevent all weights from becoming negative

    2. B

      They should generally be differentiable enough for gradient computation

    3. C

      They must always output an integer class label

    4. D

      They must have exactly the same formula as the loss function

    Correct answer
    B

    They should generally be differentiable enough for gradient computation

    Explanation

    Back propagation requires derivatives, so differentiability or an appropriate piecewise derivative is an important consideration.

  31. 31

    What does the forward pass of a neural network do?

    1. A

      It removes the regularization term before optimization

    2. B

      It propagates gradients from the loss back to every parameter

    3. C

      It changes the training labels into randomly chosen targets

    4. D

      It applies the layers to the inputs to produce predictions and loss

    Correct answer
    D

    It applies the layers to the inputs to produce predictions and loss

    Explanation

    During the forward pass, inputs are transformed layer by layer, producing predictions and ultimately the loss value.

  32. 32

    What is the purpose of the backward pass?

    1. A

      To compute gradients used to update the network's parameters

    2. B

      To calculate the number of neurons without using the loss

    3. C

      To generate new input examples from the output classes

    4. D

      To replace all activation functions with linear functions

    Correct answer
    A

    To compute gradients used to update the network's parameters

    Explanation

    The backward pass computes derivatives of the loss with respect to parameters so optimization can update the weights.

  33. 33

    What does the regularization coefficient control?

    1. A

      How many output classes are represented by the labels

    2. B

      How strongly the regularizer contributes to the total loss

    3. C

      How many input samples are placed in each image

    4. D

      How many times the activation function is evaluated per neuron

    Correct answer
    B

    How strongly the regularizer contributes to the total loss

    Explanation

    The regularization coefficient, such as �lambda�lambda�lambda, controls the contribution of the regularization term to the overall loss.

  34. 34

    How does stronger regularization affect the weights?

    1. A

      It guarantees that the model will have more detailed decision boundaries

    2. B

      It forces the weights to memorize every training example

    3. C

      It removes all dependence of the output on the weights

    4. D

      It constrains their values and gives the model less freedom

    Correct answer
    D

    It constrains their values and gives the model less freedom

    Explanation

    A larger regularization contribution constrains the weights, reducing the freedom of the model to fit highly detailed patterns.

  35. 35

    What can happen if regularization is made excessively strong?

    1. A

      The model stops using a loss function altogether

    2. B

      The model necessarily gains the capacity to memorize the training data

    3. C

      The model may underfit because its decision boundaries are too generic

    4. D

      The model must overfit because all weights become unconstrained

    Correct answer
    C

    The model may underfit because its decision boundaries are too generic

    Explanation

    Excessive regularization can constrain the model too much, leading to generic decision boundaries and underfitting.

  36. 36

    Why can increasing the number of neurons make a network more prone to overfitting?

    1. A

      More neurons prevent the network from representing nonlinear functions

    2. B

      Greater capacity allows the network to model or memorize finer details of the training data

    3. C

      More neurons force every decision boundary to become linear

    4. D

      Greater capacity makes the network unable to fit the training examples

    Correct answer
    B

    Greater capacity allows the network to model or memorize finer details of the training data

    Explanation

    A larger network has more capacity to learn complex functions, but it may also memorize training data and generalize poorly.

  37. 37

    What strategy was recommended for choosing network size and regularization?

    1. A

      Use a somewhat larger network and control complexity with regularization

    2. B

      Increase network size indefinitely without checking generalization

    3. C

      Always use the smallest possible network and avoid regularization

    4. D

      Choose network size only by minimizing the number of output classes

    Correct answer
    A

    Use a somewhat larger network and control complexity with regularization

    Explanation

    The suggested rule of thumb was to use a somewhat larger network than minimally necessary and tune regularization to control overfitting.

  38. 38

    How is the required number of hidden neurons usually determined?

    1. A

      Through empirical experiments and comparison with similar problems

    2. B

      By choosing the same value for every type of dataset

    3. C

      By setting it equal to the number of training examples

    4. D

      Through a universal formula based only on the input dimension

    Correct answer
    A

    Through empirical experiments and comparison with similar problems

    Explanation

    There is no single prescription; practitioners use related research, comparable networks, and experiments to choose the network complexity.

  39. 39

    What is a computational graph?

    1. A

      A table containing the labels but not the model computations

    2. B

      A method for selecting classes without calculating scores

    3. C

      A diagram showing only the biological structure of a neuron

    4. D

      A step-by-step representation of operations from inputs and parameters to the loss

    Correct answer
    D

    A step-by-step representation of operations from inputs and parameters to the loss

    Explanation

    A computational graph organizes the operations in a model, beginning with inputs and parameters and ending with the loss.

  40. 40

    Why are computational graphs especially useful for complex neural networks?

    1. A

      They eliminate the need to define any operations in the network

    2. B

      They allow gradients to be computed modularly instead of deriving one enormous expression

    3. C

      They replace all forward computations with random sampling

    4. D

      They ensure that every network has only one trainable parameter

    Correct answer
    B

    They allow gradients to be computed modularly instead of deriving one enormous expression

    Explanation

    Computational graphs break complex functions into local operations, making forward and backward computations modular and manageable.

  41. 41

    Consider f(x,y,z)=(x+y)zf(x,y,z)=(x+y)zf(x,y,z)=(x+y)z with x=−2x=-2x=−2, y=5y=5y=5, and z=−4z=-4z=−4. What is the intermediate value q=x+yq=x+yq=x+y?

    1. A

      333

    2. B

      202020

    3. C

      −12-12−12

    4. D

      −7-7−7

    Correct answer
    A

    333

    Explanation

    The addition gate gives q=x+y=−2+5=3q=x+y=-2+5=3q=x+y=−2+5=3.

  42. 42

    For q=x+yq=x+yq=x+y, what are the local derivatives with respect to xxx and yyy?

    1. A

      Both derivatives are 000

    2. B

      The derivative with respect to xxx is yyy, and with respect to yyy is xxx

    3. C

      The derivative with respect to xxx is −1-1−1, and with respect to yyy is 111

    4. D

      Both derivatives are 111

    Correct answer
    D

    Both derivatives are 111

    Explanation

    For an addition operation, rac{�partial q}{�partial x}=1 and rac{�partial q}{�partial y}=1.

  43. 43

    For f=qzf=qzf=qz, what are the local derivatives rac{�partial f}{�partial q} and rac{�partial f}{�partial z}?

    1. A

      111 and 111, respectively

    2. B

      −z-z−z and −q-q−q, respectively

    3. C

      zzz and qqq, respectively

    4. D

      qqq and zzz, respectively

    Correct answer
    C

    zzz and qqq, respectively

    Explanation

    In a multiplication gate, the derivative with respect to one input is the other input, so rac{�partial f}{�partial q}=z and rac{�partial f}{�partial z}=q.

  44. 44

    What is the derivative of a quantity with respect to itself at the endpoint of the graph?

    1. A

      It is always 000

    2. B

      It is always 111

    3. C

      It is equal to the input value

    4. D

      It is equal to the regularization coefficient

    Correct answer
    B

    It is always 111

    Explanation

    The derivative of a variable with respect to itself, such as rac{�partial f}{�partial f}, is 111.

  45. 45

    What does the chain rule allow back propagation to do?

    1. A

      Combine local derivatives along a path to obtain a derivative with respect to an earlier variable

    2. B

      Determine the network size from the value of the loss

    3. C

      Convert all nonlinear operations into probability calculations

    4. D

      Avoid computing any derivatives in individual operations

    Correct answer
    A

    Combine local derivatives along a path to obtain a derivative with respect to an earlier variable

    Explanation

    The chain rule multiplies derivatives through intermediate variables, such as rac{�partial f}{�partial y}= rac{�partial f}{�partial q} rac{�partial q}{�partial y}.

  46. 46

    What is an upstream gradient?

    1. A

      A regularization penalty applied directly to the labels

    2. B

      A gradient arriving at a node from operations later in the graph

    3. C

      A gradient that is discarded after the forward pass

    4. D

      A derivative computed only from the original input features

    Correct answer
    B

    A gradient arriving at a node from operations later in the graph

    Explanation

    The upstream gradient is the gradient propagated backward from later operations toward the current node.

  47. 47

    How is a downstream gradient computed at a computational-graph node?

    1. A

      By replacing the upstream gradient with the forward output

    2. B

      By multiplying the upstream gradient by the local gradient

    3. C

      By dividing the local gradient by the number of classes

    4. D

      By adding the upstream gradient to the network size

    Correct answer
    B

    By multiplying the upstream gradient by the local gradient

    Explanation

    Back propagation computes each downstream gradient as the upstream gradient multiplied by the node's local derivative.

  48. 48

    What is the main advantage of local gradient calculations?

    1. A

      They make the entire network independent of its loss function

    2. B

      Each operation can compute its contribution independently and pass it backward

    3. C

      They eliminate the need to store values from the forward pass

    4. D

      They ensure that every node has the same gradient

    Correct answer
    B

    Each operation can compute its contribution independently and pass it backward

    Explanation

    Local gradients allow each node to implement its own backward computation and pass gradients to preceding nodes.

  49. 49

    Which shortcut correctly characterizes common computational-graph gates?

    1. A

      Addition routes gradients to the maximum, multiplication distributes zeros, and max swaps inputs

    2. B

      Addition converts gradients to probabilities, multiplication clips them, and max reverses their signs

    3. C

      Addition removes gradients, multiplication averages inputs, and max sends gradients everywhere equally

    4. D

      Addition distributes gradients, multiplication swaps inputs, and max routes gradients to the maximum

    Correct answer
    D

    Addition distributes gradients, multiplication swaps inputs, and max routes gradients to the maximum

    Explanation

    For an addition gate, gradients are copied to both inputs; for multiplication, each input receives the other input as its local derivative; for a max gate, the gradient follows the selected maximum.

  50. 50

    How does a max gate propagate a gradient during the backward pass?

    1. A

      It replaces the gradient with zero for every input

    2. B

      It sends the gradient only to the smallest input

    3. C

      It sends the gradient equally to every input

    4. D

      It sends the gradient to the input that achieved the maximum

    Correct answer
    D

    It sends the gradient to the input that achieved the maximum

    Explanation

    Because the max output depends on the winning input, the gradient is routed to the input that produced the maximum.

  51. 51

    Why does back propagation avoid manually differentiating an entire deep network expression?

    1. A

      It recursively applies local derivatives from the output back through the graph

    2. B

      It approximates every derivative by ignoring intermediate operations

    3. C

      It uses the same fixed gradient for every parameter

    4. D

      It computes only the derivative of the first layer

    Correct answer
    A

    It recursively applies local derivatives from the output back through the graph

    Explanation

    Back propagation recursively propagates gradients through local operations, avoiding one unwieldy symbolic derivative for the whole network.

  52. 52

    What does a typical modular neural-network operator need to support?

    1. A

      A forward computation and a backward gradient computation

    2. B

      Only a forward computation because gradients are random

    3. C

      Only a backward computation because outputs are not needed

    4. D

      A class-label lookup and no numerical computation

    Correct answer
    A

    A forward computation and a backward gradient computation

    Explanation

    Operators are commonly implemented with forward and backward components so they can compute outputs and propagate gradients.

  53. 53

    Why might an operator save or cache its inputs during the forward pass?

    1. A

      The inputs are needed to replace the training labels

    2. B

      The backward pass may need those inputs to calculate local gradients

    3. C

      The forward output cannot otherwise be displayed to the user

    4. D

      Caching inputs automatically prevents overfitting

    Correct answer
    B

    The backward pass may need those inputs to calculate local gradients

    Explanation

    Many backward formulas depend on values received during the forward pass, so implementations often save those values.

  54. 54

    What is the derivative of the sigmoid function in terms of the sigmoid output?

    1. A

      σ(x)+1\sigma(x)+1σ(x)+1

    2. B

      1−1σ(x)1-\frac{1}{\sigma(x)}1−σ(x)1​

    3. C

      xσ(x)x\sigma(x)xσ(x)

    4. D

      σ(x)(1−σ(x))\sigma(x)(1-\sigma(x))σ(x)(1−σ(x))

    Correct answer
    D

    σ(x)(1−σ(x))\sigma(x)(1-\sigma(x))σ(x)(1−σ(x))

    Explanation

    The sigmoid derivative can be written compactly as �sigma(x)(1−�sigma(x))�sigma(x)(1-�sigma(x))�sigma(x)(1−�sigma(x)), which makes its backward computation convenient.

  55. 55

    What is the shape of the gradient of a scalar loss with respect to a vector variable?

    1. A

      It has the same dimensionality as the vector variable

    2. B

      It is always a square matrix with the loss dimension as its side

    3. C

      It is always a single scalar regardless of the variable

    4. D

      It has one fewer dimension than the vector variable

    Correct answer
    A

    It has the same dimensionality as the vector variable

    Explanation

    The gradient of a scalar loss with respect to a vector has one component for each component of that vector, so it has the same shape.

  56. 56

    What form does the derivative take when a vector-valued output depends on a vector-valued input?

    1. A

      A scalar loss only

    2. B

      A Jacobian matrix

    3. C

      A mini-batch index

    4. D

      A single class label

    Correct answer
    B

    A Jacobian matrix

    Explanation

    Derivatives of vector outputs with respect to vector inputs form Jacobian matrices.

  57. 57

    What does an entry of a Jacobian represent?

    1. A

      The probability assigned to the most likely class

    2. B

      How one output component changes when one input component changes

    3. C

      The total number of neurons in the network

    4. D

      The regularization coefficient for the entire model

    Correct answer
    B

    How one output component changes when one input component changes

    Explanation

    Each Jacobian entry describes the sensitivity of a particular output component to a particular input component.

  58. 58

    Why is the Jacobian for an elementwise ReLU operation sparse?

    1. A

      The operation contains no derivative at any input

    2. B

      The Jacobian contains only the network's weight matrices

    3. C

      Every output depends equally on every input element

    4. D

      Each output depends only on the corresponding input element

    Correct answer
    D

    Each output depends only on the corresponding input element

    Explanation

    For an elementwise operation, an output component does not depend on other input components, so off-diagonal Jacobian entries are zero.

  59. 59

    For ReLU, what determines whether a diagonal Jacobian entry is 000 or 111?

    1. A

      Whether the mini-batch contains an even number of examples

    2. B

      Whether the regularization coefficient is large or small

    3. C

      Whether the input belongs to the first or last class

    4. D

      Whether the corresponding input is inactive or passes through positively

    Correct answer
    D

    Whether the corresponding input is inactive or passes through positively

    Explanation

    The ReLU derivative is 000 when the input is in the inactive region and 111 when the positive input passes through.

  60. 60

    Why do implementations often avoid explicitly constructing a large sparse Jacobian?

    1. A

      Sparse matrices always produce incorrect gradients

    2. B

      The forward pass does not provide any values for a Jacobian

    3. C

      A Jacobian cannot represent derivatives of vector-valued functions

    4. D

      The same result can be obtained more efficiently with rule-based gradient operations

    Correct answer
    D

    The same result can be obtained more efficiently with rule-based gradient operations

    Explanation

    When the structure of an operation is known, its backward rule can compute the needed result directly without storing a huge Jacobian.

  61. 61

    Why can explicitly forming the Jacobian of a matrix multiplication be impractical?

    1. A

      Matrix multiplication can only be differentiated numerically

    2. B

      The Jacobian contains only one entry regardless of matrix size

    3. C

      Its size can become enormous even for a single multiplication operation

    4. D

      Matrix multiplication has no derivative with respect to its inputs

    Correct answer
    C

    Its size can become enormous even for a single multiplication operation

    Explanation

    For matrix-valued inputs and outputs, the Jacobian may contain an extremely large number of entries, making explicit construction impractical.

  62. 62

    How can the backward pass for matrix multiplication be implemented efficiently?

    1. A

      By calculating only the gradient of the output bias

    2. B

      By deriving direct matrix operations for the gradients with respect to each input

    3. C

      By ignoring the upstream gradient and using the forward output

    4. D

      By replacing matrix multiplication with an unrelated activation function

    Correct answer
    B

    By deriving direct matrix operations for the gradients with respect to each input

    Explanation

    Direct matrix formulas compute gradients with respect to the inputs and weights without explicitly building the full Jacobian.

  63. 63

    What does the gradient with respect to a weight matrix tell the optimizer?

    1. A

      Which activation function is biologically most realistic

    2. B

      How changing each weight would affect the loss

    3. C

      How many output classes should be added to the problem

    4. D

      Which input examples should be removed from the dataset

    Correct answer
    B

    How changing each weight would affect the loss

    Explanation

    A weight gradient indicates how the loss changes when each weight changes, enabling gradient-based parameter updates.

Question 1 of 63
Question 1 of 63

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent