Convex Analysis for Bandits

The convex-analysis toolkit behind adversarial linear bandit algorithms (mirror descent, follow-the-regularised-leader). Convex sets, convex hulls, extended-real-valued convex functions via epigraphs, domains and properness, strict convexity, Hessian characterisation, the Fenchel dual and biduality; Jensen's inequality with a graphical proof; the Bregman divergence (nonnegativity, convexity in its first argument, squared Euclidean and unnormalised-negentropy/relative-entropy examples); Legendre functions ("dishes" with ever-steepening edges), gradient maps as bijections inverse to the dual's, duality of Bregman divergences, and interior minimisers; exact second-order (Hessian) forms of Bregman divergences and the key inequality ⟨x−y,u⟩ − D_f(x,y)/η ≤ (η/2)‖u‖²_{(∇²f)⁻¹}; first-order optimality for constrained convex problems; Bregman projections and the generalised Pythagorean inequality. Worked duals for −2Σ√x and the negentropy.

· 18 min read · 3,592 words

Corresponds to Lattimore & Szepesvári, Part VI introduction and Chapter 26.

Motivation: why bandits need convex analysis

IntuitionWhere Part VI is headed

The adversarial linear bandit looks like the stochastic linear bandit with θ\theta chosen by an adversary. Its algorithms combine optimal design (Chapter 21) with exponential weights (Chapter 11). But the two models differ in subtle ways (Chapter 29), and with large or infinite action sets Exp3-style algorithms are computationally hopeless. The efficient alternatives, mirror descent and follow-the-regularised-leader (adversarial-linear-bandits), are built from the objects in this note:

ToolRole in the algorithms
Convex functions and Jensenregret bounds, potential arguments
Fenchel dualmoving between “primal” (actions) and “dual” (gradients/scores)
Bregman divergencethe problem-adapted “distance” that replaces 12∥x−y∥2\frac12\lVert x - y\rVert^2
Legendre functionsregularisers whose gradient map is invertible and keeps iterates inside the domain
First-order optimalitycharacterising each update step
Bregman projectionspulling an update back into the feasible set

NoteScope

Extremely brief: definitions and statements, with standard texts (Rockafellar, Convex Analysis; Boyd–Vandenberghe) for most proofs. Topological terms (interior, closed, boundary) are recalled in Notes.


Convex sets and functions

DefinitionConvex set and convex hull

A⊆RdA\subseteq\mathbb R^d is convex if αx+(1−α)y∈A\alpha x + (1-\alpha)y\in A for all x,y∈Ax,y\in A and α∈(0,1)\alpha\in(0,1). The convex hull co(A)\mathrm{co}(A) is the smallest convex set containing AA. For finitely many points,

co(x1,…,xn)={∑i=1npixi:p∈Pn−1}\mathrm{co}(x_1, \ldots, x_n) = \Big\{\sum_{i=1}^np_ix_i : p\in\mathcal P_{n-1}\Big\}

(all mixtures). Compare the convex-hull reduction for lower bounds.

DefinitionConvex function (Def. 26.1)

Work on the extended reals Rˉ=R∪{±∞}\bar{\mathbb R} = \mathbb R\cup\{\pm\infty\}. A function f:Rd→Rˉf : \mathbb R^d\to\bar{\mathbb R} is convex if its epigraph

Ef={(x,y)∈Rd×R:y≥f(x)}E_f = \{(x,y)\in\mathbb R^d\times\mathbb R : y\ge f(x)\}

is a convex set (“epi” = upon: the points sitting on top of the graph).

TermMeaning
Domaindom(f)={x:f(x)<∞}\mathrm{dom}(f) = \{x : f(x) < \infty\}
Restriction conventionf:S→Rˉf : S\to\bar{\mathbb R} is extended by +∞+\infty off SS, so a real-valued ff on SS has dom(f)=S\mathrm{dom}(f) = S: constraints become infinite values
Propernever −∞-\infty, and nonempty domain
”Let ff be convex”from now on: f:Rd→Rˉf : \mathbb R^d\to\bar{\mathbb R} proper convex
Strictly convexthe inequality below is always strict
Concave−f-f is convex

FormulaThe familiar inequality

For convex ff, all x,yx,y (with the infinity arithmetic) and α∈(0,1)\alpha\in(0,1),

