Target classification method based on unsupervised graph node clustering

By constructing a target classification model of deep representation extraction layer and clustering layer, and using unsupervised learning methods to train graph nodes, the problems of high computational cost and label dependence of large graph data are solved, and efficient and stable graph node clustering is achieved.

CN115526256BActive Publication Date: 2025-10-17CHANGAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211199482.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-29
Publication Date
2025-10-17
Estimated Expiration
2042-09-29

AI Technical Summary

Technical Problem

Existing graph convolutional neural networks have high computational costs and poor model transferability when processing large graph data, and rely on label information, making it difficult to accurately classify datasets without label information.

Method used

Construct a target classification model, including a deep representation extraction layer and a clustering layer. Train the model through unsupervised learning methods, use the adjacency matrix and feature matrix to cluster graph nodes, reduce dependence on label information, and achieve end-to-end learning.

Benefits of technology

It improves the computational efficiency and stability of the model on large graph data, reduces dependence on label information, enhances the robustness and clustering performance of the network, and avoids the problem of inconsistent training objectives in multiple modules.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115526256B_ABST
    Figure CN115526256B_ABST
Patent Text Reader

Abstract

The application relates to a target classification model training method, which comprises the following steps: constructing a target classification model; training the target classification model based on a graph training data set to obtain a trained target classification model; the graph training data set comprises a plurality of graph nodes, and each graph node represents a target to be classified; and the target classification model comprises a deep layer representation extraction layer and a clustering layer which are connected in sequence. The target classification model training method solves the problem that the existing semi-supervised method cannot classify a target data set without node label information, reduces the dependence of the clustering result on the amount of label information based on unsupervised learning network training, greatly enhances the stability of the network, and always shows good performance in the clustering task; end-to-end learning is realized, the problem of inconsistent training targets of multiple modules is avoided, the complexity of the engineering is reduced, the training error is reduced, and the network performance is more robust.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of machine learning, in particular, to a target classification method based on unsupervised graph node clustering. BACKGROUND

[0002] Graph structure is an abstraction of non-Euclidean structure data in real life, and the main feature is that there are irregular connections between different objects, such as social networks, chemical molecules, communication networks, citation networks, etc. Network nodes often contain many high-dimensional features and attributes, so graph structure is often high-dimensional and difficult to process.

[0003] Among the methods for processing graph structure, graph convolutional neural network has achieved good results in many graph-related analysis and clustering tasks. However, the research based on spectral method still faces several defects: in terms of efficiency, since all nodes on the graph need to be processed at the same time, when the number of nodes of the graph is larger, the computational cost of the model will increase significantly, which leads to the spectral method being difficult to apply to large graphs; in terms of universality, the training of the spectral-based model is for a certain fixed graph, which will lead to the fact that once trained, it is difficult to add new nodes to the graph, and the migration of the model is not very good, once the model is applied to a new graph dataset, the network needs to be retrained; in terms of flexibility, since the Laplacian matrix based on the directed graph model training lacks specific definition, the spectral method can only achieve good results when processing undirected graphs.

[0004] In terms of network training method, the existing methods are mostly based on semi-supervised learning, only the data containing label information is used to train the model, and the other data without label is used as the verification set. This method has two obvious disadvantages: one is that it cannot process data sets without label information, and the other is that the prediction accuracy of the model depends greatly on the amount of label information. However, many graph data sets in real life do not contain or only contain a small amount of label information, because it is difficult to label a large number of data objects. Therefore, the graph convolutional network can only learn a classification model and method from a small amount of label information, it is difficult to guarantee the accuracy and universality of the classification model, and it is easy to lead to inaccurate target classification results. SUMMARY

[0005] In order to overcome at least one of the deficiencies in the prior art, the embodiments of the present application provide a target classification method based on graph node clustering.

[0006] In a first aspect, a target classification model training method is provided, comprising:

[0007] constructing a target classification model;

[0008] training a target classification model based on a graph training dataset, to obtain a trained target classification model; the graph training dataset includes a plurality of graph nodes, each graph node representing a target to be classified; the target classification model includes a deep representation extraction layer and a clustering layer connected in sequence;

