A fuzzy spectral clustering algorithm for hyperspectral image classiﬁcation

Spectral clustering is an unsupervised clustering algorithm, and is widely used in the ﬁeld of pattern recognition and computer vision due to its good clustering performance. However, the traditional spectral clustering algorithm is not suitable for large-scale data classiﬁcation, such as hyperspectral remote sensing image, because of its high computational complexity, and it is difﬁcult to characterize the inherent uncertainty of the hyperspectral remote sensing image. This paper uses fuzzy anchors to process hyperspectral image classiﬁcation and proposes a novel spectral clustering algorithm based on fuzzy similarity measure. The proposed algorithm utilizes the fuzzy similarity measure to obtain the similarity between the data points and the anchors, and then gets the similarity matrix. Finally, spectral clustering is performed on the similarity matrix to compute the classiﬁcation results. The experimental results on the hyperspectral remote sensing image data sets have demonstrated the effectiveness of the proposed algorithm, and the introduction of fuzzy similarity measure gives rise to a more robust similarity matrix. Compared with existing methods, the proposed algorithm has a better classiﬁcation result on the hyperspectral remote sensing image, and the kappa coefﬁcient obtained by the proposed algorithm is 2% higher than the traditional algorithms.


INTRODUCTION
With the development of remote sensing technology, the application of hyperspectral remote sensing image has become more and more extensive. The accurately segmentation ground features through hyperspectral remote sensing image has received widespread attention. Over the past few years, unsupervised learning played an important role in the field of hyperspectral image classification because it did not need labels and did not have the problem of labelling error. As a typical method, spectral clustering algorithm [1] has been widely used in medical image analysis [2,3], traffic forecasting [4], image segmentation [5][6][7], and other fields [8,9] due to its good performance of multi-morphological spatial clustering and convergence to the global optimal solution. The traditional spectral clustering algorithm, however, focuses on clustering accuracy whereas ignores the underlying computational complexity and memory requirements for constructing the similarity matrix and computing eigenvectors. Therefore, it is dif-This is an open access article under the terms of the Creative Commons Attribution License, which permits use, distribution and reproduction in any medium, provided the original work is properly cited. © 2021 The Authors. IET Image Processing published by John Wiley & Sons Ltd on behalf of The Institution of Engineering and Technology ficult to be directly applied to large-scale data, such as hyperspectral remote sensing image classification [10,11]. Meanwhile, anchor graph provides a better solution. Zhao et al. [12] proposed a fast spectral clustering for unsupervised hyperspectral remote sensing image classification. The proposed algorithm introduced two techniques based on Nyström extension and anchor graph [13] to construct the similarity matrix. Moreover, it utilized multiplicative update optimization to replace the eigenvector decomposition of the traditional spectral clustering algorithm. Wang et al. [14] introduced a fast spectral clustering algorithm based on the structure of anchor graph. The anchor graph was constructed by combining spectral and spatial information, which improved the performance of spectral clustering algorithm. However, the selection of anchors in the above algorithms was based on random selection, which lacked sufficient stability. Hassanzadeh et al. [15] used mini-batch kmeans to select anchors to improve the stability of anchor's selection. However, this algorithm used the Gaussian kernel to capture data affinities, which was difficult to characterize the fuzziness and uncertainty of hyperspectral remote sensing image.
For the hyperspectral remote sensing image, the distribution of different individual grey values of the same features are irregular and has large differences, that is uncertainty within the class; the spectral boundary between different types of features becomes smaller and even overlaps, that is fuzziness between classes. The classification performance of the spectral clustering algorithm based on the similarity matrix is extremely sensitive to the similarity of the data points. Therefore, we propose a fuzzy similarity measure spectral clustering (FSMSC) algorithm by constructing a stable and efficient similarity matrix to efficiently deal with the hyperspectral remote sensing image classification. First, the fuzzy similarity measure can describe the fuzziness and uncertainty of the hyperspectral remote sensing image better compared with the Gaussian kernel method. Then, in contrast to the method of selecting anchors randomly, FSMSC algorithm can obtain uniform and more representative anchors. FSMSC algorithm combines fuzzy similarity measure and robust anchor graph structure, which overcomes the computational complexity of traditional spectral clustering algorithm and improves the performance.