f(αx+(1−α)y)≤αf(x)+(1−α)f(y)(26.1)f(\alpha x + (1-\alpha)y)\le\alpha f(x) + (1-\alpha)f(y) \tag{26.1}

Some authors take (26.1) plus a convex domain as the definition. Allowing the value −∞-\infty is a convenience, since some operations (infimal convolution) can produce it, but it never matters in the book.

TheoremBasic facts

  • Continuity: convex functions are continuous on int(domf)\mathrm{int}(\mathrm{dom}f) (Exercise 26.1). Discontinuities can only occur at the boundary.
  • Second-order test: if ff is twice differentiable on the interior of its domain, it is convex iff ∇2f(x)⪰0\nabla^2f(x)\succeq0 there.
  • Local is global: every local minimum of a convex function is global. This is why convex problems are (usually) efficiently solvable by gradient-type methods. (A function can have all local minima global without being convex.)

DefinitionFenchel dual (convex conjugate)

f∗(u)=sup⁡x∈Rd(⟨x,u⟩−f(x))f^*(u) = \sup_{x\in\mathbb R^d}\big(\langle x,u\rangle - f(x)\big)

It is convex as a supremum of affine functions of uu. If ff is proper convex with a closed epigraph, then f∗∗=ff^{**} = f (biduality). In general f∗∗≤ff^{**}\le f, with equality on the interior of the domain for differentiable convex ff (Exercise 26.3).

ComponentDetail
Signaturef∗:Rd→Rˉf^* : \mathbb R^d\to\bar{\mathbb R}, a function of the “slope” uu
Meaning−f∗(u)-f^*(u) is the intercept of the best affine minorant of ff with slope uu
Key propertyfor nice ff, ∇f∗=(∇f)−1\nabla f^* = (\nabla f)^{-1} (Theorem 26.6)
Fenchel–Youngf(x)+f∗(u)≥⟨x,u⟩f(x) + f^*(u)\ge\langle x,u\rangle, immediate from the definition

RemarkWe have met the dual before

  • The large-deviation rate function ψ∗\psi^* is the Fenchel dual of the cumulant-generating function (Chapter 5).
  • The method of mixtures linearised a quadratic with 12∥S∥V−12=max⁡x⟨x,S⟩−12∥x∥V2\frac12\lVert S\rVert^2_{V^{-1}} = \max_x\langle x,S\rangle - \frac12\lVert x\rVert_V^2, i.e. f∗∗=ff^{**} = f for f=12∥⋅∥V2f = \frac12\lVert\cdot\rVert_V^2 (Chapter 20).

Jensen’s inequality

TheoremTheorem 26.2 — Jensen

Let ff be measurable and convex, and XX an Rd\mathbb R^d-valued random element with E[X]\mathbb E[X] existing and X∈dom(f)X\in\mathrm{dom}(f) a.s. Then

E[f(X)]≥f(E[X])\mathbb E[f(X)]\ge f(\mathbb E[X])

The inequality reverses for concave ff. (Allowing integrals to equal ∞\infty removes the domain condition: if X∉domfX\notin\mathrm{dom}f with positive probability, the left side is ∞\infty.) (26.1) is the two-point case, and Jensen can itself serve as the definition of convexity.

ProofGraphical proof (finite support) and the general route

Finite support: let P(X=xk)=pk\mathbb P(X = x_k) = p_k and xˉ=∑kpkxk\bar x = \sum_kp_kx_k. The point (xˉ,∑kpkf(xk))(\bar x,\sum_kp_kf(x_k)) is a mixture of the points (xk,f(xk))(x_k,f(x_k)), so it lies in their convex hull, which sits inside the convex epigraph EfE_f. So it is on or above (xˉ,f(xˉ))(\bar x,f(\bar x)), which lies on the lower boundary of EfE_f.

General case (Exercise 26.2): take a supporting hyperplane to EfE_f at (x0,f(x0))(x_0,f(x_0)) with x0=E[X]x_0 = \mathbb E[X]. It gives an affine gg with g(x0)=f(x0)g(x_0) = f(x_0) and g≤fg\le f, so Ef(X)≥Eg(X)=g(EX)=f(EX)\mathbb E f(X)\ge\mathbb Eg(X) = g(\mathbb EX) = f(\mathbb EX).

∎

NoteUsed throughout

