betaFeedback

WorksComputer Science

Fed-BRDECS: Privacy-Preserving and Heterogeneity-Aware Federated Deep Embedded Clustering

Abstract

Federated deep clustering seeks to learn clustering-friendly representations from decentralized unlabeled data while preserving client privacy. However, Deep Embedded Clustering (DEC)-style objectives depend on global soft-assignment statistics that require clients to reveal their sensitive information. We propose Fed-BRDECS, a privacy-preserving and heterogeneity-aware federated deep embedded clustering framework. Fed-BRDECS replaces the globally normalized clustering objective with a locally computable sample-stability loss, avoiding the transmission of local soft-assignment distributions. To tackle non-IID client distributions, we introduce prediction-balanced sampling, which oversamples locally rare predicted clusters without requiring ground-truth labels, and centroid-level restarting, which periodically refreshes biased or inactive centroids. Experiments on image and text clustering benchmarks show that Fed-BRDECS consistently outperforms representative federated clustering and deep clustering baselines under both IID and non-IID partitions. We further demonstrate its applicability to federated time-series anomaly detection, where it improves reconstruction-based detectors without adding inference-time cost.

INTRODUCTION

Clustering is a fundamental unsupervised learning task, but in many applications data are distributed across institutions or devices and cannot be centrally collected due to privacy and ownership constraints [15, 32, 25, 30, 31]. Federated learning (FL) provides a natural paradigm for this setting by enabling multiple clients to collaboratively train a model while keeping raw data local [23]. Extending clustering to the federated setting is therefore important for privacy-preserving unsupervised representation learning, where labels are unavailable and data heterogeneity is often severe [9, 11]. However, directly applying centralized deep clustering methods to FL is nontrivial.

DEC [43] and its improved variant IDEC [12] are the dominant modern approaches to deep clustering, especially in the centralized regime. After autoencoder pre-training, they jointly refine latent representations and cluster assignments using soft assignments and an auxiliary target distribution. In FL, this target requires dataset-level assignment frequencies, and reproducing it requires either exchanging local cluster statistics, which exposes client composition, or constructing targets from incomplete local views, which can bias optimization under heterogeneity.

Heterogeneity can further lead to biased centroid updates and inactive clusters [9, 28]. For example, cluster-frequency-based objectives may over-emphasize locally dominant clusters and under-train rare clusters. Federated clustering can also suffer from cluster collapse and early saturation. Once the encoder and centroids become aligned with an imperfect early partition, subsequent training may reinforce the same assignments rather than correct them. Recent work identifies this phenomenon as a reclustering barrier [24]. In FL, this early saturation can be further amplified because client updates are computed from partial, heterogeneous views and then averaged at the server.

We propose Fed-BRDECS (Federated Balanced-Sampling and Restarted Deep Embedded Clustering with Sample Stability), a federated deep clustering framework with three components. These enhancements address the privacy issues inherent in directly applying DEC to FL, while simultaneously tackling the core challenges of federated deep clustering.

First, it replaces the globally normalized IDEC clustering objective with a locally computable sample-stability loss inspired by DECS [4]. Since this objective is computed using only local samples and current centroids, clients do not need to transmit sensitive soft-assignment distributions. Second, to mitigate local imbalance under heterogeneous FL, it uses a prediction-based balanced sampler that oversamples each client’s locally rare predicted clusters using the model’s own assignments. This acts as an unsupervised form of class-balanced importance sampling. Third, periodic federated restarting recomputes centroids in the current embedding space to recover collapsed clusters.

DEC has several applications, with outlier detection being one of the most common. We use Fed-BRDECS as the building block for federated outlier detection and validate on time-series data from both public benchmarks and a proprietary sensor dataset. Since many detectors are built on deep embedded clustering structures [46, 26], our framework can be easily applied to DEC-based or AE-based federated time-series anomaly detection algorithms. This demonstrates that the proposed framework is not limited to standard clustering benchmarks, but can also serve as a privacy-preserving representation-learning backbone for downstream unsupervised tasks.

Our contributions are summarized as follows.

  1. We propose Fed-BRDECS, a federated deep embedded clustering framework for heterogeneous unsupervised federated learning. Unlike prior federated or distributed clustering methods that exchange local clustering information, Fed-BRDECS enables IDEC-style joint representation and clustering refinement using a locally computable sample-stability loss without transmitting local assignment statistics.

  1. We introduce two mechanisms to improve federated deep clustering under heterogeneous client distributions: a prediction-based balanced sampler that mitigates local cluster imbalance using pseudo-labels, and an iterative restarting strategy that refreshes centroids to reduce early commitment and cluster collapse.

  1. We demonstrate consistent empirical improvements over representative federated clustering and deep clustering baselines, with ablation studies validating the contribution of stability loss, balanced sampling, and restarting.

  1. We evaluate Fed-BRDECS on federated time-series anomaly detection as a practical stress test for unsupervised federated representation learning, showing that the proposed framework can improve reconstruction-based detectors under heterogeneous client time-series distributions without adding inference-time cost.

RELATED WORK

Deep clustering. DEC [43] is a pioneering work showing that a representation can be learned directly from a clustering objective. IDEC [12] adds a reconstruction term to preserve local structure, and DCN [45] similarly connects representation learning with k-means style clustering. A common limitation of DEC-based methods is their reliance on manually constructed pseudo-targets, which may reinforce early assignment errors and depend on dataset-level assignment statistics. DECS [4] replaces pseudo-targets with sample-stability optimization, which we adopt to eliminate global assignment statistics. BRB [24] addresses early saturation through reclustering and soft parameter resets. Fed-BRDECS adapts these ideas to heterogeneous FL using local stability optimization and centroid-level restarting without parameter resets.

Federated clustering. Federated clustering has mostly focused on centroid-style algorithms over fixed features rather than deep representation learning. k-FED [9] is a one-shot method in which each client uploads its local cluster centers only once. FKM [11] extends this paradigm to multiple communication rounds. Other methods address specific limitations of federated k-means: DWF k-Means [13] introduces dynamic weighting, Fork [3] improves robustness, and FedDP k-Means [34] incorporates differential privacy. In contrast to these hard-assignment approaches, FFCM [36] adapts fuzzy c-means to federated learning, allowing samples to have soft membership across multiple clusters. However, these methods still perform centroid-based clustering on raw or precomputed features rather than jointly learning deep representations, and they also exchange explicit local cluster statistics. More recently, efforts have emerged to apply deep clustering to FL. F-DEC [22] directly applies DEC to FL by optimizing a KL-based clustering loss across clients, and FDEC (Xu et al., 2025) attempts to achieve robustness through hybrid federated averaging. CCFC [19] incorporates a cluster-contrastive loss to learn clustering-friendly representations. Still, these deep frameworks do not explicitly resolve core FL challenges such as centroid collapse, data heterogeneity, and privacy leakage tied to transmitting local soft assignment statistics. Table 1 summarizes these differences.

MethodPrivacy-preservingDeep clusteringHeterogeneity-aware
k-FED✓
DWF k-Means
FKM
FFCM
F-DEC✓
CCFC✓✓
Fed-BRDECS✓✓✓

Table 1. Comparison with representative federated clustering methods. A check mark indicates that the method explicitly supports the corresponding property. “Privacy-preserving” means that clients do not transmit local cluster assignments or soft-assignment matrices.

Imbalance in federated and unsupervised learning. Heterogeneity and imbalance are central challenges in FL. Supervised FL methods commonly address them through local data rebalancing, loss reweighting, or aggregation adjustment [40, 35, 5, 29]. However, these methods rely on labels or label-distribution information, which are unavailable in unsupervised federated clustering. In unlabeled settings, related works—particularly in centralized environments—utilize inferred groups or pseudo-clusters to mitigate imbalance. For instance, some approaches balance unlabeled datasets using cluster IDs as pseudo-classes, while others partition majority classes into subclusters for imbalanced classification [38, 17]. We adapt this concept to federated clustering. However, rather than treating predicted cluster assignments as supervised targets, we use them strictly to define a local sampling distribution paired with an oversampling strategy.

METHOD

Preliminaries: DEC/IDEC

DEC and IDEC combine representation learning with centroid-based clustering to map raw data into a semantically meaningful latent space. Let D={xi}i=1N\mathcal{D} = \{x_i\}_{i=1}^{N} be a centralized dataset. An encoder fθ:X→Zf_{\theta} : \mathcal{X} \to\mathcal{Z} maps an input xix_i to a latent representation zi=fθ(xi)∈Zz_i = f_{\theta}(x_i) \in\mathcal{Z} and a decoder gϕ:Z→Xg_{\phi} : \mathcal{Z} \to\mathcal{X} reconstructs the input, encouraging the latent representation to preserve local structures. The framework maintains CC trainable centroids {μj}j=1C⊂Z\{\mu_j\}_{j=1}^{C} \subset\mathcal{Z}. Standard IDEC operates in three stages:

  1. Autoencoder Pretraining: The network minimizes reconstruction loss to establish a meaningful initial embedding space:

min⁡ϕ,θLrec=1N∑i=1N∥xi−gϕ(fθ(xi))∥22.(1)\min_{\phi,\theta} \mathcal{L}_{\mathrm{rec}} = \frac{1}{N}\sum_{i=1}^{N}\lVert x_i - g_{\phi}(f_{\theta}(x_i)) \rVert_2^2. \tag*{(1)}
  1. Centroid Initialization: Centroid-based clustering (usually, k-Means++) is applied to the pretrained embeddings {zi=fθ(xi)}i=1N\{z_i = f_{\theta}(x_i)\}_{i=1}^{N} to initialize the centroids {μj}j=1C\{\mu_j\}_{j=1}^{C} where ϕ,θ\phi,\theta are learned through (1).

  1. Joint Clustering Refinement: The encoder, decoder, and centroids are jointly optimized. For each sample, a soft assignment qijq_{ij} is computed using a Student-tt kernel:

qij=(1+∥zi−μj∥22/α)−α+12∑ℓ=1C(1+∥zi−μℓ∥22/α)−α+12,(2)q_{ij} = \frac{\left(1 + \lVert z_i - \mu_j \rVert_2^2/\alpha\right)^{-\frac{\alpha+1}{2}}}{\sum_{\ell=1}^{C}\left(1 + \lVert z_i - \mu_{\ell} \rVert_2^2/\alpha\right)^{-\frac{\alpha+1}{2}}}, \tag*{(2)}

where α>0\alpha> 0 denotes the degrees-of-freedom parameter. A large value of qijq_{ij} indicates that ziz_i is closer to centroid μj\mu_j relative to the other centroids. An auxiliary target distribution PP is then constructed to sharpen confident assignments after constructing soft cluster frequencies fj=∑i=1Nqijf_j = \sum_{i=1}^{N} q_{ij}:

pij=qij2/fj∑ℓ=1Cqiℓ2/fℓ.(3)p_{ij} = \frac{q_{ij}^{2}/f_j}{\sum_{\ell=1}^{C}q_{i\ell}^{2}/f_{\ell}}. \tag*{(3)}

The parameters are updated via stochastic gradient descent by minimizing the joint loss:

LIDEC=Lrec+λcluKL⁡(P∥Q),(4)\mathcal{L}_{\mathrm{IDEC}} = \mathcal{L}_{\mathrm{rec}} + \lambda_{\mathrm{clu}} \operatorname{KL}(P\|Q), \tag*{(4)}

where λclu\lambda_{\mathrm{clu}} balances reconstruction and cluster refinement. DEC only uses clustering loss without reconstruction loss for clustering refinement.

Problem Formulation: Federated Deep Embedded Clustering

We consider an unsupervised federated learning setting with KK clients. Client kk owns an unlabeled private dataset Dk={xk,i}i=1nk\mathcal{D}_k=\{x_{k,i}\}_{i=1}^{n_k}. The global dataset is defined as D=⋃k=1KDk\mathcal{D}=\bigcup_{k=1}^{K}\mathcal{D}_k and the total number of samples is N=∑k=1KnkN=\sum_{k=1}^{K}n_k. The goal is to learn a single global clustering model that partitions the distributed dataset into CC clusters.