[0009] The deep representation extraction layer is configured to extract a deep representation of each graph node in the graph training dataset.

[0010] The clustering layer is configured to cluster the plurality of graph nodes based on the deep representation, to determine a plurality of cluster centers; and determine a category of each graph node according to the deep representation of each graph node and the plurality of cluster centers.

[0011] In one embodiment, training the target classification model based on the graph training dataset comprises:

[0012] determining a graph according to the graph training dataset; the graph includes a plurality of graph nodes and an adjacency relationship between the plurality of graph nodes; the adjacency relationship is configured to represent a relationship between any two graph nodes;

[0013] determining an adjacency matrix according to the adjacency relationship in the graph;

[0014] determining a feature matrix according to the feature vector of each graph node;

[0015] training the target classification model based on the adjacency matrix and the feature matrix.

[0016] In one embodiment, training the target classification model based on the adjacency matrix and the feature matrix comprises:

[0017] adding a self-loop to the adjacency matrix A to obtain a matrix that is, wherein, I N ∈R N×N is an identity matrix;

[0018] standardizing the matrix to obtain a standardized adjacency matrix that is, wherein, is a degree matrix;

[0019] training the target classification model based on the standardized adjacency matrix and the feature matrix X.

[0020] In one embodiment, the deep representation extraction layer includes two convolution layers and a fully connected layer connected in sequence.

[0021] In one embodiment, determining the category of each graph node according to the deep representation of each graph node and the plurality of cluster centers comprises:

[0022] calculating the Euclidean distance g of the deep representation of each graph node and the plurality of clustering centers i , i = 1, 2, …, N, i is the label of the graph node, N is the number of graph nodes, the Euclidean distance g i is a D-dimensional row vector, and D is the number of clustering centers;

[0023] The Euclidean distances corresponding to all graph nodes form an error matrix g = [g1, g2, … g i …, g N ];

[0024] The elements in each row vector in the error matrix g are sorted from small to large to form a sorted error matrix h = [h1, h2, … h j …, h D ] T , h j is an N-dimensional column vector;

[0025] Based on the sorted error matrix h, a weight matrix p = [p1, p2, … p j …, p D ] T is determined, the weight matrix p is an N*D matrix, and p j is determined using the following formula j , where p j is an N-dimensional column vector:

[0026]

[0027] where h j is the jth column vector in the error matrix h;

[0028] According to the weight matrix p, the category of each graph node is determined, and the elements in each row vector in the weight matrix p reflect the probability of the graph node corresponding to the row vector belonging to the category corresponding to the element.

[0029] In one embodiment, the training includes:

[0030] Pre-training the target classification model to obtain and save the model parameters;

[0031] Formally training the target classification model with the model parameters as initial values to obtain the trained target classification model.

[0032] In one embodiment, the loss function Loss1 used in pre-training is:

[0033]

[0034] where N is the number of graph nodes, Z is the output of two layers of convolution in the deep representation extraction layer, L is the Laplacian matrix, is a degree matrix, is a matrix obtained by adding loops to the adjacency matrix A, trace(.) denotes a trace, γ is a regularization parameter, z i is an output corresponding to the i-th graph node in Z, z j is an output corresponding to the j-th graph node in Z, s ij is a probability that there is an edge between the i-th graph node and the j-th graph node in the graph.

[0035] In one embodiment, the loss function Loss2 used in formal training is:

[0036]

[0037] where Y id is a probability that the i-th graph node belongs to the d-th class in the output of the clustering layer, N is the number of graph nodes, D is the number of classes of graph nodes, Z' id is an output of the d-th class of the i-th graph node in the output Z' of the deep representation extraction layer, z' i is an output corresponding to the i-th graph node in the output Z' of the deep representation extraction layer, z' j is an output corresponding to the j-th graph node in the output Z' of the deep representation extraction layer, s ij is a probability that there is an edge between the i-th graph node and the j-th graph node in the graph.

[0038] In a second aspect, a target classification method based on unsupervised graph node clustering is provided, comprising:

[0039] determining an adjacency matrix and a feature matrix corresponding to a graph according to a target graph data set to be classified, the target graph data set to be classified comprising a plurality of graph nodes, each graph node representing a target to be classified, the adjacency matrix being used to represent the relationship between any two graph nodes, and the feature matrix being used to represent the feature vector of each graph node;

[0040] inputting the adjacency matrix and the feature matrix into a target classification model to output the class of each target to be classified;

[0041] the target classification model is obtained according to the target classification model training method described above.

[0042] Compared with the prior art, the application has the following beneficial effects: the application solves the problem that the existing semi-supervised method cannot classify the target data set without node label information, the network training based on unsupervised learning also reduces the dependence of the clustering result on the amount of label information, greatly enhances the stability of the network, and always shows good performance in the clustering task; end-to-end learning is realized, the problem of inconsistent training targets of multiple modules is avoided, the complexity of the project is reduced, the training error is reduced, and the network performance is more robust. BRIEF DESCRIPTION OF DRAWINGS

[0043] The application can be better understood by referring to the following description in conjunction with the accompanying drawings, which are incorporated in and form a part of the specification, and wherein:

[0044] Figure 1 A flowchart of a target classification model training method according to an embodiment of the application is shown;

[0045] Figure 2 A flowchart of a target classification method based on unsupervised graph node clustering according to an embodiment of the application is shown;

[0046] Figure 3 Target classification model training and test evaluation index curves on the cora data set are shown, wherein (a) is a loss function curve; (b) is a clustering accuracy (acc) curve in the training process; (c) is a normalized mutual information (nmi) curve in the training process; (d) is a clustering accuracy (acc) curve in the test process; (e) is a normalized mutual information (nmi) curve in the test process;

[0047] Figure 4 Target classification model training and test evaluation index curves on the citeseer data set are shown, wherein (a) is a loss function curve; (b) is a clustering accuracy (acc) curve in the training process; (c) is a normalized mutual information (nmi) curve in the training process; (d) is a clustering accuracy (acc) curve in the test process; (e) is a normalized mutual information (nmi) curve in the test process. DETAILED DESCRIPTION

[0048] In the following, exemplary embodiments of the application will be described with reference to the accompanying drawings. In the description of the actual embodiments, not all features of the embodiments are described. It should be appreciated, however, that many embodiment-specific decisions can be made in the development of any such actual embodiment to achieve the specific goals of the developer, and these decisions can vary from embodiment to embodiment.

[0049] It should be noted that, for the purpose of avoiding the confusion of the present application due to unnecessary details, only the device structure closely related to the scheme according to the present application is shown in the drawings, and other details not closely related to the present application are omitted.

[0050] It should be understood that the present application is not limited to the described embodiments due to the following description with reference to the drawings. In this context, the embodiments can be combined with each other, features can be replaced or borrowed between different embodiments, one or more features can be omitted in one embodiment, if possible.

[0051] Figure 1 A flowchart of a target classification model training method according to an embodiment of the present application is shown. The method starts at step S110, and a target classification model is constructed.

[0052] Then, at step S120, the target classification model is trained based on a graph training data set, and a trained target classification model is obtained; the graph training data set includes a plurality of graph nodes, each graph node representing a target to be classified.

[0053] Here, the target classification model includes a deep representation extraction layer and a clustering layer connected in sequence, the deep representation extraction layer is used to extract a deep representation of each graph node in the graph training data set;

[0054] The clustering layer is used to cluster the plurality of graph nodes based on the deep representation, and determine a plurality of cluster centers; and determine the category of each graph node according to the deep representation of each graph node and the plurality of cluster centers. Here, an unsupervised clustering method k-means can be used to cluster the graph nodes, thereby determining the plurality of cluster centers, the number of cluster centers is consistent with the number of categories of each graph node in the graph training data set, for example, if the categories of the graph nodes have 7, the number of cluster centers is also 7;

