Object Classification Method, Device, Computer Equipment, Storage Medium and Program Product
By introducing the weight of the object and hyper-edge relationship in the hypergraph during feature extraction, the problem of inaccurate object feature extraction in the prior art is solved, and the accuracy of object classification prediction is improved.
Patent Information
- Application Number
- CN202210107241.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-28
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2042-01-28
AI Technical Summary
When the prior art extracts object feature representations from hypergraphs, it is difficult to accurately capture the relationship weights between the object and the hyperede edge, which affects the prediction accuracy of subsequent object classification tasks.
By generating the target object weight matrix, the relationship weight between the target object and the corresponding entity of the hyper-edge is characterized, and the weight matrix is introduced during the feature extraction process to extract the feature information of the object on the hyper-edge dimension.
The information extraction ability of object features in the hypergraph is improved, and a higher-level object feature representation is constructed, which enhances the accuracy of subsequent object classification prediction.
Smart Images

Figure CN114492648B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of artificial intelligence technology, and particularly to an object classification method, apparatus, computer device, storage medium, and program product. Background Art
[0002] Hypergraphs are used to describe the relationships between objects with multiple associations. By introducing hypergraphs in computer vision and machine learning, the association relationships between various objects can be described more accurately.
[0003] In related technologies, a graph neural network is used to extract features from a hypergraph to obtain object feature representations of each object, and then downstream object classification tasks, etc. are performed based on the object feature representations.
[0004] Obviously, the accuracy of the object feature representations extracted from the hypergraph will affect the prediction accuracy of subsequent classification tasks. Summary of the Invention
[0005] Embodiments of the present application provide an object classification method, apparatus, computer device, storage medium, and program product. The technical solutions are as follows.
[0006] On the one hand, an object classification method is provided, and the method includes:
[0007] Obtain a target hypergraph, where the target hypergraph is composed of n target hyperedges, and each target hyperedge is composed of m target objects having an association relationship with the same target entity, and n and m are positive integers;
[0008] Based on the target hypergraph, generate a target object weight matrix, where the target object weight matrix includes target object weights of each target object in the target hypergraph, and the target object weight refers to the relationship weight between the target object and the target entity corresponding to each target hyperedge;
[0009] Extract features from the target hypergraph based on the target object weight matrix to obtain target object feature representations corresponding to each target object;
[0010] Perform object category prediction based on the target object feature representations to obtain a target object category corresponding to the target object.
[0011] On the other hand, an object classification method is provided, and the method includes:
[0012] Obtain a sample hypergraph, where the sample hypergraph is composed of n sample hyperedges, and each sample hyperedge is composed of m sample objects having an association relationship with the same sample entity, and n and m are positive integers;
[0013] Generate a sample object weight matrix based on the sample hypergraph. The sample object weight matrix contains the sample object weights of each sample object in the sample hypergraph. The sample object weight refers to the relationship weight between the sample object and the sample entity corresponding to each sample hyperedge;
[0014] Input the sample hypergraph and the sample object weight matrix into a feature extraction network to obtain the sample object feature representation output by the feature extraction network;
[0015] Input each sample object feature representation into a classification network to obtain the sample prediction classes corresponding to each sample object output by the classification network;
[0016] Train the feature extraction network and the classification network based on the sample prediction classes and the sample annotation classes corresponding to the sample objects.
[0017] On the other hand, an object classification device is provided. The device includes:
[0018] A first acquisition module for acquiring a target hypergraph. The target hypergraph is composed of n target hyperedges, and each target hyperedge is composed of m target objects having an association relationship with the same target entity. n and m are positive integers;
[0019] A first generation module for generating a target object weight matrix based on the target hypergraph. The target object weight matrix contains the target object weights of each target object in the target hypergraph. The target object weight refers to the relationship weight between the target object and the target entity corresponding to each target hyperedge;
[0020] A first feature extraction module for performing feature extraction on the target hypergraph based on the target object weight matrix to obtain the target object feature representations corresponding to each target object;
[0021] A first classification and prediction module for predicting the object category based on the target object feature representation to obtain the target object category corresponding to the target object.
[0022] On the other hand, an object classification device is provided. The device includes:
[0023] A second acquisition module for acquiring a sample hypergraph. The sample hypergraph is composed of n sample hyperedges, and each sample hyperedge is composed of m sample objects having an association relationship with the same sample entity. n and m are positive integers;
[0024] A second generation module, configured to generate a sample object weight matrix based on the sample hypergraph, where the sample object weight matrix includes sample object weights of each sample object in the sample hypergraph, and the sample object weight refers to the relationship weight between the sample object and the sample entities corresponding to each sample hyperedge;
[0025] A second feature extraction module, configured to input the sample hypergraph and the sample object weight matrix into a feature extraction network, and obtain a sample object feature representation output by the feature extraction network;
[0026] A second classification prediction module, configured to input each sample object feature representation into a classification network, and obtain a sample prediction category corresponding to each sample object output by the classification network;
[0027] A training module, configured to train the feature extraction network and the classification network based on the sample prediction category and the sample annotation category corresponding to the sample object.
[0028] On the other hand, a computer device is provided, where the computer device includes a processor and a memory, and at least one program is stored in the memory, and the at least one program is loaded and executed by the processor to implement the object classification method described in the above aspect.
[0029] On the other hand, a computer-readable storage medium is provided, where at least one instruction, at least one program, a code set or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the object classification method described in the above aspect.
[0030] According to another aspect of the present application, a computer program product or a computer program is provided, where the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the object classification method provided in the above optional implementation manner.
[0031] The beneficial effects brought by the technical solution provided in the embodiments of the present application at least include:
[0032] By introducing the target object weights corresponding to each target object in the target hypergraph during the feature extraction process, since the target object weights can represent the relationship weights between the target objects and each target hyperedge (corresponding to the target entity), it enables the extraction of the feature information of the target object in the high-dimensional space of the hyperedges during the feature extraction process, improving the information extraction ability of the object features in the target hypergraph, facilitating the construction of a higher-level object feature representation, thereby providing a more accurate object feature representation for subsequent object classification prediction and being conducive to the accuracy of subsequent classification prediction tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0034] Figure 1 Shows a flowchart of an object classification method provided by an exemplary embodiment of the present application;
[0035] Figure 2 Shows a schematic diagram of the process of object category prediction shown in an exemplary embodiment of the present application;
[0036] Figure 3 Shows a flowchart of an object classification method provided by another exemplary embodiment of the present application;
[0037] Figure 4 Shows a schematic diagram of the principle of object classification shown in an exemplary embodiment of the present application;
[0038] Figure 5 Shows a flowchart of an image processing method shown in an exemplary embodiment of the present application;
[0039] Figure 6 Shows a schematic diagram of the process of model training shown in an exemplary embodiment of the present application;
[0040] Figure 7 Shows a flowchart of an image processing method shown in another exemplary embodiment of the present application;
[0041] Figure 8 Is a structural block diagram of an object classification device provided by an exemplary embodiment of the present application;
[0042] Figure 9 Is a structural block diagram of an object classification device provided by another exemplary embodiment of the present application;
[0043] Figure 10The structural schematic diagram of a computer device provided by an embodiment of the present application is shown. Detailed implementation manners
[0044] To make the objectives, technical solutions, and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the accompanying drawings.
[0045] First, an introduction to the terms involved in the embodiments of the present application will be given.
[0046] 1) Hypergraph: Mathematically, a hypergraph generally refers to a graph where an edge can be associated with any number of vertices; generally, a hypergraph H can be represented as a vertex-edge pair H = (X, E), where X is the set of all vertex elements, and E is a non-empty subset of X. The edges (hyperedges) of a hypergraph can connect more than two vertices. Therefore, an ordinary graph that can connect two vertices can be considered a special case of a hypergraph; optionally, in the fields of computer vision and machine learning, using hypergraphs can more accurately describe the relationships between objects with multiple associations.
[0047] 2) Artificial Intelligence (AI): It is the theory, method, technology, and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science. It attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a way similar to human intelligence. Artificial intelligence also studies the design principles and implementation methods of various intelligent machines to enable the machines to have the functions of perception, reasoning, and decision-making. The basic technologies of artificial intelligence generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, and mechatronics. The software technologies of artificial intelligence mainly include several major directions such as computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning. Among them, the embodiments of the present application mainly relate to the field of machine learning in the field of artificial intelligence technology.
[0048] It should be noted that the object classification method provided by the embodiments of the present application can be executed by a computer device, which includes but is not limited to mobile phones, computers, intelligent voice interaction devices, intelligent home appliances, vehicle-mounted terminals, aircraft, etc. The embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, intelligent transportation, and assisted driving.
[0049] Please refer to Figure 1, which shows a flowchart of an object classification method provided by an exemplary embodiment of the present application. In this embodiment, an example is given with the execution subject of the method being a computer device. The method includes the following steps.
[0050] Step 101, obtain a target hypergraph, where the target hypergraph is composed of n target hyperedges, and each target hyperedge is composed of m target objects having an association relationship with the same target entity. n and m are positive integers.
[0051] In the actual application process, in order to more accurately describe the multi - element relationship between objects. For example, in the paper citation relationship, a paper may cite multiple papers; in the paper author relationship, the same paper may have multiple authors, or the same author may be the author of multiple papers, etc. The object relationship is constructed in the form of a hypergraph. In a possible implementation manner, in order to describe the relationship between a class of target objects, multiple target objects having an association relationship with the same target entity form a hyperedge, and the same target object can be located on multiple target hyperedges. Thus, the relationship between several target objects is represented in the form of a target hypergraph.
[0052] Schematically, if the target objects are several author objects to be classified, and the target entity corresponding to the target hyperedge is a paper, then each target hyperedge is a set of author objects belonging to the same paper author, and the same author object may be the paper author of multiple papers, corresponding to the same author object may be located on multiple target hyperedges; if the number of papers published by the target objects is n, then the generated target hypergraph contains n target hyperedges, and each target hyperedge is composed of m target objects publishing the same paper.
[0053] In an exemplary example, the target hypergraph can be represented as G(V, E), where V represents the set of several target objects included in the target hypergraph, and the target objects are also called the vertices or nodes of the target hypergraph, and E represents the set of target hyperedges of the target hypergraph. Since the target hyperedge is essentially a set of target objects having an association relationship with the same target entity, E is also a non - empty subset of V.
[0054] In a possible implementation manner, if it is necessary to analyze the object category of the target object in a certain dimension, the object information of the target object in this dimension can be obtained, and then a target hypergraph is constructed based on this object information, so as to subsequently analyze the object characteristics of the target object based on this target hypergraph. For example, if it is necessary to analyze the author category to which the author object belongs, the paper information published by several author objects can be obtained, and a target hypergraph is constructed based on this information for subsequent analysis of the author category of the author object.
[0055] Step 102: Based on the target hypergraph, generate a target object weight matrix, which includes the target object weights of each target object in the target hypergraph. The target object weight refers to the relationship weight between the target object and the target entities corresponding to each target hyperedge.
[0056] Although the target hypergraph can describe the multi - element association relationships among various target objects, in the actual application process, in order to analyze the target object characteristics of each target object, it is often necessary to extract object characteristics from the target hypergraph, and then use the extracted target object characteristics for downstream tasks, such as the target object classification task. Correspondingly, how to accurately extract the target object feature representation of the target object from the target hypergraph is of great significance for the subsequent object classification task. And a target object may be located on multiple target hyperedges in the target hypergraph, and the connection strength (relationship weight) between the target object and different hyperedges is also different. Therefore, in a possible implementation, in order to better extract the target object feature representation corresponding to each target object from the target hypergraph, it is first necessary to generate the target object weights corresponding to each target object based on the target hypergraph, generate a target object weight matrix, so as to clarify the relationship weight between the target object and the target entities corresponding to each target hyperedge, and thus introduce this target object weight matrix in the subsequent feature extraction process, which is beneficial to extracting the object features of the target object in the hyperedge dimension.
[0057] Illustratively, taking the authors of a paper as an example, if the authors corresponding to paper A include author object A, author object B, and author object C, where author object A is the first author of paper A, author object B is the second author of paper A, and author object C is the third author of paper A, then the hyperedge corresponding to paper A contains three target objects (author object A, author object B, author object C). However, since the association relationships between different author objects and paper A are different, the relationship weights between different author objects and paper A are different. That is to say, the connection strengths between author object A and author object B and the hyperedge corresponding to paper A are different.
[0058] Step 103: Based on the target object weight matrix, perform feature extraction on the target hypergraph to obtain the target object feature representations corresponding to each target object respectively.
[0059] In a possible implementation, during the process of performing feature extraction on the target hypergraph through the target object weight matrix, the connection strength (relationship weight) between each vertex (target object) and each target hyperedge can be clarified, which is beneficial to extracting higher - level feature information during the feature extraction process.
[0060] Optionally, the feature extraction process is performed by a feature extraction network. That is, the target hypergraph and the target object weight matrix are input into the feature extraction network, and through multiple convolutional operations, the target object feature representations corresponding to each target object can be obtained. The feature extraction network can be a Graph Neural Network (GNN), a Graph Convolutional Network (GCN), etc. The training process of the feature extraction network can refer to the embodiments below, and will not be elaborated in this embodiment.
[0061] Step 104: Perform object category prediction based on the target object feature representation to obtain the target object category corresponding to the target object.
[0062] In a possible implementation manner, after obtaining the target object feature representations of each target object, object category prediction can be performed based on the object features of the target object represented by the target object feature representation, so as to obtain the target object category corresponding to the target object.
[0063] Optionally, the object category prediction is performed by a classification network (classification layer). By inputting the target object feature representation into the classification network, the probabilities of the target object belonging to each candidate category output by the classification network can be obtained, and then the candidate category with the highest probability is determined as the target object category corresponding to the target object.
[0064] Illustratively, if the target object is an author object, the target entity is a paper, and the candidate categories are: K1 = biologist, K2 = computer scientist. By performing feature extraction on the target hypergraph formed by several target objects based on the paper, the object feature representations corresponding to each author object are obtained. Then, based on the object feature representation, the probability of the author object belonging to the author category is predicted, and the author category with the highest probability is determined as the object category of the target object. For example, the category prediction result is: P A1 = 0.3 (indicating that the probability of author object A belonging to category K1 is 0.3), P A2 = 0.7 (indicating that the probability of author object A belonging to category K2 is 0.7), then it means that the target object category corresponding to author object A is a computer scientist.
[0065] As Figure 2 shown, it shows a schematic diagram of the object category prediction process shown in an exemplary embodiment of the present application. In the object classification process, first, an object weight matrix corresponding to the hypergraph 210 is generated according to the hypergraph 210, and then the object weight matrix and the hypergraph 210 are input into the feature extraction network 220. The feature extraction network 220 extracts the object feature representations corresponding to each object in the hypergraph 210, and then the classification network 230 performs category prediction on the object feature representations and outputs the object categories corresponding to each object.
[0066] In summary, in the embodiments of the present application, by introducing the target object weights corresponding to each target object in the target hypergraph during the feature extraction process, since the target object weights can represent the relationship weights between the target objects and each target hyperedge (corresponding to the target entity), the feature information of the target object in the high-dimensional space of the hyperedge can be extracted during the feature extraction process, improving the information extraction ability of the object features in the target hypergraph, which is conducive to better constructing a high-level object feature representation, thereby providing a more accurate object feature representation for subsequent object classification prediction and facilitating the accuracy of subsequent classification prediction tasks.
[0067] For objects located on the same hyperedge, the relationship weights between each object and the entity corresponding to the hyperedge are not the same. Similarly, for the same object connected to different hyperedges, there are also differences in the connection strengths between the object and different hyperedges. Therefore, in order to better characterize the relationship between hyperedges and objects in the hypergraph, in a possible implementation manner, based on the association relationship between the object and the hyperedge, the object weight between the object and the hyperedge is abstracted, and then the feature extraction process is performed based on the object weight.
[0068] In an exemplary example, as Figure 3 shown, it shows a flowchart of an object classification method provided by another exemplary embodiment of the present application. Taking the execution subject computer device of this method as an example for exemplary illustration, this method includes the following steps.
[0069] Step 301, obtain a target hypergraph, where the target hypergraph is composed of n target hyperedges, and each target hyperedge is composed of m target objects having an association relationship with the same target entity, and n and m are positive integers.
[0070] The implementation manner of step 301 can refer to the above embodiments, and will not be elaborated in this embodiment.
[0071] Step 302, based on the target hypergraph, determine the target association relationship between the target object and the target entity corresponding to each target hyperedge.
[0072] Since the target object weight can indicate the relationship weight between the target object and the target entity corresponding to each target hyperedge, and the relationship weight needs to be determined by analyzing the association relationship between the target object and the target entity, therefore, in a possible implementation manner, the target association relationship between the target object and the target entity corresponding to each target hyperedge can be determined based on the target hypergraph, and then the target object weight can be determined based on the target association relationship.
[0073] Optionally, the target association relationship includes at least two types: the target object belongs to the target hyperedge or the target object does not belong to the target hyperedge; further, when the target object belongs to multiple target hyperedges, there are also differences in the strength of the target association relationship between the target object and the target entities corresponding to different target hyperedges.
[0074] Step 303: Determine the target object weight based on the target association relationship corresponding to the target object.
[0075] In an exemplary example, the method for determining the target object weight can be expressed as:
[0076]
[0077] Where Q(u, e) represents the target object weight matrix, and q(u, e) represents the target object weight between the target object u and the target hyperedge e. As can be seen from formula (1), if the target object u belongs to the target hyperedge e, the target object weight is determined by the connection strength between the target object u and the target hyperedge e; if the target object u does not belong to the target hyperedge e, the target object weight between the target object and the target hyperedge e is 0.
[0078] As can be seen from formula (1), the target object weight is related to the target association relationship between the target object and the target hyperedge. In a possible implementation, the target object weight can be determined based on the target association relationship.
[0079] In an exemplary example, step 303 may include step 303A and step 303B.
[0080] Step 303A: When the target association relationship indicates that the target object belongs to the target hyperedge, determine the target object weight based on the target association strength corresponding to the target association relationship, and the target object weight is positively correlated with the target association strength.
[0081] In the target hypergraph, the same target object may belong to different target hyperedges. Since there are differences in the target association strength of the target association relationship between the target object and different target entities, the connection strength between the corresponding target object and different target hyperedges may also be different. Therefore, in order to more accurately depict the topological structure corresponding to the target hypergraph, in a possible implementation, when the target association relationship indicates that the target object belongs to the target hyperedge, the target object weight can be determined based on the target association strength corresponding to the target association relationship, and the higher the target association strength, the greater the target object weight.
[0082] Optionally, corresponding object weights are pre-set in the computer device for different association strengths, that is, a target correspondence indicating the correspondence between the candidate association strength and the candidate object weight is set; such that in the process of determining the target object weight, according to the target association strength indicated by the target association relationship, look up in the correspondence between the candidate association strength and the candidate object weight to find the candidate association strength that matches the target association strength, and then determine the candidate object weight corresponding to the candidate association strength as the target object weight.
[0083] In an exemplary example, taking the target entity as a paper and the target association relationship as the paper author, the target object relationship between the candidate association strength and the candidate object weight can be as shown in Table 1.
[0084] Table 1
[0085]
[0086]
[0087] As can be seen from Table 1, although the target association relationship indicates that each target object is the author of the target paper, due to the difference in the target association strength indicated by the target association relationship, the target object weights corresponding to the target objects also vary. For example, if object A is the first author of paper A, based on the correspondence shown in Table 1, it can be known that the object weight between object A and paper A is 5. If object A is the second author of paper A, based on the correspondence shown in Table 1, it can be known that the object weight between object A and paper A is 3.
[0088] Step 303B, when the target association relationship indicates that the target object does not belong to the target hyperedge, determine that the target object weight is 0.
[0089] In a possible implementation, when the target association relationship indicates that the target object does not belong to the target hyperedge, it means that the target object has no connection relationship with the target entity (target hyperedge), and then determine that the target object weight between the target object and the target hyperedge is 0.
[0090] Step 304, generate a target object weight matrix based on the target object weights corresponding to each target object.
[0091] In a possible implementation, for each target object in the target hypergraph, determine the target object weight between each target object and each target hyperedge respectively, obtain the set of target object weights corresponding to each target object, and then determine the set of target object weights corresponding to each target object as the target object weight matrix.
[0092] In an exemplary example, the target pair weight matrix can be expressed as: where q ij represents the target object weight between the i-th target object and the j-th target hyperedge.
[0093] Step 305: Generate a target vertex degree matrix based on the target object weight matrix and the target hyperedge weight matrix. The target vertex degree matrix contains the degrees of the target objects corresponding to each target object, and the degree of a target object is used to represent the number of target hyperedges connected to the target object.
[0094] In a possible implementation, the target object feature representations corresponding to each target object in the target hypergraph are extracted through a feature extraction network. The extraction principle of the feature extraction network is: performing a Laplace operation on the initial object feature representation to obtain the updated feature representation of each target object after aggregating the adjacent node information; in an exemplary example, the feature extraction process of each layer of convolution in the feature extraction network can be expressed as:
[0095]
[0096] where X {t} represents the object feature representation after the t-th iteration, L2 represents the Laplace matrix, Θ {t} represents the learning parameter matrix corresponding to the t-th convolutional layer, σ represents the activation function, D v represents the vertex degree matrix, D e represents the hyperedge degree matrix, Q represents the object weight matrix, and W represents the hyperedge weight matrix.
[0097] As can be seen from formula (2), in the feature extraction process, not only the target object weight matrix is involved, but also parameters such as the hyperedge degree matrix, vertex degree matrix, and hyperedge weight matrix are required. Therefore, in a possible implementation, first, the corresponding target hyperedge degree matrix and target vertex degree matrix need to be generated based on the relationship between the target object weight matrix, the target vertex degree matrix, and the target hyperedge degree matrix.
[0098] Among them, the vertex degree matrix is a set of degrees of the vertices (target objects) corresponding to each target object. The degree of a target object is used to represent the number of target hyperedges connected to the target object. Correspondingly, it is first necessary to determine the degrees of the vertices corresponding to each target object; in an exemplary example, the relationship between the degree of a vertex and the object weight can be expressed as:
[0099] D v (u,u) = d(u) = ∑ e w(e)Q(u,e) (3)
[0100] where D v(u, u) represents the degree of a vertex, w(e) represents the hyperedge weight, and Q(u, e) represents the object weight. Based on formula (3), in one possible implementation, a target vertex degree matrix can be generated according to the target object weight matrix and the target hyperedge weight matrix.
[0101] Optionally, the hyperedge weight of the target hyperedge can be determined by the attribute information of the target entity corresponding to the target hyperedge. Schematically, if the target hyperedge corresponds to a target paper, the hyperedge weight of the target hyperedge can be determined by the number of citations of the target paper. The higher the number of citations, the greater the hyperedge weight.
[0102] Optionally, the target hyperedge weight matrix can also be set as the identity matrix.
[0103] Step 306, based on the target object weight matrix, generate a target hyperedge degree matrix. The target hyperedge degree matrix contains the degrees of n target hyperedges, and the degree of a target hyperedge is used to represent the number of target objects included in the target hyperedge.
[0104] Since the degree of a target hyperedge is used to represent the number of target objects included in the target hyperedge, therefore, in an exemplary example, the relationship between the degree of a hyperedge and the object weight can be expressed as:
[0105] D e (e, e) = δ(e) = ∑ u Q(u, e) (4)
[0106] Where, D e (e, e) represents the degree of hyperedge e, and Q(u, e) represents the object weight matrix between the target object and hyperedge e; It can be seen from formula (4) that in one possible implementation, first obtain the target object weights between each target hyperedge and each target object, and by summing the target object weights, obtain the degree of the hyperedge corresponding to each target hyperedge. By analogy, obtain the degrees of the hyperedges corresponding to each target hyperedge, so as to determine the set of the degrees of the hyperedges corresponding to each target hyperedge as the target hyperedge degree matrix.
[0107] Step 307, input the target object weight matrix, the target vertex degree matrix, the target hyperedge degree matrix, the target hyperedge weight matrix, and the target hypergraph into the feature extraction network to obtain the target object feature representation output by the feature extraction network.
[0108] In a possible implementation manner, after obtaining the target object weight matrix, the target vertex degree matrix, the target hyperedge degree matrix, and the target hyperedge weight matrix, the target object weight matrix, the target vertex degree matrix, the target hyperedge degree matrix, the target hyperedge weight matrix, and the target hypergraph can be input into the feature extraction network according to the working principle of the feature extraction network shown in formula (2), so as to obtain the target object feature representation output by the feature extraction network.
[0109] As can be seen from formula (2), the feature extraction network performs T iterative calculations on the initial object feature representation to obtain the final target object feature representation. Taking the feature extraction network including T convolutional layers as an example, in an exemplary example, step 307 may include step 307A and step 307B.
[0110] Step 307A, based on the (t - 1)-th object feature representation, the target object weight matrix, the target vertex degree matrix, the target hyperedge degree matrix, the target hyperedge weight matrix, the activation function, and the t-th target feature learning parameter corresponding to the t-th convolutional layer, determine the t-th object feature representation output by the t-th convolutional layer, where t is a positive integer less than or equal to T.
[0111] In a possible implementation manner, for any convolutional layer in the feature extraction network, the input of the t-th convolutional layer is: the (t - 1)-th object feature representation (the object feature representation output by the previous convolutional layer), the target object weight matrix, the target vertex degree matrix, the target hyperedge degree matrix, the target hyperedge weight matrix, and through operations of the activation function and the t-th target feature learning parameter, the t-th object feature representation output by the t-th convolutional layer is obtained.
[0112] It should be noted that when t = 1, the (t - 1)-th object feature representation corresponding to each target object input to the first convolutional layer is determined by the target hypergraph or an initialized object feature representation is used.
[0113] Step 307B, determine the T-th object feature representation output by the T-th convolutional layer as the target object feature representation output by the feature extraction network.
[0114] In a possible implementation manner, each convolutional layer performs iterative operations according to formula (2), then the target object feature representation output by the feature extraction network is the T-th object feature representation output by the T-th convolutional layer.
[0115] Schematically, T can take values such as 3, 5, etc., and the embodiments of the present application do not limit this.
[0116] Such as Figure 4As shown, it shows a schematic diagram of the principle of object classification shown in an exemplary embodiment of the present application. During the object classification process, first, the vertex degree matrix Dv, hyperedge degree matrix De, object weight matrix Q, hyperedge weight matrix W, and the initial object feature representation X corresponding to each object are obtained {0} , and then Dv, De, Q, W, and X {0} are input into the feature extraction layer 420. Taking the feature extraction layer including three convolutional layers (convolutional layer 421, convolutional layer 422, convolutional layer 423) as an example, after 3 iterative operation processes, the object feature representation X output by the convolutional layer 423 is obtained {3} , and the object feature representation is input into the classification layer 430 to obtain the prediction probability P of the object on each candidate category output by the classification layer ij , and then based on the prediction probability P ij the object category 440 corresponding to each object is determined.
[0117] Step 308, perform object category prediction based on the target object feature representation to obtain the target object category corresponding to the target object.
[0118] In a possible implementation manner, when the target object feature representation is used for the node classification task, the target object feature representation can be input into the classification network, and the classification network analyzes the object category based on the target object feature representation, so as to predict the prediction probability that the target object belongs to each candidate category, and then based on the probabilities of each candidate category, the target object category corresponding to the target object is determined.
[0119] In an exemplary example, the calculation formula of the classification network (classification layer) can be expressed as:
[0120] pij = softmax(X {T} Θ {T} ) (5)
[0121] where pij represents the prediction probability that the i-th target object appears in the j-th category, X {T} represents the target object feature representation, and Θ {T} represents the classification learning parameters corresponding to the classification layer.
[0122] In this embodiment, by analyzing the target association relationship between the target object and the target entity corresponding to the target hyperedge, and then determining the target object weight based on the target association strength indicated by the target association relationship, the association relationship between the target object and different target hyperedges can be distinguished at a finer granularity. At the same time, the target object weight is applied to the determination process of the hyperedge degree matrix and vertex degree matrix, and the above matrices are applied to the feature extraction process, so that the feature extraction network has better high-level information modeling and information extraction capabilities when processing unstructured data.
[0123] To implement the object classification process in the above embodiments, it is necessary to pre-build a graph neural network and perform supervised training on the graph neural network so that the graph neural network can accurately extract the feature representations of target objects and accurately classify target objects. This embodiment focuses on describing the training process of the graph neural network (including the feature extraction network and the classification network).
[0124] Please refer to Figure 5 , which shows a flowchart of an image processing method shown in an exemplary embodiment of the present application. In this embodiment, the execution subject of this method is taken as a computer device for exemplary illustration. The method includes:
[0125] Step 501, obtain a sample hypergraph. The sample hypergraph is composed of n sample hyperedges, and each sample hyperedge is composed of m sample objects having an associated relationship with the same sample entity. n and m are positive integers.
[0126] It should be noted that the graph neural network involved in the embodiments of the present application includes a feature extraction layer (feature extraction network) and a classification layer (classification network). Since the embodiments of the present application are used to extract the node feature representations of each vertex (node) in the hypergraph, the graph neural network can also be called: Differential Geometry Hypergraph Neural Network (DGHGNN).
[0127] Since the training purpose of DGHGNN is for node classification (object classification), in a possible implementation, the training samples of DGHGNN include sample objects with classification labels. Among them, based on the relationship between the sample objects and the sample entities, a sample hypergraph is generated, and each sample object corresponds to a sample annotation category (classification label).
[0128] In an exemplary example, the sample objects in the sample hypergraph can be represented as: V l ={v1,…,v l}, where V l represents the l-th sample object in the sample hypergraph.
[0129] In a possible implementation, according to the multivariate association relationships between the sample objects, m sample objects having an associated relationship with the same sample entity are determined as a sample hyperedge, and the set of several sample hyperedges composed of several sample objects is the sample hypergraph. Moreover, the same sample object may be located on multiple sample hyperedges, and a single sample hyperedge may contain one, two, or more than two sample objects.
[0130] Step 502: Based on the sample hypergraph, generate a sample object weight matrix, where the sample object weight matrix contains the sample object weights of each sample object in the sample hypergraph, and the sample object weight refers to the relationship weight between the sample object and the sample entities corresponding to each sample hyperedge.
[0131] Similar to the application side, during the training of DGHGNN, in order to better focus on the topological structure information of the entire sample hypergraph, in a possible implementation, first, according to the relationship weights between the sample objects and the sample entities corresponding to each sample hyperedge, generate a sample object weight matrix corresponding to the sample hypergraph, and then perform object feature extraction based on this sample object weight matrix.
[0132] Among them, the process of generating the sample object weight matrix can refer to the process of generating the target object weight matrix in the above embodiments, and this embodiment will not be elaborated here.
[0133] Step 503: Input the sample hypergraph and the sample object weight matrix into the feature extraction network to obtain the sample object feature representation output by the feature extraction network.
[0134] In a possible implementation, after generating the sample object weight matrix corresponding to the sample hypergraph, the sample hypergraph and the sample object weight matrix can be input into DGHGNN, that is, the feature extraction layer (feature extraction network), to extract the sample object feature representation corresponding to each sample object from the sample hypergraph.
[0135] Step 504: Input the sample object feature representations into the classification network to obtain the sample prediction classes corresponding to each sample object output by the classification network.
[0136] After extracting the sample object feature representations, the sample object feature representations can be input into the classification layer (classification network) in DGHGNN. The classification layer performs class prediction based on the sample object feature representations, so as to obtain the sample prediction probabilities of the sample objects on each candidate class, and then determine the sample prediction classes corresponding to the sample objects.
[0137] Step 505: Train the feature extraction network and the classification network based on the sample prediction classes and the sample annotation classes corresponding to the sample objects.
[0138] Since the accuracy of the classification result is affected by the accuracy of feature extraction and the accuracy of class prediction, therefore, in order to enable DGHGNN to learn in the direction of the accuracy of the classification result during the feature extraction process, in a possible implementation, the classification loss can be determined according to the sample prediction classes and the sample annotation classes, and then the feature extraction network and the classification network can be trained according to the classification loss.
[0139] Such as Figure 6As shown, it shows a schematic diagram of the process of model training shown in an exemplary embodiment of the present application. During the training process of the hypergraph neural network 600, first, a sample object weight matrix is generated according to the sample hypergraph 601. The sample hypergraph 601 and the sample object weight matrix are input into the hypergraph neural network 600, and the feature extraction network 602 performs feature extraction to obtain sample object feature representations, and the classification network 603 performs class prediction to obtain sample prediction classes 604. Furthermore, the hypergraph neural network 600 is trained based on the classification loss between the sample prediction classes 604 and the sample labeled classes 605.
[0140] In summary, in the embodiments of the present application, by introducing the sample object weights corresponding to the sample objects during the model training process, since the sample object weights can represent the relationship weights between the sample objects and each sample hyperedge, it enables the extraction of the feature information of the sample objects in the high-dimensional space of the hyperedges during the feature extraction process, improving the model's ability to extract object feature information from the sample hypergraph, facilitating the construction of higher-level sample object feature representations, and thus providing more accurate object feature representations for subsequent object classification prediction, which is beneficial to the accuracy of subsequent classification prediction tasks.
[0141] Similar to the model application process described above, during the model training process, the inputs to the DGHGNN not only include the target hypergraph and the sample object weight matrix, but also involve parameters such as the sample vertex degree matrix, the sample hyperedge degree matrix, and the sample hyperedge weight matrix. Therefore, before feature extraction, it is also necessary to determine parameters such as the sample vertex degree matrix and the sample hyperedge degree matrix corresponding to the target hypergraph according to the sample object weight matrix.
[0142] Please refer to Figure 7 , which shows a flowchart of an image processing method shown in another exemplary embodiment of the present application. In this embodiment, it is exemplarily described by taking the execution subject of this method as a computer device. The method includes:
[0143] Step 701, obtain a sample hypergraph. The sample hypergraph is composed of n sample hyperedges, and each sample hyperedge is composed of m sample objects having an associated relationship with the same sample entity. n and m are positive integers.
[0144] The implementation manner of step 701 can refer to the above embodiments, and this embodiment will not be elaborated here.
[0145] Step 702, based on the sample hypergraph, determine the sample association relationship between the sample objects and the sample entities corresponding to each sample hyperedge.
[0146] To determine the sample object weight of a sample object, it is necessary to analyze the association relationship between the sample object and each sample hyperedge in the sample hypergraph. Therefore, in a possible implementation, the sample association relationship between the sample object and the sample entities corresponding to each sample hyperedge can be analyzed according to the sample hypergraph.
[0147] Furthermore, the way to determine the sample association relationship can be: determine whether the sample object is located on the sample hyperedge. If the sample object is located on the sample hyperedge, the sample association strength of the association relationship between the sample object and the sample entities corresponding to the sample hyperedge can be further determined, that is, the connection strength between the sample object and the sample hyperedge.
[0148] Illustratively, taking the relationship between a paper and a sample object as an example, it can be seen from the sample hypergraph that sample object A is the first author of paper A, sample object B is the second author of paper A, sample object C is the third author of paper A, and sample object A is the third author of paper B. Then sample objects A, B, and C are all located on the sample hyperedge e1 corresponding to paper A, and sample object A also belongs to the sample hyperedge e2 corresponding to paper B. Then the sample association relationship between sample object A and sample hyperedge e1 is: the first author, and the sample association relationship between sample object B and sample hyperedge e1 is the second author.
[0149] Step 703, determine the sample object weight based on the sample association relationship corresponding to the sample object.
[0150] As can be seen from formula (1), in a possible implementation, the sample object weight can be determined according to the sample association relationship between the sample object and the sample hyperedge. Among them, if the sample object belongs to the sample hyperedge, the sample object weight is determined by the connection strength between the sample object and the sample hyperedge; if the sample object does not belong to the sample hyperedge, the sample object weight is 0.
[0151] In an exemplary example, step 703 may include step 703A and step 703B.
[0152] Step 703A, in the case where the sample association relationship indicates that the sample object belongs to the sample hyperedge, determine the sample object weight based on the sample association strength corresponding to the sample association relationship. The sample object weight is positively correlated with the sample association strength.
[0153] For the case where a sample object belongs to a sample hyperedge, in a sample hypergraph, the same sample object may be located in different sample hyperedges, but the strength of the association relationship between the same sample object and different sample hyperedges may vary. For example, sample object A is the author of paper A and paper B, but sample object A is the first author of paper A, while sample object B is the third author of paper B. Although sample object A is located on the sample hyperedges corresponding to paper A and paper B, since the sample association strength between sample object A and paper A and paper B is different, in order to distinguish the relationship between sample object A and paper A and paper B, the sample object weight between sample object A and paper A is set to be different from the sample object weight between sample object A and paper B. Therefore, in one possible implementation, when the sample association relationship indicates that a sample object belongs to a sample hyperedge, the sample object weight can be determined according to the sample association strength corresponding to the sample association relationship, and the higher the sample association strength, the greater the corresponding sample object weight; and then a sample object weight matrix corresponding to the sample hypergraph is generated.
[0154] Among them, the process of determining the sample object weight according to the sample relationship strength can refer to the process of determining the target object weight according to the target relationship strength in the above embodiments, and this embodiment will not be elaborated here.
[0155] Step 703B, when the sample association relationship indicates that a sample object does not belong to a sample hyperedge, determine that the sample object weight is 0.
[0156] In one possible implementation, if the sample association relationship indicates that a sample object does not belong to a sample hyperedge, it means that there is no connection relationship between the sample object and the sample hyperedge, and correspondingly, there is no sample connection strength, so it is determined that the sample object weight between the sample object and the sample hyperedge is 0.
[0157] Step 704, generate a sample object weight matrix based on the sample object weights corresponding to each sample object.
[0158] In one possible implementation, after determining the set of sample object weights between each sample object weight and each sample hyperedge according to formula (1), and so on, determine the set of sample object weights between each sample object weight and each sample hyperedge, that is, obtain the sample object weight matrix corresponding to the sample hypergraph. Among them, the form of the sample object weight matrix can refer to step 304.
[0159] Step 705, generate a sample vertex degree matrix based on the sample object weight matrix and the sample hyperedge weight matrix. The sample vertex degree matrix contains the degrees of the sample objects corresponding to each sample object, and the degree of the sample object is used to represent the number of sample hyperedges connected to the sample object.
[0160] In this embodiment, in order to obtain the Laplacian matrix L2 in the form shown in formula (2), by redefining H(E) corresponding to the hypergraph and the hypergraph gradient, the Laplacian matrix that can be applied to the hypergraph neural network is derived. Here, E is the edge set of the hypergraph, and H(E) represents the Hilbert space composed of real-valued functions defined on the hypergraph edge set.
[0161] In an exemplary example, the definition of the inner product in H(E) can be expressed as:
[0162]
[0163] where σ(e) ∈ R ++ , which is used to ensure the non-negativity of the inner product, <F, G> H(E) represents the inner product of H(E), e represents the hyperedge, F(e) represents the operation of function F on e, G(e) represents the operation of function G on e. It can be seen that the input of the inner product of H(E) is e, making it a space that can be established based on the hyperedges of higher-order relationships.
[0164] Given the determined functions μ(e) ∈ H(E), ξ(v) ∈ H(V), the definition of the gradient of the hypergraph df: H(V) → H(E) can be expressed as:
[0165] df(e) = μ(e)∑ v∈V Q(v, e)ξ(v)f(v) (7)
[0166] where μ(e) ∈ H(E), ξ(v) ∈ H(V) uses the general representation. Different gradients can be obtained by taking different functions. H(V) represents the Hilbert space composed of real-valued functions defined on the hypergraph vertex set, v represents the hypergraph vertex, Q(v, e) represents the vertex weight matrix (object weight matrix). Since the connection strength between the vertex v and different edges e is different, Q(v, e) is related to both v and e and is the edge-dependent matrix.
[0167] Through the definition of divergence: <df, F> H(E) = <f, -divF>H(V), Combined with the definition of the inner product of H(V): <f, g> H(V) = ∑ u∈V f(u)g(u), and formula (6) and formula (7), the expression of divergence can be obtained as:
[0168] divF(v) = -∑ e∈E μ(e)σ(e)Q(v, e)ξ(v)F(e) (8)
[0169] where the specific derivation process of the divergence formula (8) is:
[0170] Since <df, F> H(E) = <f, -divF> H(V) ,
[0171] then: <df, F> H(E) = <μ(e)∑ v∈y Q(v, e)ξ(v)f(v), F(e)> H(E)
[0172] = σ(e)∑ e∈E F(e)μ(e)∑ v∈V Q(v,e)ξ(v)f(v) = ∑ v∈V f(v)∑ e∈E μ(e)σ(e)Q(v,e)ξ(v)F(e)
[0173] = <f, -divF> H(V)
[0174] Therefore, divF(v) = -∑ e∈E μ(e)σ(e)Q(v,e)ξ(v)F(e)
[0175] After obtaining the expression formula (7) of the divergence, through the definition of the Laplace operation Δf(v) = -div(df(e))(v), the Laplacian operator of the hypergraph can be derived as:
[0176] Δf(v) = -div(df)(v) = ∑ u∈V (∑ e∈E μ 2 (e)σ(e)Q(v,e)Q(u,e)ξ(u)ξ(v))f(u) (9)
[0177] Among them, the derivation process of formula (9) can be:
[0178]
[0179] Formula (9) can be converted into matrix form. Among them, let D(u, u) = ξ(u), W(e, e) = μ 2 (e), D e (e,e) = σ -1 (e), then the ∑ e∈E μ 2 (e)σ(e)Q(v,e)Q(u,e)ξ(u)ξ(v) in formula (9) can be written in matrix form Δ H (u,v), to obtain the Laplacian matrix form as:
[0180]
[0181] If we let σ(e) = δ(e), then formula (10) can be transformed into another form of the Laplacian matrix commonly used in hypergraphs:
[0182]
[0183] Among them, in hypergraph applications, L2 is equivalent to performing a smoothing operation on the node signal f. That is to say, the updated signal of each signal obtained by aggregating adjacent nodes is obtained by L2f. Then it can be directly used in the design of hypergraph neural networks, and thus the extraction form of the node features (object features) shown in formula (2) is obtained. Corresponding to the hypergraph application process, D v represents the vertex degree matrix of the hypergraph, D e represents the hyperedge degree matrix of the hypergraph, Q represents the object weight matrix of the hypergraph, and W represents the hyperedge weight matrix of the hypergraph.
[0184] In a possible implementation, based on the relationship between the degree of vertices and object weights shown in formula (3), a sample vertex degree matrix can be generated according to the sample object weight matrix and the sample hyperedge weight matrix.
[0185] Step 706, generate a sample hyperedge degree matrix based on the sample object weight matrix. The sample hyperedge degree matrix contains the degrees of n sample hyperedges, and the degree of a sample hyperedge is used to represent the number of sample objects included in the sample hyperedge.
[0186] In a possible implementation, it can be seen from formula (4) that by obtaining the sample object weights between the sample hyperedges and each sample object and summing up the sample object weights, the degree of the hyperedge corresponding to the sample hyperedge is obtained. By analogy, the degrees of the hyperedges corresponding to each sample hyperedge are obtained, and thus the set of the degrees of the hyperedges corresponding to each sample hyperedge is determined as the sample hyperedge degree matrix.
[0187] Step 707, input the sample object weight matrix, the sample vertex degree matrix, the sample hyperedge degree matrix, the sample hyperedge weight matrix, and the sample hypergraph into the feature extraction network to obtain the sample object feature representation output by the feature extraction network.
[0188] In a possible implementation, when the sample object weight matrix, the sample vertex degree matrix, the sample hyperedge degree matrix, and the sample hyperedge weight matrix are obtained, according to the working principle of the feature extraction network shown in formula (2), the sample object weight matrix, the sample vertex degree matrix, the sample hyperedge degree matrix, the sample hyperedge weight matrix, and the sample hypergraph are input into the feature extraction network to obtain the sample object feature representation output by the feature extraction network.
[0189] Similar to the model application process, during the training process, the feature extraction network also needs to perform T iterations of calculation on the initial object feature representation to obtain the final target object feature representation. Taking the feature extraction network including T convolutional layers as an example, in an exemplary example, step 707 may include step 707A and step 707B.
[0190] Step 707A, based on the (t - 1)th sample object feature representation, the sample object weight matrix, the sample vertex degree matrix, the sample hyperedge degree matrix, the sample hyperedge weight matrix, the activation function, and the tth sample feature learning parameter corresponding to the tth convolutional layer, determine the tth sample object feature representation output by the tth convolutional layer, where t is a positive integer less than or equal to T.
[0191] In a possible implementation, for any convolutional layer in the feature extraction network, the input of the tth convolutional layer is: the (t - 1)th sample object feature representation (the sample object feature representation output by the previous convolutional layer), the sample object weight matrix, the sample vertex degree matrix, the sample hyperedge degree matrix, the sample hyperedge weight matrix, and through the activation function and the tth sample feature learning parameter for operation, the tth sample object feature representation output by the tth convolutional layer is obtained. Among them, the tth sample feature learning parameter will be updated with each loss training process.
[0192] It should be noted that when t = 1, the (t - 1)th sample object feature representation corresponding to each sample object input to the first convolutional layer is determined by the sample hypergraph or uses the initialized object feature representation.
[0193] Step 707B, determine the sample object feature representation output by the feature extraction network as the Tth sample object feature representation output by the Tth convolutional layer.
[0194] In a possible implementation, each convolutional layer performs iterative operations according to formula (2), then the sample object feature representation output by the feature extraction network is the Tth sample object feature representation output by the Tth convolutional layer.
[0195] Schematically, T can take values of 1, 3, 5, etc., and the embodiments of the present application do not limit this.
[0196] Step 708, based on the Tth sample object feature representation and the sample classification learning parameter, determine the sample prediction category output by the classification network.
[0197] Similar to the model application process, as can be seen from formula (5), in a possible implementation, after obtaining the Tth sample object feature representation, the prediction probability of each sample object on each candidate category can be predicted based on the Tth sample object feature representation and the sample classification learning parameter, and then the sample prediction category corresponding to each sample object can be determined.
[0198] Among them, the sample classification learning parameters are updated with each loss training process.
[0199] Step 709: Based on the sample predicted category and the sample labeled category, determine the sample classification loss corresponding to the sample object.
[0200] In order to train the DGHGNN so that the DGHGNN can learn towards classification prediction accuracy, in a possible implementation, the sample classification loss of the sample object in the current round of classification prediction process can be determined according to the sample predicted category and the sample labeled category, and then the DGHGNN can be trained based on this sample classification loss.
[0201] Optionally, the sample classification loss can use the cross-entropy loss, exponential loss, softmax loss, etc. between the sample predicted category and the sample labeled category. The embodiments of the present application do not limit this.
[0202] Step 710: Based on the sample classification loss, update the sample classification learning parameters corresponding to the classification network and the T sample feature learning parameters corresponding to the feature extraction network.
[0203] In a possible implementation, for each round of training process, it is necessary to determine the sample classification loss corresponding to each round, and then use the stochastic gradient descent algorithm to optimize and update the sample classification learning parameters and sample feature learning parameters in the DGHGNN, so that the DGHGNN has the object classification function.
[0204] In this embodiment, by redefining the inner product of the hypergraph and the gradient of the hypergraph, a finer-grained Laplacian matrix form is derived, so that the Laplacian matrix can be applied to the design process of the hypergraph neural network and used for the extraction process of the object feature representation of each object in the hypergraph, which is beneficial to the hypergraph neural network having the ability to extract higher-level information, thereby improving the information extraction ability of the hypergraph neural network; in addition, the hypergraph neural network is trained through the sample hypergraph and the corresponding sample labeled category, so that the hypergraph neural network can have the classification function for each node in the hypergraph during application.
[0205] The following is the device embodiment of the present application. For the details not described in detail in the device embodiment, reference can be made to the above method embodiment.
[0206] Figure 8 It is the structural block diagram of an object classification device provided by an exemplary embodiment of the present application. The device may include:
[0207] A first acquisition module 801, configured to acquire a target hypergraph, where the target hypergraph is composed of n target hyperedges, and each target hyperedge is composed of m target objects having an association relationship with the same target entity, and n and m are positive integers;
[0208] A first generation module 802, configured to generate a target object weight matrix based on the target hypergraph, where the target object weight matrix includes target object weights of each target object in the target hypergraph, and the target object weight refers to the relationship weight between the target object and the target entity corresponding to each target hyperedge;
[0209] A first feature extraction module 803, configured to perform feature extraction on the target hypergraph based on the target object weight matrix to obtain target object feature representations corresponding to each target object;
[0210] A first classification and prediction module 804, configured to perform object category prediction based on the target object feature representation to obtain a target object category corresponding to the target object.
[0211] Optionally, the first generation module 802 includes:
[0212] A first determination unit, configured to determine a target association relationship between the target object and the target entity corresponding to each target hyperedge based on the target hypergraph;
[0213] A second determination unit, configured to determine the target object weight based on the target association relationship corresponding to the target object;
[0214] A first generation unit, configured to generate the target object weight matrix based on the target object weights corresponding to each target object.
[0215] Optionally, the second determination unit is further configured to:
[0216] When the target association relationship indicates that the target object belongs to the target hyperedge, determine the target object weight based on the target association strength indicated by the target association relationship, and the target object weight has a positive correlation with the target association strength;
[0217] When the target association relationship indicates that the target object does not belong to the target hyperedge, determine the target object weight to be 0.
[0218] Optionally, the second determination unit is further configured to:
[0219] Determine the target object weight based on the target association strength indicated by the target association relationship and a target correspondence relationship, where the target correspondence relationship is a correspondence relationship between a candidate association strength and a candidate object weight.
[0220] Optionally, the first feature extraction module 803 includes:
[0221] A second generation unit, configured to generate a target vertex degree matrix based on the target object weight matrix and the target hyperedge weight matrix. The target vertex degree matrix includes the degrees of the target objects corresponding to each of the target objects. The degree of the target object is used to represent the number of the target hyperedges connected to the target object;
[0222] A third generation unit, configured to generate a target hyperedge degree matrix based on the target object weight matrix. The target hyperedge degree matrix includes the degrees of n target hyperedges. The degree of the target hyperedge is used to represent the number of the target objects included in the target hyperedge;
[0223] A first feature extraction unit, configured to input the target object weight matrix, the target vertex degree matrix, the target hyperedge degree matrix, the target hyperedge weight matrix, and the target hypergraph into a feature extraction network, and obtain the target object feature representation output by the feature extraction network.
[0224] Optionally, the feature extraction network includes T convolutional layers, where T is a positive integer;
[0225] The first feature extraction unit is further configured to:
[0226] Based on the (t-1)th object feature representation, the target object weight matrix, the target vertex degree matrix, the target hyperedge degree matrix, the target hyperedge weight matrix, an activation function, and the tth target feature learning parameter corresponding to the tth convolutional layer, determine the tth object feature representation output by the tth convolutional layer, where t is a positive integer less than or equal to T;
[0227] Determine the Tth object feature representation output by the Tth convolutional layer as the target object feature representation output by the feature extraction network.
[0228] In summary, in the embodiments of the present application, by introducing the target object weights corresponding to each target object in the target hypergraph during the feature extraction process, since the target object weights can represent the relationship weights between the target objects and each target hyperedge (corresponding to the target entity), feature information of the target objects in the high dimension of the hyperedge can be extracted during the feature extraction process, improving the information extraction ability of the object features in the target hypergraph, facilitating the construction of a higher-level object feature representation, thereby providing a more accurate object feature representation for subsequent object classification prediction, and being beneficial to the accuracy of subsequent classification prediction tasks.
[0229] Figure 9It is a structural block diagram of an object classification device provided by another exemplary embodiment of the present application. The device includes:
[0230] A second acquisition module 901, configured to acquire a sample hypergraph, where the sample hypergraph is composed of n sample hyperedges, and each sample hyperedge is composed of m sample objects having an associated relationship with the same sample entity, and n and m are positive integers;
[0231] A second generation module 902, configured to generate a sample object weight matrix based on the sample hypergraph, where the sample object weight matrix includes sample object weights of each sample object in the sample hypergraph, and the sample object weight refers to the relationship weight between the sample object and the sample entity corresponding to each sample hyperedge;
[0232] A second feature extraction module 903, configured to input the sample hypergraph and the sample object weight matrix into a feature extraction network to obtain a sample object feature representation output by the feature extraction network;
[0233] A second classification prediction module 904, configured to input each sample object feature representation into a classification network to obtain a sample prediction category corresponding to each sample object output by the classification network;
[0234] A training module 905, configured to train the feature extraction network and the classification network based on the sample prediction category and the sample annotation category corresponding to the sample object.
[0235] Optionally, the second generation module 1302 includes:
[0236] A third determination unit, configured to determine a sample association relationship between the sample object and the sample entity corresponding to each sample hyperedge based on the sample hypergraph;
[0237] A fourth determination unit, configured to determine the sample object weight based on the sample association relationship corresponding to the sample object;
[0238] A fourth generation unit, configured to generate the sample object weight matrix based on the sample object weights corresponding to each sample object.
[0239] Optionally, the fourth determination unit is further configured to:
[0240] When the sample association relationship indicates that the sample object belongs to the sample hyperedge, determine the sample object weight based on the sample association strength corresponding to the sample association relationship, and the sample object weight is positively correlated with the sample association strength;
[0241] When the sample association relationship indicates that the sample object does not belong to the sample hyperedge, determine that the weight of the sample object is 0.
[0242] Optionally, the second feature extraction module 903 includes:
[0243] A fifth generation unit for generating a sample vertex degree matrix based on the sample object weight matrix and the sample hyperedge weight matrix. The sample vertex degree matrix contains the degrees of the sample objects corresponding to each of the sample objects, and the degree of the sample object is used to characterize the number of sample hyperedges connected to the sample object;
[0244] A sixth generation unit for generating a sample hyperedge degree matrix based on the sample object weight matrix. The sample hyperedge degree matrix contains the degrees of n sample hyperedges, and the degree of the sample hyperedge is used to characterize the number of sample objects included in the sample hyperedge;
[0245] A second feature extraction unit for inputting the sample object weight matrix, the sample vertex degree matrix, the sample hyperedge degree matrix, the sample hyperedge weight matrix, and the sample hypergraph into the feature extraction network to obtain the sample object feature representation output by the feature extraction network.
[0246] Optionally, the feature extraction network includes T convolutional layers, where T is a positive integer;
[0247] The second feature extraction unit is further configured to:
[0248] Based on the (t - 1)th sample object feature representation, the sample object weight matrix, the sample vertex degree matrix, the sample hyperedge degree matrix, the sample hyperedge weight matrix, an activation function, and the tth sample feature learning parameter corresponding to the tth convolutional layer, determine the tth sample object feature representation output by the tth convolutional layer, where t is a positive integer less than or equal to T;
[0249] Determine the Tth sample object feature representation output by the Tth convolutional layer as the sample object feature representation output by the feature extraction network.
[0250] Optionally, the second classification prediction module 904 includes:
[0251] A classification prediction unit for determining the sample prediction category output by the classification network based on the Tth sample object feature representation and the sample classification learning parameter.
[0252] Optionally, the training module 905 includes:
[0253] A fifth determination unit, configured to determine a sample classification loss corresponding to the sample object based on the predicted category of the sample and the labeled category of the sample;
[0254] An update unit, configured to update the sample classification learning parameters corresponding to the classification network and the T sample feature learning parameters corresponding to the feature extraction network based on the sample classification loss.
[0255] In summary, in the embodiment of the present application, by introducing a sample object weight corresponding to a sample object during model training, since the sample object weight can represent the relationship weight between the sample object and each sample hyperedge, feature information of the sample object in the high dimension of the hyperedge can be extracted during feature extraction, improving the information extraction ability of the model for object features in the sample hypergraph, facilitating the construction of a higher-level sample object feature representation, thereby providing a more accurate object feature representation for subsequent object classification prediction and being beneficial to the accuracy of subsequent classification prediction tasks.
[0256] Please refer to Figure 10 , which shows a schematic structural diagram of a computer device provided by an embodiment of the present application. The computer device can be used to implement the image processing method executed by the computer device provided in the above embodiment. The computer device 1000 includes a central processing unit (CPU, Central Processing Unit) 1001, a system memory 1004 including a random access memory (RAM, Random Access Memory) 1002 and a read-only memory (ROM, Read-Only Memory) 1003, and a system bus 1005 connecting the system memory 1004 and the central processing unit 1001. The computer device 1000 further includes a basic input / output system (I / O, Input / Output) 1006 for facilitating information transmission between various components in the computer, and a mass storage device 1007 for storing an operating system 1013, application programs 1014, and other program modules 1015.
[0257] The basic input / output system 1006 includes a display 1008 for displaying information and an input device 1009 such as a mouse and a keyboard for user input of information. The display 1008 and the input device 1009 are both connected to the central processing unit 1001 through an input / output controller 1010 connected to the system bus 1005. The basic input / output system 1006 may further include an input / output controller 1010 for receiving and processing inputs from multiple other devices such as a keyboard, a mouse, or an electronic stylus. Similarly, the input / output controller 1010 also provides output to a display screen, a printer, or other types of output devices.
[0258] The large-capacity storage device 1007 is connected to the central processing unit 1001 through a large-capacity storage controller (not shown) connected to the system bus 1005. The large-capacity storage device 1007 and its associated computer-readable medium provide non-volatile storage for the computer device 1000. That is to say, the large-capacity storage device 1007 may include a computer-readable medium (not shown) such as a hard disk or a CD-ROM (Compact Disc Read-Only Memory) drive.
[0259] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes RAM, ROM, EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory or other solid-state storage technologies, CD-ROM, DVD (Digital Video Disc) or other optical storage, magnetic tape cartridges, tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will understand that the computer storage media is not limited to the above several types. The above-mentioned system memory 1004 and large-capacity storage device 1007 may be collectively referred to as memory.
[0260] According to various embodiments of the present application, the computer device 1000 may also be connected to a remote computer on the network through a network such as the Internet. That is, the computer device 1000 may be connected to the network 1012 through a network interface unit 1011 connected to the system bus 1005, or in other words, the network interface unit 1011 may also be used to connect to other types of networks or remote computer systems (not shown).
[0261] The memory further includes one or more programs, and the one or more programs are stored in the memory and configured to be executed by one or more central processing units 1001.
[0262] The present application also provides a computer-readable storage medium, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the object classification method provided in any of the above exemplary embodiments.
[0263] An embodiment of the present application provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the object classification method provided in the above optional implementation manners.
[0264] Those of ordinary skill in the art can understand that all or part of the steps for implementing the above embodiments can be completed by hardware, or can be completed by a program instructing relevant hardware. The program can be stored in a computer-readable storage medium, and the above-mentioned storage medium can be a read-only memory, a magnetic disk or an optical disc, etc.
[0265] The above are only optional embodiments of the present application, and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. An object classification method, characterized in that, The method includes: Obtaining a target hypergraph, where the target hypergraph is composed of n target hyperedges, and each target hyperedge is composed of m target objects having an association relationship with the same target entity, and n and m are positive integers; Based on the target hypergraph, determining a target association relationship between the target object and the target entity corresponding to each target hyperedge; When the target association relationship indicates that the target object belongs to the target hyperedge, based on the target association strength indicated by the target association relationship and a target correspondence relationship, determining a target object weight, where the target object weight has a positive correlation with the target association strength, and the target correspondence relationship is a correspondence relationship between a candidate association strength and a candidate object weight, and the candidate association strength corresponds to the candidate object weight one by one; When the target association relationship indicates that the target object does not belong to the target hyperedge, determining that the target object weight is 0; Based on the target object weights corresponding to each target object, generating a target object weight matrix, where the target object weight matrix includes the target object weights of each target object in the target hypergraph, and the target object weight refers to the relationship weight between the target object and the target entity corresponding to each target hyperedge; Using a feature extraction network, based on the target object weight matrix, performing feature extraction on the target hypergraph to obtain target object feature representations corresponding to each target object respectively, where the feature extraction network includes T convolutional layers, T is a positive integer, and the target object feature representation is the T-th object feature representation output by the T-th convolutional layer of the feature extraction network; Based on the target object feature representation, performing object category prediction to obtain a target object category corresponding to the target object; The target object is an author object to be classified, the target entity corresponding to the target hyperedge is a paper, and each target hyperedge is a set of author objects belonging to the same paper.
2. The method according to claim 1, characterized in that, The performing feature extraction on the target hypergraph based on the target object weight matrix to obtain target object feature representations corresponding to each target object respectively includes: Based on the target object weight matrix and a target hyperedge weight matrix, generating a target vertex degree matrix, where the target vertex degree matrix includes the degrees of each target object corresponding to each target object, and the degree of the target object is used to characterize the number of target hyperedges connected to the target object; Based on the target object weight matrix, generating a target hyperedge degree matrix, where the target hyperedge degree matrix includes the degrees of n target hyperedges, and the degree of the target hyperedge is used to characterize the number of target objects included in the target hyperedge; Inputting the target object weight matrix, the target vertex degree matrix, the target hyperedge degree matrix, the target hyperedge weight matrix, and the target hypergraph into the feature extraction network to obtain the target object feature representation output by the feature extraction network.
3. The method according to claim 2, characterized in that, Inputting the target object weight matrix, the target vertex degree matrix, the target hyperedge degree matrix, the target hyperedge weight matrix, and the target hypergraph into the feature extraction network to obtain the target object feature representation output by the feature extraction network includes: Determining the t-th object feature representation output by the t-th convolutional layer based on the (t - 1)-th object feature representation, the target object weight matrix, the target vertex degree matrix, the target hyperedge degree matrix, the target hyperedge weight matrix, an activation function, and the t-th target feature learning parameters corresponding to the t-th convolutional layer, where t is a positive integer less than or equal to T; Determining the T-th object feature representation output by the T-th convolutional layer as the target object feature representation output by the feature extraction network.
4. An object classification method, characterized in that, The method includes: Obtaining a sample hypergraph composed of n sample hyperedges, where each sample hyperedge is composed of m sample objects having an associated relationship with the same sample entity, and n and m are positive integers; Generating a sample object weight matrix based on the sample hypergraph, where the sample object weight matrix includes the sample object weights of the respective sample objects in the sample hypergraph, and the sample object weight refers to the relationship weight between the sample object and the sample entity corresponding to each sample hyperedge; Inputting the sample hypergraph and the sample object weight matrix into a feature extraction network to obtain the sample object feature representation output by the feature extraction network; Inputting the respective sample object feature representations into a classification network to obtain the sample prediction classes corresponding to the respective sample objects output by the classification network; Training the feature extraction network and the classification network based on the sample prediction classes and the sample annotation classes corresponding to the sample objects; The sample object is an author object to be classified, the sample entity corresponding to the sample hyperedge is a paper, and each sample hyperedge is a set of author objects belonging to the same paper; Using the trained feature extraction network to perform feature extraction on a target hypergraph based on a target object weight matrix to obtain the target object feature representations corresponding to the respective target objects, where the feature extraction network includes T convolutional layers, T is a positive integer, the target object feature representation is the T-th object feature representation output by the T-th convolutional layer of the feature extraction network, the target hypergraph is composed of n target hyperedges, each target hyperedge is composed of m target objects having an associated relationship with the same target entity, n and m are positive integers, the target object weight matrix is generated based on the target object weights corresponding to the respective target objects, the target object weight matrix includes the target object weights of the respective target objects in the target hypergraph, and the target object weight refers to the relationship weight between the target object and the target entity corresponding to each target hyperedge; When the target association relationship indicates that the target object belongs to the target hyperedge, the target object weight is determined based on the target association strength indicated by the target association relationship and the target correspondence relationship. The target object weight is positively correlated with the target association strength. The target correspondence relationship is the correspondence relationship between the candidate association strength and the candidate object weight, and the candidate association strength corresponds to the candidate object weight one by one; When the target association relationship indicates that the target object does not belong to the target hyperedge, the target object weight is 0; The target association relationship is the association relationship between the target object and the target entity corresponding to the target hyperedge determined based on the target hypergraph.
5. The method according to claim 4, characterized in that, Generating a sample object weight matrix based on the sample hypergraph includes: Based on the sample hypergraph, determining the sample association relationship between the sample object and the sample entity corresponding to each sample hyperedge; Based on the sample association relationship corresponding to the sample object, determining the sample object weight; Based on the sample object weights corresponding to each sample object, generating the sample object weight matrix.
6. The method according to claim 5, characterized in that, Determining the sample object weight based on the sample association relationship corresponding to the sample object includes: When the sample association relationship indicates that the sample object belongs to the sample hyperedge, determining the sample object weight based on the sample association strength corresponding to the sample association relationship. The sample object weight is positively correlated with the sample association strength; When the sample association relationship indicates that the sample object does not belong to the sample hyperedge, determining the sample object weight to be 0.
7. The method according to any one of claims 4 to 6, characterized in that Inputting the sample hypergraph and the sample object weight matrix into the feature extraction network to obtain the sample object feature representation output by the feature extraction network includes: Based on the sample object weight matrix and the sample hyperedge weight matrix, generating a sample vertex degree matrix. The sample vertex degree matrix contains the degrees of the sample objects corresponding to each sample object. The degree of the sample object is used to represent the number of sample hyperedges connected to the sample object; Based on the sample object weight matrix, generating a sample hyperedge degree matrix. The sample hyperedge degree matrix contains the degrees of n sample hyperedges. The degree of the sample hyperedge is used to represent the number of sample objects included in the sample hyperedge; Inputting the sample object weight matrix, the sample vertex degree matrix, the sample hyperedge degree matrix, the sample hyperedge weight matrix, and the sample hypergraph into the feature extraction network to obtain the sample object feature representation output by the feature extraction network.
8. The method according to claim 7, characterized in that Inputting the sample object weight matrix, the sample vertex degree matrix, the sample hyperedge degree matrix, the sample hyperedge weight matrix, and the sample hypergraph into the feature extraction network to obtain the sample object feature representation output by the feature extraction network includes: Based on the feature representation of the (t - 1)-th sample object, the sample object weight matrix, the sample vertex degree matrix, the sample hyperedge degree matrix, the sample hyperedge weight matrix, the activation function, and the t-th sample feature learning parameters corresponding to the t-th convolutional layer, determine the feature representation of the t-th sample object output by the t-th convolutional layer, where t is a positive integer less than or equal to T; Determine the feature representation of the sample object output by the feature extraction network as the feature representation of the T-th sample object output by the T-th convolutional layer.
9. The method according to claim 8, characterized in that The step of inputting each of the sample object feature representations into a classification network to obtain the sample prediction classes corresponding to each sample object output by the classification network includes: Based on the feature representation of the T-th sample object and the sample classification learning parameters, determine the sample prediction classes output by the classification network.
10. The method according to claim 9, characterized in that The step of training the feature extraction network and the classification network based on the sample prediction classes and the sample annotation classes corresponding to the sample objects includes: Based on the sample prediction classes and the sample annotation classes, determine the sample classification loss corresponding to the sample objects; Based on the sample classification loss, update the sample classification learning parameters corresponding to the classification network and the T sample feature learning parameters corresponding to the feature extraction network.
11. An object classification device, characterized in that The apparatus includes: A first acquisition module, configured to acquire a target hypergraph, the target hypergraph being composed of n target hyperedges, and each target hyperedge being composed of m target objects having an association relationship with the same target entity, where n and m are positive integers; A first generation module, configured to, based on the target hypergraph, determine the target association relationship between the target objects and the target entities corresponding to the respective target hyperedges; when the target association relationship indicates that the target object belongs to the target hyperedge, based on the target association strength indicated by the target association relationship and the target correspondence relationship, determine the target object weight, the target object weight being positively correlated with the target association strength, the target correspondence relationship being the correspondence relationship between the candidate association strength and the candidate object weight, and the candidate association strength corresponding to the candidate object weight one by one; when the target association relationship indicates that the target object does not belong to the target hyperedge, determine that the target object weight is 0; based on the target object weights corresponding to the respective target objects, generate a target object weight matrix, the target object weight matrix including the target object weights of the respective target objects in the target hypergraph, and the target object weight referring to the relationship weight between the target object and the target entities corresponding to the respective target hyperedges; A first feature extraction module, configured to use a feature extraction network to perform feature extraction on the target hypergraph based on the target object weight matrix to obtain the target object feature representations corresponding to the respective target objects, the feature extraction network including T convolutional layers, T being a positive integer, and the target object feature representation being the feature representation of the T-th object output by the T-th convolutional layer of the feature extraction network; The first classification prediction module is used to perform object category prediction based on the target object feature representation to obtain the target object category corresponding to the target object; The target object is an author object to be classified, the target entity corresponding to the target hyperedge is a paper, and each target hyperedge is a set of author objects belonging to the same paper.
12. The device according to claim 11, characterized in that The first feature extraction module includes: The second generation unit is used to generate a target vertex degree matrix based on the target object weight matrix and the target hyperedge weight matrix. The target vertex degree matrix contains the degrees of the target objects corresponding to each of the target objects, and the degree of the target object is used to characterize the number of the target hyperedges connected to the target object; The third generation unit is used to generate a target hyperedge degree matrix based on the target object weight matrix. The target hyperedge degree matrix contains the degrees of n target hyperedges, and the degree of the target hyperedge is used to characterize the number of the target objects included in the target hyperedge; The first feature extraction unit is used to input the target object weight matrix, the target vertex degree matrix, the target hyperedge degree matrix, the target hyperedge weight matrix, and the target hypergraph into the feature extraction network to obtain the target object feature representation output by the feature extraction network.
13. The device according to claim 12, characterized in that The first feature extraction unit is further used to: Based on the (t - 1)th object feature representation, the target object weight matrix, the target vertex degree matrix, the target hyperedge degree matrix, the target hyperedge weight matrix, the activation function, and the tth target feature learning parameter corresponding to the tth convolutional layer, determine the tth object feature representation output by the tth convolutional layer, where t is a positive integer less than or equal to T; Determine the Tth object feature representation output by the Tth convolutional layer as the target object feature representation output by the feature extraction network.
14. An object classification device, characterized in that The device includes: The second acquisition module is used to acquire a sample hypergraph, which is composed of n sample hyperedges, and each sample hyperedge is composed of m sample objects having an association relationship with the same sample entity. n and m are positive integers; The second generation module is used to generate a sample object weight matrix based on the sample hypergraph. The sample object weight matrix contains the sample object weights of each sample object in the sample hypergraph, and the sample object weight refers to the relationship weight between the sample object and the sample entity corresponding to each sample hyperedge; The second feature extraction module is used to input the sample hypergraph and the sample object weight matrix into the feature extraction network to obtain the sample object feature representation output by the feature extraction network; The second classification prediction module is used to input each of the sample object feature representations into the classification network to obtain the sample prediction categories corresponding to each sample object output by the classification network; The training module is used to train the feature extraction network and the classification network based on the sample prediction categories and the sample annotation categories corresponding to the sample objects; The sample object is an author object to be classified, the sample entity corresponding to the sample hyperedge is a paper, and each sample hyperedge is a set of author objects belonging to the same paper; Using the trained feature extraction network, feature extraction is performed on the target hypergraph based on the target object weight matrix to obtain target object feature representations corresponding to respective target objects. The feature extraction network includes T convolutional layers, where T is a positive integer. The target object feature representation is the T-th object feature representation output by the T-th convolutional layer of the feature extraction network. The target hypergraph is composed of n target hyperedges, and each target hyperedge is composed of m target objects having an associated relationship with the same target entity. n and m are positive integers. The target object weight matrix is generated based on target object weights corresponding to respective target objects, and the target object weight matrix includes target object weights of respective target objects in the target hypergraph. The target object weight refers to the relationship weight between the target object and the target entity corresponding to each target hyperedge; When the target association relationship indicates that the target object belongs to the target hyperedge, the target object weight is determined based on the target association strength indicated by the target association relationship and the target correspondence relationship. The target object weight has a positive correlation with the target association strength. The target correspondence relationship is the correspondence relationship between the candidate association strength and the candidate object weight, and the candidate association strength corresponds to the candidate object weight one by one; When the target association relationship indicates that the target object does not belong to the target hyperedge, the target object weight is 0; The target association relationship is the association relationship between the target object and the target entity corresponding to the target hyperedge determined based on the target hypergraph.
15. The device according to claim 14, wherein, The second generation module includes: A third determination unit for determining a sample association relationship between the sample object and the sample entity corresponding to each sample hyperedge based on the sample hypergraph; A fourth determination unit for determining the sample object weight based on the sample association relationship corresponding to the sample object; A fourth generation unit for generating the sample object weight matrix based on the sample object weights corresponding to respective sample objects.
16. The device according to claim 15, wherein, The fourth determination unit is further configured to: When the sample association relationship indicates that the sample object belongs to the sample hyperedge, determine the sample object weight based on the sample association strength corresponding to the sample association relationship. The sample object weight has a positive correlation with the sample association strength; When the sample association relationship indicates that the sample object does not belong to the sample hyperedge, determine that the sample object weight is 0.
17. The device according to any one of claims 14 to 16, wherein, The second feature extraction module includes: A fifth generation unit for generating a sample vertex degree matrix based on the sample object weight matrix and the sample hyperedge weight matrix. The sample vertex degree matrix includes the degrees of sample objects corresponding to respective sample objects, and the degree of the sample object is used to represent the number of sample hyperedges connected to the sample object; A sixth generation unit, configured to generate a sample hyper-edge degree matrix based on the sample object weight matrix, where the sample hyper-edge degree matrix includes degrees of n sample hyper-edges, and the degree of a sample hyper-edge is used to represent the number of the sample objects included in the sample hyper-edge; A second feature extraction unit, configured to input the sample object weight matrix, the sample vertex degree matrix, the sample hyper-edge degree matrix, the sample hyper-edge weight matrix, and the sample hypergraph into a feature extraction network, so as to obtain the sample object feature representation output by the feature extraction network.
18. The device according to claim 17, wherein, The second feature extraction unit is further configured to: Determine a t-th sample object feature representation output by the t-th convolutional layer based on a (t-1)-th sample object feature representation, the sample object weight matrix, the sample vertex degree matrix, the sample hyper-edge degree matrix, the sample hyper-edge weight matrix, an activation function, and t-th sample feature learning parameters corresponding to the t-th convolutional layer, where t is a positive integer less than or equal to T; Determine the T-th sample object feature representation output by the T-th convolutional layer as the sample object feature representation output by the feature extraction network.
19. The device according to claim 18, wherein, The second classification prediction module includes: A classification prediction unit, configured to determine a sample prediction class output by the classification network based on the T-th sample object feature representation and sample classification learning parameters.
20. The device according to claim 19, wherein, The training module includes: A fifth determination unit, configured to determine a sample classification loss corresponding to the sample object based on the sample prediction class and the sample annotation class; An update unit, configured to update the sample classification learning parameters corresponding to the classification network, and T sample feature learning parameters corresponding to the feature extraction network based on the sample classification loss.
21. A computer device, wherein, The computer device includes a processor and a memory, where at least one program is stored in the memory, and the at least one program is loaded and executed by the processor to implement the object classification method according to any one of claims 1 to 3, or to implement the object classification method according to any one of claims 4 to 10.
22. A computer-readable storage medium, wherein, At least one program is stored in the readable storage medium, and the at least one program is loaded and executed by a processor to implement the object classification method according to any one of claims 1 to 3, or to implement the object classification method according to any one of claims 4 to 10.
23. A computer program product, wherein, The computer program product includes computer instructions, where the computer instructions are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the object classification method according to any one of claims 1 to 3, or to implement the object classification method according to any one of claims 4 to 10.
Citation Information
Patent Citations
Paper classification method and system based on hypergraph neural network
CN112862015A
Hypergraph-based anomaly detection method and system for simultaneously optimizing cost and false detection rate
CN113723550A