Privacy issue in FL. Directly applying IDEC to FL introduces a severe problem. Computing the global target distribution requires aggregating dataset-wide soft frequencies fjf_j. In FL, this forces each client kk to compute and upload local soft counts fk,j=∑xi∈Dkqijf_{k,j}=\sum_{x_i\in\mathcal{D}_k}q_{ij} to the server. This mechanism leaks sensitive information regarding local cluster compositions and relies on stale global statistics between periodic server refreshes. These limitations motivate Fed-BRDECS to replace the global KL target with a locally computable sample-stability objective.

Problem formulation. Following the deep embedded clustering framework, the global model is denoted by Θ={θ,ϕ,μ1,…,μC}\Theta=\{\theta,\phi,\mu_1,\ldots,\mu_C\}. It consists of an encoder fθ:X→Zf_\theta:\mathcal{X}\to\mathcal{Z}, a decoder gϕ:Z→Xg_\phi:\mathcal{Z}\to\mathcal{X}, and CC centroids {μj}j=1C⊂Z\{\mu_j\}_{j=1}^{C}\subset\mathcal{Z} in the latent space Z\mathcal{Z}. Given a trained model, the cluster assignment of a sample xx is determined by the nearest centroid in the latent space, y^(x)=arg⁡min⁡j∈{1,…,C}∥fθ(x)−μj∥2\hat{y}(x)=\arg\min_{j\in\{1,\ldots,C\}}\lVert f_\theta(x)-\mu_j\rVert^2. Since training is unsupervised, these assignments are model-induced pseudo-cluster labels rather than ground-truth labels. Because these local assignments can still leak privacy-sensitive information, we focus on a federated clustering design that entirely eliminates the transmission of local assignment statistics.

The federated objective can be written as the weighted average of local unsupervised objectives:

min⁡Θ F(Θ)=∑k=1KrkFk(Θ;Dk),\min_{\Theta}\ \mathcal{F}(\Theta)=\sum_{k=1}^{K}r_k\mathcal{F}_k(\Theta;\mathcal{D}_k),

where Fk\mathcal{F}_k is the local clustering objective evaluated on client kk’s data, and rk=nkNr_k=\frac{n_k}{N}.

This formulation highlights the central difficulty of federated deep embedded clustering. The model must learn both the representation and the centroids from decentralized, unlabeled, and potentially non-IID data, while avoiding reliance on centralized assignment statistics. Fed-BRDECS addresses this difficulty by replacing the globally normalized IDEC target objective with a local sample-stability loss, correcting local prediction imbalance through a prediction-based balanced sampler, and periodically reinitializing centroids through federated restarting.

Algorithm: Fed-BRDECS

Fed-BRDECS optimizes a federated deep clustering objective in three stages: federated representation pretraining, federated centroid initialization, and restarted clustering refinement. The first two stages follow the standard deep embedded clustering pipeline, while the refinement stage replaces IDEC’s globally normalized target objective with local sample stability, prediction-balanced sampling, and periodic federated restarting. Algorithm 1 summarizes the full procedure.

Federated representation pretraining. Each client minimizes the reconstruction loss in (1) on its local data, and the server aggregates the updates by FedAvg for TpreT_{\mathrm{pre}} rounds.

Algorithm 1 Fed-BRDECS

Require: Client datasets {Dk}k=1K\{D_k\}_{k=1}^{K}, number of clusters CC, pretraining rounds TpreT_{\mathrm{pre}}, restart iterations RR, refinement rounds TT, local steps EE, sampler period TsampT_{\mathrm{samp}}, loss weight λstab\lambda_{\mathrm{stab}}, stability parameter λvar\lambda_{\mathrm{var}}

Ensure: Global model Θ={θ,ϕ,μ1,…,μC}\Theta= \{\theta, \phi, \mu_1, \ldots, \mu_C\}

(Step 1) Federated representation pretraining.

1: Server initializes the global model Θ0\Theta^0. 2: for t=1,…,Tpret = 1, \ldots, T_{\mathrm{pre}} do 3:   Server broadcasts Θt−1\Theta^{t-1} to clients. 4:   for k=1,…,Kk = 1, \ldots, K do 5:      Initialize local model Θkt,0←Θt−1\Theta_k^{t,0} \leftarrow\Theta^{t-1}. 6:      Perform EE local SGD steps on Lrec(k)\mathcal{L}_{\mathrm{rec}}^{(k)}. 7:      Upload Θkt,E\Theta_k^{t,E} to the server. 8:   end for 9:   Server aggregates: Θt=∑krkΘkt,E\Theta^t = \sum_k r_k\Theta_k^{t,E}. 10: end for

(Step 2) Federated centroid initialization.

11: {μj}j=1C←k-FED⁡({fθTpre(Dk)}k=1K)\{\mu_j\}_{j=1}^{C} \leftarrow\operatorname{k\text{-}FED}(\{f_{\theta^{T_{\mathrm{pre}}}}(D_k)\}_{k=1}^{K}); update ΘTpre\Theta^{T_{\mathrm{pre}}} with these centroids.

(Step 3) Restarted clustering refinement.

12: Initialize Θ0,T←ΘTpre\Theta^{0,T} \leftarrow\Theta^{T_{\mathrm{pre}}}. 13: for r=1,…,Rr = 1, \ldots, R do 14:   Initialize Θr,0←Θr−1,T\Theta^{r,0} \leftarrow\Theta^{r-1,T}. 15:   Recompute {μjr,0}j=1C←k-FED⁡({fθr,0(Dk)}k=1K)\{\mu_j^{r,0}\}_{j=1}^{C} \leftarrow\operatorname{k\text{-}FED}(\{f_{\theta^{r,0}}(D_k)\}_{k=1}^{K}). 16:   Set Θr,0←{θr,0,ϕr,0,μ1r,…,μCr}\Theta^{r,0} \leftarrow\{\theta^{r,0}, \phi^{r,0}, \mu_1^r, \ldots, \mu_C^r\}. 17:   for t=1,…,Tt = 1, \ldots, T do 18:      Server broadcasts Θr,t−1\Theta^{r,t-1} to clients. 19:      for k=1,…,Kk = 1, \ldots, K do 20:          Initialize local model Θk,0r,t←Θr,t−1\Theta_{k,0}^{r,t} \leftarrow\Theta^{r,t-1}. 21:          if t≡0(modTsamp)t \equiv0 \pmod{T_{\mathrm{samp}}} then 22:              Compute sampler weights wk,iw_{k,i}. 23:          end if 24:          Perform EE local SGD steps on Lk=Lrec(k)+λstabLstab(k)\mathcal{L}_k = \mathcal{L}_{\mathrm{rec}}^{(k)} + \lambda_{\mathrm{stab}}\mathcal{L}_{\mathrm{stab}}^{(k)} using prediction-balanced mini-batches. 25:          Upload Θk,Er,t\Theta_{k,E}^{r,t} to the server. 26:      end for 27:      Server aggregates: Θr,t=∑krkΘk,Er,t\Theta^{r,t} = \sum_k r_k\Theta_{k,E}^{r,t}. 28:   end for 29: end for 30: return ΘR,T\Theta^{R,T}

Federated centroid initialization. After pretraining, the server initializes the latent centroids using a federated clustering routine on the client embeddings:

{μj}j=1C←k-FED⁡({fθ(Dk)}k=1K).\{\mu_j\}_{j=1}^{C} \leftarrow\operatorname{k\text{-}FED}\left(\{f_{\theta}(D_k)\}_{k=1}^{K}\right).

The FL clustering algorithm k-FED ([9]) plays the role of centralized k-Means initialization in DEC/IDEC, but it is performed without collecting raw data or local assignment information at the server. Each client computes local centroids from its embeddings and sends only these centroids to the server, which constructs the initial global centroids.

Restarted clustering refinement. The refinement stage is organized into RR restart iterations. Unlike BRB-style reclustering, Fed-BRDECS does not apply a soft reset to the model parameters. Instead, each restart performs a centroid-level federated reclustering step while keeping the representation network continuous across restarts. This design focuses on correcting centroid degeneration, inactive clusters, and heterogeneity-induced assignment imbalance.

At the beginning of restart rr, the server simply recomputes the centroids by running k-FED on the current client embeddings, {μj}j=1C←k-FED⁡({fθ(Dk)}k=1K)\{\mu_j\}_{j=1}^{C} \leftarrow\operatorname{k\text{-}FED}(\{f_{\theta}(\mathcal{D}_k)\}_{k=1}^{K}), warm-started from the previous centroids. This federated reclustering step relocates centroids to occupied regions of the current embedding space and can revive centroids that have become inactive under non-IID local updates.

Within each restart iteration, Fed-BRDECS performs TT rounds of federated refinement. On client kk, soft assignments are computed from the local model using the Student-tt kernel with parameter α\alpha:

qkij=(1+∥zk,i−μk,j∥22/α)−α+12∑ℓ=1C(1+∥zk,i−μk,ℓ∥22/α)−α+12q_{kij} = \frac{\left(1+\lVert z_{k,i}-\mu_{k,j}\rVert_2^2/\alpha\right)^{-\frac{\alpha+1}{2}}}{\sum_{\ell=1}^{C}\left(1+\lVert z_{k,i}-\mu_{k,\ell}\rVert_2^2/\alpha\right)^{-\frac{\alpha+1}{2}}}

where zk,i=fθk(xk,i)z_{k,i}=f_{\theta_k}(x_{k,i}). Unlike IDEC, Fed-BRDECS does not construct a target distribution from globally normalized cluster frequencies. Instead, each client evaluates sample stability, inspired by Cheng et al. [4], from its local assignment probabilities.

Let τk∈(0,1)\tau_k \in(0,1) be the threshold selected by Otsu’s method ([27]) on the assignment probabilities observed at client kk. We define the determinacy score dkij=((qkij−τk)/τk)2d_{kij} = ((q_{kij}-\tau_k)/\tau_k)^2 if qkij<τkq_{kij}<\tau_k, and dkij=((qkij−τk)/(1−τk))2d_{kij}=((q_{kij}-\tau_k)/(1-\tau_k))^2 otherwise. For sample xk,ix_{k,i}, we define the average determinacy as dˉk,i=1C∑j=1Cdkij\bar{d}_{k,i}=\frac{1}{C}\sum_{j=1}^{C}d_{kij}. Then the stability score is

sk,i=dˉk,i−λvarC∑j=1C(dkij−dˉk,i)2,s_{k,i}=\bar{d}_{k,i}-\frac{\lambda_{\mathrm{var}}}{C}\sum_{j=1}^{C}(d_{kij}-\bar{d}_{k,i})^2,

where λvar≥0\lambda_{\mathrm{var}}\ge0 is a proportionality coefficient. The first term rewards assignment determinacy with respect to all centroids, while the second term regularizes the dispersion of determinacy values across centroids. The local stability loss over a mini-batch Bk\mathcal{B}_k is

Lstab(k)=1−1∣Bk∣∑xk,i∈Bksk,i.\mathcal{L}_{\mathrm{stab}}^{(k)}=1-\frac{1}{|\mathcal{B}_k|}\sum_{x_{k,i}\in\mathcal{B}_k}s_{k,i}.

The local refinement objective is

Lk=Lrec(k)+λstabLstab(k)\mathcal{L}_k=\mathcal{L}_{\mathrm{rec}}^{(k)}+\lambda_{\mathrm{stab}}\mathcal{L}_{\mathrm{stab}}^{(k)}

where λstab\lambda_{\mathrm{stab}} controls the contribution of the stability loss. The reconstruction term is also retained during refinement, as in IDEC, to preserve local structure in the embedding space. The encoder, decoder, and centroids are updated jointly by local SGD between restart steps.

Prediction-balanced sampler. To address local prediction imbalance, each client periodically updates a prediction-based sampling distribution. Every TsampT_{\mathrm{samp}} rounds, client kk computes local soft cluster frequencies fk,j=∑i=1nkqkijf_{k,j}=\sum_{i=1}^{n_k}q_{kij} (j=1,…,C)(j=1,\ldots,C) and hard predicted assignments y^k,i=\hat{y}_{k,i}= arg max⁡j∈{1,…,C}qkij\max_{j\in\{1,\ldots,C\}} q_{kij}. The inverse predicted-cluster frequency is w~k,j=1/(fk,j+ϵ)\tilde{w}_{k,j}=1/(f_{k,j}+\epsilon), and each sample receives weight

