FedBSS Curriculum, Uncertainty Split, and FedCVT
Prerequisite Knowledge
This lecture builds on the following concepts from earlier lectures. If any feel unfamiliar, review the linked notes before proceeding.
Previously Covered in This Subject
- Distance between two weight vectors — covered in Lecture 3
- Semi-supervised cross-view training — covered in Lecture 13
This lecture builds a client-side curriculum for federated photo models, then sketches a second method that fills missing feature views. The first method, FedBSS (federated learning with bias-aware sample selection), scores each private photo, splits easy from hard at a peak uncertainty, and admits hard photos on a cosine schedule so local copies do not yank the global average. The second method, FedCVT (federated cross-view training), uses attention over aligned people, three-classifier pseudo labels, and a joint loss loop. Data stay on the device throughout.
16.1 Federated Setup and Euclidean Model Drift
16.1.1 What federated learning keeps on the device
Why can two phones start from the same downloaded model and still ruin the next global average? The answer is not a leaked photo. It is how far, and in which direction, each phone walks in weight space.
Federated learning is a training setup that never ships raw examples to a central store. Data never leave the device. A server is the central machine. It holds a global model — one shared set of weights that all clients start from. The server sends copies of those weights to clients. Clients may be many. The working picture here is mobile phones.
Each phone trains on its own photos and labels. That local mix is non-IID — not independent and identically distributed across phones. One phone may hold mostly calm, well-framed shots. Another may hold harsh, unusual shots. Because each phone updates from its own mix, its copy of the weights can move away from the copy it received. The server never sees the pixels. It only later sees updated weights.
This is the same federated rule used in earlier algorithms: send a copy, train locally, send weights back. In FedAvg (federated averaging), the server then takes a size-weighted mean of the returned copies. If client trained on examples and the selected clients together hold examples, the next global weights are
Here is the new global weight vector, is client 's trained copy after round , and the fraction is that client's share of the pooled sample count. When every phone holds the same number of photos, this reduces to a plain mean. What changes in this unit is how far a local copy is allowed to walk before that mean is taken, and how we measure that walk.
Think of a shared recipe card mailed to many home kitchens. Nobody ships their ingredients back. Each cook tweaks the spice amounts from the same starting card. The test kitchen only receives the new spice lists and averages them. The analogy breaks when kitchens disagree on what "spicy" means: averaging two extreme spice lists can yield a recipe nobody would cook.
A local album is like one kitchen's pantry. A calm indoor-cat album is mild spice. A night-time motion-blur album is a heavy hand. The global model is the mailed card. FedBSS will later gate which photos may tweak the spices on a given local epoch. First we need a number for how far the spices moved.
16.1.2 Drift as a distance between two weight sets
A drift is how far a local model moves away from the global model it started as. Drift is a distance. It is the difference between two sets of weights.
Call the received global copy . Architecture stays the same on every client, so layer shapes match. After local training the client holds a new tensor set . Layer 1 has a matrix of weights. Layer 2 has another. Layer 3 has another. For each matching entry we take the difference, square it, and add. The spoken procedure is: take the difference between this copy and that copy, square those gaps, keep adding, and fire them into one number. That number is the drift.
Write the sum of squares as one scalar:
Here indexes layers, index entries in that layer, is the trained local weight tensor, and is the matching tensor from the received global copy. Both live in the same shape as the layer. The result is one scalar, not a matrix.
The spoken name for this number is Euclidean distance. True Euclidean distance also takes a square root:
The classroom walk squares and adds until one number remains. It does not say the square root out loud. For ranking "how yanked is this update," and order clients the same way because the square root is strictly increasing for nonnegative inputs. Exam answers should name Euclidean distance across all layers and show the square-and-add procedure that was taught. If a prompt asks for the geometric length in weight space, include the square root.
Drift (classroom form). Flatten every layer of and of into one long vector of matching entries. Subtract, square, and add. You get a single nonnegative number. If , then and . If one entry differs by and the rest match, then and .
Notation note: papers often write client drift as the gap between a local update and the global update, . That is the same geometric idea. The exam form in this lecture is the distance between the received global weights and the trained local weights.
The ultimate aim is to reduce the drift. Too much drift makes the later average worse. The spoken warning is that too much of it makes the average result fail: the merged model stops working well.
Drift is not only how far. It is also the direction. Each phone's data pulls its weights along a different ray in weight space. One client may walk one way. Another may walk the opposite way. The global copy is one point. Local copies become other points.
Picture a 2-D slice of weight space. The horizontal axis is weight 1. The vertical axis is weight 2. The global copy sits at a marked origin for this round. After local training, each phone is a point some distance away. The length of the arrow is . The heading of the arrow is the direction of the pull. FedBSS will later try to shorten those arrows by delaying the photos that yank hardest.
16.1.3 Worked examples: gentle update and yanked update
Both phones start from the same scalar picture of a weight, used as a teaching stand-in for a full network.
Setup (shared start). Global model weight received: . Same architecture on every phone. Local step uses ordinary SGD,
where (eta) is the learning rate (step size) and is the gradient of the sample loss with respect to that weight.
Example A — gentle photo, barely moved. A gentle photo is already close to what the global model learned. It is already mapped the same way. Loss is tiny. Suppose and the gradient on this photo is . Then the step is , so the weight moves from to .
Drift magnitude:
If we treat this as a one-entry network, and . The copy barely moved. Low loss, small step, small drift.
Final answer: drift . Sense-check: a photo the model already likes should not kick the weights; on a scale of is a relative move.
The same start can produce a very different landing if the photo is a shock. Keep so only the gradient, and with it the loss, changes.
Example B — violent photo, yanked. A violent photo is a completely different shot of the same class. The running picture is two writings of the digit seven: one the server already knows, one the phone just saw. Loss is high. Suppose and the gradient is . Then the step is , so the weight becomes .
Drift magnitude:
That large jump is called yanked. Yanked means a heavy update. Same start . One phone drifts by . The other drifts by . The photo's loss is what decides the size.
Final answer: drift . Sense-check: is a relative move. That is not a nudge. It is a yank.
A yank is the informal name for a large weight update caused by a high-loss sample. High loss large gradient large SGD step large drift.
A two-weight toy makes the tensor sum less abstract. Let the received copy be . After a yanked step let . Then
The scalar classroom pair is the one-dimensional slice of this same geometry.
Scope: The scalar picture assumes one weight, a shared architecture, and a single SGD step on one photo. Real networks have millions of entries. The same sum-of-squares still applies, but one photo's gradient is then a huge tensor. The formula also assumes you compare the copy after local training to the copy as received, not to some other round's global model.
16.1.4 Direction, opposing pulls, and a broken average
Imagine several phones around the same start point. After local training, their copies sit on different rays. Two strong pulls can point against each other. They partly cancel. The average then lands somewhere that suits neither phone well.
The harm is not one phone moving. The harm is many phones drifting at once in conflict directions. Mutual pulling apart is why drift hurts the global model. The server still averages. The average is a compromise among fights, not a model that fits anyone's data.
A numeric cartoon with two clients and one weight makes the cancel visible. Start at . Client A yanks to (step ). Client B yanks the other way to (step ). The plain average is
The server thinks nothing happened. Each client just spent compute on a large local move that the other client undid. Neither client's violent seven is now encoded in the global copy. If both had taken the gentle path, the average would have been and both would have kept a small, shared improvement.
On a plot of "weight after local training" (horizontal) versus "round index" (vertical), opposing arrows of equal length meet back at the start. The takeaway is: length without agreement wastes the round.
Pitfalls.
- Measuring only the size of drift and ignoring direction. Two yanks of can cancel.
- Treating a small average move as "clients agreed." They may have fought to a draw.
- Comparing weights from different architectures. Euclidean distance needs matching shapes.
- Forgetting that non-IID albums create those conflict rays in the first place. Identical IID albums would walk similar paths.
Drift is a Euclidean-style distance between the received global weights and the trained local weights, with a direction as well as a size. Too much conflict among those directions poisons the later average. Next we score each photo before the local walk, so we can delay the shots that yank hardest.
On-device photo models on phones see this every round. One user shoots calm indoor cats. Another shoots night-time motion blur. Both start from the same download. Both upload very different weights. A plain average can satisfy neither user.
16.1.5 Industry applications
Cross-device federated training on mobile phones is the running setting. Clients are devices. Each device keeps private photos. The server only merges weight copies. Keyboard, camera, and sensor streams on a phone also change over calendar time, so the same user is not a fixed dataset. Gboard-style next-word models and on-device photo classifiers are the named pattern: train where the pixels live, average only the weights.
FedBSS will sit on the client and change order and timing of local photos. It does not replace the server mean. That split of labor is why a production FedAvg stack can keep its aggregator and still adopt the curriculum later in this lecture.
16.1.6 Exam notes
Exam note: Expect a reason-and-solve item on what drift is. Write it as a distance between the received global weights and the trained local weights. Name Euclidean distance across all layers. Give a tiny numeric pair such as (drift ) versus (drift ). State that loss size and pull direction both matter, and that opposing pulls make a naive average worse. Yanked means a heavy update from a high-loss violent photo.
16.2 Softmax Loss, Spread, and Uncertainty Scores
16.2.1 Forward pass and the true-class probability
FedBSS does not train the received copy on a raw shuffle of local photos. First it scores every local photo with that copy. Scoring is a read-only look: the weights stay frozen while each image goes through the net.
Procedure:
- Take the global copy just received.
- Run a forward pass on each local image. No local update yet.
- Read the softmax vector — class scores that add to one.
- From that vector, read three working numbers per photo: probability of the true class, loss, and an uncertainty score built from spread.
Softmax turns the last linear scores into a probability vector with and . Here is the number of classes. The demo uses three classes: cat, dog, bird. If the last layer emits raw scores , then
Each is a logit (raw class score before the probability squash). The exponential is always positive, so every is positive, and dividing by the sum forces the vector to add to one. Softmax is a bag of class marbles whose counts add to .
— also spoken as / "p true" — is the probability the model gave to the correct class. If the photo is a cat and softmax puts on cat, then .
True-class probability. Look only at the softmax slot of the labeled class. Ignore how peaked the other slots are when you read . Those other slots will matter for spread in a moment. For a one-hot label , .
16.2.2 Loss as minus the natural log
Loss here is a single number for how wrong the model is on that sample. The verbal form is: loss is minus natural log of , and loss equal to minus of natural logarithm.
where is the softmax mass on the true class, and . If the mapping is right and confident, is near and is near . Natural log is the base- log. The spoken name is natural logarithm, not log base 10.
Why minus log? If , then , so . If shrinks, goes negative, and the minus sign turns that into a positive penalty. As , . A model that puts almost no mass on the true class is charged an unbounded fine.
A log is "how many times you fold the probability." Folding gives zero folds and zero loss. Folding a tiny takes many folds and a large loss. The analogy breaks for , which softmax never allows.
Standard one-hot cross-entropy on a single example is . With a one-hot , every term but the true class is zero, so this is the same as . Some texts write for . This lecture uses natural logarithm.
Limiting check: . Domain check: whenever .
16.2.3 Spread and uncertainty
Spread is the gap between the largest and smallest softmax values on that photo:
where and , both in , so . The smallest softmax mass is part of the definition, not only the largest.
Uncertainty is one minus spread:
The verbal walk is: spread is the difference between the maximum value and the minimum value, minus , which is ; uncertainty is one minus spread, so minus is .
When softmax is peaked on one class, spread is large and uncertainty is small. When softmax is flat, spread is small and uncertainty is large. A flat softmax is the confused region.
Spread versus uncertainty. A three-class softmax that is perfectly sure, , has and . A perfectly confused three-class softmax, , has and . Uncertainty is a peak-to-trough gap turned upside down, not an entropy formula. FedBSS uses this , not Shannon entropy.
Notation note: the FedBSS paper writes the same uncertainty as . This lecture already reserved for the cosine mixer in the next sections, so we keep for uncertainty and for admission fraction. They are different numbers.
On a sketch whose horizontal axis is "position in a loss-sorted album" and whose vertical axis is , the curve often rises toward a hump and then falls. That hump is the peak used in §16.3. Landmarks: left tail near (peaked and correct), crest near (flat), right tail maybe low again (peaked but on the wrong class).
Scope: and are read from one softmax vector of one photo under the current frozen global copy. They change if the copy changes. They are not a property of the photo alone. They also assume a probability vector that already sums to one. Do not mix percent points with probabilities inside the same subtraction ( is a percent-point gap; convert to before writing ).
16.2.4 Worked examples: cat photo and confused bird photo
Walk every arithmetic line. Keep percents and probabilities consistent: .
Example 1 — confident correct cat. Photo 1 is a cat. The true class is cat. Softmax on this forward pass:
| Class | Softmax |
|---|---|
| cat | () |
| dog | () |
| bird | () |
True-class probability:
Loss (natural log). Use . A calculator gives , so
The worked value used in the demo is .
Spread, using probabilities not percents:
(The spoken arithmetic was " minus " then converted to .)
Uncertainty:
This photo is simple for the current global copy. Loss is near zero. The later weight step will be tiny.
Final answers: , , , . Sense-check: a correct peak should be low loss and low uncertainty. Both and sit near zero.
A second photo shows the other end of the scoring ruler.
Example 2 — confused bird. The true class is bird. The copy has not learned this shot. Softmax is not peaked. Spoken values: probability of the correct class , loss , spread very small, uncertainty very high. The model is unsure.
Check the loss:
Now , so . That matches the demo. High loss and high uncertainty together mean: the model is both wrong-ish and unsure. This is a hard photo for the current weights.
Final answer: . Sense-check: is about one third. Minus log of one third is , and is next to that, so the spoken is consistent.
One photo is not a curriculum. After every local image has a loss, the demo lines the album up as a single increasing list.
Example 3 — a full local album sorted by loss. After scoring every local photo, the demo lines them up gentlest to hardest by loss. Spoken loss list, already sorted:
The noisy speech "1.3 million 3.00" is this pair and in a six-photo sort, not a million-scale loss.
Ranks after this sort are . is the lowest-loss photo (, the cat). is the highest-loss photo (). Color later marks simple versus hard. That cut uses uncertainty, not a hand-picked loss cutoff.
A loss of would mean . That is a model putting about on the true class. It belongs at the hard end of the line.
Final lineup: at through at . Sense-check: the list is strictly increasing, so the ranking has no ties in this demo.
16.2.5 Why loss predicts drift
The chain is short and causal:
- A photo goes through the current weights.
- Loss is large when the copy is wrong or unsure on that photo.
- The gradient of w.r.t. the weights grows with that error.
- SGD subtracts a step . A large gradient is a large step.
- New weights minus received weights is the drift.
For the scalar cat versus yanked-seven picture of §16.1, the same turned into drift and into drift . Loss is the number that grew that gradient.
Verbal description: loss impacting the gradient, gradient impacting the weight update, and weight update results into new weight, and the difference between these two is the drift. Loss tells you the drift. If loss is high, loss is proportionate to drift.
So FedBSS never needs to form the full Euclidean tensor distance on every photo in order to rank photos. It ranks by loss, which is cheaper and tracks the yank that photo would cause.
Pitfalls.
- Mixing percent and probability in . Use , not .
- Using when the lecture named natural logarithm. , which is not the demo's .
- Reading spread as when another class actually holds . Spread uses the largest and smallest softmax slots, which may not include the true class.
- Ranking photos by Euclidean weight distance per sample. The taught proxy is loss.
Score first, train later. From one frozen forward pass you read , , , and . Loss is the cheap stand-in for the yank that photo would cause. Next we sort the album by that loss and cut it at the peak of .
Keyboard and camera models on phones already run a forward pass to show a prediction. FedBSS reuses that same pass, before any local SGD, as a hardness meter for the private album.
16.2.6 Exam notes
Exam note: You may be asked to compute , , spread, and uncertainty from a three-class softmax row. Keep percents and probabilities consistent (). Show and . Then state the chain loss gradient update drift. Loss is proportionate to drift through that chain.
16.3 Loss Ranking and the Peak-Uncertainty Cut
16.3.1 Sort by loss and rank samples
After every local photo has a loss, line the photos up gentlest to hardest by loss. Gentlest means lower loss. Hardest means higher loss. The paper writes a sample id and a rank id . is sample number 4. means that sample is the third-lowest loss after sorting. Position is the rank. Sample under rank is the photo that occupies that slot.
Write the sorted loss list as
where is the number of local photos and is the loss of the photo in rank . Ties can be broken by sample id. The six-photo demo of §16.2 already produced
Simple photos (low loss, small later update) are marked green in the demo. Photos that yank the weights are marked red. Green means the sample does not move the network much. Red means the sample yanks the network. The algorithm will not feed the received copy the raw bag of photos. It will make two copies of the idea of the set: an easy pool and a hard pool. Then it will train easy to farthest.
Purpose of the sort. Ranking by loss is a cheap stand-in for ranking by yank. FedBSS still has not updated any weight. It has only ordered the album so a later cut can name an easy pool and a hard pool.
16.3.2 Split at the peak uncertainty, not a fixed threshold
Walk along the loss-sorted list and read each photo's uncertainty . Uncertainty often rises, hits a high point, then falls. That high point is the peak. The demo's peak was . The number is not a magic global cutoff. The peak is what matters. You may pick any numeric peak that the client's own list actually shows.
Let be the rank where is largest:
Photos with rank sit on the lower-loss side of the crest. Photos with rank sit on the higher-loss side. Above the peak (lower-loss side): green, unbiased, simple. Below the peak (higher-loss side): red, biased, hard. "Unbiased" here means photos the current global copy already handles. "Biased" means photos that drag the copy toward this phone's odd mix.
The FedBSS paper writes the same rule as , where that paper's is our . The cut is the sample of highest uncertainty, not a shared numeric threshold.
Why a peak instead of a shared number such as , , or ? Each client holds a different private set. The photo that creates the peak uncertainty is a property of that set and of the current global copy. A server-wide threshold would not fit every phone.
A toy walk for six photos makes the crest visible. Suppose the loss-sorted uncertainties are
The maximum is at rank . Green pool: ranks --. Red pool: ranks --. If another phone's list peaked at on rank , that phone would cut in a different place. Same algorithm, different cut. That is the point of a peak.
On a sketch, the horizontal axis is rank to (easy to hard). The vertical axis is uncertainty . The shape is a hump: low, rising, crest, falling. The landmark is the crest. Split there. Takeaway: the cut travels with the client's own hump, not with a posted number.
Scope: The peak is computed from this round's frozen global copy and this client's current album. Next round, both can change, so the green/red labels can move. The rule also assumes uncertainty actually has a crest. If every is identical, the arg-max is a tie and the cut is not informative — that is a symptom of a still-random model, which §16.5's warm-up is meant to avoid.
16.3.3 Confident-correct, confused, then confident-wrong
Walk left to right on the loss-sorted list.
- Confident and correct. Softmax is peaked on the true class. Example: on cat when the photo is a cat. Loss is small. Uncertainty is small. These are green.
- Confused, peak uncertainty. Softmax becomes flat. The model is not sure. Uncertainty hits its maximum. This is the yellow cut. Split here.
- Confident and wrong. Softmax may peak again, but on the wrong class. Loss is large because is small. The model can look sure while being wrong. These are red.
The transition from correct to wrong passes through the peak of uncertainty. That is why the cut sits on the peak, not on a loss number alone. High-loss red photos drag the model toward this phone's mix. Low-loss green photos are ones the model already handles. They will not cause much drift.
A numeric cartoon of zone 3: suppose bird is the true class and softmax is on (bird, cat, dog). Then , , , . Uncertainty is low again, but loss is huge. A threshold on alone would miss this photo. A peak-after-sort still places it on the hard side because loss already lined it up on the right.
Pitfalls.
- Memorizing as "the" cutoff. It was one demo crest.
- Cutting on a loss number such as for every phone. Loss scales differ across clients and rounds.
- Treating a low- photo as easy without looking at loss. Zone 3 is peaked and wrong.
- Forgetting that green/red are labels of this copy's view of the album, not forever tags on the files.
16.3.4 Paper ranking from sample id to sort id
A worked order from the paper diagram, eight samples:
Paper ranking .
| Rank (easy hard) | Sample id | Meaning |
|---|---|---|
| Sample 7 has the lowest loss. Simplest. | ||
| Next in the loss ranking. | ||
| Sample 4 is third-lowest loss. | ||
| Sample 1 is fourth in the loss ranking. | ||
| Fifth after the sort. | ||
| Sixth after the sort. | ||
| Seventh after the sort. | ||
| Sample 8 is the most complex. |
So is simplest and is most complex. After this sort, split with peak uncertainty into the green part and the red part. Then train by epoch using the cosine mixer in the next section. Some borderline photos can be merged if they sit on the cut. The important act is: sort, split, then schedule.
Final decode: , , . Sense-check: sample id is an arbitrary file number. Rank id is loss order. Mixing them up is the usual exam trap.
Visual: imagine eight photo thumbnails in capture order , then a second row that permutes them into . The permutation is what the sort computes. Color the left block green and the right block red at the uncertainty crest.
16.3.5 Student questions and answers
Several students asked why the cut is a peak rather than a posted number. Collapse those repeats into one answer.
Q: Why choose the peak uncertainty rather than a fixed threshold such as , , or ?
A: Each client has different samples, so you cannot set one common threshold. The peak belongs to that client's data and the current copy. Let the client score its own photos. Fix the cut where uncertainty peaks. A shared cutoff would fail because each client is unique and holds its own private mix. The trigger "use a fixed threshold rather than the peak" sounds neat for a server policy. It fails as soon as two phones hold different albums.
The three-zone walk is a second, distinct confusion: people mix up "unsure" with "wrong."
Q: Walking left to right after the sort, what do the three zones mean?
A: First the model is confident and correct. Then it reaches the yellow confused point, which is the peak. Then it can be confident but wrong. The move from correct to wrong goes through that peak. Treat photos above the peak as simple unbiased points. Treat photos below it as biased hard points.
16.3.6 Exam notes
Exam note: This peak-versus-threshold reason is an exam-style question. Answer with uniqueness of each client's non-shared data, not with a memorized number like . Also be ready to decode paper notation (sample id versus loss rank) and to name the three zones: confident+correct, confused (peak), confident+wrong. Sort, split at the crest, then schedule. Do not invent a global cutoff.
16.4 Cosine Alpha Schedule and Easy-to-Hard Admission
16.4.1 Easy-to-hard mixing with alpha
If every hard photo is legal on epoch 1, why bother sorting at all? The curriculum's whole point is timing: greens start now, reds wait.
The algorithm says: train easy to hard on a cosine schedule. Green photos are always in. They are ready from epoch 1. Red photos enter gradually over local epochs. Alpha is the mixing fraction that decides how much of the red set is admitted this epoch. Alpha varies from to .
Think of school years. LKG and UKG first, then first year, then later years. You slowly raise complexity. You do not hand a child the hardest book on day one. Green photos are LKG: always in the room. Red photos are later grades: they enter when the class is ready. The analogy breaks if you treat a red photo as "failed" and send it home. Every photo still graduates by the last epoch.
Purpose. Delay high-loss photos so the local copy first fits the easy pool. By the time a yanked shot enters, nearby patterns are already in the weights, so the same photo induces a smaller step.
Green photos stay in the training set every epoch. Alpha only gates the red photos. At the end of the local epoch budget, every photo is in. Nothing is thrown away. The trick is timing. By the time the hardest photo enters, the copy has already trained on simple photos and on milder reds. Its drift on the hardest shot is then smaller. If you dump the hardest shot first, drift jumps.
Inputs and outputs.
- In: green set , red set from the peak cut, current epoch , total local epochs , learning rate .
- Out: a mix for this epoch, then an updated local copy after SGD on that mix.
- Hyper-parameter: must be large enough that and every red photo has a slot.
16.4.2 Cosine schedule formula
Verbal description: "what is the formula one minus cos of phi e by e by 2 slow start" and later "alpha c equal to a phi into e by e by 2" with "e is the current epoch and E is the total number of epochs." The intended shape is slow start, faster in the middle, gentle finish. Spoken "phi" is the circle constant , not the golden ratio.
The reconstruction that matches the spoken table (epoch 1 , epoch 3 , epoch 4 , later , last epoch ) is
where is the current local epoch, is the total number of local epochs, , and is the usual circle constant.
Why this shape? At small , is a small angle, , so is near and crawls. In the middle, cosine falls through zero and steepens. At , , so
All red photos are eligible. A linear gate would admit reds at a constant clip. The cosine gate spends extra early epochs on greens, which is what the album's dense-near-the-cut shape needs.
Steps (one local round after the split).
- Keep every green photo in the train set.
- Compute .
- Convert to an integer red count (next subsection).
- Admit that many reds, easiest remaining first.
- Train the mix easy to hard.
- Repeat until , then upload.
The FedBSS paper writes the same mixer as with that cosine . Unbiased (green) plus a cosine slice of biased (red). Standard form matches the classroom formula.
16.4.3 Worked epoch table and how many red samples enter
Take local epochs, as in the demo ("let E equal to 10").
Trace: cosine alpha for .
For epoch :
For epoch :
For epoch : , so . For epoch : , so .
| Epoch | Spoken / rounded | |
|---|---|---|
| 1 | ||
| 2 | ||
| 3 | ||
| 4 | ||
| 5 | ||
| 6 | ||
| 7 | ||
| 8 | ||
| 9 | ||
| 10 |
Final checkpoints: , , , , . Sense-check: the sequence is increasing, starts near zero, hits one half at epoch 5 (midpoint), and ends at one.
How does a fraction become a count? One spoken rule is: round the product of alpha and a sample count. At epoch 4, of six photos is , which rounds to 2. A later spoken walk for six photos:
- Epoch 0: select none.
- Early epochs: about 10–20%, still about one extra slot.
- Epoch 4: about two.
- Epoch 5: three.
- Epoch 6: four.
- Epoch 7: five.
- Epochs 8–10: all six.
That walk multiplies alpha by all six photos. A correction from class: green photos are always in, so alpha should multiply only the red count, not the full six. If three photos are red, use , not . Using six makes the first red look like it enters too early (around epoch 3). Using the red count delays the first hard photo (spoken as the fourth overall sample, ) toward later epochs, including a telling that tough – start near epoch 6.
Write the intended gate as
where is the number of red photos after the uncertainty cut, and is how many red photos may join the greens in epoch .
For :
| Epoch | Mix | ||
|---|---|---|---|
| 1 | three greens only | ||
| 2 | three greens only | ||
| 3 | greens | ||
| 4 | greens | ||
| 5 | greens | ||
| 6 | greens | ||
| 8 | all six photos | ||
| 10 | all six photos |
A simplified milestone picture used while teaching: introduce more hard photos around epoch 4, then around epoch 7, then by epoch 10 alpha is 1 and every sample is in.
You must pick large enough that alpha can reach 1 while still leaving room to bring every tough photo in. If you only run three local epochs, you may train only the easy four and never admit the rest. Covering the whole set is a design choice on , not a separate fancy optimizer. Trial runs can set . One spoken lower bound in that six-photo picture was: you may need on the order of eight epochs before every tough sample has had a chance to enter.
On a plot of epoch (horizontal) versus (vertical, to ), the curve is an S: flat, then steep, then flat. Landmarks: at the midpoint, at the end. Takeaway: slow start, not a linear ramp.
16.4.4 Green always in; do not throw samples away
Green photos are always in. Red photos enter gradually, controlled by alpha. You are not discarding hard photos. You are delaying them. Every image is used by the end of the local run.
Order inside an epoch is easy to hard: train the current mix from gentlest remaining toward the newly admitted reds. After local training, the phone uploads its weights. The server does not change its merge rule. It still takes a plain average and starts the next communication round.
Over rounds, the red set can shrink by itself. Hard photos become easier once the model has seen milder versions. Next round, those photos may no longer yank as hard. Classification into red versus green can change. Drift on former reds gets smaller. That is the "global progressive learning" picture in FedBSS: the biased set shrinks as the global copy absorbs those patterns.
When to use / what not to do. Use the cosine gate after a peak split, with large enough to reach . Do not treat red photos as trash. Do not replace the server mean. Do not run the gate on a still-random copy (see warm-up). A linear gate is a possible alternative; this lecture uses cosine because early reds near the cut are dense and a slow start fits that pile.
Time cost: each epoch still runs SGD on the current mix. Early epochs are cheaper (fewer reds). The last epochs cost about the same as ordinary local training on the full album. Space cost is one extra pass to score and sort, then two index lists and .
16.4.5 Yank, timing, and why later epochs hurt less
The bar next to each photo in the demo is the loss that photo induces, and also its yank. Yank is the informal name for a large weight update caused by a high-loss sample. High loss large gradient large SGD step large drift.
Same photo, two timings:
- Epoch 1 dump. If the fourth-hardest photo is trained immediately, the copy has not yet learned the simple three. Drift is a big yank.
- Late admission. If that same photo enters after epochs spent on (and maybe milder reds), the copy has already seen nearby patterns. Loss is smaller. Drift is smaller. By an epoch-9 picture of a later hard shot, the model has already seen four and five, so seeing six does not yank as much.
Directly introducing first causes more drift. Incremental introduction causes less. That is the whole point of the cosine gate.
A generated numeric demo may print a slightly wrong formula or multiply by the wrong count. The idea to keep is: greens always in, reds admitted by a slow-then-fast-then-gentle , round to an integer count, never drop photos, upload, average.
Pitfalls.
- Multiplying by the full album size. Alpha gates reds only.
- Setting and wondering why never appeared.
- Reading without the divide-by-two. That form leaves , which is not a fraction.
- Treating "phi" as . Here it is .
16.4.6 Student questions and answers
The epoch-budget question is the first distinct confusion: greens-first training can hide the hard tail if is tiny.
Q: We start training with the green samples. Do we have to keep the number of epochs large enough to cover the whole set?
A: Yes. If you keep only three epochs you may train only the easy photos. Raise the epoch budget and more complex photos enter. In the six-photo sketch you may need about eight epochs before every tough sample can appear. Pick so alpha can reach 1 and every red photo is admitted.
Alpha itself is a second confusion: people hear "percentage" and do not see the cosine.
Q: How is alpha controlling which photos get into training?
A: Alpha depends on the current epoch and the total epoch count through the cosine formula. Alpha is a percentage of the red set you are allowed to admit this epoch. At the end it reaches . Substitute into the formula, then turn the fraction into a count with rounding.
Turning a table of ten alphas into a calendar of admissions is a third confusion.
Q: We can list ten alpha values for ten epochs. How do we decide when a given sample actually goes in?
A: Alpha is the allowed fraction. Epoch 0 admits none of the gated set. Small alpha admits a small percent. Epoch 4 at of six photos is about , which rounds to two. Later epochs admit three, four, five, then all. Round the product. In the intended algorithm the three greens stay always in, and this rounding is applied to the red remainder so that is the first gated photo.
The demo's multiply-by-six table is the correction that students tripped on.
Q: Should the round multiply by six (all photos) or by the red count only? The demo showed the first gated sample entering at epoch 3 when multiplying by six, but should follow the remaining three reds.
A: Green photos are always in. Alpha controls only the red ones, not the full six. The product inside round should use the red count (three in that sketch), not the full six. Multiplying by six is what made the first red look like it entered at epoch 3. The main idea stays: greens first, then slowly the tougher samples, so that when arrives the copy has already learned and and the drift is smaller.
The last distinct question is the same photo at two clocks.
Q: Same photo at epoch 1 versus much later (epoch 9). Why is the yank huge early and small late?
A: If you introduce that photo at epoch 1, the copy has not trained on the simpler ones, so drift is a big yank. If you introduce it after the simple and medium photos, the model has already seen nearby patterns. Loss is lower. Drift is lower. Go incrementally. Same hard photo yanks less if introduced incrementally.
16.4.7 Exam notes
Exam note: Expect a numeric cosine-alpha table and a "same photo, early vs late yank" reason. Show for , recover , , , , and . State greens always in, reds gated by , no photo discarded, and why delayed hard photos yank less. The school-year picture is the intended analogy, not a second algorithm.
16.5 Warm-up Rounds and Plain Server Averaging
16.5.1 Why a fresh model cannot rank samples
FedBSS is not applied on a brand-new random copy. Stage one is a warm-up. Stage two is the curriculum (sort, peak split, cosine mix).
Warm-up length used here: 50 communication rounds. Spoken variants were "50 epos", "50 uploads", "50 samples", and "50 pokes". They all point to about 50 server rounds of ordinary local training and upload, without the curriculum gate. During warm-up you do not run the second algorithm. You do not sort. You do not split.
Why wait? A fresh model has near-random weights. Losses are meaningless noise. If you sort or split now, the split jumps around widely every round. Every sample may look similarly hard, or the ranking may shuffle at random. You would mis-label simple as hard and hard as simple. The ranking would be meaningless and unstable.
A random net is like a new grader who has never seen a seven. Every notebook looks equally mysterious. Ranking those notebooks from "easy" to "hard" is a coin flip. Warm-up is the weeks of ordinary marking that make the grades mean something. The analogy breaks once the album itself changes: last week's grader can still be shocked by this week's new pile, which is why warm-up can run again.
Warm-up trains until losses carry real difficulty, not noise. Weights move off the random start. Then curriculum learning can read loss and uncertainty as genuine hardness.
The FedBSS paper names this the diversified knowledge acquisition stage: ordinary aggregation, used as a cold start so the later uncertainty peak does not thrash. Their experiments set warm-up rounds to out of total rounds. is the working number in this lecture. It is not a theorem that is always best. Zero warm-up is worse because the peak jumps. A huge warm-up is also worse because the second stage then has little room left.
SCAFFOLD and FedProx (spoken as "fed box") as studied earlier did not look into this sample-level drift split. They regularize or correct client drift in other ways. FedBSS adds the warmup-then-curriculum attack on which photo yanks the copy.
| Method | Where it acts | What it changes |
|---|---|---|
| FedAvg | Server mean of client weights | Nothing about sample order |
| FedProx | Client loss | Size of the walk, not which photos |
| SCAFFOLD | Client control variates on the gradient | Corrects drift in update space |
| FedBSS | Client sample order and timing | Which photo is legal this epoch |
When to pick which: use FedBSS when you can score and sort the local album and you want a sample-level curriculum. Use FedProx or SCAFFOLD when you want a regularizer or a gradient correction and you will still shuffle the album as usual. They can sit beside each other. They are not the same knob.
Assumption: Warm-up uses ordinary local SGD plus the usual server mean. It assumes enough rounds for losses to separate easy from hard. If devices drop out every round, the copy may never settle and the later sort will still jitter. If labels are pure noise, loss will never mean "hardness" in the photo sense.
16.5.2 Two-stage client procedure
Warm-up trains until weights stabilize. Curriculum then reads those stable losses. Every client follows that order.
Two stages on every client.
- Warm-up. The server sends the current global copy. The first send can be a random-initialized global model. Each client trains locally in the ordinary way for the warm-up budget (50 rounds in this presentation). Weights move from noise toward something that can tell easy from hard.
- Curriculum / FedBSS. Score photos, sort by loss, cut at peak uncertainty, train greens always and reds by alpha, upload.
Those are the two stages: warm-up first, curriculum second. There is no extra stopping rule taught here such as "stop warm-up when loss shows learning difficulty." The working instruction is: run the 50-round warm-up, then switch. Do not hunt a fancy loss threshold that was not derived in this session.
After local FedBSS training, each phone uploads its local model. The server does ordinary aggregation. No new server trick. It takes a plain average of the uploaded weights. That average is the next global copy. Next round starts.
16.5.3 Repeat warm-up when local data grows
After the first global average, the next training session still uses the same two-stage idea. Local data is not frozen. New sensor readings arrive. New cat photos and new sevens appear on the phone. That fresh mass can yank a copy that was stable on last week's album.
So: let the new data be seen during a warm-up so weights adjust, then run curriculum again. You could try jumping straight to curriculum on round two. It is not a crime. Warm-up is still better because the new pile can recreate the same ranking-noise problem.
A phone that collected a week of night-time clips is not the same client that warmed up on indoor cats. The global copy may be decent on last week's mix and still be random-like on the new clips. Scoring the new clips immediately would paint almost all of them red, or shuffle the peak. A short ordinary-training warm-up lets the copy see the new pile before the cosine gate starts delaying it.
16.5.4 Server aggregation stays a plain average
Score each photo's loss. Sort. Cut on uncertainty. Train greens then admitted reds. Then average. That average is the new global model. Drift on the client is still the Euclidean-style distance between the received global copy and the trained local copy, summed across all weights.
If phones upload copies with sample counts , FedAvg still sets
FedBSS changes local order and timing. It does not replace the server mean. A production aggregator can keep this line of code.
Warm-up until losses mean real difficulty, then run the curriculum, then upload into a plain average. Repeat when the on-device pile grows. The server did not gain a new algorithm.
16.5.5 Student questions and answers
The first question is whether warm-up is global or per client.
Q: Is the 50-epoch warm-up done on all clients before the curriculum stage happens?
A: Yes. Every client has two stages. Warm-up first, because the starting weights can be random. Curriculum depends on those weights being stable enough that loss ranks easy versus hard. If weights are still noise, the ranking mismatches simple and tough.
A second, distinct hope is an automatic halt.
Q: What is the stopping criterion for warm-up? Is there a loss-based "learning difficulty" stop?
A: No stopping criterion of that kind is used here. There is no extra rule in this session that halt-warm-up when loss shows a special difficulty signal. Run the planned warm-up (50 rounds), then start the curriculum. Do not invent a loss-threshold halt.
Non-stationary data is the third confusion.
Q: After the first training session and the global average, does the second session run the same two stages again?
A: Yes. Data on the client keeps evolving. New samples and new sensor data arrive and may drift the copy. Run the algorithm again, including warm-up then curriculum.
Some students treated the 50 rounds as the curriculum itself.
Q: Are the first 50 rounds actually for deciding the curriculum?
A: No. Those rounds stabilize the weights before curriculum. The first global copy can be random, so a sample's loss may be wrong for both simple and tough photos. Wait until weights converge enough that the model can assign simple versus tough. Then check. Curriculum is stage two, not the warm-up itself. The trigger "first 50 rounds deciding the curriculum" mixes the two stages. The resolution is that those rounds stabilize the weights before curriculum.
The last question is skipping warm-up once a global copy exists.
Q: The weights come from the global model. Why do we still warm up on the second turn instead of going straight to curriculum?
A: The first time the global copy can be random, so warm-up is required. On later turns you could try skipping warm-up, but warm-up is better. Meanwhile each client may have generated large new volumes of cats, sevens, and other classes. That is the same problem again. Let the new data adjust the weights, then go to curriculum.
Pitfalls.
- Sorting on round 1 of a random net.
- Hunting a loss-based warm-up stop that was not given.
- Treating the 50 rounds as the curriculum.
- Skipping warm-up after new on-device photos arrive.
- Expecting the server to change its mean. It does not.
16.5.6 Industry applications
Phones keep collecting camera rolls and sensor streams between communication rounds. A keyboard or vision model that warmed up last week still sees a new private pile this week. Repeating a short ordinary-training warm-up before the easy-to-hard gate matches that non-stationary on-device data.
FedAvg-style servers can keep their plain mean. FedBSS sits on the client. SCAFFOLD and FedProx remain available as other drift tools, but they are not this sample-sort curriculum.
Cross-device photo classifiers (cats, dogs, birds, handwritten sevens) are the running named setting. The same warm-up-then-curriculum pattern fits any on-device stream whose private mix shifts by the week.
16.5.7 Exam notes
Exam note: "Why warm-up must happen" is a listed question. Answer: random or unstabilized weights make every loss noisy, so sort-and-split would shuffle simple and hard. After about 50 ordinary rounds, losses mean real difficulty, then run FedBSS. Also expect "why warm-up again next round": new local data. Do not invent a loss-threshold stopping rule that was not given. Name the two stages in order.
16.6 FedCVT Attention, Pseudo Labels, and Cross-View Training
16.6.1 Missing raw features and missing representations
The last method is FedCVT (federated cross-view training; the paper is also referred to as CVT). It is exam-relevant. The pass here is high-level, not a full derivation.
What if party B never saw person 4's other-view features? You cannot train a joint classifier on a hole. FedCVT fills the hole in representation space, not by shipping the raw row.
Setting: several parties or people, each with raw features. For some people, some features are missing. A neural net maps raw features to representations — higher-level vectors. If the raw features are missing, the representation is also missing. Example: persons 1, 2, 3, 4. Person 4 has holes. There is still a label column for people who are aligned.
Aligned people have overlapping observed features. Non-aligned people have missing blocks. Party B may be missing one block of coordinates. The job is to fill missing views and still train a classifier.
This is vertical federated learning: parties hold different feature blocks of the same people, and they will not ship those blocks. Horizontal federated learning (FedBSS's phone setting) holds different people with the same feature type. FedCVT is the vertical, missing-view cousin.
Purpose. Expand a small aligned set by (1) estimating missing representations and (2) writing pseudo labels on unlabeled rows, then train three view-specific classifiers together. Privacy constraint: no raw features and no model weights are shared.
A bank that holds account features and a retailer that holds purchase tags is the named picture. They share some customers (aligned) and many unique customers (non-aligned). FedCVT tries to use the unique customers too.
16.6.2 Attention with query, key, and value
To fill a missing representation, use attention. Attention asks: how close is this incomplete person to each complete person?
For person , learn a query vector . Aligned people supply keys and values . Compare the query to each aligned key. Apply softmax over those match scores. Mix the values with those softmax weights.
Verbal description: take this query to this key, apply the softmax technique, and compute the values. A numeric cartoon used in the room: is about of , of , and the rest of a third person. One spoken fragment said " of this value," which cannot be a set of softmax weights. Softmax weights are a convex combination: they are nonnegative and add to . A leftover on completes .
Classroom mixer (as taught).
where is the aligned set, sum to , is the query for the incomplete person, and are the key and value of aligned person , and is the filled representation for .
The filled vector is a soft nearest-neighbor in representation space, not a guess in raw pixels alone.
Standard form (from the FedCVT write-up) inserts the usual attention scale :
The lecture named , , and softmax mixing. It did not speak the factor. Keep the classroom form for the exam. Know that the paper's scaled dot-product is the same mixer with a temperature that depends on the key dimension . Scaling prevents large dot products from making softmax look like a one-hot.
Cartoon fill of . Aligned people: . Spoken mix: , , leftover .
Check: . The weights are a convex combination. If someone heard "," that cannot be a softmax row.
A separate tiny softmax with logits :
That is the same kind of mix, now derived from scores rather than read off the cartoon.
Final classroom mix: . Sense-check: no weight is negative, and the three add to one, so sits inside the triangle of .
Scope: Attention here fills a representation, not a missing raw pixel. It needs at least one aligned person to copy from. If is empty, the mixer has no keys. The scale is in the paper and not required for the classroom formula. Queries, keys, and values are learned maps, not the raw feature columns themselves.
16.6.3 Three classifiers and pseudo labels
After filling, assign a pseudo label when you lack a true label.
Train three classifiers on different views of the available data:
- Trained with only one view (spoken "only blue values") — call this .
- Trained with only the other view (spoken "only red values") — call this .
- Trained with both views — call this .
Feed the sample to all three. Suppose they vote cat at , , and . Majority says cat, so the pseudo label is cat. Two extra gates were stated:
- At least the three classifiers agree (all three agree).
- Every classifier's confidence is above a threshold greater than .
Only then write the pseudo label. Then you can train as if that sample were labeled.
Pseudo-label rule. For an unlabeled row, read three class votes and three confidences. Keep the row only if (i) the three labels are identical and (ii) each confidence is (the lecture's gate; the paper's threshold is this idea, and some experiments use or ). Otherwise drop the row for this iteration. All-agree is stronger than a -of- majority. The classroom still described the vote as a majority that says cat; the keep-rule is all three, not two.
A reject cartoon: votes cat , cat , dog . They do not all agree, even though two say cat and every confidence is high. Do not write a pseudo label. Another reject: all say cat at . They agree, but they fail the gate.
16.6.4 Cross-view training loop
Cross-view training shares representation across models and improves representation learning. Combine several losses and update. Three classifiers give three losses. Update from those losses. Repeat:
- Learn representations from whatever raw features exist.
- Fill missing representations with attention over aligned people.
- Get labels, including pseudo labels that pass the three-way vote and the gate.
- Do cross-view training with the combined losses.
- Repeat.
Named loss symbols and were asked about in passing. They were not derived in this high-level pass. Read them in the FedCVT paper rather than inventing expansions here.
The paper's named objective, for notation only, is a sum of three cross-entropies plus similarity and difference regularizers:
That is the write-up's list. It is not a derivation of or . If an exam asks what those two spoken names are, say they belong to the FedCVT write-up and were not expanded in this pass. The working loop is still: learn, fill, label, train, repeat.
FedBSS is treated as the harder method and the one with more problem-style questions. FedCVT is still on the exam, with more left to self-study (spoken as leaving about 60 to 70 percent). The HTML walkthrough, the presentation, and the paper are the study path for the missing algebra.
Pitfalls.
- Filling raw missing pixels instead of representations.
- Allowing softmax weights that do not add to one (the "" fragment).
- Writing a pseudo label on a -of- vote. The keep-rule is all three, plus .
- Inventing formulas for and . They were named, not derived.
- Skipping FedCVT in revision because FedBSS has more numeric drills. Both appear.
16.6.5 Student questions and answers
The named-loss question is one confusion. The exam-coverage question is another.
Q: What are the losses named L default and L theme?
A: They belong to the FedCVT write-up. They were not expanded in this high-level pass. Read the paper's loss list. The working loop is still: learn representations, fill missing views with attention, get labels, run cross-view training, repeat.
FedCVT still carries an exam item even when a problem sheet is optional.
Q: Will FedCVT appear on the exam, or only FedBSS?
A: Both. FedCVT will have a question. FedBSS has the other problems and is the more complex of the two. If you know the ideas — missing views, attention fill, three-classifier pseudo labels, cross-view losses — you can answer even without a separate problem sheet.
16.6.6 Exam notes
Exam note: FedCVT items are conceptual more than long numeric drills in this pass. Be ready to: (1) say why missing raw features also drop representations, (2) sketch , , and softmax mixing of aligned people, (3) state the three-classifier pseudo-label rule with all-agree and , (4) list the loop learn fill label cross-view train. Problems in the set are based more on FedBSS. Still study FedCVT. A majority vote of three classifiers writes a pseudo label only after the two gates.
Exam Guidance Summary
Several items are reason-and-solve, not one-line definitions. If you understand the mechanism you can answer even when a worksheet is not separately posted. Read the FedBSS paper, the presentation, and the HTML walkthrough. The same holds for FedCVT at a slightly higher self-study share.
High-value questions collected in this session:
- What is drift? Euclidean-style distance between received global weights and trained local weights, with direction as well as size. Too much drift poisons the average. Keep the pair (drift ) versus (drift ).
- Why the peak, not a threshold? Each client's private mix has its own uncertainty peak. A global cutoff such as cannot be shared. in the demo is an example peak, not a constant to memorize.
- Three softmax zones. Confident+correct; confused (flat softmax, peak uncertainty); confident+wrong.
- Compute loss and uncertainty. , , . Worked checks: , .
- Paper ranks. Decode versus . Example: simplest, hardest.
- Cosine alpha. , greens always in, reds admitted by a rounded fraction, no sample dropped. Same hard photo yanks less when admitted late. For , recover , , , , and .
- Why 50-round warm-up? Random weights make losses noise. Sort-and-split would misclassify simple and hard. Warm-up until losses mean real difficulty. No extra stop rule was derived here.
- Why warm-up again next round? New on-device photos and sensor data.
- FedCVT. Attention fill of missing views, three classifiers, pseudo labels with all-agree and , cross-view losses. Expect a question. FedBSS still carries more of the problem load.
Write reasons, not only names. Show the numeric substitutions when a table is asked. FedBSS carries more numeric drills. FedCVT is still on the paper. Do not skip either.
Key Industry Applications
On-device federated photos. Phones train cat/dog/bird (and digit) classifiers without uploading pixels. Non-IID camera rolls yank local copies unless hard shots are delayed. FedBSS is the client-side curriculum for that setting: score the private album, split at the local uncertainty peak, admit reds on a cosine clock.
Streaming sensors. Client data evolves between rounds. Warm-up then curriculum is rerun so new sevens and new cats do not immediately dominate SGD. A keyboard model or a camera model that was stable last week still sees a new private pile this week.
FedAvg-compatible servers. FedBSS keeps the server as a plain average. The curriculum is a client-side order and timing policy. An existing aggregator does not need a new merge rule.
Vertical and missing-view collaboration (FedCVT). Parties hold different feature blocks. Attention over aligned people fills a missing party. Pseudo labels let unlabeled rows join training when three view-specific classifiers agree with confidence above one half. A bank-plus-retailer pair that shares some customers and not others is the named collaboration.
Related federated baselines. SCAFFOLD and FedProx address client drift without this sample-level sort. FedBSS adds warmup-plus-curriculum on the album itself. Pick the sample curriculum when photo order is the problem. Pick a proximal term or a control variate when the walk size or the gradient correction is the problem.
DML Lecture 16 notes · FedBSS Curriculum, Uncertainty Split, and FedCVT
Sections Breakdown
Federated phones keep photos on device; drift is a Euclidean distance with size and direction.
Score each photo with a frozen forward pass: true-class probability, loss, spread, and uncertainty.
Sort by loss and split at the client's own peak uncertainty into easy and hard pools.
Keep green photos every epoch; admit red photos on a cosine alpha schedule.
Warm up about 50 rounds before ranking, repeat when local data grow, and keep a plain FedAvg server.
Fill missing views with attention, write three-classifier pseudo labels, and run cross-view training.
High-value reason-and-solve questions spanning FedBSS numerics and FedCVT ideas.
On-device photo and sensor federated training, plus vertical missing-view collaboration.
Exam Revision Notes
Below is the distilled, exam-ready core. Every entry comes from the full explanation above. Use this section for rapid review; return to the main notes when a point needs more context.
Federated Setup and Euclidean Model Drift
Must-know: Drift is the distance between received global weights and trained local weights; opposing pulls make a naive average worse.
⚠️ Top pitfall: Measuring only drift size and ignoring direction, so two equal yanks cancel in the average.
Self-check: Global weight 3.0 moves to 3.05 on a gentle photo and to 0.8 on a yanked photo. What are the two drift magnitudes?
Connects to: 16.2 Softmax Loss, Spread, and Uncertainty Scores, 16.5 Warm-up Rounds and Plain Server Averaging
Softmax Loss, Spread, and Uncertainty Scores
Must-know: From one softmax row compute p_true, L=-ln p_true, spread, and uncertainty; loss is proportionate to drift through the gradient step.
⚠️ Top pitfall: Mixing percents with probabilities, or using log base 10 instead of natural log.
Self-check: Softmax (0.92, 0.05, 0.03) on a cat photo. Compute L, s, and u.
Connects to: 16.1 Federated Setup and Euclidean Model Drift, 16.3 Loss Ranking and the Peak-Uncertainty Cut
Loss Ranking and the Peak-Uncertainty Cut
Must-know: Cut at the peak uncertainty, not a shared numeric threshold, because each client's private mix is unique. Decode X_i versus S_j and name the three softmax zones.
⚠️ Top pitfall: Memorizing 0.95 as a global cutoff, or treating a low-uncertainty photo as easy when it is confident and wrong.
Self-check: Why is a peak better than a shared threshold such as 0.85? What is X_7 if it occupies S_1?
Connects to: 16.2 Softmax Loss, Spread, and Uncertainty Scores, 16.4 Cosine Alpha Schedule and Easy-to-Hard Admission
Cosine Alpha Schedule and Easy-to-Hard Admission
Must-know: Alpha is (1-cos(pi e/E))/2. Greens always in. Reds admitted by round(|R| alpha). Same hard photo yanks less late.
⚠️ Top pitfall: Multiplying alpha by the full album size instead of the red count, or omitting the divide-by-two in the cosine formula.
Self-check: For E=10, what is alpha at epochs 1, 3, 4, 6, and 10?
Connects to: 16.3 Loss Ranking and the Peak-Uncertainty Cut, 16.5 Warm-up Rounds and Plain Server Averaging
Warm-up Rounds and Plain Server Averaging
Must-know: Warm-up first because random losses are noise; warm-up again because new local data arrive; no extra stopping criterion; server still averages.
⚠️ Top pitfall: Treating the first 50 rounds as the curriculum, or inventing a loss-threshold halt for warm-up.
Self-check: Why must warm-up happen before sort-and-split, and why run it again next round?
Connects to: 16.1 Federated Setup and Euclidean Model Drift, 16.4 Cosine Alpha Schedule and Easy-to-Hard Admission, 16.6 FedCVT Attention, Pseudo Labels, and Cross-View Training
FedCVT Attention, Pseudo Labels, and Cross-View Training
Must-know: Missing raw features drop representations; fill with Q,K,V softmax mixing; pseudo labels need all-agree and >50%; loop is learn, fill, label, train.
⚠️ Top pitfall: Treating 110 percent as a softmax mix, or inventing formulas for L_default and L_theme.
Self-check: Person P4 is filled as 60 percent of P1 plus 30 percent of P2. What must the leftover weight on P3 be, and why?
Connects to: 16.5 Warm-up Rounds and Plain Server Averaging
Was this lecture useful?
BitsNotes AI Assistant
Subject Notes AssistantConfigure AI Chat
Choose how to access the chatbotSigned in as
Powered by BitsNotes — 20 messages per day. No API key needed. Want unlimited access? Use "Bring Your Own Key" mode.
Sign in to use AI Chat
Get 20 free AI messages per day to ask questions about your lecture notes. Sign in with Google or GitHub — it takes 5 seconds.
Sign In to BitsNotesSwitch to "Bring Your Own Key" tab above for unlimited access with any OpenAI-compatible provider.