Gibbs’ inequality, data processing, concavity of entropy (Cover & Thomas), moving a max inside an expectation (the adversarial-to-stochastic reduction), and the Bretagnolle–Huber proof all rest on Jensen.


Bregman divergence

DefinitionBregman divergence induced by ff

For convex ff and y∈dom(f)y\in\mathrm{dom}(f),

Df(x,y)=f(x)−f(y)−∇x−yf(y)D_f(x,y) = f(x) - f(y) - \nabla_{x-y}f(y)

where ∇vf(y)=lim⁡h→0+f(y+hv)−f(y)h∈Rˉ\nabla_vf(y) = \lim_{h\to0^+}\frac{f(y + hv) - f(y)}h\in\bar{\mathbb R} is the directional derivative, which always exists for convex ff but may be infinite. If ff is differentiable at yy,

Df(x,y)=f(x)−f(y)−⟨x−y,∇f(y)⟩D_f(x,y) = f(x) - f(y) - \langle x - y,\nabla f(y)\rangle

dom(∇f)\mathrm{dom}(\nabla f) denotes the points where ff is differentiable.

IntuitionThe error of the tangent-plane approximation

Df(x,y)D_f(x,y) is how far f(x)f(x) sits above the first-order Taylor approximation of ff built at yy. For convex ff the tangent plane is a global under-estimator, so the gap is nonnegative. Curvature makes it large: flat directions of ff contribute nothing.

TheoremTheorem 26.3 — Basic properties

  1. Df(x,y)≥0D_f(x,y)\ge0 for all y∈dom(f)y\in\mathrm{dom}(f).
  2. Df(x,x)=0D_f(x,x) = 0 for x∈dom(f)x\in\mathrm{dom}(f).
  3. x↦Df(x,y)x\mapsto D_f(x,y) is convex for every y∈dom(∇f)y\in\mathrm{dom}(\nabla f).

Part 3 can fail if ff isn’t differentiable at yy (Exercise 26.14). Df\sqrt{D_f} behaves somewhat like a metric, and is one for some ff, but in general DfD_f is asymmetric and violates the triangle inequality.

ExampleExample 26.4 — Squared Euclidean distance

f(x)=12∥x∥22f(x) = \frac12\lVert x\rVert_2^2, ∇f(x)=x\nabla f(x) = x:

Df(x,y)=12∥x∥2−12∥y∥2−⟨x−y,y⟩=12∥x−y∥22D_f(x,y) = \frac12\lVert x\rVert^2 - \frac12\lVert y\rVert^2 - \langle x - y,y\rangle = \frac12\lVert x - y\rVert_2^2

ExampleExample 26.5 — Unnormalised negentropy gives relative entropy

f(x)=∑i(xilog⁡xi−xi)f(x) = \sum_i(x_i\log x_i - x_i) on [0,∞)d[0,\infty)^d (with 0log⁡0=00\log0 = 0), and ∇f(y)=log⁡y\nabla f(y) = \log y for y>0y > 0:

Df(x,y)=∑ixilog⁡xiyi+∑i(yi−xi)D_f(x,y) = \sum_ix_i\log\frac{x_i}{y_i} + \sum_i(y_i - x_i)

On the simplex the second sum vanishes and Df(x,y)D_f(x,y) is exactly the relative entropy D(x∥y)D(x\Vert y). If some yi=0<xiy_i = 0 < x_i, the divergence is infinite. This regulariser drives exponential weights: mirror descent with it on the simplex is Exp3/Hedge.


Legendre functions

DefinitionLegendre function

Let ff be convex with A=dom(f)A = \mathrm{dom}(f) and C=int(A)C = \mathrm{int}(A). Then ff is Legendre if

  1. C≠∅C\ne\emptyset;
  2. ff is differentiable and strictly convex on CC;
  3. ∥∇f(xn)∥2→∞\lVert\nabla f(x_n)\rVert_2\to\infty for every sequence in CC converging to a point of ∂C\partial C.

IntuitionA dish with ever-steepening edges

The graph of a Legendre function is a bowl whose walls become vertical at the boundary of its domain, as with −x-\sqrt x at 0. Minimising such a function (plus anything linear) can never land on the boundary, so iterates of mirror descent stay strictly inside the domain automatically, for example keeping all probabilities positive.

TheoremTheorem 26.6 — Duality for Legendre functions