wk,i=w~k,y^k,i1C∑ℓ=1Cw~k,ℓ.w_{k,i}=\frac{\tilde{w}_{k,\hat{y}_{k,i}}}{\frac{1}{C}\sum_{\ell=1}^{C}\tilde{w}_{k,\ell}}.

Mini-batches are then sampled with replacement according to probabilities proportional to wk,iw_{k,i}. Thus, samples assigned to locally rare predicted clusters are sampled more often, while samples assigned to locally dominant predicted clusters are downsampled. The predicted assignments are used only to define the sampling distribution and are not treated as supervised labels.

At refinement round tt of restart iteration rr, the server broadcasts the current global model Θr,t−1\Theta^{r,t-1} to the clients. Each client performs EE local steps using the current balanced sampler and uploads its updated parameters Θk,Er,t\Theta^{r,t}_{k,E}. The server aggregates the returned models.

Theoretical Analysis

A privacy-aware alternative to the globally normalized DEC target is to let each client reconstruct the target using only its local soft cluster frequencies. Under heterogeneous client cluster proportions, however, this local reconstruction is not equivalent to the centralized DEC target and can even reverse the relative preference between two clusters. Appendix § 7.§ 2 formalizes this effect and bounds both the target distortion and the resulting clustering-gradient bias. Thus, replacing the global DEC target with a locally computable stability objective avoids this source of heterogeneity-induced target mismatch.

The local stability objective avoids this dependence on global frequencies fjf_j in (3), but it contains no explicit cluster-frequency balancing term. Consequently, centroids may become inactive, as formalized in Appendix § 7.§ 3. The following result explains why such centroids are difficult to recover by gradient refinement and how restarting addresses this failure mode.

Proposition 1.3 (Inactive-centroid recovery) Consider an inactive centroid jj. If qkij≤δq_{kij}\le\delta throughout HH local SGD steps with step size η\eta, its displacement after FedAvg is at most

∥μjafter−μjbefore∥2≤CstabηHδ,\lVert\mu_j^{\mathrm{after}}-\mu_j^{\mathrm{before}}\rVert_2\le C_{\mathrm{stab}}\eta H\delta,

where CstabC_{\mathrm{stab}} is independent of δ\delta. In contrast, suppose the restart step relocates each centroid into the convex hull of the current embeddings Z\mathcal{Z}. Then, for every client, sample, and centroid,

qkij≥1C(1+diam⁡(Z)2α)−(α+1)/2>0q_{kij}\ge\frac{1}{C}\left(1+\frac{\operatorname{diam}(\mathcal{Z})^2}{\alpha}\right)^{-(\alpha+1)/2}>0

Appendix § 7.§ 4 gives all the details and assumptions.

Thus, the gradient signal of an inactive centroid vanishes with its assignment mass, whereas restarting restores a strictly positive assignment mass by relocating the centroid to the current embedding region.

EXPERIMENTS

Setup for Clustering on Public Datasets

Datasets. We evaluate Fed-BRDECS on four standard deep clustering benchmarks: MNIST [8], Fashion-MNIST [42], KMNIST [6], and REUTERS-10K [16]. The three image datasets each contain ten ground-truth categories, while

REUTERS-10K is a four-category text clustering benchmark commonly used in DEC/IDEC evaluations. We follow the standard preprocessing protocol used in deep embedded clustering methods [43, 12, 4]. Ground-truth labels are used only for federated distribution of samples to clients (partitioning) and final evaluation, and are never used during unsupervised training.

Federated partitioning. All experiments are conducted with K=10K = 10 clients. For each dataset, we evaluate two federation settings. In the IID setting, samples are uniformly distributed across clients. In the non-IID setting, client data distributions are generated using a Dirichlet partition with concentration parameter α=0.5\alpha= 0.5, as described in Hsu et al. [14]. The non-IID setting tests whether each method can learn meaningful global clusters when clients observe different local cluster proportions.

Baselines. We compare Fed-BRDECS with three groups of baselines. The first group consists of federated centroid clustering methods over fixed features: k-FED [9], FKM [11], and DWF k-Means [13]. These methods do not learn deep representations.

The second group consists of deep federated clustering baselines. Fed-AE first trains an autoencoder in a federated manner and then applies k-FED to the learned embeddings, isolating the effect of representation pretraining without joint clustering refinement. F-DEC [22] is a direct federated implementation of IDEC, where clients optimize IDEC reconstruction and the KL clustering objective under FedAvg. This baseline uses the same autoencoder backbone but retains the DEC/IDEC target distribution objective and, therefore, requires exchange of local clustering information to construct the global target distribution. CCFC [19] is a recent contrastive federated deep clustering method.

The third group consists of our ablation variants. Fed-DECS uses only the local sample-stability loss, corresponding to the stability component (denoted as SS). Fed-BDECS adds prediction-balanced sampling (S+BS+B). Fed-BRDECS is the full method with sample stability, prediction-balanced sampling, and centroid-level restarting (S+B+RS+B+R). We also report Fed-BRIDEC, which applies balanced sampling and restarting to the IDEC-style objective, to separate the effect of our stability objective from the effect of the balancing and restarting mechanisms.

All deep clustering methods use the standard DEC autoencoder architecture [43]; Guo et al., 2017) and the same federated pretraining protocol. Additional hyperparameters and training details are provided in Appendix § 9.

Evaluation metric. All clustering methods are evaluated by clustering accuracy (ACC) and Normalized Mutual Information (NMI), which are widely used in unsupervised clustering. Unless otherwise stated, we report the average over five independent runs with different random seeds.

Clustering Results

In Figure 1, results are shown as percentage-point improvements over the worst-performing method for each dataset, partition, and metric. Fed-BRDECS attains the highest ACC in all eight settings. The corresponding absolute ACC and NMI values are reported in Appendix § 9.§ 3. Overall, Fed-BRDECS achieves the strongest and most consistent clustering performance across datasets and partition settings. Its advantage is particularly evident under non-IID distributions, indicating improved robustness to heterogeneous client data.

Figure 1. Performance gains relative to the worst-performing method for each dataset and partition. Bars show percentage-point improvements in ACC (left) and NMI (right), and error bars indicate one standard deviation over five runs. Higher is better. Lower performance of DEC-based refinement compared with Fed-AE indicates that the refinement stage can degrade the pretrained representation, especially under non-IID client distributions.

Effect of representation learning. The fixed-feature federated k-means methods are consistently weaker than deep clustering methods on most benchmarks (Figure 1). For example, on MNIST-IID, the best fixed-feature baseline obtains 0.4914, whereas Fed-AE reaches 0.8155. This confirms that learning a clustering-friendly representation remains crucial in federated clustering. However, Fed-AE is still weaker than Fed-BRDECS, showing that autoencoder pretraining alone is insufficient without clustering-aware refinement. In several settings, particularly under non-IID partitions, F-DEC also underperforms Fed-AE, indicating that DEC-style refinement can degrade the pretrained representation.

Effectiveness of proposed components. F-DEC is a direct federated implementation of the IDEC objective. Fed-BRDECS improves over F-DEC by 6.47 percentage points in average ACC across the eight settings, with especially large gains under non-IID partitions. Further, the ablation ladder Fed-DECS → Fed-BDECS → Fed-BRDECS shows the contribution of each component. Fed-DECS, which uses only the stability loss, already performs competitively with F-DEC while avoiding the transmission of local cluster-frequency statistics. Adding prediction-balanced sampling and centroid-level restarting further improves ACC, indicating that our B+R components help correct biased or inactive centroids during federated refinement.

Robustness to heterogeneity. Fed-BRDECS is particularly effective under non-IID partitions. Averaged over the four non-IID settings, Fed-BRDECS obtains 0.6889 ACC, outperforming other algorithms. This suggests that the combination of prediction-balanced sampling and centroid restarting improves robustness to heterogeneous local cluster proportions.

Embedding visualization. Figure 2 visualizes the learned MNIST embeddings using t-SNE. Compared with F-DEC, Fed-BRDECS mitigates cluster collapse and cluster mix-up. The improvement is especially visible under the non-IID partition, where the baseline exhibits stronger cluster mixing, whereas Fed-BRDECS progressively separates clusters through prediction-balanced refinement and centroid-level restarting.

t-SNE visualization of learned MNIST embeddings under IID and non-IID federated partitions

Figure 2. t-SNE visualization of learned MNIST embeddings under IID and non-IID federated partitions. The first column shows F-DEC, while the remaining columns show Fed-BRDECS across restart/refinement stages. Under non-IID partition, F-DEC exhibits clustering collapse, with two classes mixed into poorly separated regions. Fed-BRDECS mitigates this collapse through centroid-level restarting, progressively producing more compact and separated cluster structures.

Ablation on the clustering-loss weight. Figure 3 in Appendix § 9.§ 2 examines the effect of λstab\lambda_{\mathrm{stab}} on MNIST and Fashion-MNIST. Under non-IID partitions, both datasets perform best at λstab=0.5\lambda_{\mathrm{stab}} = 0.5, whereas the IID results remain strong around λstab=1.0\lambda_{\mathrm{stab}} = 1.0; we use these values in the main experiments.

Sensitivity of Fed-BRDECS to the clustering-loss weight lambda stab on Fashion-MNIST and MNIST

Figure 3. Sensitivity of Fed-BRDECS to the clustering-loss weight λstab\lambda_{\mathrm{stab}} on Fashion-MNIST and MNIST.

Application to Federated Time-Series Anomaly Detection

Beyond standard clustering benchmarks, we evaluate Fed-BRDECS in federated time-series anomaly detection (TSAD), which provides a practical stress test for unsupervised federated representation learning. Many TSAD methods are reconstruction based. A model is trained to reconstruct normal time series, and anomalous time series are identified by a large reconstruction error [21, 2, 39]. In federated TSAD, different clients may correspond to different machines or operating environments, so normal patterns can be highly heterogeneous. As a result, a single reconstruction model trained by FedAvg may underrepresent rare normal regimes and produce false alarms.

Applying Fed-BRDECS to reconstruction-based TSAD. Fed-BRDECS can be applied to reconstruction-based TSAD backbones as a training-time module. If the detector already includes a latent clustering component, we directly replace its clustering objective with our sample-stability loss and add prediction-balanced sampling and centroid restarting. If the detector is purely reconstruction-based, we attach a temporary projection head and centroids to the latent representation, optimize the sample-stability objective jointly with reconstruction, and use the resulting pseudo-clusters for balanced sampling.

We instantiate this mechanism on LSTM-AE [10] and TranAD [39] for regularly sampled public benchmarks, attaching the clustering head to the encoder final hidden state and to the latent representation used by the reconstruction module, respectively. The proprietary sensor data are irregularly sampled multivariate time series, so we use CoFormer-AE [41], which replaces the LSTM encoder with CoFormer; TranAD and other architecture-specific TSAD variants are not directly compatible with this backbone. At inference time, the clustering head is discarded and outlier scores are computed using the original reconstruction error, so Fed-BRDECS adds no inference-time cost.

Experimental setup. We evaluate on two public multivariate TSAD benchmarks, SMD ((Su et al., 2019)) and PSM ([1]), following the federated evaluation setting of FedTADBench ([18]), and on a proprietary irregularly sampled sensor dataset collected from multiple industrial machines. Each backbone is trained with FedAvg either with or without Fed-BRDECS. We report AUC-ROC and F1. Further dataset and implementation details are provided in Appendix § 10.§ 2.

Results. Table 2 shows that adding Fed-BRDECS improves AUC-ROC in all five evaluated dataset–backbone settings and improves F1 in four of five settings. These gains are modest but consistent, which is expected because Fed-BRDECS is used only as a training-time representation module, while the clustering components and balanced sampler may help mitigate heterogeneity in FL.

Table 2: Federated time-series anomaly detection results. “Baseline” denotes the backbone trained with FedAvg, while “+BRDECS” additionally uses Fed-BRDECS during training.

DatasetBackboneBaseline AUC-ROCBaseline F1+BRDECS AUC-ROC+BRDECS F1
SMDLSTM-AE0.59150.14130.60380.1422
SMDTranAD0.63350.18290.63960.1848
PSMLSTM-AE0.60630.44150.61210.4433
PSMTranAD0.57920.44510.58630.4425
SensorCoFormer-AE0.52580.45030.55440.4629

Table 2.

CONCLUSION

