Our study of the computational complexity of mathematical optimization led us to realize that we are still far from a complete understanding of *what exactly* can be optimized with a computer.

On the positive side we proved that some problems can be solved in reasonable time: An optimization problem with convex objective and relatively simple constraint set (see previous lectures) can be efficiently solved with either the ellipsoid method, or interior point methods (and the typical running time was something like $latex {O(n^3)}&fg=000000$ for optimization in dimension $latex {n}&fg=000000$).

On the negative side we defined the notion of $latex {\mathbf{NP}}&fg=000000$-completeness to show that some problems are intrinsically hard, such as computing the size of the largest clique in a graph, or computing the maximal cut of a graph. We also explained why such results have to be taken with a grain of salt, as it does not necessarily mean that approximate solutions are hard to find.

Note that at this point the reader might be either disappointed, or excited that there is still so much that remains to be discovered!

Another issue with what we discussed so far is that both the ellipsoid method and interior point methods are *intractable* in *very high dimension*. Indeed, while from a computational complexity point of view a time in $latex {O(n^3)}&fg=000000$ is good enough, in pratice this is way too big when $latex {n}&fg=000000$ is in the order of millions, or billions, which is the order of magnitude in ‘Big Data’ applications! In that case one may want to restrict to optimization procedures that run in *linear time* (or almost linear time), that is in time $latex {O(n)}&fg=000000$.

In this second part of the course we will describe a theory that addresses both concerns: it is a *complete* theory of optimization in the sense that within the restricted model that we consider we will prove both upper and lower complexity bounds (and they will match!), and it also naturally leads to algorithms that work in linear time, and which are thus well-suited for large-scale optimization. This is the theory of black-box optimization.

**Black-box optimization, oracle complexity**

In the black-box model one tries to minimize an unknown function $latex {f}&fg=000000$ over a known constraint set $latex {\mathcal{X} \subset {\mathbb R}^n}&fg=000000$. One can get information about the unknown function through queries to *oracles*:

- $latex {0^{th}}&fg=000000$-order oracle: given $latex {x \in \mathcal{X}}&fg=000000$ it outputs $latex {f(x)}&fg=000000$.
- $latex {1^{st}}&fg=000000$-order oracle: if $latex {f}&fg=000000$ is differentiable (respectively $latex {f}&fg=000000$ convex) then given $latex {x \in \mathcal{X}}&fg=000000$ it outputs a gradient $latex {\nabla f(x)}&fg=000000$ (respectively a subgradient $latex {g \in \partial f(x)}&fg=000000$).

In the following we are essentially restricting our attention to optimization procedure that have access to both $latex {0^{th}}&fg=000000$-order and $latex {1^{st}}&fg=000000$-order oracles. A black-box optimization procedure is simply a sequence (over $latex {t=0,1, \hdots}&fg=000000$) of mappings $latex {\phi_t: \mathcal{X}^t \times ({\mathbb R}^n)^t \times {\mathbb R}^t \rightarrow \mathcal{X}}&fg=000000$. The algorithm given by these mappings runs iteratively as follows: initially it makes a query to the point $latex {x_0 =\phi_0(\emptyset)}&fg=000000$, and then at the $latex {t^{th}}&fg=000000$ step it queries

$latex \displaystyle x_t = \phi_t(x_0, \hdots, x_{t-1}, \nabla f(x_0), \hdots, \nabla f(x_{t-1}), f(x_0), \hdots, f(x_{t-1})) .&fg=000000$

The minimax oracle optimization error after $latex {t}&fg=000000$ steps, over a set of functions $latex {\mathcal{F}}&fg=000000$, is defined as follows:

$latex \displaystyle \mathrm{OC}_t(\mathcal{F}) = \inf_{\phi_0, \hdots, \phi_t} \sup_{f \in \mathcal{F}} \left( f(x_t) – \inf_{x \in \mathcal{X}} f(x) \right).&fg=000000$

Intuitively $latex {\mathrm{OC}_t(\mathcal{F})}&fg=000000$ describes the best possible rate of convergence (as a function of the number of queries) for the optimization error when one restricts to black-box procedures that only know the constraint set $latex {\mathcal{X}}&fg=000000$ and the class of functions $latex {\mathcal{F}}&fg=000000$. We will derive both lower bounds for the oracle optimization error (with ‘information-theoretic’ arguments), and upper bounds (with explicit algorithms), for various set of convex functions $latex {\mathcal{F}}&fg=000000$ of interest (essentially smooth/non-smooth, and strongly convex/non-strongly convex). In the literature the results are often stated in terms of *oracle complexity*, which is the smallest $latex {T_{\epsilon}}&fg=000000$ such that $latex {\mathrm{OC}_{T_{\epsilon}}(\mathcal{F}) \leq \epsilon}&fg=000000$. We may use interchangeably the notions of oracle complexity and oracle optimization error.

