Papers
Topics
Authors
Recent
Search
2000 character limit reached

FedClusAvg: Federated Cluster Average

Updated 6 July 2026
  • FedClusAvg is defined as a federated learning algorithm that integrates intra‑client clustering and deviation‑based weighting to manage Non‑IID data and enhance privacy.
  • The method extends standard FedAvg with a two‑tier (or three‑tier in FedClusAvg+) approach, reducing communication rounds and improving scalability.
  • Empirical results in prosumer energy management and FDIA detection demonstrate significant accuracy gains and faster communication compared to conventional methods.

Federated Cluster Average (FedClusAvg) is a federated learning algorithm designed to cope with strongly Non‑IID data while preserving user privacy. In the published formulations devoted to prosumer energy management and to false data injection attack detection in smart grids, it extends FedAvg by combining clustering and stratified sampling inside each client, deviation‑based weighting of local or server‑side parameters, and, in the FedClusAvg+ variant, a three‑tier clients → sub‑servers → main server architecture intended to reduce communication rounds and improve scalability (Li et al., 9 Mar 2025, Li et al., 20 Jul 2025).

1. Definition, motivation, and scope

FedClusAvg appears in settings where local data are both privacy‑sensitive and statistically heterogeneous. In prosumer energy management, the motivating examples include users who both consume and produce energy, with local records reflecting features such as EV ownership, driving patterns, and detailed energy consumption profiles; the stated objective is to enable these data to participate in intelligent decision making without revealing privacy (Li et al., 9 Mar 2025). In smart grids, the same algorithmic pattern is used for FDIA detection under geographically heterogeneous SCADA and PMU measurements, where identical variables may follow distinct statistical distributions across regions and where centralized collection is constrained by privacy, regulation, transmission cost, and scalability (Li et al., 20 Jul 2025).

Within this literature, FedClusAvg has two principal forms. The basic version is a two‑tier client–server method: the server broadcasts a global model, each client internally partitions its own dataset into clusters, performs multiple local iterations on these clusters, and sends back an aggregated client model. FedClusAvg+ inserts a sub‑server layer between clients and the main server, so that client updates are first aggregated regionally and only then sent upward. In both forms, clustering is performed inside each client’s dataset rather than over the client population itself. This design choice distinguishes FedClusAvg from clustered FL frameworks that explicitly partition clients into groups.

2. Optimization model and two-tier algorithm

FedClusAvg retains the standard federated empirical risk minimization objective

minwRdf(w),f(w)=k=1KnknFk(w),\min_{\boldsymbol{w}\in\mathbb{R}^{d}} f(\boldsymbol{w}), \qquad f(\boldsymbol{w})=\sum_{k=1}^{K}\frac{n_k}{n}F_k(\boldsymbol{w}),

with

Fk(w)=1nkiPkfi(w),fi(w)=l(xi,yi;w),F_k(\boldsymbol{w})=\frac{1}{n_k}\sum_{i\in P_k} f_i(\boldsymbol{w}), \qquad f_i(\boldsymbol{w})=l(x_i,y_i;\boldsymbol{w}),

where client kk holds dataset PkP_k, nk=Pkn_k=|P_k|, and n=knkn=\sum_k n_k (Li et al., 9 Mar 2025).

The basic per‑round pipeline is server initialization, broadcast of the current global model wtw_t, local client updates, and server aggregation. The distinctive step is that a client does not train on PkP_k as a single pool. Instead, it clusters PkP_k into several “small clients,” trains a model wjw_j on each cluster Fk(w)=1nkiPkfi(w),fi(w)=l(xi,yi;w),F_k(\boldsymbol{w})=\frac{1}{n_k}\sum_{i\in P_k} f_i(\boldsymbol{w}), \qquad f_i(\boldsymbol{w})=l(x_i,y_i;\boldsymbol{w}),0, and then aggregates these cluster models into a client model Fk(w)=1nkiPkfi(w),fi(w)=l(xi,yi;w),F_k(\boldsymbol{w})=\frac{1}{n_k}\sum_{i\in P_k} f_i(\boldsymbol{w}), \qquad f_i(\boldsymbol{w})=l(x_i,y_i;\boldsymbol{w}),1. The within‑client aggregation is defined by