We presented Fed-BRDECS, a federated deep embedded clustering framework that replaces the globally normalized IDEC target with a locally computable sample-stability loss, so that clients do not transmit soft-assignment or cluster-frequency statistics during refinement, and that counters local imbalance and centroid collapse through prediction-balanced sampling and centroid-level restarting. Fed-BRDECS attains the highest ACC in all eight federated clustering settings, and it also serves as a training-time module for downstream unsupervised monitoring, improving reconstruction-based anomaly detectors without changing their inference procedure. It does not provide formal differential privacy, since model updates and k-FED centroid means are still communicated (Appendix § 8.§ 2); adding formal privacy mechanisms for these centroids is a natural next step.

AI Use Statement

In this work, we used generative AI tools for editing and sanitizing sentences to improve clarity, grammar, and readability. We have not used generative AI tools for conceptual design, conducting experiments, data analysis, or generating new scientific claims, and automated code or dataset generation are not applicable to this work. We have reviewed all AI-assisted work. Every revised sentence was manually verified by the authors to ensure that the original technical meaning, nuances, and factual accuracy were strictly preserved without introducing hallucinations or alterations to the findings. We take responsibility for the final content of this work, including text, claims, or artifacts produced with the aid of generative AI.

THEORETICAL ANALYSIS: PROOFS AND ADDITIONAL DETAILS

To simplify the Student-tt soft assignment equation (2), define the unnormalized Student-tt affinity

uij:=(1+∥zi−μj∥22α)−α+12u_{ij} := \left(1+\frac{\lVert z_i-\mu_j\rVert_2^2}{\alpha}\right)^{-\frac{\alpha+1}{2}}

Then (2) can be written as

qij=uij∑ℓ=1Cuiℓq_{ij}=\frac{u_{ij}}{\sum_{\ell=1}^{C}u_{i\ell}}

We also use

hij:=α+1αzi−μj1+∥zi−μj∥22/αh_{ij}:=\frac{\alpha+1}{\alpha}\frac{z_i-\mu_j}{1+\lVert z_i-\mu_j\rVert_2^2/\alpha}

To simplify (3), let a=(a1,…,aC)a=(a_1,\ldots,a_C) be any positive frequency vector and define

pij(a):=qij2/aj∑ℓ=1Cqiℓ2/aℓ,pi(a):=(pi1(a),…,piC(a)).p_{ij}(a):=\frac{q_{ij}^2/a_j}{\sum_{\ell=1}^{C}q_{i\ell}^2/a_\ell},\qquad p_i(a):=(p_{i1}(a),\ldots,p_{iC}(a)).

Then (3) becomes pij(f)p_{ij}(f) when f=(f1,…,fC)f=(f_1,\ldots,f_C) is the global soft-frequency vector. For client kk, we write f(k)=(fk,1,…,fk,C)f^{(k)}=(f_{k,1},\ldots,f_{k,C}) for its local soft-frequency vector. For probability vectors p,p′p,p', we use TV⁡(p,p′)=12∥p−p′∥1\operatorname{TV}(p,p')=\frac{1}{2}\lVert p-p'\rVert_1.

Auxiliary lemmas

Lemma A.1 (Student-tt derivatives). For any sample ii and clusters j,ℓj,\ell, the Student-tt kernel satisfies

∇zilog⁡uij=−hij,∇μjlog⁡uij=hij,\nabla_{z_i}\log u_{ij}=-h_{ij},\qquad\nabla_{\mu_j}\log u_{ij}=h_{ij},
∇ziqiℓ=qiℓ(−hiℓ+∑mqimhim),\nabla_{z_i}q_{i\ell}=q_{i\ell}\left(-h_{i\ell}+\sum_m q_{im}h_{im}\right),
∇μjqiℓ=qiℓ(1[ℓ=j]−qij)hij.\nabla_{\mu_j}q_{i\ell}=q_{i\ell}\left(\mathbf{1}[\ell=j]-q_{ij}\right)h_{ij}.

In addition,

∥hij∥2≤cα:=α+12α.\lVert h_{ij}\rVert_2\le c_\alpha:=\frac{\alpha+1}{2\sqrt{\alpha}}.

Proof. From the definition of uiju_{ij},

log⁡uij=−α+12log⁡(1+∥zi−μj∥22α).\log u_{ij}=-\frac{\alpha+1}{2}\log\left(1+\frac{\lVert z_i-\mu_j\rVert_2^2}{\alpha}\right).

Differentiating with respect to ziz_i and μj\mu_j gives the first two identities. The derivatives of qiℓq_{i\ell} follow from differentiating log⁡qiℓ=log⁡uiℓ−log⁡∑muim\log q_{i\ell}=\log u_{i\ell}-\log\sum_m u_{im}. Finally, with r=∥zi−μj∥2r=\lVert z_i-\mu_j\rVert_2,

∥hij∥2=α+1αr1+r2/α,\lVert h_{ij}\rVert_2=\frac{\alpha+1}{\alpha}\frac{r}{1+r^2/\alpha},

and r/(1+r2/α)r/(1+r^2/\alpha) is maximized at r=αr=\sqrt{\alpha}, where it equals α/2\sqrt{\alpha}/2.

Lemma A.2 (Multiplicative reweighting). Let p=(p1,…,pC)p=(p_1,\ldots,p_C) be a probability vector with pj>0p_j>0 for all jj. Let ωj>0\omega_j>0 and define

pj′=pjωj∑ℓpℓωℓ.p'_j=\frac{p_j\omega_j}{\sum_{\ell}p_\ell\omega_\ell}.

If

Δ=log⁡max⁡jωjmin⁡jωj,\Delta=\log\frac{\max_j\omega_j}{\min_j\omega_j},

then

