Multi-view contrast clustering method based on multi-granularity feature fusion
The fine-grained features of multi-view data are obtained through the autoencoder, combined with multi-layer perceptron and adaptive weights, the problems of insufficient utilization of low-level features and difference in view quality in deep multi-view clustering are solved, and more efficient multi-view clustering consistency and compactness are achieved.
Patent Information
- Application Number
- CN202510282076.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-08-01
AI Technical Summary
The existing deep multi-view clustering methods ignore the importance of low-level features, fail to effectively utilize the quality differences between different views, and ignore structural information, resulting in poor clustering performance.
The self-encoder is used to obtain the fine-grained features of multi-view data, and the multi-grained feature fusion is achieved through multi-layer perceptrons, and cluster-level comparison learning is used with adaptive weights and structure-guided clustering to improve cluster consistency.
Effectively utilize different granularity feature information to suppress the influence of low-quality views, improve clustering performance, and achieve consistency and compactness of multi-view clustering results.
Smart Images

Figure CN120411569A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of unsupervised learning image clustering, and particularly relates to a multi-view contrast clustering method based on multi-granularity feature fusion. Background Art
[0002] Multi-View Clustering (MVC) can currently be divided into two major categories: traditional machine learning methods and deep learning methods. Among them, multi-view clustering in traditional machine learning methods can be further subdivided into the following categories: Co-training-based MVC, Multi-kernel-based MVC, Matrix factorization-based MVC, Graph-based MVC, and Subspace-based MVC. However, due to the limited feature representation ability of traditional machine learning methods, they perform inadequately when dealing with complex real-world data, further restricting their clustering performance.
[0003] In recent years, with the rise of deep learning. Deep learning multi-view clustering has gradually become the mainstream direction of multi-view clustering research due to its powerful feature representation ability. Many valuable works have been successively proposed. [Unsupervised Deep Embedding for Clustering Analysis (DEC)] uses an autoencoder to extract data features and maps the features into a latent space for clustering. Although this work was initially applied to single-view, its paradigm of network loss plus clustering loss inspired subsequent deep multi-view clustering work. [Deep Multimodal Subspace Clustering Networks] proposed a multi-modal subspace clustering method based on a convolutional neural network and used three different encoders to fuse the learned multi-modal features. [Generalized Latent Multi-View Subspace Clustering] uses a neural network to obtain the latent representation of data and fully utilizes the complementarity of multi-views to make the subspace representation more accurate. These studies have fully utilized the advantages of deep learning and made important contributions to the field of multi-view clustering.
[0004] Current contrast multi-view clustering mainly focuses on sample-level and cluster-level contrast learning. The goal of sample-level contrast learning is to make similar samples closer and dissimilar samples farther away under multiple views. Cluster-level contrast learning aims to achieve the consistency of cluster distributions under multiple views.
[0005] Although significant progress has been made in previous research, there are still challenges in the following aspects: (1) The process of a neural network extracting features is from low-level to high-level. For example, when a neural network learns image features, it can learn low-level features of an image, such as edges and colors. As the network is trained, the neural network can learn high-level features such as shapes and semantic segmentation. However, current deep multi-view clustering methods only focus on high-level features and ignore the importance of low-level features in the clustering process. Low-level features also contain important clustering information and should not be discarded. One idea for effectively using features at different levels is to introduce the concept of multi-granularity. With the help of the multi-granularity idea, low-level and high-level features are reconstructed into fine-grained features and coarse-grained features. Therefore, how to effectively use features at different granularities to improve clustering performance is a challenge. (2) Some previous comparative multi-view clustering methods ignored the quality differences between different views, resulting in low-quality views affecting the final clustering performance. Therefore, how to perform view adaptive weight learning in comparative multi-view clustering is also worth exploring. (3) Some deep multi-view clustering methods ignored the importance of structural information in clustering features, resulting in sub-optimal solutions. Summary of the Invention
[0006] Object of the Invention: The technical problem to be solved by the present invention is to provide a multi-view contrast clustering method based on multi-granularity feature fusion in view of the deficiencies of the prior art, including the following steps:
[0007] Step 1: Use an autoencoder to obtain a fine-grained feature representation of multi-view data in the latent space;
[0008] Step 2: Adopt a multi-granularity feature fusion method: First, use a multi-layer perceptron MLP (Multilayer Perceptron, abbreviated as MLP) to obtain coarse-grained features from the fine-grained features, and then apply the multi-layer perceptron MLP to multi-granularity feature fusion to fuse the fine-grained and coarse-grained features into multi-granularity features;
[0009] Step 3: Adopt an adaptive weight sample-level contrast method to assign corresponding weights to different views by measuring the difference between the fused features and the global features of different views;
[0010] Step 4: Through structure-guided clustering-level contrast learning, use the target distribution to maintain the structure of the clustering semantic features to achieve the consistency of the multi-view clustering results;
[0011] Step 5: Calculate the total loss function. After minimizing the total loss function, assign clustering labels to each sample through the optimized target distribution to obtain the final clustering result.
[0012] Step 1 includes: For the sample X of the v-th view v , adopt the encoder Ev (X v ; φ v ) to obtain the set of potential feature representations for all views Z v represents the potential feature of the v-th view, M is the total number of views, i.e., the different sources of multi-view data; D v (X v ; θ v ) is a decoder for obtaining the reconstructed data where φ v and θ v are learnable neural network parameters. Therefore, the loss function L of the entire autoencoder z is:
[0013]
[0014] where is the i-th original data of the v-th view, is the i-th reconstructed data of the v-th view, denotes first passing through the encoder to obtain the potential feature, and then decoding the potential feature.
[0015] Step 2 includes the following steps:
[0016] Step 2-1, the potential feature is obtained by formula (1), and a multi-layer perceptron MLP is stacked to obtain the set of coarse-grained feature representations for all views H v represents the coarse-grained feature matrix of the v-th view, where denotes an H-dimensional column vector, denotes the coarse-grained feature vector of the i-th sample of the v-th view;
[0017] Step 2-2, applying the multi-layer perceptron MLP to multi-granularity feature fusion, and the calculation formula is:
[0018]
[0019] where F(·) is a mapping function for feature fusion operation, and denotes the feature representation of the n-th sample under the v-th view, denotes the embedding representation of the n-th sample under the v-th view; and are set to have the same dimension, denotes the dimension of the original feature space of the v-th view, denotes the dimension of the embedded feature space of the v-th view, denotes the dimension of the feature space of the v-th view after feature fusion; are the learnable parameters of the multi-layer perceptron MLP for multi-granularity feature fusion; G v is a multi-granularity feature that contains fine-grained and coarse-grained clustering information;
[0020] Step 2-3, obtain the multi-granularity feature G through formula (2) v After that, perform sample-level multi-granularity contrastive learning: Given a sample i with multi-granularity features Sample i has (VN - 1) feature pairs where V represents the total number of views and N represents the number of samples, and there are (V - 1) positive feature pairs The remaining V(N - 1) samples are negative feature pairs; use the cosine distance to represent the similarity between two features, and the calculation formula is:
[0021]
[0022] where <·, ·> is the dot product operation, is the i-th fused feature of the v-th view, is the j-th fused feature of the m-th view; represents and similarity;
[0023] Step 2-4, inspired by NT-Xent (Normalized Temperature-scaled Cross Entropy loss), the sample-level feature loss function of the multi-granularity feature G of the v-th view v and the multi-granularity feature G of the m-th view m is: as follows:
[0024]
[0025] where τ s is the temperature parameter; e is the natural constant;
[0026] Step 2-5, the calculation formula of the sample-level feature loss function L of all views S is:
[0027]
[0028] Step 3 includes the following steps:
[0029] Step 3-1: An adaptive weighted sample-level contrast method is adopted. First, based on formula (2), multi-granularity features G are obtained. v , and then a multi-layer perceptron is applied to the global features, and the from more than two views are fused into a global feature.
[0030] Step 3-2: The global feature U is set as the reference feature. By measuring the between different views and the reference feature U, corresponding weights are assigned to different views. The Wasserstein Distance (abbreviated as WD) is used to measure the similarity between and the reference feature U. By calculating the Wasserstein distance WD between and U, the view with a smaller WD value will be assigned a larger weight value. The calculation formula is:
[0031]
[0032] where u j represents the j-th sample in the reference feature U;
[0033] Step 3-3: The weight calculation formula for each view is: <s
[0034]
[0035] where GW v [[ID=З4]]is the weight occupied by the v-th view;
[0036] Step 3-4: Combining formula (5), the overall adaptive weighted sample-level contrast formula is proposed:
[0037]
[0038] where GW m is the weight occupied by the m-th view.
[0039] Step 4 includes the following steps:
[0040] Step 4-1: The latent embedding feature is used to obtain an initial clustering semantic feature by applying a multi-layer perceptron MLP where Q v represents the clustering semantic feature of the v-th view;
[0041] Step 4-2: is the i-th row of Q v , represents the probability that sample i belongs to cluster j under the v-th view; Subsequently, a soft assignment is imposed on used to obtain the target distribution The calculation formula is:
[0042]
[0043] where T j is a normalization factor, that is, the sum of the initial probabilities of all samples in the j-th cluster represents the j-th column of P v and P v is a more robust clustering distribution obtained by adopting a soft assignment strategy to enhance the clustering structure of Q v ; represents the probability that sample i belongs to cluster j under the v-th view;
[0044] Step 4-3, obtain the robust P v After obtaining the clustering distribution, to ensure the consistency of the clustering distribution in different views, contrastive learning is performed on P v to obtain a consistent clustering result: for the v-th view, there are (VC - 1) cluster pairs, where C is the total number of clusters, represents the probability distribution of the c-th cluster in the m-th view, where there are (V - 1) positive cluster pairs the remaining V(N - 1) cluster pairs are classified as negative cluster pairs, and the clustering-level contrastive loss v between P m and P is calculated as:
[0045]
[0046] where P v and P m are the clustering distributions of the v-th view and the m-th view respectively;
[0047] Step 4-4, obtain the clustering-level feature loss function L C :
[0048]
[0049] where is the frequency of the j-th cluster in the v-th view.
[0050] Step 5 includes the following steps:
[0051] Step 5-1, calculate the total loss function L overall :
[0052] Loverall = L Z + L S + L C (12);
[0053] Step 5-2, after minimizing formula (12), for the i-th sample, the clustering prediction calculation formula is:
[0054]
[0055] where y i is the final clustering label of the i-th sample;
[0056] Through clustering prediction, the final clustering division result is obtained.
[0057] The present invention also provides an electronic device, including a processor and a memory, where the memory stores program codes, and when the program codes are executed by the processor, the processor executes the steps of the method.
[0058] The present invention also provides a storage medium, storing a computer program or instruction, and when the computer program or instruction runs on a computer, it executes the steps of the method.
[0059] In the present invention, an autoencoder is used to learn fine-grained features from multi-view data. In order to achieve multi-granularity information fusion and view adaptive weight learning, a multi-granularity adaptive weight sample-level contrast learning module is designed. A multi-granularity feature fusion network is used to achieve the fusion of multi-granularity information. First, coarse-grained features are obtained from fine-grained features through a high-level MLP. Then, by applying a multi-layer perceptron MLP to multi-granularity feature fusion, the fine-grained and coarse-grained features are fused into multi-granularity features. This fusion makes full use of the information of different granularity features and contains richer clustering semantics. Finally, sample-level multi-granularity contrast learning is performed. The same samples from different views are defined as positive sample pairs, and the remaining samples are defined as negative sample pairs. The cosine distance is used to calculate the similarity between two features, and then the contrast loss is performed between the two feature samples. Through multi-view sample-level contrast learning, similar samples can be closer in the fused latent feature space, and dissimilar samples will move away from each other. Thanks to the multi-granularity features, the clustering structure of samples in the feature space becomes more compact.
[0060] In adaptive weight learning, multi-granularity features from different views are fused into a global feature. The Wasserstein Distance is used to measure the difference between the features of different views and the global feature, and adaptive view weight allocation is achieved. High-quality views can play a leading role in the clustering task while effectively suppressing the impact brought by low-quality views. At the same time, to solve the problem of poor clustering performance caused by the lack of structural information in clustering semantic features, a structure-guided clustering-level contrast learning module is proposed. This module uses the target distribution to maintain the structure of clustering semantic features and achieve clustering consistency under multiple views.
[0061] The present invention has the following beneficial effects: (1) A multi-granularity adaptive weight sample-level contrast learning module is designed. It realizes the effective fusion of fine-grained and coarse-grained information and adaptively learns view weights. Through this method, the information of different granularities in multi-view data can be fully utilized, and the negative impact brought by low-quality views can be effectively avoided, thus improving the clustering performance.
[0062] (2) A structure-guided clustering-level contrast learning module is designed. It uses the target distribution to maintain the structure of clustering semantic features and achieve the consistency of clustering among multiple views. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] The following further describes the present invention in detail with reference to the drawings and specific embodiments, and the above and / or other advantages of the present invention will become clearer.
[0064] Figure 1 It is the overall flowchart of a contrast multi-view clustering method based on multi-granularity fusion of the present invention.
[0065] Figure 2 It is the overall data processing block diagram of a contrast multi-view clustering method based on multi-granularity fusion of the present invention.
[0066] Figure 3 It is the method flowchart of a contrast multi-view clustering method based on multi-granularity fusion of the present invention.
[0067] Figure 4 It is the distribution diagram of the MNIST-USPS original dataset.
[0068] Figure 5 It is the fine-grained features extracted from the dataset through the autoencoder.
[0069] Figure 6 It is the coarse-grained features obtained after the fine-grained features pass through the advanced MLP.
[0070] Figure 7 It is the multi-granularity features after the fusion of fine-grained features and coarse-grained features.
[0071] Figure 8 It is the distribution map of the COL20 original dataset.
[0072] Figure 9 They are the fine-grained features extracted from the dataset by the autoencoder.
[0073] Figure 10 They are the coarse-grained features obtained after the fine-grained features pass through the advanced MLP.
[0074] Figure 11 They are the multi-grained features after fusing the fine-grained features and the coarse-grained features. Detailed implementation manners
[0075] As Figure 1 、 Figure 2 、 Figure 3 shown: The present invention provides a contrast multi-view clustering method based on multi-grained fusion, including the following steps:
[0076] Step 1, use an autoencoder to obtain the fine-grained feature representation of multi-view data in the latent space;
[0077] Step 2, adopt a multi-grained feature fusion method: First, use a multi-layer perceptron MLP (Multilayer Perceptron, abbreviated as MLP) to obtain coarse-grained features from the fine-grained features, and then apply the multi-layer perceptron MLP to multi-grained feature fusion to fuse the fine-grained and coarse-grained features into multi-grained features;
[0078] Step 3, adopt an adaptive weight sample-level contrast method to assign corresponding weights to different views by measuring the difference between the fusion features and the global features of different views;
[0079] Step 4, through structure-guided clustering-level contrast learning, use the target distribution to maintain the structure of the clustering semantic features to achieve the consistency of the multi-view clustering results;
[0080] Step 5, calculate the total loss function. After minimizing the total loss function, assign clustering labels to each sample through the optimized target distribution to obtain the final clustering result.
[0081] Step 1 includes: For the sample X of the v-th view v , adopt the encoder E v (X v ; φ v ) to obtain the set of latent feature representations of all views Z v represents the latent feature of the v-th view, M is the total number of views, that is, the different sources of multi-view data; D v (X v; θ v ) is a decoder for obtaining reconstructed data where φ v and θ v are learnable neural network parameters. Therefore, the loss function L of the entire autoencoder z is as follows:
[0082]
[0083] where is the i-th original data of the v-th view, is the i-th reconstructed data of the v-th view, denotes first passes through the encoder to obtain latent features, and then decodes the latent features.
[0084] Step 2 includes the following steps:
[0085] Step 2-1, the latent feature is obtained by formula (1). A multi-layer perceptron MLP is stacked to obtain coarse-grained features where H v represents the coarse-grained feature matrix of the v-th view, where
[0086] Step 2-2, the feature extraction process of the neural network involves the conversion from fine-grained features to coarse-grained features, and this conversion is accompanied by information loss. To make full use of fine-grained and coarse-grained features, it is proposed to apply the multi-layer perceptron MLP to multi-granularity feature fusion, and the calculation formula is shown in formula (2):
[0087] [[ID=A46]]
[0088] where F(@) is a mapping function for feature fusion operations, and represents the feature representation of the n-th sample under the v-th view, [[ID=A55]]
[0089] Step 2-3, after obtaining the multi-granularity feature G v by formula (2), sample-level multi-granularity contrast learning is performed: Given a sample i with multi-granularity features Sample i has (VN - 1) feature pairs where V represents the total number of views and N represents the number of samples. There are (V - 1) positive feature pairs The remaining V(N - 1) samples are negative eigenpairs; the cosine distance is used to represent the similarity between two features, and the calculation formula is:
[0090]
[0091] where <·,·> is the dot product operation, is the i-th fused feature of the v-th view, is the j-th fused feature of the m-th view; represents and similarity;
[0092] Step 2 - 4, inspired by NT-Xent (Normalized Temperature-scaled Cross Entropy loss), the sample-level feature loss function v of the multi-granularity feature G m of the v-th view and the multi-granularity feature G of the m-th view is:
[0093]
[0094] where τ s is the temperature parameter; e is the natural constant;
[0095] Step 2 - 5, the calculation formula of the sample-level feature loss function L S of all views is:
[0096]
[0097] Through multi-view sample-level contrast learning, similar samples can be closer in the latent feature space G, while dissimilar samples will move away from each other. In addition, thanks to the multi-granularity features, the clustering structure of the samples in the feature space G becomes more compact.
[0098] Step 3 includes the following steps:
[0099] Step 3 - 1, the quality difference between different views cannot be ignored. High-quality views should play a dominant role in multi-view clustering, while for low-quality views, due to their adverse effects on the clustering task, the view weights should be weakened. Therefore, a new adaptive weight sample-level contrast method is proposed. First, based on formula (2), obtain G v , and fuse the from multiple views into a global feature
[0100] Step 3-2: Set the global feature U as the reference feature. By measuring the difference between different views and U, assign corresponding weights to different views. Here, Wasserstein Distance (WD) is used to measure the similarity between and U. WD can accurately reflect the actual difference between two probability distributions and effectively ignore the influence of noise and outliers in the distribution. The smaller the WD between two probability distributions, the higher their similarity. Specifically, by calculating the WD between and U, the view with a smaller WD value will be assigned a larger weight value. The calculation formula is as shown in formula (6):
[0101]
[0102] where u j represents the j-th sample in the reference feature U;
[0103] Step 3-3: The weight calculation formula for each view is:
[0104]
[0105] where GW v is the weight occupied by the v-th view;
[0106] Step 3-4: Combining formula (5), propose the overall adaptive weight sample-level contrast formula:
[0107]
[0108] Step 4 includes the following steps:
[0109] Step 4-1: Obtain an initial clustering semantic feature by applying a multi-layer perceptron MLP to the latent embedding feature where Q v represents the clustering semantic feature of the v-th view;
[0110] Step 4-2, is the i-th row of Q v and represents the probability that sample i belongs to cluster j under the v-th view; Subsequently, a soft assignment is applied to to obtain the target distribution The calculation formula is:
[0111]
[0112] where, represents P vThe j-th column of, where P v is a more robust clustering distribution obtained by adopting a soft assignment strategy to enhance Q v 's clustering structure. represents the probability that sample i belongs to cluster j under the v-th view. Formula (6) performs a square operation on, which can amplify larger probability values while shrinking smaller probability values. This means that for clusters with higher initial probability values, their weights in the target distribution will be further increased, making the clustering structure more obvious. Then, the squared values are normalized to ensure that the sum of the probabilities of each sample in all clusters is equal to 1. This step ensures that the target distribution P v is a valid probability distribution.
[0113] Step 4-3, after obtaining the robust P v clustering distribution, to ensure the consistency of the clustering distribution in different views, contrast learning is performed on P v to obtain consistent clustering results. This is similar to sample-level contrast learning. For the v-th view, there are (VC - 1) cluster pairs, that is where, there are (V - 1) positive cluster pairs The remaining V(N - 1) are classified as negative cluster pairs. P v and P m The clustering-level contrast loss between them is defined by the calculation formula as shown in (10):
[0114]
[0115] Step 4-4, obtain the clustering-level feature loss function L C :
[0116]
[0117] where, is the frequency of the j-th cluster in the v-th view. The second term of formula (11) is a regularization term used to prevent the clustering result from generating a trivial solution.
[0118] Step 5 includes the following steps:
[0119] Step 5-1, calculate the total loss function L overall :
[0120] L overall = L Z + L S + L C (the 12th formula)
[0121] Step 5-2, after minimizing formula (12), for the i-th sample, the clustering prediction calculation formula is:
[0122]
[0123] where y i is the final clustering label of the i-th sample;
[0124] Through clustering prediction, the final clustering division result is obtained.
[0125] As Figure 4 shown, it is the distribution of the MNIST-USPS original dataset. It can be seen that the data is chaotic and stacked together. Figure 5 is the fine-grained feature extracted from the dataset by the autoencoder, revealing that the data has a relatively clear cluster structure, but the intra-cluster structure is not tight. Figure 6 is the coarse-grained feature obtained after the fine-grained feature passes through the advanced MLP. It can be observed that compared with the fine-grained feature, the intra-cluster structure is relatively tight. Figure 7 is the multi-grained feature after fusing the fine-grained feature and the coarse-grained feature. Here, the intra-cluster tightness is significantly increased, and it has a better structure compared with before.
[0126] As Figure 8 shown, it is the distribution of the COL20 original dataset. Figure 9 is the fine-grained feature extracted from the dataset by the autoencoder. Figure 10 is the coarse-grained feature obtained after the fine-grained feature passes through the advanced MLP. Figure 11 is the multi-grained feature after fusing the fine-grained feature and the coarse-grained feature.
[0127] The present invention provides a multi-view contrast clustering method based on multi-grained feature fusion. There are many methods and ways to specifically implement this technical solution. The above description is only the preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention. Each component not clearly defined in this embodiment can be implemented by existing technologies.
Claims
1. A multi-view contrastive clustering method based on multi-granularity feature fusion, characterized in that Including the following steps: Step 1: Use an autoencoder to obtain a fine-grained feature representation of multi-view data in the latent space; Step 2: Adopt a multi-granularity feature fusion method. First, use a multi-layer perceptron (MLP) to obtain coarse-grained features from the fine-grained features. Then, apply the MLP to multi-granularity feature fusion to fuse the fine-grained and coarse-grained features into multi-granularity features; Step 3: Adopt an adaptive weight sample-level contrast method. By measuring the difference between the fused features and the global features of different views, assign corresponding weights to different views; Step 4: Through structure-guided clustering-level contrast learning, use the target distribution to maintain the structure of the clustering semantic features and achieve the consistency of the multi-view clustering results; Step 5: Calculate the total loss function. After minimizing the total loss function, assign clustering labels to each sample through the optimized target distribution to obtain the final clustering result.
2. The method according to claim 1, wherein Step 1 includes: for the sample X of the v-th view v , using the encoder E v (X v ; φ v ), to obtain the set of latent feature representations of all views Z v represents the latent feature of the v-th view, M is the total number of views; D v (X v ; θ v ) is a decoder for obtaining the reconstructed data where φ v and θ v are learnable neural network parameters, and the loss function L z of the entire autoencoder is: Among them, is the i-th original data of the v-th view, is the i-th reconstructed data of the v-th view, denotes first passes through the encoder to obtain the latent features, and then decodes the latent features.
3. The method according to claim 2, wherein Step 2 includes the following steps: Step 2-1, Potential Features Obtained by formula (1), a multi-layer perceptron MLP is stacked to obtain a set of coarse-grained feature representations for all views H v represents the coarse-grained feature matrix of the v-th view, where represents an H-dimensional column vector, represents the coarse-grained feature vector of the i-th sample in the v-th view; Step 2-2: Apply the MLP to multi-granularity feature fusion. The calculation formula is: Among them, F(·) is a mapping function for feature fusion operation, and represents the feature representation of the nth sample under the vth view, represents the embedding representation of the nth sample under the vth view; and are set to have the same dimension, represents the dimension of the original feature space of the vth view, represents the dimension of the embedded feature space of the vth view, represents the dimension of the feature space of the vth view after feature fusion; are the learnable parameters of the multi-layer perceptron MLP for multi-granularity feature fusion; G v is a multi-granularity feature that contains fine-grained and coarse-grained clustering information; Step 2-3, obtaining the multi-granularity feature G through formula (2) v After that, perform sample-level multi-granularity contrastive learning: Given a sample i with multi-granularity features Sample i has VN-1 feature pairs where V represents the total number of views and N represents the number of samples. There are V-1 positive feature pairs The remaining V(N-1) samples are negative feature pairs; the cosine distance is used to represent the similarity between two features, and the calculation formula is: where <·,·> is the dot product operation, is the i-th fused feature of the v-th view, is the j-th fused feature of the m-th view; denotes and the similarity of; Step 2-4, the multi-granularity feature G of the v-th view v and the multi-granularity feature G of the m-th view m The sample-level feature loss function of is as follows: where τ s is the temperature parameter; e is the natural constant; Step 2-5, the sample-level feature loss function L of all views S The calculation formula is as follows:
4. The method according to claim 3, wherein Step 3 includes the following steps: Step 3-1: Adopt an adaptive weight sample-level contrast method. First, obtain multi-granularity feature G based on formula (2). v , and then apply a multi-layer perceptron to the global feature to fuse the from more than two views into a global feature Step 3-2, set the global feature U as the reference feature. By measuring the difference between different views and the reference feature U, assign corresponding weights to different views. The Wasserstein distance WD is used to measure the similarity between different views and the reference feature U. By calculating the Wasserstein distance WD between different views and U, the view with a smaller WD value will be assigned a larger weight value. The calculation formula is: where u j represents the j-th sample in the reference feature U; Step 3-3: The weight calculation formula for each view is: where GW v is the weight occupied by the v-th view; Step 3-4: Combining formula (5), propose the overall adaptive weight sample-level contrast formula: Among them, GW m is the weight occupied by the m-th view.
5. The method according to claim 4, wherein Step 4 includes the following steps: Step 4-1, the potential embedded features are used to obtain an initial clustering semantic feature by applying a multi-layer perceptron MLP where Q v represents the clustering semantic feature of the v-th view; Step 4-2, is the i-th row of Q v and represents the probability that sample i belongs to cluster j under the v-th view; subsequently, a soft assignment is imposed on to obtain the target distribution The calculation formula is: Among them, T j is a normalization factor, represents the j-th column of P v , where P v is a more robust clustering distribution obtained by adopting a soft assignment strategy to enhance the clustering structure of Q v ; represents the probability that sample i belongs to cluster j under the v-th view; Step 4-3, obtain robust P v After the clustering distribution, for P v perform contrastive learning to obtain a consistent clustering result: for the v-th view, there are VC-1 cluster pairs, where C is the total number of clusters, represents the probability distribution of the c-th cluster in the m-th view, where there are V-1 positive cluster pairs the remaining V(N-1) cluster pairs are classified as negative cluster pairs, P v and P m the clustering-level contrastive loss is calculated as follows: where P v and P m are the clustering distributions of the v-th view and the m-th view, respectively; Step 4-4, obtaining the clustering-level feature loss function L of all views C : wherein, is the frequency of the j-th cluster in the v-th view.
6. The method according to claim 5, wherein Step 5 includes the following steps: Step 5-1, calculate the total loss function L overall : L overall = L Z + L S + L C (12); Step 5-2: After minimizing formula (12), for the i-th sample, the clustering prediction calculation formula is: where y i is the final clustering label of the i-th sample; Through clustering prediction, the final clustering division result is obtained.
7. An electronic device, characterized in that, Including a processor and a memory, the memory stores program code, and when the program code is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 6.
8. A storage medium, characterized in that, Stored with a computer program or instruction, when the computer program or instruction runs on a computer, it executes the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Novel multi-granularity feature fusion method based on attention mechanism
CN115905999A
Incomplete multi-view comparative learning method based on cross-view coding and graph constraint
CN119380060A
Multi-view contrast clustering method based on granular balls
CN119474926A