Anchor graph construction
FSMSC utilizes a fuzzy similarity between data points and anchors to replace the similarity between all data points when constructing the similarity matrix. Given a set of data points X = [x 1 , x 2 … , x n ] T ∈ ℝ n×d , where n is the number of data points, x n is the nth sample point, and d is the dimension of features. The method utilizes a fuzzy similarity measure index to select p anchors from data points. Furthermore, it constructs a n × p similarity matrix instead of the traditional n × n similarity matrix, where p ≪ n. Therefore, the spectral clustering method based on the anchor graph has reduced the computational complexity and dimensions of the similarity matrix [16].

Fuzzy similarity measure
In spectral clustering algorithm, the similarity matrix Z needs to be established to obtain the Laplacian matrix L. Some popular algorithms [15,16] utilized Gaussian kernel to calculate the similarity between data points and anchors, which can be defined as follows: where c j is the jth anchor, p is the number of anchors, and z i j represents the similarity of the ith data point to the jth anchor.
). However, utilizing Gaussian kernel method to obtain the similarity matrix can-not characterize the fuzziness and uncertainty of hyperspectral remote sensing images.
Fuzzy clustering [17] provides a more flexible clustering result than hard clustering. Data points can be grouped into each cluster with a fuzzy membership and the fuzzy similarity can describe the ambiguity and uncertainty of hyperspectral data better. Therefore, different from other methods that first select anchors and then use Gaussian kernel method to get similarity matrix Z , FSMSC algorithm introduces anchor graph structure into fuzzy clustering, and obtains uniformly distributed anchors as well as similarity matrix Z at the same time by minimizing the loss function. The new objective function is defined as follows: where x i is the ith data point and s j is the jth anchor, the array Z ∈ ℝ n×p is the fuzzy similarity matrix, and z i j represents fuzzy similarity between the ith data point and the jth anchor. 1 denotes a column vector with all elements as one, p and n are the number of anchors and data points, respectively. The parameter m is a weight exponent on each fuzzy membership. By minimizing the cost function, the fuzzy similarity matrix Z and the anchor's matrix S between the data points and the anchors are obtained by iteratively updating the anchors and the fuzzy similarity between the anchors and data points. Compared with the general method of randomly selecting anchors, this method can obtain more evenly distributed and representative anchors to ensure the stability of the anchor graph. The following equations are utilized to iteratively update the fuzzy similarity matrix Z and the anchors matrix S .
where s j is the jth anchor point, z i j represents fuzzy similarity of the ith data point to the jth anchor, and x i is the ith data point. p is the number of anchors, the parameter m is a weight exponent on each fuzzy similarity.

Spectral clustering algorithm based on fuzzy similarity measure
The objective function of spectral clustering [1] can be defined as follows:

Input:
Hyperspectral remote sensing image data matrix X , the number of classes k, the number of anchors p, fuzzy weight exponent m.

4)
Obtain the optimal solution of the class indicator matrix F by Equation (7).

