ML MATH & LINEAR ALGEBRA · INTERVIEW QUESTION
What is the difference between convex and non-convex optimization? Why does it matter in deep learning?
🟡 intermediate · Calculus & Optimization
Hint: Think about guarantees on finding global optima vs local optima.
Answer
Convex optimization: any local minimum is a global minimum. Convergence additionally requires assumptions such as an attained minimum, appropriate smoothness and a suitable step-size rule. Convexity alone does not guarantee a particular algorithm converges.
A function is convex if:
Non-convex problems (like deep learning) can have multiple local minima, saddle points, and plateaus.
In practice:
- Saddle points are more problematic than local minima in high dimensions
- SGD with momentum helps escape saddle points
- Some over-parameterized models have favorable optimization landscapes under specific assumptions; this is not a universal guarantee
| Convex | Non-Convex | |
|---|---|---|
| Local minimum globally optimal? | Yes, on a convex feasible domain | Not in general |
| Local = Global | ✅ Yes | ❌ No |
| Saddle points | ❌ None | ⚠️ Many |
| Examples | Linear regression, SVM | Neural networks |
Related questions
- Derive the gradient of the cross-entropy loss for softmax output.
- What are gradients, Jacobians, and Hessians? When do you use each in ML?
- What is gradient descent? Explain the intuition behind it.
- What is the vanishing/exploding gradient problem? How do modern architectures solve it?
- Explain learning rate scheduling strategies. Which are most effective?