Non-negative matrix factorization face clustering method and device based on graph learning and pseudo tag guidance and medium
By combining graph learning and subspace learning methods, the affinity matrix and graph Laplace matrix are adaptively constructed, and the pseudo-label matrix is introduced, which solves the problem that traditional NMF cannot fully utilize spatial information when processing data with graph structures, and achieves higher accuracy and stability in face recognition.
Patent Information
- Application Number
- CN202510397374.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-05-02
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional non-negative matrix decomposition (NMF) cannot fully utilize the spatial information of the data when processing data with graph structures, and the calculation complexity is high. The existing graph learning and pseudo-label-guided NMF methods did not update the Laplace matrix during the iteration process, ignoring the learning guidance role of pseudo-labels, resulting in low accuracy in face recognition.
By combining graph learning and subspace learning methods, the affinity matrix and graph Laplace matrix are adaptively constructed, and the pseudo-label matrix is introduced, the Laplace matrix and basis matrix are updated, and the objective function is optimized to obtain the optimal solution.
It effectively improves the accuracy of face clustering and recognition, enhances the generalization ability and training efficiency of the model, can better utilize the spatial structure information of the data, and improves the accuracy and stability of the model.
Smart Images

Figure CN119919696A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data analysis and machine learning, and more specifically, to a non-negative matrix decomposition face clustering method, device and medium based on graph learning and pseudo-label guidance. Background Art
[0002] Non-negative matrix factorization (NMF) is a matrix decomposition method widely used in data analysis. Its basic idea is to decompose a non-negative matrix into two non-negative matrices so that their product approximates the original matrix. It is often used in image processing, document clustering, and recommendation systems. However, traditional NMF has some limitations, especially when processing data with graph structures, it cannot fully utilize the spatial information of the data. In addition, when the original data is very large, the number of basis vectors of the basis matrix of NMF may also increase, resulting in high computational complexity.
[0003] Graph learning and pseudo-label guided non-negative matrix factorization (GPNMF) constructs affinity matrices adaptively through self-learning on the one hand, and on the other hand, the introduction of pseudo-label matrices fills the gaps of missing labels, improves the generalization ability and training efficiency of the model, and thus enhances the clustering ability of NMF. Most of the existing Laplacian matrices are not updated during the iteration process, which does not meet the requirements of the optimal solution; and also ignores the powerful learning guidance role of pseudo-labels. Therefore, the existing methods have not yet achieved ideal results when processing the spatial information of data. How to further improve the accuracy of face recognition based on image data is a technical problem that needs to be solved urgently. Summary of the invention
[0004] In order to solve the above technical problems, the present invention provides a non-negative matrix decomposition face clustering method, device and medium based on graph learning and pseudo-label guidance, which combines the advantages of graph learning and subspace learning, thereby effectively improving the performance in classification and clustering tasks, and making it have broad application prospects.
[0005] In a first aspect, the present invention provides a non-negative matrix decomposition face clustering method based on graph learning and pseudo-label guidance, the method comprising: Obtaining a data matrix, a pseudo-label matrix, a regularization parameter, and a number of clusters; wherein the data matrix includes face image data, and the pseudo-label matrix is obtained by performing Kmeans clustering on the data matrix; Randomly initialize the basis matrix W , encoding matrix H , self-representation coefficient matrix C and the auxiliary matrix A ; Based on the basis matrix W , encoding matrix H , self-representation coefficient matrixC and the auxiliary matrix A , determine the affinity matrix P and the diagonal matrix Q , and according to the affinity matrix P and the diagonal matrix Q Determine the graph Laplacian matrix L ; Iterate based on the set maximum number of iterations, and update the base matrix in turn during each iteration. W , encoding matrix H , self-representation coefficient matrix C and the auxiliary matrix A , updating the graph Laplacian matrix through the affinity matrix; In the iteration of the whole process, the objective function is minimized until the objective function converges or the number of iterations reaches the maximum number of iterations, and the clustering result is obtained.
[0006] Furthermore, the data matrix is expressed as , the pseudo label matrix is expressed as ,in X is the data matrix, is the set of real numbers, m is the feature dimension, n is the number of samples, Y is the pseudo label matrix, r is the number of categories.
[0007] Furthermore, the affinity matrix P It is expressed as: ; In the formula, T Represents matrix transpose.
[0008] Furthermore, the diagonal matrix Q It is expressed as: ; In the formula, Q ii represents the value of the i-th row and i-th column of matrix Q, j Indicates the sample number, P ij Represents the affinity matrix P The value of row i and column j, n Indicates the number of samples.
[0009] Furthermore, the graph Laplacian matrix L It is expressed as: ; Furthermore, the self-representation coefficient matrix C satisfy ;in, diag represents a diagonal matrix.
[0010] Furthermore, in each iteration, the basis matrix is updated in sequence by the following formula: W , encoding matrix H , self-representation coefficient matrix C and the auxiliary matrix A : ; In the formula, W ij Represents the value of the i-th row and j-th column of the matrix W; Both represent regularization parameters; express The value of the i-th row and j-th column of the matrix; Representation Matrix The value of row i and column j; Represents the value of the j-th row and k-th column of matrix H; Representation Matrix The value of row i and column j; Representation Matrix The value of row i and column j; Represents the value of the kth row and kth column of matrix C; Representation Matrix The value of row k and column k; Representation Matrix The value of row k and column k; Represents the value of the j-th row and j-th column of matrix A; Representation Matrix The value of row j and column j; Representation Matrix The value of row j and column j; T Represents matrix transpose.
[0011] Furthermore, the objective function is expressed as: ; In the formula, min means taking the minimum value, || || F represents the F-norm; Tr represents trace operation; diag represents a diagonal matrix; st represents a constraint condition; Both represent regularization parameters; T Represents matrix transpose.
[0012] In a second aspect, the present invention provides a non-negative matrix decomposition face clustering device based on graph learning and pseudo-label guidance, the device comprising: A data acquisition module is configured to acquire a data matrix, a pseudo label matrix, a regularization parameter, and a number of clusters; wherein the data matrix includes face image data, and the pseudo label matrix is obtained by performing Kmeans clustering on the data matrix; Matrix initialization module, configured to randomly initialize the base matrix W , encoding matrix H , self-representation coefficient matrix C and the auxiliary matrix A ; A matrix determination module is configured to determine the W , encoding matrix H , self-representation coefficient matrix C and the auxiliary matrix A , determine the affinity matrix P and the diagonal matrix Q , and according to the affinity matrix P and the diagonal matrix Q Determine the graph Laplacian matrix L ; The iterative update module is configured to iterate based on a set maximum number of iterations, and in each iteration process, the base matrix is updated in turn. W , encoding matrix H , self-representation coefficient matrix C and the auxiliary matrix A , updating the graph Laplacian matrix through the affinity matrix; The clustering output module is configured to minimize the objective function in the iteration of the whole process until the objective function converges or the number of iterations reaches the maximum number of iterations, and the clustering result is obtained.
[0013] In a third aspect, the present invention provides a readable storage medium, wherein the readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the method as described above.
[0014] The present invention has at least the following beneficial effects: 1) The present invention combines the self-representation method in subspace learning to generate representation coefficients and further calculate the Laplace matrix, and updates the Laplace matrix in the iterative process to ensure the generation of the optimal solution. In addition, the present invention also introduces a pseudo-label matrix. By introducing pseudo-category information, the ability of the base matrix to extract features and the ability of the weight matrix to describe feature coefficients are enhanced, thereby effectively improving the face clustering effect and face recognition accuracy.
[0015] 2) By updating the Laplace matrix and combining it with self-representation learning, the present invention can more effectively utilize the spatial structure information of the data in the process of matrix decomposition, thereby improving the ability of NMF in clustering tasks. At the same time, the introduction of the pseudo-label matrix further enhances the discriminative ability of the model and can better distinguish different categories of data. Compared with the traditional GNMF method, GPNMF can adaptively update the Laplace matrix, improving the accuracy and stability of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 An overall flow chart of a fair clustering method for symmetric non-negative matrix decomposition according to an embodiment of the present invention is shown.
[0017] Figure 2 A flowchart of a fair clustering method for symmetric non-negative matrix decomposition according to an embodiment of the present invention is shown.
[0018] Figure 3 A structural diagram of a clustering device for graph regular non-negative matrix decomposition according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0019] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. The embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings and specific embodiments, but are not intended to limit the present invention. For the various steps described herein, if there is no necessity for a causal relationship between each other, the order in which they are described as examples herein should not be regarded as a limitation, and those skilled in the art should know that they can be adjusted in order, as long as the logic between them is not destroyed, resulting in the inability to implement the entire process.
[0020] The embodiment of the present invention provides a non-negative matrix decomposition face clustering method based on graph learning and pseudo-label guidance. The method includes data input, initialization, update rules and Laplace matrix update. Through the iterative optimization process, the optimal matrix decomposition result is finally obtained and applied to actual data analysis tasks, such as face image recognition. It should be noted that in addition to the application of the method proposed in the present invention in the field of image processing, without loss of generality, it can also be expanded to document clustering, recommendation system, data dimensionality reduction and other fields, especially when processing graph structured data, it can significantly improve the effect and accuracy of data analysis.
[0021] like Figure 1As shown in Figure 1, it is an overall flow chart of a non-negative matrix factorization face clustering method based on graph learning and pseudo-label guidance. The method first performs Kmeans clustering on the data matrix X according to the input data, that is, the data matrix X and the number of clusters r, and constructs the pseudo-label matrix Y: Kmeans(X). Then, the parameters are initialized, including the maximum number of iterations Max and the regularization parameter Next, initialize the initial matrix, where the initial matrix includes the basis matrix W , encoding matrix H , self-representation coefficient matrix C and the auxiliary matrix A Then, iterative update is performed. In each iterative update process, the matrix is updated. Updating the matrix refers to updating the four initial matrices based on the set update method until the maximum number of iterations is reached or convergence occurs, where convergence refers to the convergence of the objective function. If the maximum number of iterations or convergence is not reached, the number of iterations is increased by 1, and the step of updating the matrix is repeated until the maximum number of iterations or convergence occurs, and the clustering result Kmeans (H) is obtained.
[0022] like Figure 2 As shown, it is a flowchart of a non-negative matrix decomposition face clustering method based on graph learning and pseudo-label guidance. The non-negative matrix decomposition face clustering method based on graph learning and pseudo-label guidance can be implemented by steps S10 to S50 during specific implementation, which is described in detail as follows.
[0023] S10, obtaining a data matrix, a pseudo-label matrix, a regularization parameter and a number of clusters; wherein the data matrix includes face image data, and the pseudo-label matrix is obtained by performing Kmeans clustering on the data matrix.
[0024] In this embodiment, the data matrix is represented as , the pseudo label matrix is expressed as ,in X is the data matrix, is the set of real numbers, m is the feature dimension, n is the number of samples, Y is the pseudo label matrix, r is the number of categories.
[0025] S20, randomly initialize the basis matrix W , encoding matrix H , self-representation coefficient matrix C and the auxiliary matrix A。
[0026] S30, based on the basis matrix W , encoding matrix H , self-representation coefficient matrixC and the auxiliary matrix A , determine the affinity matrix P and the diagonal matrix Q , and according to the affinity matrix P and the diagonal matrix Q Determine the graph Laplacian matrix L .
[0027] In an exemplary embodiment, four matrices are randomly initialized , , , And meet , and calculate the affinity matrix and the diagonal matrix ,in , graph Laplacian matrix .in, Q ii represents the value of the i-th row and i-th column of matrix Q, j Indicates the sample number, P ij Represents the affinity matrix P The value of row i and column j, n Indicates the number of samples.
[0028] S40, iterating based on the set maximum number of iterations, and updating the base matrix in turn during each iteration W , encoding matrix H , self-representation coefficient matrix C and the auxiliary matrix A , updating the graph Laplacian matrix through the affinity matrix.
[0029] In an exemplary embodiment, Figure 1 As shown, the basis matrix is updated in sequence by the following formula W , encoding matrix H , self-representation coefficient matrix C and the auxiliary matrix A : ; In the formula, W ij Represents the value of the i-th row and j-th column of the matrix W; Both represent regularization parameters; express The value of the i-th row and j-th column of the matrix; Representation Matrix The value of row i and column j; Represents the value of the j-th row and k-th column of matrix H; Representation Matrix The value of row i and column j; Representation Matrix The value of row i and column j; Represents the value of the kth row and kth column of matrix C; Representation Matrix The value of row k and column k; Representation Matrix The value of row k and column k; Represents the value of the j-th row and j-th column of matrix A; Representation Matrix The value of row j and column j; Representation Matrix The value of row j and column j; T Represents matrix transpose.
[0030] In an exemplary embodiment, after each update, the matrix Calculate the new Laplacian matrix , and is updated during the iteration process to optimize the manifold relationship in the graph.
[0031] S50. In the iteration of the whole process, the objective function is minimized until the objective function converges or the number of iterations reaches the maximum number of iterations, and a clustering result is obtained.
[0032] In an exemplary embodiment, in the iteration of the whole process, the objective function is minimized, which is expressed as: ; In the formula, min means taking the minimum value, || || F represents the F-norm; Tr represents trace operation; diag represents a diagonal matrix; st represents a constraint condition; Both represent regularization parameters; T Represents matrix transpose.
[0033] And iterate through the update rule until the objective function converges or reaches the maximum number of iterations, and obtain the clustering result Kmeans (H), which can characterize the category of the current input face image.
[0034] In summary, the method proposed in the present invention can more effectively utilize the spatial structure information of the data in the process of matrix decomposition by updating the Laplace matrix and combining self-representation learning, thereby improving the ability of NMF in clustering tasks. At the same time, the introduction of the pseudo-label matrix further enhances the discrimination ability of the model and can better distinguish different categories of data. Compared with the traditional GNMF method, the present invention can adaptively update the Laplace matrix and improve the accuracy and stability of the model.
[0035] The embodiment of the present invention also provides a non-negative matrix decomposition face clustering device based on graph learning and pseudo-label guidance, such as Figure 3 As shown, the non-negative matrix decomposition face clustering device based on graph learning and pseudo-label guidance includes: The data acquisition module 301 is configured to acquire a data matrix, a pseudo label matrix, a regularization parameter and a number of clusters; wherein the data matrix includes face image data, and the pseudo label matrix is obtained by performing Kmeans clustering on the data matrix; The matrix initialization module 302 is configured to randomly initialize the base matrix W , encoding matrix H , self-representation coefficient matrix C and the auxiliary matrix A ; The matrix determination module 303 is configured to determine the matrix based on the base matrix W , encoding matrix H , self-representation coefficient matrix C and the auxiliary matrix A , determine the affinity matrix P and the diagonal matrix Q , and according to the affinity matrix P and the diagonal matrix Q Determine the graph Laplacian matrix L ; The iterative update module 304 is configured to perform iterations based on a set maximum number of iterations, and in each iteration, update the base matrix W , encoding matrix H , self-representation coefficient matrix C and the auxiliary matrix A , updating the graph Laplacian matrix through the affinity matrix; The clustering output module 305 is configured to minimize the objective function in the iteration of the entire process until the objective function converges or the number of iterations reaches the maximum number of iterations, thereby obtaining a clustering result.
[0036] In some embodiments, the data matrix is represented as , the pseudo label matrix is expressed as ,in X is the data matrix, is the set of real numbers, m is the feature dimension, n is the number of samples, Y is the pseudo label matrix, r is the number of categories.
[0037] In some embodiments, the affinity matrix P It is expressed as: ; In the formula, T Represents matrix transpose.
[0038] In some embodiments, the diagonal matrix Q It is expressed as: ; In the formula, Q ii represents the value of the i-th row and i-th column of matrix Q, j Indicates (j is just a superscript, starting from 1 and ending at n, with no physical meaning), P ij Represents the affinity matrix P The value of row i and column j, n Indicates the number of samples.
[0039] In some embodiments, the graph Laplacian matrix L It is expressed as: ; In some embodiments, the self-representation coefficient matrix C satisfy ;in, diag represents a diagonal matrix.
[0040] In some embodiments, the iterative update module is further configured to update the base matrix in turn in each iteration by the following formula: W , encoding matrix H , self-representation coefficient matrix C and the auxiliary matrix A : ; In the formula, W ij Represents the value of the i-th row and j-th column of the matrix W; Both represent regularization parameters; express The value of the i-th row and j-th column of the matrix; Representation Matrix The value of row i and column j; Represents the value of the j-th row and k-th column of matrix H; Representation Matrix The value of row i and column j; Representation Matrix The value of row i and column j; Represents the value of the kth row and kth column of matrix C; Representation Matrix The value of row k and column k; Representation Matrix The value of row k and column k; Represents the value of the j-th row and j-th column of matrix A; Representation Matrix The value of row j and column j; Representation Matrix The value of row j and column j; T Represents matrix transpose.
[0041] In some embodiments, the objective function is expressed as: ; In the formula, min means taking the minimum value, || || F represents the F-norm; Tr Indicates trace operation trace; diag represents a diagonal matrix; st represents a constraint condition; Both represent regularization parameters; T Represents matrix transpose.
[0042] It should be noted that the structures of the various non-negative matrix decomposition face clustering devices based on graph learning and pseudo-label guidance described in this embodiment belong to the same technical concept as the previously described non-negative matrix decomposition face clustering method based on graph learning and pseudo-label guidance, and achieve the same beneficial effects through the same principles, which will not be repeated here.
[0043] An embodiment of the present invention further provides a readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the method described in any of the above embodiments.
[0044] The above description is intended to be illustrative rather than restrictive. For example, the above examples (or one or more of them) may be used in combination with each other. For example, a person of ordinary skill in the art may use other embodiments when reading the above description. In addition, in the above-mentioned specific embodiments, various features may be grouped together to simplify the present invention. This should not be interpreted as an intention that a feature of an invention that is not claimed for protection is necessary for any claim. On the contrary, the subject matter of the present invention may be less than all the features of an embodiment of a particular invention. Thus, the attached claims are incorporated herein as examples or embodiments in the specific embodiments, wherein each claim is independently a separate embodiment, and it is considered that these embodiments may be combined with each other in various combinations or arrangements. The scope of the present invention should be determined with reference to the attached claims and the full scope of equivalent forms granted by these claims.
Claims
1. A non-negative matrix factorization face clustering method based on graph learning and pseudo-label guidance, characterized in that: The method comprises: Obtaining a data matrix, a pseudo-label matrix, a regularization parameter, and a number of clusters; wherein the data matrix includes face image data, and the pseudo-label matrix is obtained by performing Kmeans clustering on the data matrix; Randomly initialize the basis matrix W , encoding matrix H , self-representation coefficient matrix C and the auxiliary matrix A ; Based on the basis matrix W , encoding matrix H , self-representation coefficient matrix C and the auxiliary matrix A , determine the affinity matrix P and the diagonal matrix Q , and according to the affinity matrix P and the diagonal matrix Q Determine the graph Laplacian matrix L ; Iterate based on the set maximum number of iterations, and update the base matrix in turn during each iteration. W , encoding matrix H , self-representation coefficient matrix C and the auxiliary matrix A , updating the graph Laplacian matrix through the affinity matrix; In the iteration of the whole process, the objective function is minimized until the objective function converges or the number of iterations reaches the maximum number of iterations, and the clustering result is obtained.
2. The non-negative matrix factorization face clustering method based on graph learning and pseudo-label guidance according to claim 1, characterized in that: The data matrix is represented as , the pseudo label matrix is expressed as ,in X is the data matrix, is the set of real numbers, m is the feature dimension, n is the number of samples, Y is the pseudo label matrix, r is the number of categories.
3. The non-negative matrix factorization face clustering method based on graph learning and pseudo-label guidance according to claim 1, characterized in that: The affinity matrix P It is expressed as: ; In the formula, T Represents matrix transpose.
4. The non-negative matrix factorization face clustering method based on graph learning and pseudo-label guidance according to claim 1, characterized in that: Diagonal Matrix Q It is expressed as: ; In the formula, Q ii represents the value of the i-th row and i-th column of matrix Q, j Indicates the sample number, P ij Represents the affinity matrix P The value of row i and column j, n Indicates the number of samples.
5. The non-negative matrix factorization face clustering method based on graph learning and pseudo-label guidance according to claim 1, characterized in that: The graph Laplacian matrix L It is expressed as: 。 6. The non-negative matrix factorization face clustering method based on graph learning and pseudo-label guidance according to claim 1, characterized in that: The self-expressive coefficient matrix C satisfy ;in, diag represents a diagonal matrix.
7. The non-negative matrix factorization face clustering method based on graph learning and pseudo-label guidance according to claim 1, characterized in that: In each iteration, the basis matrix is updated in turn by the following formula W , encoding matrix H , self-representation coefficient matrix C and the auxiliary matrix A : ; In the formula, W ij Represents the value of the i-th row and j-th column of the matrix W; Both represent regularization parameters; express The value of the i-th row and j-th column of the matrix; Representation Matrix The value of row i and column j; Represents the value of the j-th row and k-th column of matrix H; Representation Matrix The value of row i and column j; Representation Matrix The value of row i and column j; Represents the value of the kth row and kth column of matrix C; Representation Matrix The value of row k and column k; Representation Matrix The value of row k and column k; Represents the value of the j-th row and j-th column of matrix A; Representation Matrix The value of row j and column j; Representation Matrix The value of row j and column j; T Represents matrix transpose.
8. The non-negative matrix factorization face clustering method based on graph learning and pseudo-label guidance according to claim 1, characterized in that: The objective function is expressed as: ; In the formula, min means taking the minimum value, || || F represents the F-norm; Tr represents trace operation; diag represents a diagonal matrix; st represents a constraint condition; Both represent regularization parameters; T Represents matrix transpose.
9. A non-negative matrix factorization face clustering device based on graph learning and pseudo-label guidance, characterized in that: The device comprises: A data acquisition module is configured to acquire a data matrix, a pseudo label matrix, a regularization parameter, and a number of clusters; wherein the data matrix includes face image data, and the pseudo label matrix is obtained by performing Kmeans clustering on the data matrix; Matrix initialization module, configured to randomly initialize the base matrix W , encoding matrix H , self-representation coefficient matrix C and the auxiliary matrix A ; A matrix determination module is configured to determine the W , encoding matrix H , self-representation coefficient matrix C and the auxiliary matrix A , determine the affinity matrix P and the diagonal matrix Q , and according to the affinity matrix P and the diagonal matrix Q Determine the graph Laplacian matrix L ; The iterative update module is configured to iterate based on a set maximum number of iterations, and in each iteration process, the base matrix is updated in turn. W , encoding matrix H , self-representation coefficient matrix C and the auxiliary matrix A , updating the graph Laplacian matrix through the affinity matrix; The clustering output module is configured to minimize the objective function in the iteration of the whole process until the objective function converges or the number of iterations reaches the maximum number of iterations, thereby obtaining the clustering result.
10. A non-transitory computer-readable storage medium storing instructions, characterized in that: When the instructions are executed by a processor, the method according to any one of claims 1 to 8 is performed.