If ff is Legendre:

  1. ∇f\nabla f is a bijection from int(domf)\mathrm{int}(\mathrm{dom}f) to int(domf∗)\mathrm{int}(\mathrm{dom}f^*), with inverse (∇f)−1=∇f∗(\nabla f)^{-1} = \nabla f^*;
  2. Df(x,y)=Df∗(∇f(y),∇f(x))D_f(x,y) = D_{f^*}(\nabla f(y),\nabla f(x)) for x,y∈int(domf)x,y\in\mathrm{int}(\mathrm{dom}f) (note the swapped order);
  3. f∗f^* is Legendre.

ImportantMirror maps

∇f\nabla f maps a point (for example a distribution over actions) to its “dual” coordinates (for example log-weights or scores). ∇f∗\nabla f^* maps back. Mirror descent takes gradient steps in the dual space and maps back: a step that would be awkward in the primal (staying in the simplex) is trivial in the dual.

TheoremProposition 26.7 and Corollary 26.8 — No minimisers on the boundary

If ff is Legendre, x∈int(domf)x\in\mathrm{int}(\mathrm{dom}f) and y∈∂ int(domf)y\in\partial\,\mathrm{int}(\mathrm{dom}f), then lim⁡α→1⟨y−x,∇f((1−α)x+αy)⟩=∞\lim_{\alpha\to1}\langle y - x,\nabla f((1-\alpha)x + \alpha y)\rangle = \infty: along any straight path to the boundary, the slope blows up. Hence any minimiser of ff over dom(f)\mathrm{dom}(f) lies in the interior (Exercise 26.6).

ExampleExample 26.9 — The self-dual case

f=12∥⋅∥22f = \frac12\lVert\cdot\rVert_2^2 on Rd\mathbb R^d: f∗=ff^* = f, and ∇f=∇f∗=id\nabla f = \nabla f^* = \mathrm{id}. There is no boundary, so condition 3 holds vacuously.

ExampleExample 26.10 — f(x)=−2∑ixif(x) = -2\sum_i\sqrt{x_i} on [0,∞)d[0,\infty)^d (Exercise 26.8)

∇f(x)=−1/x\nabla f(x) = -1/\sqrt x (componentwise), which blows up as any xi→0x_i\to0, and ff is strictly convex, so ff is Legendre. (∥∇f∥→0\lVert\nabla f\rVert\to0 as ∥x∥→∞\lVert x\rVert\to\infty, but "∞\infty" isn’t part of the boundary.)

  • Bregman: Df(x,y)=∑i(xi−yi)2yiD_f(x,y) = \sum_i\frac{(\sqrt{x_i} - \sqrt{y_i})^2}{\sqrt{y_i}}.
  • Dual: maximise xiui+2xix_iu_i + 2\sqrt{x_i} in each coordinate. For ui<0u_i < 0 the maximiser is xi=1/ui2x_i = 1/u_i^2, giving f∗(u)=−∑i1ui  on (−∞,0)d (∞ otherwise),∇f∗(u)=1u2f^*(u) = -\sum_i\frac1{u_i}\ \text{ on }(-\infty,0)^d\ (\infty\text{ otherwise}), \qquad\nabla f^*(u) = \frac1{u^2} so dom(∇f∗)=(−∞,0)d\mathrm{dom}(\nabla f^*) = (-\infty,0)^d, and ∇f∗(∇f(x))=∇f∗(−1/x)=x\nabla f^*(\nabla f(x)) = \nabla f^*(-1/\sqrt x) = x.
  • Dual Bregman: Df∗(u,v)=−∑i(ui−vi)2uivi2D_{f^*}(u,v) = -\sum_i\frac{(u_i - v_i)^2}{u_iv_i^2}. Check of Theorem 26.6(2): with u=−1/yu = -1/\sqrt y and v=−1/xv = -1/\sqrt x, this equals ∑(x−y)2/y=Df(x,y)\sum(\sqrt x - \sqrt y)^2/\sqrt y = D_f(x,y).

This regulariser underlies the O(nk)O(\sqrt{nk}) Tsallis-INF-type bandit algorithms that remove Exp3’s log⁡k\sqrt{\log k}. (Computations worked here.)

ExampleExample 26.11 — Unnormalised negentropy (Exercise 26.9)

∇f(x)=log⁡x\nabla f(x) = \log x blows up at the boundary and ff is strictly convex, so ff is Legendre. Its dual is

f∗(u)=∑ieui,∇f∗(u)=eu,dom(∇f∗)=Rdf^*(u) = \sum_ie^{u_i}, \qquad\nabla f^*(u) = e^u, \qquad\mathrm{dom}(\nabla f^*) = \mathbb R^d

(maximise xiui−xilog⁡xi+xix_iu_i - x_i\log x_i + x_i at xi=euix_i = e^{u_i}), and

Df∗(u,v)=∑i(evi(vi−ui)+eui−evi)D_{f^*}(u,v) = \sum_i\Big(e^{v_i}(v_i - u_i) + e^{u_i} - e^{v_i}\Big)

The mirror map is “log weights ↔ weights”: exactly the exponential-weights update. (Dual computed here.)

ExampleWhich functions are Legendre? (Exercise 26.4)

ff on domainLegendre?Reason
x2x^2 on [−1,1][-1,1]Nogradient stays bounded at ±1\pm1
−x-\sqrt x on [0,∞)[0,\infty)Yesthe archetype
log⁡(1/x)\log(1/x), f(0)=∞f(0) = \inftyYesdomain (0,∞)(0,\infty); f′(x)=−1/x→−∞f'(x) = -1/x\to-\infty at 0
xlog⁡xx\log x on [0,∞)[0,\infty)Yesf′=log⁡x+1→−∞f' = \log x + 1\to-\infty at 0
∣x∣\lvert x\rvert on R\mathbb RNoneither differentiable nor strictly convex
max⁡{∣x∣,x2}\max\{\lvert x\rvert,x^2\} on R\mathbb RNoequals ∣x∣\lvert x\rvert on [−1,1][-1,1]: kink at 0, linear pieces

(Answers worked here.) Adding a linear term preserves Legendre-ness (Exercise 26.10).

Bregman divergences as local quadratics

FormulaSecond-order intuition

With g(y)=Df(x,y)g(y) = D_f(x,y): g(x)=0g(x) = 0, ∇g(x)=0\nabla g(x) = 0, and the Hessian at xx is ∇2f(x)\nabla^2f(x), so Df(x,y)≈12∥y−x∥∇2f(x)2D_f(x,y)\approx\frac12\lVert y - x\rVert^2_{\nabla^2f(x)}. Locally, a Bregman divergence is a squared norm in the Hessian’s geometry. The approximation can be poor when x,yx, y are far apart.

TheoremTheorem 26.12 — Exact Hessian form

If ff is convex and twice differentiable on A=int(domf)A = \mathrm{int}(\mathrm{dom}f) and x,y∈Ax,y\in A, then for some zz on the segment [x,y][x,y],

Df(x,y)=12(x−y)⊤∇2f(z)(x−y)(26.2)D_f(x,y) = \frac12(x - y)^\top\nabla^2f(z)(x - y) \tag{26.2}

If ∇2f\nabla^2f is continuous, z=g(x,y)z = g(x,y) can be chosen measurably, by a measurable-selection theorem (Kuratowski–Ryll-Nardzewski; Exercise 26.15). This matters when x,yx, y are random. With ∇2f(z)≻0\nabla^2f(z)\succ0 this is 12∥x−y∥∇2f(z)2\frac12\lVert x - y\rVert^2_{\nabla^2f(z)}.

TheoremTheorem 26.13 — The key inequality for mirror descent

Let η>0\eta > 0 and ff Legendre and twice differentiable with ∇2f≻0\nabla^2f\succ0 on A=int(domf)A = \mathrm{int}(\mathrm{dom}f). For all x,y∈Ax,y\in A and u∈Rdu\in\mathbb R^d, there is z∈[x,y]z\in[x,y] with

⟨x−y,u⟩−Df(x,y)η≤η2∥u∥(∇2f(z))−12\langle x - y,u\rangle - \frac{D_f(x,y)}\eta\le\frac\eta2\lVert u\rVert^2_{(\nabla^2f(z))^{-1}}

ProofCauchy–Schwarz in the Hessian norm, then maximise a quadratic

Pick zz with Df(x,y)=12∥x−y∥H2D_f(x,y) = \frac12\lVert x - y\rVert_H^2, H=∇2f(z)H = \nabla^2f(z). Then ⟨x−y,u⟩≤∥x−y∥H∥u∥H−1=∥u∥H−12Df(x,y)\langle x - y,u\rangle\le\lVert x - y\rVert_H\lVert u\rVert_{H^{-1}} = \lVert u\rVert_{H^{-1}}\sqrt{2D_f(x,y)}, so the left side is at most as−bs2a s - b s^2 with s=2Dfs = \sqrt{2D_f}, a=∥u∥H−1a = \lVert u\rVert_{H^{-1}} and b=12ηb = \frac1{2\eta}. Use max⁡s(as−bs2)=a24b=η2∥u∥H−12\max_s(as - bs^2) = \frac{a^2}{4b} = \frac\eta2\lVert u\rVert^2_{H^{-1}}.

∎

IntuitionGain versus movement cost

⟨x−y,u⟩\langle x - y,u\rangle is how much a step from yy to xx gains against a loss vector uu; Df(x,y)/ηD_f(x,y)/\eta is the price of moving. The net benefit is bounded by η×\eta\times the local dual norm of uu. In bandit analyses uu is an importance-weighted loss estimate, and the regulariser’s Hessian at the current point is exactly what tames its variance. This is the generalisation of ∑jPtjX^tj2\sum_jP_{tj}\hat X_{tj}^2 in the Exp3 proof: for negentropy, (∇2f)−1=diag(x)(\nabla^2f)^{-1} = \mathrm{diag}(x), so ∥u∥(∇2f)−12=∑ixiui2\lVert u\rVert^2_{(\nabla^2f)^{-1}} = \sum_ix_iu_i^2.


Optimisation

TheoremFirst-order optimality

Unconstrained: for convex differentiable ff, ∇f(x)=0\nabla f(x) = 0 is necessary and sufficient for xx to be a minimiser. Constrained: for convex differentiable ff and nonempty convex AA,

x∗∈arg⁡min⁡x∈Af(x)  ⟺  ⟨x−x∗,∇f(x∗)⟩≥0  ∀x∈A(26.3)x^*\in\arg\min_{x\in A}f(x)\iff\langle x - x^*,\nabla f(x^*)\rangle\ge0\ \ \forall x\in A \tag{26.3}

IntuitionA supporting hyperplane

If ∇f(x∗)≠0\nabla f(x^*)\ne0, the hyperplane through x∗x^* with normal ∇f(x∗)\nabla f(x^*) must support AA at x∗x^*, with all of AA on the side the gradient points into. Otherwise some feasible direction makes an acute angle with −∇f(x∗)-\nabla f(x^*), and a small step along it stays in AA and decreases ff. Conversely, by convexity f(x)≥f(x∗)+⟨x−x∗,∇f(x∗)⟩≥f(x∗)f(x)\ge f(x^*) + \langle x - x^*,\nabla f(x^*)\rangle\ge f(x^*).

TheoremProposition 26.14 — Nondifferentiable and Legendre versions

For convex f:Rd→Rˉf : \mathbb R^d\to\bar{\mathbb R}, nonempty convex AA, and x∗∈dom(∇f)x^*\in\mathrm{dom}(\nabla f):

x∗∈arg⁡min⁡x∈Af(x)  ⟺  ⟨x−x∗,∇f(x∗)⟩≥0  ∀x∈A∩dom(f)(26.4)x^*\in\arg\min_{x\in A}f(x)\iff\langle x - x^*,\nabla f(x^*)\rangle\ge0\ \ \forall x\in A\cap\mathrm{dom}(f) \tag{26.4}

If ff is Legendre, any constrained minimiser automatically lies in dom(∇f)\mathrm{dom}(\nabla f) (it is interior by Corollary 26.8, and int(domf)=dom(∇f)\mathrm{int}(\mathrm{dom}f) = \mathrm{dom}(\nabla f) by Theorem 26.6), so (26.4) always applies.

RemarkAlready used

The Kiefer–Wolfowitz proof (Chapter 21) is exactly (26.3) for the concave log⁡det⁡\log\det over the simplex: maximality iff ⟨∇f(π∗),π−π∗⟩≤0\langle\nabla f(\pi^*),\pi - \pi^*\rangle\le0 for all designs π\pi.


Projections

DefinitionEuclidean and Bregman projections

ΠA(x)=arg⁡min⁡y∈A∥x−y∥22,ΠA,f(x)=arg⁡min⁡y∈ADf(y,x)\Pi_A(x) = \arg\min_{y\in A}\lVert x - y\rVert_2^2, \qquad\Pi_{A,f}(x) = \arg\min_{y\in A}D_f(y,x)

Note that the projected point goes in the first argument of DfD_f.

TheoremTheorem 26.15 — Constrained minimisation = unconstrained minimisation + projection

Let ff be Legendre, AA nonempty, closed and convex with A∩dom(f)≠∅A\cap\mathrm{dom}(f)\ne\emptyset, and suppose y~=arg⁡min⁡zf(z)\tilde y = \arg\min_zf(z) exists. Then

  1. y=arg⁡min⁡z∈Af(z)y = \arg\min_{z\in A}f(z) exists and is unique;
  2. y=arg⁡min⁡z∈ADf(z,y~)y = \arg\min_{z\in A}D_f(z,\tilde y), the Bregman projection of y~\tilde y.

The existence of y~\tilde y is needed: −x-\sqrt x is Legendre on [0,∞)[0,\infty) but has no minimiser.

IntuitionWhy this is the shape of mirror descent and FTRL

Each step minimises “linearised loss + regulariser” over the action set. Theorem 26.15 says: solve the unconstrained problem (often in closed form, via the mirror map) and then project. Since ∇f(y~)=0\nabla f(\tilde y) = 0, Df(z,y~)=f(z)−f(y~)D_f(z,\tilde y) = f(z) - f(\tilde y), so projecting y~\tilde y and minimising ff over AA are literally the same problem. Adding a linear term ⟨z,u⟩\langle z,u\rangle keeps ff Legendre (Exercise 26.10), which covers the actual updates.

ExampleNegentropy projections (Exercises 26.11–26.12)

  • Onto the simplex: for y∈(0,∞)dy\in(0,\infty)^d, arg⁡min⁡x∈Pd−1Df(x,y)=y/∥y∥1\arg\min_{x\in\mathcal P_{d-1}}D_f(x,y) = y/\lVert y\rVert_1. Normalisation is a KL projection, which is why exponential weights simply renormalise.
  • Onto the capped simplex Pd−1∩[α,1]d\mathcal P_{d-1}\cap[\alpha,1]^d (forced exploration): with yy sorted increasingly and mm the smallest index with ym(1−(m−1)α)≥α∑j≥myjy_m(1 - (m-1)\alpha)\ge\alpha\sum_{j\ge m}y_j, the projection sets the m−1m-1 smallest coordinates to α\alpha and rescales the rest proportionally: xi=(1−(m−1)α)yi/∑j≥myjx_i = (1 - (m-1)\alpha)y_i/\sum_{j\ge m}y_j for i≥mi\ge m.

TheoremGeneralised Pythagorean inequality (Exercise 26.13)

If AA is closed and convex, x∈Ax\in A, z=ΠA,f(y)z = \Pi_{A,f}(y), and ff is differentiable at yy, then

Df(x,y)≥Df(x,z)+Df(z,y)D_f(x,y)\ge D_f(x,z) + D_f(z,y)

Projecting onto a convex set only brings you closer (in DfD_f) to every point of the set, which is what makes projected steps safe in regret proofs. The differentiability assumption cannot be dropped.


Notes

ConventionInfinity arithmetic

α+∞=∞\alpha + \infty = \infty for α>−∞\alpha > -\infty; α−∞=−∞\alpha - \infty = -\infty for α<∞\alpha < \infty; α⋅(±∞)=±∞\alpha\cdot(\pm\infty) = \pm\infty for α>0\alpha > 0 (signs flip for α<0\alpha < 0); 0⋅(±∞)=00\cdot(\pm\infty) = 0; ∞−∞\infty - \infty (like α/0\alpha/0) is undefined; −∞≤α≤∞-\infty\le\alpha\le\infty.

DefinitionTopology in Rd\mathbb R^d

  • Interior point of AA: some ball Bε(x)⊆AB_\varepsilon(x)\subseteq A. int(A)\mathrm{int}(A) is the set of interior points.
  • Open: int(A)=A\mathrm{int}(A) = A. Closed: the complement is open.
  • Boundary ∂A\partial A: points every ball around which meets both AA and AcA^c (they need not lie in AA). Examples: ∂[0,∞)=∂(0,∞)={0}\partial[0,\infty) = \partial(0,\infty) = \{0\}, ∂Rn=∅\partial\mathbb R^n = \emptyset.

