Before you can read the parent note, you need to own every symbol it throws at you. This page builds each one from absolute zero — plain words first, then a picture, then why the topic can't live without it. Read top to bottom: each idea is a brick for the next.
A model is a machine that takes an input (a photo, a half-typed sentence) and produces a guess (a label, the next word). Inside that machine are knobs — numbers you can turn to change its behaviour. Turn them one way and the model predicts "cat"; turn them another way and it predicts "dog".
Look at the figure. On the left is the abstract "machine" with dials; on the right, we've unrolled every dial into a single vertical column of numbers — that column isθ. When the parent writes θ(0), θ(t), θk(t+1), every one of those is just a different column of numbers — a different setting of the same dials.
The little superscript in parentheses, θ(t), means "the value at round number t" — a snapshot in time.
The subscript θk means "the version living on client number k".
Now we need to talk about many devices, each with some data.
The picture of the totals:
n=add up every client’s countn1+n2+⋯+nN=k=1∑Nnk
In the figure, each barrel is one client's data bag; the height of the barrel is nk. The total volume poured into the big tank on the right is n. This picture is the whole reason for the weighting you'll meet next: a fat barrel should have more say than a thin one.
A model needs a way to know it is wrong. That is the job of loss.
Here xi is one input (the i-th photo), yi is its true answer, and i is just another index like k but pointing at one example inside a bag.
One client's total badness is the average loss over its whole bag:
Fk(θ)=nk1i∈Dk∑ℓ(xi,yi;θ)
Read it slowly: sum the badness over every example i in the bag Dk, then divide by how many there were (nk) to get the average. We average (rather than just sum) so a big bag isn't automatically "worse" just for being big.
The global badness stitches all clients together, giving each a vote proportional to its size:
F(θ)=k=1∑NnnkFk(θ)Recall Why not just add the
Fk without weights?
A client with 10 noisy samples would count as much as one with 10,000 clean ones ::: exactly the failure the parent warns about in the "just average the models" mistake — small/noisy clients would drag the model around.
We have a badness score F(θ). Training means hunting for the θ that makes it smallest.
To search, we need to know which way is downhill. That is the gradient.
The figure shows F as a bowl-shaped valley (height = badness). A ball sits on the slope; the orange arrow is ∇F pointing uphill, the teal arrow −∇F points into the valley. Rolling repeatedly along −∇F lands us at the bottom θ∗.
SGD ("stochastic gradient descent") is the same idea but estimating ∇F from a handful of examples at a time instead of the whole bag — faster, a little noisy. "Epoch" = one full pass through a client's bag; E epochs = E passes.
Before we can average anything, we need the single identity that makes the whole scheme legal. Recall F(θ)=∑knnkFk(θ). The gradient of a weighted sum is the weighted sum of the gradients (differentiation passes through addition and through constant weights untouched), so:
Federated training happens in rounds. In each round the server doesn't bother every device (that's slow and drains batteries) — it picks a small sample.
Here j is yet another index letter — same meaning as k, used to avoid confusion when two sums appear together.
A chosen client k receives the current shared model θ(t) and rolls it downhill on its own loss Fk. Writing the round number explicitly, one local gradient step is:
θk(t+1)=θ(t)−η∇Fk(θ(t))
Read it: "start from the shared model θ(t) that just arrived, take a downhill step on my loss, and call the result my new model θk(t+1)." (Doing E epochs just repeats this step E times before sending.) Notice the two index habits meeting at last: the superscript (t+1) says which round, the subscript k says which client.
The server now has one improved model θk(t+1) from each chosen client. It forms the new shared model as the size-weighted average over the present clients:
Put the two boxes together for the simplest case — every client takes one step and everyone participates (St = all N clients, so nSt=n). Substitute the local update into the aggregation:
The last equality is exactly the identity from Section 4. So one round of FedAvg with one local step is one honest gradient-descent step on the global loss F — the server reproduces centralised training without ever touching the data.
Read it as a flow: knobs and loss make a per-client score; counts turn many scores into one weighted global score; gradients let each client descend; rounds and subsets glue their descents together into FedAvg; privacy noise wraps the whole thing. All arrows drain into the topic, Federated learning.
Adjacent tools you can safely postpone until later child pages: Optimization Theory (the convergence proofs), Edge Computing (where clients physically live), Model Compression (shrinking what θ costs to send), Byzantine Robust Learning and Multi-Task Learning (handling malicious or personalised clients).