Backpropagation in Neural Networks
- 54Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
- spaceFlip card
- KI knew it
- DI didn't know it
- ←Previous card
- →Next card
What is a computation graph?
A directed acyclic graph whose nodes represent intermediate expressions and whose root represents the final expression.
Or swipe the card
54 cards
What is a computation graph?
A directed acyclic graph whose nodes represent intermediate expressions and whose root represents the final expression.
What does each node in a computation graph represent?
An input or an intermediate subexpression in the calculation.
How are operations represented in a computation graph?
Input values flow along arrows into an operation, and the operation produces an output value.
How do computation graphs help calculate gradients?
They break a calculation into local operations so gradients can be computed locally and combined automatically.
Are computation graphs and backpropagation limited to neural networks?
No. They apply to many mathematical functions, not just neural networks.
How do computation graphs reveal modularity in a model’s loss?
They can show the loss calculation and the model’s score calculation as separate connected parts.
How can computation graphs support rapid model development?
Their generality makes it easier to change models or loss functions while still computing gradients automatically.
What is the interpretation of a local derivative on a computation-graph edge?
It measures how much the output of that operation changes when its input changes slightly.
For c=a+b, what are the local derivatives with respect to a and b?
rac{\partial c}{\partial a}=1 and rac{\partial c}{ ext{}}=1.
For c=a−b, what are the local derivatives with respect to a and b?
rac{ ext{} ext{d}c}{ ext{d}a}=1 and rac{ ext{d}c}{ ext{d}b}=-1.
For c=ab, what are the local derivatives with respect to a and b?
rac{ ext{d}c}{ ext{d}a}=b and rac{ ext{d}c}{ ext{d}b}=a.
What is the derivative of the square operation c=a2?
rac{ ext{d}c}{ ext{d}a}=2a.
For c=max(a,b), what are the local derivatives when a and b are unequal?
The derivative with respect to a is 1 if a>b and 0 if a<b. The derivative with respect to b is 1 if b>a and 0 if b<a.
What is the derivative of the logistic sigmoid sigma(a)?
sigma(a)(1-sigma(a)).
What happens to the sigmoid’s derivative as its input approaches positive or negative infinity?
The derivative approaches zero as the sigmoid saturates near 1 or 0.
How are complicated derivatives assembled from local derivatives?
By composing the local derivatives of the operations that connect the input to the output.
How does the chain rule work along a path in a computation graph?
Multiply the local derivatives along the path.
If b=a2 and c=b2, how do you find rac{ ext{d}c}{ ext{d}a}?
rac{ ext{d}c}{ ext{d}a}=(2b)(2a)=4a^3, since b=a2.
How can the result for b=a2 and c=b2 be checked directly?
Since c=(a2)2=a4, the power rule gives rac{ ext{d}c}{ ext{d}a}=4a^3.
Why is it useful to multiply local derivatives rather than differentiate a large expression all at once?
It makes gradient calculations modular: each operation uses a simple local rule, and the rules are composed through the graph.
What does a gradient with respect to a model parameter describe?
How the loss changes when that parameter is changed slightly.
How is the hinge loss for a linear classifier constructed?
Compute the score f(x)=w^ op ext{}phi(x), the margin yf(x), and the loss max(1-yf(x),0).
When is the hinge loss max(1-yf(x),0) active?
When the margin satisfies yf(x)<1.
What is the gradient of the hinge loss with respect to w when yf(x)<1?
-yphi(x).
What is the hinge-loss gradient with respect to w when yf(x)>1?
0.
How can the hinge-loss gradient be written using an indicator for the active margin?
-mathbf{1}[yf(x)<1]yphi(x).
How is a squared-error loss for a neural network formed from its score?
Subtract the target y from the score to get the residual, then square it: (text{score}-y)^2.
What is the computation in a two-layer network with sigmoid activation?
Compute h=sigma(Vx), then the score woph, the residual woph−y, and the loss (woph−y)2.
For the two-layer squared-error model, what is the gradient of the loss with respect to w?
2(woph−y)h.
For the two-layer sigmoid network, what factors appear in the gradient with respect to V?
The residual factor 2(woph−y), the hidden-layer factor wextelementwise−multipliedbyhextand(1−h), and the input factor xop.
Why does the gradient with respect to w in a two-layer network resemble the linear-model gradient?
The hidden vector h plays the role of the feature vector for the final linear score.
What are the two phases of the backpropagation algorithm?
A forward pass followed by a backward pass.
In what direction does the forward pass proceed, and what does it compute?
It proceeds from the leaves toward the root, computing the value of each subexpression.
Why does backpropagation retain forward-pass values?
The backward pass needs intermediate values to evaluate local derivatives.
What does a backward value at a node represent?
The gradient of the final loss with respect to the value at that node.
In what direction does the backward pass proceed?
From the root toward the leaves.
What is the backward value at the loss node with respect to itself?
1.
How is a node’s backward value computed in a single-parent chain?
Multiply the parent’s backward value by the local derivative on the connecting edge.
What is the purpose of backpropagation in stochastic gradient descent?
To compute gradients of the loss with respect to model parameters so the parameters can be updated.
In the numerical example, what score, residual, and squared loss result from w=(3,1), x=(1,2), and y=2?
The score is 5, the residual is 3, and the loss is 9.
In the numerical example with residual 3, what backward value passes from the squared loss to the residual?
6.
In the numerical example, what gradient does backpropagation produce for w=(3,1) with x=(1,2) and residual 3?
(6,12).
What is the key optimization guarantee for a convex training loss of a linear predictor?
With an appropriate step size, gradient descent can converge to a global minimum.
What makes optimizing neural-network training loss theoretically harder than optimizing a convex linear-predictor loss?
Neural-network training loss is generally non-convex, so gradient descent has no general guarantee of reaching a global minimum.
Why does initialization matter for a non-convex neural-network loss?
Different starting points can lead optimization to different outcomes, including getting stuck in different regions.
Why is initializing every neural-network weight to zero problematic?
Rows of the weight matrix can remain identical, making the resulting units redundant.
What are two ways to initialize a neural network besides setting all weights to zero?
Initialize weights near zero with random noise, or use pre-training.
What does over-parameterization mean in the neural-network setting described?
Using more hidden units than are strictly needed.
What is the proposed benefit of over-parameterizing a neural network?
More hidden units provide more chances for some units to learn useful patterns, even if others are not useful.
How do adaptive step-size methods differ from using one step size in stochastic gradient descent?
They assign different step sizes to individual parameters or features instead of using one shared step size.
What can happen if gradients vanish during neural-network training?
Updates become too small, so learning makes little progress or gets stuck.
What can happen if gradients explode during neural-network training?
Updates can become too large, causing instability, oscillation, or divergence.
What design choices can help prevent vanishing or exploding gradients?
Careful initialization, step-size selection, and neural-network architecture design.
What practical tension exists between neural-network optimization theory and results?
Global optimization guarantees are limited, yet neural networks often train successfully in practice.

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