A self-iteration based deep subspace training method and device
By employing a self-iterative deep subspace training method, the model training is optimized through a self-iterative process, which solves the problems of cluster separation, interpretability, and robustness in unsupervised tasks of deep learning, and achieves efficient feature extraction and improved clustering results.
Patent Information
- Application Number
- CN202310632067.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-31
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2043-05-31
AI Technical Summary
Current deep learning methods suffer from the separation of clustering and training in unsupervised tasks, lack interpretability and robustness, consume high computational resources, and are difficult to evaluate effectively.
We employ a self-iterative deep subspace training method, which introduces a self-expression coefficient matrix through the concept of self-iteration. We utilize forward and backward propagation in the self-iterative process to optimize model training, saving computational resources and improving clustering results.
It achieves efficient feature extraction and clustering in unsupervised tasks, improves the accuracy and robustness of clustering results, and saves computing resources.
Smart Images

Figure CN116579401B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of deep network training technology, and in particular to a deep subspace training method and apparatus based on self-iteration. Background Technology
[0002] In recent years, subspace clustering has become an important tool for analyzing high-dimensional data. Its key feature is representing the sample set in the original space through a series of intrinsically low-dimensional subspaces. When mapping to these low-dimensional subspaces, it not only avoids redundant information in the original sample set but also preserves the statistical characteristics of the original data. For example, a video sequence may contain multiple moving objects, and different moving objects can be described using different subspaces. Subspace clustering methods have wide applications, such as image segmentation, motion segmentation, and image clustering.
[0003] Traditional self-representation-based subspace clustering can effectively handle data points located in linear subspaces. However, when the sample set belongs to a nonlinear subspace, traditional subspace clustering methods cannot adequately address this issue. Therefore, some researchers have proposed using kernel tricks to handle nonlinear subspaces, such as kernel sparse subspace clustering and kernel low-rank representation. A significant drawback of kernel trick-based methods lies in the definition of the kernel function. Different datasets typically require different kernel functions, and the selection of the kernel function heavily relies on experience.
[0004] Currently, deep learning has received considerable attention in both practical applications and academic research. However, most methods in deep learning heavily rely on high-quality labeled data, classifying them as supervised learning. In contrast, most data in the real world is unlabeled, or contains mislabeled data or noise. Therefore, in recent years, researchers have gradually shifted their research focus to unsupervised deep learning.
[0005] While deep networks bring significant benefits to traditional clustering methods, they also introduce new problems: (1) Separation of clustering from deep neural network training; a neural network model is trained first, then the hidden layer feature representation of the samples is obtained through the trained network framework, and finally, traditional clustering algorithms are used for clustering. The feature information learned through this distributed training does not necessarily promote clustering. (2) Lack of interpretability. The poor interpretability of the deep network model structure also leads to a lack of interpretability in deep clustering. (3) Lack of robustness. Studies have shown that deep networks usually cannot guarantee the robustness of the results after training and optimization, which will lead to a lack of robustness in the clustering results.
[0006] Therefore, how to better apply deep learning to unsupervised tasks is a worthwhile question to explore. In unsupervised tasks, setting training objectives for the model and judging the training results are crucial and challenging. Currently, most clustering methods improve results in a specific domain or area by continuously refining model details. Simultaneously, many methods aim to combine different models, hoping to achieve a more complete and superior model by combining their strengths. However, in unsupervised tasks, it is difficult to find a standardized evaluation system to judge the quality of results. This prevents the combined advantages of models from being maximized, while increasing computational memory requirements, as different models and data demand more memory and computing resources. Summary of the Invention
[0007] The main objective of this invention is to overcome the problems of the prior art and propose a deep subspace training method and apparatus based on self-iteration. It introduces the idea of self-iteration, uses the results of previous training to supervise the training of the model, and can discard previous training results to save memory and computing resources.
[0008] The present invention adopts the following technical solution:
[0009] On the one hand, a deep subspace training method based on self-iteration includes the following steps:
[0010] The pre-training step involves minimizing the first optimization function to train the deep subspace network and initialize the similarity matrix.
[0011] The training steps are as follows: when the number of iterations t is less than the number of the first iteration, fix the self-expression coefficient matrix, iterate for the second iteration, and update the deep subspace network parameters by minimizing the second optimization function; fix the deep subspace network parameters, iterate for the third iteration, and update the self-expression coefficient matrix by minimizing the third optimization function; update the similarity matrix generated in the t-th iteration based on the updated self-expression coefficient matrix, and finally update the similarity matrix of the first t iterations; increment the number of iterations t by 1 and repeat the training steps.
[0012] Preferably, the first optimization function is constructed based on the overall optimization function of similar samples constructed from all samples and the first subspace clustering loss function, as follows:
[0013]
[0014] Where C represents the self-expression coefficient matrix; W enc Indicates encoder network parameters; W dec Indicates the decoder network parameters; L ins An optimization function representing similar samples; This represents the clustering loss function for the first subspace;
[0015] ||·|| p and Let L1 be the square of the p-norm and the F-norm, respectively, and let L1 = ||C|| p This represents a constraint on the self-expression coefficient matrix, ensuring the sparsity of the subspace structure. The self-expression constraint ensures that the latent feature Z has self-expressive properties; X represents the input image data. This represents reconstructed image data; λ represents the square of the F-norm of the matrix; λ is a hyperparameter representing the weight of this term in the entire optimization function.
[0016] Preferably, the overall optimization function L for constructing similar samples from all samples is... ins It is expressed as follows:
[0017]
[0018]
[0019] in, Let z represent the optimization function for the similarity samples corresponding to sample i; N represents the total number of samples, M is the number of similar samples constructed from a single sample, and z is the number of samples in the similarity samples constructed from a single sample. i Let represent the latent variable corresponding to sample i, and τi represent a temperature parameter controlling the smoothness; s is used to measure the similarity between two samples, using cosine similarity, as follows:
[0020]
[0021] Similarity samples are constructed based on the original samples; for the latent variable z corresponding to the image data i It is constructed by rotating the image, flipping it horizontally, flipping it vertically, adding Gaussian noise, and masking pixels.
[0022] Preferably, the second optimization function is constructed based on the feature loss function and the second subspace clustering loss function, as follows:
[0023]
[0024] Among them, L f Represents the feature loss function; λ represents the second subspace clustering loss function; λ1 represents the weight of the self-expression loss component when updating the depthwise convolutional autoencoder.
[0025] Preferably, the feature loss function is expressed as follows:
[0026] L f =Lins +λ'L clu
[0027] Where λ' represents the weight of the balance between the similarity feature optimization loss and the discriminative feature optimization loss;
[0028] L clu The overall optimization function, which is farthest from all samples, is represented as follows:
[0029]
[0030] Where C' represents the number of clusters;
[0031] The optimization function that is far removed from the sample is expressed as follows:
[0032]
[0033] in, and These represent the samples corresponding to cluster i; and Let i and j represent the samples corresponding to cluster i and cluster j, respectively.
[0034] Preferably, the third optimization function is constructed based on the feature loss function and the third subspace clustering loss function, as follows:
[0035]
[0036] Among them, L exp L is used to ensure the accuracy of the similarity matrix W. div λ is used to ensure the diversity of the similarity matrix W. div λ2 is a hyperparameter used to balance accuracy and diversity, and is the weight of the self-expression loss component when updating the self-expression layer.
[0037] Among them, L div It is expressed as follows:
[0038]
[0039] Where N represents the total number of samples, and Represented as F t-1 With W t The j-th column.
[0040] Preferably, the similarity matrix generated in the t-th iteration is updated based on the updated self-expression coefficient matrix, thus achieving the update of the similarity matrix for the previous t iterations. The specific implementation is as follows:
[0041] F t =(1-α)Ft-1 +αW t
[0042] Among them, F t Let F be the similarity matrix of the first t iterations. t-1 It is represented as the similarity matrix for the first t-1 iterations; Let be the similarity matrix generated in the t-th iteration, where α > 0 represents the adjustment factor, and satisfy F 0 =W 0 .
[0043] On the other hand, a deep subspace training device based on self-iteration includes:
[0044] The pre-training module is used to minimize the first optimization function to train the deep subspace network and initialize the similarity matrix;
[0045] The training module is used to fix the self-expression coefficient matrix and iterate for the second iteration when the iteration number t is less than the first iteration number. It updates the deep subspace network parameters by minimizing the second optimization function. It is also used to fix the deep subspace network parameters and iterate for the third iteration. It updates the self-expression coefficient matrix by minimizing the third optimization function. The similarity matrix generated in the t-th iteration is updated based on the updated self-expression coefficient matrix, and finally the similarity matrix of the first t iterations is updated. The iteration number t is incremented by 1, and the training module is repeated.
[0046] On another front, an image clustering method based on deep subspace includes:
[0047] The self-expression coefficient matrix and similarity matrix are trained using the self-iterative deep subspace training method described above.
[0048] Spectral clustering is performed based on the self-expression coefficient matrix and similarity matrix after training to obtain the final clustering result.
[0049] As can be seen from the above description of the present invention, compared with the prior art, the present invention has the following beneficial effects:
[0050] This invention introduces the concept of self-iteration, using the results of previous training to supervise the model training, while discarding previous training results to save memory and computing resources; finally, the final model result is obtained through a continuous iterative training process, thereby improving the final clustering result. Attached Figure Description
[0051] Figure 1 This is a flowchart of a self-iterative deep subspace training method according to an embodiment of the present invention;
[0052] Figure 2This is a detailed flowchart of the self-iterative deep subspace training method according to an embodiment of the present invention;
[0053] Figure 3 This is a partial example of the dataset in an embodiment of the present invention; wherein, (a) represents ORL; (b) represents COIL20; (c) represents EYaleB; (d) represents COIL100; and (e) represents MNIST_1;
[0054] Figure 4 This is a structural block diagram of a self-iterative deep subspace training device according to an embodiment of the present invention.
[0055] Figure 5 This is a flowchart of an image clustering method based on deep subspace according to an embodiment of the present invention. Detailed Implementation
[0056] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. Furthermore, it should be understood that after reading the teachings of this invention, those skilled in the art can make various alterations or modifications to the invention, and these equivalent forms also fall within the scope defined by the appended claims.
[0057] See Figure 1 As shown, the self-iterative deep subspace training method of the present invention includes the following steps:
[0058] S101, Pre-training step, minimizes the first optimization function to train the deep subspace network to initialize the similarity matrix;
[0059] S102, Training Steps: When the number of iterations t is less than the number of the first iteration, fix the self-expression coefficient matrix, iterate the second iteration, and update the deep subspace network parameters by minimizing the second optimization function; fix the deep subspace network parameters, iterate the third iteration, and update the self-expression coefficient matrix by minimizing the third optimization function; update the similarity matrix generated in the t-th iteration based on the updated self-expression coefficient matrix, and finally update the similarity matrix of the previous t iterations; increment the number of iterations t by 1, and repeat the training steps.
[0060] The concept of self-iteration is explained below. In practice, traditional DSC-Nets obtain their self-representation coefficient matrix through iterative training, where hyperparameters such as the number of iterations significantly impact the final result. However, due to a lack of labeled data, the selection of hyperparameters lacks a basis, and network structure design and parameter initialization can lead to instability in the learned self-representation coefficient matrix. Researchers have proposed improvement methods from different perspectives. For example, Hou et al. proposed Deep Adversarial Subspace Clustering Network (DASC) in 2018, introducing the idea of adversarial learning. First, DSC-Nets generate clustering results, then a discriminator is used to evaluate the current clustering quality, while simultaneously supervising the learning of the DSC-Nets generator to produce a better self-representation matrix, thus achieving better subspace clustering. However, existing research only improves a single DSC-Net from a single perspective to enhance its performance.
[0061] In recent years, research based on the concept of self-iteration has become one of the important research directions in deep learning. The mathematical representation of the self-iteration method can be θ′ t =αθ′ t-1 +(1-α)θ t , where θ′ t Let θ be the model result of the t-th iteration. t Let θ′ be the result of the training iteration t. t-1 Let θ′ represent the model result of the (t-1)th iteration, where α > 0 represents an adjustment factor that controls the weight distribution between the current output and the model results of the previous (t-1)th iterations. It can be observed that θ′ t It includes the training outputs from the previous t iterations, with the weights of the training outputs from the most recent iterations being greater than those from more distant iterations.
[0062] Methods based on the concept of self-iteration are currently mainly applied in semi-supervised learning scenarios and have achieved good results. For example, Laine et al. proposed two models: the Π-model and the temporal model. The core idea of the temporal model is to use a self-iterative method to ensure that the network's historical prediction records for each sample are a moving average, and to drive the prediction of the next iteration to be consistent with the average. Tarvainen et al. further improved the temporal model by changing the original modeling of the predicted category of the sample to modeling the network weights, thereby improving the network performance.
[0063] Most existing literature on self-iterative methods focuses on semi-supervised tasks, with few applications in unsupervised ones. This is primarily because self-iterative methods rely on label-driven training, requiring partial sample label information for a pre-training-like process. This invention applies self-iterative methods to unsupervised tasks. Considering that self-expression constraints in deep subspace clustering networks guarantee the quality of the self-expression coefficient matrix, thus ensuring clustering accuracy, this method can serve as supervisory information. Therefore, this invention proposes a self-iterative deep subspace training method that eliminates the need for label-driven updates, instead using the self-expression coefficient matrix as the update object. The method utilizes forward propagation via self-iteration to smooth the matrix of the current model result, and then uses the matrix of the current model result for backpropagation supervision to generate a differentiated self-expression coefficient matrix.
[0064] The aforementioned self-iterative training approach does not require integrating label information into the model, making it effective for unsupervised tasks. However, it is crucial to find an effective feature extraction method that can aid downstream tasks while avoiding the introduction of label information. Currently, most feature extraction schemes reduce the dimensionality of the input data to preserve as much differentiated feature information as possible. Specifically, this means separating data of different classes or functions. Thanks to the widespread application of deep learning, many studies have used deep learning to help models learn better feature information. Traditional dimensionality reduction methods or methods for extracting differentiated features cannot handle high-dimensional or non-linear data, while deep learning perfectly solves these problems. Therefore, a deep autoencoder network is used to reduce the dimensionality of the original data, resulting in a low-dimensional latent variable. The decoder then restores the latent variable. By optimizing the restored data and the original data, they are made as close as possible. This means that the latent variables in the latent space retain most of the original data feature information while reducing dimensionality. While the network retains as much of the original data's feature information as possible, it cannot guarantee that the retained features will be helpful for subsequent downstream tasks because it does not distinguish effective differential feature information. Therefore, this invention proposes a novel method for extracting differential features to improve the performance of the self-iterative training approach.
[0065] In unsupervised clustering tasks, to generate differentiated feature information, it is necessary to construct similar samples and corresponding distant samples. By distinguishing between similar and distant samples, their similarity and differentiation feature information can be extracted. To construct similar samples, this invention builds corresponding similar samples based on the original samples. For the latent variable z corresponding to image data... i Similar samples can be constructed by image rotation, horizontal flipping, vertical flipping, adding Gaussian noise, and pixel masking. The masking pixel ratio is set to 0.1, and the Gaussian noise has a mean of 0 and a variance of 0.1. This invention uses a low masking ratio and a small-variance Gaussian noise to minimize changes to the original data, achieving a certain similarity to the original image while maintaining significant differences from other samples. The specific implementation of the similarity sample optimization function is as follows:
[0066]
[0067] Where N represents the total number of samples, M is the number of similar samples constructed from a single sample, and z i Let represent the latent variable corresponding to sample i, and τi represent a temperature parameter controlling the smoothness. s is used to measure the similarity between two samples; here, cosine similarity is used, specifically expressed as:
[0068]
[0069] Therefore, the overall optimization function for constructing similarity samples for all samples can be expressed as:
[0070]
[0071] To construct distant samples for corresponding samples, it is desirable for samples from different categories to serve as distant samples, helping the model learn differentiated feature information. Therefore, the subspace clustering results are used as "pseudo-labels" to aid in sample classification. However, considering that the model's clustering of samples may have significant bias in the early stages of training, which can greatly affect the overall results, a multi-step training approach is adopted to mitigate this. The optimization function for distant samples can be specifically expressed as:
[0072]
[0073] in, and These represent the samples corresponding to cluster i. and Let i and j represent the samples corresponding to cluster i and cluster j, respectively.
[0074] Therefore, the global optimization function constructed for all samples farthest from the samples can be expressed as:
[0075]
[0076] Where C' represents the number of clusters.
[0077] A deep subspace training method based on self-iteration first uses the forward propagation process of the self-iteration process to synthesize the base learner results of the first t-1 iterations; secondly, it uses the back propagation process of the self-iteration process, that is, it uses the model result of the current iteration to supervise the generation of the base learner for the next iteration of the network; finally, it obtains the final model result through a continuous iterative training process, thereby improving the final clustering result.
[0078] From the above, see Figure 2 As shown, the core idea of this embodiment of a deep subspace training method based on self-iteration is to use the idea of self-iteration to optimize and constrain the self-expression coefficient matrix, thereby ensuring that the self-expression coefficient matrix is more robust and thus improving the clustering performance.
[0079] The feature compression and reconstruction process using a stacked convolutional autoencoder ensures that the latent feature representation Z can learn more effective data information from the original features. In other words, the compressed feature representation Z is reconstructed to obtain... Make The goal is to approximate the input feature representation X as closely as possible. The self-expression layer ensures that the learned self-expression coefficient matrix possesses structural information about the data; this is achieved by introducing subspace clustering based on self-expression characteristics to optimize the objective function. The self-iterative process of the self-expression layer learns a more robust similarity matrix by generating a new matrix that differs from the current self-expression coefficient matrix, thus ensuring its diversity. The similarity matrix obtained after the first t-1 iterations is used to supervise the generation of the similarity matrix for the t-th iteration, thus obtaining the similarity matrices from the first t iterations. This process is the forward pass of the network framework, expressed as:
[0080] F t =(1-α)F t-1 +αW t (6)
[0081] Among them, F t Let F be the similarity matrix of the first t iterations. t-1 It is represented as the similarity matrix for the first t-1 iterations. Let be the similarity matrix generated in the t-th iteration, where α > 0 represents the adjustment factor, and satisfy F 0 =W 0C represents the self-expression coefficient matrix. It's worth noting that the self-iterative method operates on the self-expression coefficient matrix, rather than the clustering results (pseudo-labels), which is closer to representation learning itself and can save additional computational resources. The self-iterative reverse process (i.e., the supervision process) of the self-expression layer uses the similarity matrix obtained from the previous t iterations to supervise the self-expression coefficient matrix generated in the next iteration, making the generated similarity matrix more diverse.
[0082] The objective function of the entire network framework consists of three parts: (1) subspace clustering loss introduced by the stacked convolutional autoencoder network and the self-expression layer; (2) feature loss introduced by feature extraction; and (3) differential loss introduced by the self-iterative process. The following describes each loss term and its role in detail.
[0083] Subspace clustering loss. To minimize the error between the latent feature representation Z learned during feature compression and ZC after the self-representation layer, thus ensuring that the latent feature Z possesses self-representation properties, constraints are imposed on the self-representation coefficient matrix to maintain the sparsity of the subspace structure. Therefore, to ensure that the latent feature Z contains information consistent with the subspace characteristics, a subspace clustering loss is introduced. The loss function by minimizing the latent feature representation is expressed as:
[0084]
[0085] Among them, ||·|| p and Let L1 be the square of the p-norm and the F-norm, respectively, and let L1 = ||C|| p This represents a constraint on the self-expression coefficient matrix, ensuring the sparsity of the subspace structure. This represents a self-expression constraint, ensuring that the latent feature Z possesses self-expressive properties. X represents the input image data; This represents reconstructed image data; It represents the square of the F-norm of the matrix.
[0086] Feature loss. To make the learned features more specific and discriminative, and to help the model perform better in downstream tasks, feature loss is introduced. Feature loss helps the model learn more discriminative feature information. For samples of the same type and similar samples based on the same type, it tries to find similar feature information as much as possible. For samples of the same type and samples from different clusters that are far apart, it tries to find discriminative feature information as much as possible. The specific loss function can be expressed as:
[0087] L f =L ins +λ'L clu (8)
[0088] Where λ' represents the weights of the similarity feature optimization loss and the discriminative feature optimization loss. Dissimilarity loss: To ensure that the self-expression coefficient matrix learns to be different from the similarity matrix of the current iteration, a dissimilarity loss is introduced. The loss function can be expressed as:
[0089]
[0090] Where N represents the number of samples, and Represented as F t-1 With W t The j-th column.
[0091] To effectively train the overall model, a self-iterative deep subspace training method employs a three-step training strategy:
[0092] (1) Pre-training.
[0093] To learn relatively effective latent variables and self-expression coefficient matrices, a deep convolutional autoencoder network and a deep subspace clustering network with self-expression layers are first trained. This provides an effective initialization matrix for subsequent training and also accelerates the network's convergence time. The optimization objective can be expressed as:
[0094]
[0095] Where C represents the self-expression layer parameters, i.e., the self-expression coefficient matrix. W enc W dec These represent the encoder network parameters and the decoder network parameters, respectively. L is added here. ins This indicates the intention to use the first part of feature extraction (effective features of similar samples) to help the model pre-train and obtain more effective latent variables.
[0096] (2) Update the weights of the depthwise convolutional autoencoder.
[0097] To learn an effective self-representation coefficient matrix, a good latent feature space representation Z is first needed. The optimization objective function is expressed as:
[0098]
[0099] Where λ1 is the weight of the self-expression loss component when updating the depthwise convolutional autoencoder.
[0100] (3) Update the weights of the self-expression layer.
[0101] To ensure the accuracy and diversity of the learned self-expression coefficient matrix, subspace clustering loss and dissimilarity loss with self-expression characteristics are introduced. The optimization objective function is expressed as:
[0102]
[0103] Among them, L exp L is used to ensure the accuracy of the similarity matrix W. div λ is used to ensure the diversity of similarity matrices W. div The hyperparameter λ2 is used to balance accuracy and diversity, and it represents the weight of the self-expression loss component when updating the self-expression layer. The algorithm flow is as follows, where N-cut is a clustering method. Simply put, it performs spectral clustering on the self-expression matrix after training to obtain the final clustering result.
[0104]
[0105] The effectiveness of the proposed method will be verified through experiments. The model building, training, and algorithm performance evaluation involved in the experiments were all implemented in an Ubuntu system environment. The network model was built and optimized using the PyTorch framework, and the implementation code was written in Python. This embodiment will introduce the method from five aspects: experimental data, comparison methods, evaluation metrics, experimental design, and experimental results.
[0106] 1. Dataset
[0107] See Figure 3 As shown, some samples from the five datasets used in the experiment include ORL, COIL20, Extended YaleB, COIL100, and MNIST_1.
[0108] The ORL dataset consists of photos taken of volunteers from different facial angles and with varying facial expressions. During the experiment, the images were uniformly downsampled to a length and width of 32.
[0109] The Extended Yale B dataset consists of photos taken by volunteers under different lighting conditions. During the experiment, the images were uniformly downsampled to a length of 48 and a width of 42.
[0110] Both the COIL20 and COIL100 datasets contain toy images taken at different rotation angles. In the experiments, images were uniformly downsampled to a length and width of 32.
[0111] The MNIST_1 dataset is a handwritten digit dataset consisting of 1000 randomly selected images from the MNIST dataset. This dataset statistically analyzes handwritten digit images from different individuals and categorizes them into 10 classes. Each image in this dataset is 28 pixels long and 28 pixels wide.
[0112] 2. Baseline Method
[0113] The comparison methods are mainly divided into two categories: (1) Traditional subspace clustering methods without incorporating deep network frameworks: including Low Rank Representation (LRR), Low Rank Subspace Clustering (LRSC), Sparse Subspace Clustering (SSC), Kernel Sparse Subspace Clustering (KSSC), Sparse Subspace Clustering + Orthogonal Matching (SSC-OMP) and Efficient Dense Subspace Clustering (EDSC); (2) Subspace clustering methods incorporating deep networks: Pre-trained Convolutional Autoencoder Network + Sparse Subspace Clustering (AE+SSC), Pre-trained Convolutional Autoencoder Network + Efficient Dense Subspace Clustering (AE+EDSC), Deep Subspace Clustering Network (DSC-Nets), Deep Low Rank Subspace Clustering (DLRSC), Deep Adversarial Subspace Clustering (DASC), and Overcomplete Deep Subspace Clustering Network (ODSC).
[0114] 3. Evaluation Indicators
[0115] For the final clustering results, accuracy (acc) was used as the evaluation metric to assess the algorithm's performance. Accuracy is generally used to represent the probability that a sample is correctly classified by the algorithm, and can be specifically expressed as:
[0116]
[0117] Error rate (Error, err) can be expressed as:
[0118] err=1-acc(10)
[0119] Where δ represents the indicator function and map represents the transformation function.
[0120] 4. Experimental Design
[0121] The model building, training, and algorithm performance evaluation involved in the experiment were all implemented in a Windows 10 system environment. The network model was built and optimized using the PyTorch framework, and the implementation code was written in Python.
[0122] In the experimental design, the network framework designed for the five image datasets was a convolutional autoencoder network, because convolutional layers have good feature extraction capabilities for image data. Furthermore, the network framework design maintained the same deep convolutional autoencoder structure as the classic deep subspace clustering network framework (DSC-Nets) to ensure the rationality of the experimental design.
[0123] The clustering results are analyzed as follows.
[0124] Table 1. Clustering error rates (%) of different methods on five benchmark datasets.
[0125]
[0126]
[0127] *Note: The best results for each dataset in the table are marked in bold.
[0128] The comparative experimental results are shown in Table 1. The table shows that, overall, the performance of deep subspace clustering methods is significantly better than traditional subspace clustering methods, and the self-iterative deep subspace training method proposed in this invention exhibits the best average performance. For algorithms such as DSC-Nets and DASC, this invention selects the best experimental results for comparison. Specifically, DLRSC reproduces the results for each dataset using the source code and hyperparameter settings provided by the original authors. The experimental results for MNIST_1 are referenced from the experiments of Yu et al. (The symbol '-' indicates that the original authors did not provide experimental results for this dataset).
[0129] The experimental results show that the self-iterative deep subspace training method proposed in this invention achieves state-of-the-art performance on the ORL, COIL20, COIL100, and MNIST_1 datasets. On the EYaleB dataset, DASC performs better, while the method proposed in this invention is comparable and significantly outperforms the other methods. This may be because the EYaleB dataset consists of images of individuals taken under varying lighting conditions, possessing inherently strong subspace characteristics, thus limiting the improvement that self-iterative training can achieve.
[0130] The improvement of deep subspace clustering by the self-iterative training method was analyzed, yielding the following results: On the ORL dataset, it achieved a 4.75% improvement in accuracy compared to DSC-Nets; on the COIL20 dataset, a 3.82% improvement; on the COIL100 dataset, a 5.23% improvement; and on the MNIST_1 dataset, an 8.8% improvement. As mentioned earlier, the EYaleB dataset itself has excellent subspace characteristics, so the improvement of the self-iterative training method is limited, achieving only a 0.81% improvement in accuracy compared to DSC-Nets.
[0131] 5. Robustness Analysis
[0132] In the real world, data often contains a certain amount of noise, requiring models to be robust to noise. Random Gaussian noise with a mean of 0 and a standard deviation σ∈{0.2,0.4,0.6,0.8,1.0} is added to the ORL and EYaleB datasets, and clustering is performed using DSC-L2 and the method of this invention. Note that to eliminate the influence of pre-trained weights, the pre-trained autoencoder weights used in this invention are consistent with those of DSC-L2, and the experimental results for DSC-L2 are obtained using the source code and hyperparameter tests provided in the paper.
[0133] The results of the experiments are shown in Table 2 for the ORL dataset and in Table 3 for the EYaleB dataset.
[0134] Table 2 shows the clustering error rate (%) on the ORL dataset with Gaussian noise added.
[0135]
[0136] Table 3 shows the clustering error rate (%) on the EYaleB dataset with Gaussian noise added.
[0137]
[0138] As can be seen from Tables 2 and 3, the method of the present invention outperforms DSC-L2 under different noise conditions and exhibits smaller fluctuations. This indicates that the method of the present invention is more robust to noise than DSC-L2.
[0139] To test the model's robustness to the initialization of self-expression layer parameters, experiments were also conducted on the ORL and EYaleB datasets, using {0×1, 1×10} parameters respectively. -4 ×1, 1×10 -6 ×1, 1×10 -8 ×1, 1×10 -10The self-expression layer weights are initialized with 1 / x (where 1 is an all-one matrix). The results for the ORL dataset are shown in Table 4, and the results for the EYaleB dataset are shown in Table 5.
[0140] Table 4 shows the clustering error rates (%) for different self-expression layers initialized on the ORL dataset.
[0141]
[0142] Table 5 shows the clustering error rates (%) on the EYaleB dataset initialized with different self-expression layers.
[0143]
[0144] As can be seen from Tables 4 and 5, the method of the present invention consistently outperforms DSC-L2 under different initialization conditions. This indicates that, compared to DSC-L2, the method of the present invention is more robust to the initialization of self-expression layer parameters.
[0145] This invention proposes a deep subspace training method based on self-iteration, which optimizes the model through self-iteration training. In summary, the forward propagation of the self-iteration process is used to combine the structure of all self-expression coefficient matrices in the current iteration, while the backpropagation of the self-iteration process is used to supervise the self-expression layers, ensuring that the next iteration produces a more discriminative self-expression coefficient matrix, thus obtaining a more robust similarity matrix and ultimately better subspace clustering results. Simultaneously, a feature extraction method is employed to effectively distinguish between similar features of similar samples and discriminative features of samples far apart, enabling the model to learn discriminative feature information. Finally, multi-angle experimental analysis on five benchmark datasets verifies its effectiveness.
[0146] See Figure 4 As shown, this embodiment also provides a self-iterative deep subspace training device, including:
[0147] The pre-training module 401 is used to minimize the first optimization function to train the deep subspace network to initialize the similarity matrix;
[0148] Training module 402 is used to fix the self-expression coefficient matrix and iterate for the second iteration when the iteration number t is less than the first iteration number. It updates the deep subspace network parameters by minimizing the second optimization function. It is also used to fix the deep subspace network parameters and iterate for the third iteration. It updates the self-expression coefficient matrix by minimizing the third optimization function. The similarity matrix generated in the t-th iteration is updated based on the updated self-expression coefficient matrix, and finally the similarity matrix of the first t iterations is updated. The iteration number t is incremented by 1, and the training module is repeated.
[0149] The specific details of each module of the self-iterative deep subspace training device are the same as the self-iterative deep subspace training method, and will not be repeated in this embodiment.
[0150] See Figure 5 As shown, based on a self-iterative deep subspace training method and the above experiments, this embodiment also provides an image clustering method based on deep subspace, including:
[0151] S501, The self-expression coefficient matrix and similarity matrix are trained using the self-iteration-based deep subspace training method described above;
[0152] S502, based on the self-expression coefficient matrix and similarity matrix after training, performs spectral clustering to obtain the final clustering result.
[0153] The above are merely specific embodiments of the present invention, but the design concept of the present invention is not limited thereto. Any non-substantial modifications made to the present invention using this concept shall be considered as infringing upon the protection scope of the present invention.
Claims
1. A deep subspace training method based on self-iteration, characterized in that, Includes the following steps: The pre-training step involves minimizing the first optimization function to train the deep subspace network and initialize the similarity matrix. Training steps, in the number of iterations When the number of iterations is less than the number of iterations in the first iteration, fix the self-expression coefficient matrix and iterate for the second iteration, updating the deep subspace network parameters by minimizing the second optimization function; fix the deep subspace network parameters and iterate for the third iteration, updating the self-expression coefficient matrix by minimizing the third optimization function, and then updating the first iteration based on the updated self-expression coefficient matrix. The similarity matrix generated in the second iteration ultimately achieves the first The similarity matrix is updated in the next iteration; let the number of iterations be... Increase by 1, repeat the training steps; The first optimization function is constructed based on the overall optimization function of similar samples built from all samples and the first subspace clustering loss function, as follows: ; in, Represents the self-expression coefficient matrix; Indicates encoder network parameters; Indicates the decoder network parameters; An optimization function representing similar samples; This represents the clustering loss function for the first subspace; and They are respectively represented as Norm and The square of the norm, This represents a constraint on the self-expression coefficient matrix, ensuring the sparsity of the subspace structure. This indicates self-expression constraints and ensures latent characteristics. It has the characteristic of self-expression; This represents the input image data; This represents reconstructed image data; The square of the F-norm of a matrix is given by . is a hyperparameter representing the weight of this term in the entire optimization function; The second optimization function is constructed based on the feature loss function and the second subspace clustering loss function, as follows: ; in, Represents the feature loss function; This represents the clustering loss function for the second subspace; This represents the weights of the self-representation loss when updating the depthwise convolutional autoencoder; The third optimization function is constructed based on the feature loss function and the third subspace clustering loss function, as follows: ; in, Used to ensure the similarity matrix accuracy, Used to ensure the similarity matrix diversity, Hyperparameters used to balance accuracy and diversity The self-expression loss weight is applied when updating the self-expression layer; in, It is expressed as follows: ; in, This represents the total number of samples. and They are respectively represented as and The List, Indicated as before The similarity matrix of the next iteration.
2. The deep subspace training method based on self-iteration according to claim 1, characterized in that, The overall optimization function for constructing similar samples from all samples. It is expressed as follows: ; ; in, Let z represent the optimization function for the similarity samples corresponding to sample i; N represents the total number of samples, M is the number of similar samples constructed from a single sample, and z is the number of samples in the similarity samples constructed from a single sample. i This represents the latent variable corresponding to sample i. This represents a temperature parameter that controls smoothness; s is used to measure the similarity between two samples, employing cosine similarity, as shown below: ; Similarity samples are constructed based on the original samples; for the latent variable z corresponding to the image data i It is constructed by rotating the image, flipping it horizontally, flipping it vertically, adding Gaussian noise, and masking pixels.
3. The deep subspace training method based on self-iteration according to claim 1, characterized in that, The feature loss function is expressed as follows: ; in, This represents the weights used to balance the similarity feature optimization loss and the discriminative feature optimization loss. The overall optimization function, which is farthest from all samples, is represented as follows: ; in, Represented as the number of clusters; The optimization function that is far removed from the sample is expressed as follows: ; in, and These represent the samples corresponding to cluster i; and Let i and j represent the samples corresponding to cluster i and cluster j, respectively.
4. The deep subspace training method based on self-iteration according to claim 1, characterized in that, Update the first self-expression coefficient matrix. The similarity matrix generated in the second iteration ultimately achieves the first The update of the similarity matrix in the next iteration is implemented as follows: ; in, Indicated as before The similarity matrix of the next iteration; Represented as the first The similarity matrix generated in the next iteration Let it be a regulating factor, and satisfy the following conditions: .
5. A deep subspace training device based on self-iteration, characterized in that, The method based on any one of claims 1 to 4 includes: The pre-training module is used to minimize the first optimization function to train the deep subspace network and initialize the similarity matrix; The training module is used to train the system at the specified number of iterations. When the number of iterations is less than the first iteration number, the self-expression coefficient matrix is fixed, and the second iteration number is iterated. The deep subspace network parameters are updated by minimizing the second optimization function. This is also used to fix the deep subspace network parameters, iterate a third time, and update the self-expression coefficient matrix by minimizing the third optimization function. The updated self-expression coefficient matrix is then used to update the first iteration number. The similarity matrix generated in the second iteration ultimately achieves the first The similarity matrix is updated in the next iteration; let the number of iterations be... Add 1, repeat training module.
6. An image clustering method based on deep subspace, characterized in that, include: The self-expression coefficient matrix and similarity matrix are trained using the self-iterative deep subspace training method as described in any one of claims 1 to 4; Spectral clustering is performed based on the self-expression coefficient matrix and similarity matrix after training to obtain the final clustering result.
Citation Information
Patent Citations
Subspace clustering method and device, equipment and storage medium
CN114897053A
Image clustering method and system based on depth subspace clustering sequence integration
CN115359281A