A model training method, classification method and device based on hypergraph structure
By adopting the model training method of hypergraph structure in the graph neural network, node features and hyper-edge features are obtained and transmission processing are performed separately, the performance degradation problem caused by excessive smoothing of the graph neural network is solved, and the robustness of the model is improved. and expressive ability.
Patent Information
- Application Number
- CN202111276075.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-29
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2041-10-29
AI Technical Summary
Due to the excessive smoothing phenomenon of graph neural networks, it is difficult to obtain stronger expression capabilities by increasing depth, resulting in degradation of model performance and poor robustness.
A model training method based on hypergraph structure is adopted, and node features and hyper-edge features are obtained, and the transmission process is performed separately to avoid feature convergence, enhance feature expression capabilities, and improve model robustness.
It alleviates oversmoothing, improves the robustness and expression ability of the model, and realizes high-performance processing of hypergraph structures.
Smart Images

Figure CN113971733B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of deep learning technology, and in particular to a model training method, classification method and device based on a hypergraph structure. Background Art
[0002] Graph Neural Networks (GNNs) learn node representations based on graph feature propagation strategies and have attracted increasing attention due to their good performance on graph data.
[0003] However, in the process of implementing the present invention, the inventors found that there are at least the following technical problems in the prior art: Graph neural networks can easily fail to obtain more powerful expressive capabilities due to over-smoothing, that is, as the number of network layers increases, the node representation becomes indistinguishable. For example, in graph convolutional neural networks (GCNs), the best performance is achieved by two layers of GCNs, and when the depth increases too much, serious performance degradation occurs. Summary of the invention
[0004] The embodiments of the present invention provide a model training method, a classification method and a device based on a hypergraph structure to improve the robustness of the model.
[0005] In a first aspect, an embodiment of the present invention provides a model training method based on a hypergraph structure, comprising:
[0006] Obtain node features and hyperedge features in the hypergraph structure corresponding to the sample data;
[0007] The node features and the hyperedge features are input into the classification model to be trained to obtain the classification prediction result of the classification model on the sample data; wherein the classification model includes a hyperedge feature transmission module, a node feature transmission module and a classification network module, the hyperedge feature transmission module is used to transmit and process the hyperedge features, the node feature transmission module is used to transmit and process the node features, and the classification network module is used to classify and process the feature information transmitted by the hyperedge feature transmission module and the node feature transmission module to obtain the classification prediction result;
[0008] The parameters of the classification model are adjusted based on the classification prediction result, and when the adjusted classification model does not meet the training conditions, the adjusted classification model is iteratively trained until a trained classification model is obtained when the training conditions are met.
[0009] In a second aspect, an embodiment of the present invention further provides a classification method based on a hypergraph structure, comprising:
[0010] Obtain node features and hyperedge features corresponding to the hypergraph structure of the object to be processed;
[0011] The node features and the hyperedge features are input into a pre-trained classification model to obtain a classification result output by the classification model, wherein the classification model includes a hyperedge feature transmission module, a node feature transmission module and a classification network module, the hyperedge feature transmission module is used to transmit and process the hyperedge features, the node feature transmission module is used to transmit and process the node features, and the classification network module is used to classify and process the feature information transmitted by the hyperedge feature transmission module and the node feature transmission module to obtain a classification result.
[0012] In a third aspect, an embodiment of the present invention further provides a model training device based on a hypergraph structure, comprising:
[0013] A first feature extraction module is used to obtain node features and hyperedge features in the hypergraph structure corresponding to the sample data;
[0014] A prediction module, used for inputting the node features and the hyperedge features into the classification model to be trained, and obtaining the classification prediction result of the classification model on the sample data; wherein the classification model includes a hyperedge feature transmission module, a node feature transmission module and a classification network module, the hyperedge feature transmission module is used for transmitting and processing the hyperedge features, the node feature transmission module is used for transmitting and processing the node features, and the classification network module is used for classifying and processing the feature information transmitted by the hyperedge feature transmission module and the node feature transmission module, and obtaining the classification prediction result;
[0015] The parameter adjustment module is used to adjust the parameters of the classification model based on the classification prediction result, and iteratively train the adjusted classification model when the adjusted classification model does not meet the training conditions until a trained classification model is obtained when the training conditions are met.
[0016] In a fourth aspect, an embodiment of the present invention further provides a classification device based on a hypergraph structure, comprising:
[0017] The second feature extraction module is used to obtain node features and hyperedge features corresponding to the hypergraph structure of the object to be processed;
[0018] A classification prediction module is used to input the node features and the hyperedge features into a pre-trained classification model to obtain a classification result output by the classification model, wherein the classification model includes a hyperedge feature transmission module, a node feature transmission module and a classification network module, the hyperedge feature transmission module is used to transmit and process the hyperedge features, the node feature transmission module is used to transmit and process the node features, and the classification network module is used to classify and process the feature information transmitted by the hyperedge feature transmission module and the node feature transmission module to obtain a classification result.
[0019] In a fifth aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements a model training method based on a hypergraph structure or a classification method based on a hypergraph structure as provided in any embodiment of the present invention.
[0020] In a sixth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a model training method based on a hypergraph structure or a classification method based on a hypergraph structure as provided in any embodiment of the present invention.
[0021] The technical solution provided by the embodiment of the present invention extracts the feature information of the sample data into node features and hyperedge features in each training of the iterative training process of the classification model, extracts the unique features and public features of the processing object respectively, enhances the data processing source, and eases the convergence speed of the unique features to alleviate the over-smoothing phenomenon in the model processing process. The classification model includes a hyperedge feature transmission module and a node feature transmission module, which transmit the input hyperedge features and node features independently, and the two do not interfere with each other, avoiding the situation where the hyperedge features accelerate the convergence speed of the node features. At the same time, the hyperedge feature transmission module and the node feature transmission module use different transmission modes for the hyperedge features and node features respectively to obtain the public features and unique features of the sample data transmission, the classification network module predicts the extracted public features and unique features to obtain the classification prediction results, and adjusts the parameters of the current classification network module based on the classification prediction results to obtain the classification model updated by the current iteration. By iterating the above training process, feature enhancement is performed on the input data and feature transmission parts, and accordingly, the classification model obtained by training can alleviate the over-smoothing phenomenon and improve the robustness of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A flowchart of a model training method based on a hypergraph structure provided by an embodiment of the present invention;
[0023] Figure 2is a schematic diagram of the structure of a hypergraph provided in an embodiment of the present invention;
[0024] Figure 3 is a structural diagram of a classification model provided by an embodiment of the present invention;
[0025] Figure 4 It is a flowchart of another model training method based on a hypergraph structure provided by an embodiment of the present invention;
[0026] Figure 5 is a schematic diagram of a model training process based on a hypergraph structure provided by an embodiment of the present invention;
[0027] Figure 6 A schematic diagram of a flow chart of a classification method based on a hypergraph structure provided by an embodiment of the present invention;
[0028] Figure 7 It is a structural schematic diagram of a model training device based on a hypergraph structure provided by an embodiment of the present invention;
[0029] Figure 8 is a structural schematic diagram of a classification device based on a hypergraph structure provided by an embodiment of the present invention;
[0030] Fig. 9 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0031] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0032] As a data structure, a graph consists of nodes and edges, where an edge can only connect two nodes. In a hypergraph, an edge can connect multiple nodes. The edges in a hypergraph are called hyperedges. For example, see Figure 2 , Figure 2 It is a schematic diagram of a hypergraph structure provided by an embodiment of the present invention. For any hypergraph structure, the hypergraph can be defined as G=(V,E), where V represents a vertex set, which has N nodes, and E represents a hyperedge set, which includes M hyperedges.
[0033] Based on the structure of a hypergraph, the data to be processed is converted into a hypergraph structure, wherein each node in the hypergraph structure may correspond to each processing object, and associated processing objects may be connected through hyperedges, and processing objects connected by different hyperedges may overlap, and different hyperedges may represent different associated features. Exemplarily, the processing object may be a user to be classified, and the associated features may be interests and hobbies, and users (i.e., nodes) with the same interests and hobbies may be connected through the same hyperedge to form a hypergraph structure. By converting the data to be processed into a hypergraph structure, high-order data structure relationships are expressed based on hyperedges connecting multiple nodes.
[0034] In this embodiment, a classification model based on a hypergraph structure is provided, and the classification model is used to classify each processing object in the hypergraph structure. In some embodiments, the classification model is a graph neural network model, which is used to classify the hypergraph structure.
[0035] However, due to the problem of over-smoothing, the graph neural network model cannot be more effectively expressed by increasing the model depth, which limits the model performance and poor robustness. As the network depth increases, the features converge to a subspace, making the feature representation difficult to distinguish. This phenomenon is called over-smoothing. This is because the current graph neural network model generally uses a certain transmission method. The deterministic transmission makes the node highly correlated with its neighborhood, which is misled by potential data noise and subject to adversarial interference.
[0036] In response to the above technical problems, an embodiment of the present invention provides a model training method based on a hypergraph structure, so as to obtain a robust classification model through training and achieve high-performance processing of the hypergraph structure.
[0037] Figure 1 A flowchart of a model training method based on a hypergraph structure provided in an embodiment of the present invention. This embodiment can be applied to the case where a classification model for classification based on a hypergraph structure is trained. The method can be executed by a model training device based on a hypergraph structure provided in an embodiment of the present invention. The model training device based on a hypergraph structure can be implemented by software and / or hardware. The model training device based on a hypergraph structure can be configured on an electronic computing device, and specifically includes the following steps:
[0038] S110, obtaining node features and hyperedge features in the hypergraph structure corresponding to the sample data.
[0039] S120: Input the node features and the hyperedge features into a classification model to be trained to obtain a classification prediction result of the classification model on the sample data.
[0040] S130, adjusting parameters of the classification model based on the classification prediction result, and iteratively training the adjusted classification model when the adjusted classification model does not meet the training conditions, until a trained classification model is obtained when the training conditions are met.
[0041] In this embodiment, the sample data is data formed by the data of the processing object of the classification model, and the data of the processing object may include feature information of each processing object. The processing object may be an object to be classified, for example, it may include but not be limited to a user to be classified, an image to be classified, and a text to be classified. In some embodiments, sample data is obtained based on the type of the processing object of the classification model, and accordingly, the classification model is trained according to the sample data corresponding to each type of processing object to obtain a classification model for classifying and predicting the processing object of that type. In some embodiments, sample data corresponding to different types of processing objects may be obtained, and accordingly, the classification model may be trained based on sample data corresponding to multiple types of processing objects to obtain a classification model that can classify and predict multiple types of processing objects.
[0042] The hypergraph structure of the sample data is obtained, for example, it can be a hypergraph structure that receives external input, and the hypergraph structure can be generated based on the processing object in the sample data and the feature information of the processing object. Each node in the hypergraph structure is an object to be classified in the sample data, and each hyperedge is an associated feature of each object to be classified in the sample data. Optionally, the feature information of each processing object in the sample data is obtained, the feature information of each processing object is matched, the common feature information between at least two processing objects is determined, a hyperedge is formed based on the common feature information, a node is formed based on each processing object, and the nodes corresponding to each processing object with the common feature information are connected through the hyperedge to form a hypergraph structure. Among them, the feature information to be matched can be each feature information of each processing object, and can also be pre-set feature information, which is not limited to this.
[0043] For the hypergraph structure of the sample image, each node and each hyperedge in the hypergraph structure are extracted, and node features are formed based on the feature information of each node, and hyperedge features are formed based on the feature information of each hyperedge. In some embodiments, after obtaining the hyperedge features and node features, the hyperedge features and node features can also be converted into vector features respectively to meet the input requirements of the classification model.
[0044] In some embodiments, node features and hyperedge features in the hypergraph structure corresponding to the sample data are obtained. Alternatively, feature information of each processing object in the sample data can be used as node features, and public feature information in the feature information of each processing object can be used as hyperedge features, thereby omitting the process of constructing the hypergraph structure and simplifying the process of extracting node features and hyperedge features.
[0045] Node features are the unique features of each node in the hypergraph structure, and hyperedge features are the common features in the hypergraph structure. The common features make the nodes inseparable, and the unique features make the nodes separable, that is, the unique features can reduce the convergence speed of over-smoothing. By extracting node features and hyperedge features separately, it is avoided that when all features in the hypergraph structure are input into the model for synchronous transmission, the hyperedge features are used as the neighborhood features of the node features, which leads to the problem of rapid increase in feature correlation during the transmission process. The original input features are enhanced at the input end of the model to increase the feature expression ability from the source to alleviate the over-smoothing phenomenon of the model.
[0046] The extracted node features and hyperedge features are input into the classification model to be trained to obtain the classification prediction results obtained by the classification model for classifying the node features and hyperedge features. Figure 3 , Figure 3 It is a structural diagram of a classification model provided by an embodiment of the present invention. The classification model includes a hyperedge feature transmission module, a node feature transmission module and a classification network module, the hyperedge feature transmission module and the node feature transmission module are respectively connected to the classification network module, the node feature is input to the node feature transmission module, the hyperedge feature is input to the hyperedge feature transmission module, the hyperedge feature transmission module is used to transmit and process the hyperedge feature, and the node feature transmission module is used to transmit and process the node feature, and the two are independent of each other. The hyperedge feature and the node feature are transmitted independently by the mutually independent hyperedge feature transmission module and the node feature transmission module, so as to avoid the situation where the node feature and the hyperedge feature influence each other during the feature transmission process, so as to alleviate the over-smoothing phenomenon caused by the feature transmission process.
[0047] The hyperedge feature transmission module and the node feature transmission module are different transmission models, which implement different feature transmission strategies for hyperedge features and node features. The hyperedge feature transmission module and the node feature transmission module respectively include multiple transmission layers, and the number of transmission layers is different. Optionally, the number of transmission layers in the node feature transmission module is greater than the number of transmission layers in the hyperedge feature transmission module, thereby realizing targeted transmission of hyperedge features and node features and avoiding over-smoothing caused by the transmission of hyperedge features in too many transmission layers.
[0048] Based on the above embodiment, the node feature transmission module includes a node discarding unit and a first feature transmission unit. The node discarding unit is used to randomly discard the input node features to obtain the perturbed node features. The first feature transmission unit is used to perform feature transmission on the perturbed node features.
[0049] Among them, the node discarding unit can be a DropFeature unit, which is used to enhance the feature by randomly discarding the feature information. Optionally, the node discarding unit is used to randomly discard the first preset number of features of the input node features, and the input node features include feature information of multiple nodes, and the feature information of the first preset number of nodes is discarded. The first preset number can be a preset value, such as 1, 2 or 3. The first preset number can also be determined based on the first preset ratio and the number of nodes. For example, the first preset ratio can be 10%, 20%, etc. The first preset number is determined based on the product of the number of nodes in the node feature and the first preset ratio. It should be noted that the first preset number is a positive integer, and the product of the number of nodes and the first preset ratio can be rounded up or down to obtain the preset data. Randomly discarding the node features based on the first preset number can be to randomly determine the nodes corresponding to the preset data in the input node features, and set the feature information of each determined node to zero.
[0050] Optionally, the node discarding unit is used to generate a random binary mask, and process the input node features based on the binary mask to obtain the perturbed node features. For example, the binary mask may be determined by random sampling, and the binary mask matches the number of nodes. Optionally, the binary mask is a binary mask that conforms to the Bernoulli distribution, ε i ~Bernoulli(1-δ), where δ can be the first preset ratio for feature discarding, such as 10% or 20%. The input node features can be in matrix form, such as matrix X. The node features X are multiplied by the binary mask to obtain the perturbed node features, that is,
[0051] In some embodiments, the node drop unit is further used to scale the perturbed node features, for example, by scaling the parameter The perturbed node features are scaled so that the scaled perturbed node features have the same expected value as the input original node features.
[0052] Based on the above embodiment, the hyper-edge feature transmission module includes a hyper-edge discarding unit and a second feature transmission unit. The hyper-edge discarding unit is used to randomly discard the input hyper-edge features to obtain perturbed hyper-edge features, and the second feature transmission unit is used to perform feature transmission on the perturbed hyper-edge features.
[0053] Among them, the hyper-edge discarding unit can be a DropFeature unit, which is used to enhance features by randomly discarding feature information. The hyper-edge discarding unit and the node discarding unit can discard feature information in the same way, for example, a second preset number of random feature discards are performed on the input hyper-edge features, wherein the second preset number and the above-mentioned first preset number may be different. Correspondingly, the second preset number can be determined based on the number of hyper-edges and a second preset ratio, and the second preset ratio can be the same as or different from the first preset ratio, and there is no limitation on this. Optionally, the hyper-edge discarding unit is used to generate a random binary mask, and process the input hyper-edge feature based on the binary mask to obtain a perturbed hyper-edge feature. The binary mask generated by the hyper-edge discarding unit matches the number of hyper-edges. Perturbed hyper-edge feature where ε e is the binary mask for processing the hyperedge features, X E is the input hyperedge feature.
[0054] In this embodiment, the uncertainty of feature information during transmission is increased by randomly discarding the input node features and hyperedge features, thereby achieving feature enhancement. Furthermore, the node features and hyperedge features are randomly discarded respectively, and the two complement each other to further achieve feature enhancement to alleviate the over-smoothing phenomenon of the model. At the same time, the overall feature vector of the discarded node or hyperedge is set to zero, and more random data enhancement can be generated by completely ignoring the features of certain nodes / hyperedges, thereby improving robustness.
[0055] The first feature transmission unit transmits the perturbation node feature, and the second feature transmission unit transmits the perturbation hyperedge feature. The first feature transmission unit and the second feature transmission unit may include different transmission layers, and linear transformation is performed between different transmission layers.
[0056] Optionally, the first feature transmission unit is used to transmit the disturbance node feature in a first preset number of transmission layers based on the first transmission parameter, and fuse the feature information of each transmission layer. The first transmission parameter can be determined by the degree of each node, the degree of each hyperedge, and the hyperedge-node association matrix. For the hypergraph structure G, the correlation between the node and the hyperedge can be represented by the association matrix H of |V|×|E|, that is, the hyperedge-node association matrix. For any node v, if the node v belongs to the hyperedge e, then h(v,e)=1, if the node v does not belong to the hyperedge e, then h(v,e)=0. The degree of the node is used to characterize the relationship between any node and each hyperedge, and the degree of the hyperedge is used to characterize the relationship between any hyperedge and each node. The degree of any node can be determined based on the association parameters between the node and each hyperedge and the weight of each hyperedge, that is, d(v)=∑ e∈Ew(e)h(v,e), where w(e) is the weight of hyperedge e, and h(v,e) is the association parameter between the node and hyperedge e. The degree of any hyperedge is determined by the association parameter between the hyperedge and each node, that is, δ(e) = ∑ v∈V h(v,e).
[0057] The first transmission parameter may be determined in the following manner: Where H is the hyperedge-node association matrix, D e is the diagonal matrix containing the degrees of the hyperedges, D v is a diagonal matrix containing the degrees of nodes, and W is a diagonal matrix containing the weights of hyperedges. Where Δ=1-θ is the standard hypergraph Laplacian, which is semi-positive definite.
[0058] The transmission process of node features is: in is the input node feature representation of the k+1th transmission layer, and is also the output node feature representation of the kth transmission layer. is the output node feature representation of the k+1th transmission layer. The feature information of the first transmission layer input in the first feature transmission unit is the perturbation node feature, that is
[0059] The first feature transmission unit fuses the feature information of each transmission layer to achieve the fusion of shallow features and deep features and enhance the features. The features output by the first feature transmission unit are By fusing the output features of K+1 transmission layers (where K is the number of transmission layers in the first feature transmission unit), the over-smoothing phenomenon in the feature transmission process can be alleviated.
[0060] Optionally, the second feature transmission unit is used to transmit the perturbed hyperedge feature in a second preset number of transmission layers based on a second transmission parameter, and fuse the feature information of each transmission layer. The second transmission parameter can be determined by the degree of each node, the degree of each hyperedge, and the hyperedge-node association matrix, and the determination rules of the first transmission parameter and the second transmission parameter are different. The second transmission parameter can be
[0061] The transmission process of hyperedge features is: Among them, is the input hyperedge feature representation of the k+1th transmission layer, and is also the output hyperedge feature representation of the kth transmission layer. is the output hyperedge feature representation of the k+1th transmission layer. The feature information of the first transmission layer input in the first feature transmission unit is the perturbation hyperedge feature, that is
[0062] The second feature transmission unit fuses the feature information output by each transmission layer to achieve the fusion of shallow features and deep features and enhance the features. The features output by the second feature transmission unit are By fusing the output features of K'+1 transmission layers (where K' is the number of transmission layers in the first feature transmission unit), the over-smoothing phenomenon in the feature transmission process can be alleviated.
[0063] On the basis of the above embodiment, the hyperedge feature transmission module also includes a target hyperedge processing unit, which is used to obtain the target hyperedge transmission information based on the hyperedge transmission information obtained by fusion processing and the hyperedge-node association matrix. Node features can be directly used as unique features for node classification. The public features of nodes usually need to be combined with the common information of multiple hyperedges. For any node, its public feature expression can be obtained by averaging the hyperedge features containing this node, that is, in, is the ith common feature, H i is the i-th row vector in the hyperedge-node association matrix. Correspondingly, the overall public feature matrix is
[0064] In this embodiment, corresponding first transmission parameters and second transmission parameters are formed for the input node features and hyperedge features, respectively, so as to perform feature transmission of different strategies for the node features and hyperedge features, respectively, perform separated linear changes during the transmission process, and fuse the features of each transmission layer to achieve the fusion of features of different depths, so as to alleviate the over-smoothing phenomenon during the feature transmission process.
[0065] The classification network module is used to classify the feature information transmitted by the hyperedge feature transmission module and the node feature transmission module to obtain a classification prediction result. The classification network module can be but is not limited to a neural network model. In some embodiments, the classification network module is a 2-layer MLP (Multilayer Perception).
[0066] The hyperedge feature transmission module and the node feature transmission module transmit the obtained common features and unique features to the classification network module respectively. The classification network module processes the common features and unique features to obtain the classification prediction results, and the classification prediction results include the classification prediction information of each processing object of the sample data. The classification network module in the training process includes the network parameters to be trained, and the classification network module is adjusted by generating a loss function through the obtained classification prediction results to update the classification network module and further update the classification model.
[0067] By collecting multiple groups of sample data, the classification network module in the classification model is iteratively trained based on each group of sample data until the training conditions are met to obtain a trained classification model. The training conditions may be the training time and / or the training accuracy of the classification model.
[0068] The technical solution provided in this embodiment is to extract the feature information of the sample data into node features and hyperedge features in each training of the iterative training process of the classification model, extract the unique features and public features of the processing object respectively, enhance the data processing from the source, ease the convergence speed of the unique features, and alleviate the over-smoothing phenomenon in the model processing process. The classification model includes a hyperedge feature transmission module and a node feature transmission module, which transmit the input hyperedge features and node features independently, and the two do not interfere with each other, avoiding the situation where the hyperedge features accelerate the convergence speed of the node features. At the same time, the hyperedge feature transmission module and the node feature transmission module use different transmission methods for the hyperedge features and node features respectively to obtain the public features and unique features of the sample data transmission, and the classification network module predicts the extracted public features and unique features to obtain the classification prediction results. Based on the classification prediction results, the parameters of the current classification network module are adjusted to obtain the classification model updated by the current iteration. By iterating the above training process, feature enhancement is performed on the input data and feature transmission parts. Accordingly, the classification model obtained by training can alleviate the over-smoothing phenomenon and improve the robustness of the model.
[0069] Based on the above embodiment, the embodiment of the present invention also provides another model training method based on a hypergraph structure, see Figure 4 , Figure 4 It is a flow chart of another model training method based on a hypergraph structure provided by an embodiment of the present invention. Optionally, the sample data includes first sample data with labels set and second sample data without labels set; the parameter adjustment of the classification model based on the classification prediction result includes: generating a loss function based on multiple classification prediction results obtained by performing multiple prediction processes on the sample data and the label of the first sample data, and adjusting the parameters of the classification model based on the loss function.
[0070] See also Figure 4 , the method specifically comprises:
[0071] S210 , obtaining a hypergraph structure of sample data, wherein the sample data includes first sample data with labels set and second sample data without labels set.
[0072] S220: Extract node features and hyperedge features of the hypergraph structure.
[0073] S230: Input the node features and the hyperedge features into the classification model to be trained to obtain the classification prediction result of the classification model for the sample data.
[0074] S240: Based on the multiple classification prediction results obtained by performing multiple prediction processes on the sample data and the label of the first sample data, a loss function is generated, and parameters of the classification model are adjusted based on the loss function. If the adjusted classification model does not meet the training condition, the adjusted classification model is iteratively trained until a trained classification model is obtained when the training condition is met.
[0075] In this embodiment, by setting labels for local data in the sample data, instead of setting labels for all the sample data, the label setting process for the sample data is simplified. Optionally, the label may include a positive label and a negative label, and accordingly, the first sample data is at least one sample data set with a positive label, and at least one sample data set with a negative label.
[0076] In some embodiments, a loop operation is set to loop through the steps of S230, and the node features and hyperedge features of any set of sample data are processed multiple times in a loop to obtain multiple classification prediction results. In any loop, the classification model discards the input node features and hyperedge features and transmits them, and classifies and identifies the public features and unique features obtained by the transmission to obtain a classification prediction result. Through multiple loops, multiple classification prediction results corresponding to the same set of sample data can be obtained. Optionally, the number of loops is pre-set, and when the number of loops is met, the loop is stopped and step S240 is executed.
[0077] In some embodiments, a parallel execution operation is set, step S230 is executed in parallel, multiple classification prediction results are obtained for the same set of sample data, and step S240 is executed based on the multiple classification prediction results. Specifically, the hyperedge feature transmission module in the control classification model can be used to process the input hyperedge features in parallel to obtain multiple public features, the node feature transmission module can be used to process the input node features in parallel to obtain multiple unique features, and the classification network model can randomly combine the received public features and unique features to obtain multiple classification prediction results.
[0078] Exemplarily, the classification prediction result output by the classification network module may be:
[0079] Among them, Z (S) ∈[0,1] N×C , is The classification prediction results are as follows: C is the number of categories, N is the number of processed objects in the sample data, W is the model parameter, and S is the number of enhancements, that is, the number of classification prediction results.
[0080] Considering that the classifier should output the same category distribution for unlabeled samples, the prediction results are optimized by ensuring the consistency between multiple outputs of unlabeled data, that is, the loss function generated by the difference of multiple classification prediction results. In some embodiments, the loss function includes a consistency loss function for each sample data, and the loss function is determined based on multiple classification prediction results and the average distribution of multiple classification prediction results. Exemplarily, any classification prediction result includes the prediction probability of each processing object (i.e., node), and the average probability distribution is determined by the average prediction probability of each processing object in each classification prediction result, and the loss function is determined based on the average of the differences between each classification prediction result and the probability average distribution.
[0081] In some embodiments, the loss function includes a supervised loss function of first sample data and a consistency loss function of second sample data; wherein, the supervised loss function of the first sample data is generated based on the classification prediction results and labels of the first sample data; and the consistency loss function of the second sample data is determined based on multiple classification prediction results of the second sample data and the average distribution of multiple classification prediction results.
[0082] For example, among N nodes, there are l nodes with labels, i.e., the first sample data, where the label Y i ∈{0,1} N×C The supervised loss function can be the average cross entropy loss expressed by S features, for example:
[0083] Among them, 0≤T≤1 is used to control the category distribution, and T can be the classification threshold for positive classification and negative classification. is the prediction result of node i in the sth enhancement.
[0084] For the second sample data, the average distribution is determined according to the prediction results of each second sample data in S enhancements. For example, the average distribution is Based on the average distribution, the probability that node i belongs to category j can be obtained Among them, 0≤j≤C-1.
[0085] The consistency loss function is determined based on the average distribution and the classification prediction results corresponding to each enhancement. For example, the consistency loss function may be:
[0086] Based on the above embodiment, the loss function is the sum of the supervision loss function and the consistency loss function, that is, L = L sup +λL con , where λ is a preset parameter.
[0087] Based on the above loss function, the parameters of the classification model are adjusted to obtain the classification model updated in the current iteration.
[0088] On the basis of the above embodiment, the classification network module in the classification model includes a parameter W to be trained. Accordingly, the parameter adjustment of the classification model based on the loss function includes: adjusting the parameters of the classification network module based on the loss function.
[0089] The technical solution of this embodiment performs semi-supervised training on the classification model by sampling partially set label sample data, which simplifies the label setting process and reduces the workload of pre-processing the sample data. By performing multiple enhancement processes on the same set of sample data, multiple classification prediction results are obtained, and a loss function is generated based on the consistency principle of multiple classification prediction results of the same set of sample data. The parameters of the classification model are adjusted, and semi-supervised training of the model is realized, which simplifies the training process and improves the training efficiency.
[0090] Based on the above embodiments, the present invention also provides a preferred embodiment, see Figure 5 , Figure 5 This is a schematic diagram of a model training process based on a hypergraph structure provided by an embodiment of the present invention. Given a hypergraph G = (V, E), its unique features are defined as its personal information that is different from other nodes, and the shared features are the public information shared with the nodes in the hyperedge. Optionally, the hyperedge feature represents the public information of the nodes in the hyperedge, and for some hypergraphs, we can directly obtain the public and private features of the nodes by separating the original node features. Define the node feature matrix And the hyperedge feature matrix Among them, d and d' are the feature dimensions of the node feature matrix and the hyperedge feature matrix respectively.
[0091] For a hypergraph G, the node feature matrix X and the hyperedge feature matrix X E In the process of information propagation, different propagation rules are set to solve the over-smoothing problem, where the propagation rules include discarding rules, mixing high-order features, and separating linear changes from information fusion.
[0092] For two input features, the perturbation feature matrix is obtained by randomly deleting all feature vectors of certain nodes and hyperedges and Randomly sample a binary mask ε from a Bernoulli distribution i ~Bernoulli(1-δ), for the node feature matrix X multiplied by the corresponding value in the binary mask, the perturbed node feature is obtained Correspondingly, for the hyperedge feature matrix X E Multiply the corresponding value in the binary mask to get the perturbed hyperedge feature
[0093] For the perturbed node matrix and perturbed hyperedge matrix, use Scaling is performed to ensure that the expected value of the perturbed feature matrix is equal to the original feature matrix.
[0094] According to the node characteristics, information transmission is performed based on the hypergraph Laplacian matrix: in, Correspondingly, for the hyperedge features, information transmission is performed based on the hypergraph Laplacian matrix: in There is no nonlinear transformation in the above transmission process. Enhanced data expression is obtained by mixing the features of the previous multiple transmission layers: Enhancement of node features Enhancement of hyperedge features The feature expression obtained by multiple feature fusions combines shallow information to prevent over-smoothing to a certain extent. In this way, the feature of each node or hyperedge is not a single definite vector. The feature of each node or hyperedge is enhanced by a random mixture of information from its neighbors. Under the homomorphic assumption, the enhanced feature of each node or hyperedge is an approximate representation of the original feature.
[0095] Assume that there are S enhanced feature representations in total. Among them, node features can be directly used as unique features for node classification, and the public features of nodes usually need to combine the common information of multiple hyperedges. i , its public feature expression is obtained by averaging the features of the hyperedges containing this node, that is,
[0096] After obtaining the enhanced feature expression of the node, a 2-layer multi-layer perceptron is used to predict the node, and the prediction result is
[0097] The loss function is determined based on the prediction results, where the loss function includes a supervision loss function formed by nodes with labels and a consistency loss function formed by nodes without labels. The supervision loss function is The consistency loss function is
[0098] Correspondingly, the overall loss function is L = L sup +λL con Based on the loss function, the parameters of the MLP network in the classification model are adjusted. After iteratively executing the above training process, the classification model is iteratively trained.
[0099] Figure 6A flow chart of a classification method based on a hypergraph structure provided in an embodiment of the present invention is provided. This embodiment is applicable to the case of classification for a hypergraph structure. The method can be performed by a classification device based on a hypergraph structure provided in an embodiment of the present invention. The classification device based on a hypergraph structure can be implemented by software and / or hardware. The classification device based on a hypergraph structure can be configured on an electronic computing device, and specifically includes the following steps:
[0100] S310: Obtain node features and hyperedge features corresponding to the hypergraph structure of the object to be processed.
[0101] S320: Input the node features and the hyperedge features into a pre-trained classification model to obtain a classification result output by the classification model.
[0102] Among them, the classification model includes a hyperedge feature transmission module, a node feature transmission module and a classification network module. The hyperedge feature transmission module is used to transmit and process the hyperedge features, the node feature transmission module is used to transmit and process the node features, and the classification network module is used to classify and process the feature information transmitted by the hyperedge feature transmission module and the node feature transmission module to obtain a classification result.
[0103] In this embodiment, the object to be processed may be multiple objects to be classified, each object may correspond to multiple feature information, and a hypergraph structure may be formed based on the feature information of each object, thereby extracting node features and hyperedge features in the hypergraph structure. It is also possible to extract common features from the feature information of multiple objects to form hyperedge features, and determine the features of each object as node features.
[0104] The above node features and hyperedge features are input into a pre-trained classification model, for example, the hyperedge features are input into a hyperedge feature transmission module, and the node features are input into a node feature transmission module, to obtain the classification results output by the classification network module.
[0105] The classification model is trained by the model training method based on the hypergraph structure provided in any of the above embodiments. The classification model is robust to different objects to be processed, thereby ensuring the accuracy of the classification results.
[0106] Figure 7 : is a structural schematic diagram of a model training device based on a hypergraph structure provided by an embodiment of the present invention, the device comprising:
[0107] A first feature extraction module 410 is used to obtain node features and hyperedge features in the hypergraph structure corresponding to the sample data;
[0108] A prediction module 420 is used to input the node features and the hyperedge features into the classification model to be trained to obtain the classification prediction result of the classification model on the sample data; wherein the classification model includes a hyperedge feature transmission module, a node feature transmission module and a classification network module, the hyperedge feature transmission module is used to perform transmission processing on the hyperedge features, the node feature transmission module is used to perform transmission processing on the node features, and the classification network module is used to perform classification processing on the feature information transmitted by the hyperedge feature transmission module and the node feature transmission module to obtain a classification prediction result;
[0109] The parameter adjustment module 430 is used to adjust the parameters of the classification model based on the classification prediction result, and iteratively train the adjusted classification model when the adjusted classification model does not meet the training conditions until a trained classification model is obtained when the training conditions are met.
[0110] Optionally, the node feature transmission module includes a node discarding unit and a first feature transmission unit, the node discarding unit is used to perform random feature discarding on the input node feature to obtain a disturbed node feature, and the first feature transmission unit is used to perform feature transmission on the disturbed node feature;
[0111] The hyper-edge feature transmission module includes a hyper-edge discarding unit and a second feature transmission unit. The hyper-edge discarding unit is used to perform random feature discarding on the input hyper-edge feature to obtain a perturbed hyper-edge feature. The second feature transmission unit is used to perform feature transmission on the perturbed hyper-edge feature.
[0112] Optionally, the first feature transmission unit is used to transmit the disturbance node feature in a first preset number of transmission layers based on the first transmission parameter, and perform fusion processing on the feature information of each transmission layer;
[0113] The second feature transmission unit is used to transmit the perturbed hyperedge feature in a second preset number of transmission layers based on a second transmission parameter, and to fuse feature information of each transmission layer.
[0114] Optionally, the hyperedge feature transmission module further includes a target hyperedge processing unit, which is used to obtain target hyperedge transmission information based on the hyperedge transmission information obtained through fusion processing and the hyperedge-node association matrix.
[0115] Optionally, the sample data includes first sample data with a label set and second sample data without a label set;
[0116] The parameter adjustment module 430 is used to:
[0117] Based on multiple classification prediction results obtained by performing multiple prediction processes on the sample data and a label of the first sample data, a loss function is generated, and parameters of the classification model are adjusted based on the loss function.
[0118] Optionally, the loss function includes a supervision loss function of the first sample data and a consistency loss function of the second sample data;
[0119] The supervised loss function of the first sample data is generated based on the classification prediction result and the label of the first sample data;
[0120] The consistency loss function of the second sample data is determined based on multiple classification prediction results of the second sample data and an average distribution of the multiple classification prediction results.
[0121] Optionally, the classification network module in the classification model includes parameters to be trained;
[0122] The parameter adjustment module 430 is used to adjust the parameters of the classification network module based on the loss function.
[0123] The model training device based on the hypergraph structure provided in the embodiment of the present invention can execute the model training method based on the hypergraph structure provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0124] Figure 8 It is a structural diagram of a classification device based on a hypergraph structure provided in an embodiment of the present invention.
[0125] The device includes:
[0126] The second feature extraction module 510 is used to obtain node features and hyperedge features corresponding to the hypergraph structure of the object to be processed;
[0127] The classification prediction module 520 is used to input the node features and the hyperedge features into a pre-trained classification model to obtain a classification result output by the classification model, wherein the classification model includes a hyperedge feature transmission module, a node feature transmission module and a classification network module, the hyperedge feature transmission module is used to transmit and process the hyperedge features, the node feature transmission module is used to transmit and process the node features, and the classification network module is used to classify and process the feature information transmitted by the hyperedge feature transmission module and the node feature transmission module to obtain a classification result.
[0128] The classification device based on the hypergraph structure provided in the embodiment of the present invention can execute the classification method based on the hypergraph structure provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0129] Fig. 9 A schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. Fig. 9 A block diagram of an electronic device 12 suitable for use in implementing embodiments of the present invention is shown. Fig. 9 The electronic device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention. The device 12 is typically an electronic device that undertakes the image classification function.
[0130] like Fig. 9 As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors 16, a storage device 28, and a bus 18 connecting various system components (including the storage device 28 and the processor 16).
[0131] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. For example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
[0132] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0133] The storage device 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Fig. 9 not shown, usually called a "hard drive"). Although Fig. 9Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a read-only optical disk (Compact Disc-Read Only Memory, CD-ROM), a digital video disk (Digital Video Disc-Read Only Memory, DVD-ROM) or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The storage device 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of various embodiments of the present invention.
[0134] A program 36 having a set (at least one) of program modules 26 may be stored, for example, in a storage device 28, such program modules 26 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may include an implementation of a gateway environment. The program modules 26 generally perform the functions and / or methods of the embodiments described herein.
[0135] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, cameras, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the electronic device 12, and / or may communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. In addition, the electronic device 12 may also communicate with one or more gateways (e.g., a local area network (LAN), a wide area network (WAN), and / or a public gateway, such as the Internet) via a gateway adapter 20. As shown, the gateway adapter 20 communicates with other modules of the electronic device 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, disk arrays (Redundant Arrays of Independent Disks, RAID) systems, tape drives, and data backup storage systems.
[0136] The processor 16 executes various functional applications and data processing by running the programs stored in the storage device 28, such as implementing the model training method based on the hypergraph structure or the classification method based on the hypergraph structure provided in the above-mentioned embodiments of the present invention.
[0137] Embodiment 5 of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the hypergraph structure-based model training method or the hypergraph structure-based classification method provided in the embodiment of the present invention is implemented.
[0138] Of course, the computer-readable storage medium provided by an embodiment of the present invention stores a computer program which is not limited to the method operation described above, but can also execute the model training method based on the hypergraph structure or the classification method based on the hypergraph structure provided by any embodiment of the present invention.
[0139] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0140] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable source code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0141] Source code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wire, electrical wire, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0142] Computer source code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The source code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of gateway, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0143] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A model training method based on a hypergraph structure, characterized in that: include: Obtaining node features and hyperedge features in a hypergraph structure corresponding to the sample data, wherein the node features include unique features of each node, and the hyperedge features include common features between nodes; wherein the sample data is data formed by data of an object to be processed, and the object to be processed includes an image to be classified or a text to be classified; The node features and the hyperedge features are input into the classification model to be trained to obtain the classification prediction result of the classification model for the sample data; wherein the classification model includes a hyperedge feature transmission module, a node feature transmission module and a classification network module, the hyperedge feature transmission module is used to transmit and process the hyperedge features, the node feature transmission module is used to transmit and process the node features, and the classification network module is used to classify and process the feature information transmitted by the hyperedge feature transmission module and the node feature transmission module to obtain the classification prediction result; wherein the transmission process of the hyperedge feature transmission module is independent of the transmission process of the node feature transmission module, and the number of transmission layers in the hyperedge feature transmission module is different from the number of transmission layers in the node feature transmission module; The parameters of the classification model are adjusted based on the classification prediction result, and when the adjusted classification model does not meet the training conditions, the adjusted classification model is iteratively trained until a trained classification model is obtained when the training conditions are met.
2. The method according to claim 1, characterized in that The node feature transmission module includes a node discarding unit and a first feature transmission unit, wherein the node discarding unit is used to perform random feature discarding on the input node feature to obtain a disturbed node feature, and the first feature transmission unit is used to perform feature transmission on the disturbed node feature; The hyper-edge feature transmission module includes a hyper-edge discarding unit and a second feature transmission unit. The hyper-edge discarding unit is used to perform random feature discarding on the input hyper-edge feature to obtain a perturbed hyper-edge feature. The second feature transmission unit is used to perform feature transmission on the perturbed hyper-edge feature.
3. The method according to claim 2, characterized in that The first feature transmission unit is used to transmit the disturbance node feature in a first preset number of transmission layers based on the first transmission parameter, and to fuse the feature information of each transmission layer; The second feature transmission unit is used to transmit the perturbed hyperedge feature in a second preset number of transmission layers based on a second transmission parameter, and to fuse feature information of each transmission layer.
4. The method according to claim 3, characterized in that The hyperedge feature transmission module also includes a target hyperedge processing unit, which is used to obtain target hyperedge transmission information based on the hyperedge transmission information obtained through fusion processing and the hyperedge-node association matrix.
5. The method according to claim 1, characterized in that The sample data includes first sample data with a label and second sample data without a label; The step of adjusting parameters of the classification model based on the classification prediction result includes: Based on multiple classification prediction results obtained by performing multiple prediction processes on the sample data and a label of the first sample data, a loss function is generated, and parameters of the classification model are adjusted based on the loss function.
6. The method according to claim 5, characterized in that The loss function includes a supervision loss function of the first sample data and a consistency loss function of the second sample data; The supervised loss function of the first sample data is generated based on the classification prediction result and the label of the first sample data; The consistency loss function of the second sample data is determined based on multiple classification prediction results of the second sample data and an average distribution of the multiple classification prediction results.
7. The method according to claim 5, characterized in that The classification network module in the classification model includes parameters to be trained; The step of adjusting parameters of the classification model based on the loss function includes: Parameters of the classification network module are adjusted based on the loss function.
8. A classification method based on a hypergraph structure, characterized in that: include: Obtaining node features and hyperedge features corresponding to the hypergraph structure of the object to be processed, wherein the node features include the unique features of each node, and the hyperedge features include the common features between the nodes; wherein the object to be processed includes an image to be classified or a text to be classified; The node features and the hyperedge features are input into a pre-trained classification model to obtain a classification result output by the classification model, wherein the classification model includes a hyperedge feature transmission module, a node feature transmission module and a classification network module, the hyperedge feature transmission module is used to transmit and process the hyperedge features, the node feature transmission module is used to transmit and process the node features, and the classification network module is used to classify and process the feature information transmitted by the hyperedge feature transmission module and the node feature transmission module to obtain a classification result; wherein the transmission process of the hyperedge feature transmission module is independent of the transmission process of the node feature transmission module, and the number of transmission layers in the hyperedge feature transmission module is different from the number of transmission layers in the node feature transmission module.
9. A model training device based on a hypergraph structure, characterized in that: include: A first feature extraction module is used to obtain node features and hyperedge features in a hypergraph structure corresponding to sample data, wherein the node features include unique features of each node, and the hyperedge features include common features between nodes; wherein the sample data is data formed by data of an object to be processed, and the object to be processed includes an image to be classified or a text to be classified; A prediction module, used for inputting the node features and the hyperedge features into the classification model to be trained, and obtaining the classification prediction result of the classification model on the sample data; wherein the classification model includes a hyperedge feature transmission module, a node feature transmission module and a classification network module, the hyperedge feature transmission module is used for transmitting and processing the hyperedge features, the node feature transmission module is used for transmitting and processing the node features, and the classification network module is used for classifying and processing the feature information transmitted by the hyperedge feature transmission module and the node feature transmission module, and obtaining the classification prediction result; wherein the transmission process of the hyperedge feature transmission module is independent of the transmission process of the node feature transmission module, and the number of transmission layers in the hyperedge feature transmission module is different from the number of transmission layers in the node feature transmission module; The parameter adjustment module is used to adjust the parameters of the classification model based on the classification prediction result, and iteratively train the adjusted classification model when the adjusted classification model does not meet the training conditions until a trained classification model is obtained when the training conditions are met.
10. A classification device based on a hypergraph structure, characterized in that: include: A second feature extraction module is used to obtain node features and hyperedge features corresponding to the hypergraph structure of the object to be processed, wherein the node features include the unique features of each node, and the hyperedge features include the common features between each node; wherein the object to be processed includes an image to be classified or a text to be classified; A classification prediction module is used to input the node features and the hyperedge features into a pre-trained classification model to obtain a classification result output by the classification model, wherein the classification model includes a hyperedge feature transmission module, a node feature transmission module and a classification network module, the hyperedge feature transmission module is used to transmit and process the hyperedge features, the node feature transmission module is used to transmit and process the node features, and the classification network module is used to classify and process the feature information transmitted by the hyperedge feature transmission module and the node feature transmission module to obtain a classification result; wherein the transmission process of the hyperedge feature transmission module is independent of the transmission process of the node feature transmission module, and the number of transmission layers in the hyperedge feature transmission module is different from the number of transmission layers in the node feature transmission module.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, it implements the model training method based on the hypergraph structure as described in any one of claims 1 to 7, or the classification method based on the hypergraph structure as described in claim 8.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, it implements the model training method based on the hypergraph structure as described in any one of claims 1 to 7, or the classification method based on the hypergraph structure as described in claim 8.
Citation Information
Patent Citations
Hypergraph convolutional network model and semi-supervised classification method thereof
CN109492691A
User behavior prediction method and system based on LSTM model and hypergraph
CN113065321A