Skip to main content
Advertisement
Browse Subject Areas
?

Click through the PLOS taxonomy to find articles in your field.

For more information about PLOS Subject Areas, click here.

  • Loading metrics

Federated parameter-free DBSCAN clustering and its application in image recognition

Abstract

DBSCAN (A Density-Based Algorithm for Discovering Clusters in Spatial Databases with Noise) is a classic clustering algorithm. However, clustering distributed data with privacy protection in edge computing environments is a key challenge for DBSCAN. In this research, we combine federated clustering and DBSCAN and propose two secure federated parameter-free DBSCAN clustering methods, called FDBSCAN and FDBSCAN++. The process involves the following steps: (1) differential privacy is applied to the client data and adaptive DBSCAN is used at each client to identify core points; (2) the clients send the extracted core points to the server, where the server aggregates these to obtain the final global cluster centers (FDBSCAN and FDBSCAN++ use different methods in this step); (3) the final clusters are generated using these global centers. To verify the effectiveness of the proposed two algorithms, we use eight real datasets, including the large-scale image dataset MNIST. Compared with traditional and state-of-the-art (SOTA) improved DBSCAN and federated clustering algorithms, the proposed algorithms achieve better clustering accuracy. In addition, we also apply FDBSCAN++ to image clustering and segmentation tasks, which achieves satisfactory results.

1. Introduction

DBSCAN is a classic density-based spatial clustering algorithm, which can partition areas of sufficiently high density into clusters and discover arbitrarily shaped clusters in spatial databases with noise [1]. DBSCAN is a powerful tool that is applied in many applications, such as industrial applications [2], analysis of ship traffic behavior [3], market analysis [4], medical data processing [5], urban construction planning [6], network security, remote sensing, etc. Many scholars have proposed different improved algorithms, such as parameter optimization, identification and processing of clusters with different densities, big data processing, high-dimensional data processing, and optimization for specific application scenarios.

With the rapid development of edge intelligence and mobile Internet, clustering algorithms have encountered new problems: how to perform clustering distributed data under the condition of privacy protection? DBSCAN also faces this problem, which is the motivation of our research. We try to make DBSCAN clustering for distributed data under privacy requirements.

An emerging clustering framework provides the answer, namely secure federated clustering as shown in Fig 1: Each client uploads the desensitized data to the server, and the server sends the processed results to each client. Each client forms the final clusters based on the received results [7,8].

thumbnail
Fig 1. The framework of secure federated clustering: All clients collaboratively generate the final clustering results without leaking the original data.

https://doi.org/10.1371/journal.pone.0355161.g001

Based on this idea, we propose two kinds of secure federated parameter-free DBSCAN clustering, namely FDBSCAN and FDBSCAN++, with two different global cluster center generation strategies. Specifically, in the client, we use differential privacy to encrypt the raw data, ensuring that it will not be leaked in subsequent calculations. Based on the encrypted data, we construct a parameter free DBSCAN clustering algorithm, which can be run by any data party without adjusting parameters. Then, the client uploads the core points obtained from DBSCAN to the server. The server aggregates all the core points and uses two different methods to obtain the global class center, one is local density calculation (in FDBSCAN) and the other is k-means clustering algorithm (in FDBSCAN++). Finally, the server sends the global class to each client, and the client assigns the local raw data to the nearest global class center to form the final clustering results. The main contributions of this research are as follows:

  • We propose the first secure federated DBSCAN clustering framework and achieved satisfactory clustering results.
  • We propose an adaptive DBSCAN clustering algorithm that utilizes other clustering algorithms to construct pseudo labels, helping DBSCAN find better parameter values.

The rest of this paper is organized as follows. We report the related work on DBSCAN in Section 2. We introduce the proposed method FDBSCAN in Section 3, and FDBSCAN++ in Section 4. In Section 5, we perform extensive experiments to compare the proposed methods with thirteen benchmark models and discuss the results. Finally, in Section 6, we conclude our paper and explore future work.

2. Related work

