BanditRLlib
Lean gate passed before this site build; local proof declarations are shown as compiled.Lean-verified build · exact declarations linked.

Teaching chapter 05 of 31 · Canonical route compiled

Huber linear prediction with unconstrained OGD

Huber calculus supplies the actual full-space OGD update, its terminal-residual regret bound and a one-sided average guarantee for known-horizon runs.

How to read the status. It describes this page's canonical local Lean route, not completion of the cited textbook chapter or every extension listed below.

Orientation

Who should read this. Readers of Orabona Chapter 2.

Learning goals

  • Produce actual Huber calculus at both seams and delta0 under explicit source-implicit threshold.
  • Derive ambient feature gradient/global regularity/full-space projection, without bounded predictors or labels.
  • Retain the negative fixed-step terminal distance, then use one coefficient1 known-horizon constant-step run per positive T.
  • Distinguish a vanishing numeric upper envelope from actual one-sided eventual performance; no signed convergence/anytime/uniform cutoff.

Textbook crosswalk

Read the mathematics before the Lean interface

This reading follows Online Learning: A Modern Introduction Using Convex Optimization. Teaching routes group mathematical dependencies across the shared library. Visible page labels use the cited source's numbered pages; source buttons use the PDF viewer's physical page index, including front matter. Companion papers cover algorithm-specific results.

Primary spine · arXiv:1912.13213v10, 21 June 2026

Online Learning: A Modern Introduction Using Convex Optimization

Francesco Orabona

Location
Section 2.1.2, Example 2.15, with the constant-step branch of Theorem 2.13
Pages
printed15-16/PDF27-28
Open at the cited pages
causal gradient update · ordered flow

Shared full-space OGD

Read top to bottom to follow the argument or procedure.

  1. Predict before feedback

    The current point depends only on strict-prefix losses. Current feature z_t is available before predicting inner(z_t,x_t); then y_t is revealed and defines the current residual/loss. Library index0 is source round1, and iterate T is the source point after T updates.

  2. Compute the true Huber gradient

    Actual seam calculus produces the scalar derivative, including both seams and delta0. The ambient inner-product chain rule then produces gradient H_delta'(inner(z_t,x)-y_t)*z_t and norm<=delta*norm(z_t); no supplied desired-gradient, label/residual bound or regularity oracle.

  3. Update in the full space

    The genuine nonempty/closed/convex fullSpace Domain has selected projection identity. Global convexity and differentiability PRODUCE RegularLoss fullSpace, discharging the stronger historical API globally. Subtract eta times the current gradient for the next point in the same shared causal recursion; no finite diameter or bounded predictor set.

Derived instantiation of source guarantee

Example 2.15: Huber prediction, with a derived quantitative bound

Source context at printed15-16 ↗
Compiled Huber OGD chainOne Example 2.15 and its supporting calculus/OGD chain. The numerical upper envelope tends to zero; signed average regret is only eventually below every positive epsilon for each fixed comparator. Runs are tuned separately to known horizons. Whole-chapter acceptance, other source obligations and purification remain separate.

Bounded features give bounded Huber gradients on the full predictor space. Constant-step OGD then gives a one-sided average-performance guarantee against each fixed linear predictor.

Model
Actual complete real Hilbert E, including source finite Euclidean R^d; unrestricted full-space predictors, linear feature prediction and exact half-quadratic/linear Huber residual loss.
Assumptions
Delta>=0 source-implicit threshold; Z>=0 feature norm bound, finite prefix for fixed T or global for eventual claim. No labels/residual/predictor/diameter bound or supplied regularity/gradient/stability/regret oracle. Actual projection identity/global RegularLoss are produced.
Algorithm parameters
Fixed-step bound retaining the terminal residual: eta>0 and every T>=0. Tuned average: positive known horizon T, coefficient1 constant eta_T=1/sqrt(T), independent of comparator/future feedback. Delta0/Z0 admitted; T0 fixed distance terms cancel, tuned guarantee excludes T0. Generic update identity allows any real eta separately.
Regret notion
Actual shared causal iterate from any x0 against each fixed u, sum of current losses minus comparator losses; same horizon run serves all u. Eventual cutoff may depend on u/epsilon; no moving comparator/uniform cutoff.
Guarantee
Fixed-step actual regret retains -norm(x_T-u)^2/(2eta); dropping only that nonpositive term yields explicit average upper envelope. Numeric envelope Tendsto0; actual average regret only eventually <every positive epsilon, a family of separate known-horizon runs.
Derived explicit guarantee. Only the numeric upper envelope tends0. For each fixed predictor u and epsilon>0, actual average regret is eventually <epsilon; it may stay negative.

BanditRLlib relationship. The example prints the piecewise loss and gradient, asserts convexity, and applies Theorem 2.13 with a step proportional to 1/sqrt(T). The displayed coefficient-one bound is derived, not a verbatim source formula. Scalar seam calculus fills an omitted source proof. The complete real inner-product-space formulation generalizes finite Euclidean vectors; delta>=0 makes the intended threshold convention explicit. The informal average-performance sentence is represented by eventual upper inequalities, without claiming an existing signed limit or equality to zero.

Natural-language and Lean side by side

The mathematical readings are explanatory summaries. The exact generated Lean statement and its source link remain authoritative for hypotheses, types, constants, and indexing.

Mathematics ↔ Lean

Global Huber convexity

Lean declarationBanditRL.OnlineHuber.huber_convex

Compiled

Plain-English statement. Produce global convexity from the actual monotone clamp derivative; both seams and delta0 are included.

Mathematical reading. Produce global convexity from the actual monotone clamp derivative; both seams and delta0 are included.
Intuition
Produce global convexity from the actual monotone clamp derivative; both seams and delta0 are included.
Why it is needed
Connects the actual supporting library declaration to Example 2.15 in the shared project.
Place in the proof
Library support or derived quantitative refinement of Orabona v10 Example 2.15, printed pages 15–16 / PDF pages 27–28; not a separately numbered source theorem.
Proof and Lean reading notes
Proof idea
Matching-value/derivative gluing produces actual seam calculus, then the scalar derivative clamp and monotone-derivative criterion prove global convexity.
Lean reading notes
Delta>=0 is source-implicit/mathematically necessary, not a printed sign assumption. Delta0 valid; negative thresholds not convex/differentiable. No strong/strict convexity claim.
Teaching dependencies
BanditRL.OnlineHuber.huber_deriv_clamp, BanditRL.OnlineHuber.huber_hasDerivAt
Exact Lean statement
theorem huber_convex (delta : ℝ) (hd : 0 ≤ delta) : ConvexOn ℝ Set.univ (huber delta)
Mathematics ↔ Lean

Actual feature gradient

Lean declarationBanditRL.OnlineHuber.huber_linear_hasGradientAt

Compiled

Plain-English statement. Derive the ambient gradient of the actual feature-residual Huber loss by the inner-product chain rule.

Mathematical reading. Derive the ambient gradient of the actual feature-residual Huber loss by the inner-product chain rule.
Intuition
Derive the ambient gradient of the actual feature-residual Huber loss by the inner-product chain rule.
Why it is needed
Connects the actual supporting library declaration to Example 2.15 in the shared project.
Place in the proof
Library support or derived quantitative refinement of Orabona v10 Example 2.15, printed pages 15–16 / PDF pages 27–28; not a separately numbered source theorem.
Proof and Lean reading notes
Proof idea
Actual scalar hasDerivAt and innerSL affine functional produce gradient deriv(H)(inner(z,x)-y)*z, without a supplied gradient oracle.
Lean reading notes
Actual Complete real Hilbert-space scope includes finite Euclidean source; arbitrary deterministic streams include stock-history features available before prediction/labels afterwards, without stock-law claim. No labels/residual/predictor/diameter bound; full definition/class contexts fixed.
Teaching dependencies
BanditRL.OnlineHuber.huber_hasDerivAt
Exact Lean statement
theorem huber_linear_hasGradientAt (delta y : ℝ) (hd : 0 ≤ delta) (z x : E) : HasGradientAt (fun w => huber delta (inner ℝ z w - y)) (deriv (huber delta) (inner ℝ z x - y) • z) x
Mathematics ↔ Lean

Fixed-step regret with terminal residual

Lean declarationBanditRL.OnlineHuber.huber_regret_fixed

Compiled

Plain-English statement. Apply shared causal OGD to produced Huber global regularity/actual gradients, retaining the negative terminal distance.

Mathematical reading. Apply shared causal OGD to produced Huber global regularity/actual gradients, retaining the negative terminal distance.
Intuition
Apply shared causal OGD to produced Huber global regularity/actual gradients, retaining the negative terminal distance.
Why it is needed
Connects the actual supporting library declaration to Example 2.15 in the shared project.
Place in the proof
Library support or derived quantitative refinement of Orabona v10 Example 2.15, printed pages 15–16 / PDF pages 27–28; not a separately numbered source theorem.
Proof and Lean reading notes
Proof idea
Actual global convexity/gradient produce RegularLoss fullSpace, selected projection identity gives the true update, and feature norms bound actual gradients before shared theorem_2_13_fixed.
Lean reading notes
Eta>0,T>=0,delta>=0,Z>=0,finiteprefixfeatures; anyx0/u in unbounded fullspace. At T0 distances cancel;delta0/Z0 retained. Generic update identity anyrealeta separate. No desired stability/regret/regularity consumer or bounded domain.
Teaching dependencies
BanditRL.OnlineHuber.huber_regular, BanditRL.OnlineHuber.huber_linear_gradient_bound, BanditRL.OnlineGradientDescent.theorem_2_13_fixed
Exact Lean statement
theorem huber_regret_fixed (delta Z eta : ℝ) (hd : 0 ≤ delta) (hZ : 0 ≤ Z) (heta : 0 < eta) (z : ℕ → E) (y : ℕ → ℝ) (x0 u : E) (T : ℕ) (hz : ∀ t < T, ‖z t‖ ≤ Z) : regret fullSpace eta (fun t => linearLoss delta (z t) (y t)) x0 u T ≤ ‖x0 - u‖ ^ 2 / (2 * eta) + eta / 2 * ((T : ℝ) * (delta * Z) ^ 2) - ‖iterate fullSpace eta (fun t => linearLoss delta (z t) (y t)) x0 T - u‖ ^ 2 / (2 * eta)
Mathematics ↔ Lean

One-sided eventual upper average regret

Lean declarationBanditRL.OnlineHuber.huber_average_eventually

Compiled

Plain-English statement. For each fixed comparator and positive epsilon, actual average regret is eventually below epsilon; only its numeric upper envelope is proved to tend0.

Mathematical reading. For each fixed comparator and positive epsilon, actual average regret is eventually below epsilon; only its numeric upper envelope is proved to tend0.
Intuition
For each fixed comparator and positive epsilon, actual average regret is eventually below epsilon; only its numeric upper envelope is proved to tend0.
Why it is needed
Connects the actual supporting library declaration to Example 2.15 in the shared project.
Place in the proof
Library support or derived quantitative refinement of Orabona v10 Example 2.15, printed pages 15–16 / PDF pages 27–28; not a separately numbered source theorem.
Proof and Lean reading notes
Proof idea
Actual fixed-step bound retaining the terminal residual→positive-horizon eta_T=1/sqrtT algebra/drop nonpositive residual→actual average upper bound, then numeric-envelope Tendsto0/positive eventual horizon give literal eventual regret<epsilon.
Lean reading notes
Coefficient one is a valid specialization of the printed proportional step. Each T selects a separate constant-step run; its tuning uses neither comparator nor future loss. Only the envelope tends to zero. The cutoff can depend on fixed u and epsilon.
Teaching dependencies
BanditRL.OnlineHuber.huber_average_bound, BanditRL.OnlineHuber.huber_rate_tendsto
Exact Lean statement
theorem huber_average_eventually (delta Z : ℝ) (hd : 0 ≤ delta) (hZ : 0 ≤ Z) (z : ℕ → E) (y : ℕ → ℝ) (x0 u : E) (hz : ∀ t, ‖z t‖ ≤ Z) (epsilon : ℝ) (he : 0 < epsilon) : ∀ᶠ T : ℕ in Filter.atTop, regret fullSpace (1 / Real.sqrt T) (fun t => linearLoss delta (z t) (y t)) x0 u T / T < epsilon

Maintainer contract

Open the canonical completion definition and blockers

One source Example 2.15 integration node: 19 production proofs and three definitions, the 14 original canary statements, and five retained scalar-value tests. This does not complete Chapter 2 or the book.

Remaining blockers

  • Other Chapter 2 source targets and appendix dependencies require their own acceptance; existing compiled code does not settle source fidelity.

Chapter implementation status

The compact summary keeps the reading route visible. Open it for source-linked declarations and exact remaining gaps.

Open 0 implementation records0 compiled · 0 partial · 0 blocked · 0 planned
MilestoneStatusLean declarationRemaining gap

Open boundaries

  • The average result is one-sided and horizon-tuned. Uniform unbounded-comparator, moving-comparator and anytime guarantees are outside this result.
  • Whole-chapter acceptance and purification remain separate.

All Lean modules in this chapter

Open the complete module list (1 modules)
ModuleDeclarationsProject importsStatus
BanditRLProof.OnlineHuber221Compiled