TV⁡(p′,p)≤tanh⁡(Δ4).\operatorname{TV}(p',p)\leq\tanh\left(\frac{\Delta}{4}\right).

For C=2C=2, the bound can be attained.

Proof. Set a=min⁡jωja=\min_j\omega_j and b=max⁡jωjb=\max_j\omega_j. Let JJ have distribution pp, define W=ωJW=\omega_J, and let m=E[W]m=\mathbb{E}[W]. By the definition of p′p', we have

TV⁡(p′,p)=E∣W−m∣2m.\operatorname{TV}(p',p)=\frac{\mathbb{E}|W-m|}{2m}.

Since W∈[a,b]W\in[a,b],

E∣W−m∣≤2(m−a)(b−m)b−a.\mathbb{E}|W-m|\leq\frac{2(m-a)(b-m)}{b-a}.

It follows that

TV⁡(p′,p)≤(m−a)(b−m)m(b−a).\operatorname{TV}(p',p)\leq\frac{(m-a)(b-m)}{m(b-a)}.

The last expression is maximized at m=abm=\sqrt{ab}. Substitution gives

TV⁡(p′,p)≤b/a−1b/a+1=tanh⁡(14log⁡ba).\operatorname{TV}(p',p)\leq\frac{\sqrt{b/a}-1}{\sqrt{b/a}+1}=\tanh\left(\frac{1}{4}\log\frac{b}{a}\right).

Local-target distortion under local DEC-target reconstruction

For any positive frequency vector a=(a1,…,aC)a=(a_1,\ldots,a_C), define the DEC target probability obtained using aa by

pij(a):=qij2/aj∑ℓ=1Cqiℓ2/aℓ,j=1,…,C,p_{ij}(a):=\frac{q_{ij}^2/a_j}{\sum_{\ell=1}^{C}q_{i\ell}^2/a_\ell},\qquad j=1,\ldots,C,

and define the complete target vector for sample ii as

pi(a):=(pi1(a),…,piC(a))∈ΔC.p_i(a):=(p_{i1}(a),\ldots,p_{iC}(a))\in\Delta_C.

In particular, f=(f1,…,fC)f=(f_1,\ldots,f_C) denotes the global soft-frequency vector, while f(k)=(fk,1,…,fk,C)f^{(k)}=(f_{k,1},\ldots,f_{k,C}) denotes client kk’s local soft-frequency vector. Thus, pi(f)p_i(f) is the centralized DEC target for sample ii, whereas pi(f(k))p_i(f^{(k)}) is the target reconstructed using only client kk’s local frequencies.

Proposition 1.1 (Local-target distortion) Let π^k,j=fk,j/nk\hat{\pi}_{k,j}=f_{k,j}/n_k, π^j=fj/N\hat{\pi}_j=f_j/N, ωk,j=π^j/π^k,j\omega_{k,j}=\hat{\pi}_j/\hat{\pi}_{k,j}, and

Δk=log⁡max⁡jωk,jmin⁡jωk,j.\Delta_k=\log\frac{\max_j\omega_{k,j}}{\min_j\omega_{k,j}}.

For every sample ii of client kk,

pij(f(k))=pij(f)ωk,j∑ℓpiℓ(f)ωk,ℓ.p_{ij}\left(f^{(k)}\right)=\frac{p_{ij}(f)\omega_{k,j}}{\sum_{\ell}p_{i\ell}(f)\omega_{k,\ell}}.

and consequently

TV⁡(pi(f(k)),pi(f))≤tanh⁡(Δk4).\operatorname{TV}\left(p_i\left(f^{(k)}\right),p_i(f)\right)\leq\tanh\left(\frac{\Delta_k}{4}\right).

Moreover,

∥∇ziKL⁡(pi(f(k))∥qi)−∇ziKL⁡(pi(f)∥qi)∥2≤2cαtanh⁡(Δk4),\left\|\nabla_{z_i}\operatorname{KL}\left(p_i\left(f^{(k)}\right)\middle\|q_i\right)-\nabla_{z_i}\operatorname{KL}\left(p_i(f)\middle\|q_i\right)\right\|_2\leq2c_\alpha\tanh\left(\frac{\Delta_k}{4}\right),

where cα=(α+1)/(2α)c_\alpha=(\alpha+1)/(2\sqrt{\alpha}). The locally reconstructed target is identical to the global target, pi(f(k))=pi(f)p_i\left(f^{(k)}\right)=p_i(f), if and only if the normalized local and global soft-frequency vectors are identical, π^k=π^\widehat{\pi}_k=\widehat{\pi}. Equivalently, this holds if and only if Δk=0\Delta_k=0. If Δk>0\Delta_k>0, the mismatch can change both the target probabilities and the clustering gradient.

Proof. Because fj=Nπ^jf_j=N\widehat{\pi}_j and fk,j=nkπ^k,jf_{k,j}=n_k\widehat{\pi}_{k,j},

qij2fk,j=Nnkπ^jπ^k,jqij2fj.\frac{q_{ij}^{2}}{f_{k,j}}=\frac{N}{n_k}\frac{\widehat{\pi}_j}{\widehat{\pi}_{k,j}}\frac{q_{ij}^{2}}{f_j}.

The common factor N/nkN/n_k cancels when the target is normalized, giving

pij(f(k))=pij(f)ωk,j∑ℓpiℓ(f)ωk,ℓ.p_{ij}\left(f^{(k)}\right)=\frac{p_{ij}(f)\omega_{k,j}}{\sum_{\ell}p_{i\ell}(f)\omega_{k,\ell}}.

Applying Lemma A.2 with p=pi(f)p=p_i(f) and ω=ωk\omega=\omega_k yields

TV⁡(pi(f(k)),pi(f))≤tanh⁡(Δk4).\operatorname{TV}\left(p_i\left(f^{(k)}\right),p_i(f)\right)\leq\tanh\left(\frac{\Delta_k}{4}\right).

When differentiating the DEC objective, the auxiliary target is held fixed. By Lemma A.1,

∇ziKL⁡(pi∥qi)=∑j(pij−qij)hij.\nabla_{z_i}\operatorname{KL}(p_i\|q_i)=\sum_j(p_{ij}-q_{ij})h_{ij}.

Let p′=pi(f(k))p'=p_i\left(f^{(k)}\right) and p=pi(f)p=p_i(f). Then

∥∇ziKL⁡(p′∥qi)−∇ziKL⁡(p∥qi)∥2≤∑j∣pj′−pj∣∥hij∥2≤cα∥p′−p∥1=2cαTV⁡(p′,p)≤2cαtanh⁡(Δk4).\begin{aligned} \left\|\nabla_{z_i}\operatorname{KL}(p'\|q_i)-\nabla_{z_i}\operatorname{KL}(p\|q_i)\right\|_2 &\leq\sum_j|p'_j-p_j|\|h_{ij}\|_2\leq c_\alpha\|p'-p\|_1\\ &=2c_\alpha\operatorname{TV}(p',p)\leq2c_\alpha\tanh\left(\frac{\Delta_k}{4}\right). \end{aligned}

The centroid-gradient bound follows in the same way. The equality pi(f(k))=pi(f)p_i\left(f^{(k)}\right)=p_i(f) holds exactly when ωk,j\omega_{k,j} is constant over jj. Since both π^k\widehat{\pi}_k and π^\widehat{\pi} sum to one, this is equivalent to π^k=π^\widehat{\pi}_k=\widehat{\pi}. Also,

pij(f(k))piℓ(f(k))=pij(f)piℓ(f)ωk,jωk,ℓ.\frac{p_{ij}\left(f^{(k)}\right)}{p_{i\ell}\left(f^{(k)}\right)}=\frac{p_{ij}(f)}{p_{i\ell}(f)}\frac{\omega_{k,j}}{\omega_{k,\ell}}.

Therefore, if pij(f)>piℓ(f)p_{ij}(f) > p_{i\ell}(f), the local target reverses this ordering whenever

1<pij(f)piℓ(f)<ωk,ℓωk,j.1 < \frac{p_{ij}(f)}{p_{i\ell}(f)} < \frac{\omega_{k,\ell}}{\omega_{k,j}}.

Proposition 1.1 shows that replacing the global DEC frequencies with client-specific frequencies does not recover the same target loss function. It produces a different target obtained by reweighting cluster jj by

ωk,j=π^jπ^k,j.\omega_{k,j} = \frac{\widehat{\pi}_j}{\widehat{\pi}_{k,j}}.

Therefore, a cluster that is rare on client kk is upweighted compared with the global DEC target, while a cluster that is common on that client is downweighted. The quantity Δk\Delta_k measures the spread of these reweighting factors.

The preference-reversal condition (1<pij(f)piℓ(f)<ωk,ℓωk,j)(1 < \frac{p_{ij}(f)}{p_{i\ell}(f)} < \frac{\omega_{k,\ell}}{\omega_{k,j}}) further shows that this effect is not limited to a change in gradient magnitude. Local reconstruction can change which centroid receives the larger target probability for the same sample. Thus, under heterogeneity, constructing the DEC target independently from local frequencies can make different clients optimize systematically different clustering directions. This motivates Fed-BRDECS to remove the frequency-normalized target from local refinement rather than approximate the global DEC target using local frequencies.

Balance-agnostic stability objective

The stability score sk,is_{k,i} for the ii-th sample on client kk is given by

sk,i=d‾k,i−λvarC∑j=1C(dkij−d‾k,i)2.s_{k,i} = \overline{d}_{k,i} - \frac{\lambda_{\mathrm{var}}}{C}\sum_{j=1}^{C}\left(d_{kij} - \overline{d}_{k,i}\right)^2.

where λvar≥0\lambda_{\mathrm{var}} \ge0 is the variance-regularization coefficient. It controls how strongly dispersion among the centroid-wise determinacy values {dkij}j=1C\{d_{kij}\}_{j=1}^{C} is penalized.

Unlike the DEC target objective, the stability objective does not explicitly depend on cluster frequencies. It therefore encourages confident sample-level assignments without directly enforcing balanced use of the centroids. As a result, a training can achieve a small stability loss even when most or all samples are assigned to the same centroid. The following proposition formalizes this limitation and shows that the stability objective alone does not rule out inactive centroids.

Proposition 1.2 (Balance-agnostic stability) For fixed τk∈(0,1)\tau_k \in(0,1),

0≤Lstab(k)≤1+λvar4.0 \le\mathcal{L}_{\mathrm{stab}}^{(k)} \le1 + \frac{\lambda_{\mathrm{var}}}{4}.

Moreover, for any fixed encoder,

inf⁡{μj}Lstab(k)=0\inf_{\{\mu_j\}} \mathcal{L}_{\mathrm{stab}}^{(k)} = 0

can be achieved by centroids in which all samples are assigned to a single centroid while the remaining C−1C-1 centroids become inactive.

Proof. For q<τq < \tau, the normalized deviation (q−τ)/τ(q-\tau)/\tau lies in [−1,0)[-1,0), whereas for q≥τq \ge\tau, (q−τ)/(1−τ)(q-\tau)/(1-\tau) lies in [0,1][0,1]. Hence dkij∈[0,1]d_{kij} \in[0,1] for every ii and jj. Therefore, dˉki∈[0,1]\bar{d}_{ki} \in[0,1], and the variance of {dkij}j=1C\{d_{kij}\}_{j=1}^{C} is bounded above by 1/41/4. It follows that

−λvar4≤sk,i≤1,-\frac{\lambda_{\mathrm{var}}}{4} \le s_{k,i} \le1,

which implies

0≤Lstab(k)≤1+λvar4.0 \le\mathcal{L}_{\mathrm{stab}}^{(k)} \le1 + \frac{\lambda_{\mathrm{var}}}{4}.

For the second part, fix the encoder and μ1\mu_1. For each j≥2j \ge2, set μj=μ1+mvj\mu_j = \mu_1 + m v_j, where vjv_j is a unit vector. Since the dataset is finite, letting m→∞m \to\infty gives

qi1→1,qij→0(j≥2)q_{i1} \to1,\qquad q_{ij} \to0\quad(j \ge2)

uniformly over the samples. Consequently, dkij→1d_{kij} \to1 for all jj, and therefore sk,i→1s_{k,i} \to1 and Lstab(k)→0\mathcal{L}_{\mathrm{stab}}^{(k)} \to0. Thus, the infimum can be approached by configurations in which all samples are assigned to a single centroid while the remaining centroids become inactive. □

Proof and strengthened form of Proposition 1.3

Assumptions for Proposition 1.3. During the analyzed local-update window, each threshold τk\tau_k is held fixed and satisfies τk∈[τmin⁡,1−τmin⁡]\tau_k \in[\tau_{\min},1-\tau_{\min}] for some τmin⁡>0\tau_{\min} > 0. Local centroid updates use plain SGD with step size η\eta. For the restart statement, each refreshed centroid is assumed to lie in the convex hull of the current embeddings. This condition is satisfied by Lloyd updates when empty clusters are reseeded at input embeddings.

Proof. We first bound the gradient with respect to an inactive centroid. Let ϕ(qi)\phi(q_i) be continuously differentiable and suppose

∣∂ϕ∂qiℓ∣≤G\left|\frac{\partial\phi}{\partial q_{i\ell}}\right| \le G

for every ℓ\ell. By Lemma A.1,

∇μjqiℓ=qiℓ(1[ℓ=j]−qij)hij.\nabla_{\mu_j}q_{i\ell}=q_{i\ell}\left(1[\ell=j]-q_{ij}\right)h_{ij}.

Therefore,

∇μjϕ(qi)=∑ℓ∂ϕ∂qiℓqiℓ(1[ℓ=j]−qij)hij=qij∑ℓ≠jqiℓ(∂ϕ∂qij−∂ϕ∂qiℓ)hij.\begin{aligned} \nabla_{\mu_j}\phi(q_i)=\sum_{\ell}\frac{\partial\phi}{\partial q_{i\ell}}q_{i\ell}\left(1[\ell=j]-q_{ij}\right)h_{ij} \\ &=q_{ij}\sum_{\ell\ne j}q_{i\ell}\left(\frac{\partial\phi}{\partial q_{ij}}-\frac{\partial\phi}{\partial q_{i\ell}}\right)h_{ij}. \end{aligned}

Using ∥hij∥2≤cα\lVert h_{ij}\rVert_2 \le c_\alpha gives

∥∇μjϕ(qi)∥2≤2cαGqij(1−qij)≤2cαGqij.\lVert\nabla_{\mu_j}\phi(q_i)\rVert_2 \le2c_\alpha Gq_{ij}(1-q_{ij}) \le2c_\alpha Gq_{ij}.

We now apply this bound to the stability score. Since dkij∈[0,1]d_{kij} \in[0,1] and τk∈[τmin⁡,1−τmin⁡]\tau_k \in[\tau_{\min},1-\tau_{\min}],

∣∂dkij∂qkij∣≤2τmin⁡.\left|\frac{\partial d_{kij}}{\partial q_{kij}}\right| \le\frac{2}{\tau_{\min}}.

Moreover,

∂sk,i∂dkij=1C−2λvarC(dkij−dˉk,i).\frac{\partial s_{k,i}}{\partial d_{kij}}=\frac{1}{C}-\frac{2\lambda_{\mathrm{var}}}{C}\left(d_{kij}-\bar{d}_{k,i}\right).

and hence

∣∂sk,i∂dkij∣≤1+2λvarC.\left|\frac{\partial s_{k,i}}{\partial d_{kij}}\right|\le\frac{1+2\lambda_{\mathrm{var}}}{C}.

Thus,

∣∂sk,i∂qkij∣≤G,G:=2(1+2λvar)Cτmin⁡.\left|\frac{\partial s_{k,i}}{\partial q_{kij}}\right|\le G,\qquad G:=\frac{2(1+2\lambda_{\mathrm{var}})}{C\tau_{\min}}.

The reconstruction loss does not depend on the centroids. Therefore, for a mini-batch Bk,h\mathcal{B}_{k,h} at local step hh, we have

∥∇μjLk(Bk,h)∥2≤2cαGλstab∣Bk,h∣∑i∈Bk,hqkij(h).(5)\left\|\nabla_{\mu_j}\mathcal{L}_k(\mathcal{B}_{k,h})\right\|_2\le\frac{2c_\alpha G\lambda_{\mathrm{stab}}}{|\mathcal{B}_{k,h}|}\sum_{i\in\mathcal{B}_{k,h}}q_{kij}^{(h)}. \tag*{(5)}

Under the assumption qkij(h)≤δq_{kij}^{(h)}\le\delta, for every client, sample, and local iterate in the window, (5) becomes

∥∇μjLk(Bk,h)∥2≤2cαGλstabδ.\left\|\nabla_{\mu_j}\mathcal{L}_k(\mathcal{B}_{k,h})\right\|_2\le2c_\alpha G\lambda_{\mathrm{stab}}\delta.

A plain-SGD step with step size η\eta therefore moves the local centroid by at most 2cαGλstabηδ2c_\alpha G\lambda_{\mathrm{stab}}\eta\delta. Summing over HH local steps gives

∥μk,jH−μj0∥2≤2cαGλstabηHδ.\left\|\mu_{k,j}^{H}-\mu_{j}^{0}\right\|_2\le2c_\alpha G\lambda_{\mathrm{stab}}\eta H\delta.

Since FedAvg forms a convex combination of the client centroids, the same bound holds for the aggregated centroid. Hence

∥μjafter−μjbefore∥2≤2cαGλstabηHδ,\left\|\mu_j^{\mathrm{after}}-\mu_j^{\mathrm{before}}\right\|_2\le2c_\alpha G\lambda_{\mathrm{stab}}\eta H\delta,

so Proposition 1.3 holds with

Cstab=2cαGλstab.C_{\mathrm{stab}}=2c_\alpha G\lambda_{\mathrm{stab}}.

For the restart statement, suppose each refreshed centroid belongs to conv⁡(Z)\operatorname{conv}(Z), where ZZ is the current embedding set. Since zi∈Zz_i\in Z and the diameter of a convex hull is equal to the diameter of its generating set,

∥zi−μj∥2≤DZ,DZ:=diam⁡(Z).\left\|z_i-\mu_j\right\|_2\le D_Z,\qquad D_Z:=\operatorname{diam}(Z).

It follows that

uij≥(1+DZ2α)−α+12.u_{ij}\ge\left(1+\frac{D_Z^2}{\alpha}\right)^{-\frac{\alpha+1}{2}}.

Also, uiℓ≤1u_{i\ell}\le1 for every ℓ\ell, so

∑ℓ=1Cuiℓ≤C.\sum_{\ell=1}^{C}u_{i\ell}\le C.

Therefore,

qij=uij∑ℓ=1Cuiℓ≥1C(1+DZ2α)−α+12=:κ>0.q_{ij}=\frac{u_{ij}}{\sum_{\ell=1}^{C}u_{i\ell}}\ge\frac{1}{C}\left(1+\frac{D_Z^2}{\alpha}\right)^{-\frac{\alpha+1}{2}}=:\kappa>0.

This proves the post-restart lower bound.

A stronger cumulative-mass bound. The same argument gives a stronger form that does not require a common upper bound δ\delta at every local step. Define the average assignment mass received by centroid jj on client kk at step hh as

qˉk,j(h)=1∣Bk,h∣∑i∈Bk,hqkij(h).\bar{q}_{k,j}^{(h)} = \frac{1}{\lvert B_{k,h}\rvert} \sum_{i \in B_{k,h}} q_{kij}^{(h)}.

and let

δj,h=max⁡kqˉk,j(h).\delta_{j,h} = \max_k \bar{q}_{k,j}^{(h)}.

Applying the same gradient bound at each step and summing over the local trajectory yields

∥μjH−μj0∥2≤2cαGλstabη∑h=0H−1δj,h.\lVert\mu_j^H - \mu_j^0 \rVert_2 \le2c_\alpha G\lambda_{\mathrm{stab}}\eta\sum_{h=0}^{H-1} \delta_{j,h}.

Thus the total movement of centroid jj is controlled by the cumulative assignment mass it receives during local optimization. The bound in Proposition 1.3 follows immediately when δj,h≤δ\delta_{j,h} \le\delta for every hh, since

∑h=0H−1δj,h≤Hδ.\sum_{h=0}^{H-1} \delta_{j,h} \le H\delta.

ADDITIONAL METHOD DETAILS

k-FED Centroid Initialization and Restarting

Fed-BRDECS uses k-FED ([9]) for both initial centroid construction and periodic centroid restarting. We use k-FED because it constructs global centroids from uploaded local cluster means without requiring clients to transmit local soft assignment statistics or cluster-count statistics, which may reveal sensitive information about client-specific data composition.

After federated autoencoder pretraining, each client embeds its local data using the current encoder and solves a local clustering subproblem in the latent space. Following k-FED, the client sends only the resulting local cluster means to the server without sending cluster assignment statistics. The server then applies the k-FED server-side aggregation procedure to the collection of uploaded local means to obtain the global centroids. This procedure replaces the centralized k-means initialization used in DEC/IDEC with a one-shot federated centroid construction step.

The same procedure is used during restarting. At the beginning of each restart iteration, the server does not reset or perturb the encoder or decoder parameters as in BRB ([24]). Instead, clients recompute local cluster means from their current embeddings, and the server reruns the k-FED aggregation step to refresh the global centroids. The model parameters are kept unchanged across restarts, while the centroids are relocated according to the current federated embedding geometry. This design allows Fed-BRDECS to correct biased or inactive centroids induced by heterogeneous client updates without disrupting the learned representation.

Formally, at restart rr, clients compute embeddings using the current encoder fθr,0f_{\theta^{r,0}} and the server updates

{μjr}j=1C←k-FED⁡({fθr,0(Dk)}k=1K).\{\mu_j^{r}\}_{j=1}^{C} \leftarrow\operatorname{k\text{-}FED}\left(\{f_{\theta^{r,0}}(D_k)\}_{k=1}^{K}\right).

The model parameters are then set to

Θr,0={θr,0,ϕr,0,μ1r,…,μCr},\Theta^{r,0} = \{\theta^{r,0}, \phi^{r,0}, \mu_1^r, \ldots, \mu_C^r\},

and federated refinement proceeds from this centroid-refreshed model.

Privacy Scope of Fed-BRDECS

Fed-BRDECS is privacy-preserving in the specific sense of reducing local assignment-statistic disclosure. In DEC/IDEC-style federated refinement, local soft-assignment matrices, soft-count vectors, or cluster-frequency statistics directly encode client-specific cluster composition. Such composition information can be sensitive in practical applications, for example when local clusters correspond to defect types, disease subpopulations, or machine operating regimes.

Fed-BRDECS does not provide formal differential privacy. Like other prototype-based federated clustering methods, it still communicates model updates and local centroid means during k-FED initialization and restarting. However, during clustering refinement, Fed-BRDECS avoids repeated transmission of local soft assignments, soft-count vectors, and predicted-cluster histograms. Existing work [34] applies differential privacy to mitigate this leakage, but DP-noised cluster counts may still reveal client-level composition. Appendix § 8.§ 3 further discusses why adding DP noise to cluster counts may fail to hide local composition unless the noise magnitude is large enough to substantially degrade the utility of the statistics.

Why DP-Noised Cluster Counts Still Reveal Local Composition

A natural alternative to avoiding local assignment statistics is to transmit differentially private noisy cluster counts. We argue that this only partially addresses the privacy issue considered in this work. Differential privacy primarily protects individual-record participation, whereas our concern is client-level cluster-composition disclosure. In federated clustering, a local cluster-count vector directly encodes the client’s data composition, which can be sensitive in applications such as industrial defect monitoring, where defect-type proportions may reveal process quality, machine conditions, or yield-related information.

Consider client kk with nkn_k samples and CC clusters. Let

ck=(ck,1,…,ck,C)∈NC,∑j=1Cck,j=nk\mathbf{c}_k = (c_{k,1}, \ldots, c_{k,C}) \in\mathbb{N}^{C}, \qquad\sum_{j=1}^{C} c_{k,j} = n_k

denote its local hard cluster-count vector, and let

πk=cknk\boldsymbol{\pi}_k = \frac{\mathbf{c}_k}{n_k}

be the corresponding local cluster-composition vector. For DEC/IDEC-style federated refinement, the analogous soft-count vector is

fk=(fk,1,…,fk,C),fk,j=∑i=1nkqkij,\mathbf{f}_k = (f_{k,1}, \ldots, f_{k,C}), \qquad f_{k,j} = \sum_{i=1}^{n_k} q_{kij},

whose normalized version similarly reveals the client’s soft cluster composition. Suppose a client applies the Laplace mechanism to its count vector:

c~k=ck+η,ηj∼Laplace⁡(Δϵ),\widetilde{\mathbf{c}}_k = \mathbf{c}_k + \boldsymbol{\eta}, \qquad\eta_j \sim\operatorname{Laplace}\left(\frac{\Delta}{\epsilon}\right),

where Δ\Delta is the ℓ1\ell_1-sensitivity of the histogram query. The server can estimate the client’s local composition by normalizing the noisy counts:

π~k=c~knk.\widetilde{\boldsymbol{\pi}}_k = \frac{\widetilde{\mathbf{c}}_k}{n_k}.

Then

E∥π~k−πk∥1=1nkE∥η∥1=CΔnkε.\mathbb{E}\lVert\tilde{\pi}_k-\pi_k\rVert_1=\frac{1}{n_k}\mathbb{E}\lVert\eta\rVert_1=\frac{C\Delta}{n_k\varepsilon}.

Therefore, for moderate or large local datasets, the normalized noise can be very small unless ε\varepsilon is chosen extremely small. For example, when C=10C=10, nk=5,000n_k=5{,}000, Δ=1\Delta=1, and ε=1\varepsilon=1, the expected ℓ1\ell_1 error in the recovered composition is only

105000=0.002.\frac{10}{5000}=0.002.

Thus, even after adding standard DP noise to the count vector, the server can still recover a highly accurate approximation of the client’s local cluster composition.

This issue can also be understood through group privacy. Differential privacy protects neighboring datasets that differ in one record, but two clients with different cluster compositions may differ in many records. Let π\pi and π′\pi' be two possible local composition vectors. Transforming a histogram with composition π\pi into one with composition π′\pi' requires

m=nk2∥π−π′∥1m=\frac{n_k}{2}\lVert\pi-\pi'\rVert_1

sample replacements. By group privacy, an ε\varepsilon-DP mechanism provides only mεm\varepsilon-level indistinguishability for this composition-level change. Hence, to hide two compositions separated by δ=∥π−π′∥1\delta=\lVert\pi-\pi'\rVert_1, we need

nkεδ2=O(1),or equivalentlyε=O(1nkδ).\frac{n_k\varepsilon\delta}{2}=O(1),\qquad\text{or equivalently}\qquad\varepsilon=O\left(\frac{1}{n_k\delta}\right).

For a fixed composition gap δ\delta, this requires ε=O(1/nk)\varepsilon=O(1/n_k). Under the Laplace mechanism, the corresponding noise scale becomes

Δε=O(nk),\frac{\Delta}{\varepsilon}=O(n_k),

meaning that the noise added to each count is on the same order as the client’s dataset size. Such noise would substantially corrupt the count vector and degrade its utility for federated k-means updates or DEC/IDEC target distribution construction.

Therefore, DP-noised cluster counts exhibit a sharp privacy–utility tradeoff for the composition-disclosure threat considered in this work. Moderate noise preserves clustering utility but still reveals an accurate estimate of local cluster composition; noise large enough to obscure that composition makes the statistics unreliable for clustering. Fed-BRDECS avoids this disclosure channel by not transmitting local soft-assignment matrices, local cluster-frequency vectors, or predicted-cluster histograms during refinement.

EXPERIMENT DETAILS

Datasets and Models

Image datasets. For MNIST [8], Fashion-MNIST [42], and KMNIST [6], we use the official test split of each dataset. Each image is flattened into a vector before being fed into the autoencoder. The encoder follows the standard DEC-style multilayer perceptron architecture

784→500→500→2000→10,784 \to500 \to500 \to2000 \to10,

where the final layer gives a 10-dimensional latent representation. The decoder is symmetric. The number of clusters is set to the number of ground-truth classes, i.e., C=10C=10. Labels are used only for partitioning and evaluation, not during training.

REUTERS-10K. For REUTERS-10K, we follow the preprocessing protocol of DEC [43]. We use four root categories (corporate/industrial, government/social, markets, and economics) as labels and exclude documents with multiple labels. Following DEC’s protocol, we also compute TF–IDF features using the 2,000 most frequent words and use them as input. Due to computational constraints, we randomly sample 10,000 examples. We refer to this sampled dataset as REUTERS-10K. For this dataset, the encoder architecture is

2000→500→500→2000→10,2000 \to500 \to500 \to2000 \to10,

with a symmetric decoder and a 10-dimensional latent representation.

Implementation Details

For centroid-based baselines, including k-FED, FKM, and DWF k-Means, we apply the algorithms directly to the raw input features, following the evaluation setting of the original federated clustering papers. Thus, for image datasets, these methods operate on flattened raw pixels, while for REUTERS-10K they operate on TF–IDF features. Deep clustering methods instead learn an autoencoder representation before or during clustering refinement. All federated deep clustering methods use FedAvg as the federated optimization framework. For methods incorporating the sample stability loss or the balanced sampler, each client updates the sampling weights or calculates the Otsu threshold τk\tau_k once per epoch across its entire local dataset.

Selection of loss weights. We examine the sensitivity of Fed-BRDECS to the clustering-loss weight λstab\lambda_{\mathrm{stab}} on MNIST and Fashion-MNIST. As shown in Figure 3, the preferred weight differs between the IID and non-IID settings. We use λstab=1.0\lambda_{\mathrm{stab}} = 1.0 for IID partitions, which provides near-optimal performance on both datasets, and λstab=0.5\lambda_{\mathrm{stab}} = 0.5 for non-IID partitions, which achieves the highest ACC on both datasets. These values are used for the corresponding partition settings in all main experiments. We set λvar=0.8\lambda_{\mathrm{var}} = 0.8, following Cheng et al. [4].

Optimization details. Local client optimization uses SGD with momentum. We use a cosine annealing learning-rate scheduler for both the pretraining and refinement stages. The scheduler decays the learning rate from the selected initial value to 10−310^{-3} times the initial value by the final round. For refinement with multiple restarts, the scheduler is applied over the entire refinement process rather than being reset at each restart. We tune weight decay over {10−4,10−5,0}\{10^{-4}, 10^{-5}, 0\} and batch size over {64,128,256}\{64, 128, 256\}. The initial learning rate is selected by grid search from {1.0,0.2,0.1,0.02,0.01}\{1.0, 0.2, 0.1, 0.02, 0.01\}. For local training, each client performs 20 local optimization steps per communication round. All experiments are implemented in PyTorch 2.1.0 with CUDA 12.6. Jobs are executed on four NVIDIA GeForce RTX 2080 Ti GPUs.

Full Clustering Results

Table 3 reports the full numerical clustering results corresponding to Figure 1 in the main body. All ACC and NMI values are averaged over five independent runs with different random seeds.

Dataset / Partitionk-FEDFKMDWFCCFCFed-AEF-DECFed-DECSFed-BDECSFed-BRDECSFed-BRIDEC
MNIST / IID0.4530 (0.4990)0.4866 (0.4347)0.4914 (0.4318)0.8576 (0.8345)0.8155 (0.7531)0.8878 (0.9259)0.8394 (0.7853)0.8408 (0.7862)0.9210 (0.8782)0.9010 (0.8979)
MNIST / Non-IID0.5524 (0.4896)0.5130 (0.4563)0.4972 (0.4338)0.8026 (0.7761)0.7973 (0.7296)0.7016 (0.8062)0.8215 (0.7638)0.8215 (0.7703)0.9225 (0.8498)0.7158 (0.5969)
Fashion-MNIST / IID0.5297 (0.5228)0.4964 (0.5091)0.4745 (0.5170)0.5448 (0.5798)0.5409 (0.5618)0.5538 (0.5352)0.5438 (0.5748)0.5477 (0.5732)0.5832 (0.5889)0.5576 (0.5865)
Fashion-MNIST / Non-IID0.4976 (0.4959)0.4987 (0.5322)0.5446 (0.5068)0.5231 (0.5683)0.5614 (0.5797)0.5024 (0.5670)0.5508 (0.5824)0.5685 (0.5764)0.6129 (0.5925)0.5438 (0.5805)
KMNIST / IID0.3066 (0.2790)0.3798 (0.2667)0.3421 (0.2521)0.4685 (0.4345)0.4642 (0.4294)0.4722 (0.4503)0.4735 (0.4267)0.4745 (0.4328)0.4798 (0.4381)0.4735 (0.4405)
KMNIST / Non-IID0.3100 (0.2574)0.3059 (0.2709)0.3352 (0.2656)0.3954 (0.3725)0.4099 (0.3678)0.3854 (0.3932)0.3765 (0.3724)0.4122 (0.3745)0.4338 (0.4065)0.3978 (0.3899)
REUTERS-10K / IID0.6873 (0.3945)0.7590 (0.5098)0.7600 (0.4400)0.7716 (0.5630)0.7285 (0.4904)0.7606 (0.5580)0.7536 (0.5387)0.7579 (0.5372)0.8039 (0.5749)0.7832 (0.5439)
REUTERS-10K / Non-IID0.5962 (0.3316)0.7064 (0.4235)0.6553 (0.3564)0.7528 (0.5274)0.7613 (0.5137)0.7622 (0.5248)0.7658 (0.4984)0.7805 (0.4841)0.7865 (0.5316)0.7654 (0.4952)

Table 3. Full clustering results on IID and non-IID federated partitions with K=10K = 10 clients. Each entry reports ACC and NMI in parentheses. The non-IID setting uses a Dirichlet partition with α=0.5\alpha= 0.5. All values are averaged over five independent runs with different random seeds. Higher is better. Best ACC results are shown in bold, and best NMI results are bolded in parentheses. Lower performance of DEC-based refinement compared with Fed-AE indicates that the refinement stage can degrade the pretrained representation, especially under non-IID client distributions.

ADDITIONAL DETAILS FOR FEDERATED TIME-SERIES ANOMALY DETECTION

Centralized TSAD spans deep one-class methods (Deep SVDD [33]), reconstruction and forecasting methods (LSTM-AE [21], OmniAnomaly (Su et al., 2019), USAD [2]), graph-based methods (GDN [7]), and transformer-based detectors (TranAD [39]). A growing thread also builds detectors on deep embedded clustering itself, including DTC [20] and DCLOP [26]. Such DEC-based detectors are common in centralized learning but scarce in federated learning, where FedTADB​ench [18] evaluates representative TSAD algorithms under federated learning. Fed-BRDECS fills this gap as a federated deep clustering backbone for unsupervised outlier detection, whose mechanism can be easily plugged into existing federated TSAD algorithms.

Implementation Details

General strategy to instantiate Fed-BRDECS. Let xk,i∈RW×dx_{k,i} \in\mathbb{R}^{W \times d} denote a time-series window from client kk, where WW is the window length and dd is the dimensionality. Let Bk⊂Dk\mathcal{B}_k \subset\mathcal{D}_k denote a mini-batch of local windows sampled on client kk. A reconstruction-based TSAD backbone maps xk,ix_{k,i} to a latent representation hk,ih_{k,i} and reconstructs the input as x^k,i\hat{x}_{k,i}. Its native training objective is the reconstruction loss

Lrec(k)=1∣Bk∣∑xk,i∈Bkℓrec(xk,i,x^k,i),\mathcal{L}_{\mathrm{rec}}^{(k)} = \frac{1}{|\mathcal{B}_k|} \sum_{x_{k,i} \in\mathcal{B}_k} \ell_{\mathrm{rec}}(x_{k,i}, \hat{x}_{k,i}),

where ℓrec\ell_{\mathrm{rec}} denotes the backbone-specific reconstruction loss. In our experiments, we use the mean squared reconstruction error over the window,

ℓrec(xk,i,x^k,i)=1Wd∥xk,i−x^k,i∥F2.\ell_{\mathrm{rec}}(x_{k,i}, \hat{x}_{k,i}) = \frac{1}{Wd}\lVert x_{k,i} - \hat{x}_{k,i}\rVert_{F}^{2}.

At inference time, the outlier score is computed from the same reconstruction error. To instantiate Fed-BRDECS, we attach a lightweight projection head pωp_{\omega} to the backbone latent representation

zk,i=pω(hk,i)∈Rdc,z_{k,i} = p_{\omega}(h_{k,i}) \in\mathbb{R}^{d_c},

where dcd_c is the clustering embedding dimension. Fed-BRDECS then maintains centroids {μj}j=1C\{\mu_j\}_{j=1}^{C} in this clustering space. During training, soft assignments qkijq_{kij} are computed from zk,iz_{k,i} and the centroids using the same Student-tt kernel as in the main method. The local objective becomes

LTSAD(k)=Lrec(k)+λstabLstab(k).\mathcal{L}_{\mathrm{TSAD}}^{(k)} = \mathcal{L}_{\mathrm{rec}}^{(k)} + \lambda_{\mathrm{stab}}\mathcal{L}_{\mathrm{stab}}^{(k)}.

Centroids are initialized and refreshed by k-FED on the client clustering embeddings. The prediction-balanced sampler is constructed from the induced pseudo-clusters but with smoothing parameterized by γ\gamma. Thus, windows assigned to locally rare predicted regimes are sampled more often, while the smoothing parameter γ\gamma controls the strength of rebalancing and prevents the sampler from over-concentrating on a small number of windows.

At inference time, the projection head and centroids are discarded, and outlier scores are computed only from the original reconstruction error. Therefore, Fed-BRDECS acts as a training-time representation-learning module and does not add inference-time cost.

LSTM-AE instantiation. For LSTM-AE, the encoder maps each input window xk,ix_{k,i} to a final recurrent hidden state hk,ih_{k,i}. We attach the clustering projection head to this final hidden state:

zk,i=pω(hk,i).z_{k,i} = p_{\omega}(h_{k,i}).

The decoder reconstructs the input window, and the reconstruction loss is the mean squared error between xk,ix_{k,i} and x^k,i\hat{x}_{k,i}. Thus, the LSTM-AE backbone is unchanged except for the temporary clustering head used during training. Since hk,ih_{k,i} is already a single vector representation of the full window, no temporal pooling is required before clustering.

TranAD instantiation. TranAD uses a two-phase transformer reconstruction mechanism. Given an input window, the first decoder produces an initial reconstruction, and the second decoder reconstructs the target using the first-phase reconstruction error as additional context. We attach the clustering head to the latent representation produced by the first-phase transformer encoder. Let

Mk,i(1)∈RW×dhM_{k,i}^{(1)} \in\mathbb{R}^{W \times d_h}

denote the first-phase encoder memory for window xk,ix_{k,i}. We obtain a window-level representation by mean pooling over time:

hk,i=1W∑t=1WMk,i,t(1)h_{k,i} = \frac{1}{W}\sum_{t=1}^{W} M_{k,i,t}^{(1)}

The clustering embedding is then

zk,i=pω(hk,i).z_{k,i} = p_{\omega}(h_{k,i}).

The native TranAD reconstruction loss is kept unchanged. In particular, if xk,i(1)x_{k,i}^{(1)} and xk,i(2)x_{k,i}^{(2)} denote the first- and second-phase reconstructions, the local reconstruction loss uses the same epoch-dependent weighting as TranAD:

ℓrec=1eℓ(xk,i(1),xk,i)+(1−1e)ℓ(xk,i(2),xk,i),\ell_{\mathrm{rec}} = \frac{1}{e}\ell(x_{k,i}^{(1)},x_{k,i}) + \left(1-\frac{1}{e}\right)\ell(x_{k,i}^{(2)},x_{k,i}),

where ee is the local epoch index. At inference time, the outlier score is computed from the second-phase reconstruction error, as in the original TranAD.

Prediction-balanced sampling for TSAD. For each client, Fed-BRDECS periodically constructs a prediction-balanced sampler from the pseudo-clusters induced by the temporary clustering head. The purpose is to increase the exposure of locally rare normal regimes during training, while avoiding overly aggressive oversampling that may overfit a small number of anomalous windows. Specifically, client kk computes soft assignments over its local windows and estimates the local soft cluster mass

fk,j=∑xk,i∈Dkqkij,j=1,…,C.f_{k,j} = \sum_{x_{k,i}\in D_k} q_{kij}, \qquad j=1,\ldots,C.

Each window is assigned to its most likely pseudo-cluster,

y^k,i=arg⁡max⁡j∈{1,…,C}qkij.\hat{y}_{k,i} = \arg\max_{j\in\{1,\ldots,C\}} q_{kij}.

The inverse-frequency cluster weight is then smoothed by an exponent γ\gamma:

w~k,j=(1fk,j+ϵ)γ,\tilde{w}_{k,j} = \left(\frac{1}{f_{k,j}+\epsilon}\right)^\gamma,

and each window receives the sampling weight

wk,i=w~k,y^k,i.w_{k,i} = \tilde{w}_{k,\hat{y}_{k,i}}.

Mini-batches are sampled with replacement according to probabilities proportional to wk,iw_{k,i}. Here, γ\gamma controls the strength of rebalancing: γ=0\gamma=0 recovers uniform sampling, while γ=1\gamma=1 corresponds to the standard inverse-frequency sampler. This smoothing is used to prevent the sampler from concentrating too heavily on rare pseudo-clusters, which may otherwise increase the risk of overfitting to anomalous or atypical windows. In our TSAD experiments, we use γ=0.5\gamma=0.5.

Centroid initialization and restarting. After reconstruction pretraining, each client extracts clustering embeddings {zk,i}\{z_{k,i}\} from its local windows and runs local k-means. The server aggregates the returned local centroids using k-FED to obtain the initial global centroids. During refinement, Fed-BRDECS periodically refreshes centroids by rerunning the same k-FED procedure on the current clustering embeddings. This centroid-level restarting corrects biased or inactive centroids caused by heterogeneous local time-series regimes. No clustering head is used at inference.

Details for proprietary sensor dataset. The proprietary sensor dataset is collected from industrial manufacturing equipment and consists of irregularly sampled multivariate time-series samples. After preprocessing, the dataset contains 72,808 samples with an anomaly rate of 3.12%. The anomaly labels are used only for evaluation and are not used during unsupervised federated training.

The dataset is naturally federated by factory, where each factory is treated as one client. Figure 4 summarizes the factory–product metadata. The metadata covers five factories and ten products, but the support is sparse, indicating the strong client heterogeneity.

Factory–product production-volume metadata heatmap

Figure 4. Factory–product production-volume metadata for the proprietary sensor dataset. The heatmap shows strong non-IID structure across factories.

Figure 5 shows representative multivariate trajectories from three product types. The trajectories exhibit irregular temporal structure, product-dependent sequence lengths, sharp transitions, and different sensor-channel dynamics. These observations support the use of a model designed for irregularly sampled time series.

Representative multivariate sensor trajectories from Products 1, 2, and 4

Figure 5. Representative multivariate sensor trajectories from Products 1, 2, and 4 in the proprietary dataset. Each panel visualizes multiple examples over three sensor channels. The examples show product-dependent temporal structure, variable sequence length, sharp transitions, plateau regions, and heterogeneous channel dynamics, motivating the use of CoFormer-AE for irregularly sampled sensor data.

CoFormer-AE for irregularly sampled sensor data. The proprietary sensor dataset consists of irregularly sampled multivariate time series. Therefore, we use CoFormer-AE instead of LSTM-AE or TranAD for this dataset. CoFormer provides the window-level representation hk,ih_{k,i} used by the reconstruction model, and Fed-BRDECS is attached in the same way,

zk,i=pω(hk,i).z_{k,i} = p_{\omega}(h_{k,i}).

The remaining procedure, including k-FED centroid initialization, sample-stability loss, prediction-balanced sampling, and inference by reconstruction error, is unchanged. We do not evaluate TranAD on this dataset because TranAD is architecture-specific to regularly sampled fixed-window inputs and is not directly compatible with the CoFormer backbone.

References

  1. [1]Abdulaal, A., Liu, Z., and Lancewicki, T. (2021). Practical approach to asynchronous multivariate time series anomaly detection and localization. In Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining, pages 2485–2494.DOI
  2. [2]Audibert, J., Michiardi, P., Guyard, F., Marti, S., and Zuluaga, M. A. (2020). USAD: Unsupervised anomaly detection on multivariate time series. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 3395–3404.
  3. [3]Bravo, M. and Dalleiger, S. (2026). Robust federated clustering under heterogeneity and adversaries. In Proceedings of the 29th International Conference on Artificial Intelligence and Statistics, volume 300 of Proceedings of Machine Learning Research, pages 3718–3726. PMLR.
  4. [4]Cheng, Z., Li, F., Wang, J., and Qian, Y. (2024). Deep embedding clustering driven by sample stability. In Proceedings of the Thirty-Third International Joint Conference on Artificial Intelligence (IJCAI), pages 3854–3862.arxiv.org/abs/2401.15989
  5. [5]Chung, H. and Lee, J. S. (2025). Multi-level analyzation of imbalance to resolve non-IID-ness in federated learning. Neurocomputing, 626:129528.
  6. [6]Clanuwat, T., Bober-Irizar, M., Kitamoto, A., Lamb, A., Yamamoto, K., and Ha, D. (2018). Deep learning for classical Japanese literature. arXiv preprint arXiv:1812.01718.DOI
  7. [7]Deng, A. and Hooi, B. (2021). Graph neural network-based anomaly detection in multivariate time series. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pages 4027–4035.
  8. [8]Deng, L. (2012). The MNIST database of handwritten digit images for machine learning research. IEEE Signal Processing Magazine, 29(6):141–142.
  9. [9]Dennis, D. K., Li, T., and Smith, V. (2021). Heterogeneity for the win: One-shot federated clustering. In International Conference on Machine Learning, pages 2611–2620. PMLR.arxiv.org/abs/2103.00697
  10. [10]Garg, A., Zhang, W., Samaran, J., Savitha, R., and Foo, C.-S. (2022). An evaluation of anomaly detection and diagnosis in multivariate time series. IEEE Transactions on Neural Networks and Learning Systems, 33(6):2508–2517.DOI
  11. [11]Garst, S. and Reinders, M. (2025). Federated K-means clustering. In Pattern Recognition – 27th International Conference, ICPR 2024, Proceedings, volume 15302 of Lecture Notes in Computer Science, pages 107–122. Springer.arxiv.org/abs/2310.01195
  12. [12]Guo, X., Gao, L., Liu, X., and Yin, J. (2017). Improved deep embedded clustering with local structure preservation. In Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence (IJCAI), pages 1753–1759.DOI
  13. [13]Holzer, P., Jacob, T., and Kavane, S. (2023). Dynamically weighted federated k-means. arXiv preprint arXiv:2310.14858.arxiv.org/abs/2310.14858
  14. [14]Hsu, T.-M. H., Qi, H., and Brown, M. (2019). Measuring the effects of non-identical data distribution for federated visual classification. arXiv preprint arXiv:1909.06335.arxiv.org/abs/1909.06335
  15. [15]Jain, A. K. (2010). Data clustering: 50 years beyond K-means. Pattern Recognition Letters, 31(8):651–666.
  16. [16]Lewis, D. D., Yang, Y., Rose, T. G., and Li, F. (2004). RCV1: A new benchmark collection for text categorization research. Journal of Machine Learning Research, 5:361–397.
  17. [17]Lim, G. (2024). Data imbalance solutions using pseudo-cluster and two-step classification methods. In 2024 IEEE International Conference on Big Data (BigData), pages 8751–8753. IEEE.DOI
  18. [18]Liu, F., Zeng, C., Zhang, L., Zhou, Y., Mu, Q., Zhang, Y., Zhang, L., and Zhu, C. (2022). FedTADBench: Federated time-series anomaly detection benchmark. In 2022 IEEE 24th International Conference on High Performance Computing & Communications (HPCC/DSS/SmartCity/DependSys), pages 303–310. IEEE.arxiv.org/abs/2212.09518
  19. [19]Liu, J., Yan, J., and Zhang, Z.-Y. (2024). CCFC: Bridging federated clustering and contrastive learning. arXiv preprint arXiv:2401.06634.arxiv.org/abs/2401.06634
  20. [20]Madiraju, N. S., Sadat, S. M., Fisher, D., and Karimabadi, H. (2018). Deep temporal clustering: Fully unsupervised learning of time-domain features. arXiv preprint arXiv:1802.01059.arxiv.org/abs/1802.01059
  21. [21]Malhotra, P., Ramakrishnan, A., Anand, G., Vig, L., Agarwal, P., and Shroff, G. (2016). LSTM-based encoder-decoder for multi-sensor anomaly detection. In ICML 2016 Anomaly Detection Workshop.arxiv.org/abs/1607.00148
  22. [22]Mashhadi, A., Sterner, J., and Murray, J. (2021). Deep embedded clustering of urban communities using federated learning. In 2021 International Joint Conference on Neural Networks (IJCNN), pages 1–8.DOI
  23. [23]McMahan, B., Moore, E., Ramage, D., Hampson, S., and Agüera y Arcas, B. (2017). Communication-efficient learning of deep networks from decentralized data. In Proceedings of the 20th International Conference on Artificial Intelligence and Statistics, volume 54 of Proceedings of Machine Learning Research, pages 1273–1282. PMLR.arxiv.org/abs/1602.05629
  24. [24]Miklautz, L., Klein, T., Sidak, K., Leiber, C., Lang, T., Shkabrui, A., Tschiatschek, S., and Plant, C. (2025). Breaking the reclustering barrier in centroid-based deep clustering. In The Thirteenth International Conference on Learning Representations.arxiv.org/abs/2411.02275
  25. [25]Nguyen, D. C., Ding, M., Pathirana, P. N., Seneviratne, A., Li, J., and Poor, H. V. (2021). Federated learning for Internet of Things: A comprehensive survey. IEEE Communications Surveys & Tutorials, 23(3):1622–1658.DOI
  26. [26]Obied, M. A., Ghaleb, F. F., Hassanien, A. E., Abdelfattah, A. M., and Zakaria, W. (2023). Deep clustering-based anomaly detection and health monitoring for satellite telemetry. Big Data and Cognitive Computing, 7(1):39.DOI
  27. [27]Otsu, N. (1979). A threshold selection method from gray-level histograms. IEEE Transactions on Systems, Man, and Cybernetics, 9(1):62–66.DOI
  28. [28]Pan, C., Sima, J., Prakash, S., Rana, V., and Milenkovic, O. (2023). Machine unlearning of federated clusters. In The Eleventh International Conference on Learning Representations.arxiv.org/abs/2210.16424
  29. [29]Park, H., Klabjan, D., Braun, M. W., Li, X., and Ananthanarayanan, B. (2026). Class-grouped normalized momentum and faster hyperparameter exploration to tackle class imbalance in federated learning. In Proceedings of the 43rd International Conference on Machine Learning, volume 306 of Proceedings of Machine Learning Research, pages 96740–96765. PMLR.arxiv.org/abs/2607.01474
  30. [30]Pfeifer, B., Sirocchi, C., Bloice, M. D., Kreuzthaler, M., and Urschler, M. (2024). Federated unsupervised random forest for privacy-preserving patient stratification. Bioinformatics, 40(Supplement_2):ii198–ii207.arxiv.org/abs/2401.16094
  31. [31]Presotto, R., Civitar ese, G., and Bettini, C. (2022). FedCLAR: Federated clustering for personalized sensor-based human activity recognition. In 2022 IEEE International Conference on Pervasive Computing and Communications (PerCom), pages 227–236. IEEE.DOI
  32. [32]Rieke, N., Hancox, J., Li, W., Milletari, F., Roth, H. R., Albarqouni, S., Bakas, S., Galtier, M. N., Landman, B. A., Maier-Hein, K., et al. (2020). The future of digital health with federated learning. NPJ Digital Medicine, 3(1):119.DOI
  33. [33]Ruff, L., Vandermeulen, R. A., Goernitz, N., Deecke, L., Siddiqui, S. A., Binder, A., Müller, E., and Kloft, M. (2018). Deep one-class classification. In Proceedings of the 35th International Conference on Machine Learning, pages 4393–4402. PMLR.
  34. [34]Scott, J., Lampert, C. H., and Saulpic, D. (2025). Differentially private federated k-means clustering with server-side data. In Proceedings of the 42nd International Conference on Machine Learning, volume 267 of Proceedings of Machine Learning Research, pages 53757–53790. PMLR.arxiv.org/abs/2506.05408
  35. [35]Seol, M. and Kim, T. (2023). Performance enhancement in federated learning by reducing class imbalance of non-IID data. Sensors, 23(3):1152.DOI
  36. [36]Stallmann, M. and Wilbik, A. (2022). Towards federated clustering: A federated fuzzy c-means algorithm (FFCM). arXiv preprint arXiv:2201.07316.arxiv.org/abs/2201.07316
  37. [38]Suayama, K. and Nakamura, K. (2025). Reducing implicit class imbalance in unlabeled datasets using text-specified sensitive attributes. In 2025 Asia Pacific Signal and Information Processing Association Annual Summit and Conference (APSIPA ASC), pages 2032–2037. IEEE.DOI
  38. [39]Tuli, S., Casale, G., and Jennings, N. R. (2022). TranAD: Deep transformer networks for anomaly detection in multivariate time series data. Proceedings of the VLDB Endowment, 15(6):1201–1214.arxiv.org/abs/2201.07284
  39. [40]Wang, L., Xu, S., Wang, X., and Zhu, Q. (2021). Addressing class imbalance in federated learning. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pages 10165–10173.
  40. [41]Wei, Y., Peng, J., He, T., Xu, C., Zhang, J., Pan, S., and Chen, S. (2023). Compatible transformer for irregularly sampled multivariate time series. In 2023 IEEE International Conference on Data Mining (ICDM), pages 1409–1414. IEEE.arxiv.org/abs/2310.11022
  41. [42]Xiao, H., Rasul, K., and Vollgraf, R. (2017). Fashion-MNIST: A novel image dataset for benchmarking machine learning algorithms. arXiv preprint arXiv:1708.07747.arxiv.org/abs/1708.07747
  42. [43]Xie, J., Girshick, R., and Farhadi, A. (2016). Unsupervised deep embedding for clustering analysis. In International Conference on Machine Learning, pages 478–487. PMLR.arxiv.org/abs/1511.06335
  43. [45]Yang, B., Fu, X., Sidiropoulos, N. D., and Hong, M. (2017). Towards k-means-friendly spaces: Simultaneous deep learning and clustering. In International Conference on Machine Learning, pages 3861–3870. PMLR.arxiv.org/abs/1610.04794
  44. [46]Zong, B., Song, Q., Min, M. R., Cheng, W., Lumezanu, C., Cho, D., and Chen, H. (2018). Deep autoencoding Gaussian mixture model for unsupervised anomaly detection. In International Conference on Learning Representations.

Paper details

vlnc:W_gszxevrj
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY-SA 4.0
Usage

views · 1

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

generative AI tools

View statement
Looking for related papers…
Contents