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

  • 59Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Optimization Foundations

What is the purpose of a classifier function f(x;W)f(x; W)f(x;W)?

59 questions

  1. 1

    What is the purpose of a classifier function f(x;W)f(x; W)f(x;W)?

    1. A

      It directly converts each input into a probability distribution without training

    2. B

      It determines the regularization strength without examining the input data

    3. C

      It updates the model parameters without evaluating a loss function

    4. D

      It maps input data to a vector of scores for the possible classes

    Correct answer
    D

    It maps input data to a vector of scores for the possible classes

    Explanation

    A classifier parameterized by weights WWW takes data xxx as input and produces a vector of scores, one for each class.

  2. 2

    Why is a regularization term included in the total loss?

    1. A

      To replace the data loss when the classifier has multiple output classes

    2. B

      To express a preference for simpler models that may generalize better

    3. C

      To guarantee that every training example receives the highest possible score

    4. D

      To make numerical gradient calculations exact rather than approximate

    Correct answer
    B

    To express a preference for simpler models that may generalize better

    Explanation

    The total loss combines a data term with a regularization term that favors simpler models and can improve generalization.

  3. 3

    How does gradient descent reduce a loss function?

    1. A

      It changes parameters randomly until the loss becomes constant

    2. B

      It repeatedly moves parameters in the direction of the positive gradient

    3. C

      It increases the loss temporarily so that the model becomes more complex

    4. D

      It repeatedly moves parameters in the direction opposite the gradient

    Correct answer
    D

    It repeatedly moves parameters in the direction opposite the gradient

    Explanation

    The gradient points in the direction of steepest increase, so gradient descent moves in the negative-gradient direction to reduce the loss.

  4. 4

    Which statement correctly compares numerical and analytic gradients?

    1. A

      Numerical gradients require extensive calculus, whereas analytic gradients require no mathematical derivation

    2. B

      Numerical gradients can only be used for neural networks, whereas analytic gradients apply only to linear models

    3. C

      Numerical gradients are approximate and slow, whereas analytic gradients are fast and exact once derived

    4. D

      Numerical gradients are exact and fast, whereas analytic gradients are always approximate

    Correct answer
    C

    Numerical gradients are approximate and slow, whereas analytic gradients are fast and exact once derived

    Explanation

    Finite-difference numerical gradients are slow and approximate. Analytic gradients are fast and exact after their expressions have been derived, although deriving them can be error-prone.

  5. 5

    Why is it useful to compare an analytic gradient with a numerical gradient?

    1. A

      The analytic gradient can determine whether the numerical approximation uses enough training data

    2. B

      The numerical gradient can check whether the analytic-gradient implementation is correct

    3. C

      The analytic gradient can make finite-difference calculations unnecessary during debugging

    4. D

      The numerical gradient can replace optimization after the analytic gradient is derived

    Correct answer
    B

    The numerical gradient can check whether the analytic-gradient implementation is correct

    Explanation

    In practice, analytic gradients are used for efficiency, while numerical gradients provide a correctness check for the implementation.

  6. 6

    What does a computational graph represent?

    1. A

      A collection of training examples grouped according to their predicted classes

    2. B

      A visualization showing only the final output of a machine-learning model

    3. C

      A function as a sequence of computation nodes connected by intermediate values

    4. D

      A record of parameter updates arranged according to their numerical magnitude

    Correct answer
    C

    A function as a sequence of computation nodes connected by intermediate values

    Explanation

    A computational graph represents a function by decomposing it into nodes, where each node performs a computation and passes its result onward.

  7. 7

    What is the main advantage of expressing a complicated function as a computational graph?

    1. A

      The function no longer requires any intermediate values during evaluation

    2. B

      Gradients can be computed from simple local derivatives using the chain rule

    3. C

      Every complicated operation can be differentiated without knowing its local derivative

    4. D

      The graph automatically chooses the best model parameters without optimization

    Correct answer
    B

    Gradients can be computed from simple local derivatives using the chain rule

    Explanation

    Computational graphs let backpropagation combine simple local gradients rather than requiring a single symbolic derivative of the entire complicated expression.

  8. 8

    In the function f(x,y,z)=(x+y)zf(x,y,z)=(x+y)zf(x,y,z)=(x+y)z, what are the intermediate value and final value when x=−2x=-2x=−2, y=5y=5y=5, and z=−4z=-4z=−4?

    1. A

      The intermediate value is −7-7−7, and the final value is 282828

    2. B

      The intermediate value is 333, and the final value is 121212

    3. C

      The intermediate value is −8-8−8, and the final value is −40-40−40

    4. D

      The intermediate value is 333, and the final value is −12-12−12

    Correct answer
    D

    The intermediate value is 333, and the final value is −12-12−12

    Explanation

    Let q=x+yq=x+yq=x+y. Then q=−2+5=3q=-2+5=3q=−2+5=3, and f=qz=3(−4)=−12f=qz=3(-4)=-12f=qz=3(−4)=−12.

  9. 9

    What is the role of the forward pass in a computational graph?

    1. A

      It evaluates the nodes from inputs toward the final output

    2. B

      It compares analytic derivatives with finite-difference approximations

    3. C

      It propagates gradients from the final output back toward the inputs

    4. D

      It updates each parameter using the negative of its local derivative

    Correct answer
    A

    It evaluates the nodes from inputs toward the final output

    Explanation

    During the forward pass, input values are evaluated through the graph in order to compute intermediate values and the final output.

  10. 10

    What is the first gradient used when beginning backpropagation at the output?

    1. A

      ∂f∂f=0\frac{\partial f}{\partial f}=0∂f∂f​=0

    2. B

      ∂f∂f=f\frac{\partial f}{\partial f}=f∂f∂f​=f

    3. C

      ∂f∂f=−1\frac{\partial f}{\partial f}=-1∂f∂f​=−1

    4. D

      ∂f∂f=1\frac{\partial f}{\partial f}=1∂f∂f​=1

    Correct answer
    D

    ∂f∂f=1\frac{\partial f}{\partial f}=1∂f∂f​=1

    Explanation

    The derivative of a quantity with respect to itself is 111, so backpropagation begins with an upstream gradient of 111 at the output.

  11. 11

    For q=x+yq=x+yq=x+y and f=qzf=qzf=qz, with q=3q=3q=3 and z=−4z=-4z=−4, what are the gradients ∂f∂z\frac{\partial f}{\partial z}∂z∂f​ and ∂f∂q\frac{\partial f}{\partial q}∂q∂f​?

    1. A

      ∂f∂z=3\frac{\partial f}{\partial z}=3∂z∂f​=3 and ∂f∂q=−4\frac{\partial f}{\partial q}=-4∂q∂f​=−4

    2. B

      ∂f∂z=1\frac{\partial f}{\partial z}=1∂z∂f​=1 and ∂f∂q=1\frac{\partial f}{\partial q}=1∂q∂f​=1

    3. C

      ∂f∂z=−12\frac{\partial f}{\partial z}=-12∂z∂f​=−12 and ∂f∂q=−12\frac{\partial f}{\partial q}=-12∂q∂f​=−12

    4. D

      ∂f∂z=−4\frac{\partial f}{\partial z}=-4∂z∂f​=−4 and ∂f∂q=3\frac{\partial f}{\partial q}=3∂q∂f​=3

    Correct answer
    A

    ∂f∂z=3\frac{\partial f}{\partial z}=3∂z∂f​=3 and ∂f∂q=−4\frac{\partial f}{\partial q}=-4∂q∂f​=−4

    Explanation

    For the multiplication f=qzf=qzf=qz, the derivative with respect to zzz is q=3q=3q=3, and the derivative with respect to qqq is z=−4z=-4z=−4.

  12. 12

    For f=(x+y)zf=(x+y)zf=(x+y)z with x=−2x=-2x=−2, y=5y=5y=5, and z=−4z=-4z=−4, what is ∂f∂y\frac{\partial f}{\partial y}∂y∂f​?

    1. A

      −2-2−2

    2. B

      333

    3. C

      −4-4−4

    4. D

      111

    Correct answer
    C

    −4-4−4

    Explanation

    Using the chain rule, ∂f∂y=∂f∂q∂q∂y=z⋅1=−4\frac{\partial f}{\partial y}=\frac{\partial f}{\partial q}\frac{\partial q}{\partial y}=z\cdot 1=-4∂y∂f​=∂q∂f​∂y∂q​=z⋅1=−4.

  13. 13

    For the same function f=(x+y)zf=(x+y)zf=(x+y)z, what is ∂f∂x\frac{\partial f}{\partial x}∂x∂f​?

    1. A

      333

    2. B

      −12-12−12

    3. C

      555

    4. D

      −4-4−4

    Correct answer
    D

    −4-4−4

    Explanation

    Because ∂q∂x=1\frac{\partial q}{\partial x}=1∂x∂q​=1 and ∂f∂q=z=−4\frac{\partial f}{\partial q}=z=-4∂q∂f​=z=−4, the chain rule gives ∂f∂x=−4\frac{\partial f}{\partial x}=-4∂x∂f​=−4.

  14. 14

    What information does a computational node need in order to participate in backpropagation?

    1. A

      Only the final loss value and the total number of parameters in the model

    2. B

      The complete symbolic derivative of the entire function before the node

    3. C

      Its local inputs, its local output, and the local derivatives of the output with respect to its inputs

    4. D

      Every operation performed in all preceding and succeeding nodes of the graph

    Correct answer
    C

    Its local inputs, its local output, and the local derivatives of the output with respect to its inputs

    Explanation

    Each node needs only its immediate inputs and output plus its local gradients. Backpropagation combines these local gradients with incoming upstream gradients.

  15. 15

    How does a node use an upstream gradient during backpropagation?

    1. A

      It divides the upstream gradient by the number of nodes in the graph

    2. B

      It adds the upstream gradient to its forward output and sends the sum backward

    3. C

      It multiplies the upstream gradient by its local gradient and sends the result backward

    4. D

      It discards the upstream gradient and recomputes the entire graph symbolically

    Correct answer
    C

    It multiplies the upstream gradient by its local gradient and sends the result backward

    Explanation

    The chain rule is implemented locally by multiplying the upstream gradient by the node's local derivative with respect to each input.

  16. 16

    For a multiplication node z=xyz=xyz=xy, what is the local gradient with respect to xxx?

    1. A

      ∂z∂x=x\frac{\partial z}{\partial x}=x∂x∂z​=x

    2. B

      ∂z∂x=1\frac{\partial z}{\partial x}=1∂x∂z​=1

    3. C

      ∂z∂x=y\frac{\partial z}{\partial x}=y∂x∂z​=y

    4. D

      ∂z∂x=xy\frac{\partial z}{\partial x}=xy∂x∂z​=xy

    Correct answer
    C

    ∂z∂x=y\frac{\partial z}{\partial x}=y∂x∂z​=y

    Explanation

    Differentiating z=xyz=xyz=xy with respect to xxx gives yyy; similarly, the derivative with respect to yyy is xxx.

  17. 17

    For a sigmoid function σ(x)=11+e−x\sigma(x)=\frac{1}{1+e^{-x}}σ(x)=1+e−x1​, what is its derivative?

    1. A

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

    2. B

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

    3. C

      e−xσ(x)e^{-x}\sigma(x)e−xσ(x)

    4. D

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

    Correct answer
    A

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

    Explanation

    The sigmoid derivative has the convenient form dσ(x)dx=σ(x)(1−σ(x))\frac{d\sigma(x)}{dx}=\sigma(x)(1-\sigma(x))dxdσ(x)​=σ(x)(1−σ(x)).

  18. 18

    Why can several simple computational nodes be grouped into one larger node?

    1. A

      The grouping is valid if the larger node's local gradient can be derived

    2. B

      The grouping changes the function but usually preserves its approximate output

    3. C

      The grouping eliminates the need to compute a derivative for the larger node

    4. D

      The grouping is valid only when all of the smaller nodes perform additions

    Correct answer
    A

    The grouping is valid if the larger node's local gradient can be derived

    Explanation

    Nodes can be grouped at any granularity as long as the local gradient of the grouped operation is known.

  19. 19

    How does an addition gate transform an upstream gradient?

    1. A

      It divides the gradient equally among all input branches

    2. B

      It scales the gradient by the value of the opposite input

    3. C

      It passes the same upstream gradient to each input branch

    4. D

      It sends the gradient only to the input with the largest value

    Correct answer
    C

    It passes the same upstream gradient to each input branch

    Explanation

    For an addition gate, the local derivative with respect to every input is 111, so each branch receives the unchanged upstream gradient.

  20. 20

    How does a max gate route gradients when one input is strictly larger than the others?

    1. A

      It sends the gradient only to the smallest input because it needs the greatest adjustment

    2. B

      It sends the full upstream gradient equally to every input

    3. C

      It sends the full upstream gradient to the largest input and zero to the others

    4. D

      It scales every input gradient by the numerical value of the maximum

    Correct answer
    C

    It sends the full upstream gradient to the largest input and zero to the others

    Explanation

    Only the maximum input affects the output locally, so it receives the upstream gradient while the nonmaximum inputs receive zero.

  21. 21

    How does a multiplication gate affect the upstream gradient?

    1. A

      It scales the gradient for each input by the value of the other input

    2. B

      It passes the same gradient to all inputs regardless of their values

    3. C

      It replaces the gradient with the product of both forward inputs

    4. D

      It routes the gradient only to the input with the larger magnitude

    Correct answer
    A

    It scales the gradient for each input by the value of the other input

    Explanation

    For z=xyz=xyz=xy, the gradient with respect to xxx is the upstream gradient multiplied by yyy, and vice versa.

  22. 22

    What happens when one node influences multiple downstream nodes?

    1. A

      The gradients are multiplied together before reaching the shared node

    2. B

      The gradients arriving from those downstream paths are added together

    3. C

      The shared node receives a gradient of zero to avoid double counting

    4. D

      Only the gradient from the earliest downstream path is retained

    Correct answer
    B

    The gradients arriving from those downstream paths are added together

    Explanation

    The multivariate chain rule requires summing the effects of all paths from a shared variable to the final output.

  23. 23

    What does backpropagation compute before the optimization step updates weights?

    1. A

      The gradients of the loss with respect to parameters and intermediate variables

    2. B

      The new parameter values after taking a step along the negative gradient

    3. C

      The classification accuracy obtained from the final layer

    4. D

      The numerical approximation of every possible model architecture

    Correct answer
    A

    The gradients of the loss with respect to parameters and intermediate variables

    Explanation

    Backpropagation computes gradients. An optimization algorithm then uses those gradients to update the weights.

  24. 24

    When variables are vectors rather than scalars, what form do the derivatives generally take?

    1. A

      They take the form of Jacobian matrices containing partial derivatives between components

    2. B

      They always take the form of a single scalar equal to the total loss

    3. C

      They disappear because the scalar chain rule no longer applies

    4. D

      They become probability vectors whose entries sum to one

    Correct answer
    A

    They take the form of Jacobian matrices containing partial derivatives between components

    Explanation

    For vector-valued variables, derivatives are organized into Jacobian matrices, whose entries describe how output components depend on input components.

  25. 25

    For an element-wise function mapping a 409640964096-dimensional vector to another 409640964096-dimensional vector, what is the size of its full Jacobian?

    1. A

      4096+40964096+40964096+4096

    2. B

      4096×14096\times14096×1

    3. C

      1×40961\times40961×4096

    4. D

      4096×40964096\times40964096×4096

    Correct answer
    D

    4096×40964096\times40964096×4096

    Explanation

    A Jacobian for a 409640964096-dimensional input and output has one derivative for every input-output component pair, giving a 4096×40964096\times40964096×4096 matrix.

  26. 26

    Why is the Jacobian of an element-wise maximum with zero diagonal?

    1. A

      Each output component depends equally on every input component

    2. B

      The maximum operation makes every off-diagonal derivative equal to one

    3. C

      Each output component depends only on the corresponding input component

    4. D

      The zero threshold removes all derivatives, including the diagonal entries

    Correct answer
    C

    Each output component depends only on the corresponding input component

    Explanation

    For an element-wise operation, input component xix_ixi​ affects only output component iii, so the Jacobian has nonzero entries only on its diagonal.

  27. 27

    Why is it usually unnecessary to explicitly construct the full Jacobian for an element-wise operation?

    1. A

      The Jacobian is always the identity matrix regardless of the operation

    2. B

      Its diagonal structure allows the needed gradient effects to be computed directly

    3. C

      The operation has no derivatives when applied to a vector

    4. D

      The full Jacobian is replaced by the model's loss value

    Correct answer
    B

    Its diagonal structure allows the needed gradient effects to be computed directly

    Explanation

    Because an element-wise operation produces a diagonal Jacobian, implementations can use the relevant diagonal values without storing the enormous matrix.

  28. 28

    For f(q)=q12+q22f(q)=q_1^2+q_2^2f(q)=q12​+q22​, what is the gradient with respect to qqq?

    1. A

      2q2q2q

    2. B

      12q\frac{1}{2}q21​q

    3. C

      q1+q2q_1+q_2q1​+q2​

    4. D

      q2q^2q2

    Correct answer
    A

    2q2q2q

    Explanation

    Differentiating each component gives ∂f∂qi=2qi\frac{\partial f}{\partial q_i}=2q_i∂qi​∂f​=2qi​, so the vector gradient is 2q2q2q.

  29. 29

    What shape should the gradient with respect to a vector or matrix parameter have?

    1. A

      It should have the same shape as the parameter itself

    2. B

      It should always be a scalar because the loss is scalar

    3. C

      It should have one fewer dimension than the parameter

    4. D

      It should always be a square matrix regardless of the parameter shape

    Correct answer
    A

    It should have the same shape as the parameter itself

    Explanation

    Each gradient element corresponds to the effect of one parameter element, so the gradient should match the parameter's shape.

  30. 30

    Given q=Wxq=Wxq=Wx, what is ∂qk∂Wij\frac{\partial q_k}{\partial W_{ij}}∂Wij​∂qk​​?

    1. A

      xjx_jxj​ when k=ik=ik=i, and 000 otherwise

    2. B

      xix_ixi​ when k=jk=jk=j, and 000 otherwise

    3. C

      qkq_kqk​ for every pair of indices iii and jjj

    4. D

      WijW_{ij}Wij​ for every value of kkk

    Correct answer
    A

    xjx_jxj​ when k=ik=ik=i, and 000 otherwise

    Explanation

    The element qkq_kqk​ depends on row kkk of WWW. Therefore, changing WijW_{ij}Wij​ affects qkq_kqk​ only when k=ik=ik=i, with derivative xjx_jxj​.

  31. 31

    Given q=Wxq=Wxq=Wx, what is ∂qk∂xi\frac{\partial q_k}{\partial x_i}∂xi​∂qk​​?

    1. A

      WikW_{ik}Wik​

    2. B

      xix_ixi​

    3. C

      WkiW_{ki}Wki​

    4. D

      qkq_kqk​

    Correct answer
    C

    WkiW_{ki}Wki​

    Explanation

    The kkkth output is qk=∑iWkixiq_k=\sum_i W_{ki}x_iqk​=∑i​Wki​xi​, so its derivative with respect to xix_ixi​ is WkiW_{ki}Wki​.

  32. 32

    For f=∥Wx∥22f=\lVert Wx\rVert_2^2f=∥Wx∥22​, where q=Wxq=Wxq=Wx, what is the derivative with respect to WijW_{ij}Wij​?

    1. A

      2qjWij2q_j W_{ij}2qj​Wij​

    2. B

      qi+xjq_i+x_jqi​+xj​

    3. C

      2Wijqi2W_{ij}q_i2Wij​qi​

    4. D

      2qixj2q_i x_j2qi​xj​

    Correct answer
    D

    2qixj2q_i x_j2qi​xj​

    Explanation

    Using the chain rule, ∂f∂qi=2qi\frac{\partial f}{\partial q_i}=2q_i∂qi​∂f​=2qi​ and ∂qi∂Wij=xj\frac{\partial q_i}{\partial W_{ij}}=x_j∂Wij​∂qi​​=xj​, giving ∂f∂Wij=2qixj\frac{\partial f}{\partial W_{ij}}=2q_i x_j∂Wij​∂f​=2qi​xj​.

  33. 33

    Why can explicitly forming a Jacobian become impractical when processing batches?

    1. A

      Its entries cannot be computed using the chain rule when multiple examples are present

    2. B

      Its storage remains constant while the model's loss changes

    3. C

      Its dimensions grow rapidly with the number of input and output components and batch examples

    4. D

      Its values become undefined whenever a matrix multiplication is used

    Correct answer
    C

    Its dimensions grow rapidly with the number of input and output components and batch examples

    Explanation

    A full Jacobian can already be very large for one vector, and batching many examples increases the dimensions and storage requirements substantially.

  34. 34

    What does a modular computational-graph implementation typically provide for each gate?

    1. A

      A forward function that computes outputs and a backward function that computes input gradients

    2. B

      A training function that chooses weights and a testing function that removes nonlinearities

    3. C

      A data loader that creates inputs and a classifier that eliminates intermediate values

    4. D

      A loss function that replaces the graph and a regularizer that replaces backpropagation

    Correct answer
    A

    A forward function that computes outputs and a backward function that computes input gradients

    Explanation

    Each gate implements a forward operation and a backward operation that applies the local chain rule to an upstream gradient.

  35. 35

    In what order should nodes be processed during a forward pass?

    1. A

      In reverse order, beginning with the final loss and ending with the inputs

    2. B

      In random order so that no node receives information from another node

    3. C

      In topologically sorted order, after all inputs to a node have been processed

    4. D

      In alphabetical order according to the names assigned to intermediate variables

    Correct answer
    C

    In topologically sorted order, after all inputs to a node have been processed

    Explanation

    A forward pass must process every node's inputs before evaluating that node, which is achieved by topological ordering.

  36. 36

    In what order should nodes be processed during a backward pass?

    1. A

      In order of increasing parameter magnitude

    2. B

      In random order, because local gradients do not depend on upstream values

    3. C

      In the same order as the forward pass, beginning at the inputs

    4. D

      In reverse topological order, beginning at the output

    Correct answer
    D

    In reverse topological order, beginning at the output

    Explanation

    Backpropagation starts at the output and moves toward the inputs, so nodes are processed in reverse topological order.

  37. 37

    Why should a gate cache values from its forward pass?

    1. A

      Caching removes the need to define a backward function for the gate

    2. B

      Caching prevents the forward pass from producing an output for the next gate

    3. C

      Cached values automatically serve as updated weights during optimization

    4. D

      The backward pass often needs those forward values to evaluate local derivatives

    Correct answer
    D

    The backward pass often needs those forward values to evaluate local derivatives

    Explanation

    For example, a multiplication gate needs the other input value to compute each backward gradient, so forward values are cached for later use.

  38. 38

    For a scalar multiplication gate with forward output z=xyz=xyz=xy, what does its backward function receive and return?

    1. A

      It receives upstream gradient dzdzdz and returns dx=y dzdx= y\,dzdx=ydz and dy=x dzdy=x\,dzdy=xdz

    2. B

      It receives the inputs xxx and yyy and returns dx=dzdx=dzdx=dz and dy=dzdy=dzdy=dz

    3. C

      It receives the output zzz and returns dx=xzdx=xzdx=xz and dy=yzdy=yzdy=yz

    4. D

      It receives the loss LLL and returns dx=x+ydx=x+ydx=x+y and dy=x−ydy=x-ydy=x−y

    Correct answer
    A

    It receives upstream gradient dzdzdz and returns dx=y dzdx= y\,dzdx=ydz and dy=x dzdy=x\,dzdy=xdz

    Explanation

    The backward function receives the upstream gradient dzdzdz and applies the chain rule: dx=dz∂z∂x=y dzdx=dz\frac{\partial z}{\partial x}=y\,dzdx=dz∂x∂z​=ydz and dy=x dzdy=x\,dzdy=xdz.

  39. 39

    What is the main reason backpropagation is especially useful for neural networks?

    1. A

      Neural networks require numerical gradients because analytic derivatives do not exist

    2. B

      Neural networks update weights during backpropagation without using an optimization rule

    3. C

      Neural networks cannot be represented as computational graphs because they contain nonlinear functions

    4. D

      Neural networks can contain too many parameters and operations for manually derived gradients to be practical

    Correct answer
    D

    Neural networks can contain too many parameters and operations for manually derived gradients to be practical

    Explanation

    Backpropagation efficiently computes gradients through large, complex computational graphs by repeatedly applying local chain-rule calculations.

  40. 40

    What is the basic structure of a two-layer neural network described in the lecture?

    1. A

      A single linear transformation followed only by a regularization term

    2. B

      A nonlinear transformation followed by two independent loss functions

    3. C

      A linear transformation, a nonlinearity, and a second linear transformation

    4. D

      Two linear transformations with no nonlinear operation between them

    Correct answer
    C

    A linear transformation, a nonlinearity, and a second linear transformation

    Explanation

    A two-layer network applies one matrix multiplication, a nonlinear activation, and then a second matrix multiplication.

  41. 41

    Why are nonlinear activation functions needed between stacked linear layers?

    1. A

      Without nonlinearities, the network cannot contain any trainable parameters

    2. B

      Without nonlinearities, multiple linear transformations collapse into one linear transformation

    3. C

      Without nonlinearities, matrix multiplication cannot be performed on vector inputs

    4. D

      Without nonlinearities, the loss function becomes independent of the training data

    Correct answer
    B

    Without nonlinearities, multiple linear transformations collapse into one linear transformation

    Explanation

    The composition of linear functions is still linear, so nonlinear activations are needed to make deeper networks represent more complex nonlinear functions.

  42. 42

    What is the broader characterization of a neural network given in the lecture?

    1. A

      It is a probabilistic model that must use biological neuron equations exactly

    2. B

      It is a hierarchical composition of simpler functions forming a more complex nonlinear function

    3. C

      It is a single linear classifier whose weights are fixed before training

    4. D

      It is a collection of unrelated functions that share only the final loss

    Correct answer
    B

    It is a hierarchical composition of simpler functions forming a more complex nonlinear function

    Explanation

    Neural networks stack simpler transformations and nonlinearities in multiple hierarchical stages to construct complex nonlinear functions.

  43. 43

    How does a hidden layer help address the single-template limitation of a linear classifier?

    1. A

      It removes the need for weights because templates are selected automatically

    2. B

      It replaces all class scores with the maximum response from one input feature

    3. C

      It can detect multiple templates and combine their scores to represent several modes of a class

    4. D

      It forces every class to use exactly one fixed template in the input space

    Correct answer
    C

    It can detect multiple templates and combine their scores to represent several modes of a class

    Explanation

    The first layer can detect multiple templates, such as different appearances of cars or horses, while later weights combine those template scores into a class score.

  44. 44

    In the template interpretation, what does the intermediate vector hhh represent?

    1. A

      The regularization penalties assigned to each parameter

    2. B

      The scores indicating how strongly the input matches the learned templates

    3. C

      The gradients of the second-layer weights with respect to the loss

    4. D

      The final class probabilities after all output normalization steps

    Correct answer
    B

    The scores indicating how strongly the input matches the learned templates

    Explanation

    The intermediate vector hhh contains responses or scores for the templates represented by the first-layer weights.

  45. 45

    What role does the second-layer weight matrix play in the template interpretation?

    1. A

      It forms weighted combinations of intermediate template scores to produce class scores

    2. B

      It selects only the maximum template score and discards all other responses

    3. C

      It determines the raw pixel values used as templates in the first layer

    4. D

      It applies the first nonlinearity directly to the input before template detection

    Correct answer
    A

    It forms weighted combinations of intermediate template scores to produce class scores

    Explanation

    The second-layer weights combine the scores in hhh through weighted sums to produce scores for the final classes.

  46. 46

    What does the term 'deep neural network' refer to?

    1. A

      A neural network whose parameters are derived from biological measurements

    2. B

      A neural network that contains one linear layer with a very large weight matrix

    3. C

      A neural network formed by stacking many layers of transformations and nonlinearities

    4. D

      A neural network trained only on data with many input dimensions

    Correct answer
    C

    A neural network formed by stacking many layers of transformations and nonlinearities

    Explanation

    The term deep refers to using multiple stacked layers, often with nonlinearities between them, to create a deeper hierarchy of computation.

  47. 47

    How does a fully connected layer efficiently compute the outputs of many neurons?

    1. A

      It replaces all neuron computations with a single maximum operation

    2. B

      It stores a separate computational graph for every individual input feature

    3. C

      It evaluates each neuron with a separate optimization problem before combining the results

    4. D

      It uses one matrix multiplication to compute the values of an entire layer at once

    Correct answer
    D

    It uses one matrix multiplication to compute the values of an entire layer at once

    Explanation

    A matrix multiplication computes the outputs of many fully connected neurons simultaneously using efficient vectorized operations.

  48. 48

    A network with two fully connected linear layers and one intermediate hidden layer can be called what?

    1. A

      A three-layer neural network or a three-hidden-layer neural network

    2. B

      A one-layer neural network or a two-hidden-layer neural network

    3. C

      A two-layer neural network or a one-hidden-layer neural network

    4. D

      A zero-layer neural network or a one-hidden-layer linear classifier

    Correct answer
    C

    A two-layer neural network or a one-hidden-layer neural network

    Explanation

    Counting linear layers gives a two-layer network, while counting hidden layers gives a one-hidden-layer network.

  49. 49

    What is the relationship between a three-layer neural network and its hidden-layer terminology?

    1. A

      A three-layer network has one hidden layer because only the first transformation is trainable

    2. B

      A three-layer network has two hidden layers when the output layer is excluded from the hidden-layer count

    3. C

      A three-layer network has three hidden layers because every linear layer is hidden

    4. D

      A three-layer network has no hidden layers because nonlinearities are not counted

    Correct answer
    B

    A three-layer network has two hidden layers when the output layer is excluded from the hidden-layer count

    Explanation

    A three-layer network has three linear layers in total, with two intermediate hidden layers, so it can be called a two-hidden-layer network.

  50. 50

    What is the basic biological analogy for the inputs to an artificial neuron?

    1. A

      They exactly correspond to the neuron's axon lengths and firing frequencies

    2. B

      They loosely correspond to signals received through dendrites and synaptic connections

    3. C

      They correspond only to the final class scores produced by downstream neurons

    4. D

      They represent the cell body's metabolic energy rather than incoming signals

    Correct answer
    B

    They loosely correspond to signals received through dendrites and synaptic connections

    Explanation

    The lecture draws a loose analogy in which incoming artificial signals resemble signals received through dendrites and synapses.

  51. 51

    In the artificial-neuron analogy, what does the weighted sum such as Wx+bWx+bWx+b represent?

    1. A

      An integration of incoming signals before an activation function produces the output

    2. B

      The class label assigned by the final layer without using incoming signals

    3. C

      The regularization penalty imposed on the neuron's weights

    4. D

      The discrete output spikes transmitted by the axon after activation

    Correct answer
    A

    An integration of incoming signals before an activation function produces the output

    Explanation

    The weighted combination Wx+bWx+bWx+b loosely represents integrating incoming signals before applying an activation function.

  52. 52

    What is the loose biological interpretation of an activation function's output?

    1. A

      It is the number of synapses that connect the neuron to its inputs

    2. B

      It can be viewed loosely as a signal strength or firing-rate-like output

    3. C

      It represents the physical size of the neuron's dendritic tree

    4. D

      It is an exact simulation of the timing of every biological spike

    Correct answer
    B

    It can be viewed loosely as a signal strength or firing-rate-like output

    Explanation

    Activation outputs can be loosely interpreted as firing strength or firing rate, although this is not a complete biological model.

  53. 53

    What is the definition of the ReLU activation function described in the lecture?

    1. A

      It outputs the absolute value of every input with the same slope on both sides

    2. B

      It outputs one for negative inputs and zero for positive inputs

    3. C

      It outputs zero for negative inputs and a linear value for positive inputs

    4. D

      It produces a bounded probability between zero and one for every input

    Correct answer
    C

    It outputs zero for negative inputs and a linear value for positive inputs

    Explanation

    ReLU is zero for negative inputs and follows a linear function, typically the identity, for positive inputs.

  54. 54

    Why should biological analogies for artificial neural networks be treated cautiously?

    1. A

      Biological neurons are always linear, whereas artificial neurons are always nonlinear

    2. B

      Biological neurons have complex dendrites, synapses, dynamics, and signaling patterns not captured by simple artificial units

    3. C

      Artificial neural networks do not use weighted inputs, whereas biological neurons use only fixed thresholds

    4. D

      Artificial neural networks cannot represent hierarchical computations, whereas biological systems can

    Correct answer
    B

    Biological neurons have complex dendrites, synapses, dynamics, and signaling patterns not captured by simple artificial units

    Explanation

    The analogy is loose because biological neurons contain complex nonlinear dendritic computations, dynamic synapses, and variable spike patterns.

  55. 55

    Why is interpreting an activation value solely as a biological firing rate insufficient?

    1. A

      Artificial activations do not produce numerical values and therefore cannot be compared with rates

    2. B

      Biological communication depends on variable spike patterns and other dynamics beyond a single rate

    3. C

      Biological neurons never transmit discrete spikes and communicate only through continuous rates

    4. D

      Firing rates are determined entirely by the output class and not by incoming signals

    Correct answer
    B

    Biological communication depends on variable spike patterns and other dynamics beyond a single rate

    Explanation

    A single firing rate does not capture the variability and timing of biological spikes or the complexity of neural communication.

  56. 56

    Which statement best distinguishes fully connected neural networks from convolutional neural networks in the lecture's discussion?

    1. A

      Fully connected networks cannot be trained with backpropagation, while convolutional networks can

    2. B

      Fully connected networks use biological neurons exactly, while convolutional networks use artificial neurons

    3. C

      Fully connected networks use matrix-multiply layers, while convolutional networks use other structured transformations that will be studied separately

    4. D

      Fully connected networks contain no nonlinearities, while convolutional networks always contain only nonlinear operations

    Correct answer
    C

    Fully connected networks use matrix-multiply layers, while convolutional networks use other structured transformations that will be studied separately

    Explanation

    The lecture presents fully connected networks as networks built from matrix multiplications and nonlinearities, while convolutional architectures use different structured layers.

  57. 57

    What is the main computational benefit of representing a hidden layer as a vector and using matrix operations?

    1. A

      The vector representation guarantees that every hidden neuron detects the same feature

    2. B

      The network no longer requires nonlinear activation functions between layers

    3. C

      The outputs of many neurons can be evaluated efficiently with vectorized code

    4. D

      The matrix operation automatically computes the correct class labels without training

    Correct answer
    C

    The outputs of many neurons can be evaluated efficiently with vectorized code

    Explanation

    Matrix-vector operations efficiently compute the outputs of an entire layer rather than evaluating each neuron separately.

  58. 58

    What is the general forward-pass pattern for a multilayer neural network?

    1. A

      Apply only linear transformations and postpone all nonlinearities until after the final output

    2. B

      Apply backpropagation between every pair of input features before computing a forward result

    3. C

      Apply a loss function after every input feature and average the resulting parameters

    4. D

      Apply a linear transformation, apply a nonlinearity, and repeat before producing the final output

    Correct answer
    D

    Apply a linear transformation, apply a nonlinearity, and repeat before producing the final output

    Explanation

    A multilayer network repeatedly applies transformations such as Wx+bWx+bWx+b followed by nonlinear activation functions, ending with an output layer.

  59. 59

    How are gradients used after backpropagation has computed them?

    1. A

      They are discarded because backpropagation itself performs the parameter update

    2. B

      They are used only to calculate the size of the computational graph

    3. C

      They are converted directly into class labels without changing parameters

    4. D

      An optimization algorithm uses them to update the model parameters

    Correct answer
    D

    An optimization algorithm uses them to update the model parameters

    Explanation

    Backpropagation supplies the gradients, and an optimization method such as gradient descent uses them to update parameters.

Question 1 of 59
Question 1 of 59

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent