Learning Goal - Gradient Descent and Learning
5 important questions on Learning Goal - Gradient Descent and Learning
What is the quadratic cost function (MSE)? Write the formula and explain each term.
- n = total number of training examples
- x = a training input
- y(x) = the desired (correct) output for input x
- a = the actual network output for input x
- The 1/2 is a convenience to make the derivative cleaner
The cost is the average squared difference between desired and actual outputs — minimising it means the network's outputs are close to the correct answers.
Explain gradient descent conceptually using Nielsen's "ball in a valley" analogy.
1. Compute the gradient (steepest uphill direction) at the current position
2. Move in the opposite direction (downhill) by a small step
Key distinction from a real ball: no momentum — the algorithm always moves directly downhill at each step, never coasting across a slope or going uphill.
Update rule: v→v′=v−η∇C, where η is the learning rate.
What is the learning rate η and what happens at the extremes?
- Too large: overshoots the minimum — the ball "jumps over the valley" and may diverge
- Too small: converges correctly but very slowly — requires many more iterations
- Just right: efficient convergence to the minimum
Choosing η is a key hyperparameter decision in training.
- Higher grades + faster learning
- Never study anything twice
- 100% sure, 100% understanding
What is Stochastic Gradient Descent (SGD) and why does it work?
∇C ≈ 1/m ∑^m_(j=1) ∇C_(xj)
Why it works: Nielsen's analogy — like political polling. A small random sample estimates the full population's opinion well enough. The estimate isn't perfect, but it gives a good enough direction to reduce the cost. Averaged over many steps, SGD converges to (approximately) the same result as full gradient descent, but much faster.
What is an epoch in neural network training?
In SGD, training examples are divided into mini-batches; an epoch is completed once every mini-batch has been used once.
Networks are typically trained for many epochs.
The question on the page originate from the summary of the following study material:
- A unique study and practice tool
- Never study anything twice again
- Get the grades you hope for
- 100% sure, 100% understanding

