[0055] In this embodiment, the graph training dataset can be a citation network dataset, for example, the classic graph processing dataset core or citeseer, both of which are abstractions of paper citation networks, where each graph node is a paper, and all graph nodes can be divided into different types according to the content studied by the paper and the fields involved and covered, based on cases, genetic algorithms, neural networks, reinforcement learning, etc., which are referred to as labels of the graph nodes. Each paper has different features, which are expressed by a word vector, each element of which corresponds to a feature, and its elements only have two values, 0 or 1, where 0 means that the paper does not have this feature, and 1 means that the paper has this feature. Therefore, the word vector is also the feature vector x of each graph node in the network. On the other hand, since papers can learn from each other, the number of papers referenced and cited by each paper is not a fixed value, and the relationship between graph nodes is expressed by this citation relationship, from which the adjacency matrix A of the graph is abstracted. The sample points of the dataset are regarded as graph nodes, and since there is no graph node that has no connection with other graph nodes, there is no isolated point, and the dataset describes a fully connected graph, and the features of the dataset are shown in Table 1:

[0056] Table 1

[0057] Dataset picture Number of graph nodes Number of sides Word vector size Number of tags cora 1 2708 5429 1433*1 7 Citeseer 1 3327 4732 3703*1 6

[0058] In step S120, first, the graph needs to be determined according to the graph training dataset, where the graph is a complete graph, and since the graph processing dataset core or citeseer is based on semi-supervised learning, the corresponding data format is to store the graph nodes in the training set, the validation set, and the test set respectively, and each file with the suffix x, y, allx, and ally stores incomplete graph nodes. However, this embodiment is based on unsupervised learning and direct clustering, so the graph nodes in different storage files need to be added and summed to obtain a complete graph. Here, the graph G = <V, E>, where G is a complete graph, that is, an abstraction of the entire dataset, V is a set of all graph nodes in the graph G, each graph node represents a paper, that is, a classification target, and E is a set of edges in the graph G, representing the citation relationship between different papers, that is, the adjacency relationship between any two graph nodes.

[0059] Then, the adjacency matrix A is determined according to the adjacency relationship in the graph, and the feature matrix X is determined according to the feature vector x of each graph node.

[0060] Wherein, the element a ij in the adjacency matrix A is defined as follows:

[0061]

[0062] Finally, the target classification model is trained based on the adjacency matrix A and the feature matrix X.

[0063] Here, the adjacency matrix A can be further processed, including:

[0064] 1) Adding a self-loop to the adjacency matrix A to obtain a matrix That is, So that the elements on the main diagonal are all 1, where I N ∈R N×N is a unit matrix; this step takes into account that in the operation formula of the convolution layer, the inner product of the adjacency matrix A and the feature matrix X is needed, which is equivalent to weighting the adjacency matrix A, and the value of the feature matrix X becomes the weight of the adjacency matrix A, but since the diagonal elements of the original adjacency matrix A are all 0, the inner product of the feature matrix X will cause the features to be ignored. To avoid this, the above processing is performed.

[0065] 2) Standardizing the matrix to obtain a standardized adjacency matrix That is, is a symmetric and normalized matrix; is a degree matrix, which is a diagonal matrix, and the values of the elements on the main diagonal are: The values of the remaining elements are all 0. This step takes into account that the adjacency matrix A has not been normalized, which makes it difficult to limit the data within the required range of operation. Through normalization processing, the data becomes comparable, while the relationship between the data is relatively maintained. Therefore, in order to avoid the inner product of the adjacency matrix and the feature matrix changing the original distribution of the features, the A needs to be standardized.

[0066] Thus, the target classification model is trained based on the standardized adjacency matrix and the feature matrix X.

[0067] The embodiments of the present application reduce the dependence of the clustering result on the amount of label information based on unsupervised learning network training, greatly enhance the stability of the network, and always perform well in clustering tasks, realizing end-to-end learning and avoiding the problem of inconsistent training targets in multiple modules.

[0068] In one embodiment, the deep feature extraction layer includes two convolution layers and one fully connected layer connected in sequence.