DBSCAN has two parameters: Eps: The maximum distance between two points for them to be considered neighbors. minPts: The minimum number of points required to form a dense region (cluster). DBSCAN defines three kinds of data points: A point is a core point if it has at least minPts points within its Eps-neighborhood (including itself). A border point has fewer than minPts within Eps but is reachable from a core point. A noise point is neither a core nor a border point. Algorithm Process is as follows: Step 1: Start with an arbitrary unvisited point. Step 2: Retrieve all points within its Eps-neighborhood. If it is larger than minPts neighbors, form a new cluster. If not, mark it as noise (may be reassigned later as a border point). Step 3: For each core point, expand the cluster: Add all directly reachable points (within Eps) to the cluster. Recursively process new core points to include their neighbors (density-connected points). Step 4: Repeat until all points are visited (classified into clusters or marked as noise).

Most algorithms improve DBSCAN from the following five perspectives:

  1. (1) Parameter optimization. Zhang et al. leveraged the whale optimization algorithm’s global search capability and rapid convergence properties to automatically determine optimal parameters, thereby reducing parameter sensitivity [9]. Regarding the issue of difficult automatic determination of parameters, Starczewski et al. automatically determine parameters based on data features, which reduces user intervention in parameter selection [10]. Zhang et al. proposed the automated DBSCAN parameter search framework DRL-DBSCAN guided by deep reinforcement learning to reduce dependence on expert knowledge. Based on a small number of external clusters indices, rewards were constructed to enable DRL agents to learn the optimal parameter search strategy that adapts to different data distributions [11].
  2. (2) Identify clusters with different densities. Hu et al. improved DBSCAN based on hybrid algorithms, cleverly utilizing reverse nearest neighbors and influence space to identify core objects, thereby achieving effective processing of clustering with different densities [12].
  3. (3) Clustering big data. Hanafi et al. proposed a fast DBSCAN algorithm based on reducing computational complexity, which uses local datasets (operational datasets) to reduce computational complexity and reduces distance calculations by limiting the search space [13]. Weng et al. improved the h-DBSCAN algorithm based on hierarchical search technology, using hierarchical navigable small world (HNSW) technology to optimize search efficiency and reduce unnecessary Eps-neighborhood queries [14].
  4. (4) Clustering high-dimensional data. Braune et al. proposed black hole clustering and protoclustering methods based on reducing parameter adjustments and optimizing high-dimensional data. These methods aim to reduce the need for parameter adjustments while optimizing the clustering effect of high-dimensional data [15]. Li et al. proposed an improved DBSCAN algorithm based on neighborhood similarity and retrieval efficiency considerations. It utilizes neighborhood similarity to reduce redundant distance calculations and uses a cover tree to improve retrieval efficiency, avoiding treating all dimensions equally [16].
  5. (5) Specific application scenario optimization. Jin et al. proposed a variable scale HCA-DBSCAN method for detecting anomalies in multidimensional energy data in the steel industry [2]. Wei et al. proposed an algorithm that combines multidimensional dynamic time warping (MDDTW) and adaptive DBSCAN based on the demand for pattern recognition of marine traffic behavior [3].

Unlike previous work, in this research, we focus on a new problem of DBSCAN: how to clustering distributed data under privacy requirements? To address this issue, we propose a federated DBSCAN. In addition, we propose an adaptive DBSCAN to avoid human intervention at the clients.

3. FDBSCAN: A federated parameter-free DBSCAN clustering algorithm

FDBSCAN consists of three steps: (1) protect local data of clients by using differential privacy, and use adaptive DBSCAN to get core points at the clients; (2) obtain the final global centers at the server; (3) final clusters generation.

3.1. Protect local data of client by using differential privacy

Differential privacy is a data protection method with a rigorous mathematical foundation [17]. The main definitions are as follows:

Definition 1: -Differential privacy. For a random algorithm M and two adjacent datasets D and with only one different record [18], the algorithm M meets differential privacy if it satisfies the following formula:

(1)

where denotes the probability of an event, S denotes the results of M, and denotes the privacy budget.

Definition 2: Global sensitivity. For a query function f() and two adjacent datasets D and , global sensitivity is defined as , where denotes the L1-norm, denotes the difference degree in query results between two datasets D and . Actually, in this research, f() denotes a clustering algorithm, because the difference of clustering D and equals 1.

