One-Shot Clustering for Federated Learning Under Clustering-Agnostic Assumption

arXiv:2509.01587 · cs.LG, cs.AI · Submitted 2025-09-01 · Read on arXiv

Listen

Radio episode about this paper

Transcript

Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.

Tom: We're looking at the paper: "One-Shot Clustering for Federated Learning Under Clustering-Agnostic Assumption".

Paper summary: Tom: So, wrapping up this paper "One-Shot Clustering for Federated Learning Under Clustering-Agnostic Assumption," the authors present an algorithm that automates clustering in federated learning by detecting convergence signs using a clustering temperature function without needing any hyperparameters >

Jane: The title itself suggests they are making this approach work even when you don't know what kind of clusters you're looking for beforehand, which simplifies things for practitioners who are trying to personalize models across many different client types >

Meng: From an operational standpoint, the focus on eliminating hyperparameter tuning is what makes this algorithm potentially deployable, although they did admit that it only proves effectiveness during the initial phases of training rather than long-term stability >

Lu: What this paper changes for me as a researcher is exploring how we can leverage the relationship between local explainability and federated personalization in clustering, which is a novel intersection they are exploring >

Tom: They’re showing that you can get better personalized F1 scores by combining their OCFL method with density-based methods like HDBSCAN >

Jane: Overall, the paper contributes a method that finds the earliest suitable moment for clustering based on model convergence indicators, which is something we really need as federated learning becomes more complex >

Lalam: I'm confident this direction is solid because it grounds the clustering decision in measurable properties of the gradient differences rather than just arbitrary round counts >

Conclusion: Tom: So, we've been looking at this paper about One-Shot Clustering for Federated Learning Under Clustering-Agnostic Assumption by some authors and what they did there in general >

Jane: It boils down to them creating an algorithm that finds the right time to start clustering in federated learning without needing any pre-set settings or hyperparameters >

Tom: Yeah, so the core idea is this clustering agnostic method can automatically detect when the global model starts to converge without you having to guess those tuning knobs >

Lu: What's interesting is how they base this on looking at the temperature function from a previous definition they used as a guide for their algorithm >

Meng: So, it’s checking if clustering has already happened and calculating some clustering temperature if not, and switching to actual clustering when that temperature measure gets higher than what we saw before >

Jane: It sounds like they are using the model's behavior itself to trigger the process rather than just following a fixed schedule or round count >

Tom: Right, it’s based on computing the cosine distance between client gradients and this temperature measure that signals convergence >

Lu: And they emphasize not looking at the absolute value of that temperature function, but how much it has changed compared to previous rounds, which is a relative change measure >

Jane: So for someone just listening, what does this actually mean for their work on federated learning models? Does it make things easier or harder >

Tom: It makes it easier because you can do reliable clustering right in the first rounds of training without specifying any hyperparameters at all >

Meng: But remember they only prove this is good in those early stages of training, so it’s not a guarantee for long-term stability when you scale up to real traffic >

Lu: And there's also this look into how local explanations work with GradCAM and how they relate to personalization and clustering results >

Jane: That's something that could really help us understand the connection between making models personalized for different users and where the clusters actually form >

Tom: So, we’ve seen how this clustering mechanism works, but we need to see if it holds up under more complex or long-running scenarios >

Maciej Krzysztof Zuziak, Roberto Pellungrini, Salvatore Rinzivillo

National Research Council of Italy

cs.LG, cs.AI

Submitted: 2025-09-01

Updated: 2026-11-24

Project page: https://mirkobunse.github.io/CriticalDifferenceDiagrams.jl/stable

License: http://creativecommons.org/licenses/by/4.0/

Importance score: 85/100

The gist: Federated Learning (FL) is a widespread and well-adopted paradigm of decentralised learning that allows training one model from multiple sources without the need to transfer data between…

Key concepts

Federated Learning (FL)
A decentralized learning paradigm where multiple clients train a single model using their local data without ever sharing the raw data itself. This allows for collaborative model training across distributed sources, promoting privacy.
One-Shot Clustered Federated Learning (OCFL)
A novel algorithm that performs clustering in FL automatically. It doesn't need prior knowledge of the cluster structure and instead triggers clustering when a calculated 'Clustering Temperature' surpasses a previously registered threshold, making it hyperparameter-free.
Clustering Temperature Function
A measure used by OCFL to detect when the federated model is starting to converge. It is based on calculating the cosine distance between client gradients and serves as the trigger for initiating the actual clustering process in FL.

Terminology

Summary

