Emerging Subjects in ML and Collaborative Learning
APM_51178_EP · Year 1 · Period 1
Contents
- Introduction and overview
- 0. Review: SGD and its analysis
- 1. Landscape of emerging topics
- 2. Distributed learning
- 3. Federated learning
- 4. Byzantine robustness
- 5. Differential privacy
- 6. Collaboration, personalization, fairness
- 7. Scaling and compute
- 8. Course research notes — CMAP (El Mhamdi, Dieuleveut)
- Exercises
- Projects and assessment
- References
Introduction and overview
| Module | EA Collaborative Learning — SynapseS 2026-2027 sheet: “Programme d’approfondissement — EA Collaborative Learning” (occurrence: “EA - Collaborative Learning”, X3A MA3, applied mathematics department); the 2025-2026 sheet of the same course unit was titled “Emerging Topics in Machine Learning - Collaborative Learning”, hence the name of these materials |
| Code | APM_51178_EP |
| Team and workload | Course coordinator (“Responsables” on the 2026-2027 sheet): Paul Mangold (CMAP, École Polytechnique), also the coordinator of the occurrence — the sheet names no other instructor · 36 h in person (lecture/tutorial/lab split not displayed on the sheet; enrollment 1 to 32 for the course unit, at most 42 for the occurrence) · 4.5 ECTS (value retained for the LLGA; 5 ECTS for the École Polytechnique degree, the MJH masters and exchange programs) · teaching languages: French and English · collaborative learning studied through a research approach: distributed and federated learning, Byzantine robustness, differential privacy, with three paper-reading sessions and a group research project. |
| Status in the program | P1 electiveGraph × LLM route M1 · S1 / period 1 (fall semester, from 17/09/26 to 18/12/26) · one of the “Choose 3” electives of Year 1 · Period 1, preselected by the Graph × LLM route of the home page |
Audience: an engineer who deploys ML and hits distribution, federated learning, robustness. Empirical first: FedAvg that stalls as soon as 3 clients are Byzantine; DP-SGD that costs −6 accuracy points for ε=8; then we name robust aggregation, DP composition, scaling.
Distributed / federated learning, Byzantine robustness, privacy — the systems view of LLMs (CMAP).
What you will be able to do
- Analyze distributed stochastic gradient descent: convergence speed, the effect of mini-batch size, step size, and number of workers.
- Distinguish distributed learning architectures (centralized, local, federated) and their communication/computation trade-offs.
- Explain the federated learning model (FedAvg) and its assumptions, in particular data heterogeneity across clients.
- Identify Byzantine failures in a learning cluster and apply the robust aggregation rules that neutralize them.
- Define differential privacy (ε-differential privacy), apply it to SGD, and interpret the utility/privacy trade-off.
- Reason about collaboration challenges: per-client personalization, fairness across participants, incentives.
- Estimate the cost of a training run (scaling models and compute) and read the scaling laws that structure the field (self-study).
- Turn a theme of collaborative learning into a well-posed research question, and work on it in a group up to a presented and written research project.
- Read a research paper in three passes and write a critique of it: claim, assumptions, evidence, scope, next question.
Official objectives and syllabus (2026-2027 catalog)
Official objectives: the 2026-2027 SynapseS sheet of the course unit (APM_51178_EP, “EA Collaborative Learning”) now displays a short description.
In paraphrase: the course explores collaborative learning through a scientific approach and teaches students to formulate their own research questions; the class first studies together the foundations of several themes, then students carry out group activities around these questions; finally, three sessions are devoted to reading scientific articles, to learn how to read them and how to take a critical view of their content.
The sheet names neither the themes nor a session-by-session programme, and displays no separate objectives list. The only assessment text it shows (in the section of the MScT IoT track; the LLGA section is empty) is that the final grade is based on the presentation and the report of the research project prepared during the course unit; the recommended prerequisite (MAP433) is stated for the engineering cycle only.
The title and its history (“Emerging Topics in Machine Learning - Collaborative Learning” in 2025-2026, under the Dieuleveut & El Mhamdi team as recorded earlier on this site) designate the field: collaborative learning — learning together when data, computation and participants are distributed, heterogeneous and mutually distrustful.
The following table maps every element of the official description to the section that covers it; the choice of themes is ours, built on the published literature of the field (see the References).
| Element of the official description / theme chosen for it | Section of the course |
|---|---|
| “Explore collaborative learning through a scientific approach” — studying together the foundations of several themes | ch. 0 to 6 (sessions 1 to 9); the themes chosen are the rows below |
| “Learn to formulate your own research questions” | 1.1 (from a theme to a research question: definition, criteria, worked example), session 2 |
| “Group activities around these questions” | 1.1 (group format and question sheet), the practice column of sessions 2 to 9, and the research project (Ex. 13) |
| “Three sessions devoted to reading scientific articles”, learning to read them and to take a critical view | 8.3 (three-pass reading, critique grid, worked critique of Krum) applied in sessions 10 to 12 to the papers of 8.1 and 8.2 |
| Optimization foundations: SGD and its distributed analysis (the expected core of a course unit of the applied mathematics track) | ch. 0 (review: SGD and its analysis), extended to the distributed case in ch. 2 |
| Distributed learning (parallelizing training, communication/computation trade-offs) | ch. 2 (distributed learning) |
| Federated learning (data that never leaves its owners, FedAvg, heterogeneity) | ch. 3 (federated learning) |
| Collaboration in the presence of faulty or malicious participants (Byzantine robustness) | ch. 4 (Byzantine robustness) |
| Confidentiality of shared data (differential privacy) | ch. 5 (differential privacy) |
| Incentives to collaborate: personalization, fairness across participants | ch. 6 (collaboration, personalization, fairness; 6.1 fairness across participants) |
| Scaling models and compute (not named by the sheet; kept from the 2025-2026 “emerging topics” title) | ch. 7 (scaling and compute), self-study |
| Research project (the only assessment modality shown on the sheet), prepared in groups | question chosen with 1.1 on one of the topics of ch. 2 to 7; leads in ch. 8 (research papers of the field) and in the exercises (Ex. 13) |
Two cautionary points, stated honestly:
- since the 2026-2027 sheet names no theme, the choice of themes is a reasoned reconstruction around the official title — the actual syllabus announced at the start of the course unit by the coordinator will be authoritative; the structure, by contrast (foundations together, group work on research questions, then three paper-reading sessions), is the sheet’s and the session plan follows it;
- the 2026 renaming (“EA Collaborative Learning”) narrows the course unit to collaborative learning: the generic “emerging” chapter on scaling (ch. 7) goes beyond it and is therefore studied outside class, while ch. 1 (landscape) is used in class as the starting point of the research questions.
| Official field | Published value (SynapseS 2026-2027) |
|---|---|
| Fields | Applied Mathematics |
| Workload | 36 h in person (split into lectures / tutorials not displayed) · enrollment 1 to 32 (course unit), at most 42 (occurrence) |
| Coordinator | Paul Mangold (course unit and occurrence) |
| Period / language | Fall semester, period 1 (17/09/26 – 18/12/26) · French, English |
| Prerequisites | For the engineering cycle: MAP433 strongly recommended · otherwise: not disclosed |
| Assessment | Grade format: numerical out of 20 and letter grade · the LLGA section of the sheet is empty (no assessment rule, no ECTS displayed for the track) · the only assessment text, shown in the MScT IoT section: final grade based on the presentation and the report of the research project prepared during the course unit · for the other listed degrees: resit allowed (max of the two grades; MJH: resit grade kept), course unit acquired if final grade ≥ 10, grade counted in the GPA · ECTS shown: 5 for X, MJH and exchange programs, 4.5 for the MScT TRAI track, 4 for the MScT IoT (the site keeps 4.5 for the LLGA, see above) |
Where this course fits in the program
One of the “Choose 3” electives of Year 1 · Period 1 (36 h, 4.5 ECTS), preselected by the Graph × LLM route of the home page. The official sheet recommends MAP433 for students of the engineering cycle; in practice, this module assumes the optimization foundation of the Machine Learning module, whose opening chapter covers the analysis of SGD — extended here to the distributed case — and the theory of generalization.
The two refreshers (Refresher in Statistics, Refresher in Computer Science) are its upstream prerequisites. The course unit is shared with the engineering cycle (X), the MJH master, exchange programs, the MScT Visual Computing and Creative AI track, and (according to the assessment sections of the sheet) the MScT IoT and TRAI tracks.
Downstream, this module opens three directions. Privacy and Uncertainty Quantification (M2) extends the differential privacy seen here toward private inference and uncertainty quantification; ML Ops and LLM Engineering Principles (M2) picks up scaling and the systems viewpoint for industrializing LLMs; Reinforcement Learning and Autonomous Agents (Period 2) draws on the same questions of collaboration and multiple agents, up to multi-agent RL.
Course outline
- Review: SGD and its analysis: convergence of stochastic gradient descent, taken from the Machine Learning module and extended to distributed systems.
- Landscape of emerging topics: a map of the research fronts that structure large-scale ML today, and how to turn one of them into a research question of your own.
- Distributed learning: parallelizing training, synchronizing workers, arbitrating between communication and computation.
- Federated learning: learning on data that never leaves its owners — the FedAvg framework and its variants.
- Byzantine robustness: detecting and tolerating faulty or malicious workers in aggregation.
- Differential privacy: formalizing and guaranteeing the protection of individuals during training.
- Collaboration, personalization, fairness: learning models together that remain useful to everyone — and fair.
- Scaling and compute: what large models cost, and what the field’s scaling laws say.
- Course research notes — CMAP (El Mhamdi, Dieuleveut): the research of El Mahdi El Mhamdi (Byzantine robustness) and Aymeric Dieuleveut (stochastic SGD, federated learning), CMAP, and a method for reading papers critically — the material of the three official paper-reading sessions (the 2026-2027 coordinator is Paul Mangold).
Session plan
36 h in class = 12 sessions of 3 h. The volume is the one of the SynapseS 2026–2027 sheet (36 h in person, lecture/tutorial/lab split not displayed). The sheet gives no session-by-session programme, but it does fix the structure, and the plan follows it: foundations of several themes studied together, with group work on research questions (sessions 1 to 9), then three sessions devoted to reading scientific articles (sessions 10 to 12).
To make room for those three sessions, the scaling chapter (ch. 7), which the sheet does not name, moves to self-study, and distributed learning (ch. 2) and Byzantine robustness (ch. 4) take one session each.
Level 1 = foundations (reviews, definitions, first worked examples, framing a research question), 2 = core methods (the distributed, federated, robust and private algorithms with their guarantees), 3 = research material (reading and criticizing the papers that founded these methods); the level never goes down from one session to the next.
| Session | Hours | Level | Content | Practice |
|---|---|---|---|---|
| 1 | 3 h | 1 | ch. 0 Review: constant-step SGD with full proof, lower bounds, variance reduction, momentum and sampling | Ex. 1, 2; lab: SGD versus SVRG on a finite sum |
| 2 | 3 h | 1 | ch. 1 Landscape and threat model; 1.1 From a theme to a research question | groups formed; each group drafts a question sheet (1.1) |
| 3 | 3 h | 2 | ch. 2 Distributed SGD, linear speedup, quantization, error feedback, asynchrony, gossip | Ex. 7; lab: QSGD and top-k with error feedback |
| 4 | 3 h | 2 | ch. 3 FedAvg, client drift, convergence | Ex. 3 |
| 5 | 3 h | 2 | ch. 3 (continued) FedProx, SCAFFOLD, personalization, cross-silo and cross-device | Ex. 8 |
| 6 | 3 h | 2 | ch. 4 Threat model, attacks, median and trimmed mean, Krum, geometric median, secure aggregation | Ex. 4, 5, 9 |
| 7 | 3 h | 2 | ch. 5 Differential privacy: definition, post-processing, composition, Laplace and Gaussian mechanisms | Ex. 6, 10 |
| 8 | 3 h | 2 | ch. 5 (continued) DP-SGD, moments accountant, local DP, membership inference | lab: DP-SGD on a small model; groups revise their question sheet |
| 9 | 3 h | 2 | ch. 6 Collaboration, personalization, Shapley values; 6.1 fairness across participants (q-FFL, agnostic FL) | Ex. 12; Ex. 13 (project question fixed) |
| 10 | 3 h | 3 | ch. 8 Paper-reading session 1: the method of 8.3, applied to Krum (Work 8.1) | critique grid of 8.3, filled in groups |
| 11 | 3 h | 3 | ch. 8 Paper-reading session 2: the Hidden Vulnerability and Bulyan (Work 8.2) | critique grid; Ex. 9 revisited |
| 12 | 3 h | 3 | ch. 8 Paper-reading session 3: averaged SGD or Federated-EM (Works 8.3, 8.4) | critique grid; Ex. 13 (project) |
Self-study, outside the 36 h (about 3 h in total): ch. 7 Scaling and compute — scaling laws, compute-optimal allocation, mixtures of experts, with Ex. 11 (≈ 3 h).
How to study this module
- First secure your understanding of SGD analysis: the review chapter is short, but mastering it is a prerequisite for all the distributed and federated chapters.
- For each aggregation scheme (mean, median, trimmed mean), ask yourself “what happens with a malicious worker?” — that is the course’s guiding thread.
- Simulate a small federated learning setup with clients holding heterogeneous data: the gap between homogeneous theory and heterogeneous practice can only be understood by running it.
- Do the differential privacy exercises on paper: composing mechanisms, computing an ε budget, interpreting a guarantee.
- Follow the news on scaling laws and compute in parallel with the scaling chapter: that chapter ages the fastest, and critical reading is the targeted skill.
- If you need a refresher on the basics, go back to the Machine Learning module: optimization and concentration are covered there at the level expected here.
Notation Deviations from the site conventions (notation page). The mini-batch size is m, not b, because b is the Laplace scale of ch. 5; m also counts Krum’s neighbors (Algorithm 4.3) and is the lower end of the honest interval in Theorem 4.2. L is the smoothness constant everywhere except in the Laplacian box of ch. 2, Theorem 2.6, Exercise 7 and the gossip questions of the projects and the exam.
Independent note The LLGA master’s program trains students to work with large models deployed in real organizations: sensitive data, distributed teams, compute budgets. This module teaches exactly what separates a notebook prototype from a trustworthy AI system — the shared culture of the LLGA engineer and of the researcher who will formalize these guarantees.
0. Review: SGD and its analysis
Every algorithm of this module — distributed, federated, robust or private — is a variant of stochastic gradient descent in which the gradient is averaged, delayed, compressed, filtered or noised. To measure what each variant costs, one first needs the exact convergence rate of plain SGD and the reason why its noise cannot be beaten; this review proves both.
L3/M1 review — the stochastic foundation
- Gradient descent: \theta_{t+1} = \theta_t - \eta \nabla f(\theta_t); convex and L-smooth ⇒ \mathcal{O}(1/t) decrease.
- SGD: replace \nabla f with a batch gradient g_t = \frac1m \sum_{i \in B_t} \nabla \ell(\theta_t; x_i), unbiased, \mathrm{Var}(g_t) = \mathcal{O}(1/m) (CLT, see the Refresher Statistics module).
- Strong convexity ⇒ linear convergence in the deterministic case, \mathcal{O}(1/t) in the stochastic case; the definition reads f(\lambda x + (1-\lambda)y) \leq \lambda f(x) + (1-\lambda) f(y) - \tfrac{\mu}{2}\lambda(1-\lambda)\|x - y\|^2 .
- Descent inequality — the basic lemma for this entire chapter: for f L-smooth, f(\theta_{t+1}) \leq f(\theta_t) - \eta(1 - \tfrac{\eta L}{2})\|\nabla f(\theta_t)\|^2 .
Working assumptions (A1)-(A3)
- (A1) f convex, L-smooth, with minimizer \theta^\star (write D = \|\theta_0 - \theta^\star\|, f^\star = f(\theta^\star));
- (A2) unbiased stochastic gradient \mathbb{E}[g_t \mid \theta_t] = \nabla f(\theta_t);
- (A3) bounded variance \mathbb{E}\|g_t - \nabla f(\theta_t)\|^2 \leq \sigma^2.
We write g_t = \nabla f(\theta_t) + \xi_t with \mathbb{E}\xi_t = 0.
Theorem 0.1 — Constant-step SGD: full proof Under (A1)-(A3), with step size \eta \leq \frac{1}{2L}:
Key result — constant-step SGD \frac{1}{T}\sum_{t=0}^{T-1} \mathbb{E}\big[f(\theta_t) - f^\star\big] \;\leq\; \frac{D^2}{\eta T} \;+\; \eta \sigma^2 \;\leq\; \mathcal{O}\Big(\frac{L D^2}{T}\Big) + \mathcal{O}\Big(\frac{\sigma D}{\sqrt T}\Big).
The last term is obtained for \eta = \min\big(\tfrac{1}{2L}, \tfrac{D}{\sigma\sqrt T}\big).
Proof. Step 1 (recursion on the distances). With \theta_{t+1} = \theta_t - \eta g_t and \mathbb{E}[\xi_t \mid \theta_t] = 0 (the cross term vanishes): \mathbb{E}\|\theta_{t+1} - \theta^\star\|^2 = \|\theta_t - \theta^\star\|^2 - 2\eta \big\langle \nabla f(\theta_t),\, \theta_t - \theta^\star \big\rangle + \eta^2\, \mathbb{E}\|g_t\|^2.
Step 2 (the three ingredients).
- convexity: \langle \nabla f(\theta_t), \theta_t - \theta^\star\rangle \geq f(\theta_t) - f^\star ;
- bias-variance decomposition + smoothness, since \|\nabla f(\theta)\|^2 \leq 2L(f(\theta) - f^\star) for f convex and L-smooth: \mathbb{E}\|g_t\|^2 = \|\nabla f(\theta_t)\|^2 + \mathbb{E}\|\xi_t\|^2 \leq 2L\big(f(\theta_t) - f^\star\big) + \sigma^2 .
Combining: \mathbb{E}\|\theta_{t+1} - \theta^\star\|^2 \;\leq\; \mathbb{E}\|\theta_t - \theta^\star\|^2 \;-\; 2\eta(1 - \eta L)\,\mathbb{E}[f(\theta_t) - f^\star] \;+\; \eta^2 \sigma^2.
Step 3 (telescoping). Sum over t = 0, \dots, T-1: the distance terms telescope and their sum is at most D^2. With \eta \leq \frac{1}{2L} (hence 2\eta(1 - \eta L) \geq \eta): \eta \sum_t \mathbb{E}[f(\theta_t) - f^\star] \;\leq\; D^2 + T\eta^2\sigma^2, that is \frac{1}{T}\sum_t \mathbb{E}[f(\theta_t) - f^\star] \;\leq\; \frac{D^2}{\eta T} + \eta \sigma^2.
With the step size \eta = \min\big(\tfrac{1}{2L}, \tfrac{D}{\sigma\sqrt T}\big), the first term is at most \frac{2LD^2}{T} + \frac{\sigma D}{\sqrt T} and the second at most \frac{\sigma D}{\sqrt T}, which gives the last inequality. ∎
Reading. Two terms: optimization (D^2/\eta T, vanishes with T) and statistics (\eta\sigma^2, the “floor” of the constant step size); the choice of \eta arbitrates.
In practice, networks are trained with constant step sizes (or step sizes decreasing in stages). Decreasing step sizes remove the floor without knowing T in advance:
- for f merely convex, \eta_t \propto 1/\sqrt t brings the average of the iterates to \mathcal{O}(\log T/\sqrt T), and to \mathcal{O}(\sigma D/\sqrt T) with tuned constants and suitable averaging — never faster, by the lower bound of Theorem 0.2 (i);
- for f \mu-strongly convex, \eta_t = 1/(\mu t) gives \mathcal{O}(\log T/T) with the uniform average, and \mathcal{O}(\sigma^2/\mu T) with suffix or weighted averaging.
Theorem 0.2 — Lower bounds (statements)
- Stochastic oracle (Nemirovski-Yudin): for any algorithm accessing f only through noisy gradients of variance \sigma^2, there exists a convex, L-smooth function such that \mathbb{E}[f(\hat\theta_T) - f^\star] \geq c\, \sigma D/\sqrt T . The rate of Theorem 0.1 is therefore optimal; the noise is not a flaw of the algorithm but a law of the problem.
- Strongly convex: the bound becomes \Omega(\sigma^2/\mu T): the statistical floor cannot be beaten, even with all the available structure.
Consequence for this module: parallelizing (ch. 2) can do no better than reducing \sigma — which is exactly what the aggregation of K workers does.
Proposition 0.3 — Variance reduction: SAGA and SVRG (sketch) The \sigma/\sqrt T floor comes from the constant variance of the gradient; on a finite sum f = \frac1n \sum_i f_i, it can be made to decrease:
- SVRG (Johnson & Zhang): periodically compute the exact gradient \nabla f(\tilde\theta) at a reference point \tilde\theta, then use the control variate v_t = \nabla f_{i_t}(\theta_t) - \nabla f_{i_t}(\tilde\theta) + \nabla f(\tilde\theta) . It is unbiased, with variance proportional to \|\theta_t - \tilde\theta\|^2 — which decreases over the course of the optimization; linear rate \mathcal{O}((n + \kappa)\log 1/\varepsilon) (versus \mathcal{O}(n\kappa \log 1/\varepsilon) for GD);
- SAGA: keep in a table the latest \nabla f_i seen for each i and correct by their average — same effect, without periodic recomputation.
These control variate ideas will reappear in federated learning (SCAFFOLD, ch. 3) and in the Byzantine setting (Bulyan, ch. 8): this is THE algorithmic motif of the module.
Proposition 0.4 — Momentum, Nesterov, sampling
- Momentum (heavy ball): v_{t+1} = \beta v_t + g_t, \theta_{t+1} = \theta_t - \eta v_{t+1} — damps oscillations along steep directions (poorly conditioned gradient covariance matrix); typical choice \beta = 0.9.
- Nesterov: evaluate the gradient at the anticipated point \theta_t - \eta\beta v_t; in the deterministic case, the rate goes from \mathcal{O}(LD^2/T) to \mathcal{O}(LD^2/T^2) — optimal for a first-order method.
- Weighted sampling: draw i according to a distribution q and correct with g = \nabla f_i/q(i); the variance is minimized when q_i \propto \|\nabla f_i\| (importance sampling, Zhao & Zhang, 2015). The stratified variant partitions the data into homogeneous strata and allocates the sampling budget where the internal variance is large — stratification reduces \sigma^2 even before parallelizing.
1. Landscape of emerging topics
Concrete scene: 50 hospital clients, 2 malicious. Gradient averaging pulls the model toward a backdoor. This chapter sets the threat model before recipes.
What breaks Three classic failures: trusting the plain mean when some clients may be Byzantine, releasing a model trained without any privacy budget, and scaling the batch without retuning the noise and the learning rate.
This module opens with the questions that structure current research and industry, in direct preparation for the M2 modules (LLMs, Explainability/Security/Privacy):
- Scaling laws: power-law loss as a function of data/parameters/compute (Kaplan 2020, Hoffmann/Chinchilla 2022 — chapter 7); emergence of capabilities; compute as a scarce resource;
- Distributed training of large models: data/tensor/pipeline parallelism, MoE (chapters 2 and 7);
- Frugal fine-tuning: LoRA and adapters — the “collaboration” between a large central model and local uses (chapters 3 and 7);
- Trustworthy? Robustness to malicious clients, privacy of training data, fairness across participants — the three guiding threads of chapters 4-6;
- Collaborative agents: multi-agent orchestration = collaboration of models (direct link with the Reinforcement Learning and Autonomous Agents module, chapter 7 — preview, Period 2 — and with “graph engineering”).
1.1. From a theme to a research question
The official description of the course unit asks you to formulate your own research questions and to work on them in groups; the research project that is graded is the answer to one of them. A theme such as “Byzantine robustness” is not yet a question: a question is something that a proof or an experiment can settle, in either direction, within the time of the course.
Definition 1.1 — Well-posed research question In this module, a research question has the form “under assumptions A, does method M achieve property P, measured by the quantity Q, better or worse than the baseline B?”. It is well posed when:
- every term is defined in these notes or in one reference paper;
- both answers are possible before the work starts, so the question is falsifiable;
- Q can be computed in the time available — on a small model, a synthetic benchmark, or by a proof on a quadratic example;
- a hypothesis — the expected value or trend of Q — is written down before the experiment, so that the result is able to contradict it.
Worked example — robust aggregation meets heterogeneity Theme: Byzantine robustness (ch. 4) inside federated learning (ch. 3). “Is federated learning robust?” is too vague; “does the median protect FedAvg?” is still undecidable, because “protect” is undefined.
A well-posed version: K = 20 clients hold the losses F_k(\theta) = \tfrac12\|\theta - z_k\|^2, and f_B = 2 of them are Byzantine; the 18 honest optima z_k have empirical mean \bar z and are spread, coordinate by coordinate, like a Gaussian of standard deviation \zeta.
How does the error Q = \|\theta_R - \bar z\| of FedAvg with coordinate-wise median aggregation grow with \zeta, compared with the plain mean without attack (B)?
Hypothesis, derived before running anything: when the two attackers send very large values on a coordinate, the median of the 20 values becomes the average of the 10th and 11th smallest of the 18 honest values, which sits near their 10/18 \approx 0.556 quantile instead of their median.
For a Gaussian spread this quantile lies at \Phi^{-1}(0.556)\,\zeta \approx 0.14\,\zeta above the centre. We therefore predict a bias of about 0.14\,\zeta per attacked coordinate — zero when the clients agree (\zeta = 0), growing linearly with heterogeneity.
The experiment then plots Q against \zeta \in \{0, 0.5, 1, 2\} and checks the slope.
Why the question is worth asking: when \zeta > 0, an attacker who stays inside the honest spread looks exactly like an unusual honest client, so no aggregation rule can remove all of this bias — the measured slope tells how much a given rule concedes.
Group work and the question sheet Our suggested format (the coordinator fixes the actual one): groups of three or four; each group keeps a one-page question sheet listing the theme, the question in the form of Definition 1.1, its assumptions, the quantity Q, the baseline B, the hypothesis, the planned experiment or proof, and the reference paper. The sheet is drafted in session 2, revised as the chapters 2 to 6 supply new tools, and fixed in session 9; it becomes the introduction of the project report, and its reference paper is a natural candidate for the third paper-reading session.
2. Distributed learning
One GPU is too slow for a large model, so the gradient computation is split across K workers that must then agree on a single update. This chapter quantifies the gain (the variance of the averaged gradient falls like 1/K) and the price — communication — and presents the techniques that reduce the bytes exchanged: quantization, sparsification, asynchrony and decentralized gossip.
Definition 2.1 — Distributed SGD (synchronous workers) K workers hold data shards. At each step: each worker k computes g^{(k)} on its mini-batch, the server aggregates and broadcasts: \theta_{t+1} = \theta_t - \eta \, \frac1K \sum_{k=1}^K g_t^{(k)}.
Theorem 2.2 — Linear speedup (proof via the variance) If the g_t^{(k)} are independent, unbiased, with variance \sigma^2, then \bar g_t = \frac1K \sum_k g_t^{(k)} is unbiased with \mathbb{E}\|\bar g_t\|^2 = \|\nabla f\|^2 + \frac{\sigma^2}{K}, and Theorem 0.1 applies with \sigma \to \sigma/\sqrt K:
Key result — linear speedup \frac1T \sum_t \mathbb{E}[f(\theta_t) - f^\star] \leq \mathcal{O}\Big(\frac{LD^2}{T} + \frac{\sigma D}{\sqrt{KT}}\Big).
Proof. Independence + unbiasedness give \mathbb{E}\|\bar g\|^2 = \|\mathbb{E}\bar g\|^2 + \mathrm{Var}(\bar g) = \|\nabla f\|^2 + \frac{1}{K^2}\sum_k \mathrm{Var}(g^{(k)}) = \|\nabla f\|^2 + \frac{\sigma^2}{K}. To reach a target accuracy \varepsilon = \sigma D/\sqrt{T}, one needs T(\varepsilon) \propto \frac{\sigma^2 D^2}{K\,\varepsilon^2} distributed iterations — versus \frac{\sigma^2 D^2}{\varepsilon^2} sequentially.
Hence K times fewer iterations, each K times more expensive in computation (parallelized): this is the ideal linear speedup, valid if and only if communication is negligible — which it never is (rest of this chapter). ∎
The communication wall Sending a gradient of 10^9 parameters (4 GB in fp32) costs more than computing it. Ring all-reduce is bandwidth-optimal: each worker only exchanges \frac{2(K-1)}{K} model sizes per step. The rest of this chapter aims to reduce the bytes exchanged.
Theorem 2.3 — Quantization: QSGD (Alistarh et al., 2017) Quantize each coordinate v_i by random rounding to the grid \{0, \pm s^{-1}\|v\|_2, \dots, \pm\|v\|_2\}: the quantizer Q_s is unbiased and \mathbb{E}\|Q_s(v)\|^2 \;\leq\; \Big(1 + \min\Big\{\frac{d}{s^2}, \frac{\sqrt d}{s}\Big\}\Big) \|v\|^2.
Reading: with s = \sqrt d levels, the variance barely doubles, and the (Elias) coding of the quantized vector costs about 2.8\,d + 32 bits in total, i.e. under 3 bits per coordinate instead of 32 — up to an order of magnitude of bandwidth saved at equal training quality.
Extreme case: signSGD (1 bit per coordinate: the sign); combined with majority vote it converges under adapted assumptions (Bernstein et al., 2019). The general trade-off: bits ↔︎ variance (Theorem 2.2: more variance = less speedup).
Proposition 2.4 — Sparsification and error feedback Sending only the k largest coordinates (top-k) drastically reduces communication — but the truncated gradient is biased, and top-k alone can make training diverge. Error feedback: keep the residual, e_{t+1} = \big(g_t + e_t\big) - \mathrm{Top}_k\big(g_t + e_t\big), \qquad \text{one sends } \mathrm{Top}_k(g_t + e_t). Each “forgotten” coordinate is eventually sent once its accumulated residual enters the top-k: convergence is restored at the rate of uncompressed SGD (Seide et al. 2014 for 1-bit; analyses by Stich et al. 2018). In practice: top-k at 1% + error feedback is nearly free in quality.
Proposition 2.5 — Asynchrony and Hogwild! Synchronizing K workers means waiting for the slowest one (the “stragglers”). In asynchronous mode, each worker pushes its gradient computed on a model potentially stale by \tau steps (staleness): the bound of Theorem 0.1 degrades by a factor (1 + \tau).
Hogwild! (Recht et al., 2011): lock-free SGD on shared memory, valid for sparse problems (concurrent updates rarely collide); Lian et al. (2015): asynchronous SGD retains the 1/\sqrt T and the linear speedup up to constant staleness — asynchrony pays off when clock variance dominates.
Prerequisite review — the graph Laplacian
- A communication graph on K workers has adjacency matrix A and degrees d_k. Its Laplacian is L = \mathrm{diag}(d) - A (written D - A on the graph pages; here D is already the initial distance of ch. 0).
- Elsewhere on this page L is the smoothness constant (ch. 0, Theorem 2.2, ch. 3). It means this Laplacian only in this box, in Theorem 2.6, in Exercise 7 and in the gossip questions of the projects and the exam.
- L is symmetric and positive semi-definite, with x^\top L x = \sum_{(k,j) \in \mathcal{E}} (x_k - x_j)^2 over the edge set \mathcal{E}, so L\mathbf{1} = 0. Its eigenvalues are sorted upwards, 0 = \lambda_1 \leq \lambda_2 \leq \dots \leq \lambda_K.
- The algebraic connectivity \lambda_2(L) (Fiedler) is positive exactly when the graph is connected.
- Values: path, 2(1 - \cos(\pi/K)) \approx \pi^2/K^2; cycle, 2(1 - \cos(2\pi/K)) \approx 4\pi^2/K^2; complete graph, K.
- Sources: Refresher CS ch. 2 (eigendecomposition of symmetric matrices, sparse matrices) and ch. 7 (graph representations). Deepened later in Graph ML ch. 4 (preview, Period 2).
Theorem 2.6 — Decentralized: gossip and the graph spectrum Without a server: the workers form a communication graph \mathcal{G} (adjacency matrix A, Laplacian L) and exchange with their neighbors. Gossip aggregation with a symmetric, doubly stochastic mixing matrix W, for example W = I - \eta_g L with gossip step \eta_g, \theta^{(k)} \leftarrow \sum_j W_{kj}\, \theta^{(j)}, makes all nodes converge to the average at geometric speed: \big\|\theta_t - \bar\theta \,\mathbf{1}\big\| \;\leq\; \rho(W)^t\, \|\theta_0 - \bar\theta\,\mathbf{1}\|, where \rho(W) is the largest modulus of the eigenvalues of W other than the eigenvalue 1. For W = I - \eta_g L with \eta_g small enough, \rho(W) = 1 - \eta_g\,\lambda_2(L), \qquad \delta_W = 1 - \rho(W) = \eta_g\,\lambda_2(L), where \delta_W is the spectral gap of W and \lambda_2(L) the algebraic connectivity of the graph (box above): chain = slow, complete graph = fast, expander = nearly optimal.
Decentralized SGD (D-PSGD, Lian et al., NeurIPS 2017) interleaves local SGD steps and gossip: it retains the \mathcal{O}(1/\sqrt T) rate of the centralized version and its linear speedup, with local exchanges instead of the global all-reduce — it would beat the centralized version in wall-clock time as soon as the graph is well connected and bandwidth is limited.
| Architecture | Communication/step | Fault tolerance | Hard point |
|---|---|---|---|
| Synchronous centralized | global all-reduce | low (a straggler blocks) | collective latency |
| Asynchronous centralized | individual push | good | staleness, consistency |
| Decentralized (gossip) | neighborhood only | excellent | factor 1/\delta_W in the rate |
LLM connection A typical LLM training run mobilizes thousands of GPUs: the choices of data-parallel vs pipeline vs tensor (splitting the model itself, ZeRO: sharding of optimizer states) are choices of algebra and communication — treated in Deep Learning P2, ch. 2–4 (Period 2), and at deployment scale in M2 (ML Ops); this module has no lab on them. The methods of this chapter (quantization, error feedback) apply as-is to LLM gradients.
3. Federated learning
When the data belong to hospitals or sit on phones, they cannot be gathered on one server: the model must travel to the data. Each client then performs several local steps between two communications, and because the clients’ data differ, these local steps pull the model in different directions. This chapter proves this client drift on an example, and presents the corrections (FedProx, SCAFFOLD) and the personalized variants.
Algorithm 3.1 — FedAvg (McMahan et al., 2017) Clients \{1..K\} with local data \mathcal{D}_k that is non-iid (each has its own data, never shared). At each round:
- the server broadcasts \theta_r to a subset of clients;
- each client k performs E epochs of local SGD: \theta_r^{(k)} \approx \arg\min F_k;
- weighted aggregation: \theta_{r+1} = \sum_k \tfrac{n_k}{n}\, \theta_r^{(k)}.
Theorem 3.2 — Client drift: proving it on a quadratic example Heterogeneity makes clients drift: local SGD solves their own problems before aggregation. Exact computation on F_k(\theta) = \tfrac{a_k}{2}(\theta - z_k)^2 (local SGD = exact gradient, step size \eta):
Proof. One local step: \theta \leftarrow (1 - \eta a_k)\theta + \eta a_k z_k, so after E steps starting from \theta_r (geometric sum): \theta_r^{(k)} = z_k + c_k\,(\theta_r - z_k), \qquad c_k = (1 - \eta a_k)^E. The aggregation \theta_{r+1} = \frac1K\sum_k \theta_r^{(k)} is an affine iteration whose fixed point is a weighted average by the effective curvatures 1 - c_k: \theta_\infty = \frac1K\sum_k (1 - c_k)\, z_k \,\Big/\, \frac1K \sum_k (1 - c_k) . Now the global optimum of F = \frac1K\sum F_k is \theta^\star = \sum a_k z_k / \sum a_k. The two coincide when the weights 1 - c_k are proportional to the a_k: for E = 1, where 1 - c_k = \eta a_k, or when all the curvatures are equal.
With E > 1 local steps and a fixed step size, FedAvg converges to a point that is NOT the global optimum as soon as the curvatures differ.
Numbers. Take K=2, a_1 = 1, z_1 = 0, a_2 = 10, z_2 = 1, \eta = 0.05, E = 10.
Then c_1 = 0.95^{10} \approx 0.60 and c_2 = 0.5^{10} \approx 0.001, so \theta^\star = 10/11 \approx 0.909, \qquad \theta_\infty = \frac{1 \cdot 1}{0.40 + 1} \approx 0.713 . At this fixed step size, this is a structural bias of ~20% that does not vanish as the number of rounds grows.
As \eta \to 0, 1 - c_k \approx E\eta a_k and \theta_\infty \to \theta^\star: the bias is of order \eta(E - 1), which is why decreasing step sizes remove it (Theorem 3.3). ∎
Theorem 3.3 — Convergence of FedAvg (strongly convex setting, statement) (Li, Huang, Yang, Wang and Zhang, ICLR 2020.) Assume each F_k is L-smooth and \mu-strongly convex (stronger than (A1)), with local gradient variances \sigma_k^2 and stochastic gradients whose second moment is at most G^2.
Let p_k = n_k/n and \kappa = L/\mu, and measure heterogeneity by \Gamma = F^\star - \sum_k p_k F_k^\star \;\geq\; 0 . With full participation, E local steps per round and the decreasing step \eta_t = 2/(\mu(\gamma + t)), \gamma = \max(8\kappa, E), after T = ER local steps in total: \mathbb{E}\big[F(\theta_T)\big] - F^\star \;\leq\; \frac{\kappa}{\gamma + T - 1}\Big(\frac{2B}{\mu} + \frac{\mu\gamma}{2}\,\|\theta_0 - \theta^\star\|^2\Big), B = \sum_k p_k^2 \sigma_k^2 + 6L\Gamma + 8(E - 1)^2 G^2 .
Reading. Heterogeneity \Gamma enters the constant of an \mathcal{O}(1/T) bound: with decreasing steps, FedAvg does reach \theta^\star, only more slowly when \Gamma or E grows.
With a constant step \eta and E > 1 local steps, a bias of order \eta(E - 1) remains (Theorem 3.2; the same paper shows on an example that it cannot be avoided in general).
Practice often keeps a constant step to save rounds; a correction (SCAFFOLD) or a penalty (FedProx) then reduces the residual drift.
Proposition 3.4 — FedProx: the role of the proximal term FedProx (Li et al., 2020): each client minimizes a regularized objective \theta^{(k)} \approx \arg\min_\theta\ F_k(\theta) + \frac{\lambda}{2}\|\theta - \theta_r\|^2, then aggregates; the weight \lambda \geq 0 is written \mu in the paper, but \mu is kept here for strong convexity. The proximal penalty:
- curbs the drift of Theorem 3.2 — the client stays in a neighborhood of \theta_r of radius \propto 1/\lambda;
- makes E arbitrary (tolerance to slow or partial clients — work with what has been received);
- can be read as a proximal step of the global problem: in the limit \lambda \to \infty, FedAvg with 1 step (of size 1/\lambda).
Trade-off: too large a \lambda crushes local work (back to communication-slow FedSGD), too small a \lambda lets clients drift.
Algorithm 3.5 — SCAFFOLD: variance correction via control variates (Karimireddy et al., ICML 2020.) The server and the clients maintain control variates c and c_k (initially zero). Local step: \theta_{j+1}^{(k)} = \theta_j^{(k)} - \eta\big(g_k(\theta_j^{(k)}) - c_k + c\big), update of the client control at the end of the round: c_k^{+} = c_k - c + \frac{\theta_r - \theta_E^{(k)}}{\eta E}, \qquad c^{+} = \frac1K \sum_k c_k^{+}.
Reading. The term -c_k + c replaces the local gradient with a “recentered” version: c_k - c estimates the mean difference between the local gradient and the global gradient — exactly the drift of Theorem 3.2. On the quadratic example above, the correction is exact: the drift disappears and the fixed point becomes \theta^\star again (exercise 8).
Result (Karimireddy et al.): the stochastic term of the number of rounds is the same for FedAvg and SCAFFOLD. What the correction removes is the heterogeneity term:
- convex case: FedAvg pays an extra term in \varepsilon^{-3/2}, and SCAFFOLD keeps only the \varepsilon^{-1} term of plain gradient descent;
- strongly convex case: FedAvg’s extra term in \varepsilon^{-1/2} disappears, and SCAFFOLD needs only \log(1/\varepsilon) rounds beyond the stochastic term, as gradient descent does.
The same motif as SVRG (Proposition 0.3): a control variate removes the part of the error that it can estimate.
Proposition 3.6 — Personalization: Ditto and local fine-tuning When clients want different models (hospitals with distinct practices), heterogeneity becomes a resource: learn a good global model that serves as an initialization for everyone, then personalize. Ditto (Li et al., 2021) solves, per client, \min_{\theta_k}\ F_k(\theta_k) + \frac{\lambda}{2}\|\theta_k - \theta^\star_{\mathrm{glob}}\|^2 jointly with the global problem: \lambda arbitrates specialization/collaboration — and the solution improves fairness across clients (the worst client is not sacrificed for the benefit of the average client).
Pragmatic version: local fine-tuning of the federated model (standard in production, e.g. keyboards); probabilistic version: mixtures of posteriors (see ch. 8, FedEM).
| Cross-silo | Cross-device | |
|---|---|---|
| Clients | 2 – 100 (hospitals, banks) | 10⁶ – 10⁹ (phones) |
| Availability | nearly permanent | episodic, battery/network |
| Local state | possible (controls, histories) | minimal (SCAFFOLD costly) |
| Main constraint | data heterogeneity | communication, partial participation |
Applications and LLMs Healthcare (hospital consortia, data that cannot be centralized), mobile keyboards (next-word prediction, Gboard), finance. For LLMs: federating LoRA adapters (the model is frozen, only the small rank-r matrices A, B are exchanged) — demonstrated for instruction tuning (FedIT, Zhang et al., 2023); open questions: heterogeneity of local instructions, noise from small batches, privacy of prompts (chapter 5), robustness to hostile clients (chapter 4). M2 project topic.
import numpy as np
rng = np.random.default_rng(0)
def fedavg(clients, rounds=50, E=5, eta=0.1):
"""clients: list of local functions (theta -> theta after E SGD steps)."""
theta = np.zeros(d)
for r in range(rounds):
local = [c(theta, E, eta) for c in clients] # local phase
theta = np.mean(local, axis=0) # aggregation
return theta
# SCAFFOLD: add the control variates
def scaffold(clients, rounds=50, E=5, eta=0.1):
theta = np.zeros(d); c = np.zeros(d)
ck = [np.zeros(d) for _ in clients]
for r in range(rounds):
new_ck, loc = [], []
for k, client in enumerate(clients):
theta_k, drift = client(theta, E, eta, correction=c - ck[k])
loc.append(theta_k)
new_ck.append(ck[k] - c + (theta - theta_k) / (eta * E))
theta = np.mean(loc, axis=0)
ck = new_ck
c = np.mean(ck, axis=0) # uses the new client controls
return theta4. Byzantine robustness
Averaging the clients’ gradients assumes that every client is honest; a single faulty or malicious client can move the average anywhere. This chapter defines the threat model and studies aggregation rules that resist a bounded number of arbitrary clients — coordinate-wise median, trimmed mean, Krum, geometric median — together with their guarantees and their limits in high dimension.
Definition 4.1 — Byzantine client and threat model A client is Byzantine if it returns an arbitrary gradient (crash or attack: data poisoning, model poisoning, backdoor). One distinguishes:
| Failure | Behavior | Tolerance threshold |
|---|---|---|
| Crash | stops responding | redundancy, timeout (systems) |
| Byzantine (statistical) | arbitrary message, honest iid gradients | f_B < K/2 (geometric rules) |
| Byzantine (exact agreement) | arbitrary message, no statistical assumption | f_B < K/3 (information-theoretic bounds) |
The battle is fought on the aggregation rule (GAR): replace the mean with a robust operator — the rest of the pipeline (ch. 2-3) is unchanged.
Attacks, by hand
- Label flipping: the client trains on flipped labels — its gradient points opposite to the consensus;
- Large-scale model poisoning: in dimension 1, honest values with mean \bar g = 0.5, K = 10, f_B = 1 attacker sending -C with C = \tfrac{K-f_B}{f_B}\bar g + 1 = 5.5. The mean becomes \mathrm{mean} = \frac{9 \times 0.5 - 5.5}{10} = -0.1 . The sign is reversed by a single client: the mean is uncontrolled as soon as f_B \geq 1 (norm of the bias arbitrarily large);
- Backdoor: data with a trigger (“add word X to every sentence containing the secret sequence”); the poisoned model keeps normal accuracy on clean data and fires on the trigger — invisible in the global metric, dangerous in deployment.
Theorem 4.2 — Median and trimmed mean: guarantees in dimension 1 (proved) Let K values of which K - f_B honest (f_B < K/2) lying in an interval I = [m, M] with honest mean \bar g. Then:
- the coordinate-wise median lies in I, hence |\mathrm{med} - \bar g| \leq M - m;
- the \beta-trimmed mean (remove the \beta K largest and the \beta K smallest values, \beta K \geq f_B, 2\beta K < K) is a mean of values that all lie in the interval, hence lies in I.
Proof. (i) There are more than K/2 honest values: the order statistic of rank \lceil K/2 \rceil is honest or bracketed by two honest values, hence in [m, M]; since \bar g \in [m, M], the gap is at most the diameter M - m.
(ii) Every value kept after trimming is at most the (\beta K + 1)-th largest value. Among the \beta K + 1 largest values, at least one is honest (there are only f_B \leq \beta K Byzantine values), so this threshold is at most an honest value, hence at most M.
Symmetrically, every kept value is at least m. The kept values, Byzantine or not, all lie in [m, M], and so does their mean. ∎
Scope and limits. The guarantee is bounded where the mean is arbitrary — but it holds coordinate by coordinate: an attacker can stay “within the interval” on each coordinate while correlating its deviations to shift the global direction (dimension-by-dimension attack — the flaw exploited by El Mhamdi et al., see ch. 8).
The price is also statistical: the median and trimming use information less well than the mean (efficiency \sim 2/\pi in the Gaussian case for the median).
Algorithm 4.3 — Krum (Blanchard, El Mhamdi, Guerraoui, Stainer, NeurIPS 2017), in detail Parameter: an upper bound f_B on the number of Byzantine clients, with K \geq 2f_B + 3.
- compute all the distances D(i, j) = \|g_i - g_j\|^2;
- for each i, score s_i = sum of the m = K - f_B - 2 smallest distances D(i, j) (its m nearest neighbors);
- return g_{i^\star}, i^\star = \arg\min_i s_i — the point most “surrounded” by close points.
Proof. Intuition for the guarantee. The K - f_B honest gradients are concentrated around the true gradient \nabla F (i.i.d., variance \sigma^2 per coordinate). Each honest point has at least K - f_B - 1 \geq m + 1 close honest neighbors, hence a score at most m times a quantile of the inter-honest distances, of the same order as \sigma^2 d.
A Byzantine point, on the other hand, has at most f_B close accomplices: its score includes distances to honest points, large as soon as it moves away from the cloud — unless it hides inside the honest cloud, in which case it is harmless.
The theorem of the paper formalizes this. Under the assumptions K > 2f_B + 2 and c(K, f_B)\,\sigma\sqrt d < \|\nabla F\|, for an explicit constant c(K, f_B), Krum is proved to be (\alpha, f_B)-Byzantine resilient, with \sin\alpha = c(K, f_B)\,\sigma\sqrt d / \|\nabla F\|. Its output V satisfies \|\mathbb{E}V - \nabla F\| \leq \sin\alpha\,\|\nabla F\|, \qquad \langle \mathbb{E}V, \nabla F \rangle \geq (1 - \sin\alpha)\|\nabla F\|^2 > 0, and its moments are bounded by those of the honest gradients. The expected selected vector is then within c(K, f_B)\,\sigma\sqrt d of the true gradient and positively aligned with it — the order of magnitude of the stochastic noise itself: robustness has not destroyed convergence. ∎
Cost and limits. O(K^2 d) on the server (all pairwise distances); requires i.i.d. gradients — in heterogeneous federated learning (Th. 3.2), the honest points form several clusters and Krum may pick a cluster; attacks varying over time: alternating between two attack directions beats any one-shot selection — direct motivations for Bulyan (ch. 8).
Proposition 4.4 — Geometric median and Weiszfeld iterations The geometric median \hat g = \arg\min_x \sum_k \|x - g_k\|_2 is the center minimizing the sum of distances (robust: breakdown point 1/2). Weiszfeld’s algorithm (fixed point of weights inverse to the distances): x^{(j+1)} \;=\; \frac{\sum_k g_k \,/\, \|x^{(j)} - g_k\|}{\sum_k 1 \,/\, \|x^{(j)} - g_k\|}. Each iteration is a weighted barycenter where far-away points carry little weight; convergence is guaranteed (strict convexity as soon as the g_k are not aligned).
Guarantee (geometric median of means, Chen, Su and Xu, 2017): the K workers are grouped into batches, the server takes the geometric median of the batch means, and up to f_B Byzantine workers with 2(1+\epsilon)f_B \leq K, for a fixed \epsilon > 0, are tolerated. With N samples in total in dimension d, the parameter estimate reaches an error of order \max\Big(\sqrt{\frac{d f_B}{N}},\ \sqrt{\frac{d}{N}}\Big), against the failure-free minimax rate \sqrt{d/N}: the price of robustness is a factor of at most about \sqrt{f_B}.
The Byzantine curse of dimensionality The typical distance between two honest gradients grows like \sigma\sqrt d: in high dimension, the honest “cloud” is immense, and telling a malicious deviation from noise becomes impossible without an additional assumption.
Impossibility results: no rule can be simultaneously unbiased (efficient at 1/\sqrt K) and resilient to f_B > 0 for all distributions; minimal robust estimators (trimmed mean, geometric median) incur \Omega(\sigma\sqrt d) while “efficient” rules incur infinity. That is why the Byzantine setting tolerates d = 10^3 (aggregated gradients, cross-silo) better than d = 10^9 (raw LLM gradients).
Proposition 4.5 — Secure aggregation: pairwise masks Dual problem: the server must not even see the individual gradients (privacy, ch. 5). Bonawitz et al. (2017): each pair (k, j) shares a pseudo-random seed, and client k sends g_k + \sum_{j > k} s_{kj} - \sum_{j < k} s_{kj} . Here s_{kj} = s_{jk} is the same mask, expanded by both clients from their shared seed: client k adds it and client j > k subtracts it. When summing over all clients, the masks cancel out exactly and the server only learns \sum_k g_k. Unexpected departures are handled by sharing the seeds via secret sharing (Shamir): the survivors reconstruct the masks of those who left.
Fundamental tension: secure aggregation masks the individual gradients… which Krum (4.3) needs; robustness and confidentiality compete — compatible schemes (robust aggregation on cryptographically masked gradients, proofs of “proximity” to the consensus) are an active research topic (ch. 8).
Lab experiment — attack and defense
grads = np.array([...]) # K honest gradients
attacker = 10 * np.linalg.norm(grads, axis=1).mean() * rng.standard_normal(d)
all_g = np.vstack([grads, attacker]) # 1 Byzantine client
mean_g = all_g.mean(0) # broken: a single attacker suffices
median_g = np.median(all_g, axis=0) # robust (Th. 4.2)
def krum(gs, f_B):
D = ((gs[:, None, :] - gs[None, :, :]) ** 2).sum(-1)
K = len(gs); m = K - f_B - 2
scores = np.sort(D, axis=1)[:, 1:m+1].sum(1) # m nearest neighbors
return gs[scores.argmin()] # Th. 4.3
print(np.linalg.norm(mean_g - grads.mean(0)),
np.linalg.norm(median_g - grads.mean(0)),
np.linalg.norm(krum(all_g, 1) - grads.mean(0)))Without a defense, a single poisoned gradient shifts the mean by as much as desired; the median stays close to the true gradient; check that Krum indeed selects an honest gradient, then build the “dimension-by-dimension” attack (ch. 8) that traps the coordinate-wise median.
5. Differential privacy
A trained model can leak its training data: an attacker may tell whether a given person was in the dataset, or even extract a memorized sentence. Differential privacy turns “the output barely depends on any one individual” into a measurable guarantee. This chapter defines it, proves the composition rule and the Laplace mechanism, and builds DP-SGD, the private version of stochastic gradient descent.
Definition 5.1 — (\varepsilon, \delta)-differential privacy (Dwork) Two datasets D \sim D' are neighbors if they differ in a single individual (addition/removal; some authors: replacement, i.e. Hamming distance 2 — state the convention!). A randomized algorithm \mathcal{A} is (\varepsilon,\delta)-DP if for all D \sim D' and every event S:
Key result — differential privacy \mathbb{P}[\mathcal{A}(D) \in S] \;\leq\; e^\varepsilon\, \mathbb{P}[\mathcal{A}(D') \in S] + \delta.
Small \varepsilon ⇒ the output barely changes if one individual changes — a computable guarantee, composable, independent of the adversary’s prior knowledge. \delta allows a rare leak (typically \delta \ll 1/n).
Proposition 5.2 — Post-processing If \mathcal{A} is (\varepsilon, \delta)-DP, any function g applied to its output (analysis, fine-tuning, publication) is too — DP survives any a posteriori transformation of the results. (Proof: the likelihood ratio of g(\mathcal{A}(D)) inherits that of \mathcal{A}(D) by change of variables — inequality of measure ratios.)
Theorem 5.3 — Sequential composition (proved, case \delta = 0) Let \mathcal{A}_1 be \varepsilon_1-DP, and let \mathcal{A}_2 — applied to D and to the result of \mathcal{A}_1 — be \varepsilon_2-DP. Then budgets add up: (\mathcal{A}_1, \mathcal{A}_2) \ \text{is} \ (\varepsilon_1 + \varepsilon_2)\text{-DP}.
Proof. For any subset S of the product of the outputs, conditioning on the first output z: \mathbb{P}[(\mathcal{A}_1, \mathcal{A}_2)(D) \in S] = \int \mathbb{P}[\mathcal{A}_1(D) = dz]\; \mathbb{P}[\mathcal{A}_2(D, z) \in S_z] where S_z = \{y : (z, y) \in S\}. By DP of \mathcal{A}_2, this is \leq e^{\varepsilon_2} \int \mathbb{P}[\mathcal{A}_1(D) = dz]\, \mathbb{P}[\mathcal{A}_2(D', z) \in S_z], then by DP of \mathcal{A}_1, \leq e^{\varepsilon_2} e^{\varepsilon_1} \int \mathbb{P}[\mathcal{A}_1(D') = dz]\, \mathbb{P}[\mathcal{A}_2(D', z) \in S_z] = e^{\varepsilon_1 + \varepsilon_2}\, \mathbb{P}[(\mathcal{A}_1, \mathcal{A}_2)(D') \in S]. ∎
Usage. T accesses that are \varepsilon-DP ⇒ (T\varepsilon)-DP: a naive linear budget. Advanced composition (Rényi DP, moments accountant, 5.5) gives \varepsilon \sim \sqrt T — it is what makes DP deep learning practical.
Theorem 5.4 — Laplace mechanism (proved via sensitivity) The \ell_1 sensitivity of a query q is \Delta_1 = \max_{D \sim D'} \|q(D) - q(D')\|_1 . The mechanism M(D) = q(D) + (Z_1, \dots, Z_k), with Z_i \sim \mathrm{Lap}(\Delta_1/\varepsilon) i.i.d. (density \tfrac{1}{2b}e^{-|z|/b}), is \varepsilon-DP.
Proof. For any output z, the ratio of densities satisfies, by the triangle inequality: \frac{p_M(z \mid D)}{p_M(z \mid D')} = \exp\Big(-\tfrac{\|z - q(D)\|_1 - \|z - q(D')\|_1}{b}\Big) \;\leq\; \exp\Big(\tfrac{\|q(D) - q(D')\|_1}{b}\Big) \;\leq\; e^{\Delta_1/b} = e^{\varepsilon}, with b = \Delta_1/\varepsilon. Since the density ratio is uniformly bounded by e^\varepsilon, so is the ratio of the probabilities of any event: \varepsilon-DP. ∎
Added error. \mathbb{E}|Z_i| = b = \Delta_1/\varepsilon (per coordinate): the noise is proportional to the sensitivity — hence the art of DP: rewriting queries to minimize \Delta_1.
Gaussian: with the \ell_2 sensitivity \Delta_2 and Z \sim \mathcal{N}(0, \sigma_G^2 I), the condition \sigma_G \geq \Delta_2 \sqrt{2\ln(1.25/\delta)}/\varepsilon \qquad (0 < \varepsilon < 1) gives (\varepsilon, \delta)-DP (Dwork & Roth, Theorem A.1, via a Gaussian tail bound; \ell_2 noise is the right regime for training).
The classical calibration holds only for \varepsilon < 1. For larger budgets, such as the \varepsilon = 8 of DP-SGD runs, the noise is calibrated numerically: by the accountant of 5.5 or by the analytic Gaussian mechanism (Balle & Wang, 2018).
Algorithm 5.5 — DP-SGD (Abadi et al., 2016) and the moments accountant
- clip each gradient per example: \tilde g_i = g_i / \max(1, \|g_i\|_2/C) — bounds the sensitivity: changing one individual changes the sum of the clipped gradients by at most \sim 2C;
- add noise to the batch: \tilde g = \frac1m\big(\sum_i \tilde g_i + \mathcal{N}(0, \sigma^2 C^2 I)\big) , where \sigma is the noise multiplier (not the gradient noise of ch. 0);
- take the SGD step with \tilde g.
Moments accountant (statement). For a mechanism M, define the Rényi moment of order \lambda: M_M(\lambda) = \max_{D \sim D'} \log \mathbb{E}_{z \sim M(D)} \big[\big(\tfrac{p_M(z \mid D)}{p_M(z \mid D')}\big)^\lambda\big] . Composition adds the moments (T steps: total moment T \cdot M_M(\lambda)), and conversion to DP gives \varepsilon \;=\; \min_\lambda \frac{T\, M_M(\lambda) - \log \delta}{\lambda}, that is, typically \varepsilon = \Theta(\sqrt T) instead of T — a quadratic gain on the budget. It is this accountant (implemented in the Opacus/TensorFlow Privacy libraries) that tracks the budget at every step of training.
Fundamental trade-off: utility \leftrightarrow privacy \leftrightarrow amount of data (the noise, fixed at C, gets averaged over large batches: DP likes large n).
Proposition 5.6 — Local vs central DP Central: a trusted curator adds the noise (the mechanisms above): good utility/privacy ratio. Local: each user randomizes before sending (no trust required — the keyboard model): the variance accumulates per user, and utility drops (randomized response for counts); the shuffle model (anonymization by cryptographic mixing) sits between the two. Rule of thumb: local for extremely sensitive data, central for research, shuffle for real systems.
Membership inference attack — how it works The adversary’s goal: decide whether the example x was in the training set. Protocol (Shokri et al., 2017):
- train shadow models on similar data whose member/non-member status is known;
- learn a small classifier separating the confidence scores of members vs non-members;
- apply it to the confidences of the target model.
The exploited signal: memorization — the model is more confident on its training data; the worst memorization concerns “atypical” data (canaries: Carlini et al., 2019, demonstrate verbatim extraction of inserted secrets).
DP bounds this signal: the influence of an example on any output is capped by clipping + noise; conversely, an attack rate close to chance is an empirical privacy test.
Why LLGA cares LLMs memorize training fragments (extraction attacks); DP training (DP-SGD on fine-tuning) is an active defense — and the M2 module “Explainability, Security, Privacy of LLMs” extends exactly this chapter. In the federated setting, DP and secure aggregation (4.5) combine: cryptographic masks against the server, DP against a posteriori adversaries. Graph confidentiality (node-DP, edge-DP) protects social networks — see the Graph ML module (preview, Period 2). Multi-agent systems (see the Reinforcement Learning module, ch. 7, preview) raise the same question: what do interaction logs leak?
6. Collaboration, personalization, fairness
The previous chapters make collaboration possible; this one asks when it is worth it for each participant. It surveys how to personalize a shared model, when local models can be averaged at all, how to value each participant’s data, and how to keep the result fair across participants.
Personalization: a global model + local heads (light per-client fine-tuning); Bayesian interpretation (mixture of posteriors); multi-task formalization (Ditto, ch. 3);
Model fusion and mode connectivity: two networks trained from the same initialization are connected by a nearly flat path in the loss surface (low barrier along the segment — Frankle et al., 2020).
Consequence for collaboration: local models can be averaged… provided they stay in the same basin; realigning the neuron permutations between two models is the key to recent fusions (sketch); these are the theoretical foundations of FedAvg (the averaging of chapter 3 only makes sense in this regime);
Data markets: valuing a data source by its marginal contribution — the Shapley value \phi_i = \sum_{S \subseteq N \setminus \{i\}} \frac{|S|!\,(n - |S| - 1)!}{n!}\,\big[v(S \cup \{i\}) - v(S)\big], where N is the set of the n sources and v(S) the quality of the model trained on the sources of S (estimated by Monte-Carlo permutations when n is large; worked example below); data buyers/sellers, incentives for quality — game theory meets ML;
Vertical FL: clients hold different features about the same individuals (bank × retailer): split learning, exchanges of protected intermediate representations — a complement to the “horizontal” FL of ch. 3;
Fairness: performance per subgroup (demographic parity, equalized odds); in the federated setting, fairness also cuts across clients (6.1); the Computational Optimal Transport module (preview, Period 2) provides tools (barycenters, fairness via OT);
Toward multi-agent systems: when “workers” become LLM agents, collaboration becomes orchestration (roles, votes, verification) — the loop is closed with the Reinforcement Learning and Autonomous Agents module, chapter 7 (preview, Period 2); the mechanisms of this module (robust aggregation, budgets, incentives) carry over directly.
Worked example — Shapley values of three data sources Three hospitals A, B, C can contribute data; v(S) is the test accuracy of the model trained on the union of the sources in S, with v(\varnothing) = 0.50 \ (\text{chance}), \qquad v(A) = v(B) = 0.70, \qquad v(C) = 0.55, v(AB) = 0.80, \qquad v(AC) = v(BC) = 0.75, \qquad v(ABC) = 0.82. With n = 3 the formula averages the marginal contribution of a source over the 3! = 6 orders in which the sources can join. For A:
- it joins first in two orders (contribution 0.70 - 0.50 = 0.20 each);
- it joins after B alone (0.80 - 0.70 = 0.10);
- it joins after C alone (0.75 - 0.55 = 0.20);
- it joins last in two orders (0.82 - 0.75 = 0.07 each).
Hence \phi_A = (0.20 + 0.20 + 0.10 + 0.20 + 0.07 + 0.07)/6 = 0.14 . By symmetry \phi_B = 0.14, and the same computation for C gives \phi_C = (0.05 + 0.05 + 0.02 + 0.05 + 0.02 + 0.05)/6 = 0.04 . The three values add up to 0.32 = v(ABC) - v(\varnothing): the Shapley value distributes exactly the total gain (efficiency).
Reading: C alone brings +0.05, but once A or B is present its data are largely redundant, and its share reflects that. For n sources the exact computation needs 2^n trainings, hence the Monte-Carlo estimate over random orders.
6.1. Fairness across participants
FedAvg minimizes the average loss \sum_k p_k F_k, weighted by the data sizes p_k = n_k/n. A small client whose data differ from the others can then be sacrificed to the majority: the average looks good while one hospital receives a useless model. Fairness in collaborative learning works at two levels.
- Group fairness inside the data. Demographic parity, equalized odds and calibration within groups are defined in Machine Learning, Definition 4.4. In federated learning the sensitive groups are spread unevenly over the clients and no client sees the whole population, so the per-group rates must be aggregated (securely, 4.5) before a criterion can even be checked.
- Fairness across participants. Each client is a stakeholder, and one asks for a uniform performance: a small spread of the losses F_k(\theta), or a good worst client.
Definition 6.1 — q-FFL and agnostic federated learning
- q-FFL (Li, Sanjabi, Beirami and Smith, ICLR 2020) raises each client’s loss to the power q + 1: \min_\theta\ \sum_k \frac{p_k}{q + 1}\, F_k(\theta)^{q+1}, \qquad q \geq 0 . Its gradient \sum_k p_k F_k^q \nabla F_k reweights each client by its current loss to the power q. The value q = 0 gives the FedAvg objective; as q grows, the clients with high losses dominate.
- Agnostic federated learning (Mohri, Sivek and Suresh, ICML 2019) protects against any mixture of the clients: \min_\theta\ \max_{w \in \Lambda}\ \sum_k w_k F_k(\theta), where \Lambda is a subset of the probability simplex; with the whole simplex, it minimizes the loss of the worst client. It is solved by stochastic gradient descent on \theta and projected gradient ascent on w.
Reading. Both objectives trade average accuracy for uniformity. q-FFL moves continuously from FedAvg (q = 0) toward the worst-client objective of agnostic FL (q \to \infty); Exercise 12 computes the whole path on two quadratic clients.
Fairness across participants is not group fairness: a uniform loss over hospitals can still hide a disparity between patient groups inside each hospital, so a report gives both.
7. Scaling and compute
Training a large model is first a budget decision: for a fixed amount of compute, how large should the model be and on how many tokens should it be trained? This chapter states the empirical scaling laws, derives the compute-optimal allocation, and shows how mixtures of experts decouple the number of parameters from the cost per token.
Theorem 7.1 — Scaling laws (Kaplan 2020, Chinchilla 2022): formulas and reading On large corpora, the validation loss follows a power law in parameters N and tokens D (before the saturation regime): \text{Kaplan: } L(N, D) = \Big[\Big(\frac{N_c}{N}\Big)^{\alpha_N/\alpha_D} + \frac{D_c}{D}\Big]^{\alpha_D}, \text{Chinchilla: } L = E + \frac{A}{N^{\alpha}} + \frac{B}{D^{\beta}}, with for Chinchilla \alpha \approx 0.34, \beta \approx 0.28, and E \approx 1.69 the irreducible loss (entropy of language); A, B, N_c, D_c are calibrated constants. Training compute is billed C \approx 6\,N D FLOPs: the forward pass costs about 2 FLOPs per parameter and per token (one multiply-add), and forward plus backward cost about 3 forward passes, hence 2 \times 3 = 6.
Theorem 7.2 — Compute-optimal allocation (statement) Minimizing L = E + A N^{-\alpha} + B D^{-\beta} under the budget 6 N D = C gives
Key result — compute-optimal allocation N^\star \propto C^{\beta/(\alpha+\beta)} \approx C^{0.45}, \qquad D^\star \propto C^{\alpha/(\alpha+\beta)} \approx C^{0.55}.
The derivation — one Lagrange multiplier on the budget, whose stationarity condition is \alpha A\, N^{-\alpha} = \beta B\, D^{-\beta} — is proved once on this site, in Large Language Models, Theorem 3.1; it is not repeated here.
That is: N and D grow together, almost like \sqrt C, with a ratio D^\star/N^\star \approx 20 tokens per parameter (empirical value: ~1.4T tokens for 70B parameters).
Counter-intuitive but verified: Chinchilla (70B) beats Gopher (280B) trained on the same compute; the models of the Kaplan generation were undertrained (too many parameters, too few tokens per parameter).
LLGA reading: compute is the scarce resource; power laws justify budgets; “emergent capabilities” are the deviations (thresholds) beyond this smooth law — see the M2 Large Language Models module.
Worked example — sizing a compute-optimal run With the rule D^\star \approx 20\,N^\star, the budget constraint becomes C = 6ND = 120\,N^2, so N^\star = \sqrt{C/120}.
For the Chinchilla budget, C \approx 5.8 \times 10^{23} FLOPs: N^\star = \sqrt{4.8 \times 10^{21}} \approx 7 \times 10^{10} \ \text{parameters}, \qquad D^\star \approx 1.4 \times 10^{12} \ \text{tokens}. This is the 70B model trained on 1.4T tokens. Gopher spent about the same compute on a model four times larger that saw about one token per parameter: 6 \times 2.8 \times 10^{11} \times 3 \times 10^{11} \approx 5 \times 10^{23} .
In hardware terms: a current data-centre GPU delivers of the order of 10^{15} FLOP/s in bf16 at peak, and realistic runs use about 40% of it. So 5.8 \times 10^{23} FLOPs take about 1.5 \times 10^{9} GPU-seconds, i.e. roughly 400,000 GPU-hours.
That is weeks on a cluster of a thousand GPUs, which is why the allocation between N and D is decided before the run, never during it.
Proposition 7.3 — Mixture of Experts: decoupling FLOPs from parameters An MoE replaces each feed-forward layer with n_E “experts” and a router that activates only the top k (top-1 in Switch Transformer, Fedus et al., 2021) per token: the parameters grow with n_E (up to a trillion), while the FLOPs per token stay nearly constant — the Chinchilla law recalibrates on this distinction between active and latent parameters. Technical points: capacity factor (load per expert), balancing loss (preventing routing collapse), all-to-all communication (link to ch. 2).
Federating LLM training: where do we stand? The previous chapters combine into a “federated LLM”: cross-silo (ch. 3) LoRA adapters (FedIT, ch. 3), compression of exchanges (QSGD/error feedback, ch. 2), robust aggregation (ch. 4) if some silos are hostile, DP (ch. 5) for sensitive prompts, and compute-optimality (7.2) to decide where to place the parameters. None of these ingredients alone makes the recipe: that is exactly the state of the art — and an M2 project topic (ML Ops / LLMs).
8. Course research notes — CMAP (El Mhamdi, Dieuleveut)
The 2026-2027 SynapseS sheet names Paul Mangold (CMAP, École Polytechnique) as the coordinator of the course unit. This chapter is the material of the three official paper-reading sessions.
It presents the work of El Mahdi El Mhamdi (section 8.1, the foundation of the robustness strand of the course) and that of Aymeric Dieuleveut (section 8.2, CMAP), the team of the 2025-2026 edition as recorded on this site — foundational works of the robustness and federated strands of the course — and then the method for reading them critically (section 8.3). These papers are also the natural leads for the research project, the only assessment shown on the sheet.
8.1. El Mahdi El Mhamdi — Byzantine tolerance for distributed ML
The guiding thread: can we learn in a distributed way when some participants lie? — a line of research that founded the field (byzantine-ML) whose chapters 2-4 this course follows.
Work 8.1 — Krum (Blanchard, El Mhamdi, Guerraoui, Stainer, NeurIPS 2017) First aggregation rule provably tolerant to Byzantine clients for distributed SGD (Algorithm 4.3): selection of the most surrounded point, guarantee of distance \mathcal{O}(\sigma\sqrt d) to the true gradient under iid, cost O(K^2 d). Published at the moment distributed SGD was becoming the industrial standard — ~4000 citations; it is the reference that all subsequent GARs (geometric median, trimmed, Bulyan) discuss.
Work 8.2 — The Hidden Vulnerability & Bulyan (El Mhamdi, Guerraoui, Rouault, ICML 2018) Negative result. Coordinate-wise rules (median, trimmed mean — Th. 4.2) are beaten by a “dimension-by-dimension” attack: the attacker stays within the honest interval on each coordinate while correlating its deviations — the global direction drifts; and any rule that selects a point (Krum!) can be forced to pick a bad point under attacks varying over time.
Constructive answer: Bulyan, which requires K \geq 4f_B + 3 — iterate Krum to select K - 2f_B candidates, then, on each coordinate, average the K - 4f_B values closest to the median of the selected candidates (a trimming of 2f_B values): the selection filters out outliers, the trimming neutralizes the remaining corrupted ones; convergence is proven at the price of a residual bias and an increased variance (the 1/\sqrt K becomes 1/\sqrt{K - 4f_B} up to a constant).
Methodological lesson: impossibility first — characterize what no GAR can do, then build under these bounds.
What next? The program continues: Distributed Momentum for Byzantine-resilient SGD (ICLR 2021) — making the momentum variant robust (the optimizer’s memory accumulation enlarges the attack surface, see Proposition 0.4); and more broadly the safety of distributed learning systems: interactions between robustness (ch. 4), confidentiality (secure aggregation, ch. 5) and verifiability — the “complete security” of a federated system is a multi-objective problem, not an accumulation of patches.
8.2. Aymeric Dieuleveut — stochastic acceleration and the federated setting
Work 8.3 — Optimal averaged SGD (Dieuleveut, Flammarion, Bach, JMLR 2017) Statement (finite-dimensional case). For least-squares regression (quadratic function, noise \sigma^2, dimension d, condition number \kappa), consider SGD with Polyak-Ruppert averaging and its “tail averaging” version, which discards the first iterations: \bar\theta_n = \tfrac{2}{n}\sum_{t > n/2} \theta_t . With a constant step size, of order 1/(4R^2) where \|x\| \leq R almost surely (more generally \mathbb{E}[\|x\|^2 xx^\top] \preceq R^2 H, with H the covariance of x; Bach & Moulines, 2013), the variance part of the error reaches \mathcal{O}\Big(\frac{d\,\sigma^2}{n}\Big) \qquad \text{(minimax rate, without knowing } \sigma^2 \text{ or the spectrum)}. The paper’s algorithm (averaged, accelerated and regularized) also forgets the initial condition at the optimal rate \mathcal{O}(1/n^2).
By contrast, plain SGD with a constant step size keeps a floor of order \eta\sigma^2 (Theorem 0.1), and it reaches the slower \sigma D/\sqrt n rate only with a step tuned on D and \sigma.
Idea. Averaging decouples bias and variance: the individual iterates remain noisy, but their average estimates the optimum asymptotically without bias (the noise averages out at rate 1/n, the deterministic dynamics converge fast). It is the tool that makes SGD “parameter-free” — behind the practical optimizers of the module and the optimal Nadaraya-Watson-type rates in the nonparametric setting.
Work 8.4 — Federated-EM (Dieuleveut, Fort, Moulines, Robin, NeurIPS 2021) First federated extension of the EM algorithm to models with latent variables (Gaussian mixtures, HMMs): each client computes its local E statistics, the server aggregates and performs the M step.
Result. A version with control variates (the SCAFFOLD/SVRG motif — Proposition 0.3 and Algorithm 3.5!) corrects heterogeneity and variance: convergence is proven toward a neighborhood of the optimum at rate \mathcal{O}(1/R) in rounds, with radius controlled by heterogeneity and mitigated by the correction — the drift of Theorem 3.2 and its correction, transposed to EM steps.
Applications: federated GMMs in healthcare, federated HMMs in telephony; extended by Federated Majorize-Minimization (2025), which unifies these constructions beyond the server parameter.
And also: communication Artemis (Philippenko & Dieuleveut, 2020): tight bounds for bidirectional compression (server ⇄ clients, ch. 2) in heterogeneous federated learning — when the download AND the upload are compressed, memory is needed (error feedback on both sides) to preserve the rate. The guiding thread of this work: making the guarantees of chapter 0 robust to the realities of chapters 2-3 (expensive communication, heterogeneity, statistical variance of clients).
Reference publications (all real, verified)
- Blanchard, El Mhamdi, Guerraoui, Stainer — Machine Learning with Adversaries: Byzantine Tolerant Gradient Descent (Krum), NeurIPS 2017; link.
- El Mhamdi, Guerraoui, Rouault — The Hidden Vulnerability of Distributed Learning in Byzantium (Bulyan), ICML 2018; arXiv:1802.07927.
- El Mhamdi, Guerraoui, Rouault — Distributed Momentum for Byzantine-resilient Stochastic Gradient Descent, ICLR 2021.
- Dieuleveut, Flammarion, Bach — Harder, Better, Faster, Stronger Convergence Rates for Least-Squares Regression, JMLR 2017; arXiv:1602.05419.
- Dieuleveut, Fort, Moulines, Robin — Federated-EM with heterogeneity mitigation and variance reduction, NeurIPS 2021; arXiv:2111.02083.
- Philippenko, Dieuleveut — Artemis: tight convergence guarantees for bidirectional compression in federated learning, 2020; arXiv:2006.14591; overview: HDR, 2023.
8.3. Reading a research paper critically
The sheet devotes three sessions to reading scientific articles, with an explicit aim: learning how to read them and how to take a critical view of their content. Critical does not mean hostile: it means separating what a paper proves from what it measures and from what it merely suggests, and finding the question it leaves open. This section gives the method used in sessions 10 to 12; the papers are those of 8.1 and 8.2, all of which extend chapters 0 to 4.
Definition 8.5 — Three-pass reading (after Keshav, 2007)
- Pass 1 (about ten minutes): title, abstract, introduction, section headings, conclusion; answer the “five Cs” — the category of the paper (new algorithm, lower bound, analysis, benchmark), its context (which earlier papers it builds on), whether its assumptions look correct at first sight, its contributions, and its clarity.
- Pass 2 (about an hour): read the statements of the theorems, the algorithms, the figures and the experimental tables, but skip the proofs; write down what is unclear and which references would be needed.
- Pass 3 (several hours, for one paper per group): rebuild the main result — re-derive the key step of the proof or re-run the key experiment — questioning every assumption as you go.
Definition 8.6 — Critique grid For each paper, answer five points in writing.
- Claim: the main result in one sentence, with its quantifiers (“for all f_B such that…”, “with probability…”).
- Assumptions: list them, separate those the proof needs from those that are only convenient, and name the one most likely to fail in practice.
- Evidence: what is proved, what is only measured, on which benchmark, against which baselines, over how many runs.
- Scope: what the result says nothing about.
- Next question: one research question in the sense of Definition 1.1 that the paper leaves open.
Worked example — the grid applied to Krum (Work 8.1) Claim: with K workers of which at most f_B are Byzantine and K \geq 2f_B + 3, the vector selected by Krum is, in expectation, positively aligned with the true gradient \nabla F, and SGD driven by it reaches a region where the gradient is small.
Assumptions: the honest gradients are i.i.d. and unbiased with variance \sigma^2 per coordinate; the bound f_B is known in advance; and the honest noise must be small compared with the gradient — a condition of the form c(K, f_B)\,\sigma\sqrt d < \|\nabla F\|. The most fragile assumption in our setting is the first one: federated clients are not identically distributed (ch. 3), so the guarantee does not transfer to FedAvg as it stands.
Evidence: a proof for the alignment and the convergence, plus experiments with simulated attackers; the experiments do not test heterogeneous clients.
Scope: the condition on \|\nabla F\| fails near any stationary point, so the guarantee only brings the iterates to a region where \|\nabla F\| is of order c(K,f_B)\,\sigma\sqrt d — large in high dimension (see ch. 4); and the analysis is silent on attackers who stay inside the honest cloud while correlating their deviations over many coordinates, which is precisely the gap that Work 8.2 exploits.
Next question: “does Krum keep a bounded error when honest gradients are non-i.i.d. with heterogeneity \zeta^2?” — the worked example of 1.1 with Krum in place of the median.
How the three sessions run Before each session, every student does passes 1 and 2 on the paper of the day. In class, each group fills the critique grid; one group presents its grid, another acts as the reviewer and must defend or attack each of the five points with a precise line of the paper.
Our suggested sequence (the coordinator chooses the actual papers): session 10, Krum (8.1), using the grid above as the model; session 11, the Hidden Vulnerability and Bulyan (8.2), which answers the “scope” point of Krum; session 12, averaged SGD or Federated-EM (8.3, 8.4) — or the reference paper of the group’s project, on which the group does pass 3.
Exercises
★ Batch variance. Show that the variance of the batch gradient of size m is \sigma^2/m, and deduce the “linear speedup” of distributed SGD (with K workers, same steps, same iterations: error \sigma/\sqrt{Km}).
★ SGD recursion. Detail the three ingredients of step 2 of Theorem 0.1 (convexity, bias-variance decomposition, smoothness inequality) and verify the telescoping step; what happens if \eta > 1/L?
★ FedAvg = SGD when E = 1. Verify that FedAvg with a single local epoch recovers exactly distributed SGD, then simulate client drift on heterogeneous quadratic data (F_k with different minimizers) for E \in \{1, 5, 20\} and recover the bias of Theorem 3.2 (with a_1 = 1, a_2 = 10).
★ Robust median. Show that if f_B < K/2 gradients are arbitrary, the coordinate-wise median stays at bounded distance from the median of the honest gradients, unlike the mean (give an explicit attack on the mean).
★ Geometric median. Implement Weiszfeld (Proposition 4.4) on Gaussian gradients + one outlying attacker; compare convergence radius and robustness with the coordinate-wise median.
★ DP of the counting query. For the query “how many individuals have property P?”, show that the release q(D) + \mathrm{Lap}(1/\varepsilon) is \varepsilon-DP (sensitivity 1), and compute the typical error.
★ Gossip. Simulate gossip aggregation \theta^{(k)} \leftarrow \theta^{(k)} + \eta_g \sum_{j \in \mathcal{N}(k)}(\theta^{(j)} - \theta^{(k)}) on a cycle then on a complete graph; relate the speed to the algebraic connectivity \lambda_2(L) of the Laplacian (box before Theorem 2.6; Graph ML ch. 4, preview).
★★ Exact SCAFFOLD on the quadratic. On the example of Theorem 3.2, write \bar a = \frac1K\sum_k a_k and recall \theta^\star = \sum_k a_k z_k / \sum_k a_k, the curvature-weighted mean of the z_k (not their plain mean). Show that with the exact control variates c_k - c = a_k(\theta - z_k) - \bar a(\theta - \theta^\star), the corrected local update uses the global gradient — and hence that the fixed point becomes \theta^\star again.
★★ Krum in practice. Implement Krum (code of ch. 4), then the “dimension-by-dimension” attack: show that an attacker who sends the honest mean gradient plus an alternating \pm\delta per coordinate traps the coordinate-wise median but not (immediately) Krum; discuss.
★★ Composition. Prove Theorem 5.3 in the case of three nested mechanisms, then compute the total budget of 100 queries that are \varepsilon_0-DP under simple composition; comment on the gap with advanced composition (\sim\sqrt T).
★★ Chinchilla on paper. Redo the derivation of Theorem 7.2 (a Lagrange multiplier on the budget, as in LLM Theorem 3.1) with \alpha = 0.34, \beta = 0.28: compute the exponents of N^\star and D^\star in C.
For C = 10^{23} FLOPs, deduce an order of magnitude of N^\star (with the constants of the paper: A \approx 406, B \approx 410) and the tokens/parameters ratio.
★★ q-FFL on two clients. Two clients with weights p_1 = 0.9 and p_2 = 0.1 hold F_1(\theta) = \tfrac12\theta^2 and F_2(\theta) = \tfrac12(1 - \theta)^2 (Definition 6.1).
- Show that the q-FFL minimizer \theta_q satisfies \big(\theta_q/(1 - \theta_q)\big)^{2q+1} = p_2/p_1. (ii) Compute \theta_q for q \in \{0, 1, 5\} and its limit as q \to \infty; compare with agnostic FL over the whole simplex. (iii) Tabulate the average loss \sum_k p_k F_k(\theta_q) and the worst-client loss: what does uniformity cost?
★★★ Research project (the official assessment). Choose one open question of chapters 2 to 7 — for instance robust aggregation when honest clients are heterogeneous (Theorem 3.2 meets Algorithm 4.3), DP-SGD for federated LoRA adapters, or compression with error feedback in both directions.
Reproduce the baseline result of the reference paper on a small benchmark, propose one modification, and report both what the theory of the course predicts and what you observe. Chapter 8 lists leads from the instructors’ own work.
Solutions — exercises 1, 2, 3, 4, 6, 10, 11, 12
1. Independence: \mathrm{Var}(\tfrac1m\sum_i g_i) = \tfrac{1}{m^2} m\sigma^2 = \sigma^2/m . For K workers with i.i.d. batches of size m, the aggregate has variance \sigma^2/(Km) — plug into Theorem 0.1 (replace \sigma by \sigma/\sqrt{Km}).
For a fixed total number of examples consumed, this gives the same error as sequentially — but each step cost a 1/K-th of the time (parallel computation): this is the speedup, valid if communication is free (Theorem 2.2 for the full version).
2. The three ingredients:
- convexity: f(\theta^\star) \geq f(\theta_t) + \langle\nabla f(\theta_t), \theta^\star - \theta_t\rangle ;
- the decomposition \mathbb{E}\|g\|^2 = \|\nabla f\|^2 + \mathbb{E}\|\xi\|^2, then, by smoothness + convexity, \tfrac12\|\nabla f(\theta)\|^2 \leq L(f(\theta) - f^\star) ;
- telescoping: \sum_t (\mathbb{E}D_t - \mathbb{E}D_{t+1}) = D_0 - \mathbb{E}D_T \leq D^2 .
If \eta > 1/L: 1 - \eta L < 0, the descent term changes sign and the recursion no longer controls anything — this analysis needs \eta < 1/L, although plain gradient descent on a quadratic only diverges beyond 2/L.
3. For E = 1 we recover exact distributed SGD: \theta_{r+1} = \frac1K\sum_k(\theta_r - \eta g_k(\theta_r)) = \theta_r - \eta \bar g(\theta_r) . For the drift: apply Theorem 3.2 (values: fixed point \approx 0.713 versus optimum \approx 0.909).
The values asked, with \eta = 0.05 and \theta^\star \approx 0.909: \theta_\infty \approx 0.909 \ (E = 1), \qquad 0.811 \ (E = 5), \qquad 0.609 \ (E = 20), and 0.713 for E = 10, the case of Theorem 3.2.
At E = 1 the bias vanishes. The contractions c_k = 1 - \eta a_k (here 0.95 and 0.5) are not equal, but 1 - c_k = \eta a_k is proportional to a_k, so \theta_\infty = \sum_k a_k z_k \Big/ \sum_k a_k = \theta^\star . The bias grows with E — plot |\theta_\infty - \theta^\star| as a function of E.
4. The mean: if each of the f_B attackers sends \bar g_{\mathrm{hon}} + \frac{K}{f_B}\,\delta, the mean becomes \frac{(K-f_B)\,\bar g_{\mathrm{hon}} + f_B\,\bar g_{\mathrm{hon}} + K\delta}{K} = \bar g_{\mathrm{hon}} + \delta . It is shifted by exactly \delta, in any direction and by any amount.
The median: with K - f_B > K/2 honest values in [m, M], the median lies in [m, M] (Theorem 4.2); the gap to the honest median is at most the diameter of the honest part — bounded independently of the attack.
6. Sensitivity: adding/removing one individual changes q by at most 1, so \Delta_1 = 1; Theorem 5.4 gives \varepsilon-DP for b = 1/\varepsilon.
Typical error: \mathbb{E}|Z| = 1/\varepsilon (one “blurred” individual at \varepsilon = 1; at \varepsilon = 0.1, ten — hence the price of strong DP on small counts).
10. Three mechanisms: apply the nesting of Theorem 5.3 twice (\varepsilon_1 + \varepsilon_2 + \varepsilon_3). One hundred \varepsilon_0-DP queries: 100\,\varepsilon_0 under simple composition.
Advanced composition gives roughly \varepsilon \approx \sqrt{2 \times 100 \ln(1/\delta)}\,\varepsilon_0 for small \varepsilon_0 (at \delta = 10^{-6}: \approx 53\,\varepsilon_0) — better, but still growing: DP taxes every access, definitively.
11. Exponents: \beta/(\alpha+\beta) = 0.28/0.62 \approx 0.45 for N^\star, 0.34/0.62 \approx 0.55 for D^\star.
With C = 10^{23}: the Lagrange condition gives N \approx 1.7\, D^{0.82}, and 6ND = C solves, as an order of magnitude (parametric fit), to D^\star \approx 1.1 \times 10^{12} \ \text{tokens}, \qquad N^\star \approx 1.5 \times 10^{10} \ \text{parameters}. The ratio D^\star/N^\star comes out between 20 and 80 depending on the fitting method of the paper (IsoFLOP vs parametric) — two figures, one single lesson: at a fixed budget, feed the model with tokens rather than inflating the parameters.
12. (i) Setting the derivative of the objective to zero gives p_1 F_1^q\,\theta = p_2 F_2^q\,(1 - \theta), that is 0.9\,\theta^{2q+1} = 0.1\,(1 - \theta)^{2q+1} after the factors 2^{-q} cancel.
With r = 9^{-1/(2q+1)}, the minimizer is \theta_q = r/(1 + r): \theta_0 = 0.1, \qquad \theta_1 \approx 0.325, \qquad \theta_5 \approx 0.450, \qquad \theta_q \xrightarrow[q \to \infty]{} 0.5 . The value \theta_0 is the FedAvg weighted mean. Agnostic FL minimizes \max(F_1, F_2), reached where F_1 = F_2, at \theta = 0.5: the limit of q-FFL.
For q = 0, 1, 5 and the limit, the average loss is 0.045, 0.070, 0.106 and 0.125, and the worst-client loss 0.405, 0.228, 0.151 and 0.125. Uniformity divides the worst loss by about 3.2 and nearly triples the average loss.
Projects and assessment
The LLGA section of the 2026–2027 SynapseS sheet displays no assessment. The only assessment text, in the MScT IoT section, bases the final grade on “the presentation and the report of the research project” prepared during the course unit (see the sheet summary above). The subjects below are proposals of these notes, not official rules: each can serve as that research project, with the question sheet of 1.1 as its introduction and its reference paper read with the grid of 8.3. Every criterion of the rubric is judged on the report and the presentation.
The projects exercise mainly O8 (trustworthy AI: robustness, privacy, fairness across participants) and O1 (the analysis of SGD and its distributed variants), with O7 (research methodology and hands-on work), O3 for the federated LoRA subject and O4 for the decentralized subject. The written exam is a mock for self-assessment: the sheet announces none.
Solo projects
- [Solo · ≈ 20 h] Client drift and its cures, from quadratics to CIFAR-10. Does a decreasing step remove the bias of FedAvg, and when do FedProx and SCAFFOLD pay off?
- Work: reproduce Theorem 3.2 numerically (fixed point against \theta^\star, bias against E and \eta, the \eta(E-1) scaling of Theorem 3.3) and Exercises 3 and 8; then FedAvg, FedProx (a sweep of \lambda) and SCAFFOLD with a small CNN.
- Data: CIFAR-10 (Krizhevsky, 2009) over 10 clients, with a Dirichlet label split of concentration 0.1 and 1 (Hsu, Qi and Brown, 2019).
- Success criterion: the simulated fixed points match the closed form to three decimals; on CIFAR-10, accuracy against rounds over 3 seeds, with the ranking of the three methods explained by ch. 3.
- Deliverables: code, a 4–6 page report, a 10-minute talk; chapters 0 and 3.
- [Solo · ≈ 20 h] Decentralized SGD and the algebraic connectivity. How does the communication graph set the speed of consensus and the accuracy reached per byte sent?
- Work: gossip averaging and D-PSGD (Lian et al., 2017) with K = 16 workers on a path, a cycle, a 2-D grid, a random 4-regular graph (an expander with high probability) and the complete graph; \lambda_2(L) computed with NetworkX; top-k compression with error feedback (Proposition 2.4) on the exchanged models, in the form of CHOCO-SGD (Koloskova, Stich and Jaggi, ICML 2019).
- Data: logistic regression on the Adult census data (Kohavi, 1996; OpenML 1590), first shuffled across workers, then sorted by label.
- Success criterion: the measured contraction of the consensus error per round matches \rho(W) of Theorem 2.6, equal to 1 - \eta_g\lambda_2(L) for a small enough \eta_g, within 10 % on every graph; accuracy against bytes sent, compared with ring all-reduce.
- Deliverables: code, report, talk; chapter 2 and Exercise 7. It leads to Graph ML ch. 4 (spectral graph theory) and to Deep Learning P2 ch. 3 (all-reduce).
- [Solo · ≈ 25 h] Paper study: The Hidden Vulnerability of Distributed Learning in Byzantium (El Mhamdi, Guerraoui and Rouault, ICML 2018). Does the dimension-by-dimension attack defeat the coordinate-wise rules and Krum, and does Bulyan resist it?
- Work: passes 1–3 of Definition 8.5 and the critique grid of Definition 8.6; mean, coordinate-wise median, trimmed mean, Krum and Bulyan implemented; the attack of Work 8.2 and Exercise 9 reproduced with K = 25 workers and f_B = 5, so that K \geq 4f_B + 3.
- Data: MNIST (LeCun, Bottou, Bengio and Haffner, 1998) with a small MLP, iid split.
- Success criterion: the accuracy drop under attack for each rule over 3 seeds, set against the paper’s figures; the grid’s “next question” written as a question sheet (Definition 1.1).
- Deliverables: code, a report with the filled grid, a talk; chapters 4 and 8.
Group projects
- [Group of 3 · ≈ 30 h each] Robust aggregation meets heterogeneity. How much bias does each robust rule concede when honest clients disagree?
- Work: the worked example of 1.1 turned into an experiment — 20 clients, 2 of them Byzantine, honest optima spread by \zeta; coordinate-wise median, trimmed mean, Krum, geometric median (Weiszfeld) and Bulyan as \zeta grows; the predicted slope 0.14\,\zeta of the median checked; then the dimension-by-dimension attack (Work 8.2).
- Data: the synthetic quadratics of 1.1, then FEMNIST from the LEAF benchmark (Caldas et al., 2018), split by writer.
- Split: one member per family of rules (coordinate-wise, selection, geometric), with a shared simulator and attack library.
- Success criterion: bias against \zeta for each rule, with intervals over 5 seeds; the median’s slope within 20 % of 0.14; one ranking of the rules explained by ch. 4.
- Deliverables: the question sheet (1.1), code, an 8–10 page joint report, a 20-minute talk; chapters 1, 3, 4 and 8.
- [Group of 3 · ≈ 30 h each] Private, robust federated LoRA for an instruction-tuned language model. What do privacy and robustness cost when silos federate LoRA adapters?
- Work: FedAvg of the LoRA adapters (FedIT, ch. 3 note) of a small model such as Pythia-160M over 8 silos; DP-SGD on the adapters with a Rényi accountant (Opacus); a median or trimmed-mean aggregator against one hostile silo; a loss-based membership-inference test on training prompts.
- Data: databricks-dolly-15k (Conover et al., 2023), split into silos by instruction category, so that silos are heterogeneous.
- Split: federated LoRA and evaluation; DP and the accountant; attack, robust aggregation and membership inference.
- Success criterion: held-out loss against \varepsilon \in \{1, 4, 8, \infty\}; membership AUC near 0.5 at small \varepsilon; the cost of robust aggregation without attack measured.
- Deliverables: code, joint report, talk; chapters 3, 4, 5 and 7. It previews LLM 4.3 (PEFT), Privacy and UQ ch. 4 (DP-SGD) and Security ch. 8 (membership inference).
- [Group of 3 · ≈ 30 h each] Federated, private news recommendation. Can a user encoder be trained on simulated devices under DP, and how much ranking quality does it lose?
- Work: the design of FedNewsRec (Qi et al., Findings of EMNLP 2020) reproduced: a news encoder on titles, a user encoder trained by FedAvg over simulated users, DP noise on the uploaded gradients; compared with centralized training.
- Data: MIND-small, the Microsoft News Dataset (Wu et al., ACL 2020), with its impression logs.
- Split: news encoder and centralized baseline; federated training and client sampling; privacy accounting and evaluation.
- Success criterion: AUC and nDCG@10 against \varepsilon and against the number of clients per round, with intervals over seeds.
- Deliverables: code, joint report, talk; chapters 3 and 5. It prepares the Graph × LLM variant of the end-of-year project Y1.3.
Written exam (proposal)
Two hours, one handwritten A4 sheet allowed, a simple calculator allowed; four exercises, 20 points.
- Question (5 points). Explain why FedAvg with E > 1 local steps and a constant step size converges, on heterogeneous clients, to a point that is not the global optimum. Say why a decreasing step removes this bias, and how the control variates of SCAFFOLD remove it at a constant step.
- Expected: Theorem 3.2 — each client contracts toward its own optimum, and \theta_\infty weights the z_k by 1 - c_k instead of a_k; the two agree only for E = 1 or equal curvatures.
- For small \eta, 1 - c_k \approx E\eta a_k: the bias is of order \eta(E-1) and vanishes with decreasing steps (Theorem 3.3, where heterogeneity only enters the constant).
- SCAFFOLD adds c - c_k, an estimate of \nabla F - \nabla F_k: each local step follows the global gradient, and the fixed point is \theta^\star (Exercise 8).
- Question (5 points). A hospital releases the number of its n = 2000 patients who have a rare condition. (a) Give the sensitivity of this count, the Laplace scale for \varepsilon = 0.5 and the expected absolute error. (b) It releases ten such counts, for ten conditions: what is the total budget under basic composition, and which per-count budget keeps the total at 1? (c) With the Gaussian mechanism, \delta = 10^{-5} and \varepsilon = 0.5, give \sigma_G and check its validity condition.
- Expected: (a) adding or removing one patient changes the count by at most 1, so \Delta_1 = 1; scale b = 1/\varepsilon = 2, expected error 2 patients.
- Ten counts at 0.5 cost 5 (Theorem 5.3); a per-count budget of 0.1 keeps the total at 1, with scale 10 and an expected error of 10 patients.
- With \Delta_2 = 1, \sigma_G = \sqrt{2\ln(1.25 \times 10^5)}/0.5 \approx 9.7, valid since \varepsilon < 1; the expected absolute error \sigma_G\sqrt{2/\pi} \approx 7.7 is worse than Laplace for one scalar count.
- Question (5 points). Eight workers on a cycle average their models with W = I - \eta_g L and \eta_g = 1/3. (a) Check that this mixing matrix is symmetric, doubly stochastic and non-negative. (b) Give the eigenvalues of both matrices, the factor \rho(W) and the spectral gap \delta_W. (c) How many gossip rounds divide the consensus error by 1000? (d) Same questions on the complete graph with \eta_g = 1/8.
- Expected: (a) the diagonal is 1 - 2/3 = 1/3 and each of the two neighbours gets 1/3; rows and columns sum to 1.
- \lambda_j(L) = 2 - 2\cos(2\pi j/8), that is 0, 0.586 (twice), 2 (twice), 3.414 (twice) and 4; so W has eigenvalues 1, 0.805, 0.333, −0.138 and −0.333, \rho(W) \approx 0.805 and \delta_W = \eta_g\lambda_2(L) \approx 0.195.
- t \geq \ln 1000 / (-\ln 0.805) \approx 31.8, so 32 rounds.
- L = 8I - \mathbf{1}\mathbf{1}^\top, with eigenvalues 0 and 8 (seven times), hence W = \tfrac18\mathbf{1}\mathbf{1}^\top, with eigenvalues 1 and 0 (seven times): it is non-negative and doubly stochastic, \rho(W) = 0 and \delta_W = 1. Exact consensus in one round, at the price of 7 messages per worker instead of 2.
- Question (5 points). (a) Prove that the Laplace mechanism with scale b = \Delta_1/\varepsilon is \varepsilon-DP (Theorem 5.4). (b) For the counting query, show that this guarantee is tight: the mechanism is not \varepsilon'-DP for any \varepsilon' < \varepsilon.
- Expected: (a) by the triangle inequality, for every output z, \frac{p(z \mid D)}{p(z \mid D')} = \exp\Big(\frac{\|z - q(D')\|_1 - \|z - q(D)\|_1}{b}\Big) \leq e^{\Delta_1/b} = e^{\varepsilon}, and integrating over any event gives the definition with \delta = 0.
- Take neighbours with q(D) = 1 and q(D') = 0. For every z \geq 1 the density ratio equals e^{1/b} = e^{\varepsilon} exactly, so the event S = [1, \infty), of positive probability, satisfies \mathbb{P}[M(D) \in S] = e^{\varepsilon}\,\mathbb{P}[M(D') \in S], which no \varepsilon' < \varepsilon allows.
Grading rubric (proposal)
| Criterion | Weight | What earns the marks |
|---|---|---|
| Research question | 15 % | a question sheet in the form of Definition 1.1: assumptions, measured quantity, baseline and a hypothesis written before the experiment |
| Method and implementation | 25 % | algorithms written from the chapters (local steps, aggregation rules, accountant) and tested on the quadratic examples whose answers are known |
| Experimental protocol | 20 % | a stated threat model and privacy budget, baselines, controlled heterogeneity, several seeds with intervals |
| Analysis tied to the theory | 20 % | each result, failures included, compared with a statement of the course (drift bias, linear speedup, robustness bound, DP accounting) |
| Critical reading | 10 % | the reference paper read with the grid of 8.3: claim, assumptions, evidence, scope, next question |
| Report and presentation | 10 % | the two items named by the sheet: a clear written report and a talk on time, with honest limits |
References
- P. Kairouz et al., Advances and Open Problems in Federated Learning, Foundations and Trends in ML, 2021 — the reference monograph.
- L. Bottou, F. Curtis, J. Nocedal, Optimization Methods for Large-Scale Machine Learning, SIAM Review, 2018 — the SGD analysis of chapter 0.
- F. Bach, E. Moulines, Non-strongly-convex smooth stochastic approximation with convergence rate O(1/n), NeurIPS 2013 — constant-step averaged SGD (Work 8.3).
- J. Wang et al., A Field Guide to Federated Optimization, 2021 — the practical guide (arXiv).
- B. McMahan et al., Communication-Efficient Learning of Deep Networks from Decentralized Data (FedAvg), AISTATS 2017.
- T. Li et al., Federated Optimization in Heterogeneous Networks (FedProx), MLSys 2020; T. Li et al., Ditto: Fair and Robust Federated Learning Through Personalization, ICML 2021.
- X. Li, K. Huang, W. Yang, S. Wang, Z. Zhang, On the Convergence of FedAvg on Non-IID Data, ICLR 2020 — Theorem 3.3.
- T. Li, M. Sanjabi, A. Beirami, V. Smith, Fair Resource Allocation in Federated Learning (q-FFL), ICLR 2020; M. Mohri, G. Sivek, A. T. Suresh, Agnostic Federated Learning, ICML 2019 — section 6.1.
- S. P. Karimireddy et al., SCAFFOLD: Stochastic Controlled Averaging for Federated Learning, ICML 2020.
- P. Blanchard, E. M. El Mhamdi, R. Guerraoui, J. Stainer, Machine Learning with Adversaries: Byzantine Tolerant Gradient Descent (Krum), NeurIPS 2017.
- E. M. El Mhamdi, R. Guerraoui, S. Rouault, The Hidden Vulnerability of Distributed Learning in Byzantium (Bulyan), ICML 2018; Distributed Momentum for Byzantine-resilient SGD, ICLR 2021.
- Y. Chen, L. Su, J. Xu, Distributed Statistical Machine Learning in Adversarial Settings: Byzantine Gradient Descent (geometric median), Proc. ACM Meas. Anal. Comput. Syst. (POMACS), 2017.
- K. Bonawitz et al., Practical Secure Aggregation for Privacy-Preserving Machine Learning, CCS 2017.
- M. Abadi et al., Deep Learning with Differential Privacy (DP-SGD), CCS 2016.
- C. Dwork, A. Roth, The Algorithmic Foundations of Differential Privacy, FnT-TCS, 2014; B. Balle, Y.-X. Wang, Improving the Gaussian Mechanism for Differential Privacy, ICML 2018 — the analytic Gaussian mechanism.
- R. Shokri, M. Stronati, C. Song, V. Shmatikov, Membership Inference Attacks Against Machine Learning Models, IEEE S&P 2017; N. Carlini et al., The Secret Sharer, 2019.
- D. Alistarh et al., QSGD: Communication-Efficient SGD via Gradient Quantization and Encoding, NeurIPS 2017; J. Bernstein et al., signSGD with majority vote, ICLR 2019.
- B. Recht et al., Hogwild!: A Lock-Free Approach to Parallelizing Stochastic Gradient Descent, NeurIPS 2011; X. Lian et al., Can Decentralized Algorithms Outperform Centralized Algorithms?, NeurIPS 2017.
- F. Seide et al., 1-bit stochastic gradient descent and its application to data-parallel distributed training of speech DNNs, Interspeech 2014; S. Stich, J.-B. Cordonnier, M. Jaggi, Sparsified SGD with Memory, NeurIPS 2018 — error feedback.
- J. Hoffmann et al., Training Compute-Optimal Large Language Models (Chinchilla), NeurIPS 2022; J. Kaplan et al., Scaling Laws for Neural Language Models, 2020 — for chapters 1 and 7.
- W. Fedus, B. Zoph, N. Shazeer, Switch Transformers, JMLR 2022; E. Hu et al., LoRA, ICLR 2022; Y. Zhang et al., Towards Building the Federated GPT (FedIT), 2023.
- J. Frankle et al., Linear Mode Connectivity and the Lottery Ticket Hypothesis, ICML 2020 — chapter 6.
- S. Keshav, How to Read a Paper, ACM SIGCOMM Computer Communication Review 37(3), 2007 — the three-pass method of 8.3.
- P. Zhao, T. Zhang, Stochastic Optimization with Importance Sampling, ICML 2015 — chapter 0.
- Research group: A. Dieuleveut, N. Flammarion, F. Bach, Harder, Better, Faster, Stronger Convergence Rates for Least-Squares Regression, JMLR 2017; A. Dieuleveut, G. Fort, E. Moulines, G. Robin, Federated-EM, NeurIPS 2021; C. Philippenko, A. Dieuleveut, Artemis, 2020; HDR Contributions to Federated Learning and First-Order Methods, 2023 — chapter 8.