Self-adaptive magnetic graph clustering method under cluster-level contrast learning constraint
The adaptive magnetic affinity graph clustering method addresses the challenge of constructing sample pair connections and affinity distributions by using a tangent-based affinity measurement and dual decoders, improving feature extraction and graph representation for enhanced clustering performance.
Patent Information
- Application Number
- CN202411334104.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-06-26
- Filing Date
- 2024-09-24
- Publication Date
- 2024-12-27
AI Technical Summary
Existing graph representation technologies struggle to adaptively construct internal structures and connections between sample pairs, and existing contrastive learning methods fail to accurately describe affinity distributions, especially in high-dimensional data with complex properties.
An adaptive magnetic affinity graph learning strategy combined with cluster-level contrastive learning is employed, using a tangent-based affinity measurement function and dual decoders to construct affinity matrices and learn deep features, ensuring instance and cluster-level consistency through a streamlined network structure.
This approach achieves high-cohesion and low-coupling feature learning, resulting in improved feature extraction and graph representation capabilities, enhancing the accuracy of downstream clustering tasks.
Smart Images

Figure CN119206277A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of machine learning, and in particular relates to an adaptive magnetic graph clustering method under cluster-level contrast learning constraints. Background Art
[0002] In real life, massive high-dimensional raw data are difficult to be manually pre-labeled because they contain invalid information. However, these data also contain a lot of potential information, but due to their high dimensionality and complex properties, extracting effective information is a challenging task. Graph representation provides a more effective way to describe the underlying data relationships. However, the vast majority of data sets only contain the feature information of the samples themselves, and often do not provide the corresponding graph structure data, which makes graph representation technology unusable. Most existing research focuses on how to effectively characterize node features based on graph structures, and rarely pays attention to how to adaptively construct the internal structure and potential connections between sample pairs. On the other hand, existing graph construction techniques mainly generate linear similarity distributions between instances based on probability, which cannot truly describe the affinity distribution between samples.
[0003] The contrastive learning method has become a commonly used basic research method in this field due to its excellent representation learning ability. Its main idea is to maximize the similarity of positive sample pairs while minimizing negative sample pairs. However, most studies focus on contrastive learning at the instance level. Since there are no prior labels available for clustering tasks, the positive and negative samples of instance-level contrastive learning are constructed through pseudo-labels generated by data enhancement. Specifically, different enhanced samples of the same instance construct positive sample pairs, and the rest are negative sample pairs. Cluster-level contrastive learning provides a more discriminative representation for clustering, projects sample points into a space with a dimension equal to the number of clusters, and characterizes different clusters with soft labels assigned to the clusters, realizing contrastive learning of cluster representation. The cluster-level contrastive learning in the present invention defines positive and negative cluster pairs in a novel and unique way, and implements a high cohesion and low coupling strategy to make the clusters clearly distinguishable.
[0004] Shaham et al. first tried to transform the core idea of spectral clustering into neural networks in the paper "U.Shaham, K.Stanton, H.Li, B.Nadler, R.Basri, and Y.Kluger, Spectralnet: Spectral clustering using deep neural networks, Preprint Arxiv, 2018." Although Spectral Net extended spectral clustering to a deep version, it focused more on simulating spectral decomposition through neural networks, and did not study how to build high-quality graphs through deep representation. In order to combine graph convolutional neural networks and autoencoders, Kipf et al. first used graph data as the input of graph autoencoders in the paper "TNKipf and M.Welling, Variational graph auto-encoders, NIPS Workshop on Bayesian Deep Learning, 2016." and used the inner product of the graph's potential representation as the objective function. This method performed well in multiple classic image datasets. However, this method requires building a graph and calculating its feature vector, which leads to high time and space complexity. In order to extend GNN to general clustering tasks, Li et al. proposed a graph auto-encoder for general data clustering in the paper "X.Li, H.Zhang, and R.Zhang, Adaptive graph auto-encoder for general data clustering, IEEE Transactions on Pattern Analysis and Machine Intelligence, 2021." It adaptively constructs the graph according to the generation perspective of the graph. However, this method uses a metric function based on linear distance, ignoring the true affinity distribution. Summary of the invention
[0005] In order to overcome the shortcomings of the prior art, the present invention provides an adaptive magnetic graph clustering method under cluster-level contrastive learning constraints. First, the data is preprocessed, and the affinity matrix between samples is constructed using the adaptive magnetic affinity graph learning strategy of the present invention; then the normalized data is processed to obtain an augmented feature matrix, and the corresponding deep features are learned through an encoder, and the Embedding and cluster assignment probability representations are decoded; then, the similarity between reconstructed features, the instance-level-affinity graph contrast loss and the cluster-level-contrast learning loss are calculated on the learned deep feature space, and the total loss function is the sum of the two losses. The Adam optimizer is used to minimize the adaptive contrast loss through the gradient descent method; finally, the sparsity is adaptively updated, and the strategy of dynamically updating the sparsity can ensure the stability and relevance during network training.
[0006] The technical solution adopted by the present invention to solve the technical problem is as follows:
[0007] Step 1: Adaptive magnetic affinity graph learning strategy;
[0008] Step 1-1: Input the original feature matrix X n×l =[x1,x2,x3,…,x n ] T and sparsity k, n represents the number of input instances, and l represents the dimension of the input instance features;
[0009] Step 1-2: For feature x i , calculate x i and the remaining n-1 instance features x j The distance d(x i ,x j ) and sort in ascending order;
[0010] Steps 1-3: Define and optimize the magnetic affinity map problem:
[0011]
[0012] in p=[p1,p2,…p n ]; p j represents the affinity between instance i and instance j;
[0013] Step 1-4: Find a closed-form solution based on the KKT condition of the optimization problem, and obtain the adaptive update capability through λ and η; set λ = d (k+1) and η = 4d (k+1) / π, converting the learning strategy controlled by two parameters λ and η to one parameter k; setting the value of k to ensure the adaptive affinity matrix P n×n sparse;
[0014] Step 1-5: Under the condition of sparsity k, calculate the affinity p between any instance i and the remaining n-1 instances j ij , the metric function is p ij =tan(π(d i(k+1) -d ij ) + / 4*d i(k+1) );
[0015] Step 1-6: Construct an undirected magnetic affinity graph A = (P T +P) / 2;
[0016] Step 2: Deep image representation guided by cluster-level contrastive learning;
[0017] Step 2-1: Data preprocessing is used to eliminate the dimensions of each high-dimensional attribute in the original data; normalize each dimension of X and generate the corresponding augmented matrices X′ and X″;
[0018] Step 2-2: Given the sparsity k0, construct the asymmetric affinity matrix A and the symmetric matrix P based on X using the adaptive magnetic affinity graph learning strategy;
[0019] Step 2-3: Define a feature extraction network consisting of a 2-layer graph convolutional network as the Encoder to extract deep features: H n×q ←Encoder(X n×p ,A)←Original input features: X n×p ;
[0020] Step 2-4: Define dual decoders Decoder1 and Decoder2, both consisting of a 1-layer fully connected network, low-dimensional embedding: Z n×q ←Dncoder1←Deep features: H n×q ; Cluster assignment probability representation: C n×c ←Dncoder2←Deep Features: H n×q ;
[0021] Step 2-5: Targeting the deep feature z i , calculate z i and the remaining n-1 instance deep features z j The degree of similarity between Reconstructing the connectivity matrix Indicates z i With z i The Euclidean distance between
[0022] Step 2-6: Use Decoder1(H n×q )Refactor Calculate P and The Kullback-Leibler divergence of α represents a hyperparameter, Z represents a deep feature representation, represents the Laplace matrix corresponding to the affinity matrix, Indicates the connectivity of instance i to instance j;
[0023] Step 2-7: Use Decoder2 (H n×q ) Generate cluster assignment probability C′ n×c and C″ n×c , define the positive and negative sample pairs in C′ and C″ and calculate the cluster-level contrastive learning loss:
[0024] Step 2-8: Use the Adam optimizer to optimize the total loss function L GC +βL CC Gradient descent updates network parameters;
[0025] Step 2-9: Update sparsity k+=k + , jump to step 2-2, and exit the loop until the convergence condition is met;
[0026] Step 2-10: Return the learned deep features Z n×l And the depth comparison between all instances P n×n .
[0027] Preferably, the normalization operation on each dimension of X adopts a range transformation method.
[0028] The beneficial effects of the present invention are as follows:
[0029] 1. Adaptive construction of affinity matrix. Inspired by the magnetic field, a magnetic affinity measurement function based on the tangent function is designed to adaptively construct affinity matrices of different sparsity through a single parameter.
[0030] 2. Significant model training performance. The present invention designs an autoencoder framework with dual decoders. Due to its streamlined network structure, the training speed is very fast, while also taking into account the consistency of instance level and cluster level. Specifically, instance level consistency is achieved by reconstructing the intimacy between instances, and cluster level consistency is achieved by contrastive learning under the influence of positive excitation noise.
[0031] 3. Excellent feature extraction capability. The present invention adaptively implements a high-cohesion and low-coupling feature learning strategy in the deep feature space, and continuously updates the corresponding deep affinity relationship mapping matrix between instances. The accuracy of direct spectral clustering using this affinity matrix is significantly better than that of typical feature extraction methods. The encoded low-dimensional embedding can reveal the potential topological structure between samples and perform well in subsequent clustering tasks.
[0032] 4. Powerful graph representation capability. The present invention has deep graph representation capability. In addition to being able to extract features, it can also learn the affinity matrix of the entire input data set and use the matrix to construct graph relationships between instances, thereby performing downstream tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a specific flow chart of the present invention;
[0034] Figure 2 It is the overall framework diagram of the present invention;
[0035] Figure 3 The deep feature visualization photos during the training process of the embodiment of the present invention are (a) epoch-begin, (b) epoch-50, and (c) epoch-end;
[0036] Figure 4 These are visualization photos of the depth comparison map representation during the training process of an embodiment of the present invention, (a) epoch-begin, (b) epoch-50, and (c) epoch-end. DETAILED DESCRIPTION
[0037] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0038] In order to overcome the shortcomings of the prior art, the present invention provides a tangent-based instance affinity measurement method. The method uses a novel dual decoder to ensure the consistency of the instance level and the cluster level, wherein the reconstructed graph retains the local affinity and the global topological structure, and the contrastive learning defines a new sample pair based on positive excitation noise, so that the learned embedding is more discriminative. First, the data is preprocessed, and the sample affinity matrix is constructed using the adaptive magnetic affinity graph learning strategy of the present invention; then the normalized data is processed to obtain an augmented feature matrix, and the corresponding deep features are learned through the encoder Encoder and the Embedding and cluster assignment probability representation are decoded; then the similarity between the reconstructed features, the instance-level-affinity graph contrast loss and the cluster-level-contrast learning loss are calculated on the learned deep feature space, and the total loss function is the sum of the two losses, and the Adam optimizer is used to minimize the adaptive contrast loss through the gradient descent method; finally, the sparsity is adaptively updated, and the strategy of dynamically updating the sparsity can ensure the stability and relevance during network training.
[0039] The present invention proposes a magnetic affinity graph characterization method based on cluster-level contrastive learning to solve the problem that the general linear affinity measurement method is difficult to adaptively and truly measure the affinity between instances, and the cluster-level contrastive learning module designed based on positive excitation noise ensures the compactness of samples in the same cluster and the distinctiveness of samples between different clusters in low-dimensional distribution. The technical solution to achieve the purpose of the present invention includes two major modules: an adaptive magnetic affinity graph learning strategy and a deep graph characterization guided by cluster-level contrastive learning.
[0040] Adaptive Magnetic Affinity Graph Learning Strategy:
[0041] 1. Input the original feature matrix X n×l =[x1,x2,x3,…,x n ] T and sparsity k;
[0042] 2. For feature x i , calculate x i and the remaining n-1 instance features x j The distance d(x i ,x j ) and sort in ascending order;
[0043] 3. Define and optimize the magnetic affinity diagram problem: in
[0044] 4. According to the KKT condition of the optimization problem, a closed-form solution is obtained. The adaptive update capability can be obtained through λ and η. Without loss of generality, set λ = d (k+1) and η = 4d (k+1) / π, converting the learning strategy controlled by two parameters λ and η into one parameter k; setting a suitable k can ensure the adaptive affinity matrix P n×n sparse;
[0045] 5. Under the condition of sparsity k, calculate the affinity p between any instance i and the remaining n-1 instances j ij , the metric function is p ij =tan(π(d i(k+1) -d ij ) + / 4*d i(k+1) );
[0046] 6. Construct an undirected magnetic affinity graph A = (P T +P) / 2.
[0047] Deep Image Representation Guided by Cluster-Level Contrastive Learning:
[0048] 1. Data preprocessing to eliminate the dimensions of each high-dimensional attribute in the original data. This method uses the range transformation method to normalize each dimension of X and generate the corresponding augmented matrices X′ and X″;
[0049] 2. Given the sparsity k0, construct the asymmetric affinity matrix A and the symmetric matrix P based on X using the adaptive magnetic affinity graph learning strategy;
[0050] 3. Define a feature extraction network consisting of a 2-layer graph convolutional network as the Encoder to extract deep features: H n×q ←Encoder(X n×p ,A)←Original input features: X n×p ;
[0051] 4. Define dual decoders Decoder1 and Decoder2, each consisting of a 1-layer fully connected network, low-dimensional embedding: Z n×q ←Dncoder1←Deep features: H n×q ; Cluster assignment probability representation: C n×c ←Dncoder2←Deep Features: H n×q ;
[0052] 5. For deep features z i , calculate z i and the remaining n-1 instance deep features z j The degree of similarity between Reconstructing the connectivity matrix
[0053] 6. Use Decoder1(H n×q )Refactor Calculate P and The Kullback-Leibler divergence of You can constrain the Encoder input X n×p With output Z n×q are strongly correlated;
[0054] 7. Use Decoder2 (H n×q ) Generate cluster assignment probability C′ n×c and C″ n×c , define the positive and negative sample pairs in C′ and C″ and calculate the cluster-level contrastive learning loss: The low-dimensional embeddings corresponding to the samples in the same cluster are more compact;
[0055] 8. Use Adam optimizer to optimize the total loss function L GC +βL CC Gradient descent updates network parameters;
[0056] 9. Update sparsity k+=k + , jump to step 2, and exit the loop until the convergence condition is met;
[0057] 10. Return the learned deep feature Z n×l And the depth comparison between all instances P n×n .
[0058] Example:
[0059] Reference Figure 1 and Figure 2 The implementation steps of the magnetic depth map characterization module based on cluster-level contrast learning of the present invention are as follows:
[0060] Step 1: Data preprocessing. Analyze and filter the data to remove abnormal data. Then use the range transformation method:
[0061]
[0062] where x is the instance vector, x i is an element in the instance vector. It is used to normalize the original data to eliminate the dimension of each feature dimension.
[0063] Step 2: Construct the affinity matrix between samples. Using the adaptive magnetic affinity graph learning strategy of the present invention, construct A and P, namely:
[0064] p ij =p(x j |x i )=tan(π(d i(k+1) -d ij )+ / 4*d i(k+1) ),A=(P T +P) / 2. (2)
[0065] Step 3: Generate augmented feature matrix. The normalized data is processed to obtain augmented feature matrices X′ and X″, where X′ is the data after adding noise, that is, 20% of the samples are randomly selected from X, and 20% of their features are randomly initialized. X″ is derived from X′ and P, satisfying the following conditions:
[0066] x″ i = x′ j ,j∈Ne(i,k). (3)
[0067] Where Ne(i,k) represents the k nearest neighbor set of the i-th sample.
[0068] Step 4: Encoding. Define the encoding layer as the superposition of two layers of graph convolution, converting the original input data: X n×p =[x1,x2,x3,…,xn ] T The corresponding deep features are learned through the encoder:
[0069] H n×q =[h1,h2,h3,…,h n ] T =Encoder(X n×p ,A). (4)
[0070] Step 5: Decode the Embedding and cluster assignment probability representation. Define the dual decoders Decoder1 and Decoder2, each consisting of a 1-layer fully connected network. Decode to generate a low-dimensional encoding Embedding:
[0071] Z n×q =Dncoder1(Encoder(X)), (5) and the cluster assignment probability generated based on positive excitation noise are expressed as:
[0072] C′ n×c =Decoder2(Encoder(X′)),C″ n×c =Decoder2(Encoder(X″)). (6)
[0073] Step 6: Calculate the similarity between reconstructed features. Calculate the similarity between instances in the learned deep feature space. In this method, the distance between deep features is first calculated, specifically the Euclidean distance. For instance i and j, their deep features are z i and z j , so the Euclidean distance can be defined as:
[0074]
[0075] Then the affinity (similarity) between deep features is calculated, which is defined as:
[0076]
[0077] Step 7: Define instance-level affinity graph contrast loss. Calculate P and The Kullback-Leibler divergence measures the graph reconstruction error:
[0078]
[0079] in, Ensure the global topology between instances and constrain the Encoder input X n×p With output Z n×q Strongly correlated, As a constraint, local connectivity is guaranteed.
[0080] Step 8: Define cluster-level contrastive learning loss. Define C′ n×c and C″ n×c The positive and negative sample pairs in and calculate the cluster-level contrastive learning loss:
[0081]
[0082] The H(C′,C″) constraint is used to balance the number of instances belonging to different clusters. This part of the loss implements a high cohesion and low coupling strategy, trying to aggregate similar instances and separate dissimilar instances, constraining the low-dimensional embedding corresponding to samples in the same cluster to be more compact.
[0083] Step 9: Optimize the total loss function. The total loss function is defined as:
[0084] L=L GC +βL CC ,β∈(0,1], (11) where β is a hyperparameter controlling the relative weight between instance-level loss and cluster-level loss. The adaptive contrastive loss L is minimized by gradient descent using the Adam optimizer.
[0085] Step 10: Adaptively update the sparsity. Update the sparsity k+=k + , and set Jump to step 3 and end the loop until the convergence condition is met. The strategy of dynamically updating sparsity can ensure the stability and relevance of the network during training.
[0086] Step 11: Downstream clustering task application. Return the final deep feature Z n×q And the depth comparison between all instances P n×n The result can be used to perform various downstream tasks such as cluster analysis, constructing depth maps for graph convolution tasks, etc. Specifically, the K-means method and the SC method are used on Z n×q and P n×n Downstream tasks - clustering can be performed.
[0087] The effect of the present invention can be further illustrated by the following simulation experiment.
[0088] 1.Simulation conditions;
[0089] The present invention calls an NVIDIA GeForceRTX 2080Ti GPU graphics card on the Ubuntu 18.04.2LTS server operating system and uses the PyTorch-1.4 and python-3.7 development environments for simulation.
[0090] Seven unsupervised benchmark datasets were used in the experiments, namely:
[0091] ISOLET and SEGEMNT datasets introduced and cited in the paper "A. Asuncion and D. Newman, Uci machine learning repository, 2007."
[0092] The JAFFE dataset introduced and cited in the paper “MJLyons, J.Budynek, and S.Akamatsu, Automatic classification of single facial images, IEEE Transactions on Pattern Analysis and Machine Intelligence, vol.21, no.12, pp.1357–1362, 1999.”;
[0093] The UMIST dataset introduced and cited in the paper “C.Hou, F.Nie, X.Li, D.Yi, and Y.Wu, Joint embedding learning and sparse regression: A framework for unsupervised feature selection, IEEE Transactions on Cybernetics, vol.44, no.6, pp.793–804, 2013.”;
[0094] The COIL20 dataset introduced and used in the paper “SANene, SK Nayar, H. Murase, et al., Columbia object image library (coil-20), 1996.”;
[0095] The USPS dataset introduced and used in the paper "JJHull, A database for handwritten text recognition research, IEEE Transactions on Pattern Analysis and Machine Intelligence, vol.16, no.5, pp.550–554, 1994."
[0096] The MNIST-TEST dataset introduced and used in the document “Y.LeCun, The mnist database of handwritten digits, http: / / yann.lecun.com / exdb / mnist / , 1998.”
[0097] The summary information of the above datasets is shown in Table 1.
[0098] Table 1 Summary information of test dataset
[0099]
[0100] 2. Simulation content;
[0101] This simulation uses a clustering method to cluster the learned deep features and depth contrast map representations, and calculates two evaluation indicators introduced and used in the literature "ZFKnops, JAMaintz, MAViergever, and JPPluim, Normalized mutual information based registration using k-means clustering and shading correction, Medical image analysis, vol.10, no.3, pp.432–439": Accuracy (ACC) and Normalized Mutual Information (NMI).
[0102] In order to compare the effectiveness of the present invention, the comparison methods were selected as follows:
[0103] The normalized spectral clustering SC-Ncut method mentioned by Hagen et al. in the document “L.Hagen and ABKahng, New spectral methods for ratiocut partitioning and clustering, IEEE Transactions on Computer-aided Design of Integrated Circuits and Systems, vol.11, no.9, pp.1074–1085, 1992.”;
[0104] The deep fuzzy clustering method DFKM mentioned by Zhang et al. in the paper “R. Zhang, X. Li, H. Zhang, and F. Nie, Deep fuzzy k-means with adaptive loss and entropy regularization, IEEE Transactions on Fuzzy Systems, vol. 28, no. 11, pp. 2814–2824, 2”;
[0105] The graph autoencoder GAE based on graph convolution mentioned by Kipf et al. in the paper “TNKipf and M.Welling, Variational graph auto-encoders, arXiv preprint arXiv:1611.07308, 2016.”;
[0106] The marginalized graph autoencoder MGAE for graph clustering proposed by Wang et al. in the paper “C. Wang, S. Pan, G. Long, X. Zhu, and J. Jiang, Mgae: Marginalized graph autoencoder for graph clustering, in Proc. ACM on Conference on Information and Knowledge Management, pp. 889–898, 2017.”;
[0107] The deep spectral clustering method SpectralNet mentioned by Shaham et al. in the paper "U.Shaham, K.Stanton, H.Li, B.Nadler, R.Basri, and Y.Kluger, Spectralnet: Spectral clustering using deep neural networks, arXiv preprintarXiv:1801.01587, 2018."
[0108] The adaptive graph auto-encoder AdaGAE for general data clustering mentioned by Li et al. in the document “X. Li, H. Zhang, and R. Zhang, Adaptive graph auto-encoder for general data clustering, IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 44, no. 12, pp. 9725–9732, 202” is used as the comparison baseline for the adaptive magnetic graph clustering method under cluster-level contrastive learning constraints proposed in the present invention.
[0109] The comparison results are shown in Tables 2 and 3, which compare the clustering performance of the seven clustering methods on seven benchmark datasets, where the highest value is marked in bold and the second highest value is marked by an underline.
[0110] Table 2 Comparison of clustering performance (ACC) of seven clustering methods on seven benchmark datasets
[0111]
[0112] Table 3 Comparison of clustering performance (NMI) of seven clustering methods on seven benchmark datasets
[0113]
[0114] It can be seen from Tables 2 and 3 that when learning and extracting deep features, the accuracy and normalized mutual information of the present invention are better than those of the other six classic baseline comparison methods.
[0115] In order to clearly explore the learning and evolution of deep features in the method of the present invention, simulation experiments were used to visualize the deep features and depth comparison graph representations at each stage of USPS dataset training and analyze their evolution process.
[0116] in Figure 3 The present invention performs T-SNE visualization on the evolution process of deep features during simulation training, where Figure 3 (a) is the untrained two-dimensional visualization distribution, Figure 3 (b) is the visualization distribution after 50 rounds of training. Figure 3 (c) is the visualization distribution after training.
[0117] from Figure 3 It can be seen that the deep features gradually tend to a distribution state of high cohesion and low coupling, proving that the strategy of learning deep features by this method is indeed effective.
[0118] Figure 4This is a comparison of the evolution process of the depth comparison graph during the simulation training process of the present invention, where Figure 4 (a) is the untrained deep affinity mapping, Figure 4 (b) is the deep affinity mapping after 50 rounds of training. Figure 4 (c) is the deep affinity mapping after training.
[0119] from Figure 4 It can be seen that as the training progresses, the block representation of the depth comparison map becomes more and more obvious, and the affinity level becomes clearer, indicating that this method is indeed effective in measuring the depth comparison map of affinity relationships.
Claims
1. An adaptive magnetic map clustering method under cluster-level contrastive learning constraints, characterized in that: The steps include: Step 1: Adaptive magnetic affinity graph learning strategy; Step 1-1: Input the original feature matrix X n×l =[x1,x2,x3,…,x n ] T and sparsity k, n represents the number of input instances, and l represents the dimension of the input instance features; Step 1-2: For feature x i , calculate x i and the remaining n-1 instance features x j The distance d(x i ,x j ) and sort in ascending order; Steps 1-3: Define and optimize the magnetic affinity map problem: in p=[p1,p2,…p n ]; p j represents the affinity between instance i and instance j; Step 1-4: Find a closed-form solution based on the KKT condition of the optimization problem, and obtain the adaptive update capability through λ and η; set λ = d (k+1) and η = 4d (k+1) / π, converting the learning strategy controlled by two parameters λ and η to one parameter k; setting the value of k to ensure the adaptive affinity matrix P n×n sparse; Step 1-5: Under the condition of sparsity k, calculate the affinity p between any instance i and the remaining n-1 instances j ij , the metric function is p ij =tan(π(d i(k+1) -d ij ) + / 4*d i(k+1) ); Step 1-6: Construct an undirected magnetic affinity graph A = (P T +P) / 2; Step 2: Deep image representation guided by cluster-level contrastive learning; Step 2-1: Data preprocessing is used to eliminate the dimensions of each high-dimensional attribute in the original data; normalize each dimension of X and generate the corresponding augmented matrix X ′ and X″; Step 2-2: Given the sparsity k0, construct the asymmetric affinity matrix A and the symmetric matrix P based on X using the adaptive magnetic affinity graph learning strategy; Step 2-3: Define a feature extraction network consisting of a 2-layer graph convolutional network as the Encoder to extract deep features: H n×q ←Encoder(X n×p ,A)←Original input features: X n×p ; Step 2-4: Define dual decoders Decoder1 and Decoder2, both consisting of a 1-layer fully connected network, low-dimensional embedding: Z n×q ←Dncoder1←Deep features: H n×q ; Cluster assignment probability representation: C n×c ←Dncoder2←Deep Features: H n×q ; Step 2-5: Targeting the deep feature z i , calculate z i and the remaining n-1 instance deep features z j The degree of similarity between Reconstructing the connectivity matrix Indicates z i With z i The Euclidean distance between Step 2-6: Use Decoder1(H n×q )Refactor Calculate P and The Kullback-Leibler divergence of α represents a hyperparameter, Z represents a deep feature representation, represents the Laplace matrix corresponding to the affinity matrix, Indicates the connectivity of instance i to instance j; Step 2-7: Use Decoder2 (H n×q ) Generate cluster assignment probability C′ n×c and C″ n×c , define the positive and negative sample pairs in C′ and C″ and calculate the cluster-level contrastive learning loss: Step 2-8: Use the Adam optimizer to optimize the total loss function L GC +βL CC Gradient descent updates network parameters; Step 2-9: Update sparsity k+=k + , jump to step 2-2, and exit the loop until the convergence condition is met; Step 2-10: Return the learned deep features Z n×l And the depth comparison between all instances P n×n .
2. The adaptive magnetic graph clustering method under cluster-level contrastive learning constraints according to claim 1 is characterized in that: The normalization operation on each dimension of X adopts the range transformation method.