[0069] In this embodiment, a convolutional layer network is designed, the idea of a spectrum graph is introduced to perform convolution operation on the graph, each graph node and its feature information are regarded as continuous signals, and the signals are converted from spatial domain to spectral domain, and information extraction task on the graph is realized by performing convolution operation in the spectral domain; in addition, a full connection layer network is designed, an abstract feature after multi-layer convolution is arranged and normalized, so that the division of the network structure is realized.

[0070] When designing the convolutional layer network, the number of convolutional layers needs to be determined. Considering that the number of convolutional layers is a very key step to determine the performance of the entire network, if the number of network layers is too small, dimension reduction may not be sufficient, and the information and graph node features in the graph cannot be completely extracted. However, if the number of network layers is too large, overfitting problem may occur, thereby reducing the performance of the final node clustering.

[0071] When performing graph node feature extraction, three layers of convolution are set to better extract features, but the experimental results show that three layers of convolution may cause overfitting problem, thereby reducing the performance. After outputting the effects of one, two and three layers of convolution network respectively, it is found that the feature extraction result of two layers of convolution is the best.

[0072] After determining that the convolutional network is two layers, the size of the two-layer convolutional network also needs to be determined. Taking the Cora dataset as an example, the size of the input adjacency matrix in the paper citation network described by the Cora dataset is 2708*2708, the size of the input feature matrix is 2708*1433, the size of the first layer of convolution kernel is 1433*128, and the size of the second layer of convolution kernel is 128*64. After two convolution operations, the size of the output hidden layer hidden is 2708*64, which contains both the adjacency relationship between the graph nodes and the feature information of the graph nodes themselves.

[0073] When designing the convolutional layer network, the forward propagation formula of the two-layer convolutional network also needs to be determined as follows:

[0074]

[0075] wherein Z is the output of the two-layer convolution, the first layer of convolution adopts a tanh activation function, the second layer of convolution adopts a sigmoid activation function, X is a feature matrix, is a standardized adjacency matrix, W (0) is a weight matrix of the first layer of convolution, W (1) is a weight matrix of the second layer of convolution.

[0076] In this embodiment, the propagation model of the traditional fully connected layer is combined with the convolutional layer network, and the output result Z of the convolutional layer is taken as the input of the fully connected layer. The fully connected layer is used to arrange and normalize the abstract features obtained through the previous multi-layer convolution. The features are integrated together, and a value is output, and a probability is output for various classification cases, thereby greatly reducing the influence of feature position on classification. In a certain sense, the fully connected layer can also be considered as the initial division of the network structure, and plays a role of classifier in the entire convolutional neural network. In addition, the fully connected layer can map the learned features to the sample label space, so the fully connected layer is essential in the entire network architecture design.

[0077] In this embodiment, the forward propagation formula of the fully connected layer needs to be further determined:

[0078]

[0079] wherein, W (2) is the weight matrix of the fully connected layer, and Z' is the output of the fully connected layer, that is, the deep representation.

[0080] In addition, the parameters of the fully connected layer also need to be determined. Here, taking the Cora data set as an example, the neuron dimension of the fully connected layer is designed to be 64*7, wherein 64 is the dimension size of the last convolutional layer, and 7 is the category of the label in the data set, which is also the cluster number of the clustering algorithm, that is, there are 7 types of papers in the paper citation network.

[0081] In one embodiment, the category of each graph node is determined according to the deep representation of each graph node and a plurality of clustering centers, comprising:

[0082] Step S210, calculating the Euclidean distance g i of each graph node and the plurality of clustering centers; i=1, 2, …, N, i is the label of the graph node, and N is the number of graph nodes, wherein the deep representation of each graph node is a D-dimensional row vector, and D is the number of categories of the graph node, which can be 7, for example. The number of clustering centers is also 7, and the calculated Euclidean distance g i of each graph node corresponds to a D-dimensional row vector;

[0083] Step S220, the Euclidean distances corresponding to all graph nodes form an error matrix g=[g1, g2, …g i …, g N ];

[0084] Step S230, sorting the elements in each row vector in the error matrix from small to large to form a sorted error matrix h=[h1, h2, …h j …, hD ] T , h j is an N-dimensional column vector;