Federated Learning (FL) is a widespread and well-adopted paradigm of decentralised learning that allows training one model from multiple sources without the need to transfer data between participating clients directly. p. 0

Where the paper says it

it KDD Lab Scuola Normale di Pisa Pisa, PI 56126, Italy Salvatore Rinzivillo rinzivillo@isti. it KDD Lab National Research Council of Italy Pisa, PI 56127, Italy Abstract Federated Learning (FL) is a widespread and well-adopted paradigm of decentralised learning that allows training one model from multiple sources without the need to transfer data between participating clients directly.

<ref:2509.01587#pg1, Federated Learning (FL) is a widespread and well-adopted paradigm of decentralised learning that allows training one model from multiple sources without the need to transfer data between participating clients directly>. p. 0
Where the paper says it

it KDD Lab Scuola Normale di Pisa Pisa, PI 56126, Italy Salvatore Rinzivillo rinzivillo@isti. it KDD Lab National Research Council of Italy Pisa, PI 56127, Italy Abstract Federated Learning (FL) is a widespread and well-adopted paradigm of decentralised learning that allows training one model from multiple sources without the need to transfer data between participating clients directly.

One-Shot Clustered Federated Learning (OCFL), a clustering-agnostic algorithm that can automatically detect the earliest suitable moment for clustering, is presented as a novel approach to perform fast and reliable FL clustering. p. 0
Where the paper says it

Although a few remarkable works have been published in this domain, the problem remains largely unexplored, as its basic assumptions and settings differ slightly from those of standard FL. In this work, we present One-Shot Clustered Federated Learning (OCFL), a clustering-agnostic algorithm that can automatically detect the earliest suitable moment for clustering.

<ref:2509.01587#pg1, In this work, we present One-Shot Clustered Federated Learning (OCFL), a clustering-agnostic algorithm that can automatically detect the earliest suitable moment for clustering>. p. 0
Where the paper says it

Although a few remarkable works have been published in this domain, the problem remains largely unexplored, as its basic assumptions and settings differ slightly from those of standard FL. In this work, we present One-Shot Clustered Federated Learning (OCFL), a clustering-agnostic algorithm that can automatically detect the earliest suitable moment for clustering.

This work is significant because it proposes an algorithm that performs reliable clustering in the first rounds of training without specifying any hyperparameters. p. 1
Where the paper says it

We propose a clustering-agnostic algorithm that is free of any hyperparameters and clusters at the first sign of the (global) model’s convergence. Our approach, called OCFL, can be used to perform a reliable clustering in the first rounds of the training without the need to adjust either the number of clusters or the precise clustering criterion.

<ref:2509.01587#pg2, We propose a clustering-agnostic algorithm that is free of any hyperparameters and clusters at the first sign of the (global) model’s convergence >. p. 1
Where the paper says it

Moreover, we turned our attention to the scenario of medium heterogeneity, where the clients differ only slightly in data-generating distributions. We propose a clustering-agnostic algorithm that is free of any hyperparameters and clusters at the first sign of the (global) model’s convergence.

Algorithm Overview

The proposed OCFL algorithm is based on the empirical observations of the Temperature Function from Definition 7.<ref:2509.01587#pg9>. The algorithm proceeds by checking whether clustering was already performed and calculating the Clustering Temperature (Definition 7) if not, switching to actual clustering when this temperature exceeds the one previously registered. p. 9

Where the paper says it

The important highlight here is that one should not observe as much the absolute value of the Temperature Function defined in Definition 7, but its relative value with respect to previous rounds, i. 3 Clustering Procedure The proposed algorithm is based on the empirical observations of the Temperature Function from Definition 7.

<ref:2509.01587#pg13>.

Clustering Mechanism

The core of OCFL involves computing a cosine distance between gradients of the clients and a temperature measure that detects when the federated model starts to converge.<ref:2509.01587#pg1, Our algorithm is based on the computation of the cosine distance between gradients of the clients and a temperature measure that detects when the federated model starts to converge >. p. 0

Where the paper says it

In this work, we present One-Shot Clustered Federated Learning (OCFL), a clustering-agnostic algorithm that can automatically detect the earliest suitable moment for clustering. Our algorithm is based on the computation of the cosine distance between gradients of the clients and a temperature measure that detects when the federated model starts to converge.

The matrix Γ captures the learning divergence between the sampled nodes, and we define a Clustering Temperature Function in Definition 7. p. 9
Where the paper says it

: Γ(i,j) = Γ(j,i) = Cd(Θˆ i , Θˆ j ) = 1 − Cs(Θˆ i, Θˆ j ) = 1 − Θˆ i × Θˆ j ||Θˆ i||||Θˆ j || (8) Matrix Γ captures the learning divergence between the sampled nodes. To obtain a single-valued description of the current convergence progress, we define the Clustering Temperature Function in Definition 7.