Definition 3: Laplacian mechanism. M(D) is the function with Laplacian noise, then , where denotes random Laplacian noises generated by Laplacian distribution: .

In practical applications, the value of is set randomly, and the value of is set to zero. The main implementation mechanism of differential privacy is to add Laplacian noise to the data, and in this paper, we also take the same operation.

The specific approach is as follows: Based on previous definitions, we can use Laplacian noises to protect raw data in each client (totally clients), global sensitivity in most clustering algorithm, and we also set it to 1 in FDBSCAN. Specifically, For local data in client , we add Laplacian noises to , and the privacy data is defined as:

(2)

Subsequent calculations only utilize private data rather than raw data. In the process of data exchange between the client and server, even if the exchanged information is leaked, it will not result in the leakage of raw data.

3.2. Adaptive DBSCAN at the clients

Neural networks use labels and prediction results to construct an objective function that solves for the most parameterized set (weights) in order to achieve better classification accuracy. Taking inspiration from this, we construct a neural network-like objective function to solve for better DBSCAN parameters: Eps and minPts as follows:

(3)

where g() denotes the objective function, f() denotes clustering results generated by DBSCAN, denotes pseudo label, and denotes parameter Eps and minPts.

When the amount of shared information between clustering results and pseudo labels is greater, the clustering results may be better, and we can obtain a better set of parameters. Based on the above ideas, we use the Adjusted Rand Index (ARI) as a tool to measure the amount of shared information as follows:

(4)(5)(6)(7)

where all the datasets are divided into r clusters according to ground-truth labels and t clusters according to clustering algorithm, n denotes the number of data points, and .

To explain this equation, we give an example, there are six samples, according to the label, they are divided into two clusters: A (1,2,3) and B (4,5,6), according to the clustering results, they are divided into two clusters: C (1,2,4) and D (3,5,6). Any two data points and form a sample pair, the number of sample pairs is . Based on (A,B) and (C,D), we can construct a contingency table. , similarly, , , . Then, . , , . Thus,

Another issue is how to obtain pseudo-labels. We use the k-means clustering algorithm to generate pseudo labels. K-means has a parameter, i.e., the number of clusters, we set it to . Thus, we can obtain the final objective function:

(8)

To solve this objective function, we take two steps: (1) optimizing parameter Eps while fixing parameter minPts, (2) optimizing parameter minPts while fixing parameter Eps.

We first optimize parameter minPts while fixing parameter Eps, the best value of minPts () can be obtained by

(9)

then, we optimize parameter Eps while fixing parameter minPts, the best value of Eps () can be obtained by

(10)

By using the above two formulas, the optimal Eps and minPts can be iteratively solved. The specific solving process is shown in the algorithm 1.

Algorithm 1: the process of solving Formula (8).

After obtaining superior values of parameter Eps, minPts, we can get the core points (cp) by DBSCAN(Eps_b,minPts_b), core points are defined by DBSCAN. Each client uploads core points to the server.

3.3. Obtain the final global centers at the server

The server aggregates the core points from all the clients (CP), and we use the following method to obtain the final global centers (center) as follows:

For a dataset , , the SNN of any two data points and is defined as follows: where and denote k nearest neighbors of and , respectively. If the value of is bigger, it means and have more common neighbors. We use sim to describe the structural similarity between two data points and . The is defined as follows:

(11)

where and are Euclidean distance.

The local density of is defined as follows: , the related distance of data point is defined as follows: We use a variable to select cluster centers as follows: , where and denotes the local density and relative distance of data point i, respectively. Then, the top k data points with large values are selected as final centers.

3.4. Final clusters generation

After obtaining the global cluster center, all the clients assign the raw data to the nearest global cluster center to form the final clusters. The whole process of FDBSCAN is shown in Algorithm 2.

Algorithm 2: The proposed FDBSCAN algorithm

3.5. Remarks about the proposed FDBSCAN