[0085] In step S240, the weight matrix p is determined based on the sorted error matrix h, and p = [p1, p2, …, pN] is obtained. j …, p D ] T The weight matrix p is an N*D matrix, which can be determined by the following formula: j Here, p j is an N-dimensional column vector:

[0086]

[0087] where h j is the jth column vector in the error matrix h;

[0088] In step S250, the class of each graph node is determined according to the weight matrix p. The elements in each row vector in the weight matrix p reflect the probability of the graph node corresponding to the row vector belonging to the class corresponding to the element. Specifically, the class corresponding to the column where the element with the maximum value in the ith row vector p i in the weight matrix p is the class of the ith graph node.

[0089] In one embodiment, the target classification model is trained, including:

[0090] The target classification model is pre-trained, and the model parameters corresponding to the optimal performance are obtained and saved;

[0091] The model parameters are used as initial values for formal training of the target classification model, and the trained target classification model is obtained.

[0092] In this embodiment, if the target classification model is directly formally trained, the phenomenon that the training loss function has a trivial solution will occur, and the convergence effect of the loss function is not good. Therefore, before formal training, pre-training is performed, the data is standardized and normalized in the pre-training process, and the model parameters corresponding to the best convergence effect of the loss function are selected and saved as the parameters for formal training.

[0093] The loss function used in the pre-training stage is the global loss plus the reconstruction loss. In this process, the node clustering module and the pseudo-label design module are not involved. Only the feature extraction effect of the graph convolution layer is optimized, and a set of optimal network weights are found. The loss function Loss1 is as follows:

[0094]

[0095] wherein N is the number of graph nodes, Z is the output of two layers of convolution in the deep representation extraction layer, L is a Laplacian matrix, is a degree matrix, is a matrix obtained by adding a self-loop to the adjacency matrix A, trace(.) represents a trace, and γ is a regularization parameter, i is the output corresponding to the i-th graph node in Z, j is the output corresponding to the j-th graph node in Z, ij is the probability that there is an edge between the i-th graph node and the j-th graph node in the graph.

[0096] In the formal training phase, not only the reconstruction loss of the convolutional layer feature extraction is calculated, but also the cross-entropy loss between the predicted clustering result and the full connection layer is calculated, so that the output Z' of the full connection layer is more and more consistent with the distribution of the probability matrix p, so as to ensure that the system can supervise the training of the network according to the pseudo label, and the loss function Loss2 is as follows:

[0097]

[0098] wherein Y id is the probability that the i-th graph node in the output of the clustering layer belongs to the d-th class, N is the number of graph nodes, and D is the number of classes of graph nodes, id is the output of the d-th class of the i-th graph node in the output Z' of the full connection layer in the deep representation extraction layer, i is the output corresponding to the i-th graph node in the output Z' of the full connection layer in the deep representation extraction layer, j is the output corresponding to the j-th graph node in the output Z' of the full connection layer in the deep representation extraction layer.

[0099] In the design of the two loss functions, the latter and are regular terms, mainly to solve the trivial solution problem in network training, and γ is a regularization coefficient, by adjusting the value of the parameter, the application determines a relatively good regularization coefficient, γ is set to 1 in pre-training, and γ is set to 0.2 in formal training.

[0100] The application also provides a target classification method based on unsupervised graph node clustering, Figure 2 a flowchart of a target classification method based on unsupervised graph node clustering according to an embodiment of the application is shown, the method comprises:

[0101] In step S310, a neighbor matrix and a feature matrix corresponding to the graph are determined according to a target graph data set to be classified; the target graph data set to be classified includes a plurality of graph nodes, each graph node representing a target to be classified, the neighbor matrix is used to represent the relationship between any two graph nodes, and the feature matrix is used to represent the feature vector of each graph node.

[0102] In step S320, the neighbor matrix and the feature matrix are input into a target classification model to output the category of each target to be classified; the target classification model is obtained according to the target classification model training method.

[0103] To verify the effectiveness of the target classification model training method, two classical graph processing data sets, core and citeseer, are used. The characteristics of the data sets are shown in Table 1. Network training loss, clustering accuracy (acc), and normalized mutual information (nmi) can be used to evaluate the performance of the network. The clustering accuracy and normalized mutual information evaluation indexes are shown in Table 2:

[0104] Table 2

[0105]

[0106]

[0107] Figure 3 The target classification model training and test evaluation index curves on the cora data set are shown in FIG. 1. In (a), the horizontal axis represents the number of epochs, and the vertical axis represents the value of the loss function. In (b), the horizontal axis represents the number of epochs, and the vertical axis represents the value of the clustering accuracy (acc). In (c), the horizontal axis represents the number of epochs, and the vertical axis represents the value of the normalized mutual information (nmi). In (d), the horizontal axis represents the number of epochs, and the vertical axis represents the value of the clustering accuracy (acc). In (e), the horizontal axis represents the number of epochs, and the vertical axis represents the value of the normalized mutual information (nmi). According to the above Figure 3 It can be seen that after 1500 iterations in the pre-training, the weight matrix and the offset matrix with the minimum loss are selected as the initial values of the formal training parameters. After 2300 iterations in the training process, it can be seen that the loss function loss decreases in gradient and finally converges, Figure 3 In the cora data set, the parameters are stable at about 1800 iterations.

[0108] Figure 4Figures 1 shows the training and testing evaluation index curves of the target classification model on the citeseer dataset, wherein (a) is a loss function curve, the abscissa is the number of epochs, and the ordinate is the value of the loss function; (b) is a training process clustering accuracy (acc) curve, the abscissa is the number of epochs, and the ordinate is the value of the clustering accuracy (acc); (c) is a training process normalized mutual information (nmi) curve, the abscissa is the number of epochs, and the ordinate is the value of the normalized mutual information (nmi); (d) is a testing process clustering accuracy (acc) curve, the abscissa is the number of epochs, and the ordinate is the value of the clustering accuracy (acc); (e) is a testing process normalized mutual information (nmi) curve, the abscissa is the number of epochs, and the ordinate is the value of the normalized mutual information (nmi); according to Figure 4 It can be seen that the parameters have stabilized at about 500 iterations, and the time and memory size required for training are less than those of the cora dataset. However, the parameters show a downward trend during the 500th to 2300th iteration, and overfitting occurs, indicating that the dataset does not need to be trained many times to achieve good clustering results. Since the training process is to continuously adjust the parameters through back propagation, there will inevitably be local oscillation phenomena. However, from the overall iteration situation, the training loss is steadily decreasing, and the clustering accuracy and normalized mutual information are increasing. After training, the network can automatically complete node feature extraction and clustering tasks, so there will be no local oscillation in the test set. In the test set, it can be seen that with the increase of the number of iterations, the values of clustering accuracy and normalized mutual information gradually increase, and the final clustering accuracy can reach 0.7, which is good on the basis of unsupervised learning, indicating that the target classification model obtained by the training method of the target classification model has good implementation effect.

[0109] Compared with methods based on graph embedding, random walk, semi-supervised graph node clustering, etc., on the one hand, the present application performs well in performance and can accurately cluster non-Euclidean structure data. On the other hand, the present application solves the problem that existing semi-supervised methods cannot cluster datasets without node label information, and the network training based on unsupervised learning also reduces the dependence of clustering result on the amount of label information, greatly enhances the stability of the network, and always performs well in the clustering task. Finally, the present application realizes end-to-end learning, avoids the problem of inconsistent training targets of multiple modules, reduces the complexity of engineering, reduces the training error, and makes the network performance more robust.

