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

Study methods

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

Backpropagation and Neural Networks

  • 46Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Training Foundations

How is the overall loss described in the content?

46 questions

  1. 1

    How is the overall loss described in the content?

    1. A

      As the largest cost among all individual examples

    2. B

      As the average of the model outputs before comparison

    3. C

      As the sum of parameter values in the model

    4. D

      As the average of the costs for individual examples

    Correct answer
    D

    As the average of the costs for individual examples

    Explanation

    The overall loss or cost function is described as the average of the cost functions for individual examples.

  2. 2

    What information does an individual example's cost function typically compare?

    1. A

      The input features and the learning rate

    2. B

      The model output for the example and its label

    3. C

      The gradients from two different network layers

    4. D

      The model parameters and the number of training examples

    Correct answer
    B

    The model output for the example and its label

    Explanation

    An example's cost can be calculated from the model output for its input, such as hθ(x)h_\theta(x)hθ​(x), and the example's label yyy.

  3. 3

    In the simplest SGD update described, which example's gradient is used to update the parameters?

    1. A

      The gradient for the example with the largest loss

    2. B

      The gradient for an example sampled randomly from the data set

    3. C

      The gradient averaged over every example in the data set

    4. D

      The gradient for a fixed example selected before training

    Correct answer
    B

    The gradient for an example sampled randomly from the data set

    Explanation

    The basic SGD update uses the gradient for a randomly sampled example, denoted iki_kik​, rather than necessarily averaging over the whole data set.

  4. 4

    What is the central computational goal of backpropagation during training?

    1. A

      To determine the network architecture from the labels

    2. B

      To calculate the model's predictions without evaluating its layers

    3. C

      To compute the loss gradient with respect to the model parameters

    4. D

      To select the training examples with the smallest losses

    Correct answer
    C

    To compute the loss gradient with respect to the model parameters

    Explanation

    Backpropagation computes the gradient of the loss function with respect to parameters so that training updates, such as SGD, can be made.

  5. 5

    Why can backpropagation be described as automatable?

    1. A

      The method makes every parameter update independent of the loss

    2. B

      A system can choose the best data set without evaluating examples

    3. C

      A system can compute gradients from the operations in the forward computation

    4. D

      The method removes the need to define a model's forward computation

    Correct answer
    C

    A system can compute gradients from the operations in the forward computation

    Explanation

    Automatic differentiation automates gradient computation from a function's forward operations; users generally do not need to derive each gradient by hand.

  6. 6

    Which terminology pairing is used for evaluating a model and computing its gradients?

    1. A

      Evaluating the function is the backward pass; computing gradients is the forward pass

    2. B

      Evaluating the function is the forward pass; computing gradients is the backward pass

    3. C

      Evaluating the parameters is the backward pass; computing outputs is the update pass

    4. D

      Evaluating the loss is the update pass; computing parameters is the forward pass

    Correct answer
    B

    Evaluating the function is the forward pass; computing gradients is the backward pass

    Explanation

    The content calls computation of the model function the forward pass and computation of its gradient the backward pass.

  7. 7

    Which description best characterizes a differentiable circuit in this discussion?

    1. A

      A sequence of labels connected by non-differentiable decisions

    2. B

      A collection of parameters that contains no computational operations

    3. C

      A composition of arithmetic operations and elementary functions

    4. D

      A list of training examples ordered by their loss values

    Correct answer
    C

    A composition of arithmetic operations and elementary functions

    Explanation

    A differentiable circuit is described as a composition of operations such as addition, multiplication, and division, together with elementary functions such as sigmoid or exponential.

  8. 8

    What is a key difference between a computational circuit and an expanded formula?

    1. A

      A circuit can contain only multiplication, while a formula can contain addition

    2. B

      A circuit can reuse a computed intermediate value without recomputing it

    3. C

      A formula can reuse intermediate values, while a circuit must duplicate them

    4. D

      A formula represents only scalar functions, while a circuit represents vectors

    Correct answer
    B

    A circuit can reuse a computed intermediate value without recomputing it

    Explanation

    A circuit can share and reuse a previously computed quantity. An expanded formula must write out that computation again wherever it is used.

  9. 9

    In the stated circuit-size result, what does the size nnn count?

    1. A

      The number of examples used to train the model

    2. B

      The number of coordinates in the circuit's output

    3. C

      The number of distinct labels in the data set

    4. D

      The number of computational operations in the circuit

    Correct answer
    D

    The number of computational operations in the circuit

    Explanation

    Circuit size is measured by the number of operations, with each basic operation assumed to take one unit of time.

  10. 10

    For a differentiable circuit that maps an LLL-dimensional input to one scalar, what is the dimension of the gradient with respect to the input?

    1. A

      It is an nnn-dimensional vector because the circuit has size nnn

    2. B

      It is a scalar because the circuit has a scalar output

    3. C

      It is an LLL-dimensional vector with one partial derivative per input coordinate

    4. D

      It is an LLL-by-LLL matrix because the input has LLL coordinates

    Correct answer
    C

    It is an LLL-dimensional vector with one partial derivative per input coordinate

    Explanation

    The gradient with respect to the input contains one partial derivative for each of its LLL coordinates, so it is an LLL-dimensional vector.

  11. 11

    According to the stated result, how does the time to compute the input gradient compare with the size of the circuit?

    1. A

      It requires a separate full forward computation for every input coordinate

    2. B

      It can be computed in time O(n)O(n)O(n) for a circuit of size nnn

    3. C

      It necessarily takes time proportional to the number of input coordinates squared

    4. D

      It necessarily takes time O(n2)O(n^2)O(n2) for a circuit of size nnn

    Correct answer
    B

    It can be computed in time O(n)O(n)O(n) for a circuit of size nnn

    Explanation

    The result states that the gradient of a scalar-valued function computed by a differentiable circuit of size nnn can also be computed in time O(n)O(n)O(n).

  12. 12

    What complexity relationship does the content give between a neural network's forward and backward passes?

    1. A

      The backward pass avoids the network operations and takes time proportional only to depth

    2. B

      They can both be performed in time proportional to the number of network operations

    3. C

      The backward pass necessarily takes quadratic time in the forward-pass operations

    4. D

      The forward pass is constant-time, while the backward pass depends on input dimension

    Correct answer
    B

    They can both be performed in time proportional to the number of network operations

    Explanation

    The circuit result implies that if the forward computation takes time proportional to the number of operations, the backward computation can be performed in a similar amount of time.

  13. 13

    Why does the content connect neural-network operation count to parameter count?

    1. A

      Every network has exactly one operation for each training example

    2. B

      For typical networks, evaluating their operations takes time proportional to the number of parameters

    3. C

      The number of parameters is determined by the number of loss evaluations

    4. D

      The number of operations is always the square of the number of parameters

    Correct answer
    B

    For typical networks, evaluating their operations takes time proportional to the number of parameters

    Explanation

    The content says that in almost all networks being considered, the number of operations needed for evaluation is proportional to the parameter count. For example, a DDD-by-DDD matrix has D2D^2D2 parameters and a matrix-vector product takes proportional to D2D^2D2 operations.

  14. 14

    What follows for computing a neural network's loss gradient when its forward computation uses a number of operations proportional to its parameter count?

    1. A

      Gradient computation must take time proportional to the square of the parameter count

    2. B

      Both loss evaluation and gradient computation can take time proportional to the parameter count

    3. C

      Gradient computation is proportional to the number of training labels rather than the parameters

    4. D

      Loss evaluation is proportional to parameter count, but gradient computation is independent of it

    Correct answer
    B

    Both loss evaluation and gradient computation can take time proportional to the parameter count

    Explanation

    Combining the circuit result with the operation-count relationship gives a time complexity proportional to the number of parameters for both evaluating the loss and computing its gradient.

  15. 15

    How can differentiating through an optimization step produce a function suitable for further gradient computation?

    1. A

      The updated parameters and the loss can be computed from the starting parameters using differentiable operations

    2. B

      The gradient of the update can be computed only by forming a full Hessian

    3. C

      The updated loss is treated as constant because it follows a parameter update

    4. D

      The optimization step removes all dependence on the starting parameters

    Correct answer
    A

    The updated parameters and the loss can be computed from the starting parameters using differentiable operations

    Explanation

    A gradient-descent step and a subsequent loss evaluation define a function of the starting parameters. Since that function can be computed from differentiable operations, it can itself be differentiated.

  16. 16

    What kind of quantity can be optimized by backpropagating through several steps of an algorithm?

    1. A

      Only the loss before the algorithm begins

    2. B

      Only a parameter count that does not depend on the algorithm's result

    3. C

      A final prediction while ignoring all intermediate parameter updates

    4. D

      A final loss defined by the result of running the algorithm for a chosen number of steps

    Correct answer
    D

    A final loss defined by the result of running the algorithm for a chosen number of steps

    Explanation

    The content describes defining a final loss from the result of running an algorithm, such as for 10 steps, and then optimizing that loss by differentiating through the algorithm.

  17. 17

    Which is an example of an algorithmic quantity that can be tuned by differentiating through the algorithm?

    1. A

      A learning rate used during the algorithm's parameter updates

    2. B

      The definition of addition used by the computational hardware

    3. C

      The number of labels that exist in the data set

    4. D

      The scalar output dimension of the loss function

    Correct answer
    A

    A learning rate used during the algorithm's parameter updates

    Explanation

    The content notes that one can tune a learning rate by backpropagating through the optimization algorithm that uses it.

  18. 18

    If g(x)g(x)g(x) is defined as the inner product of ∇f(x)\nabla f(x)∇f(x) with a fixed vector vvv, what derivative does ∇g(x)\nabla g(x)∇g(x) represent?

    1. A

      The Hessian of fff multiplied by its gradient

    2. B

      The Hessian of fff multiplied by vvv

    3. C

      The gradient of fff multiplied by its loss value

    4. D

      The inner product of xxx with the Hessian of fff

    Correct answer
    B

    The Hessian of fff multiplied by vvv

    Explanation

    Differentiating g(x)=∇f(x)Tvg(x)=\nabla f(x)^T vg(x)=∇f(x)Tv gives the Hessian-vector product ∇2f(x)v\nabla^2 f(x)v∇2f(x)v.

  19. 19

    Why can a Hessian-vector product be efficient to compute even when explicitly constructing the Hessian is not?

    1. A

      The Hessian is always diagonal, so its entries need not be computed

    2. B

      The product uses only the loss value and never depends on derivatives

    3. C

      The vector product reduces the input dimension to one before differentiation

    4. D

      The product can be obtained by differentiating a scalar function without forming the full matrix

    Correct answer
    D

    The product can be obtained by differentiating a scalar function without forming the full matrix

    Explanation

    The scalar function formed by the gradient-vector inner product can be computed efficiently, and differentiating it yields the Hessian-vector product. The full Hessian can be too large to construct explicitly.

  20. 20

    What is the role of the chain rule in backpropagation through a module?

    1. A

      It replaces every module with a single scalar parameter

    2. B

      It uses the gradient at the module's output to compute the gradient at its input

    3. C

      It computes the forward output without evaluating the module

    4. D

      It uses the module's input to determine the model's training labels

    Correct answer
    B

    It uses the gradient at the module's output to compute the gradient at its input

    Explanation

    Given the gradient of the final output with respect to an intermediate variable, the chain rule computes the gradient with respect to the input that produced that intermediate variable.

  21. 21

    Suppose u=G(z)u=G(z)u=G(z) and the final scalar output is j=f(u)j=f(u)j=f(u). What information is sufficient, together with GGG and the evaluated value of zzz, to compute ∇zj\nabla_z j∇z​j?

    1. A

      The gradient ∇uj\nabla_u j∇u​j

    2. B

      The full internal computation used to implement fff, even if ∇uj\nabla_u j∇u​j is known

    3. C

      The gradients of every training example in the data set

    4. D

      Only the value of jjj, without any gradient information

    Correct answer
    A

    The gradient ∇uj\nabla_u j∇u​j

    Explanation

    The chain rule needs the upstream gradient ∇uj\nabla_u j∇u​j and local information about GGG at zzz. It does not need the internal details of fff once ∇uj\nabla_u j∇u​j is available.

  22. 22

    For u=G(z)u=G(z)u=G(z) with z∈RMz\in\mathbb{R}^Mz∈RM and u∈RNu\in\mathbb{R}^Nu∈RN, how is the gradient with respect to zzz expressed using the Jacobian of GGG?

    1. A

      ∇zj=JG(z)T∇uj\nabla_z j=J_G(z)^T\nabla_u j∇z​j=JG​(z)T∇u​j

    2. B

      ∇zj=JG(z)∇uj\nabla_z j=J_G(z)\nabla_u j∇z​j=JG​(z)∇u​j

    3. C

      ∇zj=∇uj+JG(z)\nabla_z j=\nabla_u j+J_G(z)∇z​j=∇u​j+JG​(z)

    4. D

      ∇zj=JG(z)Tz\nabla_z j=J_G(z)^Tz∇z​j=JG​(z)Tz

    Correct answer
    A

    ∇zj=JG(z)T∇uj\nabla_z j=J_G(z)^T\nabla_u j∇z​j=JG​(z)T∇u​j

    Explanation

    The chain rule gives the input gradient by multiplying the upstream gradient by the transpose of the Jacobian: ∇zj=JG(z)T∇uj\nabla_z j=J_G(z)^T\nabla_u j∇z​j=JG​(z)T∇u​j.

  23. 23

    Why does the component form of the chain rule sum over the intermediate coordinates?

    1. A

      The final output has one separate value for every input coordinate

    2. B

      Each input coordinate can affect the final output through every intermediate coordinate

    3. C

      The sum averages the gradient over all possible input examples

    4. D

      Each intermediate coordinate must be equal to every input coordinate

    Correct answer
    B

    Each input coordinate can affect the final output through every intermediate coordinate

    Explanation

    For each input coordinate, the chain rule adds the contributions flowing through all intermediate coordinates: ∂j∂zi=∑r=1N∂j∂ur∂ur∂zi\frac{\partial j}{\partial z_i}=\sum_{r=1}^{N}\frac{\partial j}{\partial u_r}\frac{\partial u_r}{\partial z_i}∂zi​∂j​=∑r=1N​∂ur​∂j​∂zi​∂ur​​.

  24. 24

    Once the gradient at an intermediate variable is known, what local information is needed to propagate it through a module?

    1. A

      The complete internal structure of every later module

    2. B

      The full set of training examples and their labels

    3. C

      The optimizer's future parameter updates

    4. D

      The module's function and the value of its input where it was evaluated

    Correct answer
    D

    The module's function and the value of its input where it was evaluated

    Explanation

    The module's backward mapping depends on the local function and its evaluated input, as represented by its Jacobian there. Later computations are summarized by the incoming gradient.

  25. 25

    How does backpropagation handle a sequence of modules?

    1. A

      It computes a separate full gradient from scratch for every earlier module

    2. B

      It applies every module's forward function again in the original order

    3. C

      It repeatedly applies each module's local chain-rule mapping in reverse order

    4. D

      It skips intermediate variables and differentiates only the final module

    Correct answer
    C

    It repeatedly applies each module's local chain-rule mapping in reverse order

    Explanation

    Backpropagation composes local chain-rule calculations, starting from the output and moving backward through the modules.

  26. 26

    Why can a module's backward function be composed with different computations that precede it?

    1. A

      Its backward function replaces the gradients from all preceding computations

    2. B

      Its local gradient mapping depends on that module and its input, not on the internal details of later computation

    3. C

      Its backward function does not depend on the module's input value

    4. D

      Its backward function is identical for every possible module

    Correct answer
    B

    Its local gradient mapping depends on that module and its input, not on the internal details of later computation

    Explanation

    A module's backward function uses its local Jacobian and input value. The gradient arriving from the later computation supplies the remaining information needed to propagate backward.

  27. 27

    In a network where an intermediate activation is produced using both input data and parameters, how should the parameters be treated when computing their gradients?

    1. A

      Treat the parameters as inputs to the relevant computation and apply the chain rule

    2. B

      Differentiate only with respect to the input data because parameters are embedded in the module

    3. C

      Treat the parameters as fixed outputs that cannot be differentiated

    4. D

      Replace the parameters with the intermediate activation before differentiation

    Correct answer
    A

    Treat the parameters as inputs to the relevant computation and apply the chain rule

    Explanation

    The data and parameters can both be viewed as inputs to the computational graph. To obtain a parameter gradient, apply the chain rule with respect to the parameter inputs.

  28. 28

    In a layered network, what are the intermediate variables often called activations?

    1. A

      The parameters used to specify the network's architecture

    2. B

      The values produced between successive modules during the forward computation

    3. C

      The labels assigned to examples in the training data

    4. D

      The gradients computed before the forward computation begins

    Correct answer
    B

    The values produced between successive modules during the forward computation

    Explanation

    The intermediate values passed between modules in the forward computation are referred to as activations.

  29. 29

    In the two-phase view of backpropagation described, what is computed in the first phase?

    1. A

      Gradients with respect to intermediate activations, propagated backward through the network

    2. B

      Gradients with respect to every parameter before any activation gradient is computed

    3. C

      Updated parameter values for all layers

    4. D

      The full Hessian of the loss with respect to the parameters

    Correct answer
    A

    Gradients with respect to intermediate activations, propagated backward through the network

    Explanation

    The first phase propagates gradients backward through the intermediate activations, from the output toward earlier layers.

  30. 30

    How is a parameter gradient for a particular module obtained in the described network computation?

    1. A

      By averaging the parameter values with the activations

    2. B

      By copying the gradient of the network input to every parameter

    3. C

      By differentiating the final loss while ignoring the module's input

    4. D

      By combining the gradient arriving at that module's output with the local dependence on its parameters

    Correct answer
    D

    By combining the gradient arriving at that module's output with the local dependence on its parameters

    Explanation

    Once the relevant upstream activation gradient is available, the module's local computation can be differentiated with respect to its parameters to obtain that parameter gradient.

  31. 31

    Why can some parameter-gradient calculations proceed without waiting for the entire backward sweep to finish?

    1. A

      A parameter gradient can be computed once the needed gradient reaches its module

    2. B

      Parameter gradients are determined during initialization

    3. C

      The backward sweep can be skipped for modules with parameters

    4. D

      All parameter gradients are independent of activation gradients

    Correct answer
    A

    A parameter gradient can be computed once the needed gradient reaches its module

    Explanation

    A parameter gradient can be calculated when the required upstream gradient and local module information are available, allowing some calculations to branch off before the full sweep is complete.

  32. 32

    What is one memory-management benefit of freeing intermediate computations after their gradients have been computed?

    1. A

      It reduces the number of parameters in the model

    2. B

      It eliminates the need to compute activation gradients

    3. C

      It makes the loss independent of the training data

    4. D

      It can release memory that is no longer needed

    Correct answer
    D

    It can release memory that is no longer needed

    Explanation

    Once a calculation is no longer needed for subsequent gradient computations, its stored values can be freed to clear memory.

  33. 33

    Why does the computational graph matter for systems-level choices such as operation order and communication?

    1. A

      It determines the labels and examples that should be included in the data set

    2. B

      It describes dependencies among quantities and therefore constrains when computations can be performed or freed

    3. C

      It makes every operation independent of other operations

    4. D

      It specifies only the final loss and contains no information about intermediate values

    Correct answer
    B

    It describes dependencies among quantities and therefore constrains when computations can be performed or freed

    Explanation

    The graph records which quantities depend on which others. Those dependencies affect computation order, memory release, parallel work, and communication between processors.

  34. 34

    For a linear module u=Wz+bu=Wz+bu=Wz+b, what is the gradient with respect to the input zzz given an upstream gradient ∇uj\nabla_u j∇u​j?

    1. A

      ∇zj=W∇uj\nabla_z j=W\nabla_u j∇z​j=W∇u​j

    2. B

      ∇zj=WT∇uj\nabla_z j=W^T\nabla_u j∇z​j=WT∇u​j

    3. C

      ∇zj=WTz\nabla_z j=W^Tz∇z​j=WTz

    4. D

      ∇zj=bT∇uj\nabla_z j=b^T\nabla_u j∇z​j=bT∇u​j

    Correct answer
    B

    ∇zj=WT∇uj\nabla_z j=W^T\nabla_u j∇z​j=WT∇u​j

    Explanation

    The Jacobian of u=Wz+bu=Wz+bu=Wz+b with respect to zzz is WWW, so the chain rule gives ∇zj=WT∇uj\nabla_z j=W^T\nabla_u j∇z​j=WT∇u​j.

  35. 35

    Why does the bias bbb not appear in the input-gradient formula for u=Wz+bu=Wz+bu=Wz+b?

    1. A

      The bias is constant with respect to zzz, so its derivative with respect to zzz is zero

    2. B

      The bias affects only the gradient with respect to the loss, not the output

    3. C

      The bias is removed when the matrix is transposed

    4. D

      The bias is always equal to the input vector

    Correct answer
    A

    The bias is constant with respect to zzz, so its derivative with respect to zzz is zero

    Explanation

    When differentiating with respect to zzz, the bias is constant. Therefore, it contributes no term to the Jacobian with respect to zzz.

  36. 36

    For u=Wz+bu=Wz+bu=Wz+b, what is the derivative of output coordinate uru_rur​ with respect to input coordinate ziz_izi​?

    1. A

      The input entry ziz_izi​

    2. B

      The matrix entry WriW_{ri}Wri​

    3. C

      The bias entry brb_rbr​

    4. D

      The matrix entry WirW_{ir}Wir​

    Correct answer
    B

    The matrix entry WriW_{ri}Wri​

    Explanation

    Since ur=br+∑sWrszsu_r=b_r+\sum_s W_{rs}z_sur​=br​+∑s​Wrs​zs​, differentiating with respect to ziz_izi​ leaves the coefficient WriW_{ri}Wri​.

  37. 37

    For an individual training example, what is the gradient of the loss with respect to a weight WriW_{ri}Wri​ in u=Wz+bu=Wz+bu=Wz+b?

    1. A

      ∂j∂Wri=∂j∂ziur\frac{\partial j}{\partial W_{ri}}=\frac{\partial j}{\partial z_i}u_r∂Wri​∂j​=∂zi​∂j​ur​

    2. B

      ∂j∂Wri=∂j∂urzi\frac{\partial j}{\partial W_{ri}}=\frac{\partial j}{\partial u_r}z_i∂Wri​∂j​=∂ur​∂j​zi​

    3. C

      ∂j∂Wri=∂j∂uizr\frac{\partial j}{\partial W_{ri}}=\frac{\partial j}{\partial u_i}z_r∂Wri​∂j​=∂ui​∂j​zr​

    4. D

      ∂j∂Wri=∂j∂brWri\frac{\partial j}{\partial W_{ri}}=\frac{\partial j}{\partial b_r}W_{ri}∂Wri​∂j​=∂br​∂j​Wri​

    Correct answer
    B

    ∂j∂Wri=∂j∂urzi\frac{\partial j}{\partial W_{ri}}=\frac{\partial j}{\partial u_r}z_i∂Wri​∂j​=∂ur​∂j​zi​

    Explanation

    The chain rule gives a weight gradient equal to the upstream gradient at the connected output, ∂j∂ur\frac{\partial j}{\partial u_r}∂ur​∂j​, multiplied by the corresponding input value ziz_izi​.

  38. 38

    What does the edge-based interpretation of a weight gradient emphasize?

    1. A

      The output-side gradient is multiplied by the input-side value connected by that weight

    2. B

      The weight gradient is the difference between the input and output gradients

    3. C

      The weight gradient is the sum of the two endpoint values

    4. D

      The weight gradient depends only on the output-side activation

    Correct answer
    A

    The output-side gradient is multiplied by the input-side value connected by that weight

    Explanation

    For the edge associated with WriW_{ri}Wri​, the gradient is the gradient at output uru_rur​ times the value of input ziz_izi​.

  39. 39

    For one example, what is the matrix form of the gradient with respect to the weight matrix WWW?

    1. A

      ∇Wj=(∇uj)zT\nabla_W j=(\nabla_u j)z^T∇W​j=(∇u​j)zT

    2. B

      ∇Wj=WT∇uj\nabla_W j=W^T\nabla_u j∇W​j=WT∇u​j

    3. C

      ∇Wj=∇uj+z\nabla_W j=\nabla_u j+z∇W​j=∇u​j+z

    4. D

      ∇Wj=z(∇uj)T\nabla_W j=z(\nabla_u j)^T∇W​j=z(∇u​j)T

    Correct answer
    A

    ∇Wj=(∇uj)zT\nabla_W j=(\nabla_u j)z^T∇W​j=(∇u​j)zT

    Explanation

    The entry for row rrr and column iii is ∂j∂urzi\frac{\partial j}{\partial u_r}z_i∂ur​∂j​zi​, which is the outer product (∇uj)zT(\nabla_u j)z^T(∇u​j)zT.

  40. 40

    Why is the weight-gradient matrix for one example rank one, or lower?

    1. A

      It contains only diagonal entries

    2. B

      It is the sum of one gradient for each weight

    3. C

      It is the product of two square matrices with equal dimensions

    4. D

      It is the outer product of two vectors

    Correct answer
    D

    It is the outer product of two vectors

    Explanation

    For one example, ∇Wj=(∇uj)zT\nabla_W j=(\nabla_u j)z^T∇W​j=(∇u​j)zT, an outer product of two vectors, which has rank one or lower.

  41. 41

    Why need the averaged weight gradient across multiple examples not be rank one?

    1. A

      It is an aggregate of multiple example-specific outer products

    2. B

      Averaging changes the weight matrix into a Jacobian

    3. C

      Each example-specific gradient becomes a full-rank matrix when averaged

    4. D

      The activation gradient is constant across all examples

    Correct answer
    A

    It is an aggregate of multiple example-specific outer products

    Explanation

    Each example contributes a rank-one-or-lower outer product, but summing or averaging several such matrices can produce a matrix with rank greater than one.

  42. 42

    For an elementwise activation u=σ(z)u=\sigma(z)u=σ(z), what structure does its Jacobian have?

    1. A

      It is full because each output coordinate depends on every input coordinate

    2. B

      It is diagonal because each output coordinate depends only on the matching input coordinate

    3. C

      It has nonzero entries only in its first row

    4. D

      It is a copy of the weight matrix from the preceding layer

    Correct answer
    B

    It is diagonal because each output coordinate depends only on the matching input coordinate

    Explanation

    Elementwise application means that output coordinate uiu_iui​ depends only on input coordinate ziz_izi​. Thus, cross-coordinate derivatives are zero and the Jacobian is diagonal.

  43. 43

    For u=σ(z)u=\sigma(z)u=σ(z), how is the gradient with respect to zzz computed from the upstream gradient?

    1. A

      (∇zj)i=σ′(zi)(∇uj)i(\nabla_z j)_i=\sigma'(z_i)(\nabla_u j)_i(∇z​j)i​=σ′(zi​)(∇u​j)i​ for each coordinate

    2. B

      (∇zj)i=σ(zi)(∇uj)i(\nabla_z j)_i=\sigma(z_i)(\nabla_u j)_i(∇z​j)i​=σ(zi​)(∇u​j)i​ for each coordinate

    3. C

      (∇zj)i=σ′(ui)+(∇uj)i(\nabla_z j)_i=\sigma'(u_i)+(\nabla_u j)_i(∇z​j)i​=σ′(ui​)+(∇u​j)i​ for each coordinate

    4. D

      (∇zj)i=∑rσ′(zr)(∇uj)r(\nabla_z j)_i=\sum_r \sigma'(z_r)(\nabla_u j)_r(∇z​j)i​=∑r​σ′(zr​)(∇u​j)r​ for every coordinate

    Correct answer
    A

    (∇zj)i=σ′(zi)(∇uj)i(\nabla_z j)_i=\sigma'(z_i)(\nabla_u j)_i(∇z​j)i​=σ′(zi​)(∇u​j)i​ for each coordinate

    Explanation

    The diagonal Jacobian has entries σ′(zi)\sigma'(z_i)σ′(zi​), so multiplying it by the upstream gradient scales each coordinate by the corresponding derivative.

  44. 44

    Why can an elementwise activation's backward computation avoid constructing its full Jacobian?

    1. A

      The activation gradient is independent of the input

    2. B

      The backward computation uses only the activation's scalar output

    3. C

      The Jacobian is always the identity matrix

    4. D

      The diagonal Jacobian can be applied by elementwise multiplication

    Correct answer
    D

    The diagonal Jacobian can be applied by elementwise multiplication

    Explanation

    Multiplication by a diagonal Jacobian is equivalent to scaling each gradient coordinate by the corresponding diagonal entry, so the full matrix need not be formed.

  45. 45

    What is the forward-pass cost for applying a scalar activation independently to an MMM-dimensional vector, under the operation-count assumptions in the content?

    1. A

      Time proportional to the number of model parameters squared

    2. B

      Time proportional to M2M^2M2

    3. C

      Constant time regardless of MMM

    4. D

      Time proportional to MMM

    Correct answer
    D

    Time proportional to MMM

    Explanation

    The activation is applied once to each of the MMM coordinates, so the forward computation takes time proportional to MMM.

  46. 46

    Which statement best describes the kinds of activation functions and gating operations mentioned?

    1. A

      Only matrix inverses, because scalar functions cannot be differentiated

    2. B

      Only functions that map every input to a constant output

    3. C

      Operations that must sum two vectors into a single scalar

    4. D

      Differentiable scalar functions such as sigmoid, or gates formed by combining two computed vectors elementwise

    Correct answer
    D

    Differentiable scalar functions such as sigmoid, or gates formed by combining two computed vectors elementwise

    Explanation

    The content mentions differentiable one-dimensional activations, including sigmoid and other examples, as well as gating operations that combine two computed values elementwise.

Question 1 of 46
Question 1 of 46

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent