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.
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 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:
| Tool | Role in the algorithms |
|---|---|
| Convex functions and Jensen | regret bounds, potential arguments |
| Fenchel dual | moving between “primal” (actions) and “dual” (gradients/scores) |
| Bregman divergence | the problem-adapted “distance” that replaces |
| Legendre functions | regularisers whose gradient map is invertible and keeps iterates inside the domain |
| First-order optimality | characterising each update step |
| Bregman projections | pulling 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
is convex if for all and . The convex hull is the smallest convex set containing . For finitely many points,
(all mixtures). Compare the convex-hull reduction for lower bounds.
DefinitionConvex function (Def. 26.1)
Work on the extended reals . A function is convex if its epigraph
is a convex set (“epi” = upon: the points sitting on top of the graph).
| Term | Meaning |
|---|---|
| Domain | |
| Restriction convention | is extended by off , so a real-valued on has : constraints become infinite values |
| Proper | never , and nonempty domain |
| ”Let be convex” | from now on: proper convex |
| Strictly convex | the inequality below is always strict |
| Concave | is convex |
FormulaThe familiar inequality
For convex , all (with the infinity arithmetic) and ,
Some authors take (26.1) plus a convex domain as the definition. Allowing the value 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 (Exercise 26.1). Discontinuities can only occur at the boundary.
- Second-order test: if is twice differentiable on the interior of its domain, it is convex iff 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)
It is convex as a supremum of affine functions of . If is proper convex with a closed epigraph, then (biduality). In general , with equality on the interior of the domain for differentiable convex (Exercise 26.3).
| Component | Detail |
|---|---|
| Signature | , a function of the “slope” |
| Meaning | is the intercept of the best affine minorant of with slope |
| Key property | for nice , (Theorem 26.6) |
| Fenchel–Young | , immediate from the definition |
RemarkWe have met the dual before
- The large-deviation rate function is the Fenchel dual of the cumulant-generating function (Chapter 5).
- The method of mixtures linearised a quadratic with , i.e. for (Chapter 20).
Jensen’s inequality
TheoremTheorem 26.2 — Jensen
Let be measurable and convex, and an -valued random element with existing and a.s. Then
The inequality reverses for concave . (Allowing integrals to equal removes the domain condition: if with positive probability, the left side is .) (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 and . The point is a mixture of the points , so it lies in their convex hull, which sits inside the convex epigraph . So it is on or above , which lies on the lower boundary of .
General case (Exercise 26.2): take a supporting hyperplane to at with . It gives an affine with and , so .
∎
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
For convex and ,
where is the directional derivative, which always exists for convex but may be infinite. If is differentiable at ,
denotes the points where is differentiable.
IntuitionThe error of the tangent-plane approximation
is how far sits above the first-order Taylor approximation of built at . For convex the tangent plane is a global under-estimator, so the gap is nonnegative. Curvature makes it large: flat directions of contribute nothing.
TheoremTheorem 26.3 — Basic properties
- for all .
- for .
- is convex for every .
Part 3 can fail if isn’t differentiable at (Exercise 26.14). behaves somewhat like a metric, and is one for some , but in general is asymmetric and violates the triangle inequality.
ExampleExample 26.4 — Squared Euclidean distance
, :
ExampleExample 26.5 — Unnormalised negentropy gives relative entropy
on (with ), and for :
On the simplex the second sum vanishes and is exactly the relative entropy . If some , the divergence is infinite. This regulariser drives exponential weights: mirror descent with it on the simplex is Exp3/Hedge.
Legendre functions
DefinitionLegendre function
Let be convex with and . Then is Legendre if
- ;
- is differentiable and strictly convex on ;
- for every sequence in converging to a point of .
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 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 is Legendre:
- is a bijection from to , with inverse ;
- for (note the swapped order);
- is Legendre.
ImportantMirror maps
maps a point (for example a distribution over actions) to its “dual” coordinates (for example log-weights or scores). 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 is Legendre, and , then : along any straight path to the boundary, the slope blows up. Hence any minimiser of over lies in the interior (Exercise 26.6).
ExampleExample 26.9 — The self-dual case
on : , and . There is no boundary, so condition 3 holds vacuously.
ExampleExample 26.10 — on (Exercise 26.8)
(componentwise), which blows up as any , and is strictly convex, so is Legendre. ( as , but "" isn’t part of the boundary.)
- Bregman: .
- Dual: maximise in each coordinate. For the maximiser is , giving so , and .
- Dual Bregman: . Check of Theorem 26.6(2): with and , this equals .
This regulariser underlies the Tsallis-INF-type bandit algorithms that remove Exp3’s . (Computations worked here.)
ExampleExample 26.11 — Unnormalised negentropy (Exercise 26.9)
blows up at the boundary and is strictly convex, so is Legendre. Its dual is
(maximise at ), and
The mirror map is “log weights ↔ weights”: exactly the exponential-weights update. (Dual computed here.)
ExampleWhich functions are Legendre? (Exercise 26.4)
| on domain | Legendre? | Reason |
|---|---|---|
| on | No | gradient stays bounded at |
| on | Yes | the archetype |
| , | Yes | domain ; at 0 |
| on | Yes | at 0 |
| on | No | neither differentiable nor strictly convex |
| on | No | equals on : 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 : , , and the Hessian at is , so . Locally, a Bregman divergence is a squared norm in the Hessian’s geometry. The approximation can be poor when are far apart.
TheoremTheorem 26.12 — Exact Hessian form
If is convex and twice differentiable on and , then for some on the segment ,
If is continuous, can be chosen measurably, by a measurable-selection theorem (Kuratowski–Ryll-Nardzewski; Exercise 26.15). This matters when are random. With this is .
TheoremTheorem 26.13 — The key inequality for mirror descent
Let and Legendre and twice differentiable with on . For all and , there is with
ProofCauchy–Schwarz in the Hessian norm, then maximise a quadratic
Pick with , . Then , so the left side is at most with , and . Use .
∎
IntuitionGain versus movement cost
is how much a step from to gains against a loss vector ; is the price of moving. The net benefit is bounded by the local dual norm of . In bandit analyses 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 in the Exp3 proof: for negentropy, , so .
Optimisation
TheoremFirst-order optimality
Unconstrained: for convex differentiable , is necessary and sufficient for to be a minimiser. Constrained: for convex differentiable and nonempty convex ,
IntuitionA supporting hyperplane
If , the hyperplane through with normal must support at , with all of on the side the gradient points into. Otherwise some feasible direction makes an acute angle with , and a small step along it stays in and decreases . Conversely, by convexity .
TheoremProposition 26.14 — Nondifferentiable and Legendre versions
For convex , nonempty convex , and :
If is Legendre, any constrained minimiser automatically lies in (it is interior by Corollary 26.8, and by Theorem 26.6), so (26.4) always applies.
RemarkAlready used
The Kiefer–Wolfowitz proof (Chapter 21) is exactly (26.3) for the concave over the simplex: maximality iff for all designs .
Projections
DefinitionEuclidean and Bregman projections
Note that the projected point goes in the first argument of .
TheoremTheorem 26.15 — Constrained minimisation = unconstrained minimisation + projection
Let be Legendre, nonempty, closed and convex with , and suppose exists. Then
- exists and is unique;
- , the Bregman projection of .
The existence of is needed: is Legendre on 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 , , so projecting and minimising over are literally the same problem. Adding a linear term keeps Legendre (Exercise 26.10), which covers the actual updates.
ExampleNegentropy projections (Exercises 26.11–26.12)
- Onto the simplex: for , . Normalisation is a KL projection, which is why exponential weights simply renormalise.
- Onto the capped simplex (forced exploration): with sorted increasingly and the smallest index with , the projection sets the smallest coordinates to and rescales the rest proportionally: for .
TheoremGeneralised Pythagorean inequality (Exercise 26.13)
If is closed and convex, , , and is differentiable at , then
Projecting onto a convex set only brings you closer (in ) 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
for ; for ; for (signs flip for ); ; (like ) is undefined; .
DefinitionTopology in
- Interior point of : some ball . is the set of interior points.
- Open: . Closed: the complement is open.
- Boundary : points every ball around which meets both and (they need not lie in ). Examples: , .
Quick reference
| Object | Statement | Note |
|---|---|---|
| Convex function | epigraph convex; | constraints as |
| Fenchel dual | (closed epigraph); Fenchel–Young | |
| Jensen | supporting hyperplane | |
| Bregman | asymmetric; convex in | |
| Euclidean | self-dual | |
| Negentropy | KL on the simplex; | |
| ; | Tsallis-type regulariser | |
| Legendre | strictly convex, differentiable, gradient blows up at boundary | minimisers interior |
| Duality | ; | mirror maps |
| Hessian form | , | measurable choice of |
| Key inequality | local-norm regret term | |
| Optimality | supporting hyperplane | |
| Projection | constrained min = Bregman projection of unconstrained min | Legendre |
| Simplex KL projection | renormalisation | |
| Pythagoras | for | projections never hurt |
Facts to keep to hand
- Bregman divergences generalise squared distance. They are the gap between and its tangent plane: nonnegative, convex in the first argument, asymmetric, and locally a squared norm in ‘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 . 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)