[0110] The above merely provides the various embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of the changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A target classification model training method, characterized in that: include: Build target classification model; Training the target classification model based on the graph training data set to obtain a trained target classification model; The graph training data set includes a plurality of graph nodes, each of which represents an object to be classified; The target classification model includes a deep representation extraction layer and a clustering layer connected in sequence; the graph training dataset is a citation network dataset, and each graph node is a paper; Represented as, where V is the set of all graph nodes in the graph G, E is the set of edges in the graph G, representing the citation relationship between different papers; The deep representation extraction layer is used to extract the deep representation of each graph node in the graph training dataset; The clustering layer is used to cluster the multiple graph nodes based on the deep representation to determine multiple cluster centers; and determining a category of each of the graph nodes according to the deep representation of each of the graph nodes and the multiple cluster centers; The step of determining the category of each graph node according to the deep representation of each graph node and the multiple cluster centers includes: Calculate the Euclidean distance between the deep representation of each graph node and the multiple cluster centers , i =1, 2, ..., N , i is the label of the graph node, N is the number of graph nodes, Euclidean distance is a D-dimensional row vector, where D is the number of cluster centers; The Euclidean distances corresponding to all the graph nodes form an error matrix ; For the error matrix The elements in each row vector in are sorted from small to large to form a sorted error matrix , is an N-dimensional column vector; Based on the sorted error matrix Determine the weight matrix , the weight matrix It is an N*D matrix, determined by the following formula ,here, is an N-dimensional column vector: in, is the error matrix The j column vectors; According to the weight matrix Determine the category of each graph node, the weight matrix The elements in each row vector reflect the probability that the graph node corresponding to the row vector belongs to the category corresponding to the element.

2. The method according to claim 1, wherein in, Training the target classification model based on the graph training dataset includes: Determine a graph according to the graph training data set; the graph includes a plurality of graph nodes and adjacency relationships between the plurality of graph nodes; the adjacency relationship is used to characterize the relationship between any two graph nodes; Determining an adjacency matrix based on the adjacency relationship in the graph; Determine a feature matrix based on the feature vector of each of the graph nodes; The target classification model is trained based on the adjacency matrix and the feature matrix.

3. The method according to claim 2, wherein Training the target classification model based on the adjacency matrix and the feature matrix includes: Add self-loops to the adjacency matrix A to obtain the matrix ,Right now ,in, is the identity matrix; For the matrix Perform standardization to obtain the standardized adjacency matrix ,Right now ,in, is the degree matrix; Based on the normalized adjacency matrix The target classification model is trained with the feature matrix X.

4. The method according to claim 1, wherein The deep representation extraction layer includes two convolutional layers and a fully connected layer connected in sequence.

5. The method according to claim 1, wherein The training includes: Pre-training the target classification model, obtaining and saving model parameters; The target classification model is formally trained using the model parameters as initial values ​​to obtain a trained target classification model.

6. The method according to claim 5, wherein The loss function Loss1 used in the pre-training is: in, N is the number of graph nodes, is the output of the two convolution layers in the deep representation extraction layer, is the Laplace matrix, , is the degree matrix, is the matrix obtained by adding the self-loop to the adjacency matrix A, Indicates traces, is the regularization parameter, for The i The output corresponding to each graph node, for The j The output corresponding to each graph node, is the probability that there is an edge between the i-th graph node and the j-th graph node in the graph.

7. The method according to claim 5, wherein The loss function Loss2 used in the formal training is: in, is the probability that the i-th graph node in the output of the clustering layer belongs to the d-th category, N is the number of graph nodes, D is the number of categories of graph nodes, The output of the deep representation extraction layer The output of the d-th category of the i-th graph node in, The output of the deep representation extraction layer The output corresponding to the i-th graph node in, The output of the deep representation extraction layer The j The output corresponding to each graph node, is the probability that there is an edge between the i-th graph node and the j-th graph node in the graph.

8. A target classification method based on unsupervised graph node clustering, characterized in that: include: Determine the adjacency matrix and feature matrix corresponding to the graph based on the target graph dataset to be classified; The target graph dataset to be classified includes a plurality of graph nodes, each of which represents a target to be classified, the adjacency matrix is ​​used to represent the relationship between any two of the graph nodes, and the feature matrix is ​​used to represent the feature vector of each of the graph nodes; Inputting the adjacency matrix and the feature matrix into a target classification model, and outputting the category of each target to be classified; The target classification model is obtained according to the target classification model training method of any one of claims 1-7.

Citation Information

Patent Citations

  • Graph convolution literature classification method and system considering local invariance constraint

    CN112925909A

  • KR20210102039A