Fk(w)=1nkiPkfi(w),fi(w)=l(xi,yi;w),F_k(\boldsymbol{w})=\frac{1}{n_k}\sum_{i\in P_k} f_i(\boldsymbol{w}), \qquad f_i(\boldsymbol{w})=l(x_i,y_i;\boldsymbol{w}),2

Fk(w)=1nkiPkfi(w),fi(w)=l(xi,yi;w),F_k(\boldsymbol{w})=\frac{1}{n_k}\sum_{i\in P_k} f_i(\boldsymbol{w}), \qquad f_i(\boldsymbol{w})=l(x_i,y_i;\boldsymbol{w}),3

Fk(w)=1nkiPkfi(w),fi(w)=l(xi,yi;w),F_k(\boldsymbol{w})=\frac{1}{n_k}\sum_{i\in P_k} f_i(\boldsymbol{w}), \qquad f_i(\boldsymbol{w})=l(x_i,y_i;\boldsymbol{w}),4

The server then performs a second deviation‑based aggregation over clients: Fk(w)=1nkiPkfi(w),fi(w)=l(xi,yi;w),F_k(\boldsymbol{w})=\frac{1}{n_k}\sum_{i\in P_k} f_i(\boldsymbol{w}), \qquad f_i(\boldsymbol{w})=l(x_i,y_i;\boldsymbol{w}),5

Fk(w)=1nkiPkfi(w),fi(w)=l(xi,yi;w),F_k(\boldsymbol{w})=\frac{1}{n_k}\sum_{i\in P_k} f_i(\boldsymbol{w}), \qquad f_i(\boldsymbol{w})=l(x_i,y_i;\boldsymbol{w}),6

Fk(w)=1nkiPkfi(w),fi(w)=l(xi,yi;w),F_k(\boldsymbol{w})=\frac{1}{n_k}\sum_{i\in P_k} f_i(\boldsymbol{w}), \qquad f_i(\boldsymbol{w})=l(x_i,y_i;\boldsymbol{w}),7

A gradient‑form description is also given in the prosumer formulation: local cluster gradients Fk(w)=1nkiPkfi(w),fi(w)=l(xi,yi;w),F_k(\boldsymbol{w})=\frac{1}{n_k}\sum_{i\in P_k} f_i(\boldsymbol{w}), \qquad f_i(\boldsymbol{w})=l(x_i,y_i;\boldsymbol{w}),8 are averaged by first computing a data‑size‑weighted mean, then assigning weights according to deviation from that mean, and finally taking a weighted combination of the gradients. The parameter‑level and gradient‑level versions are presented as conceptually equivalent.

3. Intra-client clustering, stratified sampling, and FedClusAvg+

The client‑side clustering routine is described as cluster stratified sampling. Each local sample is represented as

Fk(w)=1nkiPkfi(w),fi(w)=l(xi,yi;w),F_k(\boldsymbol{w})=\frac{1}{n_k}\sum_{i\in P_k} f_i(\boldsymbol{w}), \qquad f_i(\boldsymbol{w})=l(x_i,y_i;\boldsymbol{w}),9

and attributes are standardized before clustering. The routine denoted “SpectralClust” in the pseudo‑code uses a longest‑distance rule. A threshold kk0 with kk1 is chosen, one sample is selected as the first center kk2, the farthest sample becomes kk3, and additional centers are added only if

kk4

where

kk5

Samples are then assigned by nearest center. The implementation details state that clients with kk6 are eligible for clustering, that the distance between class centers in the optimal scheme is greater than kk7 of the average pre‑clustering sample distance, that the number of clusters is roughly kk8, and that if kk9 the client attempts clustering; otherwise it falls back to treating the whole PkP_k0 as one cluster (Li et al., 9 Mar 2025).