Time Complexity: See the Algorithm 2, for line 3, adding Laplace noises has O(n) time. For line 4, adaptive DBSCAN needs O(n2) time, see the Algorithm 1, we use a double for loop to automatically find the optimal parameter values, but the number of times each loop is executed is limited. Generally speaking, we often set (step length is 0.1), (step length is 1), the Algorithm 1 has , where p is a constant. Thus, in the Algorithm 2, lines 1–5 have O(n2) time. Lines 7–11 have O(n2) time, because and are based on which has O(n2) time. Lines 12–15 have O(n) time because each data point is visited only once. In short, the time complexity of FDBSCAN is .

Privacy–utility Trade-offs: We utilize differential privacy to safeguard the client’s raw data. Differential privacy is a prevalent privacy protection technique frequently employed in the protection of clustering algorithms, as proved in our prior work [7,8]. The specific implementation method is to add Laplacian noise to the original data as shown in Equation (2), we use encrypted raw data to calculate core points, and upload the core points to the server, no client can infer the raw data of other clients through uploaded core points even if the server is untrustworthy.

In the proposed algorithm, we first encrypt local data via differential privacy. Within the range of , the privacy budget can achieve favorable privacy protection performance. Specifically, the optimal clustering performance is obtained when the privacy budget is set to 1.

Our work adopts Laplacian mechanism for differential privacy, where the perturbed data is defined as with global sensitivity . There exists an inherent trade-off between privacy protection and clustering utility controlled by :

  • When : Large Laplacian noise severely distorts original data. Although privacy leakage risk is minimized, the extracted core points deviate far from real data density distribution, resulting in poor ARI and NMI.
  • When : Noise amplitude approaches zero, and clustering performance reaches the upper bound. However, differential privacy protection fails completely, and adversaries can infer raw features from uploaded core points.
  • When : It achieves a balanced equilibrium. As validated by our parameter sensitivity experiments (Fig 4), strikes the optimal balance across all eight datasets. Mathematically, with , moderate noise intensity under effectively resists single-sample inference attacks without excessive distortion of data density structures.

We add targeted configuration rules for three typical application scenarios involved in our paper: For medical data clustering (Heart, Breast datasets, high privacy demand), we recommend . Slight performance loss is acceptable to strictly prevent leakage of sensitive patient information. For general image recognition tasks (MNIST, USPS, Olivetti face dataset), the default is suitable. It balances privacy security and clustering accuracy for image clustering, segmentation and face recognition. For public geographic resource datasets (Covertype, Abalone, low privacy risk), we suggest . Less noise interference is introduced to maximize clustering performance with negligible privacy threats.

Parameters: FDBSCAN has only one parameter, i.e., the number of global centers called k. In addition, in the process of privacy protection, the differential privacy method has a parameter privacy budget , but we set it to for all the situations, which is a fixed value.

4. FDBSCAN++

Based on FDBSCAN, we propose a new FDBSCAN++. FDBSCAN has four steps, for FDBSCAN++, only the third step is different from FDBSCAN. For the third step, the server aggregates the core points from all the clients (CP), and we use k-means to obtain the final global centers (center) as follows:

(12)

where k is a user-defined parameter.

The core points calculation of the client is based on encrypted data (), and even if there are security risks at the server, the original data will not be leaked. Finally, the server sends the final global centers (center) to each client.

This step has only O(n) time. The time complexity of the third step of FDBSCAN++ is one order of magnitude lower than that of the third step of FDBSCAN.

Classical improved DBSCAN baselines (HDBSCAN, aNNE-DBSCAN, MDBSCAN, etc.) adopt centralized computing frameworks, which require all raw data to be collected on a single machine. For large-scale datasets including MNIST and Covertype (over 580,000 samples), global neighborhood searching and pairwise distance calculation bring quadratic computational and memory complexity, inevitably leading to memory overflow (marked as NaN in our experimental tables).

In contrast, our federated framework partitions raw data across multiple clients. Each client executes lightweight adaptive DBSCAN on local differentially private data and only uploads compact core points rather than complete raw samples. The server merely aggregates a small set of core points, which drastically reduces computation and storage overhead. This structural design theoretically guarantees stable clustering on massive datasets, an advantage that centralized DBSCAN variants cannot possess.

