Backpropagation and Neural Networks
- 46Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
How is the overall loss described in the content?
How is the overall loss described in the content?
46 questions
- 1
How is the overall loss described in the content?
- A
As the largest cost among all individual examples
- B
As the average of the model outputs before comparison
- C
As the sum of parameter values in the model
- D
As the average of the costs for individual examples
Correct answer
DAs 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.
- A
- 2
What information does an individual example's cost function typically compare?
- A
The input features and the learning rate
- B
The model output for the example and its label
- C
The gradients from two different network layers
- D
The model parameters and the number of training examples
Correct answer
BThe 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), and the example's label y.
- A
- 3
In the simplest SGD update described, which example's gradient is used to update the parameters?
- A
The gradient for the example with the largest loss
- B
The gradient for an example sampled randomly from the data set
- C
The gradient averaged over every example in the data set
- D
The gradient for a fixed example selected before training
Correct answer
BThe gradient for an example sampled randomly from the data set
Explanation
The basic SGD update uses the gradient for a randomly sampled example, denoted ik, rather than necessarily averaging over the whole data set.
- A
- 4
What is the central computational goal of backpropagation during training?
- A
To determine the network architecture from the labels
- B
To calculate the model's predictions without evaluating its layers
- C
To compute the loss gradient with respect to the model parameters
- D
To select the training examples with the smallest losses
Correct answer
CTo 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.
- A
- 5
Why can backpropagation be described as automatable?
- A
The method makes every parameter update independent of the loss
- B
A system can choose the best data set without evaluating examples
- C
A system can compute gradients from the operations in the forward computation
- D
The method removes the need to define a model's forward computation
Correct answer
CA 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.
- A
- 6
Which terminology pairing is used for evaluating a model and computing its gradients?
- A
Evaluating the function is the backward pass; computing gradients is the forward pass
- B
Evaluating the function is the forward pass; computing gradients is the backward pass
- C
Evaluating the parameters is the backward pass; computing outputs is the update pass
- D
Evaluating the loss is the update pass; computing parameters is the forward pass
Correct answer
BEvaluating 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.
- A
- 7
Which description best characterizes a differentiable circuit in this discussion?
- A
A sequence of labels connected by non-differentiable decisions
- B
A collection of parameters that contains no computational operations
- C
A composition of arithmetic operations and elementary functions
- D
A list of training examples ordered by their loss values
Correct answer
CA 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.
- A
- 8
What is a key difference between a computational circuit and an expanded formula?
- A
A circuit can contain only multiplication, while a formula can contain addition
- B
A circuit can reuse a computed intermediate value without recomputing it
- C
A formula can reuse intermediate values, while a circuit must duplicate them
- D
A formula represents only scalar functions, while a circuit represents vectors
Correct answer
BA 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.
- A
- 9
In the stated circuit-size result, what does the size n count?
- A
The number of examples used to train the model
- B
The number of coordinates in the circuit's output
- C
The number of distinct labels in the data set
- D
The number of computational operations in the circuit
Correct answer
DThe 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.
- A
- 10
For a differentiable circuit that maps an L-dimensional input to one scalar, what is the dimension of the gradient with respect to the input?
- A
It is an n-dimensional vector because the circuit has size n
- B
It is a scalar because the circuit has a scalar output
- C
It is an L-dimensional vector with one partial derivative per input coordinate
- D
It is an L-by-L matrix because the input has L coordinates
Correct answer
CIt is an L-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 L coordinates, so it is an L-dimensional vector.
- A
- 11
According to the stated result, how does the time to compute the input gradient compare with the size of the circuit?
- A
It requires a separate full forward computation for every input coordinate
- B
It can be computed in time O(n) for a circuit of size n
- C
It necessarily takes time proportional to the number of input coordinates squared
- D
It necessarily takes time O(n2) for a circuit of size n
Correct answer
BIt can be computed in time O(n) for a circuit of size n
Explanation
The result states that the gradient of a scalar-valued function computed by a differentiable circuit of size n can also be computed in time O(n).
- A
- 12
What complexity relationship does the content give between a neural network's forward and backward passes?
- A
The backward pass avoids the network operations and takes time proportional only to depth
- B
They can both be performed in time proportional to the number of network operations
- C
The backward pass necessarily takes quadratic time in the forward-pass operations
- D
The forward pass is constant-time, while the backward pass depends on input dimension
Correct answer
BThey 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.
- A
- 13
Why does the content connect neural-network operation count to parameter count?
- A
Every network has exactly one operation for each training example
- B
For typical networks, evaluating their operations takes time proportional to the number of parameters
- C
The number of parameters is determined by the number of loss evaluations
- D
The number of operations is always the square of the number of parameters
Correct answer
BFor 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 D-by-D matrix has D2 parameters and a matrix-vector product takes proportional to D2 operations.
- A
- 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?
- A
Gradient computation must take time proportional to the square of the parameter count
- B
Both loss evaluation and gradient computation can take time proportional to the parameter count
- C
Gradient computation is proportional to the number of training labels rather than the parameters
- D
Loss evaluation is proportional to parameter count, but gradient computation is independent of it
Correct answer
BBoth 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.
- A
- 15
How can differentiating through an optimization step produce a function suitable for further gradient computation?
- A
The updated parameters and the loss can be computed from the starting parameters using differentiable operations
- B
The gradient of the update can be computed only by forming a full Hessian
- C
The updated loss is treated as constant because it follows a parameter update
- D
The optimization step removes all dependence on the starting parameters
Correct answer
AThe 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.
- A
- 16
What kind of quantity can be optimized by backpropagating through several steps of an algorithm?
- A
Only the loss before the algorithm begins
- B
Only a parameter count that does not depend on the algorithm's result
- C
A final prediction while ignoring all intermediate parameter updates
- D
A final loss defined by the result of running the algorithm for a chosen number of steps
Correct answer
DA 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.
- A
- 17
Which is an example of an algorithmic quantity that can be tuned by differentiating through the algorithm?
- A
A learning rate used during the algorithm's parameter updates
- B
The definition of addition used by the computational hardware
- C
The number of labels that exist in the data set
- D
The scalar output dimension of the loss function
Correct answer
AA 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.
- A
- 18
If g(x) is defined as the inner product of ∇f(x) with a fixed vector v, what derivative does ∇g(x) represent?
- A
The Hessian of f multiplied by its gradient
- B
The Hessian of f multiplied by v
- C
The gradient of f multiplied by its loss value
- D
The inner product of x with the Hessian of f
Correct answer
BThe Hessian of f multiplied by v
Explanation
Differentiating g(x)=∇f(x)Tv gives the Hessian-vector product ∇2f(x)v.
- A
- 19
Why can a Hessian-vector product be efficient to compute even when explicitly constructing the Hessian is not?
- A
The Hessian is always diagonal, so its entries need not be computed
- B
The product uses only the loss value and never depends on derivatives
- C
The vector product reduces the input dimension to one before differentiation
- D
The product can be obtained by differentiating a scalar function without forming the full matrix
Correct answer
DThe 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.
- A
- 20
What is the role of the chain rule in backpropagation through a module?
- A
It replaces every module with a single scalar parameter
- B
It uses the gradient at the module's output to compute the gradient at its input
- C
It computes the forward output without evaluating the module
- D
It uses the module's input to determine the model's training labels
Correct answer
BIt 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.
- A
- 21
Suppose u=G(z) and the final scalar output is j=f(u). What information is sufficient, together with G and the evaluated value of z, to compute ∇zj?
- A
The gradient ∇uj
- B
The full internal computation used to implement f, even if ∇uj is known
- C
The gradients of every training example in the data set
- D
Only the value of j, without any gradient information
Correct answer
AThe gradient ∇uj
Explanation
The chain rule needs the upstream gradient ∇uj and local information about G at z. It does not need the internal details of f once ∇uj is available.
- A
- 22
For u=G(z) with z∈RM and u∈RN, how is the gradient with respect to z expressed using the Jacobian of G?
- A
∇zj=JG(z)T∇uj
- B
∇zj=JG(z)∇uj
- C
∇zj=∇uj+JG(z)
- D
∇zj=JG(z)Tz
Correct answer
A∇zj=JG(z)T∇uj
Explanation
The chain rule gives the input gradient by multiplying the upstream gradient by the transpose of the Jacobian: ∇zj=JG(z)T∇uj.
- A
- 23
Why does the component form of the chain rule sum over the intermediate coordinates?
- A
The final output has one separate value for every input coordinate
- B
Each input coordinate can affect the final output through every intermediate coordinate
- C
The sum averages the gradient over all possible input examples
- D
Each intermediate coordinate must be equal to every input coordinate
Correct answer
BEach 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: ∂zi∂j=∑r=1N∂ur∂j∂zi∂ur.
- A
- 24
Once the gradient at an intermediate variable is known, what local information is needed to propagate it through a module?
- A
The complete internal structure of every later module
- B
The full set of training examples and their labels
- C
The optimizer's future parameter updates
- D
The module's function and the value of its input where it was evaluated
Correct answer
DThe 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.
- A
- 25
How does backpropagation handle a sequence of modules?
- A
It computes a separate full gradient from scratch for every earlier module
- B
It applies every module's forward function again in the original order
- C
It repeatedly applies each module's local chain-rule mapping in reverse order
- D
It skips intermediate variables and differentiates only the final module
Correct answer
CIt 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.
- A
- 26
Why can a module's backward function be composed with different computations that precede it?
- A
Its backward function replaces the gradients from all preceding computations
- B
Its local gradient mapping depends on that module and its input, not on the internal details of later computation
- C
Its backward function does not depend on the module's input value
- D
Its backward function is identical for every possible module
Correct answer
BIts 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.
- A
- 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?
- A
Treat the parameters as inputs to the relevant computation and apply the chain rule
- B
Differentiate only with respect to the input data because parameters are embedded in the module
- C
Treat the parameters as fixed outputs that cannot be differentiated
- D
Replace the parameters with the intermediate activation before differentiation
Correct answer
ATreat 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.
- A
- 28
In a layered network, what are the intermediate variables often called activations?
- A
The parameters used to specify the network's architecture
- B
The values produced between successive modules during the forward computation
- C
The labels assigned to examples in the training data
- D
The gradients computed before the forward computation begins
Correct answer
BThe 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.
- A
- 29
In the two-phase view of backpropagation described, what is computed in the first phase?
- A
Gradients with respect to intermediate activations, propagated backward through the network
- B
Gradients with respect to every parameter before any activation gradient is computed
- C
Updated parameter values for all layers
- D
The full Hessian of the loss with respect to the parameters
Correct answer
AGradients 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.
- A
- 30
How is a parameter gradient for a particular module obtained in the described network computation?
- A
By averaging the parameter values with the activations
- B
By copying the gradient of the network input to every parameter
- C
By differentiating the final loss while ignoring the module's input
- D
By combining the gradient arriving at that module's output with the local dependence on its parameters
Correct answer
DBy 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.
- A
- 31
Why can some parameter-gradient calculations proceed without waiting for the entire backward sweep to finish?
- A
A parameter gradient can be computed once the needed gradient reaches its module
- B
Parameter gradients are determined during initialization
- C
The backward sweep can be skipped for modules with parameters
- D
All parameter gradients are independent of activation gradients
Correct answer
AA 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.
- A
- 32
What is one memory-management benefit of freeing intermediate computations after their gradients have been computed?
- A
It reduces the number of parameters in the model
- B
It eliminates the need to compute activation gradients
- C
It makes the loss independent of the training data
- D
It can release memory that is no longer needed
Correct answer
DIt 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.
- A
- 33
Why does the computational graph matter for systems-level choices such as operation order and communication?
- A
It determines the labels and examples that should be included in the data set
- B
It describes dependencies among quantities and therefore constrains when computations can be performed or freed
- C
It makes every operation independent of other operations
- D
It specifies only the final loss and contains no information about intermediate values
Correct answer
BIt 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.
- A
- 34
For a linear module u=Wz+b, what is the gradient with respect to the input z given an upstream gradient ∇uj?
- A
∇zj=W∇uj
- B
∇zj=WT∇uj
- C
∇zj=WTz
- D
∇zj=bT∇uj
Correct answer
B∇zj=WT∇uj
Explanation
The Jacobian of u=Wz+b with respect to z is W, so the chain rule gives ∇zj=WT∇uj.
- A
- 35
Why does the bias b not appear in the input-gradient formula for u=Wz+b?
- A
The bias is constant with respect to z, so its derivative with respect to z is zero
- B
The bias affects only the gradient with respect to the loss, not the output
- C
The bias is removed when the matrix is transposed
- D
The bias is always equal to the input vector
Correct answer
AThe bias is constant with respect to z, so its derivative with respect to z is zero
Explanation
When differentiating with respect to z, the bias is constant. Therefore, it contributes no term to the Jacobian with respect to z.
- A
- 36
For u=Wz+b, what is the derivative of output coordinate ur with respect to input coordinate zi?
- A
The input entry zi
- B
The matrix entry Wri
- C
The bias entry br
- D
The matrix entry Wir
Correct answer
BThe matrix entry Wri
Explanation
Since ur=br+∑sWrszs, differentiating with respect to zi leaves the coefficient Wri.
- A
- 37
For an individual training example, what is the gradient of the loss with respect to a weight Wri in u=Wz+b?
- A
∂Wri∂j=∂zi∂jur
- B
∂Wri∂j=∂ur∂jzi
- C
∂Wri∂j=∂ui∂jzr
- D
∂Wri∂j=∂br∂jWri
Correct answer
B∂Wri∂j=∂ur∂jzi
Explanation
The chain rule gives a weight gradient equal to the upstream gradient at the connected output, ∂ur∂j, multiplied by the corresponding input value zi.
- A
- 38
What does the edge-based interpretation of a weight gradient emphasize?
- A
The output-side gradient is multiplied by the input-side value connected by that weight
- B
The weight gradient is the difference between the input and output gradients
- C
The weight gradient is the sum of the two endpoint values
- D
The weight gradient depends only on the output-side activation
Correct answer
AThe output-side gradient is multiplied by the input-side value connected by that weight
Explanation
For the edge associated with Wri, the gradient is the gradient at output ur times the value of input zi.
- A
- 39
For one example, what is the matrix form of the gradient with respect to the weight matrix W?
- A
∇Wj=(∇uj)zT
- B
∇Wj=WT∇uj
- C
∇Wj=∇uj+z
- D
∇Wj=z(∇uj)T
Correct answer
A∇Wj=(∇uj)zT
Explanation
The entry for row r and column i is ∂ur∂jzi, which is the outer product (∇uj)zT.
- A
- 40
Why is the weight-gradient matrix for one example rank one, or lower?
- A
It contains only diagonal entries
- B
It is the sum of one gradient for each weight
- C
It is the product of two square matrices with equal dimensions
- D
It is the outer product of two vectors
Correct answer
DIt is the outer product of two vectors
Explanation
For one example, ∇Wj=(∇uj)zT, an outer product of two vectors, which has rank one or lower.
- A
- 41
Why need the averaged weight gradient across multiple examples not be rank one?
- A
It is an aggregate of multiple example-specific outer products
- B
Averaging changes the weight matrix into a Jacobian
- C
Each example-specific gradient becomes a full-rank matrix when averaged
- D
The activation gradient is constant across all examples
Correct answer
AIt 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.
- A
- 42
For an elementwise activation u=σ(z), what structure does its Jacobian have?
- A
It is full because each output coordinate depends on every input coordinate
- B
It is diagonal because each output coordinate depends only on the matching input coordinate
- C
It has nonzero entries only in its first row
- D
It is a copy of the weight matrix from the preceding layer
Correct answer
BIt is diagonal because each output coordinate depends only on the matching input coordinate
Explanation
Elementwise application means that output coordinate ui depends only on input coordinate zi. Thus, cross-coordinate derivatives are zero and the Jacobian is diagonal.
- A
- 43
For u=σ(z), how is the gradient with respect to z computed from the upstream gradient?
- A
(∇zj)i=σ′(zi)(∇uj)i for each coordinate
- B
(∇zj)i=σ(zi)(∇uj)i for each coordinate
- C
(∇zj)i=σ′(ui)+(∇uj)i for each coordinate
- D
(∇zj)i=∑rσ′(zr)(∇uj)r for every coordinate
Correct answer
A(∇zj)i=σ′(zi)(∇uj)i for each coordinate
Explanation
The diagonal Jacobian has entries σ′(zi), so multiplying it by the upstream gradient scales each coordinate by the corresponding derivative.
- A
- 44
Why can an elementwise activation's backward computation avoid constructing its full Jacobian?
- A
The activation gradient is independent of the input
- B
The backward computation uses only the activation's scalar output
- C
The Jacobian is always the identity matrix
- D
The diagonal Jacobian can be applied by elementwise multiplication
Correct answer
DThe 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.
- A
- 45
What is the forward-pass cost for applying a scalar activation independently to an M-dimensional vector, under the operation-count assumptions in the content?
- A
Time proportional to the number of model parameters squared
- B
Time proportional to M2
- C
Constant time regardless of M
- D
Time proportional to M
Correct answer
DTime proportional to M
Explanation
The activation is applied once to each of the M coordinates, so the forward computation takes time proportional to M.
- A
- 46
Which statement best describes the kinds of activation functions and gating operations mentioned?
- A
Only matrix inverses, because scalar functions cannot be differentiated
- B
Only functions that map every input to a constant output
- C
Operations that must sum two vectors into a single scalar
- D
Differentiable scalar functions such as sigmoid, or gates formed by combining two computed vectors elementwise
Correct answer
DDifferentiable 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.
- A

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