After clustering, each cluster is trained for PkP_k1 local epochs over mini‑batches: PkP_k2 The resulting cluster models are combined into a single client model by the deviation‑based weighting above. The stratified aspect is therefore not a separate random subsampling mechanism; it is primarily a grouping‑then‑aggregation scheme.

FedClusAvg+ extends this logic hierarchically. For sub‑server PkP_k3 with clients PkP_k4, the sub‑server computes

PkP_k5

PkP_k6

The main server then aggregates sub‑server models: PkP_k7

PkP_k8

The intended effect is to replace PkP_k9 main‑server uploads per round with nk=Pkn_k=|P_k|0 uploads per round while retaining the same local clustering logic (Li et al., 20 Jul 2025).

4. Treatment of heterogeneity, privacy model, and a notable ambiguity

FedClusAvg addresses Non‑IID data in two complementary ways. First, it reduces within‑client heterogeneity by splitting each client’s data into more homogeneous clusters and training cluster‑specific local models. Second, it mitigates disagreement across clients by weighting models according to their deviation from a pre‑average model at the client, sub‑server, and server levels. The stated motivation is that when the parameter deviation of a client is large, the weight of that parameter should be reduced so that the algorithm can achieve higher accuracy in processing Non‑IID data (Li et al., 9 Mar 2025, Li et al., 20 Jul 2025).

A well‑known interpretive issue follows immediately from the formulas. The explicit definitions use

nk=Pkn_k=|P_k|1

so the implemented weights increase with deviation rather than decrease. Both the prosumer formulation and the smart‑grid formulation note this inconsistency between the textual explanation and the mathematical expression. The natural reading is that the published method is defined by the formulas as written, while the prose suggests an opposite intuition. A plausible implication is that FedClusAvg should be treated as a heuristic aggregation rule whose exact robustness mechanism is not theoretically settled.

The privacy model is the standard FL locality assumption. Raw client data do not leave the device or local gateway; only parameters or gradients are exchanged. The prosumer paper explicitly states that it does not introduce differential privacy, secure aggregation protocols, homomorphic encryption, or specific MPC schemes, and the FDIA paper presents differential privacy, secure multi‑party computation, homomorphic encryption, and secure aggregation as possible extensions rather than implemented components (Li et al., 9 Mar 2025, Li et al., 20 Jul 2025). Likewise, neither formulation provides formal convergence proofs or theoretical rates.

5. Application domains and empirical evidence

Although the prosumer paper is motivated by energy management, its reported experiments use a cardiovascular disease dataset from Kaggle with 70,000 records, 11 input features, a logistic regression model, 100 clients, learning rate nk=Pkn_k=|P_k|2, nk=Pkn_k=|P_k|3 local epochs, and nk=Pkn_k=|P_k|4 server rounds. In the two‑tier setting, the reported mean metrics are: accuracy nk=Pkn_k=|P_k|5 for FedClusAvg versus nk=Pkn_k=|P_k|6 for FedAvg, precision nk=Pkn_k=|P_k|7 versus nk=Pkn_k=|P_k|8, recall nk=Pkn_k=|P_k|9 versus n=knkn=\sum_k n_k0, and n=knkn=\sum_k n_k1 versus n=knkn=\sum_k n_k2. In the three‑tier setting, FedClusAvg+ reports mean accuracy n=knkn=\sum_k n_k3 versus n=knkn=\sum_k n_k4 for FedAvg+, precision n=knkn=\sum_k n_k5 versus n=knkn=\sum_k n_k6, recall n=knkn=\sum_k n_k7 versus n=knkn=\sum_k n_k8, and n=knkn=\sum_k n_k9 versus wtw_t0. KS curves and accuracy‑versus‑round plots are described as favoring the clustered method (Li et al., 9 Mar 2025).

