AI Glossary / Mathematics and optimization / Advanced
Clustered federated learning
Definition
Clustered federated learning is an approach to collaborative machine learning that groups clients with compatible learning needs and trains models for those groups. It aims to share useful information within clusters when one global model is an inadequate compromise across heterogeneous clients. The underlying training data can remain at their respective clients.
What it means
A client may be a device, organization, or other participant holding a local dataset. Ordinary federated learning often seeks one shared model; clustered approaches allow several group-specific models while retaining collaboration among clients in the same group.
The term describes a broad approach as well as particular published algorithms. This entry introduces the approach and uses Sattler, Müller, and Samek's research as a concrete reference. Its particular clustering criteria should not be treated as mandatory features of every clustered method. The supplied mathematics category is retained, with distributed learning also relevant for editorial classification.
How it works
Clients perform local training and communicate permitted model information. A coordination mechanism estimates which clients can benefit from a common model, forms or adjusts groups, and aggregates learning within each group. The similarity signal and clustering schedule depend on the method.
In the referenced CFL algorithm, a shared model first approaches a stationary point. Small aggregate updates combined with substantial individual updates can indicate conflicting learning directions. The method examines cosine similarities of client updates, splits the population under its criteria, and continues learning within the resulting groups.
The important distinction is between a globally small update because everyone is satisfied and a small update because opposing preferences cancel. Clustering attempts to address the latter situation. However, noisy updates, limited local data, or transient differences can make splitting unhelpful, so evaluation and explicit stopping rules remain necessary.
Three practical examples
1. Equipment monitoring: investigate whether devices operating under distinct regimes benefit from separate shared models, with local measurements retained at the devices.
2. Text prediction: explore group-specific models for clients with different language or usage patterns, while testing whether smaller groups have enough data to learn reliably.
3. Multi-organization analytics: compare a global model with models shared among organizations whose prediction tasks are compatible, using agreed evaluation and communication procedures.
Think of it this way
Think of a training course that divides participants into study groups after discovering that one lesson pace serves nobody well. Members still learn together, but each group follows a more suitable course.
The analogy does not imply that client groups correspond to obvious demographic or organizational categories. Group membership is a modeling decision, and more groups can reduce useful sharing. Keeping source records local also does not by itself guarantee privacy.
Worked example
Consider four equally weighted clients with simple scalar losses L_i(w)=(w−a_i)²/2. Let their preferred values a_i be 1, 1, 5, and 5. This is an illustrative quadratic problem, not a full execution of a published CFL algorithm.
The shared average loss is minimized at w=3, the mean preferred value. Every client's loss there is (3−1)²/2=2 or (3−5)²/2=2, so the average loss is 2.
At w=3, the four gradients are 2, 2, −2, and −2. Their average is zero even though no individual gradient is zero. The first pair wants w to decrease, and the second pair wants it to increase. Their scalar cosine similarities are 1 within each pair and −1 across pairs.
If the clients are split into those two groups, each group can choose its own parameter: w=1 or w=5. Every loss becomes zero. This shows how cancellation can conceal incompatible optima. It does not show that clustering always improves unseen-data performance; the example contains no sampling noise, estimation error, or cost for maintaining multiple models.
Illustrative case study
Fictional case: a manufacturer trains a shared fault model across machines used in different operating conditions. Overall updates become small, but some sites continue to show poor local validation performance.
The team compares update patterns and tests a clustered alternative. It evaluates each site's held-out results, checks whether small groups become unstable, and retains the global model as a comparison. It also reviews what client updates and group membership reveal. The decision to use several models is based on measured suitability and operational cost, not on an assumption that every difference between clients deserves a separate cluster.
Common misconceptions and mistakes
Do not describe clustered federated learning as requiring raw datasets to be copied into a central pool. Collaboration can occur through model updates while records remain local.
Different data distributions do not automatically imply incompatible learning tasks. Splitting can discard useful knowledge transfer. Nor does a low aggregate training loss establish good performance for every client. Finally, model updates can reveal information: privacy claims require a defined threat model and appropriate protections, beyond the word federated.
Business use
The approach can be useful when a single shared model produces uneven results across clients and independent local models lack sufficient data. It provides an intermediate choice between universal sharing and complete separation.
Evaluate the added burden of maintaining several models, routing clients to them, handling new participants, and revisiting memberships as data changes. Report performance by client or relevant group alongside the aggregate. A successful clustering policy should justify both its predictive benefit and its continuing operational complexity.
People also ask
Is each client given its own model?
Not necessarily. Clients in the same cluster typically share a group-specific model or closely related parameters.
Must raw data leave the clients?
No. Federated collaboration can use communicated model information while retaining local records.
Does clustering always improve performance?
No. Benefits depend on compatibility, data, estimation quality, and evaluation; excessive splitting can reduce useful sharing.
Check your understanding
A global update is nearly zero, but individual clients propose large updates in opposite directions. Does this prove all clients are near their own optima?
Answer: No. The updates may cancel. This motivates examining client-level behavior, although it does not alone prove that a particular split will generalize well.
Related terms
- Federated learning
- Cosine similarity
- Clustering
- client heterogeneity
- personalization
- multi-task learning
- model aggregation
- local dataset
Learn next
compare global, local, and group-specific models on the same evaluation design. Then examine how a clustered method defines similarity, decides when to split, assigns new clients, and protects communicated information.
More in Mathematics and optimization
- Absolute error loss - Absolute error loss measures a numerical prediction's error as the absolute difference between its predicted and reference values: L(y,y-hat)=|y-y-hat|.
- Active-set method - An active-set method is an optimization approach that works with a changing subset of constraints believed to be tight at the solution.
- Adjoint state method - The adjoint state method computes how a chosen objective changes when the parameters of a mathematical model change.
- Σ-algebra
- Algebraic connectivity - Algebraic connectivity is the second-smallest eigenvalue of a graph's Laplacian matrix.
- Algorithm IMED - Algorithm IMED, short for Indexed Minimum Empirical Divergence, is a method for choosing actions in a stochastic multi-armed bandit problem.
Sources
Sattler, Müller, and Samek, Clustered Federated Learning: https://arxiv.org/html/1910.01991 . Sections on splitting criteria, recursive clustering, weight updates, and privacy considerations were read. Aalto Dictionary of Machine Learning: https://aaltodictionaryofml.github.io/ADictML_Main.pdf . Editorial clarification: conceptual pooling is not a requirement to centralize raw records. The quadratic example is original.
Previous: Cluster-weighted modeling Next: Clustered file system