Depth subspace clustering method based on class relation constraint

Through deep learning, the potential features are extracted and the self-representation coefficient matrix is ​​optimized by combining in-class weighted constraints and contrast loss functions, the problem of poor handling of inter-class similarity and in-class differences in high-dimensional data clustering in the existing technology is solved, and the clustering performance and accuracy are significantly improved.

CN120145079APending Publication Date: 2025-06-13GUILIN UNIV OF ELECTRONIC TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510226334.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

Existing subspace clustering methods are difficult to accurately capture the relationship between data when processing high-dimensional data, especially when there are large inter-class similarity and intra-class differences, resulting in a degradation of clustering performance.

Method used

By introducing deep learning, latent features are extracted and self-representation coefficient matrix is ​​constructed, and combined with in-class weighted constraints and contrast loss functions, the latent features and self-representation coefficient matrix are optimized to improve the representativeness and accuracy of clustering results.

Benefits of technology

It effectively improves the accuracy and representativeness of clustering results, especially when processing data with large similarity between classes and large differences within classes, and significantly improves clustering performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120145079A_ABST
    Figure CN120145079A_ABST
Patent Text Reader

Abstract

The invention relates to a depth subspace clustering method based on class relation constraint, which comprises the following steps: encoding input data to obtain potential features; optimizing the potential features by using a first preset loss function; applying a self-representation constraint based on the optimized potential features, and constructing a self-representation coefficient matrix; coefficient regularization constraint is introduced into the self-expression coefficient matrix; optimizing the regularized self-representation coefficient matrix by using a second preset loss function; and clustering is carried out on the optimized self-representation coefficient matrix, so that depth subspace clustering is completed. According to the method, the performance of depth subspace clustering on a complex data set and a small sample data set can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology, and particularly to a depth subspace clustering method based on class relationship constraints. Background Art

[0002] As the dimension increases, the method of using traditional distance metrics to measure the relationship between high-dimensional data points is more significantly affected by the amount of computation and the accuracy of the metric, resulting in the difficulty of traditional clustering algorithms to accurately capture the relationship between data in high-dimensional space. The subspace clustering method assumes that the data is distributed in multiple low-dimensional subspaces, and each data point can be represented as a linear combination of other data points. By constructing a self-representation coefficient matrix to describe the correlation between data points, and optimizing the self-representation coefficient matrix based on constraints such as sparsity, low rank, and block diagonal, the data is grouped into corresponding subspaces to reveal its internal structure and achieve effective clustering of high-dimensional data. However, traditional subspace clustering methods usually directly use the original data to construct the self-representation coefficient matrix, which is restricted by the inter-class similarity and intra-class difference features in the original data, resulting in the similarity matrix being difficult to accurately measure the correlation between data points, thus affecting the accuracy of the self-representation coefficient matrix and the precision of subspace clustering.

[0003] To solve these problems, deep subspace clustering methods utilize deep neural networks to introduce non-linear mappings, extract latent features that can accurately reflect the intrinsic structure of data, improve the expression ability of data features, construct a self-representation coefficient matrix in the latent feature space that can impose traditional constraints such as sparsity, low-rank, and block diagonal, improve the consistency of the self-representation coefficient matrix, improve the performance and accuracy of subspace clustering, and thereby implement spectral clustering, so as to overcome the limitations of traditional subspace clustering methods when processing raw data. The two-stage deep subspace clustering method that first imposes constraints on the self-representation coefficient matrix and then performs spectral clustering is affected by the non-backpropagation of the spectral clustering gradient and cannot use the spectral clustering results to guide latent feature learning, resulting in the algorithm being difficult to reach the optimal solution. Methods such as DCCM and PSSC design classification modules to learn clustering results from latent features, construct a self-supervised loss function through spectral clustering, and thus use the spectral clustering results to guide latent feature learning and improve the network controllability and optimization efficiency. However, the learning ability of this self-supervised method is limited by the accuracy of the spectral clustering results, and the network training effect heavily depends on the sample data volume. When the sample data volume is insufficient or the spectral clustering results are inaccurate, the self-supervised method may be affected, resulting in a decline in clustering performance. To overcome these limitations, adversarial generation methods such as DASC and DSC-DAG can enrich the latent features of samples within the same subspace through a generation network, which can help solve the problems of insufficient sample data volume and unstable spectral clustering results, thereby enhancing the network learning ability. However, the training of the generation network will be affected by the volume of the original data. If the original data volume is too small, the quality of the generated samples may be worse, thereby affecting the clustering accuracy of the network. In addition, the training process of the adversarial generation network is relatively complex and requires careful parameter tuning to ensure the balance between the generator and the discriminator, which may lead to instability in training and difficulty in convergence.

