---
title: "Stochastic gradient descent, weighted sampling, and the"
description: "How weighted sampling improves stochastic gradient descent, why partial bias controls noise, and how the analysis connects to randomized…"
canonical: "https://research.elamur.ai/free/en/papers/needell-2015-stochastic-gradient-descent-weighted-sampling/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/needell-2015-stochastic-gradient-descent-weighted-sampling/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2015](https://md.research.elamur.ai/free/en/papers/2015/) / Stochastic gradient descent, weighted sampling, and the randomized Kaczmarz algorithm

# Stochastic gradient descent, weighted sampling, and the randomized Kaczmarz algorithm

Paper · 2015 · Deanna Needell, Nathan Srebro and Rachel Ward

**Authors:** Deanna Needell, [Nathan Srebro](https://md.research.elamur.ai/free/en/authors/nathan-srebro/) and [Rachel Ward](https://md.research.elamur.ai/free/en/authors/rachel-ward/) · **Year:** 2015 · **Venue:** Mathematical Programming · **Licence:** [arXiv — non-exclusive license to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

[**432** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W2162287622|W2221537063) · Mathematical Programming · [licence](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

- [DOI 10.1007/s10107-015-0864-7](https://doi.org/10.1007/s10107-015-0864-7)
- [arXiv 1310.5715](https://arxiv.org/abs/1310.5715)
- [OpenAlex](https://openalex.org/W2162287622)

## Deep dive: Stochastic gradient descent, weighted sampling, and the randomized Kaczmarz algorithm

How weighted sampling improves stochastic gradient descent, why partial bias controls noise, and how the analysis connects to randomized Kaczmarz. · about 36 minutes to read

**In this deep dive**

1. [Summary](#dd-summary)
2. [Ideas worth borrowing](#dd-ideas-worth-borrowing)
3. [How Mova uses it](#dd-how-mova-uses-it)
4. [The problem and its context](#dd-the-problem-and-its-context)
5. [The method, step by step](#dd-the-method-step-by-step)
6. [Experiments and results](#dd-experiments-and-results)
7. [What the ablations show](#dd-what-the-ablations-show)
8. [Limitations](#dd-limitations)
9. [What came after](#dd-what-came-after)

### Summary

Stochastic gradient descent makes progress by working with a small part of an optimization problem at a time. That economy creates a question: should every part be equally likely to receive attention? A component whose gradient changes sharply can restrict the step size for the whole procedure, even when most components are much gentler. This paper studies how the choice of sampling distribution affects convergence, and how to change that distribution without changing the objective being minimized. Its main result is that appropriately weighted sampling can make convergence depend on average component smoothness instead of the largest component smoothness.

The authors first improve the analysis of ordinary stochastic gradient descent, or SGD. Their central setting has convex, smooth component functions whose expectation is strongly convex. Smoothness controls how quickly a gradient can change; strong convexity supplies enough curvature to identify a unique optimum. Earlier bounds involved a squared measure of conditioning. The new analysis replaces that dependence with a linear dependence on worst-case conditioning. This improvement comes from a more careful use of the relationship between gradients and displacement, rather than from a different update rule.

Changing the sampling distribution makes a further improvement possible. The authors show that sampling components in proportion to their smoothness constants can replace worst-case smoothness with average smoothness. To preserve the original objective, however, each sampled gradient must be divided by its sampling weight. That correction creates a complication: components receiving very small weights can produce large corrected gradients near the optimum. The paper therefore proposes partially biased sampling, mixing the original distribution with a distribution favoring components with large smoothness constants. This mixture retains the improvement in conditioning while controlling the extra contribution from residual gradient noise.

The second major contribution is a connection to the randomized Kaczmarz method, which solves linear systems through successive row-based corrections. The authors interpret row sampling and row normalization as choices within weighted SGD. This explains why sampling policies can affect both convergence speed and the solution being approached. In particular, ordinary Kaczmarz updates with uniformly selected rows generally correspond to a weighted least-squares objective. The proposed hybrid method changes both the sampling probabilities and the update denominator so that it continues to address the original least-squares problem.

The numerical evidence comes from synthetic linear systems, not from a broad collection of learning tasks. Across matrices with different row scales and different noise levels, fully weighted sampling is favored in several low-noise settings, whereas intermediate mixtures perform better in noisier settings. The experiments support the paper’s central tradeoff: the sampling rule should account for both rapid contraction towards the optimum and the noise that remains there. The theoretical guarantees establish that tradeoff precisely under convexity and smoothness assumptions; they do not establish a universally best mixture for every optimization problem.

### Ideas worth borrowing

Preserve the objective while changing access. A sampling distribution is part of an algorithm’s design, rather than an unavoidable property of the objective. The paper changes which components appear often and compensates by scaling their contributions inversely. This separates two questions that are easily confused: what quantity should be optimized, and how should computation be allocated while optimizing it? The distinction is useful whenever an objective is represented as an expectation or a sum and its components differ substantially in scale.

Analyze the quantity that actually limits progress. The initial improvement comes from replacing a loose treatment of gradient differences with a bound that uses convexity and smoothness together. A generic gradient-norm estimate introduces a squared smoothness constant. The co-coercivity argument preserves more of the geometry and leads to linear dependence on conditioning. The reusable lesson is methodological: before changing an algorithm, examine whether the analysis has discarded structure that already helps the existing procedure.

Use a mixture to control extreme corrections. Fully biased sampling improves the smoothness term, but inverse weighting can magnify residual contributions from rarely selected components. Mixing in the original distribution prevents any component’s relative weight from becoming too small. This gives a simple way to balance an aggressive allocation policy with a safeguard against large corrections. The same reasoning applies to other importance-sampling designs where reducing one source of difficulty can amplify another.

Separate contraction from residual noise. The paper’s bounds contain a term that shrinks with the number of iterations and another that reflects stochastic gradients remaining active at the optimum. These terms respond differently to sampling and step size. A policy that improves early movement can be poor when high accuracy makes the residual term decisive. This decomposition offers a useful way to interpret convergence curves: slow progress and a persistent error level need not have the same cause.

Match weights to the regime. Smoothness-based weights address the part of the guarantee associated with contraction. Bounds on gradient magnitude lead to different weights when noise or nonsmoothness controls performance. For the generalized linear objectives discussed in the paper, these choices correspond to squared feature norms and feature norms, respectively. The distinction warns against treating a single notion of component importance as suitable for every stage or every objective.

Check the objective after normalization. Dividing a linear equation by its row norm changes its contribution to an inconsistent least-squares problem. The paper uses the SGD interpretation to make that change explicit. This is useful beyond row-action solvers: a normalization that appears to be a harmless numerical convenience may alter the statistical or optimization target unless another part of the procedure compensates for it.

Count sampling costs as well as updates. Importance sampling can reduce the number of gradient updates while requiring extra work to obtain each accepted sample. The paper’s rejection-sampling discussion shows how a gain in iteration complexity can disappear when acquiring samples is the dominant expense. An implementation should therefore distinguish access cost, weight computation, gradient computation, and update cost. A theoretical improvement in one of these quantities does not automatically imply an improvement in total runtime.

### How Mova uses it

For Mova, the small transparent language system in Rust, the paper offers a possible design principle for numerical optimization components. It does not establish that Mova already implements weighted SGD, a hybrid Kaczmarz solver, or any particular sampling policy. The concrete connection is conditional: if a Mova subsystem minimizes an objective assembled from convex component losses, the paper explains how to allocate updates unevenly while keeping that objective fixed.

A transparent implementation could expose the quantities that define the sampling decision. Each component would have an original probability, a smoothness estimate or bound, and a normalized sampling weight. The update would record both the selected component and the inverse-weight correction applied to its gradient. Such an arrangement would make it possible to inspect whether unequal selection changes only computational effort or also changes the intended objective. That distinction fits a system whose numerical behavior should remain understandable.

The mixed sampling rule is an especially plausible candidate for an experiment. A component could be selected either through the original distribution or through a distribution favoring larger smoothness bounds. The corresponding gradient correction would remain explicit. The reason to investigate this rule would be the paper’s protection against large residual amplification, instead of a claim that unequal sampling must improve every Mova task.

A least-squares subsystem would provide a more direct match to the analysis. If Mova needed to solve a linear problem repeatedly, row norms could potentially be computed once and used to construct a weighted or mixed distribution. The implementation would need to keep the row-selection probabilities and the correction denominator consistent. Using uniform selection with an ordinary normalized Kaczmarz step would generally address a different least-squares weighting, which is precisely the kind of hidden change a transparent system should make visible.

These possibilities require validation within the actual subsystem. The paper’s strongest guarantees rely on convexity, component smoothness, and strong convexity of the combined objective. Its experiments concern synthetic linear systems. A language-processing component would not inherit those guarantees merely because its updates resemble SGD. The first useful application would therefore be a clearly specified numerical problem where the assumptions can be checked and the original objective can be evaluated directly.

The paper also suggests a practical criterion for deciding whether such work is worthwhile. If Mova can access components cheaply and their smoothness bounds are available, weighted sampling may reduce expensive gradient operations. If components arrive only through an external stream and obtaining them is already costly, rejection sampling may consume the theoretical gain. This is a proposal for measuring and designing a future implementation, not evidence of an existing speedup.

### The problem and its context

#### Why the sampling distribution matters

Many optimization problems have an objective that combines numerous smaller functions. A full gradient requires contributions from the entire collection or expectation. SGD replaces that calculation with a gradient from a randomly selected component. When the sampling and scaling are arranged correctly, the sampled gradient has the right expectation.

This makes SGD relevant to large problems in [machine learning](https://md.research.elamur.ai/free/en/concepts/machine-learning/), where processing every component at every step can be expensive. The paper places the method within the stochastic-approximation tradition associated with Robbins and Monroe, then describes its renewed importance for large-scale optimization. The attraction is computational: each step can be much cheaper than a full-gradient step.

Cheap updates still need enough iterations to produce a useful answer. The paper therefore asks what determines the required iteration count. Some factors concern the objective as a whole, such as its curvature. Others concern the particular representation of that objective as randomly accessed components. Two representations can have the same expected objective while producing very different individual gradients.

The smoothness constants are central. A component with a large smoothness constant can change its gradient rapidly as the current point moves. A conservative step size must account for that possibility. If most components have much smaller constants, a guarantee controlled by the largest one can look unnecessarily pessimistic. The question is whether that pessimism comes from the proof, from the algorithm, or from the sampling distribution.

The authors give different answers at different stages. Part of the previous conditioning dependence comes from an analysis that can be tightened. But replacing worst-case smoothness with average smoothness requires more than a sharper proof when the algorithm continues to sample from the original distribution. A rare informative component can remain unseen for too long. Importance sampling changes that information-access bottleneck.

#### What earlier SGD guarantees established

The introduction distinguishes convergence in objective value from convergence of the iterates themselves. An algorithm can make the objective nearly optimal without its iterates approaching a unique point, particularly when the objective is not strongly convex. The main analysis instead assumes strong convexity and measures the squared distance between the current iterate and the unique optimum.

The paper describes classical SGD results with polynomial dependence on the number of iterations. It gives a rate of 1/√k for nonsmooth objectives and 1/k for smooth objectives or strongly convex nonsmooth objectives. These statements provide the broader background against which faster behavior becomes interesting.

Bach and Moulines had established a finite-iteration analysis for strongly convex SGD with smooth components. A particularly favorable situation occurs when the optimum of the combined objective also minimizes nearly every component. At that point every sampled gradient vanishes. The stochastic procedure has no remaining component-level disagreement at the solution, and exponential convergence becomes possible.

The earlier bound also handles the less favorable situation in which individual gradients remain non-zero at the aggregate optimum. Their average is zero there, but their squared magnitudes need not vanish. The paper calls the expected squared magnitude the residual quantity. It enters the iteration requirement separately from the term controlling geometric contraction.

The difficulty is the earlier dependence on the average squared conditioning. When component smoothness constants are comparable, that dependence can be much larger than a linear conditioning dependence. The authors’ first contribution is to close this gap for ordinary SGD using a more careful recursive inequality.

The comparison is conditional. When component scales vary widely, the largest smoothness constant and the average squared smoothness do not have a universal ordering after the relevant normalization. The new ordinary-SGD bound is therefore not presented as dominating the earlier result in every possible instance. The stronger comparison comes after introducing partial importance sampling.

#### The independent route through Kaczmarz

The other line of research concerns systems of linear equations. Kaczmarz iterations use a single row to correct the current estimate. The paper describes applications including tomography and signal processing, where a simple row-based procedure can be attractive.

Strohmer and Vershynin studied a randomized selection rule favoring rows with larger squared Euclidean norms. Their analysis established exponential convergence in the consistent setting, with an iteration requirement that is linear in a condition measure and logarithmic in inverse accuracy.

This resembles the favorable SGD regime, but the paper describes the two literatures as having developed mostly separately. The authors use the resemblance constructively. A squared residual for one row is a smooth convex component function. Its gradient points in the row direction, and its smoothness constant is proportional to the row’s squared norm.

Once those identities are written down, norm-based row selection becomes smoothness-based importance sampling. The Kaczmarz update also supplies a correction by the row norm. This provides a concrete example of how sampling and component scaling can work together.

The connection runs in both directions. Kaczmarz analysis motivates the improved SGD argument and the sampling rule. The SGD framework then clarifies the objective being solved by different Kaczmarz variants, provides step-size-dependent bounds, and leads to a hybrid method with an improved residual dependence.

#### Importance sampling in the surrounding literature

The paper does not claim that unequal sampling was new throughout numerical computation. It discusses importance sampling in coordinate descent, where coordinate-related smoothness quantities guide selection. It also places the idea alongside sampling methods for low-rank matrix approximation, including column selection, matrix completion, and Nyström approximation.

A further example comes from compressive sensing, where the sampling distribution reflects interactions between measurement and signal representations. These examples support the broader motivation: random access can be designed around quantities that predict how useful or difficult an individual contribution will be.

The authors’ specific focus is how to make this principle work for stochastic convex optimization while tracking the relevant convergence terms. Their central contribution is not simply to recommend nonuniform probabilities. It is to show which probabilities improve which parts of a guarantee, why an inverse correction is required, and why a mixture can avoid a weakness of fully biased sampling.

### The method, step by step

#### Define the objective and the source of randomness

The starting point is an objective represented as an expectation:

```
F(x) = Eᵢ∼D[fᵢ(x)]
```

Here, x is the variable being optimized, F is the combined objective, fᵢ is the component associated with index i, and D is the original distribution over indices. E denotes expectation. The formulation covers a finite collection of components as well as a more general probability space.

The variable belongs either to a Euclidean space or to a Hilbert space equipped with the norm used in the analysis. The important feature is that gradients and inner products are available. The paper measures progress toward x★, the minimizer of F.

The component functions are convex and continuously differentiable in the main setting. Their gradients satisfy a smoothness condition:

```
‖∇fᵢ(x) − ∇fᵢ(y)‖₂ ≤ Lᵢ‖x − y‖₂
```

The symbol ∇fᵢ denotes the gradient of component fᵢ. The points x and y are arbitrary locations in the optimization space. The non-negative constant Lᵢ bounds how quickly that component’s gradient can change. The notation ‖·‖₂ denotes the Euclidean norm, or the corresponding Hilbert-space norm.

Smoothness is a property of each component. Strong convexity is required of the combined objective:

```
⟨x − y, ∇F(x) − ∇F(y)⟩ ≥ μ‖x − y‖₂²
```

The brackets denote an inner product, and μ is the strong-convexity parameter. This condition supplies a uniform lower bound on aggregate curvature. It ensures that F has a unique minimizer in the setting considered.

The distinction between component assumptions and aggregate assumptions matters. An individual component need not have a unique minimizer. Indeed, a least-squares component associated with a single row generally constrains only one direction. The collection can still provide enough curvature to make the combined optimum unique.

The authors use L̄ for the average component smoothness and Lmax for its supremum. The average describes typical scale under D; the supremum controls the most demanding component that may be sampled. The central sampling results concern replacing dependence on Lmax with dependence on L̄.

Weighted SGD with partial bias The steps in order.

#### Identify the noise that remains at the optimum

A combined optimum need not minimize every component separately. The paper measures this disagreement through:

```
σ² = Eᵢ∼D[‖∇fᵢ(x★)‖₂²]
```

The quantity σ² is the residual gradient second moment at x★. The expectation uses the original distribution D. A component may push away from the combined optimum even though the expected gradient at that point is zero.

When σ² vanishes, almost every component gradient is zero at the same point. The authors describe this as the realizable regime. A fixed step size can then produce geometric convergence all the way to the optimum under the stated assumptions.

When σ² is positive, a fixed step size generally leaves a residual error term in the guarantee. This does not mean that the objective has no well-defined solution. It means that individual stochastic updates continue to fluctuate at that solution.

This distinction explains why the best sampling policy can depend on noise. Improving the contraction term is especially valuable when the residual is small. If the residual dominates the accuracy requirement, the sizes of corrected gradients near the solution become more important.

#### Start with ordinary SGD

Ordinary SGD draws an independent index from D at each iteration and uses that component’s gradient:

```
xₖ₊₁ = xₖ − γ∇fᵢₖ(xₖ)
```

The subscript k identifies the iteration, iₖ is the sampled index, and γ is a fixed step size. Because the component gradient has expectation ∇F(xₖ), it is an unbiased estimate of the full gradient.

The initial squared distance is denoted ε₀. The target tolerance ε is a desired upper bound on the expected squared distance to x★. The analysis concerns expectation over the random sequence of sampled indices, rather than a guarantee that every realized trajectory obeys the same bound.

For a positive step size smaller than the reciprocal of Lmax, the main theorem gives:

```
E[‖xₖ − x★‖₂²] ≤ [1 − 2γμ(1 − γLmax)]ᵏε₀ + γσ²/[μ(1 − γLmax)]
```

The first term contracts geometrically with k. Its base depends on the step size γ, strong convexity μ, and worst-case smoothness Lmax. The second term is a residual level determined by σ² and the same parameters.

This expression makes the role of step size explicit. Reducing γ lowers the residual contribution, but also makes the contraction factor closer to unity. A smaller step therefore supports greater eventual accuracy while requiring more iterations.

The theorem is useful even before changing the sampling rule. Its conditioning dependence is sharper than the earlier squared dependence in the regime emphasized by the authors. The algorithm is still ordinary SGD; the improvement is in what can be proved about it.

#### Use convex smoothness more carefully

The proof relies on co-coercivity:

```
‖∇f(x) − ∇f(y)‖₂² ≤ L⟨x − y, ∇f(x) − ∇f(y)⟩
```

Here, f is a convex differentiable function with an L-Lipschitz gradient. The points x and y are arbitrary. The inequality bounds a squared gradient difference using an inner product that also measures alignment with the displacement.

A direct smoothness bound would compare the gradient difference with the distance between x and y and then square that comparison. Doing so introduces a squared smoothness constant. Co-coercivity retains the relationship between gradient change and direction.

In the proof, each sampled gradient is separated into its value at the optimum and its change since the optimum. The former produces the residual term. The latter is controlled through co-coercivity. Taking expectations then brings the combined gradient into the calculation.

The appendix is important for understanding the improvement precisely. The proof first produces an expected inner product involving component smoothness constants. It bounds those constants by their supremum, then applies strong convexity to the aggregate gradient. The rigorous contraction statement is therefore an expected-error result; it does not require each individual component to have the aggregate strong-convexity parameter.

The authors then choose a step size for a specified accuracy:

```
γ = με/(2εμLmax + 2σ²)
```

The target ε is the allowed expected squared distance, while μ, Lmax, and σ² have the meanings established above. This choice balances the shrinking initial-error contribution against the residual contribution.

The resulting sufficient iteration count is:

```
k = 2 log(2ε₀/ε)[Lmax/μ + σ²/(μ²ε)]
```

The logarithm contains the initial-to-target accuracy relationship. Inside the brackets, Lmax/μ is the conditioning term and σ²/(μ²ε) is the residual-dependent term. This is the ordinary-SGD guarantee that the later reweighting argument reuses.

The formula is a finite-iteration upper bound. It is not a prediction that every instance requires exactly this many updates. Its purpose is to identify dependencies and establish that a specified tolerance is reached in expectation.

#### Show why the original distribution can be insufficient

The paper does not simply assert that average smoothness would be preferable. It constructs an example showing why that dependence cannot generally be obtained while sampling from the source distribution.

The example has a uniform distribution over N+1 quadratic functions. A distinguished component concerns the first coordinate and contains an unknown sign b. The other components concern the second coordinate. The distinguished component is:

```
f₁(x) = (N/2)(x[1] − b)²
```

The symbol x[1] denotes the first coordinate, N controls the component scale and collection size, and b is either of the signs specified in the construction. The remaining components are identical quadratics in x[2], the second coordinate.

The key issue is access to information. Until the distinguished component is examined, the algorithm cannot determine the required first-coordinate solution. Under uniform sampling, reaching that component takes N+1 draws in expectation.

At the same time, the paper gives average smoothness below 2 and an average-conditioning ratio equal to 2. A guarantee depending only linearly on that average conditioning would suggest an iteration requirement independent of the collection’s growing size. The need to encounter the informative component rules this out.

This is an access lower bound rather than a weakness of one specific step-size choice. No method restricted to the same random component access can infer information it has not received. The example therefore motivates changing the sampling distribution itself.

#### Reweight sampling and compensate the gradient

Let w(i) be a non-negative weight associated with index i. The authors normalize weights so that their expectation under D is unity. For a discrete source distribution with probabilities p(i), the weighted distribution is:

```
pʷ(i) = w(i)p(i)
```

The probability pʷ(i) is the chance of selecting component i after reweighting. The normalization of w makes these probabilities sum appropriately. More generally, the same construction applies to a density or an arbitrary probability space.

Selecting components more often is not enough to preserve the objective. The component function must also be rescaled:

```
fᵢʷ(x) = fᵢ(x)/w(i)
```

The superscript w identifies the reweighted component. Its denominator compensates for the increased or decreased sampling frequency. The construction requires the relevant inverse weights to be well defined on components that contribute to the objective.

The expected objective under the new representation remains unchanged:

```
Eᵢ∼Dʷ[fᵢʷ(x)] = F(x)
```

The distribution Dʷ is the weighted sampling distribution. The equality means that the optimization target, its minimizer, and its strong-convexity parameter remain the same.

The corresponding update is:

```
xₖ₊₁ = xₖ − [γ/w(iₖ)]∇fᵢₖ(xₖ)
```

Now iₖ is drawn from Dʷ. The inverse-weight correction preserves the expected gradient. Components sampled frequently receive smaller corrected steps per appearance; components sampled rarely receive larger ones.

This paired change is the core mechanism. Altering sampling alone would generally alter the expected gradient. Altering component scale alone would generally alter the objective. Their combination gives a new stochastic representation of the same optimization problem.

#### Choose weights that improve smoothness

Rescaling the component also rescales its gradient smoothness:

```
Lᵢʷ = Lᵢ/w(i)
```

The quantity Lᵢʷ is the smoothness constant of fᵢʷ. The convergence theorem therefore applies with the supremum of these new constants, calculated under the weighted representation.

The smoothness-optimal normalized weights are:

```
wL(i) = Lᵢ/L̄
```

The average L̄ is taken under D. These weights favor components with larger smoothness constants. After inverse correction, their scaled smoothness constants are equal to L̄.

As a consequence, the worst scaled smoothness becomes the original average smoothness. The objective’s strong-convexity parameter remains μ, so the relevant conditioning term becomes L̄/μ.

The average smoothness itself is invariant under this reweighting. What changes is the spread and maximum of the scaled component smoothness values. The method is not making the objective intrinsically less curved or more strongly convex; it is improving the stochastic representation through which the objective is accessed.

The residual must also be recalculated:

```
σw² = Eᵢ∼D[‖∇fᵢ(x★)‖₂²/w(i)]
```

The symbol σw² denotes the residual second moment of the corrected gradients under weighted sampling. The expression is written as an expectation under D after accounting for the change of distribution.

For smoothness-proportional weights, components with small Lᵢ receive small w(i). Their residual gradients are therefore amplified by the inverse correction. The paper bounds this amplification using L̄ divided by the infimum of component smoothness.

When the original residual vanishes, this issue disappears. When it does not vanish, fully biased sampling can improve the conditioning term while worsening the noise-dependent term.

#### Mix the original and biased distributions

The main safeguard is a partially biased weight:

```
wmix(i) = 1/2 + (1/2)(Lᵢ/L̄)
```

The first contribution preserves a share of the source distribution. The second introduces smoothness-based preference. For a uniform finite source, this is an equal mixture of uniform sampling and smoothness-proportional sampling.

The paper proves that the resulting worst scaled smoothness is bounded by 2L̄. The weighted residual is bounded by 2σ². Both quantities therefore remain controlled without a dependence on the smallest component smoothness.

For this mixture, the specified step size is:

```
γ = με/[4(εμL̄ + σ²)]
```

The denominator balances the average-smoothness contribution with the original residual. The associated sufficient iteration count is:

```
k = 4 log(2ε₀/ε)[L̄/μ + σ²/(μ²ε)]
```

The conditioning dependence is linear in L̄/μ. The residual term retains its original structure, with the constant-factor allowance made explicit. This is the guarantee the authors compare favorably with the earlier squared-conditioning result.

The mixture is not claimed to be the unique or universally optimal choice. It is a particularly simple choice with a clean guarantee. Its value is that it controls both sources of difficulty at once.

A broader family uses:

```
wλ(i) = λ + (1 − λ)Lᵢ/L̄
```

The parameter λ lies in the interval given by the paper. At λ = 0, sampling is fully smoothness-biased. At λ = 1, sampling follows the source distribution. Intermediate values trade smoothness equalization against protection from large inverse weights.

The family’s bounds make that tradeoff explicit. Increasing the source-distribution share protects the residual term, while reducing the biased share can weaken the average-smoothness bound. The displayed inequalities, instead of the mere presence of some bias, determine the constants.

#### Extend the weighting principle to other regimes

For smooth convex objectives without strong convexity, the paper draws on an existing bound involving averaged iterates. That analysis also contains worst-case component smoothness. Reweighting changes this quantity while preserving the objective values and other terms in the bound.

In that setting, smoothness-proportional sampling replaces the supremum with L̄. The authors do not need the same partial-bias safeguard for the bound they analyze. The conclusion is narrower than the main theorem: it concerns the inherited objective-value guarantee, not the same geometric convergence of distances to a unique optimum.

For nonsmooth objectives, the relevant component constants describe function Lipschitzness rather than gradient Lipschitzness. The paper denotes them Gᵢ. They bound component gradient or subgradient magnitude in the corresponding analysis.

The useful weights become:

```
wG(i) = Gᵢ/Ḡ
```

Here, Ḡ is the original-distribution average of Gᵢ. The resulting second-moment dependence involves the square of that average instead of the average of the squares.

The paper explains the saving through the variance of the component constants. This is a different mechanism from reducing a smoothness supremum, even though the same inverse-weight framework implements it.

In a noise-dominated smooth problem, the ideal weights for the residual term would depend on gradient magnitudes at x★. Those quantities are unavailable before solving the problem. The authors discuss bounds based on Gᵢ and leave dynamically estimated weights outside their analysis.

#### Recover Kaczmarz as a least-squares instance

The least-squares objective is:

```
F(x) = (1/2)‖Ax − b‖₂²
```

The matrix A has n rows and d columns, b is the right-hand-side vector, and x is the unknown vector. The row aᵢ supplies a component residual through its inner product with x.

To represent the sum as an expectation under uniform row sampling, the components are:

```
fᵢ(x) = (n/2)(⟨aᵢ, x⟩ − bᵢ)²
```

The scalar bᵢ is the right-hand-side entry for row i. The factor n compensates for averaging over rows. The component smoothness constant is n times the squared row norm.

The average smoothness is the squared Frobenius norm of A. The paper’s condition quantity is:

```
K(A) = ‖A‖F²‖(AᵀA)⁻¹‖₂
```

The notation ‖A‖F is the Frobenius norm, Aᵀ is the transpose, and the inverse concerns the full-rank case. The second norm is the operator norm. The paper also describes the corresponding pseudoinverse formulation when rank deficiency requires using non-zero curvature directions.

The standard relaxed Kaczmarz correction is:

```
xₖ₊₁ = xₖ + c[(bᵢ − ⟨aᵢ, xₖ⟩)/‖aᵢ‖₂²]aᵢ
```

The parameter c controls the correction size. At the standard setting described in the paper, the update is the usual row projection. Selecting rows in proportion to squared row norms makes this update an instance of the weighted-SGD construction.

Uniformly selecting rows while retaining this normalized update changes the implied least-squares objective. If D is the diagonal matrix of row norms, the target becomes the minimizer of the squared norm of D⁻¹(Ax − b). The letter D here denotes a matrix, distinct from the earlier probability-distribution notation.

The proposed hybrid method instead uses mixed row probabilities and a modified denominator:

```
xₖ₊₁ = xₖ + 2c[(bᵢ − ⟨aᵢ, xₖ⟩)/(‖A‖F²/n + ‖aᵢ‖₂²)]aᵢ
```

The denominator combines average squared row scale with the selected row’s squared norm. Rows are sampled through the equal mixture of norm-squared and uniform selection. Together, these choices preserve the original least-squares objective.

The hybrid guarantee has a geometrically shrinking term and a residual term, just like the general SGD theorem. Its stated condition is c \< 1/2. The practical point is that hybrid sampling requires a corresponding update change; a new row distribution alone does not reproduce the proposed algorithm.

### Experiments and results

#### What the numerical study measures

The experiments study the least-squares instance through the partially biased randomized Kaczmarz family. They vary the mixing parameter, row-scale distribution, and additive noise. The performance measure is squared distance from the current iterate to the least-squares solution.

Every experimental matrix has shape 1000 × 10. The authors generate a vector with standard-normal entries, construct the right-hand side by applying the matrix and adding a random error vector, and then run the solver. Each experiment contains 100 independent trials, with plots showing average behavior.

The step size is chosen through the general partially biased guarantee using ε = .1. This detail matters when interpreting the curves. Changing λ changes the sampling distribution and the quantities entering the recommended step size. The results therefore compare the resulting algorithmic configurations, instead of isolating sampling probabilities under an identical fixed step size.

The study uses synthetic systems designed to reveal different behaviors. There is no named real-world dataset, reported language task, or broad application benchmark. Its strength is control over row scales and noise; its scope is the behavior of these row-action optimization procedures.

The first figure plots approximation error against iterations with a logarithmic vertical scale. The second plots the iterations required to reach an approximation-error threshold of 0.1. These answer related questions: how error evolves throughout a run, and how much work is needed to meet a specified target.

The paper’s numerical discussion gives qualitative rankings but does not tabulate the plotted iteration counts. The one explicit large iteration count is a cutoff for a difficult setting. It is therefore possible to describe the experimental ordering precisely without assigning invented numerical gaps to the curves.

#### The theoretical comparison behind the experiments

The following chart records a numerical feature of the stated bounds, instead of an experimental measurement. It compares the explicit multiplier outside the logarithm and bracketed terms in the ordinary and equal-mixture SGD iteration guarantees.

Explicit prefactors in the strongly convex SGD iteration bounds The mixed guarantee allows a larger constant while replacing worst-case smoothness with average smoothness.

**The numbers**

| System or setting | outer iteration-bound prefactor |
| --- | --- |
| Ordinary SGD guarantee | 2 |
| Equal-mixture weighted SGD guarantee (this paper) | 4 |

These prefactors are not a standalone ranking of optimization speed. The expressions they multiply contain different smoothness quantities: Lmax for ordinary SGD and L̄ for the mixture. The comparison makes the constant-factor allowance visible while keeping the substantive improvement in view.

The main theoretical result is therefore not that every coefficient becomes smaller. It is that the dependence changes from a potentially extreme component scale to an average scale, while residual dependence remains controlled. The numerical study examines circumstances in which that exchange matters.

#### A single unusually large row

In Case 1, most rows contain standard-normal entries. The last row instead has entries with mean 0 and variance 10². The additive error entries have mean 0 and variance 0.1².

This construction gives one row a different scale from the rest. The authors report that fully weighted sampling, λ = 0, performs substantially better than uniform sampling, λ = 1. The trend is monotonic across the tested mixing settings.

The fixed-accuracy experiment makes the uniform endpoint’s difficulty concrete. For Case 1 at λ = 1, the run is stopped after 50,000 iterations, and the desired approximation error has still not been reached. This is a censored observation: it reports failure to meet the threshold by the cutoff, instead of an exact iteration requirement.

The result fits the information-access and smoothness arguments. A component with an unusually large scale can matter disproportionately to the objective and the convergence restriction. Favoring it in the sampling distribution can make progress more effective than treating all rows identically.

The experiment does not isolate every possible mechanism behind the speed difference. The prescribed step size also depends on the mixture. What it shows is that the complete fully weighted configuration is strongly favored in this constructed low-noise, uneven-scale setting.

#### Rows with similar distributions

Case 2 uses standard-normal entries throughout the matrix. The additive error again has mean 0 and variance 0.1².

Here the paper reports similar convergence rates across λ. This is consistent with the method’s logic: when component scales are comparatively alike, smoothness-weighted selection and source selection are less different.

The authors test λ in increments of 0.1 over the stated interval. Among those tested values, λ = 0.7 produces the slowest convergence, while fully weighted selection performs best. The important qualification is that the performance spread is much smaller than in the first case.

This result helps distinguish a useful sampling principle from an absolute promise. Weighted sampling is most compelling when the component quantities used for weighting vary meaningfully. If those quantities are already similar, the available benefit can be modest.

It also shows that the intermediate settings do not form a universally monotonic sequence. The monotonic trend observed in Case 1 is a property of that setup, not a general theorem about λ.

#### Gradually varying row scales and substantial noise

Cases 3, 4, and 5 share a matrix-generation rule. Entries in row j have mean 0 and variance j. This creates row-scale variation throughout the matrix rather than concentrating it in a single exceptional row.

The cases differ in the error distribution. Case 3 uses error variance 20². Case 4 uses error variance 10². Case 5 uses error variance 0.1².

In Case 3, which the authors treat as the high-noise setting, fully weighted sampling is comparatively slow. Intermediate mixtures perform better than both fully weighted and uniform selection. This is the setting where the residual-protection argument becomes especially relevant.

The medium-noise Case 4 also favors hybrid sampling. The paper interprets the result through the balance between contraction speed and the residual error level. A policy that focuses strongly on smoothness can be disadvantaged when the corrected residual gradients matter substantially.

In Case 5, with the lower error variance, fully weighted sampling becomes preferable again. The conditioning benefit matters more when the noise contribution is less restrictive.

The progression is the clearest experimental support for the paper’s central argument. Neither endpoint is uniformly best. The useful mixture depends on the balance between unequal component scales and residual noise.

#### What the reported results establish

The experiments support three conclusions at their stated scope. Row-scale heterogeneity can make sampling policy consequential. Similar row distributions can make the policies behave alike. With heterogeneous rows, increased noise can favor a mixture that would not be preferred in a low-noise setting.

The study does not report numerical speedup factors, uncertainty intervals, or exact intermediate minimizers for every case in its prose. It would be misleading to convert the visual separation between curves into precise percentages or iteration counts.

The results also concern iteration behavior rather than measured total execution time. A weighted sampler can require preprocessing and storage. Those costs are discussed analytically elsewhere in the paper, but the numerical section does not establish an end-to-end runtime advantage including them.

The reported evidence is nonetheless well matched to the theorem’s purpose. The synthetic cases deliberately vary the quantities that the analysis says should matter. They demonstrate the tradeoff instead of claiming that one fixed sampling rule wins regardless of the problem.

### What the ablations show

#### The mixing parameter is the main controlled comparison

The numerical study does not use an ablation table that removes named components from a larger system. Its closest equivalent is the sweep over λ, which moves continuously between fully biased and source-distribution sampling.

That sweep is informative because it changes the balance the theory identifies. At one endpoint, smoothness equalization is strongest. At the other, inverse-weight amplification from changing the distribution disappears. Intermediate settings preserve part of each benefit.

Case 1 shows that this balance can favor the fully biased endpoint throughout the tested range. Case 2 shows that the distinction can become small when row distributions are similar. The noisier varying-scale cases show that an interior mixture can outperform both endpoints.

These comparisons argue against explaining the method through a single slogan such as always selecting large rows more frequently. The paper’s own evidence requires a more conditional explanation: large-row preference helps the contraction-related term, while sufficient coverage of other components protects the residual-related term.

The sweep also has a methodological limit. Since the step-size prescription changes with λ, it is not an experiment in which every ingredient except sampling is numerically fixed. It evaluates the proposed family as configured by its analysis. That is appropriate for comparing the family’s members, but narrower than identifying the isolated effect of probabilities alone.

#### Changing row scales tests the importance signal

The contrast between the first two cases asks whether the proposed importance signal is useful when row scales differ. One case includes a conspicuously rescaled row; the other gives all rows the same entry distribution.

The stronger sampling effect in the uneven-scale case supports the interpretation of squared row norm as a relevant component quantity. In the least-squares reduction, this is not merely an empirical heuristic. It is directly proportional to component gradient smoothness.

The similar-scale case serves as a useful check. A method justified by unequal smoothness should not require a dramatic advantage when the smoothness distribution is already comparatively uniform. The reported closeness of the curves is consistent with that expectation.

These are distributional comparisons, not identical matrices with one row scale altered and every random value held fixed. They reveal behavior under controlled generation rules, rather than a paired causal estimate for one particular matrix.

#### Changing noise tests the residual explanation

The final group of cases keeps the row-variance rule while changing the error variance. This comparison targets the second major quantity in the bounds: stochastic disagreement at the solution.

The switch from fully weighted preference in the low-noise case to hybrid preference in the noisier cases supports the need to track residuals separately from conditioning. If conditioning alone determined the best policy, changing the error distribution would not be expected to produce this pattern.

The result also clarifies the purpose of the source-distribution component in the mixture. Its role is not to supply a better smoothness bound. It limits how strongly inverse correction can enlarge gradients from components assigned small smoothness-based weights.

The authors do not establish a rule that maps a stated noise variance to an optimal λ. The experiments demonstrate that the optimum can move, while the theory explains why such movement is plausible.

#### The lower-bound example separates proof weakness from access limits

The quadratic construction is an analysis rather than a numerical ablation, but it answers an essential controlled question: could a better proof alone replace the worst-case dependence with an average dependence?

The answer is negative for the source-sampling access considered. The unknown information lies in one component, and the algorithm must encounter it. No rearrangement of a convergence proof removes that waiting time.

This strengthens the motivation for importance sampling. Without the example, the average-smoothness result might look like a refinement that could eventually be obtained for ordinary sampling. The construction identifies an obstruction that requires an algorithmic change in access.

Its conclusion should remain tied to the access setting. It does not rule out methods that possess additional information about components, inspect them through another mechanism, or use a different oracle. It establishes why the original sampling distribution cannot generally support the hoped-for bound by itself.

#### Reweighting the earlier analysis isolates the new proof’s contribution

The authors also ask what happens if importance sampling is applied to the earlier squared-conditioning guarantee. Smoothness-proportional weights improve the relevant second moment from the average of squared constants to the square of their average.

That is a real improvement when component scales vary. Yet it retains squared dependence on average conditioning. Importance sampling alone, inserted into that earlier analysis, does not produce the paper’s final linear dependence.

This comparison separates the contributions cleanly. The tighter SGD recursion improves the conditioning exponent. Reweighting changes the component scale appearing in that improved recursion. Partial bias prevents the residual term from acquiring an unfavorable dependence on the smallest smoothness constant.

The final guarantee requires all of these ideas. Treating the paper as only a proposal for nonuniform sampling would miss the analytical contribution that makes the strongest result possible.

### Limitations

#### Assumptions required by the main theorem

The main linear-convergence analysis assumes convex components with Lipschitz-continuous gradients and a strongly convex expected objective. These are explicit mathematical requirements. An arbitrary differentiable optimization problem does not qualify.

Strong convexity supplies a unique optimum and converts gradient alignment into a lower bound on squared distance. Without it, the paper uses a different inherited guarantee involving objective values and averaged iterates. That extension should not be described as the same theorem with an assumption removed.

The authors suggest that restricted strong convexity may be enough for similar conclusions, but leave the analysis for future work. This is a stated possibility, not an established relaxation.

Convexity also matters to the co-coercivity argument. A bound on how rapidly a gradient changes is not, on its own, the full justification used for the improved recursion. Applying the conclusion outside the convex setting would require an additional argument.

#### Fixed step sizes and known target accuracy

The analysis concentrates on fixed step sizes selected for a desired tolerance. The formulas involve quantities such as strong convexity, smoothness, and residual magnitude. Knowing or suitably bounding these quantities is part of making the theoretical prescription operational.

The authors state that standard techniques could adapt the reasoning to decaying step sizes when the desired accuracy is not known beforehand. They do not develop that adaptation as the paper’s main algorithmic analysis.

A careful reader should also distinguish a step-size prescription used in synthetic experiments from an automatically available prescription in a new application. Residual magnitude is defined at the unknown optimum. Having a formula that depends on it does not establish that it can be estimated cheaply or accurately during a real run.

The paper’s contribution is a guarantee under specified parameter information. It does not provide a general-purpose parameter-estimation procedure that removes this implementation issue.

#### Static weights cannot track changing importance

The authors explicitly restrict attention to static reweighting. A component’s importance can plausibly change as optimization proceeds, particularly if the objective is far from the solution or residual behavior becomes dominant.

For minimizing the residual term directly, the ideal weights depend on gradient magnitudes at the optimum. The optimum is unknown, which makes those weights unavailable in advance.

The paper mentions dynamically updating weights from current iterates as a possible direction. It does not prove a convergence guarantee for that strategy. Its observations about dynamic sampling should therefore be understood as research questions.

Static smoothness bounds are useful partly because they can be known independently of the current solution. That convenience comes with a limitation: they target a worst-case component property and need not express current local usefulness.

#### Sampling can cost as much as it saves

The implementation discussion states a practical obstacle. In an online setting, or when access is limited to draws from the source distribution, directly sampling from the desired weighted distribution may be difficult.

Rejection sampling can simulate it. For fully smoothness-biased weights, acceptance is tied to the component’s smoothness relative to the supremum. The resulting acceptance probability introduces a source-sampling cost that can cancel the average-smoothness improvement.

If obtaining samples dominates computation, fewer accepted gradient updates need not mean less total work. If gradient calculation and parameter updates are much more expensive than obtaining and screening samples, rejection sampling can still help.

This is an explicit boundary on the engineering interpretation of the results. The theorem improves a particular complexity measure under weighted access. It does not make access to the weighted distribution free.

The experiments do not quantify preprocessing costs, sampler construction, or wall-clock time. Any implementation claim beyond iteration counts would therefore need additional measurement.

#### Residual bounds and convergence horizons need careful reading

A positive residual means that fixed-step stochastic updates remain noisy at the optimum. The main theorem supplies a shrinking initial-error term plus a nonvanishing upper bound.

The authors can choose a sufficiently small step size for a specified tolerance, but that is different from claiming that every fixed positive step size converges exactly to the optimum. The same qualification applies to the Kaczmarz convergence horizons.

For the fully biased Kaczmarz bound, the residual expression involves the smallest squared row norm. This can be unfavorable, motivating the hybrid construction. The paper’s comparison is a comparison of stated bounds and their dependencies, not a proof that every hybrid trajectory has smaller realized error than every fully biased trajectory.

The bound also describes expected squared distance. It is not a high-probability statement about every run, and it does not eliminate variability across random row sequences.

#### The experiments are deliberately narrow

A limitation visible in the experimental setup is its concentration on synthetic least-squares systems. All matrices have the same stated shape, and the cases are designed around row-scale and noise variation.

This makes the mechanisms easier to interpret but limits empirical breadth. The paper does not demonstrate that the same mixture preferences hold across arbitrary smooth convex objectives, real application data, or substantially different computational environments.

The averages over independent trials provide a view of typical experimental behavior. The numerical prose does not report uncertainty intervals or a full table of exact performance values. The plots support qualitative comparisons, while only explicitly stated counts support precise numerical claims.

The target threshold is also fixed in the numerical study. Since the residual term contains inverse dependence on target accuracy, another tolerance could change the relative importance of contraction and noise. The paper’s theory explains that sensitivity, but the reported study does not map it comprehensively.

#### Some displayed expressions require cautious interpretation

A careful reading should give priority to the complete inequalities over informal descriptions of them. For the general mixture, the smoothness bound includes a term involving the reciprocal of the biased share. An arbitrarily small biased share does not provide the average-smoothness benefit with a uniformly small constant.

Similarly, the standard full Kaczmarz projection and the theorem for relaxed steps should be distinguished. The relaxed-step corollaries impose strict upper bounds on the relaxation parameter. Their residual and contraction formulas cannot simply be evaluated at an excluded endpoint.

The proof’s expectation structure is another important boundary. Individual component functions need not share the aggregate strong-convexity parameter. The appendix obtains the usable contraction after averaging and applying assumptions to the combined objective.

These qualifications do not remove the main result. They specify how to use it accurately: preserve the sampling correction, check the parameter range, and apply the guarantee to the quantity and objective actually analyzed.

### What came after

The paper identifies clear directions for further work, but it does not establish their later outcomes. Its outlook proposes extending the strong-convexity analysis to restricted strong convexity and developing sampling distributions that adapt during optimization. Both directions follow naturally from limitations of the static, globally parameterized treatment.

Dynamic sampling is especially connected to the paper’s distinction between smoothness and residual importance. Smoothness can be estimated without knowing the optimum, whereas the most direct residual-minimizing weights depend on gradients at that optimum. A changing distribution might use information gathered during optimization, but the authors leave its rigorous analysis open.

The paper also discusses parallel research by Zhao and Zhang on importance sampling for nonsmooth stochastic optimization, including composite objectives. The relationship described is concurrent rather than evidence of a later extension. Both treatments connect sampling design to second moments of gradient-related quantities, while the present paper emphasizes its smooth strongly convex result and its Kaczmarz connection.

The established contribution is therefore best understood through the distinctions it makes available for subsequent research: objective versus sampling representation, average versus worst-case smoothness, contraction versus residual noise, and row normalization versus preservation of the least-squares target. The paper proves how these distinctions interact in its stated setting and leaves adaptive sampling and weaker curvature assumptions as explicit open directions.

## Cite

Cite as Deanna Needell, Nathan Srebro and Rachel Ward. 2015. Stochastic gradient descent, weighted sampling, and the randomized Kaczmarz algorithm. Mathematical Programming.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.1007/s10107-015-0864-7](https://doi.org/10.1007/s10107-015-0864-7) · [arXiv 1310.5715](https://arxiv.org/abs/1310.5715)

```bibtex
@inproceedings{needell2015stochastic,
  title = {{Stochastic gradient descent, weighted sampling, and the randomized Kaczmarz algorithm}},
  author = {Deanna Needell, Nathan Srebro and Rachel Ward},
  booktitle = {Mathematical Programming},
  year = {2015},
  doi = {10.1007/s10107-015-0864-7},
  eprint = {1310.5715},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.1007/s10107-015-0864-7}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