<ref:2509.01587#pg10, This implies that one should not observe as much the absolute value of the Temperature Function defined in Definition 7, but its relative value with respect to previous rounds, i. p. 9
Where the paper says it

However, since cosine distance is always non-negative, we can also define λ = 1 Γmax as a Normalising Constant. The important highlight here is that one should not observe as much the absolute value of the Temperature Function defined in Definition 7, but its relative value with respect to previous rounds, i.

e. \Delta T >.

Empirical Evaluation

The methodology is empirically evaluated by testing various one-shot clustering algorithms for over forty different tasks on five benchmark datasets.<ref:2509.01587#pg1, Our experiments showcase the good performance of our approach when used to perform CFL in an automated manner without the need to adjust hyperparameters >. p. 0

Where the paper says it

We empirically evaluate our methodology by testing various one-shot clustering algorithms for over forty different tasks on five benchmark datasets. Our experiments showcase the good performance of our approach when used to perform CFL in an automated manner without the need to adjust hyperparameters.

We combine standard benchmark datasets (such as MNIST, FMNIST and CIFAR10) with more recent datasets from the medical domain (PathMNIST and BloodMNIST from MedMNIST). p. 2
Where the paper says it

Commencing our work on this paper, we were mainly interested in (a) generalisation of the large field of existing methods for CFL that act on gradients of cosine similarity calculated between weights (or gradients) of local models, (b) extending the set of those methods by a parameter-free algorithm that superior performance is empirically well-proven and (c) incorporating the explainability studies into that framework to advance further our knowledge about the impact of the personalisation on the behaviour of the local networks. Given our heavy emphasis on an empirical evaluation, we combined standard benchmark datasets (such as MNIST, FMNIST and CIFAR10) with more recent datasets from the medical domain (PathMNIST and BloodMNIST from MedMNIST).

<ref:2509.01587#pg3>.

Performance Insights

The empirical results indicate the high performance of the OCFL algorithm, especially when it is combined with density-based methods such as Meanshift or HDBSCAN.<ref:2509.01587#pg22>. The personalized F1-score (PF1) is visibly better for the family of OCFL methods, with particular emphasis on the high effectiveness of the OCFL-HDB.<ref:2509.01587#pg23, The baseline model is characterised by an F1-score between the range of 0. p. 1

Where the paper says it

