Sample Size Selection in Optimization Methods for Machine Learning 1: With Batch Sizes n_k ≥ a^k, Dynamic Batch Steepest Descent Converges Linearly in Expectation, E[J(w_k) − J(w*)] ≤ Cρ^kResearch Paper
Motivation
Training a model in machine learning means minimizing an expected loss over a data distribution, using a finite sample from it. Two families of methods dominate. Stochastic gradient methods step along the gradient of the loss at one data point: each step is cheap, but the noise forces small steps and many sequential iterations. Batch methods average the gradient over a large set of points: each step is accurate and parallelizes well, but costs a pass over the data. Bottou and Bousquet (The tradeoffs of large scale learning, NIPS 2007) compared the two by the total work needed to reach accuracy and concluded that stochastic gradient descent is preferable in large-scale learning.
Byrd, Chin, Nocedal and Wu (Sample size selection in optimization methods for machine learning, Math. Program. 2012) analyse a third option: a dynamic batch method, which takes gradient steps on mini-batches whose size grows over the run. A small batch makes early progress cheap; a large batch later makes the steps accurate. Their Theorem 4.2 shows that when the batch size grows geometrically, steepest descent with a fixed step converges linearly in expectation, and their Corollary 4.3 derives from it a total work bound of the same order as stochastic gradient descent. The analysis underlies a line of work on adaptive sampling and variance-controlled batch methods (for example Friedlander and Schmidt, Hybrid deterministic-stochastic methods for data fitting, SIAM J. Sci. Comput. 2012; Bottou, Curtis and Nocedal, Optimization methods for large-scale machine learning, SIAM Review 2018, §5.2).
Setting
Let be a probability space of data points ; in the paper is an input–output pair with distribution . The parameter is ( is the number of variables). A per-sample loss is given with gradient in , and the objective is the expected loss (2.1)
The gradient of the objective is the expected per-sample gradient, .
Uniform convexity (4.2): is twice continuously differentiable and there are constants with
Then has a unique minimizer .
For a random vector , is the sum of its componentwise variances. The variance bound (4.22) asks for a constant with
The algorithm. Fix sample sizes and a starting point . At iteration draw a batch of points, independently with law and independently of earlier batches, form the batch gradient (4.19)
and take the dynamic batch steepest descent step (4.24)
The iterates are random, and expectations below are over all batches.
Formalization targets
Goal: Theorem 4.2
If for all , for some , and (4.22) holds, then
The constants are the paper's. The goal also asserts that is integrable for every .
Milestones, in the order the proof uses them
- (4.5), p. 8: for every .
- Taylor bound, p. 11: for every and .
- (4.25), p. 11: at a fixed point , with the batch gradient of i.i.d. draws,
- Variance of the batch gradient, p. 12: .
- (4.26), p. 12: .
- (4.27), p. 12: .
Milestones 3–6 are the paper's conditional expectations given , stated at a fixed point with the batch drawn afresh.
Significance
Theorem 4.2 is the convergence guarantee of the dynamic sampling strategy: it says that the noise of a mini-batch gradient does not destroy the linear rate of steepest descent, provided the batch grows geometrically. The rate makes the trade-off explicit: the optimization contracts by per step, the noise by , and the slower of the two governs. From it the paper's Corollary 4.3 bounds the total number of sample-gradient evaluations to reach by , which places dynamic batch methods on the same footing as stochastic gradient descent in the Bottou–Bousquet comparison, while keeping the parallelism of batch methods.
The result is proved in the paper; to our knowledge no machine-checked proof exists. A formalization produces a reusable account of the one-iteration analysis of a mini-batch gradient step (descent lemma, variance of an i.i.d. sample mean of random vectors, conditional expectation over a fresh batch), and of the passage from a conditional one-step recursion to an unconditional bound over a run driven by an infinite i.i.d. array. Corollary 4.3 is not part of this mission: it involves bounds, a cost model for gradient evaluations and an iteration count treated as a real number.
Difficulty
The arithmetic of the induction on p. 12 is short. The difficulty is in making the probability rigorous. The iterate is random, and the paper's one-step bound (4.27) is a conditional expectation given , with on the right-hand side. Turning it into an unconditional recursion requires that the batch of iteration be independent of , that be a measurable function of the earlier batches, and that and be integrable at every step, none of which is automatic for a run driven by an infinite array of draws. A naive formalization that treats as a fixed point, or as an abstract random vector with a postulated variance bound, skips exactly this content.
The variance identity for a sample mean of random vectors in and the bound from (4.2) are standard but not packaged in this form in Mathlib.
Formalization scope
- The space is
EuclideanSpace ℝ (Fin m). The paper's is writtenlam(λis a Lean keyword). (4.2) isContDiff ℝ 2 J,0 < lam < L, and the two-sided bound onfderiv ℝ (fderiv ℝ J) w d d. - is defined as the Bochner integral for a general per-sample loss ; the paper's linear predictor and convex loss are not used by the theorem and are not assumed. The model assumes: integrable; the gradient of at ; jointly measurable; square-integrable; and (differentiation under the integral, which the paper uses without proof).
- Sampling with replacement. The paper's (3.5) is sampling without replacement from points; it takes on p. 5, which "also corresponds to the case of sampling with replacement". The formalization draws every point i.i.d. from : draw of iteration is and the law of the whole array is
Measure.infinitePiover . The finite-population factor is not modelled. - is a given minimizer of ; are natural numbers with (real powers of a real ); is a real number.
- The goal asserts integrability of together with the bound, so the inequality cannot be met by the Bochner integral's value on a non-integrable function. The batch gradient is the mean over draws at the current iterate, and is the random run: a goal with an abstract random satisfying a postulated variance bound, or with a deterministic sequence, would not be this theorem.
- Welcome contributions: the variance of an i.i.d. mean of -valued random vectors; the descent lemma and gradient-dominance inequality from Hessian bounds; measurability and independence lemmas for processes driven by
Measure.infinitePi. All three are reusable beyond this mission.
Selected references
- R. H. Byrd, G. M. Chin, J. Nocedal, Y. Wu, Sample size selection in optimization methods for machine learning, Mathematical Programming 134 (2012) 127–155. https://doi.org/10.1007/s10107-012-0572-5
- L. Bottou, O. Bousquet, The tradeoffs of large scale learning, NIPS 2007. https://papers.nips.cc/paper/3323-the-tradeoffs-of-large-scale-learning
- M. P. Friedlander, M. Schmidt, Hybrid deterministic-stochastic methods for data fitting, SIAM J. Sci. Comput. 34 (2012) A1380–A1405. https://doi.org/10.1137/110830629
- L. Bottou, F. E. Curtis, J. Nocedal, Optimization methods for large-scale machine learning, SIAM Review 60 (2018) 223–311. https://doi.org/10.1137/16M1080173