Optimization Problems
Contents
Optimization Problems#

Imagine yourself standing in the middle of a vast, rugged mountain landscape. Your goal is to reach the lowest point in this terrain—a hidden valley where the air is still. Easy, you might think. I’ll just look at the map and see where the lowest point is. But what if the map is infinitely big? And what if the mountain landscape is in a high-dimensional hyperspace, where you can’t see anything but three dimensional projections of this hyperspace? The optimization challenges in machine learning are a bit like that: the task to find the lowest valley an infinitely large space extending within hundreds of dimensions. What we need to solve this task is to get some hints where to look for the valley, and this is what optimization theory can deliver.
We start with looking at vanilla optimization problems that consist only of an objective function that is to be minimized, having no additional constraints on the solution.
Unconstrained Optimization Problems#
We define an optimization problem, also called the objective as follows.
Definition 5 (unconstrained optimization objective)
Given an objective function \(f:\mathbb{R}^n\rightarrow \mathbb{R}\), the objective of an unconstrained optimization problem is:
\(\displaystyle \vvec{x}^*\in\argmin_{x\in\mathbb{R}^n}f(\vvec{x})\) is a minimizer
\(\displaystyle \min_{\vvec{x}\in\mathbb{R}^n}f(\vvec{x})\) is the minimum
A minimizer can be local or global. Following our analogy, the global minimizer is the lowest valley and a local minimizer can be any valley.
Definition 6 (minimizers)
Given an unconstrained objective as defined above. A global minimizer is a vector \(\vvec{x}^*\) satisfying
In an unconstrained optimization problem, the minimizers are the points where the function does not decrease in any direction. These points are a subset of the stationary points, which can be identified analytically or by numerical optimization methods (to be discussed later).
Constrained Optimization Problems#
Definition 7 (Constrained Objective)
Given an objective function \(f:\mathbb{R}^d\rightarrow \mathbb{R}\) and constraint functions \(c_i,g_k:\mathbb{R}^d\rightarrow \mathbb{R}\), then the objective of a constrained optimization problem is
We call the set of vectors satisfying the constraints the feasible set:
Adding constraints to an optimization problem often makes it more challenging. Now, there are two types of minimizers to consider:
Interior Minimizers: Points that lie in a “valley” of the objective function, where the function value only increases or remains the same when moving in any direction.
Boundary Minimizers: Points on the edge of the feasible set, where the function value increases or stays the same when moving inward along the feasible region (the function value might decrease when moving out of the feasible set).
Boundary minimizers can be difficult to identify because traditional methods like the First-Order Necessary Condition (FONC) do not directly apply. However, by using the Lagrangian approach, we can transform a constrained objective into an (almost) unconstrained one, making it possible to find solutions at the boundary.
Definition 8 (Lagrangian)
Given a constrained optimization objective as in Definition 7, then the Lagrangian function is defined as
The Lagrangian introduces an adversarial approach to handling constraints. We remove the constraints on \(\vvec{x}\), allowing us to minimize over all \(\vvec{x}\in\mathbb{R}^d\), while simultaneously maximizing over the Lagrange multipliers \(\bm\lambda\in\mathbb{R}^m\) and \(\bm\mu\geq\vvec{0}\).
Imagine a scenario where you are trying to minimize the Lagrangian by adjusting \(\vvec{x}\), while an “adversary” seeks to maximize it by adjusting \(\bm\lambda\) and \(\bm\mu\). If \(\vvec{x}\) lies outside the feasible set, the adversary can exploit this by driving up the Lagrangian value. For instance, if a constraint \(c_i(\vvec{x})=0.1\neq 0\) is unmet, the adversary could set \(\lambda_i=-10000\), raising the Lagrangian by \(-(-10000)\cdot 0.1=1000\).
To prevent these large increases, we need to ensure \(\vvec{x}\) is within the feasible set, effectively limiting the adversary’s ability to inflate the Lagrangian.
The Lagrangian can be used to transform the primal problem, which is the original unconstrained objective from Definition 7, to the dual problem.
Definition 9 (Dual Problem)
Given a primal optimization objective as defined in Definition 7, we define the dual objective function \(\mathcal{L}_{dual}\), returning the minimum (infimum to be precise) of the Lagrangian, given any \(\bm\lambda,\bm\mu\geq\vvec{0}\):
Note
The defintion of the dual objective uses the infimum and not the minimum, because there might be some cases where you don’t reach the minimum of the Lagrangian for any specific \(\vvec{x}\), but only in a limit, e.g. \(\vvec{x}\rightarrow\infty\). The infimum returns then the minimum in the limit. If you’re not familiar with the concept of the infimum, you can think of it as the minimum.
The solution to the dual objective are saddle points: points \((\vvec{x},\bm\lambda,\bm\mu)\) that minimize the Lagrangian subject to \(\vvec{x}\) and maximize it subject to \((\bm\lambda,\bm\mu)\).
We can easily show that the Lagrangian forms a lower bound of the objective function. For feasible \(\vvec{x}\in\mathcal{C}\) and \(\bm\lambda\in\mathbb{R}^m,\bm\mu\in\mathbb{R}^l\), \(\bm\mu\geq \vvec{0}\) we have