5)
Obtain the final classification results by performing k-means on F. Output: where Tr (⋅) is the trace of the matrix, F ∈ ℝ n×k is the clustering indicator matrix of data points, k and n are the number of classes and data points, respectively. L = D − W represents Laplacian matrix, where W is the similarity matrix between data points and D is a diagonal matrix where the diagonal elements are the sum of the row vectors of the matrix W . In FSMSC algorithm, the similarity matrix W can be obtained through the fuzzy similarity matrix Z [8], and is defined as follows: where Λ is a diagonal matrix, and the diagonal elements are defined as Λ j j = ∑ n i=1 z i j . Further, the matrix W can be written as: In the traditional spectral clustering algorithm, it obtains the optimal solution of the class indicator matrix F by performing eigenvectors decomposition on L and selecting the eigenvectors corresponding to the smallest k eigenvalues. However, the computational complexity of this method is very high, especially for large-scale data. FSMSC obtains the optimal solution of the class indicator matrix F by performing singular value decomposition (SVD) on the matrix A instead of the traditional Laplacian matrix eigenvector decomposition. Although it has the same function as eigenvector decomposition, the computational complexity of SVD on matrix A is much less than that of eigenvectors decomposition on L. The SVD of A can be written as follows: where B and H are the left singular vector matrix and right singular vector matrix, respectively. Σ is the singular value matrix. By performing SVD on A, we obtain the optimal solution of the class indication matrix F which is composed of left singular vector corresponding to the biggest k singular value. Then the k-means clustering can be used to obtain the final classification results.The detail of proposed FSMSC algorithm is described in Algorithm 1.

EXPERIMENTAL RESULTS AND ANALYSIS
In this section, the performance of FSMSC algorithm was carried out on the synthetic data and real-word hyperspectral imaging data sets: Indian pines [18], Salinas [19], University of Pavia [19] and Houston 2018 [20].

Experiments on synthetic data
In order to verify that the proposed algorithm can obtain the uniformly distributed anchors as well as the effectiveness of the algorithm, we test the FSMSC algorithm on the synthetic data by setting different anchors, where the synthetic data is two-moon dataset. There are two classes of data and each class has a volume of 500 samples, Figure 1 shows the classification results. From Figure 1, we can see that the proposed FSMSC algorithm cannot complete classification when the number of anchors p = 2, when p increases, non-spherical classifications can be effectively represented by FSMSC. Moreover, FSMSC can get evenly distributed anchors, and only need few anchors to complete accurate classification.

Experiments on real-word hyperspectral imaging data sets
In this section, we evaluate the parameter sensitivity for our proposed FSMSC algorithm in Figure 2. We compare the performing of FSMSC with fuzzy C-means (FCM) [17], and state-ofthe-art relevant classification algorithms that include fast spectral clustering based on spatial information (FSCS) [21], spectral clustering based on hierarchical bipartite graph (SCHBG) [22], and fast spectral clustering with anchor graph (FSCAG) [14]. Among them, FCM algorithm is a classic fuzzy clustering algorithm, and the proposed algorithm also uses fuzzy theory to classify hyperspectral image. FSCS, SCHBG and FSCAG are state-of-the-art fast spectral clustering algorithms based on anchor graph, as well as the proposed algorithm introduces anchor graph construction into fuzzy spectral clustering algorithm. Therefore, we choose these algorithms as comparison methods to verify the algorithm performance.

Experimental setup
In the experiment, utilizing the ground truth data labels, the performance is evaluated by two evaluation metrics with overall accuracy (OA) and kappa coefficient [23].
In order to compare the impact of different anchors and fuzzy exponents on the classification results, the Indian pines data set is taken as an example to set different anchors and fuzzy exponent m for experiments. The kappa coefficient of the classification results under different anchors and fuzzy exponents is shown in Figure 2. It can be seen from Figure 2 that when the number of anchors is small, the kappa coefficient gradually increases with the increase of anchors. When the number of anchors is greater than 400, the change of kappa coefficient tends to be stable. And we can see that when the fuzzy exponent is 1.3, kappa coefficient is the highest compared with other fuzzy exponents. When m = 1.3 and the number of anchors is 400, the classification result of Indian pines data set has the highest kappa coefficient and the classification effect is the best.