The FDIA paper evaluates the method on the IEEE 118‑bus system and larger benchmark systems. For IEEE‑118, with 100 clients and 5 sub‑servers, FedClusAvg reports mean accuracy wtw_t1, precision wtw_t2, recall wtw_t3, and wtw_t4, compared with wtw_t5, wtw_t6, wtw_t7, and wtw_t8 for FedAvg. FedClusAvg+ reports mean accuracy wtw_t9, precision PkP_k0, recall PkP_k1, and PkP_k2, compared with PkP_k3, PkP_k4, PkP_k5, and PkP_k6 for FedAvg+. Against FedProx and FedNova on IEEE‑118, the three‑tier version reports mean accuracy PkP_k7 and PkP_k8, compared with PkP_k9 and PkP_k0 for FedProx, and PkP_k1 and PkP_k2 for FedNova. On larger systems—IEEE‑300, a regional grid with 1,500 buses, and a provincial grid with 5,000 buses—the paper reports consistent Accuracy and AUC advantages for FedClusAvg+. Under very high heterogeneity (PkP_k3 difference), the reported accuracy gaps between FedClusAvg+ and FedAvg+ are PkP_k4 points on IEEE‑300 and PkP_k5 points on the provincial grid. Communication measurements further report per‑round delay reductions from approximately PkP_k6 to PkP_k7 under WiFi and from PkP_k8 to PkP_k9 under 5G when moving from FedClusAvg to FedClusAvg+ (Li et al., 20 Jul 2025).

6. Position within clustered federated learning and privacy-preserving averaging

FedClusAvg belongs to a broader family of clustered or cluster‑aware federated methods, but its clustering locus is distinctive. FedGroup groups clients according to similarities between their optimization directions and then runs group‑wise FedAvg or FedProx, using cosine‑similarity‑based clustering and the Euclidean distance of Decomposed Cosine similarity (EDC) to reduce the cost of client clustering (Duan et al., 2020). FedCluster, by contrast, partitions devices into multiple clusters and performs federated learning cyclically in each learning round, yielding a cluster‑wise FedAvg update schedule with nonconvex rate wjw_j0 under the stated assumptions (Chen et al., 2020). These frameworks cluster clients; FedClusAvg clusters samples within each client.

The weighting logic of FedClusAvg also sits near later work on cluster‑skew. FedDRL defines cluster‑skew as a setting in which groups of clients have similar local data distributions and shows that purely sample‑proportional aggregation can overly favor groups with more clients, even when label size and number of samples are balanced. Its remedy is adaptive, loss‑driven aggregation weights produced by deep reinforcement learning rather than by a closed‑form deviation rule (Nguyen et al., 2022). This does not make FedDRL a FedClusAvg method, but it clarifies the broader problem to which deviation‑aware weighting responds.

A separate line of work uses clusters primarily for privacy rather than for handling Non‑IID data. In cluster‑based secure multi‑party computation for histopathology images, hospitals are partitioned into equal‑size clusters, each hospital splits its local model into additive shares with coefficients wjw_j1, cluster members exchange masked shares, and the server recovers the exact global average

wjw_j2

without observing any individual wjw_j3 (Hosseini et al., 2022). This is a cluster‑mediated average, but the cluster structure is a logical SMC device rather than a statistical clustering mechanism.

Recent work also exposes limits of flat prototype averaging in unsupervised federated clustering. One‑Shot Hierarchical Federated Clustering argues that fragmented and multi‑granular global clusters can make naive prototype averaging distort the global structure, and instead proposes one‑way prototype‑level communication together with server‑side hierarchical fusion of client clusterlets (Cai et al., 10 Jan 2026). In decentralized clustered FL, DFCA shows that cluster‑specific models can be aggregated without a server by means of a sequential running average over neighbors as updates arrive, illustrating a serverless form of cluster‑wise averaging (Kirch et al., 17 Oct 2025). Taken together, these neighboring lines of work suggest that “federated cluster average” is best understood not as a single canonical protocol, but as a design pattern spanning intra‑client clustering, client‑level grouping, secure cluster‑mediated averaging, and decentralized cluster‑wise consensus.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Federated Cluster Average (FedClusAvg).