Unconstrained Optimization
Formulation, Algorithms, and Non-Smooth Methods
This page covers the foundations of unconstrained optimization, ranging from basic optimality conditions and least squares to advanced descent algorithms (Newton, SGD, Adam) and non-smooth techniques like Proximal Gradient Descent.
Based on the course "Unconstrained optimization" by Pr. Pierre Hellier (Université de Rennes / Inria).
1. Formulation and Optimality
The goal is to find a vector that minimizes a loss function over the entire domain .
Optimality Conditions
To identify potential minima, we analyze derivatives.
-
First-Order Necessary Condition If is a local minimum, the gradient must be zero (stationary point):
-
Second-Order Sufficient Condition If and the Hessian matrix is positive definite, then is a strict local minimum.
If the function is convex, any local minimum is automatically a global minimum.
2. Least Squares Problems
A classic optimization problem involves predicting a target from features via a linear model .
Ordinary Least Squares (OLS)
Minimize the sum of squared errors:
Analytic Solution: The gradient is . Setting it to zero yields the Normal Equations:
Regularized Least Squares
To prevent overfitting or handle ill-posed problems (), we add a penalty term .
- Ridge (L2)
- Lasso (L1)
Minimizes .
Solution:
Shrinks coefficients towards zero, handling multicollinearity and invertibility issues.
Minimizes .
Effect: Enforces sparsity (sets many coefficients exactly to 0), performing feature selection.
Note: The L1 norm is non-differentiable at 0, requiring specific algorithms.
3. Descent Algorithms
Iterative methods update the solution step-by-step:
where is the descent direction and is the step size (learning rate).
Gradient & Newton Methods
| Method | Direction | Complexity | Convergence |
|---|---|---|---|
| Gradient Descent | Linear | ||
| Newton's Method | Quadratic | ||
| Quasi-Newton (BFGS) | Superlinear |
- Fixed: Simple but sensitive (too small = slow, too large = diverge).
- Lipschitz: if gradient is -Lipschitz.
- Line Search: Backtracking to satisfy Wolfe conditions (ensure sufficient decrease).
Stochastic Gradient Descent (SGD)
When data size is huge, computing the full gradient is expensive. SGD approximates it using a single sample (or mini-batch).
Advanced Optimizers
- Momentum: Adds a "velocity" term to smooth oscillations and accelerate convergence.
- RMSProp: Adapts learning rates based on moving average of squared gradients.
- Adam: Combines Momentum and RMSProp. State-of-the-art for Deep Learning.
4. Non-Smooth Optimization
When the objective includes non-differentiable terms (like Lasso's L1 norm), standard gradient descent fails. We use Proximal methods.
Proximal Operator
The proximal operator maps a point to a nearby location that minimizes the non-smooth function :
For Lasso (), this is the Soft Thresholding operator:
Algorithms
ISTA (Iterative Soft-Thresholding Algorithm)
Combines a gradient step on the smooth part () with a proximal step on the non-smooth part ().
FISTA (Fast ISTA)
Applies Nesterov's acceleration to ISTA, achieving significantly faster convergence ( vs ).