Standard DBSCAN and its improved variants rely heavily on manual tuning of Eps and minPts; inappropriate parameter settings severely degrade clustering performance. Our adaptive DBSCAN generates pseudo-labels via K-means and iteratively optimizes Eps and minPts by maximizing the Adjusted Rand Index (ARI) without human intervention.

Theoretically, ARI quantitatively measures the consistency between density clustering outputs and the intrinsic category distribution of raw data. Optimizing ARI guarantees that extracted core points accurately reflect the true local density structure, laying a high-quality foundation for subsequent global aggregation. Existing federated clustering baselines (k-FED, MUFC, SFK) only adopt partition-based K-means locally and ignore density features, making them incapable of capturing arbitrarily shaped clusters and leading to inherent performance gaps.

FDBSCAN: Global cluster centers are selected via , where local density and relative distance are computed based on shared nearest neighbor (SNN) structural similarity. This density-aware center selection conforms to the core logic of DBSCAN and naturally adapts to datasets with uneven density distribution, while federated K-means variants lack density perception capability.

FDBSCAN++: The O(n2) SNN-based density screening is replaced by lightweight K-means aggregation over uploaded core points, reducing the server-side time complexity to O(n). Meanwhile, core points uploaded from clients retain complete local density information. Other federated clustering algorithms aggregate ordinary local centroids without filtering noise and border points, which disturbs global center selection and deteriorates final clustering accuracy.

5. Experiments and discussions

In this section, we use extensive datasets to comprehensively evaluate the proposed FDBSCAN and FDBSCAN++ with five real-world UCI datasets: Iris, Seeds, Heart, Abalone, and Breast, and they are small datasets. We also use three large-scale datasets: USPS, Covertype, and MNIST, and we use the UMAP algorithm to reduce them to two dimensions. The features of all the datasets used in this paper are shown in Table 1.

In addition, we also apply the FDBSCAN++ to image clustering and segmentation tasks, which achieves satisfactory results.

The datasets used in this paper are not federated datasets, we change traditional datasets into federated datasets using the method described in the paper [8], which is a popular way as shown in Algorithm 3. In addition, we set the number of clients .

Algorithm 3: The details of generating federated datasets

5.1. Benchmarking models

We compare FDBSCAN and FDBSCAN++ with six DBSCAN-related benchmarking models: DBSCAN [1], HDBSCAN [19], aNNE-DBSCAN (abbreviated as aNNE) [20], AMD-DBSCAN (abbreviated as AMD) [21], ST-DBSCAN (abbreviated as ST) [22], and MDBSCAN [23].

  • DBSCAN was published in KDD 1996, it is a well-known density-based clustering algorithm.
  • HDBSCAN and ST-DBSCAN are classical improved DBSCAN;
  • aNNE-DBSCAN was published in AAAI 2019;
  • AMD-DBSCAN was published in DSAA 2022;
  • MDBSCAN was published in 2024.

The first three are classic algorithms, and the last two are SOTA DBSCAN extensions.

The federated clustering is an emerging field, and open-sourced code is very rare. In this research, we compare the proposed methods with three well-known algorithms: k-FED [24], MUFC [25] and SFK [8]:

  • k-FED. A SOTA method of federated clustering algorithm published in ICML 2021 [24]. Its parameters are k (k of k-means at the server) and kprime (the number of uploaded centers);
  • MUFC. Another SOTA method of federated clustering algorithm published in ICLR 2023 [25]. Its parameters are k (k of k-means at the server) and kprime (the number of uploaded centers);
  • SFK. It is a SOTA federated k-means clustering algorithm published in TNNLS 2025 [8], it has three parameters: ().

Many papers improved DBSCAN or use DBSCAN to solve some problems, but there are very few papers involving open-source codes, we try our best to search for an improved DBSCAN with codes (MATLAB or PYTHON). The code of our method can be downloaded from https://github.com/DZLONG0712/FDBSCAN, and anyone can download data from https://github.com/mlyizhang/Clustering-Datasets.