(2017b) where the local models are trained locally, and the final (global) model is aggregated from the parameters of the local equivalents. Since the baseline FL algorithm has been introduced under the name of Federated Averaging (FedAvg), the field has undergone recent developments with algorithms such as Adaptive Federated Optimisation (FedOpt) (designed by Reddi et al.

24 (CIFAR10 dataset as illustrated in 2) and 0. p. 2
Where the paper says it

Commencing our work on this paper, we were mainly interested in (a) generalisation of the large field of existing methods for CFL that act on gradients of cosine similarity calculated between weights (or gradients) of local models, (b) extending the set of those methods by a parameter-free algorithm that superior performance is empirically well-proven and (c) incorporating the explainability studies into that framework to advance further our knowledge about the impact of the personalisation on the behaviour of the local networks. Given our heavy emphasis on an empirical evaluation, we combined standard benchmark datasets (such as MNIST, FMNIST and CIFAR10) with more recent datasets from the medical domain (PathMNIST and BloodMNIST from MedMNIST).

6 (for MNIST dataset) >. p. 2
Where the paper says it

Commencing our work on this paper, we were mainly interested in (a) generalisation of the large field of existing methods for CFL that act on gradients of cosine similarity calculated between weights (or gradients) of local models, (b) extending the set of those methods by a parameter-free algorithm that superior performance is empirically well-proven and (c) incorporating the explainability studies into that framework to advance further our knowledge about the impact of the personalisation on the behaviour of the local networks. Given our heavy emphasis on an empirical evaluation, we combined standard benchmark datasets (such as MNIST, FMNIST and CIFAR10) with more recent datasets from the medical domain (PathMNIST and BloodMNIST from MedMNIST).

Explainability Intersection

By inspecting the feasibility of local explanations generated with the help of GradCAM, we can provide more insights into the relationship between personalisation and the explainability of local predictions.<ref:2509.01587#pg1>. The saliency maps generated by models personalised by OCFL-KM, OCFL-MS or OCFL-HDBS tend to generate fewer artefacts - unexplainable highlights that seem not to contain any substantial part of the image relevant for classification. p. 0

Where the paper says it

Although a few remarkable works have been published in this domain, the problem remains largely unexplored, as its basic assumptions and settings differ slightly from those of standard FL. In this work, we present One-Shot Clustered Federated Learning (OCFL), a clustering-agnostic algorithm that can automatically detect the earliest suitable moment for clustering.

<ref:2509.01587#pg28>.

Limitations and Future Work

The asymptotic behaviour of the Temperature Function does not concern the OCFL algorithm to the same degree as the initial behaviour does.<ref:2509.01587#pg32>. Furthermore, a strong empirical proof of its necessity would be required for dimensionality reduction techniques because performance of K-Means, Mean Shift and HDBSCAN stays comparatively high while still employing the full set of provided gradients.<ref:2509.01587#pg32>.

Online Resources

The repository for all the numerical results can be accessed under the following link. p. 3

Where the paper says it

The GitHub repository with the code base for performing simulation can be found under the following link. The GitHub repository with all the relevant numerical results and code for generating plots.

<ref:2509.01587#pg44, There are two separate GitHub repositories associated with this paper >. p. 3
Where the paper says it

1 All the experiments and their visual representation can be re-created using code deposited at the GitHub Repository shared with this article. 2 Our paper is organised as follows: in Section 2 we indicate the literature most relevant to our work, in Section 3 we describe in detail our methodology, and in Section 4 we present our experimental evaluation with a detailed discussion on the results.

The second one contains code for recreating all the experiments as well as source code for experimenting with modified versions of the presented algorithms. p. 2
Where the paper says it

Publish a well-structured code repository that was used for experiments presented in this paper, that can be easily adapted for performing extended experiments in this regard. The work is heavily oriented towards empirical evaluation of the presented novel algorithms and a better understanding of the impact of personalisation on the local explainability.

<ref:2509.01587#pg44>. The repository for all the numerical results can be accessed under the following link.<ref:2509.01587#pg44>.

Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.

Improvements for AI systems

  1. Clustering-agnostic automatic detection of clustering moment: The system can automatically detect the earliest suitable moment for clustering by monitoring a Temperature Function and switching to actual clustering when it exceeds a threshold, which is based on observing whether the similarity of local gradients will decrease or rise before reaching a local minimum.

  2. High-efficiency personalization in early training rounds: The improved system can perform reliable clustering in the first rounds of the training without the need to adjust either the number of clusters or the precise clustering criterion, leading to better performance compared to State-of-the-Art CFL algorithms when combined with density-based clustering.

  3. Enhanced local explainability: By combining personalization and explainability, the system can provide more insights into the relationship between personalisation and the explainability of local predictions by inspecting local explanations generated with GradCAM, aiming for a better personalisation that delivers more precise and cohesive explanations on the local dataset.

  4. Robustness against hyperparameter tuning: The OCFL algorithm is designed to be free of hyperparameters, allowing it to perform clustering automatically, which avoids the impractical workflow of running all simulation splits required by methods like Sattler et al. (2021) for setting epsilon values.

  5. Superior clustering performance with density-based methods: When used with density-based algorithms such as HDBSCAN or Mean Shift, the system achieves better results in terms of clustering performance and personalisation while retaining comparable levels of generalisability, particularly on challenging data splits.

Abstract

Federated Learning (FL) is a widespread and well-adopted paradigm of decentralised learning that allows training one model from multiple sources without the need to transfer data between participating clients directly. Since its inception in 2016, it has been divided into numerous subfields that deal with application-specific issues, such as data heterogeneity or resource allocation. One such sub-field, Clustered Federated Learning (CFL), is dealing with the problem of clustering the population of clients into separate cohorts to deliver personalised models. Although a few remarkable works have been published in this domain, the problem remains largely unexplored, as its basic assumptions and settings differ slightly from those of standard FL. In this work, we present One-Shot Clustered Federated Learning (OCFL), a clustering-agnostic algorithm that can automatically detect the earliest suitable moment for clustering. We empirically evaluate our methodology by testing various one-shot clustering algorithms for over forty different tasks on five benchmark datasets. Our experiments showcase the good performance of our approach when used to perform CFL in an automated manner without the need to adjust hyperparameters. We also revisit the practical feasibility of CFL algorithms based on the gradients or weights of the clients, providing firm evidence of the high efficiency of density-based clustering methods when used to differentiate between the loss surfaces of neural networks trained on different distributions. Moreover, by inspecting the feasibility of local explanations generated with the help of GradCAM, we can provide more insights into the relationship between personalisation and the explainability of local predictions.

Sources

Related papers