[0004] Both self-supervised and adversarial generation-based subspace clustering methods obtain better clustering results by improving the neural network structure. This result-oriented method focuses on constraining the self-representation coefficient matrix while ignoring the optimization of latent features. Latent features are the key to constructing the self-representation coefficient matrix, and the self-representation coefficient matrix is the basis for clustering. Therefore, the clustering results highly depend on the latent feature expression under this chain relationship. Summary of the Invention

[0005] The objective of the present invention is to provide a deep subspace clustering method based on class relationship constraints, aiming to solve the problem in the prior art that inter-class similarity and intra-class difference cannot be effectively processed during subspace clustering. Although the existing methods describe the relationship between data points by constructing a self-representation coefficient matrix, the construction of the self-representation coefficient matrix of the original data in this method is vulnerable to inter-class similarity and intra-class difference, and these effects are difficult to be effectively compensated by common regularization methods (such as sparsity, low rank or block diagonal constraints). By introducing deep learning, the present invention provides a method to more accurately construct a self-representation coefficient matrix by learning latent features, thereby improving the representativeness and accuracy of clustering results.

[0006] To achieve the above objective, the present invention provides the following solutions:

[0007] A deep subspace clustering method based on class relationship constraints, comprising:

[0008] Encoding the input data to obtain latent features;

[0009] Optimizing the latent features using a first preset loss function

[0010] Imposing a self-representation constraint based on the optimized latent features to construct a self-representation coefficient matrix;

[0011] Introducing a coefficient regularization constraint on the self-representation coefficient matrix;

[0012] Optimizing the regularized self-representation coefficient matrix using a second preset loss function;

[0013] Clustering the optimized self-representation coefficient matrix, thus completing the deep subspace clustering.

[0014] Optionally, before encoding the input data, it includes: performing data augmentation on the input data.

[0015] Optionally, imposing a self-representation constraint based on the optimized latent features includes:

[0016] Realizing the reconstruction of the latent features through the self-representation constraint, and optimizing the learning of the network by minimizing the difference between the latent features and the self-representation reconstructed latent features.

[0017] Optionally, imposing a self-representation constraint based on the optimized latent features further includes:

[0018] Optimizing the latent features after imposing the self-representation constraint by minimizing the self-representation loss;

[0019] The minimization of the self-representation loss is:

[0020]

[0021] Among them, L self-exp represents the minimized self-representation loss, H represents the latent feature, F represents the Frobenius norm, Z is the self-representation coefficient matrix, is the reconstructed latent feature representation that constructs the self-representation constraint relationship based on the latent feature.

[0022] Optionally, introducing coefficient regularization constraints on the self-representation coefficient matrix includes:

[0023] Performing L 1,2 norm regularization on the self-representation coefficient matrix to enforce the sparsity and block diagonal property of the self-representation coefficient matrix.

[0024] Optionally, optimizing the latent feature using the first preset loss function includes:

[0025] Based on the intra-class and inter-class weighted constraint loss function L intra-inter , the relationship between samples in the latent feature space is weighted by the affinity matrix A.

[0026] Optionally, optimizing the regularized self-representation coefficient matrix using the second preset loss function includes:

[0027] By the contrast loss function L tri , positive and negative samples are distinguished within the diagonal blocks of the self-representation coefficient matrix to optimize the sample distribution within each subspace.

[0028] Optionally, the intra-class and inter-class weighted constraint loss function L intra-inter is:

[0029]

[0030] Among them, l i and l j respectively represent the class labels of the latent features, A ij represents the weighted matrix calculated through the self-representation coefficient matrix, d(h i , h j ) represents the Euclidean distance between latent features, and hi and hj represent the i-th and j-th feature vectors in the latent feature matrix.

[0031] Optionally, the contrast loss function L tri is:

[0032]

[0033] Among them, represents the number of positive samples, represents the number of negative samples, Indicates the anchor point, K represents the number of categories, k represents the k-th subspace, and m represents the margin of the contrast loss. and respectively represent the latent features of positive and negative samples.

[0034] The beneficial effects of the invention are as follows:

[0035] By introducing intra-class and inter-class weighted constraints, the present invention enhances the similarity of samples within the same subspace while expanding the differences between different subspaces, thereby improving the clustering effect of the data.

[0036] Introducing a contrast loss function further enhances the similarity within the subspace, distinguishes positive and negative samples, and promotes the accuracy of the clustering result, especially having obvious advantages when dealing with data with large inter-class similarities and intra-class differences.

[0037] The present invention extracts the latent features of data through a deep learning network, avoiding the interference of the original data noise when constructing the self-representation coefficient matrix by traditional methods, and improving the generalization performance of the model in the target field. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0039] Figure 1 It is a schematic flowchart of a deep subspace clustering method based on class relationship constraints according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0040] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts belong to the scope of protection of the present invention.

[0041] To make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the drawings and specific embodiments.

[0042] As Figure 1 shown, this embodiment proposes a deep subspace clustering method based on class relationship constraints, including:

[0043] Encoding the input data to obtain latent features;

[0044] Optimize the latent features using the first preset loss function

[0045] Impose a self - representation constraint based on the optimized latent features to construct a self - representation coefficient matrix;

[0046] Introduce a coefficient regularization constraint on the self - representation coefficient matrix;

[0047] Optimize the regularized self - representation coefficient matrix using the second preset loss function;

[0048] Cluster the optimized self - representation coefficient matrix, and the deep subspace clustering is completed.

[0049] Specifically, in this embodiment, first, by constructing the within - class similarity and between - class difference constraints of the latent features, a method of within - class and between - class weighted constraints of latent features combined with an affinity matrix is proposed to strengthen the separability of data in the subspace; then, guided by the spectral clustering results, a positive - negative sample contrast loss function within the diagonal block of the self - representation coefficient matrix is constructed, so as to further improve the block - diagonal expression ability of the self - representation coefficient matrix on the basis of the latent feature constraints, and provide a more accurate relationship between data for spectral clustering. Through this method, the performance of deep subspace clustering on complex datasets and small - sample datasets is effectively improved. Experimental results show that on multiple benchmark datasets, compared with existing methods, this method shows significant superiority. Especially on the Umist dataset, it is improved by 3.96% compared with the optimal method. Among them, the class relationship constraint refers to the within - class and between - class weighted constraint loss function L intra-inter and the contrast loss function L tri . The self - representation constraint belongs to the constraints in subspace clustering methods.

[0050] Furthermore, before encoding the input data, it includes: performing data augmentation on the input data.

[0051] Furthermore, imposing a self - representation constraint based on the optimized latent features includes:

[0052] Realize the reconstruction of the latent features by constraining the self - representation constraint, and optimize the learning of the network by minimizing the difference between the latent features and the self - representation reconstructed latent features.

[0053] Furthermore, imposing a self - representation constraint based on the optimized latent features also includes:

[0054] Optimize the latent features after imposing the self - representation constraint by minimizing the self - representation loss;

[0055] Furthermore, introducing a coefficient regularization constraint on the self - representation coefficient matrix includes:

[0056] Perform L 1,2 -norm regularization on the self-representation coefficient matrix to enforce sparsity and block diagonal property of the self-representation coefficient matrix.

[0057] Furthermore, optimizing the latent features using a loss function includes:

[0058] Based on the intra-class and inter-class weighted constraint loss function L intra-inter , weight the relationships between samples in the latent feature space through the affinity matrix A.

[0059] Furthermore, optimizing the regularized self-representation coefficient matrix using a loss function includes:

[0060] Through the contrastive loss function L tri , distinguish positive and negative samples within the diagonal blocks of the self-representation coefficient matrix to optimize the sample distribution within each subspace.

[0061] Based on the method of this embodiment, experiments were conducted on the ORL dataset. The following are the specific experimental settings and implementation processes.

[0062] Dataset Preparation

[0063] The ORL dataset contains 400 face images of 40 individuals, with 10 images for each person. These images were taken under different lighting conditions and have different facial expressions and details, such as open eyes / closed eyes, smiling / not smiling, wearing glasses / not wearing glasses. The size of the images is 32×32 pixels.

[0064] Data Preprocessing

[0065] Since the amount of data is small, to increase the diversity of training data, the following data augmentation strategies were adopted: randomly crop into 32×32 image patches; apply Gaussian blur, grayscale transformation, brightness change, contrast change, saturation change, and random flipping.

[0066] Experimental Settings

[0067] The experiments were implemented under the PyTorch framework, using an encoder with three convolutional layers and a decoder with three transposed convolutional layers. The number of channels of the encoder was set as: 10 channels in the first layer, 20 channels in the second layer, and 30 channels in the third layer; the sizes of the convolutional kernels were 3×3, 3×3, and 3×3 in sequence. The number of channels of the decoder was set opposite to that of the encoder, 30 channels in the first layer, 20 channels in the second layer, and 10 channels in the third layer; the sizes of the convolutional kernels of the transposed convolutional layers were the same as those of the convolutional kernels of the encoder, also 3×3.

[0068] Method Description

[0069] The deep subspace clustering method proposed by the present invention optimizes the clustering effect of data by gradually constructing a latent feature space and a self - representation coefficient matrix, and by imposing a series of constraints. Specifically, the method includes the following key steps:

[0070] Construction of the latent feature space:

[0071] The input data is processed through the encoder part of the deep neural network and is first converted into a latent feature space. After the input image is gradually processed through multiple convolutional layers, latent features are obtained. After the latent features are reconstructed through self - representation constraints, the reconstructed image is obtained through the decoder part of the deep neural network. The latent features are represented as where d is the dimension of the latent features and n is the number of samples.

[0072] The encoder includes multiple convolutional layers and activation functions, and the convolutional layers are used to extract valid information from the input data.

[0073] Imposition of self - representation constraints:

[0074] After obtaining the latent features, in order to construct a self - representation coefficient matrix through the latent feature space, self - representation constraints are imposed to obtain the self - representation coefficient matrix such that H = HZ, and by minimizing the self - representation loss to optimize the latent features. Specifically, the generation of the self - representation coefficient matrix depends on the latent features, and the reconstruction of the latent features is achieved by constraining the self - representation constraints. The learning of the network is optimized by minimizing the difference between the latent features and the self - representation reconstructed latent features.

[0075] The self - representation coefficient matrix Z is optimized by minimizing the self - representation loss function L self-exp such that each sample in the latent feature space can be effectively represented as a linear combination of other samples through the self - representation coefficient matrix.

[0076] Regularization of the self - representation coefficient matrix

[0077] By regularizing the block - diagonal structure of the self - representation coefficient matrix Z, using to promote sparsity and block - diagonal property, thereby improving the local clustering ability of the self - representation coefficient matrix.

[0078] To promote the block - diagonal form of the self - representation coefficient matrix, thereby enhancing the separability of data between different subspaces, a coefficient regularization constraint is introduced. This constraint enforces sparsity by performing L 1,2 norm regularization on the self - representation coefficient matrix, thereby promoting the strong self - representation ability of the self - representation coefficient matrix within each subspace. This constraint helps to structure the self - representation coefficient matrix and enables similar samples to form a local clustering in the coefficient matrix.

[0079] Intra-class and inter-class weighted constraint:

[0080] Construct an intra-class and inter-class weighted loss function, using the affinity matrix A to weight the distance between latent features, minimizing the distance between features of the same class and maximizing the distance between features of different classes. The loss function is

[0081]

[0082] The intra-class and inter-class weighted constraint is a loss function in the neural network and a constraint imposed on latent features. The result is to optimize the learning of latent features in the network and thus optimize the data distribution of latent features.

[0083] In the latent feature space, the learning of latent features is further optimized through the intra-class and inter-class weighted constraint. The purpose of this constraint is to enhance the similarity of sample features within the same subspace while expanding the difference between features in different subspaces. Specifically, using the affinity matrix as the weight, the similarity between latent features is measured by the Euclidean distance. This constraint further optimizes the data distribution in the latent feature space by increasing intra-class similarity and inter-class difference.

[0084] Contrastive loss function:

[0085] By minimizing the distance between positive samples and the anchor within the same subspace and maximizing the distance between negative samples and the anchor in different subspaces, the loss function is

[0086]

[0087] The contrastive loss function L tri By minimizing the distance between positive samples and the anchor within the same subspace and maximizing the distance between negative samples and the anchor in different subspaces, the data distribution in the latent feature space is effectively optimized, improving the clustering accuracy.

[0088] To further improve the clustering accuracy within the subspace, this embodiment also introduces a contrastive loss function. This loss function optimizes the sample distribution within each subspace by distinguishing positive and negative samples within the diagonal blocks of the self-representation coefficient matrix. Specifically, positive samples are samples from the same subspace, while negative samples are samples from different subspaces. The contrastive loss improves the clustering accuracy by minimizing the distance between positive samples and the anchor and maximizing the distance between negative samples and the anchor.

[0089] Construction of the total loss function

[0090] The overall loss function of this method consists of the following parts: self-representation loss, coefficient regularization loss, intra-class and inter-class weighted constraint loss, and contrast loss function. By adjusting the weights of each loss term, the influence of each constraint on the learning of latent features and self-representation coefficient matrix can be balanced.

[0091] The total loss function consists of the self-representation loss L self-exp , the regularization loss L coef of the self-representation coefficient matrix, the intra-class and inter-class weighted constraint loss L intra-inter and the contrast loss function L tri . By adjusting the weights of each loss function, the representation ability of latent features and the clustering effect can be balanced.

[0092] In this embodiment, by introducing the intra-class and inter-class weighted constraint, the similarity of samples within the same subspace is enhanced, and at the same time, the difference between different subspaces is enlarged, thereby improving the clustering effect of the data.

[0093] Introducing the contrast loss function further enhances the similarity within the subspace, distinguishes positive and negative samples, and promotes the accuracy of the clustering result, especially having obvious advantages when dealing with data with large inter-class similarity and intra-class difference.

[0094] In this embodiment, the deep learning network is used to extract the latent features of the data, avoiding the interference of the original data noise when constructing the self-representation coefficient matrix, and improving the generalization performance of the model in the target domain.

[0095] The embodiments described above are only descriptions of the preferred embodiments of the present invention, and do not limit the scope of the present invention. Without departing from the design spirit of the present invention, various deformations and improvements made by those of ordinary skill in the art to the technical solutions of the present invention shall fall within the protection scope determined by the claims of the present invention.

Claims

1. A deep subspace clustering method based on class relationship constraints, characterized in that: include: Encode the input data to obtain potential features; Optimizing the potential features using a first preset loss function; Applying self-representation constraints based on the optimized latent features to construct a self-representation coefficient matrix; Introducing coefficient regularization constraints on the self-representative coefficient matrix; Optimizing the regularized self-representation coefficient matrix using a second preset loss function; The optimized self-representation coefficient matrix is ​​clustered to complete the deep subspace clustering.

2. The deep subspace clustering method based on class relationship constraints according to claim 1 is characterized in that: Before encoding the input data, the process includes: performing data enhancement processing on the input data.

3. The deep subspace clustering method based on class relationship constraints according to claim 1 is characterized in that: Imposing self-representation constraints based on the optimized latent features includes: The reconstruction of latent features is achieved through self-representation constraints, and the learning of the network is optimized by minimizing the difference between latent features and self-representation reconstructed latent features.

4. The deep subspace clustering method based on class relationship constraints according to claim 3 is characterized in that: Imposing self-representation constraints based on the optimized latent features further comprises: The latent features after imposing the self-representation constraint are optimized by minimizing the self-representation loss; The minimization of the self-representation loss is: Among them, L self-exp represents minimizing the self-representation loss, H represents the latent features, F represents the Frobenius norm, Z is the self-representation coefficient matrix, It is a reconstructed latent feature representation based on latent features to build self-representation constraints.

5. The deep subspace clustering method based on class relationship constraints according to claim 1 is characterized in that: Introducing coefficient regularization constraints on the self-representative coefficient matrix includes: The self-expression coefficient matrix is ​​L 1,2 Norm regularization is used to enforce the sparsity and block diagonal properties of the self-representative coefficient matrix.

6. The deep subspace clustering method based on class relationship constraints according to claim 1 is characterized in that: Optimizing the potential features using the first preset loss function includes: Based on the intra-class and inter-class weighted constraint loss function L intra-inter , the relationship between samples in the latent feature space is weighted by the affinity matrix A.

7. The deep subspace clustering method based on class relationship constraints according to claim 1 is characterized in that: The regularized self-representation coefficient matrix is ​​optimized using the second preset loss function, including: By comparing the loss function L tri , distinguishing positive and negative samples within the diagonal blocks of the self-representation coefficient matrix and optimizing the sample distribution within each subspace.

8. The deep subspace clustering method based on class relationship constraints according to claim 6 is characterized in that: The intra-class and inter-class weighted constraint loss function L intra-inter for: Among them, l i and l j Represent the category labels of the potential features, A ij represents the weighting matrix calculated by the self-representation coefficient matrix, d(h i ,h j ) represents the Euclidean distance between latent features, hi and hj represent the i-th and j-th eigenvectors in the latent feature matrix.

9. The deep subspace clustering method based on class relationship constraints according to claim 7 is characterized in that: The contrast loss function L tri for: in, represents the number of positive samples, represents the number of negative samples, represents the anchor point, K represents the number of categories, k represents the kth subspace, and m represents the margin of contrast loss. and Represent the potential features of positive and negative samples respectively.