5.2. Evaluation Index

We use two common evaluation metrics, ARI and NMI, to evaluate all clustering results. For these two evaluation metrics, the higher the value, the higher the performance of the clustering algorithm. We test all algorithms using a unified hardware environment, i7-10750H CPU, 16.0GB RAM, and 64-bit Windows operating system, and we use PyCharm 2025 to implement FDBSCAN.

5.3. Comparing with DBSCAN-related clustering algorithms

In this paper, we compare FDBSCAN and FDBSCAN++ with previous baselines, including DBSCAN, HDBSCAN, aNNE, AMD, ST, and MDBSCAN. See Table 2, for eight real-world datasets, FDBSCAN++ achieves the best clustering results based on ARI and NMI scores and FDBSCAN obtain the optimal results in most cases. Especially for large-scale datasets USPS, Covertype, and MNIST, FDBSCAN and FDBSCAN++ achieve the highest scores, other improved DBSCAN methods aNNE, AMD, ST, and MDBSCAN do not obtain clustering results because they have high time complexity and have a memory explosion issue in our hardware environment (16.0 GB RAM). It can be seen that FDBSCAN and FDBSCAN++ have unique advantages in large-scale dataset clustering tasks, which is also the benefit brought by the distributed computing of the federated clustering framework.

thumbnail
Table 2. Comparison Between the proposed two methods and DBSCAN-related Work on Eight Datasets. Parameter values are in parentheses, the best clustering results are highlighted in bold, the suboptimal results are underlined and NaN denotes out of memory.

https://doi.org/10.1371/journal.pone.0355161.t002

5.4. Comparing with SOTA federated clustering algorithms

In this section, we compare the proposed methods with three SOTA federated clustering algorithms: k-FED, MUFC, and SFK. As shown in Table 3, for all the used datasets, the two proposed algorithms perform better than k-FED, MUFC, and SFK with a very significant advantage in most cases.

thumbnail
Table 3. Comparison Between the proposed two methods and SOTA federated clustering on Eight Datasets. Parameter values are in parentheses, the best clustering results are highlighted in bold, and the suboptimal results are underlined.

https://doi.org/10.1371/journal.pone.0355161.t003

Given the stochastic nature of clustering and federated setups, repeated experiments and robustness analysis are essential to validate the claimed improvements, we make 3000 times experiments and report the clustering results with mean standard deviation as shown in Table 4. Compared with existing methods, the proposed method still has an advantage.

thumbnail
Table 4. Clustering results of 3000 experiments.

https://doi.org/10.1371/journal.pone.0355161.t004

5.5. Parameter sensitivity experiment for FDBSCAN++

To illustrate the impact of various parameters on the clustering results of FDBSCAN++, we conduct a large number of parameter sensitivity experiments. FDBSCAN++ has one parameter k (the number of global centers, i.e., the number of final clusters). In addition, during the experiments, we use fixed values for two important variables. However, we still conduct sensitivity tests to demonstrate their impact on the clustering results: the number of clients and the privacy budget . The specific experimental results are as follows:

Parameter k: The influence of parameters k on clustering results is shown in Fig 2. According to the experimental results, there is no clear pattern in the influence between parameters and clustering results.

thumbnail
Fig 2. The influence of parameter k on clustering results using FDBSCAN++.

https://doi.org/10.1371/journal.pone.0355161.g002

The number of clients : The influence of on clustering results is shown in Fig 3. According to the experimental results, there is no clear pattern in the influence between the number of clients and clustering results.

thumbnail
Fig 3. The influence of on clustering results using FDBSCAN++.

https://doi.org/10.1371/journal.pone.0355161.g003

Privacy budget : The influence of on clustering results is shown in Fig 4. According to the experimental results, there is no clear pattern in the influence between privacy budget and clustering results.

thumbnail
Fig 4. The influence of on clustering results using FDBSCAN++.

https://doi.org/10.1371/journal.pone.0355161.g004

Based on the sensitivity analysis of the above parameters, the settings of these parameters should be continuously adjusted according to the actual situation. The number of clients depends on how many terminals participate in the federated clustering system, and the privacy budget is generally fixed. And the parameter k can be continuously adjusted based on the final clustering results.

