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

Study methods

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

Backpropagation in Neural Networks

  • 55Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Graph Primitives

What is a computation graph?

55 questions

  1. 1

    What is a computation graph?

    1. A

      A table that records only the final outputs of a neural network

    2. B

      A list of model parameters ordered by their numerical values

    3. C

      A cyclic graph that repeatedly applies the same derivative rule

    4. D

      A directed acyclic graph whose nodes represent expressions in a computation

    Correct answer
    D

    A directed acyclic graph whose nodes represent expressions in a computation

    Explanation

    A computation graph is a directed acyclic graph representing a mathematical computation, including its intermediate expressions.

  2. 2

    In a computation graph for a loss function, what does the root node represent?

    1. A

      The first input feature supplied to the model

    2. B

      The parameter that receives the largest gradient

    3. C

      The final expression being computed, such as the loss

    4. D

      The activation function used at the first layer

    Correct answer
    C

    The final expression being computed, such as the loss

    Explanation

    The root node represents the final expression of the computation, such as the loss function.

  3. 3

    What does an internal node in a computation graph typically represent?

    1. A

      A parameter that must remain fixed during optimization

    2. B

      A gradient that is independent of the model's inputs

    3. C

      A training example that has already been classified correctly

    4. D

      An intermediate subexpression used to compute a larger expression

    Correct answer
    D

    An intermediate subexpression used to compute a larger expression

    Explanation

    Internal nodes represent intermediate subexpressions, such as a layer's output or a score, that contribute to the final expression.

  4. 4

    How can a computation such as c=a+bc = a + bc=a+b be represented in a computation graph?

    1. A

      Input aaa points to a multiplication operation that produces bbb

    2. B

      Inputs aaa and bbb point directly to the loss without an operation

    3. C

      Inputs aaa and bbb point to an addition operation that produces ccc

    4. D

      Output ccc points to two separate operations that produce aaa and bbb

    Correct answer
    C

    Inputs aaa and bbb point to an addition operation that produces ccc

    Explanation

    The graph shows aaa and bbb flowing into an addition operation, whose result is labeled ccc.

  5. 5

    In gradient terms, what does the change in ccc caused by a small change in aaa describe?

    1. A

      The local sensitivity of ccc to aaa, measured by the derivative of ccc with respect to aaa

    2. B

      The rate at which aaa changes when the value of ccc is fixed

    3. C

      The number of parameters used to calculate ccc

    4. D

      The total difference between aaa and ccc, regardless of the operation

    Correct answer
    A

    The local sensitivity of ccc to aaa, measured by the derivative of ccc with respect to aaa

    Explanation

    The derivative measures how much the output changes in response to a small perturbation of an input.

  6. 6

    For c=a+bc = a + bc=a+b, what are the local derivatives with respect to the two inputs?

    1. A

      ∂c∂a=2a\frac{\partial c}{\partial a}=2a∂a∂c​=2a and ∂c∂b=2b\frac{\partial c}{\partial b}=2b∂b∂c​=2b

    2. B

      ∂c∂a=1\frac{\partial c}{\partial a}=1∂a∂c​=1 and ∂c∂b=−1\frac{\partial c}{\partial b}=-1∂b∂c​=−1

    3. C

      ∂c∂a=b\frac{\partial c}{\partial a}=b∂a∂c​=b and ∂c∂b=a\frac{\partial c}{\partial b}=a∂b∂c​=a

    4. D

      ∂c∂a=1\frac{\partial c}{\partial a}=1∂a∂c​=1 and ∂c∂b=1\frac{\partial c}{\partial b}=1∂b∂c​=1

    Correct answer
    D

    ∂c∂a=1\frac{\partial c}{\partial a}=1∂a∂c​=1 and ∂c∂b=1\frac{\partial c}{\partial b}=1∂b∂c​=1

    Explanation

    Increasing either input to a sum by a small amount increases the output by that same amount, so both partial derivatives are 111.

  7. 7

    For c=abc = abc=ab, what are the local derivatives with respect to aaa and bbb?

    1. A

      ∂c∂a=1\frac{\partial c}{\partial a}=1∂a∂c​=1 and ∂c∂b=1\frac{\partial c}{\partial b}=1∂b∂c​=1

    2. B

      ∂c∂a=a\frac{\partial c}{\partial a}=a∂a∂c​=a and ∂c∂b=b\frac{\partial c}{\partial b}=b∂b∂c​=b

    3. C

      ∂c∂a=2a\frac{\partial c}{\partial a}=2a∂a∂c​=2a and ∂c∂b=2b\frac{\partial c}{\partial b}=2b∂b∂c​=2b

    4. D

      ∂c∂a=b\frac{\partial c}{\partial a}=b∂a∂c​=b and ∂c∂b=a\frac{\partial c}{\partial b}=a∂b∂c​=a

    Correct answer
    D

    ∂c∂a=b\frac{\partial c}{\partial a}=b∂a∂c​=b and ∂c∂b=a\frac{\partial c}{\partial b}=a∂b∂c​=a

    Explanation

    Holding bbb fixed, the derivative of ababab with respect to aaa is bbb; holding aaa fixed, the derivative with respect to bbb is aaa.

  8. 8

    For c=a−bc = a - bc=a−b, what is the derivative of ccc with respect to bbb?

    1. A

      111, because every input to a two-input operation has derivative 111

    2. B

      −1-1−1, because increasing bbb decreases the difference by the same amount

    3. C

      bbb, because the derivative equals the input being changed

    4. D

      aaa, because the other input determines the derivative of subtraction

    Correct answer
    B

    −1-1−1, because increasing bbb decreases the difference by the same amount

    Explanation

    In a−ba-ba−b, increasing bbb by a small amount decreases ccc by that amount, so ∂c∂b=−1\frac{\partial c}{\partial b}=-1∂b∂c​=−1.

  9. 9

    What is the derivative of the square function c=a2c = a^2c=a2 with respect to its input?

    1. A

      a2a^2a2

    2. B

      222

    3. C

      aaa

    4. D

      2a2a2a

    Correct answer
    D

    2a2a2a

    Explanation

    By the power rule, the derivative of a2a^2a2 with respect to aaa is 2a2a2a.

  10. 10

    For c=max⁡(a,b)c = \max(a,b)c=max(a,b) when a≠ba \ne ba=b, what is the derivative with respect to aaa?

    1. A

      000 for every value of aaa and bbb

    2. B

      111 for every value of aaa and bbb

    3. C

      111 if a>ba>ba>b, and 000 if a<ba<ba<b

    4. D

      000 if a>ba>ba>b, and 111 if a<ba<ba<b

    Correct answer
    C

    111 if a>ba>ba>b, and 000 if a<ba<ba<b

    Explanation

    If aaa is the larger input, a small increase in aaa changes the maximum; if bbb is larger, a small change in aaa does not affect it.

  11. 11

    What is the derivative of the logistic function σ(a)\sigma(a)σ(a) with respect to aaa?

    1. A

      aσ(a)a\sigma(a)aσ(a)

    2. B

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

    3. C

      σ(a)2\sigma(a)^2σ(a)2

    4. D

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

    Correct answer
    B

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

    Explanation

    The logistic function has derivative σ(a)(1−σ(a))\sigma(a)(1-\sigma(a))σ(a)(1−σ(a)).

  12. 12

    Why does the derivative of the logistic function approach zero when its input becomes very large or very negative?

    1. A

      The logistic output grows without bound, canceling its derivative

    2. B

      The logistic output becomes equal to its input, making the derivative undefined

    3. C

      The logistic function stops being differentiable outside the interval from 000 to 111

    4. D

      The logistic output saturates near 111 or 000, making σ(a)(1−σ(a))\sigma(a)(1-\sigma(a))σ(a)(1−σ(a)) approach zero

    Correct answer
    D

    The logistic output saturates near 111 or 000, making σ(a)(1−σ(a))\sigma(a)(1-\sigma(a))σ(a)(1−σ(a)) approach zero

    Explanation

    As the logistic output approaches either 111 or 000, one factor in σ(a)(1−σ(a))\sigma(a)(1-\sigma(a))σ(a)(1−σ(a)) approaches zero.

  13. 13

    How is the derivative of a composition of operations computed along a path in a computation graph?

    1. A

      By adding the local derivatives along the path

    2. B

      By multiplying the local derivatives along the path

    3. C

      By multiplying the intermediate values and ignoring derivatives

    4. D

      By differentiating only the first operation in the path

    Correct answer
    B

    By multiplying the local derivatives along the path

    Explanation

    The chain rule computes a derivative through a sequence of operations as the product of their local derivatives.

  14. 14

    Suppose b=a2b=a^2b=a2 and c=b2c=b^2c=b2. What is dcda\frac{dc}{da}dadc​ in terms of aaa?

    1. A

      4a4a4a

    2. B

      4a34a^34a3

    3. C

      2a22a^22a2

    4. D

      a4a^4a4

    Correct answer
    B

    4a34a^34a3

    Explanation

    The local derivatives are dcdb=2b\frac{dc}{db}=2bdbdc​=2b and dbda=2a\frac{db}{da}=2adadb​=2a. Their product is 4ab=4a34ab=4a^34ab=4a3, since b=a2b=a^2b=a2.

  15. 15

    Why must the intermediate value bbb be substituted into the chain-rule result for b=a2b=a^2b=a2 and c=b2c=b^2c=b2?

    1. A

      The derivative is first expressed using the intermediate node, and b=a2b=a^2b=a2 relates it back to the original input

    2. B

      The substitution is needed to turn a product of derivatives into a sum

    3. C

      The intermediate value changes the local derivative of the first operation from 2a2a2a to 111

    4. D

      The chain rule applies only when intermediate values are replaced by constants

    Correct answer
    A

    The derivative is first expressed using the intermediate node, and b=a2b=a^2b=a2 relates it back to the original input

    Explanation

    Multiplying the local derivatives gives 2b⋅2a2b\cdot2a2b⋅2a; using b=a2b=a^2b=a2 expresses the final derivative entirely in terms of aaa.

  16. 16

    What is the benefit of using local derivative rules as building blocks?

    1. A

      They guarantee that every model has a convex loss

    2. B

      They can be composed to differentiate more complicated computations

    3. C

      They make all intermediate values unnecessary

    4. D

      They eliminate the need to know the operations in a computation

    Correct answer
    B

    They can be composed to differentiate more complicated computations

    Explanation

    Once local derivatives for basic operations are known, the chain rule combines them to handle larger computations.

  17. 17

    If two paths in a computation graph share some operations, what can this reveal about their gradients?

    1. A

      Their gradient expressions may share common factors from those operations

    2. B

      The shared operations can be omitted from both gradient calculations

    3. C

      Their gradients cannot be computed independently

    4. D

      Their gradients must be equal for every input

    Correct answer
    A

    Their gradient expressions may share common factors from those operations

    Explanation

    Shared portions of the graph can produce shared subexpressions in the gradients, making the modular structure visible.

  18. 18

    What is the main advantage of expressing a complicated loss as a computation graph before differentiating it?

    1. A

      It removes the need to evaluate the loss on an example

    2. B

      It breaks the calculation into local operations whose derivatives can be composed

    3. C

      It ensures that the loss has a single global minimum

    4. D

      It changes the model so that every parameter has the same gradient

    Correct answer
    B

    It breaks the calculation into local operations whose derivatives can be composed

    Explanation

    The graph makes intermediate computations explicit, allowing gradients to be calculated from local derivatives and the chain rule.

  19. 19

    How can a four-layer neural network produce a regression prediction, as described?

    1. A

      Take a dot product at every layer but omit intermediate activation functions

    2. B

      Subtract the feature vector from each weight matrix and use the result as the prediction

    3. C

      Repeatedly apply weight matrices and activation functions, then take a final dot product

    4. D

      Apply one activation function to the target, then sum all network weights

    Correct answer
    C

    Repeatedly apply weight matrices and activation functions, then take a final dot product

    Explanation

    The network repeatedly transforms the feature vector with weight matrices and activation functions, then uses a final weight vector to produce a score.

  20. 20

    For a regression example with prediction score sss and target yyy, what loss is described?

    1. A

      (s−y)2(s-y)^2(s−y)2

    2. B

      s−ys-ys−y

    3. C

      (s+y)2(s+y)^2(s+y)2

    4. D

      y2−sy^2-sy2−s

    Correct answer
    A

    (s−y)2(s-y)^2(s−y)2

    Explanation

    The prediction is compared with the target by subtracting yyy from the score and squaring the residual.

  21. 21

    Why does stochastic gradient descent require gradients with respect to each network parameter?

    1. A

      The gradients ensure that all parameters receive identical updates

    2. B

      Each parameter's gradient indicates how changing that parameter affects the example's loss

    3. C

      Each parameter's gradient gives the exact value of the target for the example

    4. D

      The gradients are needed to determine which features should be removed from the input

    Correct answer
    B

    Each parameter's gradient indicates how changing that parameter affects the example's loss

    Explanation

    Gradient-based updates use each loss derivative to determine how to adjust its corresponding parameter.

  22. 22

    What sequence of computations defines the hinge loss for a linear classifier in the described example?

    1. A

      Compute yTϕ(x)y^T\phi(x)yTϕ(x), add the margin to 111, then take the minimum with 000

    2. B

      Compute wTϕ(x)w^T\phi(x)wTϕ(x), multiply by yyy, subtract the margin from 111, then take the maximum with 000

    3. C

      Compute wTϕ(x)w^T\phi(x)wTϕ(x), divide by yyy, add 111, then apply the logistic function

    4. D

      Compute wTϕ(x)w^T\phi(x)wTϕ(x), subtract yyy, square the result, then take the maximum with 111

    Correct answer
    B

    Compute wTϕ(x)w^T\phi(x)wTϕ(x), multiply by yyy, subtract the margin from 111, then take the maximum with 000

    Explanation

    The score is wTϕ(x)w^T\phi(x)wTϕ(x), the signed margin is yyy times that score, and the hinge loss is max⁡(0,1−ywTϕ(x))\max(0,1-yw^T\phi(x))max(0,1−ywTϕ(x)).

  23. 23

    For hinge loss max⁡(0,1−ywTϕ(x))\max(0,1-yw^T\phi(x))max(0,1−ywTϕ(x)), what is the gradient with respect to www when the margin is below 111?

    1. A

      −wϕ(x)-w\phi(x)−wϕ(x)

    2. B

      −yϕ(x)-y\phi(x)−yϕ(x)

    3. C

      ϕ(x)\phi(x)ϕ(x)

    4. D

      yϕ(x)y\phi(x)yϕ(x)

    Correct answer
    B

    −yϕ(x)-y\phi(x)−yϕ(x)

    Explanation

    When the margin is below 111, the active loss is 1−ywTϕ(x)1-yw^T\phi(x)1−ywTϕ(x). Differentiating it with respect to www gives −yϕ(x)-y\phi(x)−yϕ(x).

  24. 24

    For the hinge loss above, what is the gradient with respect to www when the margin is greater than 111?

    1. A

      The zero vector, because the loss is locally constant at zero

    2. B

      −yϕ(x)-y\phi(x)−yϕ(x), because the margin always contributes to the loss

    3. C

      yϕ(x)y\phi(x)yϕ(x), because the loss increases with the score

    4. D

      2w2w2w, because hinge loss is a squared-weight penalty

    Correct answer
    A

    The zero vector, because the loss is locally constant at zero

    Explanation

    When the margin exceeds 111, the maximum selects 000, so the loss is locally constant and its gradient is zero.

  25. 25

    What is the role of the feature vector ϕ(x)\phi(x)ϕ(x) in the hinge-loss gradient with respect to www?

    1. A

      It determines the gradient only when the margin is greater than 111

    2. B

      It sets the loss to zero whenever the feature vector has nonzero entries

    3. C

      It replaces the label yyy when determining whether the hinge is active

    4. D

      It provides the direction, scaled by −y-y−y, in which the active loss changes with the weights

    Correct answer
    D

    It provides the direction, scaled by −y-y−y, in which the active loss changes with the weights

    Explanation

    When the hinge is active, the gradient is −yϕ(x)-y\phi(x)−yϕ(x), so the feature vector supplies the parameter-space direction of change.

  26. 26

    In the two-layer network example, how is the hidden vector hhh formed?

    1. A

      Square the final score and use it as the input to the first layer

    2. B

      Apply the activation function to the target before multiplying by VVV

    3. C

      Apply the activation function to the product of the first-layer matrix VVV and the feature vector

    4. D

      Subtract the target from the product of the final weight vector and the feature vector

    Correct answer
    C

    Apply the activation function to the product of the first-layer matrix VVV and the feature vector

    Explanation

    The first layer multiplies the feature vector by VVV, and its result is passed through an activation function to obtain hhh.

  27. 27

    In the two-layer network example, how are the score, residual, and loss related?

    1. A

      The score is wTxw^T xwTx, the residual is hhh minus the score, and the loss is the residual plus yyy

    2. B

      The score is wThw^T hwTh, the residual is the score plus yyy, and the loss is the residual squared

    3. C

      The score is wThw^T hwTh, the residual is the score minus yyy, and the loss is the residual squared

    4. D

      The score is VTxV^T xVTx, the residual is yyy minus the score, and the loss is the residual's absolute value

    Correct answer
    C

    The score is wThw^T hwTh, the residual is the score minus yyy, and the loss is the residual squared

    Explanation

    The final weight vector and hidden vector produce the score; subtracting the target gives the residual, which is squared for the loss.

  28. 28

    For the two-layer network with loss r2r^2r2, residual r=wTh−yr=w^T h-yr=wTh−y, and fixed hhh, what is the gradient with respect to www?

    1. A

      rhrhrh

    2. B

      2hTw2h^T w2hTw

    3. C

      2rh2rh2rh

    4. D

      2rw2rw2rw

    Correct answer
    C

    2rh2rh2rh

    Explanation

    The derivative of r2r^2r2 with respect to rrr is 2r2r2r, and the derivative of wTh−yw^T h-ywTh−y with respect to www is hhh, giving 2rh2rh2rh.

  29. 29

    If the activation is the logistic function applied element-wise, which expression gives the gradient with respect to the first-layer matrix VVV?

    1. A

      2r h ϕ(x)T2r\,h\,\phi(x)^T2rhϕ(x)T

    2. B

      2r [w+h+(1−h)] ϕ(x)T2r\,[w+h+(1-h)]\,\phi(x)^T2r[w+h+(1−h)]ϕ(x)T

    3. C

      2r [w⊙h] ϕ(x)2r\,[w\odot h]\,\phi(x)2r[w⊙h]ϕ(x)

    4. D

      2r [w⊙h⊙(1−h)] ϕ(x)T2r\,[w\odot h\odot(1-h)]\,\phi(x)^T2r[w⊙h⊙(1−h)]ϕ(x)T

    Correct answer
    D

    2r [w⊙h⊙(1−h)] ϕ(x)T2r\,[w\odot h\odot(1-h)]\,\phi(x)^T2r[w⊙h⊙(1−h)]ϕ(x)T

    Explanation

    The chain rule combines the loss derivative 2r2r2r, the downstream weight vector, the element-wise logistic derivative h⊙(1−h)h\odot(1-h)h⊙(1−h), and the input feature vector in an outer product.

  30. 30

    Why does the gradient with respect to VVV involve an element-wise product?

    1. A

      The final score adds each component of www to each component of hhh

    2. B

      The loss function multiplies the feature vector by itself

    3. C

      The matrix VVV contains only one nonzero entry per row

    4. D

      The activation function is applied separately to each component of the hidden vector

    Correct answer
    D

    The activation function is applied separately to each component of the hidden vector

    Explanation

    Because the activation is applied element-wise, its derivative is computed for each hidden component, producing an element-wise product in the gradient.

  31. 31

    Why is the gradient of the loss with respect to www in the two-layer network structurally similar to the linear-regression gradient?

    1. A

      The first-layer matrix VVV disappears from every part of the computation

    2. B

      The hidden vector hhh serves as the input representation for the final linear score

    3. C

      The derivative with respect to www is independent of the hidden representation

    4. D

      The network's squared loss makes its hidden vector equal to the original features

    Correct answer
    B

    The hidden vector hhh serves as the input representation for the final linear score

    Explanation

    For the final linear score wThw^T hwTh, the hidden vector plays the same role that the feature vector plays in a linear predictor.

  32. 32

    Which statement best distinguishes the forward and backward steps of backpropagation?

    1. A

      The forward step computes gradients from output to input; the backward step computes values from input to output

    2. B

      The forward step updates parameters; the backward step evaluates the model's predictions

    3. C

      The forward step stores only parameters; the backward step replaces the computation graph

    4. D

      The forward step evaluates intermediate values from inputs to output; the backward step computes loss sensitivities from output back toward inputs

    Correct answer
    D

    The forward step evaluates intermediate values from inputs to output; the backward step computes loss sensitivities from output back toward inputs

    Explanation

    Backpropagation first evaluates the graph from its inputs toward the output, then propagates gradient information in the reverse direction.

  33. 33

    What does a forward value at a node represent during backpropagation?

    1. A

      The parameter update that will be applied after training

    2. B

      The number of graph edges between the node and the loss

    3. C

      The derivative of the final loss with respect to every model parameter

    4. D

      The numerical value of the subexpression rooted at that node

    Correct answer
    D

    The numerical value of the subexpression rooted at that node

    Explanation

    A forward value is the evaluated value of the subexpression represented by that node; it may be a scalar, vector, or matrix.

  34. 34

    In the numerical example with w=(3,1)w=(3,1)w=(3,1) and x=(1,2)x=(1,2)x=(1,2), what is the score wTxw^T xwTx?

    1. A

      444

    2. B

      555

    3. C

      333

    4. D

      666

    Correct answer
    B

    555

    Explanation

    The dot product is 3⋅1+1⋅2=53\cdot1+1\cdot2=53⋅1+1⋅2=5.

  35. 35

    In that numerical example, if the score is 555 and the residual is 333, what is the squared loss?

    1. A

      151515

    2. B

      999

    3. C

      252525

    4. D

      888

    Correct answer
    B

    999

    Explanation

    The residual is 333, so the squared loss is 32=93^2=932=9.

  36. 36

    What is the backward value at the loss node?

    1. A

      The numerical value of the loss at that node

    2. B

      111, because the derivative of the loss with respect to itself is 111

    3. C

      000, because the loss is the final node in the graph

    4. D

      The gradient of the loss with respect to the first model parameter

    Correct answer
    B

    111, because the derivative of the loss with respect to itself is 111

    Explanation

    The backward value at the loss node is the derivative of the loss with respect to itself, which is 111.

  37. 37

    How is a node's backward value computed from a single parent in a simple computation path?

    1. A

      Divide the parent's backward value by the node's forward value

    2. B

      Multiply the parent's backward value by the local derivative on the connecting edge

    3. C

      Multiply the node's forward value by every parameter in the graph

    4. D

      Add the parent's forward value to the local derivative on the connecting edge

    Correct answer
    B

    Multiply the parent's backward value by the local derivative on the connecting edge

    Explanation

    The backward value is propagated by applying the chain rule: multiply the parent's backward value by the local derivative along the edge.

  38. 38

    For the example w=(3,1)w=(3,1)w=(3,1), x=(1,2)x=(1,2)x=(1,2), and residual 333, what is the gradient of the squared loss with respect to www?

    1. A

      (3,6)(3,6)(3,6)

    2. B

      (12,6)(12,6)(12,6)

    3. C

      (6,12)(6,12)(6,12)

    4. D

      (6,6)(6,6)(6,6)

    Correct answer
    C

    (6,12)(6,12)(6,12)

    Explanation

    The squared-loss gradient is 2rx2r x2rx. With r=3r=3r=3 and x=(1,2)x=(1,2)x=(1,2), it is 6(1,2)=(6,12)6(1,2)=(6,12)6(1,2)=(6,12).

  39. 39

    Why does the backward pass use values saved during the forward pass?

    1. A

      Local derivatives often depend on intermediate values computed in the forward pass

    2. B

      Backward values cannot be calculated unless the loss is convex

    3. C

      The saved values replace the need to apply the chain rule

    4. D

      The forward pass determines which parameters are allowed to change

    Correct answer
    A

    Local derivatives often depend on intermediate values computed in the forward pass

    Explanation

    For example, the derivative of a square depends on its input, so intermediate forward values are needed to evaluate local derivatives during the backward pass.

  40. 40

    What does a convex training loss for a linear predictor imply under the stated conditions?

    1. A

      With an appropriate step size, gradient descent can converge to a global optimum

    2. B

      Every initialization produces exactly the same sequence of parameter updates

    3. C

      The loss is guaranteed to have no stationary points

    4. D

      The gradient is constant throughout the entire parameter space

    Correct answer
    A

    With an appropriate step size, gradient descent can converge to a global optimum

    Explanation

    For the convex losses described, using an appropriate step size allows gradient descent to converge to the global optimum.

  41. 41

    What limitation follows from the non-convex training loss of a neural network?

    1. A

      There is no general guarantee that optimization will reach the global minimum

    2. B

      Gradient-based optimization cannot be applied to the network

    3. C

      The network must have a unique local minimum

    4. D

      Every gradient is zero at every initialization

    Correct answer
    A

    There is no general guarantee that optimization will reach the global minimum

    Explanation

    Non-convexity removes the general guarantee of reaching the global minimum, although optimization can still produce useful results in practice.

  42. 42

    How can initialization affect optimization of a non-convex neural-network loss?

    1. A

      Different starting points can lead optimization toward different regions or minima

    2. B

      Every starting point must converge to the same global minimum

    3. C

      Initialization makes a non-convex loss convex

    4. D

      Initialization affects only the forward computation, never the final solution

    Correct answer
    A

    Different starting points can lead optimization toward different regions or minima

    Explanation

    A non-convex loss can have multiple regions of attraction, so the starting point can influence where optimization ends up.

  43. 43

    Why is initializing every row of a neural network's weight matrix to zero problematic in the described setting?

    1. A

      The rows become identical, preventing the units from starting with distinct behaviors

    2. B

      The model can no longer compute a score from its input

    3. C

      All gradients become permanently equal to the target values

    4. D

      The network's loss becomes infinite for every training example

    Correct answer
    A

    The rows become identical, preventing the units from starting with distinct behaviors

    Explanation

    With zero initialization, the rows of the weight matrix are identical, so the units do not begin with distinct parameters.

  44. 44

    Which initialization strategies are described as alternatives to setting all weights to zero?

    1. A

      Initialize only the final layer and set all earlier layers to zero

    2. B

      Initialize near zero with random noise or use pre-training

    3. C

      Initialize every weight to the target value or use a fixed large constant

    4. D

      Initialize every weight from the same deterministic value

    Correct answer
    B

    Initialize near zero with random noise or use pre-training

    Explanation

    The described approaches include adding random noise around zero and using pre-training to initialize the network.

  45. 45

    What is over-parameterization in the described neural-network setting?

    1. A

      Replacing the hidden layer with a linear predictor

    2. B

      Increasing the learning rate for every parameter

    3. C

      Using more hidden units than are strictly needed

    4. D

      Using fewer training examples than model parameters

    Correct answer
    C

    Using more hidden units than are strictly needed

    Explanation

    Over-parameterization here means adding more hidden units than are strictly necessary, giving the model more opportunities to learn useful patterns.

  46. 46

    What is the proposed intuition behind using more hidden units than strictly necessary?

    1. A

      Every added unit is guaranteed to learn a distinct useful feature

    2. B

      More units make the loss convex and remove the need for gradient descent

    3. C

      Additional units ensure that no parameter can receive a zero gradient

    4. D

      Some units may be unhelpful, while others may learn useful patterns from the data

    Correct answer
    D

    Some units may be unhelpful, while others may learn useful patterns from the data

    Explanation

    The idea is that some units may not be useful, but a fraction may learn patterns that help fit the data.

  47. 47

    How do adaptive methods such as AdaGrad or Adam differ from using a single fixed step size?

    1. A

      They assign step sizes that can vary by parameter

    2. B

      They assign the same new step size to every parameter after each update

    3. C

      They use one step size for the whole model but change the loss function

    4. D

      They remove the need to compute gradients

    Correct answer
    A

    They assign step sizes that can vary by parameter

    Explanation

    Adaptive methods can determine a separate step size for each parameter, rather than relying on one shared step size.

  48. 48

    What can happen if gradients vanish during training?

    1. A

      The parameters stop affecting the forward computation

    2. B

      Updates become too small to make meaningful progress

    3. C

      Updates become so large that they necessarily overshoot

    4. D

      The loss becomes convex

    Correct answer
    B

    Updates become too small to make meaningful progress

    Explanation

    When gradients are very small or close to zero, parameter updates can become too small for training to make progress.

  49. 49

    What can happen if gradients explode during training?

    1. A

      The model's forward values become independent of its parameters

    2. B

      The loss is guaranteed to reach its global minimum immediately

    3. C

      Updates can become excessively large, causing oscillation or divergence

    4. D

      Updates become too small to leave the current parameter values

    Correct answer
    C

    Updates can become excessively large, causing oscillation or divergence

    Explanation

    Very large gradients can produce excessively large updates, causing optimization to oscillate or diverge.

  50. 50

    Why do initialization, step-size choices, and architecture design matter for controlling gradients?

    1. A

      They guarantee that all neural-network losses are convex

    2. B

      They remove the need to evaluate intermediate activations

    3. C

      They can help prevent gradients from vanishing or exploding

    4. D

      They make every parameter's gradient identical

    Correct answer
    C

    They can help prevent gradients from vanishing or exploding

    Explanation

    These design and training choices are among the means used to keep gradients from becoming too small or too large.

  51. 51

    Which statement best captures the generality of computation graphs and backpropagation?

    1. A

      They work only when the loss is a squared error

    2. B

      They apply only to neural networks with exactly two layers

    3. C

      They can represent only scalar inputs and scalar outputs

    4. D

      They can be used to compute gradients for many kinds of functions, not just neural networks

    Correct answer
    D

    They can be used to compute gradients for many kinds of functions, not just neural networks

    Explanation

    Computation graphs and backpropagation are general tools for differentiating many mathematical computations, not only neural networks.

  52. 52

    Why can computation graphs make it easier to develop different models and loss functions?

    1. A

      Their reusable operations let gradients be computed for new compositions of functions

    2. B

      They force every model to use the same architecture and objective

    3. C

      They automatically make each new model's optimization convex

    4. D

      They remove the need to define how a model computes its output

    Correct answer
    A

    Their reusable operations let gradients be computed for new compositions of functions

    Explanation

    Because the graph is built from composable operations, developers can change models or losses while still using the same general gradient-computation approach.

  53. 53

    What role do computation graphs play in deep-learning packages such as TensorFlow and PyTorch, according to the content?

    1. A

      They support automatic computation of gradients behind the scenes

    2. B

      They select the training labels for each example

    3. C

      They replace the model's forward computation with a lookup table

    4. D

      They guarantee that every trained model reaches a global optimum

    Correct answer
    A

    They support automatic computation of gradients behind the scenes

    Explanation

    The content describes computation graphs and backpropagation as mechanisms used by deep-learning packages to compute gradients automatically.

  54. 54

    Besides automating gradients, what conceptual benefit can computation graphs provide?

    1. A

      They eliminate the need for local derivative rules

    2. B

      They prove that all gradient expressions have the same form

    3. C

      They show that every neural-network unit contributes equally to the loss

    4. D

      They reveal modular structure and shared subexpressions in gradient calculations

    Correct answer
    D

    They reveal modular structure and shared subexpressions in gradient calculations

    Explanation

    The graph makes the parts of a computation visible and can expose shared structure in the resulting gradients.

  55. 55

    What is differential programming in the context described?

    1. A

      A model-development approach enabled by building and differentiating computations

    2. B

      A procedure for selecting labels before constructing a computation graph

    3. C

      A method that avoids all differentiation by using only predictions

    4. D

      A rule requiring every model to have a convex training objective

    Correct answer
    A

    A model-development approach enabled by building and differentiating computations

    Explanation

    The content presents differential programming as a model-development paradigm supported by general computation graphs and automatic differentiation.

Question 1 of 55
Question 1 of 55

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent