Sample questions
Question 1Easy
In gradient descent, a learning rate that is too large can cause
- Guaranteed convergence in one step
- The loss to oscillate or diverge
- Zero gradient at start
- Overfitting on the test set
Answer: B. The loss to oscillate or diverge
Explanation
Big steps overshoot the minimum and may bounce around or blow up.
Step-by-step solution
- Update = w - lr * gradient.
- Large lr overshoots.
- Loss oscillates or diverges.
Why the other options are wrong
- A. Large steps usually overshoot.
- C. The gradient depends on the loss surface, not the step.
- D. The learning rate does not touch the test set.
Question 2Easy
The gradient descent update rule for a weight w is
- w = w - learning_rate * dLoss/dw
- w = w + learning_rate * dLoss/dw
- w = w * dLoss/dw
- w = dLoss/dw
Answer: A. w = w - learning_rate * dLoss/dw
Explanation
We move opposite to the gradient to reduce the loss.
Step-by-step solution
- Gradient descent reduces loss by moving against the gradient direction.
- Update rule subtracts learning rate multiplied by derivative of loss.
- Correct formula is w = w - learning_rate * dLoss/dw.
- This ensures weight adjustment in direction opposite to steepest increase.
- Final answer: w = w - learning_rate * dLoss/dw.
Why the other options are wrong
- B. Adding the gradient moves the weight uphill and raises the loss; gradient descent subtracts it.
- C. Multiplying the weight by the gradient is not the update rule; the step is a subtraction.
- D. Setting w to the gradient ignores the current weight and the learning rate.
Tip: Remember: Gradient descent moves in direction opposite to gradient to reduce loss.
Question 3Medium
For loss (w-5)^2, w = 1 and learning rate 0.25, the updated w is
- 2
- 5
- 3
- -1
Answer: C. 3
Explanation
Gradient = 2(w-5) = -8. w = 1 - 0.25*(-8) = 3.
Step-by-step solution
- The loss is (w - 5)^2, so its derivative is 2 (w - 5).
- At w = 1 the derivative is 2 × (1 - 5) = -8.
- Update: w = 1 - 0.25 × (-8) = 1 + 2 = 3, option C.
Why the other options are wrong
- A. This comes from dropping the factor 2; the derivative is 2 (w - 5) = -8, not -4.
- B. 5 is the target value, and one step of size 0.25 does not jump straight to it.
- D. Gradient descent subtracts the step, so w moves up from 1 to 3, not down to -1.
Tip: Gradient descent: new w = w - learning rate × derivative. Keep the factor from the power rule.
Question 4Medium
With 10,000 samples, a mini-batch size of 100 means each epoch has how many updates?
- 10,000
- 100
- 1
- 1,000,000
Answer: B. 100
Explanation
Updates per epoch = N / batch size = 10000/100 = 100.
Step-by-step solution
- N = 10000, batch = 100.
- Batches per epoch = N / batch.
- = 100 updates.
Why the other options are wrong
- A. That is one update per sample (SGD).
- C. That is full-batch gradient descent.
- D. Multiplies instead of dividing.
Question 5Medium
A learning rate that is too large typically causes
- very slow but guaranteed convergence
- divergence or oscillation around the minimum
- zero gradient immediately
- lower variance
Answer: B. divergence or oscillation around the minimum
Explanation
Big steps can overshoot the minimum repeatedly, so the loss may bounce or blow up.
Step-by-step solution
- Large learning rate makes updates too big.
- Updates may overshoot the minimum repeatedly.
- This causes divergence or oscillation around the minimum.
- Final answer: divergence or oscillation around the minimum.
Why the other options are wrong
- A. A large learning rate causes overshooting, so convergence is not slow or guaranteed.
- C. A large learning rate does not make the gradient zero; the gradient is the slope at the point.
- D. The learning rate does not set variance; a large rate makes training unstable instead.
Tip: High learning rate = unstable updates, low learning rate = slow progress.
Question 6Medium
For f(x) = x^2, starting at x = 3 with learning rate 0.1, the value of x after one gradient descent step is
- 2.7
- 0.6
- 3.6
- 2.4
Answer: D. 2.4
Explanation
Gradient = 2x = 6. x = 3 - 0.1*6 = 2.4.
Step-by-step solution
- Gradient of f(x) = x^2 is 2x = 6.
- Update rule: x = 3 - 0.1 * 6 = 2.4.
- New value of x after one step is 2.4.
- Final answer: 2.4.
Why the other options are wrong
- A. 2.7 would need a step of 0.3; the gradient 6 times 0.1 gives a step of 0.6, so x is 2.4.
- B. 0.6 is the size of the step, not the new x; subtracting 0.6 from 3 gives 2.4.
- C. 3.6 adds the step instead of subtracting it; gradient descent moves against the gradient.
Tip: Use formula x = x - learning_rate * gradient.
Question 7Medium
Momentum in optimisers helps by
- Removing the learning rate
- Randomly shuffling the data before every single epoch
- Making the loss convex
- Accumulating past gradients to speed movement along consistent directions and dampen oscillations
Answer: D. Accumulating past gradients to speed movement along consistent directions and dampen oscillations
Explanation
Momentum keeps a running velocity so steps build up along steady slopes and cancel across noisy ones.
Step-by-step solution
- Keep a velocity term.
- Add each new gradient to it.
- Move along the velocity.
Why the other options are wrong
- A. The learning rate is still needed.
- B. Shuffling is a separate step.
- C. Momentum does not change the loss surface.
Question 8Medium
Compared with batch gradient descent, stochastic gradient descent (SGD)
- Updates weights using one sample at a time, giving noisy but frequent updates
- Uses the whole dataset for every update
- Needs no learning rate
- Always finds the global minimum because of its random steps
Answer: A. Updates weights using one sample at a time, giving noisy but frequent updates
Explanation
SGD estimates the gradient from one example, making each step cheap but noisy.
Step-by-step solution
- Pick one sample.
- Compute its gradient.
- Update immediately.
Why the other options are wrong
- B. That is batch gradient descent.
- C. SGD still has a learning rate.
- D. Noise helps escape but gives no guarantee.
Question 9Hard
For a convex loss function, gradient descent with a suitably small learning rate
- May get stuck in many bad local minima
- Cannot converge
- Converges towards the global minimum
- Needs the Hessian to be zero
Answer: C. Converges towards the global minimum
Explanation
Any local minimum of a convex function is also global, so descent reaches it.
Step-by-step solution
- Convex = bowl-shaped.
- Only one basin.
- Descent heads to the bottom.
Why the other options are wrong
- A. Convex functions have no bad local minima.
- B. It converges under a suitable step size.
- D. No such requirement.
Question 10Hard
For a convex loss such as the MSE of linear regression, gradient descent with a suitably small learning rate
- converges toward the global minimum
- can only reach a local minimum that is not global
- never converges
- needs random restarts to find the minimum
Answer: A. converges toward the global minimum
Explanation
A convex function has no non-global local minima, so a proper step size reaches the global minimum.
Step-by-step solution
- MSE is a convex loss function.
- Gradient descent on convex functions moves toward the global minimum.
- Small learning rate ensures convergence without overshooting.
- No local minima exist in convex functions.
- Thus, gradient descent converges toward the global minimum.
Why the other options are wrong
- B. A convex loss such as MSE has no local minima other than the global one, so this is wrong.
- C. With a suitable learning rate, gradient descent on a convex loss does converge.
- D. Random restarts are unnecessary for convex losses, since any minimum found is the global one.
Tip: In convex problems, gradient descent finds the global minimum if learning rate is small enough.
Practise all 11 questions free
The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.
Open this topic in the app →