5.6. Analysis of communication costs

FDBSCAN and FDBSCAN++ just need one round of communication. In addition, the communication information between the client and server sides is cluster centers, and the communication volume is much smaller than the client data. The complexity of communication time is O(n).

5.7. Statistical significance test results

We adopt the Wilcoxon signed-rank one-tailed test to conduct statistical significance analysis on ARI and NMI metrics. As shown in Table 5, all obtained P-values are less than 0.05, which fully verifies that the proposed FDBSCAN++ achieves statistically significant performance improvements compared with all traditional clustering algorithms and state-of-the-art federated clustering methods. Most P-values are lower than 0.01, further demonstrating that the superiority of FDBSCAN++ is extremely remarkable and stable across different evaluation indicators.

thumbnail
Table 5. Statistical significance test results between FDBSCAN++ and comparison methods.

https://doi.org/10.1371/journal.pone.0355161.t005

5.8. Application of FDBSCAN++ in facial recognition

We apply FDBSCAN++ to the face clustering task on the Olivetti face dataset. As shown in Table 6, FDBSCAN++ achieved good clustering results, accurately grouping the faces of five people into one cluster.

thumbnail
Table 6. The clustering results of the Olivetti face dataset.

https://doi.org/10.1371/journal.pone.0355161.t006

5.9. Application of FDBSCAN++ in image segmentation

We apply FDBSCAN++ to the image segmentation task on four images: deer, lake, flower, and land. As shown in Fig 5, FDBSCAN++ achieved good results, accurately dividing the image into different parts based on semantic features, and the semantics of each part are relatively complete.

thumbnail
Fig 5. Original images and their segmentation results using FDBSCAN++.

Note that all images are taken by the authors themselves and do not require permission from any individual or organization for use.

https://doi.org/10.1371/journal.pone.0355161.g005

6. Conclusion and future work

In this paper, we propose two new DBSCAN clustering algorithms combining privacy protection and distributed computing based on a federated clustering framework, called FDBSCAN and FDBSCAN++. In the proposed methods, we also propose an adaptive DBSCAN clustering algorithm that utilizes other clustering algorithms to construct pseudo labels, helping DBSCAN find better parameter values. For traditional DBSCAN and its improved algorithms, large-scale data clustering has always been a challenge. For example, traditional improved DBSCAN algorithms struggle to handle MNIST datasets or data volumes of over 100,000. Our proposed FDBSCAN algorithm can easily cluster large-scale datasets (with Covertype containing 580,000 data points). We combine federated clustering with DBSCAN for the first time to achieve the above results.

In the future, we will conduct in-depth research on feature learning algorithms based on large language models, using language models to assist in learning the features of large-scale complex images, and establish a more universal federated density clustering algorithm.

Acknowledgments

We thank the reviewers for their valuable comments.

