Let eight workers train alone and meet only now and then. Stich proves they still learn as fast as workers that meet at every step, with far fewer meetings.
Learn why a group of machines can skip most of their talking, how often they may meet, and what the proof says.
Pick how often the eight workers meet, then press New noise a few times. Watch the loss curve barely move while the meetings drop from 600 to 2. Then we build, piece by piece, the baseline, the method, the theorem, its proof, the budget of meetings and the experiments.
You need a feel for a slope (the direction that makes a number smaller) and a little Python for the code. We build the rest from zero, including every word of distributed training.
Based on Local SGD Converges Fast and Communicates Little by Sebastian U. Stich (EPFL), arXiv 1805.09767, version 3 of 3 May 2019. Read here as background for the Core Automation post The Hitchhiker’s Guide to Training on Compute Islands. Every idea is re-taught in our own words and devices.
A real run in your browser, not a recording: ridge regression (a least-squares fit with a small penalty) on 200 made-up examples with 10 features, a fresh random draw each press, averaged over 6 runs. H is the number of steps between meetings. The step size is the paper’s schedule 4 / (µ(a + t)). Toy data, the paper’s algorithm.
Chapter 0
See why eight machines that must agree at every step spend most of their time waiting on the network
Eight machines train one model together. Each machine looks at a different slice of the data. After every single step, all eight must stop and agree on what they learned. Then they take the next step.
Now put four machines in one building and four in another, a long way off. The link between the buildings is thin and slow. The eight machines still stop and agree at every step. Most of the clock now ticks away while they wait for messages to cross that link.
The Core Automation post on compute islands states the goal in two sentences:
“Within an island of compute, use the fast interconnect aggressively. Across islands of compute, exchange updates on a slower schedule.”Rohan Anil, The Hitchhiker’s Guide to Training on Compute Islands (Core Automation, 2 November 2026)
This lesson reads the paper that first proved the second sentence is safe. Sebastian Stich asked a plain question: if workers skip most of their meetings, do they still learn as fast? His answer is yes, for a clear class of problems, and he proves how rarely they may meet.
A model is a long list of numbers, called weights. We write the list as x. The loss is one number that says how wrong the model is on the data. Training means changing x until the loss is small.
The gradient is the slope of the loss. It tells each weight which way to move to cut the loss. A step moves every weight a small distance against the slope. The distance is set by the learning rate.
Computing the exact slope needs the whole dataset, which is far too slow. So we use a stochastic gradient: the slope from one small random sample. It is noisy, but on average it points the right way. Stepping with it is stochastic gradient descent, or SGD. Chapter 1 writes it as an equation.
A worker is one machine (or one group of machines) that computes gradients. Many workers can share a job. In data-parallel training, every worker holds a full copy of the model and reads different data. If you want the full picture, the lesson on data parallelism and all-reduce builds it from zero, and this overview of distributed training shows the wider map.
To agree, the workers run an all-reduce: every worker sends its numbers, and every worker ends with the average. The average of a model-sized list moves through the network each time. How long that takes depends on bandwidth, the number of bits a link carries each second. The bandwidth lesson does the arithmetic.
The paper packs the cost into one ratio, ρ (the Greek letter rho). It is the time of one exchange divided by the time of one gradient computation. The paper says ρ is often 10 to 100 in practice, and larger still on slow networks. A round is one meeting where the workers exchange and average.
Try the clock below. Slide ρ to 25, then change how often the workers meet.
Each bar is the time for one step on average. Blue is computing a gradient. Yellow is talking. The top bar meets at every step. The bottom bar meets every H steps. Move both sliders.
Illustrative model: one gradient takes 1 time unit, one meeting takes ρ units, and a meeting happens once every H steps, so a step costs 1 + ρ/H on average. The paper’s own cost model, with the number of vectors exchanged, comes in Chapter 6.
At ρ = 25, meeting every step makes 26 time units for one unit of real work. The machines compute for under 4% of the time. Meeting every 16 steps drops a step to about 2.6 units. The machines compute for 39% of the time. Meeting every 256 steps lifts it to about 91%.
The catch is plain. If workers meet less often, their models drift apart between meetings. Each one follows its own noisy path. Will the average of those paths still be a good model? That is the question the paper answers.
The background lesson Local SGD and model averaging teaches the idea at a gentler pace. This lesson reads the paper itself.
Chapter 1
Write down the every-step baseline and see why averaging many noisy gradients gives a clearer one
You are walking down a foggy hill to reach the valley. You cannot see the whole slope. At each spot you poke the ground near your feet and feel which way it tilts. That poke is cheap, but it is a little wrong each time.
That is SGD. The hill is the loss. Your position is the model x. The poke is a stochastic gradient. The paper writes one step as one line:
The property E gt = ∇f(xt) has a name: gt is unbiased. A single poke can be far off, yet the pokes do not lean one way. Over many pokes the errors cancel.
Now give the hill to K walkers who stand at the same spot. Each pokes a different patch of ground. They shout their results, average them, and all take the same step. This is parallel SGD. The paper writes it by replacing gt with the average of K gradients computed on K workers.
Why does averaging help? Each poke has some wobble around the truth. The size of that wobble is the variance, written σ² in the paper. It is the average squared distance between a poke and the true slope. When you average K independent pokes, the wobbles partly cancel. The variance of the average is σ²/K.
Try it. The pile below shows 400 averages of K pokes. The true slope is 1.
Each bar counts how many of 400 averages landed in that range. The purple line marks the true slope, 1. Slide K and watch the pile get narrower.
Illustrative: one poke is the true slope 1 plus a Gaussian wobble with spread (standard deviation) σ = 3, so σ² = 9. The same 400 × 64 random draws are reused for every K, so the pile changes smoothly.
At K = 1 the pokes spread over a wide range, and some even point the wrong way. At K = 16 the spread is four times narrower. The spread shrinks by √K, the variance by K. That is the rule behind the paper’s statement that parallel SGD “achieves a linear speedup”.
SGD with one worker reaches loss error of about σ²/T after T steps, when the starting error has faded. The paper takes this from the standard analysis. With K workers the variance in each step drops by K, and the error falls to about σ²/(TK).
Read that again. K workers for T steps reach the error that one worker reaches in TK steps. The number of gradients is the same. The time is K times shorter. That is linear speedup: double the workers, halve the time.
A mini-batch is another way to average. One worker computes b gradients before each step and averages them. The variance drops by b. The paper says its results cover mini-batches too (Remark 2.4): replace σ² by σ²/b. So K workers with batch b act like one big batch of Kb.
Each worker holds the same model x, a list of d floats. It reads b examples and computes its gradient, again d floats. Then an all-reduce adds the K gradient lists and divides by K. Every worker receives the same averaged list of d floats. All K workers apply the same step, so their copies stay identical without any other message.
To take one step, every worker needs the average of all K gradients. So the workers must meet after each gradient. The paper calls out the cost: “in each iteration the results of the computations on the workers have to be shared with the other workers to compute the next iterate.”
The usual fix is a bigger mini-batch: compute more gradients per worker between meetings. That raises the compute-to-communication ratio. But the paper notes that quality tends to degrade when the batch grows too large. Stich proposes a different knob. Keep the batch small. Meet less often.
The failure mode, as a symptom, a measurement and a fix:
Chapter 2
Let each worker take H steps by itself, then average the models, and see where the paths go
Four hikers start at the same rock on a foggy hill. Each one walks down on their own, poking the ground for hints. Every ten minutes they stop, stand together, and agree on the middle of the four positions. Then all four walk on from that one spot.
This is local SGD. Each worker keeps its own copy of the model. It takes ordinary SGD steps on its own random samples. After H steps, the workers average their models. The paper’s name for the group is a “synchronization”, and we say a meeting.
The paper’s Algorithm 1 has K workers. Worker k holds a model xkt at step t. All start from the same x0. At each step each worker does the same four things:
As one equation, this is the paper’s equation (4):
The paper measures the longest gap between meetings with one definition. The gap of a set of integers is the largest difference between neighbours. If you meet every H steps, gap(IT) = H. All the theory uses the bound gap(IT) ≤ H.
Two settings of H are special. If IT holds every step, then H = 1, and equation (4) is parallel mini-batch SGD with batch size K. That is Chapter 1. If IT holds only the last step, then H = T. The workers never talk until the end. The paper calls this one-shot averaging.
Local SGD sits between them. The paper adds a warning in its related work: its bounds “become loose when H → T and our results do not cover one-shot SGD”.
Take K = 2 workers, one weight, learning rate 0.1, and both start at x = 1.0. We give the gradients by hand. The numbers are illustrative.
The workers disagreed a little between meetings (0.92 against 0.85). The average pulled them together. Note one send of one number each way. With a model of d numbers, the meeting moves d numbers per worker.
Now watch it on a real picture. The ellipses are level lines of a loss. The green ring is the best model. Four workers start at the top left.
Blue lines are the four workers’ paths. The warm star is their average. Pick H, then press Replay. Rings mark each meeting.
Toy: a 2-D bowl f(x) = ½(x1² + 0.15 x2²), gradient noise of spread 0.8, learning rate 0.12, 4 workers, 120 steps. Constant learning rate, so it differs from the paper’s schedule. Same algorithm.
With H = 1 the four paths are one path. With H = 6 they fan out a little between rings, then collapse. With H = 30 they wander for a long time before they meet. They all still head to the green ring, because every worker uses the true slope on average.
For parallel SGD the proof is one line: the average of K gradients has variance σ²/K. For local SGD the gradients are taken at different points, so that line breaks. The paper notes that convexity alone gives only the rate σ²/T for the averaged model, “i.e. no speedup”.
The paper’s insight: “Suppose the different sequences evolve close to each other. Then it is reasonable to assume that averaging the stochastic gradients … can still yield a reduction in the variance by a factor of K.” Chapters 3 and 4 turn that into a theorem.
pythondef local_sgd(x0, grad_fn, K, H, T, lr): # x0: (d,) float array X = np.tile(x0, (K, 1)) # K copies of the model, shape (K, d) for t in range(T): for k in range(K): # runs in parallel on K machines X[k] -= lr(t) * grad_fn(X[k]) # one example's gradient, shape (d,) if (t + 1) % H == 0: # a meeting: one all-reduce of d floats X[:] = X.mean(axis=0) # every row becomes the average return X.mean(axis=0)
Chapter 3
Read the paper’s main result one term at a time, and see where linear speedup hides inside it
A shipping company promises a parcel arrives in “two days plus a delay that grows if you pick the cheap carrier”. To judge the offer you need the terms: the base time, the delay, and when each one matters. A convergence theorem is the same kind of promise. It says how far from the best model you will be, as a sum of terms.
The paper proves such a promise for local SGD. First we fix the setting. Then we read the result.
The loss is an average over n examples: f(x) = (1/n) Σi fi(x). The best model is x*, and f* is the loss there. The paper assumes four things about the problem.
The ratio κ = L/μ is the condition number. A narrow, stretched valley has a large κ. A round bowl has κ = 1. In our toy problem κ is about 17.
Run local SGD with the learning rate ηt = 4 / (μ(a + t)), where the shift a is larger than both 16κ and H. Let H be the gap between meetings. Output a weighted average of all the workers’ models over time, with weights (a + t)² that grow with t. Then the paper’s equation (5) says:
Here ST is the sum of the weights, and the paper shows ST ≥ T³/3. The averaged output x̂T weights later steps more. The paper chose quadratic weights, as other works do, to get the best rate.
The paper does not optimise the constants. So it states the shape in Corollary 2.3, equation (6), with a = max{16κ, H}:
The paper then reads off its main claims. For T large enough the first term dominates, and local SGD converges at rate O(1/(KTb)): a linear speedup in both the number of workers K and the mini-batch size b. To keep the first term in charge the paper needs H = O(√(T/(Kb))).
Set the leading term and the drift term side by side. Drop the constants to see the shape. The leading term is 1/(KT). The drift term is κH²/T². The ratio is drift over leading = κKH²/T.
The drift term stays smaller than the leading term when κKH² ≤ T. So H must stay below √(T/(κK)). Take T = 1,000,000 steps, K = 16 and κ = 10. Then H ≤ √(1,000,000 / 160) = √6,250, about 79. This is the paper’s scaling H = O(√(T/(Kb))) with b = 1, and with the constants put back in. The numbers are illustrative.
Try it. The plot shows each term as a curve over T, with every constant set to 1.
Both axes are logarithmic. The warm line is the leading term. Yellow lines are the terms that depend on H. Purple is their sum. The vertical line is your T. Raise H and watch yellow rise above warm.
Illustrative: this plots the four terms of Corollary 2.3 (equation 6) with μ = σ² = G² = 1 and every hidden constant set to 1. The paper does not optimise its constants, so read the order in which terms take over, not the heights.
At small T the H terms win, and the bound is poor. Past a crossover the leading term takes over. The larger H, the later the crossover. That matches what Chapter 0 said: meeting less often is free only once you run long enough.
The failure mode, in three beats. Symptom: the bound is far above the leading term. Measurement: the ratio κKH²/T is well above 1. Fix: lower H, or run more steps.
Chapter 4
Invent a model nobody computes, show it behaves like parallel SGD, and bound how far the real workers stray from it
Four hikers walk on their own. Their gradients are taken at four different places. How can the paper still claim the clean variance drop of parallel SGD? The trick is to ask a different question. Where is the middle of the four hikers, and how does that middle move?
The paper defines a virtual sequence: x̄t is the plain average of the K workers’ models at step t. Nobody ever computes it, except at meetings, when it equals every worker’s model. It is a tool for the proof.
Two more averages are needed. gt is the average of the K stochastic gradients that the workers actually used. ḡt is the average of the K true gradients at the same K places. Each worker steps by −ηt times its gradient, so the middle steps by the average of those:
This line looks exactly like SGD with a batch of K. The only difference: the gradients are taken at the workers’ places, not at the middle. The paper then proves two things. The middle behaves almost like batch-K SGD (Lemmas 3.1 and 3.2). The workers stay near the middle (Lemma 3.3).
Lemma 3.1 is the algebra of one SGD step, with error terms kept. For a step size ηt ≤ 1/(4L) it says:
Two terms are left to control: the noise and the spread. Each gets one lemma.
The K stochastic gradients come from K independent random draws. The variance of a sum of independent things is the sum of their variances. Each gradient has variance at most σ². So:
This is the same fact as Chapter 1. Now it holds for the workers’ different places, because each gradient is compared with the true gradient at its own place. The factor 1/K² comes from the average, and the sum has K terms.
Choose a step t. Because the gap between meetings is at most H, the last meeting was at a step t0 with t − t0 ≤ H. At t0 all workers equal the middle. After that, worker k took at most H steps alone:
Put together, H terms each costing η²G², times H, times 4 for the rate: the paper’s equation (10),
Note that this lemma never uses smoothness or strong convexity. The paper points this out as a reason to expect the same idea to reach non-convex problems.
Now see it with data. The device runs real local SGD on the toy problem with 8 workers, measures the squared spread at every step, and draws the bound 4ηt²G²H² above it.
Blue is the measured squared distance of the workers from their average, at every step. It grows after a meeting and resets. The purple dashed line is the bound from Lemma 3.3. Move H.
Real runs of the paper’s algorithm on the toy ridge problem: 8 workers, 300 steps, average of 4 runs. G² is the largest value of the exact average squared gradient that worker 1 met in any run. The lemma holds for any such bound, so the dashed line is a true upper bound here.
The measured spread stays far below the bound. The reason is plain: the bound squares a sum of H steps, as if all the noise lined up. Real noise partly cancels, so the true spread grows closer to H than to H². The bound is safe and loose.
Plug Lemma 3.2 (noise ≤ σ²/K) and Lemma 3.3 (spread ≤ 4η²G²H²) into Lemma 3.1. You get a recursion of the form at+1 ≤ (1 − μηt)at − ηtetA + ηt²B + ηt³C. Here B = σ²/K and C = 8G²H²L. A technical lemma from earlier work (Lemma 3.4) turns such a recursion into a bound on the weighted average of the et. The weights (a + t)² are what that lemma needs. The result is Theorem 2.2.
The noise term η²B carries 1/K. The spread term η³C carries H². One has a K that helps, the other an H that hurts. The theorem balances them.
Chapter 5
Turn the theorem into a meeting budget and count how many rounds it saves
You run a long training job. A friend asks how many times the machines must meet. You do not want the answer “every step”. You want a number you can plan around. The paper gives one, and it depends on three things you know before you start.
From Chapter 3, the leading term wins when the drift term stays smaller. That needs H = O(√(T/(Kb))). Here T is the number of steps each worker takes. K is the number of workers. b is the mini-batch size: how many gradients each worker averages per step. The total number of gradients is TKb.
The paper states the payoff in words: this “yields a reduction of the number of communication rounds by a factor O(√(T/(Kb))) compared to parallel mini-batch SGD without hurting the convergence rate.” The abstract says it in one phrase: up to a factor of T1/2.
Take T = 1,000,000 steps, K = 16 workers and b = 1. We set the hidden constant to 1, which is a guess, so the numbers are illustrative.
Now make the batch four times larger, b = 4. Then T/(Kb) = 15,625 and H = 125. Rounds are 8,000. A bigger batch eats part of the budget, because it already averages more noise inside each step. The saving in meetings halves, from 250 to 125.
The device lets you change T, K and b. The bars show the rounds on a log scale.
The warm bar is the rounds that every-step mini-batch SGD needs. The teal bar is the rounds that local SGD needs at the largest allowed H. Both axes are logarithmic.
Illustrative: H = √(T/(Kb)) with the hidden constant set to 1 and H never below 1. The paper proves the order of H, not this constant. The total number of gradients, TKb, is the same for both bars.
Two patterns stand out. More steps T buy a bigger H, because a long run washes out the drift. More workers or bigger batches shrink H, because the leading variance term is already small and the drift term catches up sooner. The method pays best for long runs on few workers.
Count the bytes too. A model with 1 billion weights stored in 16-bit numbers is 2 GB. If each meeting moves one such vector, 4,000 meetings move 8 TB, and 1,000,000 meetings move 2 PB. The numbers are illustrative, but the ratio is the same 250.
The theory fixes H for the whole run, but T may not be known in advance. The paper discusses the case where the horizon depends on the target accuracy. Its advice follows Zhang et al.: communicate more often at the start, then less often. Increasing H over time keeps meetings few while still respecting H = O(√(T/(Kb))) at every T.
Dekel et al. note that such asymptotic bounds may be crude in practice, and the paper says the same applies here. Treat √(T/(Kb)) as a guide for where to start, then measure.
For compute islands the shape is useful. A slow link between sites makes ρ large. The rule says a longer run lets the sites meet less often, and a bigger group of workers shortens the allowed gap. The Core Automation post builds on this trade. The DiLoCo lesson shows how modern training puts it to work.
The failure mode: symptom, the loss curve of local SGD lags the every-step curve early on (the hero showed this at step 50); measurement, compare at equal gradient counts; fix, meet more often at the start.
Chapter 6
Put a clock on both computing and communicating, and see when more machines actually finish sooner
A moving company sends K trucks. Each truck carries a load in the same time, so K trucks move K loads at once. But the trucks must meet at a depot after every trip to share a map. If the depot is far, the meetings cost more than the trips. Adding trucks then makes the whole job slower.
Chapter 3 counted only gradients. That hides the cost of meetings. Section 4 of the paper adds it back, and gives one formula for the real speedup.
Wall-clock time has two parts. The first is the gradient work: each worker takes T steps, so computing costs time proportional to T. The second is communication. The paper counts it this way: in each round, 2(K − 1) vectors are exchanged, and there are T/H rounds. A vector here is a model-sized list of numbers.
The paper sets the cost of one such vector against one gradient computation with the ratio ρ from Chapter 0. It notes ρ ≥ 1, and “in practice, ρ can be 10 to 100, or even larger on slow networks”.
The number of steps T needed depends on the accuracy ε you want. From the corollary the paper estimates the steps to reach ε:
The speedup S(K) compares K workers with local SGD against one worker with H = 1. Dividing the single-worker time by the K-worker time, and charging the communication, gives the paper’s equation (13):
Let ε = 0 (a long run), ρ = 25 and K = 16. Then the correction is 1, and S = 16 / (1 + 50 × 15 / H) = 16 / (1 + 750/H).
The gain comes entirely from the 750/H term. Raising H shrinks it. At ε = 0 the best H is the largest one.
Warm is meeting every step (H = 1). Teal is the H you pick. The dashed purple line is perfect speedup, S = K. Move ρ and ε, then look at where the teal line sits.
Equation (13) of the paper as printed, plotted in your browser. The paper’s Figure 2 uses ρ = 25 and shows ε = 0 and one unstated ε > 0. We did not match our heights against the printed curves point by point; the lines of the figure that we read sit higher than this formula gives at ρ = 25, so read the trend (larger H helps) and not the heights.
A link speed shows how ρ arises. The post describes a run over a 25 Gbps link between two clusters. A 2 GB vector is 16 gigabits, so it needs 0.64 s to cross. If one gradient step takes 0.05 s, one vector costs about 13 steps of compute. That is ρ ≈ 13 for one vector, an illustrative figure. A slower link or a shorter step makes ρ larger.
Figure 2a plots S(K) for ε > 0 with a small number of steps. The paper’s reading: “when only a few epochs need to be performed, then the optimal values of H change with the number of workers K”. Also, for a small number of workers, H = 1 is never the best choice.
Figure 2b plots S(K) for ε = 0, the limit T → ∞. Here the paper says “the largest values of H give the best speedup”. As we read the figure, the H = 256 curve runs close to the ideal line.
The paper draws a practical lesson. If you do not know T ahead, increase H over time: meet often at the start, rarely later. That matches the advice of Chapter 5.
The failure mode: symptom, adding workers makes the job slower (S < 1); measurement, the communication factor 1 + 2ρ(K − 1)/H is far above 1; fix, raise H until that factor is near 1, as long as the budget of Chapter 5 allows it.
Chapter 7
Read the paper’s test setup and figures, then rebuild a small version and measure the speedup yourself
A theorem says what must hold. An experiment says what happens. The paper’s Section 4 runs local SGD on a real dataset and counts how many steps it needs to reach a target. Let us read exactly what it did, so a reader could repeat it.
The measured quantity is iterations to the target. The paper turns it into a speedup against K = 1, H = 1, and charges communication with ρ = 25 (Chapter 6).
As we read Figure 3, the curves of the stricter target (ε = 0.0001) climb further with K than those of the looser target (ε = 0.005), which flatten out early. That is the O(1/√K) effect: a run with few steps is dominated by the starting distance and not by the noise, so more workers help little. The authors advise a fix: use more frequent meetings at the start when training on a massive cluster.
We cannot run w8a in a page, so the device uses the toy ridge problem from the hero. It uses the paper’s algorithm and its learning-rate schedule. For each K and H it counts the steps until the average of the workers is within ε of the best loss, over 6 seeds. Then it divides the count for one worker by that count.
Each dot is the mean of 6 real runs. Warm is meeting every step. Teal is the H you pick. Dashed purple is perfect speedup. Pick a stricter target and watch the lines climb.
A real simulation, in your browser, on the toy ridge problem (200 examples, 10 features), not on w8a. Speedup is steps for K = 1 divided by steps for K workers, in iterations; it does not charge for communication, which the paper’s Figure 3 does with ρ = 25. We test the plain average of the workers, not the best of four averages.
Look at the strict target. The measured speedup grows with K, then bends away from the dashed line. That bend is the paper’s point: with a fixed budget of steps, more workers stop paying. The H lines stay close to the H = 1 line, so skipping meetings costs little. These are the two messages of the paper’s Figure 3, on a different problem.
Appendix C notes that the weighted average of the theorem does not need all past iterates. Keep one running average and fold each new model in. For the plain average the update is yt = xt/(t+1) + t yt−1/(t+1). For linear weights it is yt = 2xt/(t+2) + t yt−1/(t+2). The paper’s Table 1 lists these and the quadratic one. The cost is one extra copy of the model.
The paper is open about this. It states the theory as a guide for deep learning, and the experiments as an illustration.
Chapter 8
Remove the last wait: let each worker meet the shared model whenever it is ready, and see what the proof still allows
A relay team of four runners has a rule: nobody may start the next lap until all four have crossed the line. Three runners are fast. One is slow. Every lap the fast runners stand and wait. Most of the team’s time is spent standing still.
Synchronous local SGD has this rule. Even with few meetings, each meeting is a barrier: every worker must arrive before any worker leaves. In a compute island setting the workers differ. Their chips differ, their links differ, and one may stall. Chapter 5 saved meetings. This chapter saves waiting.
The paper’s Section 5 and Algorithm 2 remove the barrier. There is one shared copy of the model, the aggregate, which we call x̄̄. Each worker k works like this:
The paper writes this as equation (14): a worker either takes an SGD step, or, at a meeting step, jumps to the aggregate it reads. The read may be out of date. It holds every update that other workers have reported by then, and perhaps not the newest ones.
The paper calls the number of missing steps the delay, written τ (the Greek letter tau). The theorem needs one condition on what a worker reads: it must contain all updates from steps up to t − τ. Updates newer than that may or may not be there.
Theorem 5.1 then repeats the form of Theorem 2.2. The learning-rate shift becomes a > max{16κ, H + τ}. The drift term has (H + τ)² where the synchronous one had H². So delay and local steps are the same kind of cost. The paper concludes: for T large enough and H + τ = O(√(T/K)), asynchronous local SGD converges at the same rate as synchronous local SGD.
Compare with Chapter 5. There, H alone had to stay under √(T/(Kb)). Here the sum H + τ has the same limit. Waiting less is free as long as the total lag stays inside the same budget.
The device shows four workers, one of them slow. Each block is H = 4 steps of work. Blue blocks are work. Grey hatching is waiting.
Three workers run at full speed. Slide the fourth worker’s speed down. The window shows three rounds of the slow worker.
Illustrative schedule, not a measurement: three workers at speed 1, one at the speed you set, H = 4 steps per block, and no time charged for the meeting itself. The delay is counted as the steps a fast worker takes while the slow worker finishes one block.
At speed 0.4, a synchronous round lasts as long as the slow worker needs: 10 time units for a block of 4 steps. The three fast workers finish in 4 and then wait 6. In the asynchronous mode there is no grey. The fast workers run on. The cost shows up as delay: when the slow worker finally writes, the others have moved on by about 10 steps.
Appendix C.2 adds a clever step. The local sequences do not have to be tied to a worker. A fast worker that has finished its own block can pick up the sequence of a laggard and advance it. The paper’s Table 2 shows two workers: worker 1 computes blocks for its own sequence and then for sequence 2, with the aggregate updated after each block of H steps. In that example the delay satisfies τ ≤ 3H.
Why can this work? In synchronous local SGD the sequences must stay in lock step, because the meeting needs all of them. In the asynchronous version each sequence only needs to eventually reach the aggregate. So any machine may compute it. Slower workers do less between meetings, faster ones do more, and the running averages of Chapter 7 can still be tracked.
For compute islands this matters. Islands differ in chip type and in link speed. The post describes runs across clusters of different sizes and GPU types. A method that does not wait for the slowest island, and that spends the extra work of the fast one, uses the sites better.
The failure mode: symptom, fast workers show idle time in a profile; measurement, the idle share of the barrier, which the device reads out; fix, drop the barrier or balance the load, and keep H + τ inside the budget.
Chapter 9
Keep the numbers, the terms, a checklist and the core code, then follow the links onward
Sebastian Stich asked whether workers that rarely meet can still learn K times faster than one. On strongly convex problems with bounded gradients, he proved they can. Local SGD, where every worker takes H ordinary steps and then the models are averaged, matches the rate of parallel mini-batch SGD in terms of gradients, while the meetings drop by up to a factor of √(T/(Kb)). The proof compares the workers’ average with batch-K SGD and bounds the drift of the workers with H²G². The same holds for an asynchronous version when H + τ stays under O(√(T/K)).
| What | Number | Why it matters |
|---|---|---|
| Rate of local SGD | O(1/(KTb)) for large T | Linear speedup in workers and batch size |
| Largest gap between meetings | H = O(√(T/(Kb))) | The meeting budget |
| Saving in rounds | up to a factor √(T/(Kb)) | Fewer meetings, same rate |
| Learning rate | ηt = 4/(μ(a + t)), a > max{16κ, H} | The schedule the proof needs |
| Output | average of all iterates, weights (a + t)² | Quadratic weights give the best rate |
| Noise lemma | E‖gt − ḡt‖² ≤ σ²/K | Where the factor K comes from |
| Drift lemma | spread ≤ 4ηt²G²H² | Where the price of H comes from |
| Cost model | T/H rounds, 2(K − 1) vectors each, ρ often 10 to 100 | Turns steps into wall-clock time |
| Speedup, equation (13) | K / [ (½ + ½√(1 + ε(1 + H + H²K))) (1 + 2ρ(K − 1)/H) ] | Larger H helps when talking is costly |
| Experiment | w8a, d = 300, n = 49,749, λ = 1/n, ε = 0.005 and 0.0001 | Speedup flattens for short runs |
| Asynchronous condition | H + τ = O(√(T/K)) | Delay counts like local steps |
| Non-convex, other work | H = O(T1/4K−3/4) (Yu et al.) | A stricter limit than the convex one |
| Term | Plain meaning |
|---|---|
| Worker | One machine with its own copy of the model. |
| Stochastic gradient | The slope from one random example. Noisy, but right on average. |
| Parallel (mini-batch) SGD | All workers average their gradients before every step. |
| Local SGD | Each worker takes H steps alone, then the models are averaged. |
| Meeting, round, synchronization | One exchange where all workers end with the same model. |
| H, the gap | The longest run of steps between two meetings. |
| Variance σ² | How far one gradient wobbles from the true slope. |
| G² | An upper bound on the squared size of a gradient. |
| κ = L/μ | How stretched the valley is. Larger means harder. |
| Virtual sequence | The average of the workers, used only in the proof. |
| ρ | Time of one exchange divided by time of one gradient. |
| Delay τ | How many steps out of date the shared model a worker reads can be. |
This is a sketch for a strongly convex problem. grad returns the gradient of one random example. On a real cluster the K rows live on K machines, and the averaging line is the only network call.
pythondef local_sgd(x0, grad, K, H, T, mu, L): # x0: (d,) grad(x) -> (d,) a = max(16 * L / mu, H) # shift: a > max(16 kappa, H) X = np.tile(x0, (K, 1)) # K local models, shape (K, d) y, S = x0.copy(), 0.0 # running quadratic-weighted average for t in range(T): eta = 4 / (mu * (a + t)) # the schedule of Theorem 2.2 for k in range(K): # in parallel, no network X[k] -= eta * grad(X[k]) if (t + 1) % H == 0 or t + 1 == T: # a meeting: one all-reduce of d floats X[:] = X.mean(axis=0) w = (a + t) ** 2; S += w # weights (a + t)^2, as in the theorem y += (w / S) * (X.mean(axis=0) - y) # fold the virtual average into y return y # shape (d,)
The Core Automation post lists the foundations under today’s methods. One line reads “Local updates. Local SGD and federated averaging take many steps between exchanges.” Its history table dates this paper’s analysis to 2018 and describes it as the “convergence analysis and the empirical case for infrequent averaging”, next to the work of Lin et al.
Now press Present or Teach and explain it out loud, from memory: why averaging K gradients cuts the variance by K, what the virtual sequence is, how Lemma 3.3 bounds the drift, and how to pick H. Then go back to the eight workers at the top, choose H = 300, and say why the curve still ends close to the every-step baseline.
Credit: Local SGD Converges Fast and Communicates Little, Sebastian U. Stich, EPFL (arXiv 1805.09767v3, 3 May 2019). Context: Rohan Anil, The Hitchhiker’s Guide to Training on Compute Islands, Core Automation, 2 November 2026. All quotations are short and credited. The devices are our own toys, and every illustrative number is marked.