The oracle complexity tells us nothing a priori about computational complexity. Indeed in the definition of the minimax oracle optimization we made no restriction on the mappings $latex {\phi_t}&fg=000000$, and these mappings could be hard to compute. This complaint is of course valid, especially for the lower bounds. On the other hand for the upper bounds we will also discuss the computational complexity of the black-box optimization procedures that we describe.

We have already studied one black-box optimization procedure: the ellipsoid method. We proved an upper bound on the oracle optimization error for the ellipsoid method on bounded convex functions (over a convex body) of order $latex {O(\exp(- t / n^2))}&fg=000000$. This bound does not look good with respect to our objective of finding linear time algorithms: here the number of calls to the oracle needs to be at least $latex {O(n^2)}&fg=000000$ to attain reasonnable accuracy, and each call requires to manipulate vectors in $latex {{\mathbb R}^n}&fg=000000$, which leads to a lower computational complexity bound of $latex {O(n^3)}&fg=000000$. In fact, more generally, we can see that our only hope to obtain linear time algorithms is to have an oracle complexity bound which is independent (or almost independent) of the dimension $latex {n}&fg=000000$. Thus in the following we will restrict our attention to this high-dimensional setting, where we strive for oracle complexity bounds almost independent of the dimension. Note that this also the reason why we restrict to $latex {0^{th}}&fg=000000$ and $latex {1^{st}}&fg=000000$-order oracles: just looking at the answer from higher order oracles would take too much computational effort.

Note that interior-point methods are *not* black-box optimization procedures. Indeed typically one reduces the problem $latex {\min_{x \in \mathcal{X}} f(x)}&fg=000000$ to $latex {\min_{(x,t) \in \mathrm{epi}(f)} t}&fg=000000$, and then one constructs a self-concordant barrier $latex {F}&fg=000000$ for the set $latex {\mathrm{epi}(f)}&fg=000000$. In particular the barrier $latex {F}&fg=000000$ ‘encodes’ some *global* property of the function we are trying to minimize, on the contrary to the $latex {0^{th}}&fg=000000$ and $latex {1^{st}}&fg=000000$ order oracle which give only *local* information on the function. The fact that interior-point methods exploit the global structure of the function at hand is the reason for their success! But it is also what makes them computationally more intensive than black-box procedures.

**Examples of large-scale optimization problems**

Let us come back to our classification problem, with pairs of points $latex {(x_i, y_i) \in {\mathbb R}^n \times \{-1,1\}}&fg=000000$, $latex {i=1, \hdots, m}&fg=000000$. Assuming that the data set was linearly separable we considered the following optimization problem to find a separating hyperplane maximizing the margin:

$latex \displaystyle \begin{array}{rcl} & \min_{w \in {\mathbb R}^n} & \|w\|^2 \\ & \text{subject to} & y_i w^{\top} x_i \geq 1, i =1, \hdots, m . \end{array} &fg=000000$

Of course the assumption that the data set is linearly separable is unrealistic, especially when one has a very large number of examples (that is $latex {m}&fg=000000$ is very large). In that case one may want to allow for the constraint $latex {y_i w^{\top} x_i \geq 1}&fg=000000$ to be violated with a price to pay in the objective function for such an error. A natural idea is to have a fixed price $latex {\lambda >0}&fg=000000$ for this error, leading to the following optimization problem:

$latex \displaystyle \min_{w \in {\mathbb R}^n} \|w\|^2 + \lambda \sum_{i=1}^m \mathbf{1} \{y_i w^{\top} x_i < 1\} .&fg=000000$

The above optimization problem is non-convex because the *loss function* $latex {\ell(s) = \mathbf{1} \{s < 1\}}&fg=000000$ is non-convex. As a result we do not know how to solve this optimization problem. At this point it seems natural to find convex surrogate loss functions for the zero-one loss.

**Hinge loss**

Perhaps the simpler convex surrogate for the zero-one loss is the hinge loss $latex {\ell(s) = \max(0, 1-s)}&fg=000000$ which leads to the following convex problem:

$latex \displaystyle \min_{w \in {\mathbb R}^n} \|w\|^2 + \lambda \sum_{i=1}^m \max(0, 1-y_i w^{\top} x_i) .&fg=000000$