Experimental results
In this section, we demonstrate and analyse the experimental results of each algorithm, all including unlabelled pixels are used as test data. Figures 3-6 and Table 1 show the classification results and the classification accuracy of the experimental results obtained by each algorithm on Indian pines data set, Salinas data set, University of Pavia data set and Houston 2018, respectively. In Table 1, the optimal and suboptimal classification accuracy is made bold and underlined. First, classification experiments are performed on the Indian pines data set to evaluate the performance of each algorithm. Considering the problem of Indian pines data set size, the parameters used in FSMSC are set as p = 400 and m = 1.3. From Figure 3 and Table 1, we can see that there are a large number of misclassifications in FCM algorithm, especially in soybean-min compared with other algorithms. Compared with FCM algorithm, SCHBG, FSCS, and FSCAG obtain better classification results, OA and kappa coefficient have obvious advantages. Moreover, the proposed algorithm FSMSC has the highest OA value of 37.93% and kappa coefficient of 0.3010.
Then, classification experiments are performed on the Salinas data set to evaluate the performance of each algorithm. The parameters used in FSMSC are set as p = 800 and m = 1.3. From Table 1, we can see that FSMSC obtains the highest classification accuracy with the best OA of 74.70% and a kappa  Figure 4, we see that FSMSC produces homogenous areas and better classification map than other algorithms.
Next, classification experiments are performed on the University of Pavia data set. The parameters used in FSMSC are set as p = 1000 and m = 1.3. From Figure 5 and Table 1, we see that the classification results of FSCS and SCHBG contain more misclassifications, and the OA and kappa coefficient are lower than other algorithms. In addition, compared with the FCM algorithm, FSCAG has better classification performance, and the OA and kappa coefficient are higher than FCM. But in meadows, which contains the largest number of samples, the misclassification of FSCAG is serious. The classification accuracy of FSMSC algorithm in meadows is 20% higher than other algorithms. Moreover, the overall OA and kappa coefficient are 64.90% and 0.5498, respectively, which are obviously better than other algorithms. Finally, classification experiments are performed on the Houston 2018 data set. The parameters used in FSMSC are set as p = 800 and m = 1.3. SCHBG and FSCS algorithms cannot be applied to this data set due to their computational complexity. As shown in Figure 6, although FSMSC obtains a better classification result compared with other methods, the experimental results are still not satisfactory due to the complexity of the data set and the variety of classes. The unsupervised methods face great challenges in processing this data set, which is the direction of our next research.

Module ablation experiment
In order to verify the effectiveness of the proposed module, taking the University of Pavia data set as an example, an ablation experiment analysis with only fuzzy similarity measure module, only anchor graph module, and joint module is carried out. The  Table 2, where "-" means no experimental result, the computational complexity is too high to implement the algorithm. From Table 2, we can see that the two modules proposed have played a good role in improving the classification accuracy and reducing the computational complexity.

Computational complexity analysis
Assuming we have a data matrix X ∈ ℝ n×d , the computational complexity of the FSMSC algorithm to establish a fuzzy similarity matrix is Onpdt , and the computational complexity of performing SVD on matrix A to obtain the optimal solution of indicating matrix F is O(npk) + Op 2 k, where p and n are the number of anchors and data points; d is the number of feature dimensions; t and k are the number of iterations and classes, respectively.

CONCLUSION
We propose a novel spectral clustering algorithm to deal with hyperspectral remote sensing image classification. The proposed algorithm utilizes fuzzy similarity measure to replace the traditional Gaussian kernel method to obtain an effective fuzzy similarity matrix, and introduces anchor graph structure to reduce the computational complexity. The fuzzy similarity measure can characterize the classification uncertainty of the hyperspectral remote sensing image effectively. In addition, by iteratively updating the anchors and the fuzzy similarity between the anchors and data points, the algorithm obtains more evenly distributed anchors and more stable similarity matrix. Experimental results show that the FSMSC algorithm achieves good classification performance for hyperspectral remote sensing images, and has higher classification accuracy than the state-ofthe-art relevant classification algorithms. And the kappa coefficients of FSMSC algorithm on Indian pines, Salinas as well as University of Pavia data sets are 0.3010, 0.7205 and 0.549, respectively.