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: Backpropagation Basics
  • spaceFlip card
  • KI knew it
  • DI didn't know it
  • ←Previous card
  • →Next card

How is a dataset-level loss commonly defined from individual examples?

Tap to flipClick to flipspace

As the average of the individual examples’ costs or losses.

Or swipe the card

46 cards

  1. How is a dataset-level loss commonly defined from individual examples?

    As the average of the individual examples’ costs or losses.

  2. What is the basic stochastic gradient descent update for parameters?

    Sample an example and update the parameters by subtracting the learning rate times that example’s loss gradient: θ←θ−η∇θLi(θ)\theta \leftarrow \theta - \eta\nabla_\theta L_i(\theta)θ←θ−η∇θ​Li​(θ).

  3. What does backpropagation compute?

    The gradient of a loss with respect to the model’s parameters.

  4. Why is efficient gradient computation essential for training neural networks?

    Training repeatedly needs loss gradients for parameter updates, and neural networks can contain many parameters.

  5. What do “forward pass” and “backward pass” mean?

    The forward pass evaluates the model or loss; the backward pass computes gradients.

  6. Is automatic differentiation limited to neural networks?

    No. It applies to differentiable functions that can be evaluated through a suitable sequence of operations.

  7. What is a differentiable circuit in the context of automatic differentiation?

    A computational graph that composes differentiable arithmetic operations and elementary functions.

  8. What is the difference between a computational circuit and an expanded formula?

    A circuit can reuse a computed intermediate value, while an expanded formula must repeat the computation wherever it is used.

  9. How is the size of a computational circuit measured?

    By the number of operations in the circuit.

  10. In the circuit-gradient result, what is the assumed form of the function’s output?

    The circuit computes a scalar-valued function from its inputs.

  11. If a scalar function has LLL input coordinates, what is the dimension of its gradient with respect to those inputs?

    The gradient is an LLL-dimensional vector.

  12. What does the circuit-gradient result say about computing a gradient?

    For a differentiable circuit of size nnn, the gradient of its scalar output can be computed in time proportional to nnn.

  13. How does the backward-pass cost compare with the forward-pass cost under the circuit-gradient result?

    They have the same asymptotic time complexity.

  14. How does the number of operations in many neural networks relate to their number of parameters?

    It is generally proportional to the number of parameters.

  15. What is the resulting time complexity of a neural-network forward pass and parameter-gradient computation?

    Both are generally proportional to the number of model parameters.

  16. In a neural-network loss computation, what do the circuit input variables represent?

    They can represent the model parameters, such as θ\thetaθ.

  17. What are activations in a neural network’s computation graph?

    Intermediate values produced as data passes through the network.

  18. Why can parameter gradients for a layer be computed using the gradient of the loss with respect to that layer’s output?

    The layer’s local backward computation combines that output gradient with the layer’s input and parameters.

  19. How can backpropagation support memory management during neural-network computation?

    Intermediate calculations can be released when they are no longer needed.

  20. What is the chain rule’s role in backpropagation?

    It converts a gradient with respect to a function’s output into a gradient with respect to its input.

  21. Suppose u=G(z)u = G(z)u=G(z) and the final scalar output is JJJ. Which gradient is passed into the local backward computation for GGG?

    The gradient of the final output with respect to the intermediate value, ∇uJ\nabla_u J∇u​J.

  22. Write the vector form of the chain rule for u=G(z)u = G(z)u=G(z) and scalar output JJJ.

    ∇zJ=JG(z)T∇uJ\nabla_z J = J_G(z)^{\mathsf T}\nabla_u J∇z​J=JG​(z)T∇u​J, where JG(z)J_G(z)JG​(z) is the Jacobian of GGG.

  23. How does the component-wise chain rule compute a derivative with respect to input coordinate ziz_izi​?

    ∂J∂zi=∑j=1N∂J∂uj∂uj∂zi\frac{\partial J}{\partial z_i} = \sum_{j=1}^{N}\frac{\partial J}{\partial u_j}\frac{\partial u_j}{\partial z_i}∂zi​∂J​=∑j=1N​∂uj​∂J​∂zi​∂uj​​.

  24. What information is needed to compute the local backward transformation for u=G(z)u = G(z)u=G(z)?

    The function GGG, the point zzz at which it is evaluated, and the incoming gradient ∇uJ\nabla_u J∇u​J.

  25. Why can the chain rule be applied efficiently one module at a time?

    Each module’s backward computation depends on local information and the gradient passed in from later in the computation.

  26. How is backpropagation performed through a sequence of modules?

    Start with the gradient at the final output, then apply each module’s backward transformation in reverse order.

  27. Must all modules in a neural network use the same backward transformation?

    No. Each operation uses a backward transformation appropriate to its own function.

  28. How can a network compute gradients with respect to parameters rather than only input data?

    Treat the parameters as inputs to the relevant computation and apply the chain rule with respect to them.

  29. For an affine layer u=Wz+bu = Wz + bu=Wz+b, what are the dimensions if zzz is MMM-dimensional and uuu is NNN-dimensional?

    WWW has dimensions N×MN \times MN×M, and bbb has dimension NNN.

  30. For u=Wz+bu = Wz + bu=Wz+b, what is the gradient of the scalar loss JJJ with respect to zzz?

    ∇zJ=WT∇uJ\nabla_z J = W^{\mathsf T}\nabla_u J∇z​J=WT∇u​J.

  31. For u=Wz+bu = Wz + bu=Wz+b, what is the derivative of output coordinate uku_kuk​ with respect to weight WijW_{ij}Wij​?

    It is zjz_jzj​ when k=ik=ik=i, and 000 when k≠ik\ne ik=i.

  32. For u=Wz+bu = Wz + bu=Wz+b, what is the weight-gradient formula for one example?

    ∇WJ=(∇uJ)zT\nabla_W J = (\nabla_u J)z^{\mathsf T}∇W​J=(∇u​J)zT.

  33. For u=Wz+bu = Wz + bu=Wz+b, what is the gradient with respect to the bias bbb?

    ∇bJ=∇uJ\nabla_b J = \nabla_u J∇b​J=∇u​J.

  34. Why is the weight gradient for one example and one affine layer rank one?

    It is the outer product of two vectors, (∇uJ)zT(\nabla_u J)z^{\mathsf T}(∇u​J)zT.

  35. Does averaging weight gradients over multiple examples necessarily preserve the rank-one property?

    No. A sum or average of rank-one gradients from different examples need not itself be rank one.

  36. How does the “Hebbian rule” relate to an affine-layer weight gradient?

    The weight gradient for a connection is the gradient at its output multiplied by the input value at the other end: ∂J∂Wij=∂J∂uizj\frac{\partial J}{\partial W_{ij}} = \frac{\partial J}{\partial u_i}z_j∂Wij​∂J​=∂ui​∂J​zj​.

  37. For an elementwise activation ui=σ(zi)u_i = \sigma(z_i)ui​=σ(zi​), what is the structure of its Jacobian?

    It is diagonal, with entry σ′(zi)\sigma'(z_i)σ′(zi​) on the diagonal for coordinate iii.

  38. For u=σ(z)u = \sigma(z)u=σ(z) applied elementwise, what is the backward-gradient formula?

    ∇zJ=∇uJ⊙σ′(z)\nabla_z J = \nabla_u J \odot \sigma'(z)∇z​J=∇u​J⊙σ′(z).

  39. How can an elementwise activation’s backward pass be computed without explicitly forming its Jacobian?

    Compute the derivative of the activation at each coordinate and multiply elementwise by the incoming gradient.

  40. What is the time cost of applying an elementwise activation to an MMM-dimensional vector, and of its backward pass?

    Both take O(M)O(M)O(M) time.

  41. What gated activation pattern is described in the lecture?

    Compute two transformations and combine their outputs by elementwise multiplication.

  42. How can automatic differentiation be used with a multi-step optimization algorithm?

    Treat the algorithm’s final result or loss as a function of its starting parameters and settings, then differentiate through the sequence of steps.

  43. How can differentiating through an optimization procedure support meta-learning or hyperparameter tuning?

    It can compute how the final loss changes with choices such as the learning rate or regularization settings.

  44. If g(x)=∇f(x)Tvg(x)=\nabla f(x)^{\mathsf T}vg(x)=∇f(x)Tv for a fixed vector vvv, what is ∇g(x)\nabla g(x)∇g(x)?

    ∇g(x)=∇2f(x)v\nabla g(x)=\nabla^2 f(x)v∇g(x)=∇2f(x)v.

  45. Why can a Hessian-vector product be computed efficiently without forming the full Hessian?

    It can be obtained by differentiating a scalar gradient-vector product, using automatic differentiation again.

  46. How does the cost of a Hessian-vector product compare with computing a full Hessian?

    A Hessian-vector product can be computed in time proportional to the circuit size, whereas forming the full Hessian requires producing an n×nn \times nn×n matrix.

Card 1 of 46
Card 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