Quick reference

ObjectStatementNote
Convex functionepigraph convex; f(αx+(1−α)y)≤αf(x)+(1−α)f(y)f(\alpha x + (1-\alpha)y)\le\alpha f(x) + (1-\alpha)f(y)constraints as +∞+\infty
Fenchel dualf∗(u)=sup⁡x⟨x,u⟩−f(x)f^*(u) = \sup_x\langle x,u\rangle - f(x)f∗∗=ff^{**} = f (closed epigraph); Fenchel–Young
JensenEf(X)≥f(EX)\mathbb Ef(X)\ge f(\mathbb EX)supporting hyperplane
BregmanDf(x,y)=f(x)−f(y)−⟨x−y,∇f(y)⟩≥0D_f(x,y) = f(x) - f(y) - \langle x - y,\nabla f(y)\rangle\ge0asymmetric; convex in xx
Euclideanf=12∥⋅∥2⇒Df=12∥x−y∥2f = \frac12\lVert\cdot\rVert^2\Rightarrow D_f = \frac12\lVert x - y\rVert^2self-dual
Negentropyf=∑xlog⁡x−x⇒Df=∑xlog⁡xy+y−xf = \sum x\log x - x\Rightarrow D_f = \sum x\log\frac xy + y - xKL on the simplex; f∗=∑euf^* = \sum e^u
−2∑x-2\sum\sqrt xDf=∑(x−y)2yD_f = \sum\frac{(\sqrt x - \sqrt y)^2}{\sqrt y}; f∗=−∑1/uf^* = -\sum1/uTsallis-type regulariser
Legendrestrictly convex, differentiable, gradient blows up at boundaryminimisers interior
Duality∇f∗=(∇f)−1\nabla f^* = (\nabla f)^{-1}; Df(x,y)=Df∗(∇f(y),∇f(x))D_f(x,y) = D_{f^*}(\nabla f(y),\nabla f(x))mirror maps
Hessian formDf(x,y)=12∥x−y∥∇2f(z)2D_f(x,y) = \frac12\lVert x - y\rVert^2_{\nabla^2f(z)}, z∈[x,y]z\in[x,y]measurable choice of zz
Key inequality⟨x−y,u⟩−Df(x,y)/η≤η2∥u∥(∇2f(z))−12\langle x - y,u\rangle - D_f(x,y)/\eta\le\frac\eta2\lVert u\rVert^2_{(\nabla^2f(z))^{-1}}local-norm regret term
Optimality⟨x−x∗,∇f(x∗)⟩≥0 ∀x∈A\langle x - x^*,\nabla f(x^*)\rangle\ge0\ \forall x\in Asupporting hyperplane
Projectionconstrained min = Bregman projection of unconstrained minLegendre ff
Simplex KL projectiony/∥y∥1y/\lVert y\rVert_1renormalisation
PythagorasDf(x,y)≥Df(x,z)+Df(z,y)D_f(x,y)\ge D_f(x,z) + D_f(z,y) for z=ΠA,f(y)z = \Pi_{A,f}(y)projections never hurt

Facts to keep to hand

  • Bregman divergences generalise squared distance. They are the gap between ff and its tangent plane: nonnegative, convex in the first argument, asymmetric, and locally a squared norm in ff‘s Hessian geometry. Negentropy gives KL, which is why exponential weights is mirror descent.
  • Legendre regularisers are self-enforcing barriers. Their gradients blow up at the boundary, so minimisers stay interior. Their gradient maps invert each other across the Fenchel dual, giving primal (weights) ↔ dual (scores) mirror maps.
  • One inequality drives the regret analyses. “Gain minus movement cost” is at most η2∥u∥(∇2f)−12\frac\eta2\lVert u\rVert^2_{(\nabla^2f)^{-1}}. The regulariser’s curvature at the current point is what controls the variance of the loss estimates.
  • Constrained steps = unconstrained steps + Bregman projection, and projections only bring you closer to every feasible point (Pythagoras). First-order optimality is the supporting-hyperplane condition.

References

  • Lattimore & Szepesvári, Bandit Algorithms — Part VI introduction; Chapter 26
  • Rockafellar, Convex Analysis (2015 reprint) — Fenchel duality (Part III), Legendre functions (Part V)
  • Boyd & Vandenberghe, Convex Optimization (2004)

← All notes