Note that this problem is unconstrained, and the objective function is convex, non-smooth (it has ‘kinks’), and it has ‘curvature’ everywhere because of the term $latex {\|w\|^2}&fg=000000$ (in other words it is strongly convex).

**Logistic loss**

Another possible convex surrogate with nicer properties is the logistic loss $latex {\ell(s) = \log(1 + \exp(-s))}&fg=000000$ which leads to the following convex problem:

$latex \displaystyle \min_{w \in {\mathbb R}^n} \|w\|^2 + \lambda \sum_{i=1}^m \log(1 + \exp(- y_i w^{\top} x_i)) .&fg=000000$

Note that this problem is unconstrained, and the objective function is smooth and strongly-convex.

**Sparse least-squares regression**

Consider now the case where $latex {y_i}&fg=000000$ can take any real value (instead of just $latex {\{-1,1\}}&fg=000000$). In that case a standard objective to minimize is the sum of squared errors when one predicts $latex {y_i}&fg=000000$ with $latex {w^{\top} x_i}&fg=000000$, that is:

$latex \displaystyle \min_{w \in {\mathbb R}^n} \sum_{i=1}^m (y_i – w^{\top} x_i)^2 .&fg=000000$

Note that this can be rewritten as (with obvious notation):

$latex \displaystyle \min_{w \in {\mathbb R}^n} \| X w – Y \|_2^2 .&fg=000000$

In a high-dimensional setting (that is $latex {n}&fg=000000$ is large) we might be interested in restricting to predictors $latex {w}&fg=000000$ which contain only a few non-zero entries. Indeed in that case the resulting $latex {w}&fg=000000$ would allow us to *interpret* the results more easily: to predict $latex {y}&fg=000000$ only the coordinates of $latex {x}&fg=000000$ where $latex {w}&fg=000000$ is non-zero are important. A natural optimization problem here is to minimize the sum of squared errors, with a penalization for predictors $latex {w}&fg=000000$ with a large number of non-zero coefficients, that is

$latex \displaystyle \min_{w \in {\mathbb R}^n} \| X w – Y \|_2^2 + \lambda \|w\|_0.&fg=000000$

Again we run into the issue that $latex {w \mapsto \|w\|_0}&fg=000000$ is a non-convex function. A natural convex surrogate that has been used extensively in the last decade is the $latex {\ell_1}&fg=000000$-penalization, leading to the LASSO objective:

$latex \displaystyle \min_{w \in {\mathbb R}^n} \| X w – Y \|_2^2 + \lambda \|w\|_1.&fg=000000$

**Portfolio optimization, sparse portfolio**

Consider the problem of investing a capital of $latex {\$1}&fg=000000$ into $latex {n}&fg=000000$ assets. This amounts to choosing a portfolio $latex {w \in {\mathbb R}^n_+}&fg=000000$ such that $latex {\sum_{i=1}^n w_i = 1}&fg=000000$. Now assume that we have access to the vector of returns for the $latex {n}&fg=000000$ assets over $latex {T}&fg=000000$ trading days, which we denote $latex {r_1, \hdots, r_T}&fg=000000$. This means that if every day we re-invest our capital according to $latex {w}&fg=000000$, then at the end of the $latex {T^{th}}&fg=000000$ day we would have a capital of

$latex \displaystyle \prod_{t=1}^T w^{\top} r_t .&fg=000000$

In portfolio optimization one is interested in finding the portfolio that would have maximized our return, which is equivalent to the following convex problem:

$latex \displaystyle \min_{w \in {\mathbb R}^n_+, \sum_{i=1}^n w_i = 1} \sum_{t=1}^T – \log \left(w^{\top} r_t\right) .&fg=000000$

If one wants to add a sparsity constraint on the portfolio one cannot simply add a penalization in terms of the $latex {\ell_1}&fg=000000$-norm of $latex {w}&fg=000000$ (since it is always equal to $latex {1}&fg=000000$). A possible alternative is to solve, for some fixed $latex {p \in (1,2)}&fg=000000$,

$latex \displaystyle \min_{w \in {\mathbb R}^n_+, \sum_{i=1}^n w_i = 1} \sum_{t=1}^T – \log \left(w^{\top} r_t\right) + \lambda \|w\|_p.&fg=000000$

## By Nicholas Johnson April 5, 2013 - 3:38 pm

If we want our portfolio to be sparse and update occasionally, we can simply add a L1 norm of the difference between w_t and w_{t+1}.

## By Sebastien Bubeck April 9, 2013 - 8:32 pm

That’s a good idea indeed!! I’ll make sure to add this comment in the final version of the lecture notes.