References

  1. 1. Ester M, Kriegel HP, Sander J, Xu X, et al. A density-based algorithm for discovering clusters in large spatial databases with noise. KDD. 1996;96:226–31.
  2. 2. Jin F, Wu H, Liu Y, Zhao J, Wang W. Varying-scale HCA-DBSCAN-based anomaly detection method for multi-dimensional energy data in steel industry. Inform Sci. 2023;647:119479.
  3. 3. Wei Z, Gao Y, Zhang X, Li X, Han Z. Adaptive marine traffic behaviour pattern recognition based on multidimensional dynamic time warping and DBSCAN algorithm. Exp Syst Appl. 2024;238:122229.
  4. 4. Liu C, Cao Y. Task re-pricing model based on density-based spatial clustering of applications. Appl Soft Comput. 2020;96:106608.
  5. 5. Li J, Tobore I, Liu Y, Kandwal A, Wang L, Nie Z. Non-invasive monitoring of three glucose ranges based on ECG by using DBSCAN-CNN. IEEE J Biomed Health Inform. 2021;25(9):3340–50. pmid:33848252
  6. 6. Zhang H, Duan Z, Zheng N, Li Y, Zeng Y, Shi W. An Efficient Class-Constrained DBSCAN Approach for Large-Scale Point Cloud Clustering. IEEE J Sel Top Appl Earth Observations Remote Sensing. 2022;15:7323–32.
  7. 7. Wang Y, Pang W, Pedrycz W. One-shot federated clustering based on stable distance relationships. IEEE Trans Ind Inform. 2024;20:13262–72.
  8. 8. Wang Y, Pang W, Wang D, Pedrycz W. One-shot secure federated K-means clustering based on density cores. IEEE Trans Neural Netw Learn Syst. 2025;36(8):14131–43. pmid:40100659
  9. 9. Zhang X, Zhou S. WOA-DBSCAN: application of whale optimization algorithm in DBSCAN parameter adaption. IEEE Access. 2023;11:91861–78.
  10. 10. Starczewski A, Goetzen P, Er MJ. A new method for automatic determining of the DBSCAN parameters. J Artif Intell Soft Comput Res. 2020;10(3):209–21.
  11. 11. Zhang R, Peng H, Dou Y, Wu J, Sun Q, Li Y, et al. Automating DBSCAN via deep reinforcement learning. In: Proceedings of the 31st acm international conference on information & knowledge management; 2022. pp. 2620–30.
  12. 12. Hu L, Liu H, Zhang J, Liu A. KR-DBSCAN: A density-based clustering algorithm based on reverse nearest neighbor and influence space. Exp Syst Appl. 2021;186:115763.
  13. 13. Hanafi N, Saadatfar H. A fast DBSCAN algorithm for big data based on efficient density calculation. Exp Syst Appl. 2022;203:117501.
  14. 14. Weng S, Gou J, Fan Z. h -DBSCAN: A simple fast DBSCAN algorithm for big data. In: Asian conference on machine learning. PMLR; 2021. pp. 81–96.
  15. 15. Braune C, Besecke S, Kruse R. Density based clustering: alternatives to DBSCAN. Partitional Clustering Algorithms. 2015; pp. 193–213.
  16. 16. Li S-S. An Improved DBSCAN algorithm based on the neighbor similarity and fast nearest neighbor query. IEEE Access. 2020;8:47468–76.
  17. 17. Friedman A, Schuster A. Data mining with differential privacy. In: Proceedings of the 16th ACM SIGKDD international conference on Knowledge discovery and data mining. 2010. pp. 493–502.
  18. 18. Gu C, Cui X, Zhu X, Hu D. FL2DP: privacy-preserving federated learning via differential privacy for artificial IoT. IEEE Trans Ind Inf. 2024;20(4):5100–11.
  19. 19. Campello RJGB, Moulavi D, Zimek A, Sander J. Hierarchical density estimates for data clustering, visualization, and outlier detection. ACM Trans Knowl Discov Data. 2015;10(1):1–51.
  20. 20. Qin X, Ting KM, Zhu Y, Lee VC. Nearest-neighbour-induced isolation similarity and its impact on density-based clustering. AAAI. 2019;33(01):4755–62.
  21. 21. Wang Z, Ye Z, Du Y, Mao Y, Liu Y, Wu Z, et al. AMD-DBSCAN: An Adaptive Multi-density DBSCAN for datasets of extremely variable density. In: 2022 IEEE 9th International Conference on Data Science and Advanced Analytics (DSAA). IEEE; 2022. pp. 1–10.
  22. 22. Birant D, Kut A. ST-DBSCAN: An algorithm for clustering spatial–temporal data. Data Knowl Engi. 2007;60(1):208–21.
  23. 23. Qian J, Zhou Y, Han X, Wang Y. MDBSCAN: A multi-density DBSCAN based on relative density. Neurocomputing. 2024;576:127329.
  24. 24. Dennis DK, Li T, Smith V. Heterogeneity for the win: One-shot federated clustering. In: International conference on machine learning. PMLR; 2021. pp. 2611–20.
  25. 25. Pan C, Sima J, Prakash S, Rana V, Milenkovic O. Machine Unlearning of Federated Clusters. In: The Eleventh International Conference on Learning Representations.