Method, apparatus, and computer-readable recording medium for training graph neural network model by using graph data

The method addresses the challenge of distorted correlations in GNN model training by using virtual graphs and mixing coefficients to generate accurate node embeddings, improving model performance and preventing overfitting in GNN models.

WO2025005325A1PCT designated stage expired Publication Date: 2025-01-02NCSOFT CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
PCT/KR2023/009207
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-06-30
Publication Date
2025-01-02

AI Technical Summary

Technical Problem

Current methods for training Graph Neural Network (GNN) models face challenges in effectively handling complex graph data, particularly in maintaining accurate correlations between virtual nodes and their classes, which can lead to distorted correlations and overfitting issues.

Method used

The proposed method involves acquiring graph data with node and edge information, configuring learning data that includes virtual graphs composed of existing and virtual nodes, and training the GNN model using these data structures. This approach utilizes a mixing coefficient based on probability distributions to generate virtual nodes and graphs, ensuring accurate node embeddings and avoiding overfitting.

Benefits of technology

This method allows for improved training of GNN models by maintaining accurate correlations between virtual nodes and classes, enhancing model performance and preventing overfitting, making it applicable to various graph neural network models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2023009207_02012025_PF_FP_ABST
    Figure KR2023009207_02012025_PF_FP_ABST
Patent Text Reader

Abstract

A method for training a graph neural network (GNN) model by using graph data, according to an embodiment of the present disclosure, comprises the operations of: acquiring graph data including node data regarding nodes constituting a graph and edge data regarding a connection relationship between the nodes; on the basis of the graph data, configuring training data used to train the GNN model; and training the GNN model by using the training data, wherein the training data includes a virtual graph comprising existing nodes and virtual nodes.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device, and computer-readable recording medium for training a graph neural network model using graph data

[0001] The present disclosure relates to a method, device, and computer-readable recording medium for training a graph neural network model using graph data.

[0002] As the diversity of data and the complexity of relationships increase, interest in graph data, which can represent data as a series of objects and their relationships, is increasing.

[0003] Graph neural network (GNN) models have recently attracted significant attention because they can directly analyze graph data. For example, GNN models can be utilized in various fields such as social network analysis, molecular structure analysis, and recommendation systems.

[0004] To improve the performance of graph neural network models, various studies are being conducted, and research on methods for training graph neural network models is also active.

[0005] The background technology described above is technical information that the inventor possessed for the purpose of deriving the present disclosure or acquired in the process of deriving the present disclosure, and cannot necessarily be considered as publicly known technology disclosed to the general public prior to the filing of the present disclosure.

[0006] Some embodiments of the present disclosure provide a method, apparatus, and computer-readable recording medium for training a graph neural network model using graph data. The problems addressed by the present disclosure are not limited to the aforementioned problems, and other problems and advantages of the present disclosure not mentioned herein can be understood through the following description and will be more clearly understood through embodiments of the present disclosure. Furthermore, it will be appreciated that the problems and advantages addressed by the present disclosure can be realized by the means and combinations thereof set forth in the claims.

[0007] As a technical means for achieving the above-described technical task, a first aspect of the present disclosure may provide a method for training a Graph Neural Network (GNN) model using graph data, the method including: an operation of obtaining graph data including node data regarding nodes constituting a graph and edge data regarding a connection relationship between the nodes; an operation of configuring learning data used for training the GNN model based on the graph data; and an operation of training the GNN model using the learning data; wherein the learning data includes a virtual graph composed of existing nodes and virtual nodes.

[0008] A second aspect of the present disclosure provides a device for training a graph neural network model using graph data, comprising: a memory having at least one program stored therein; and a processor for executing the at least one program, wherein the processor obtains graph data including node data regarding nodes constituting a graph and edge data regarding connection relationships between the nodes, and configures learning data used for training the GNN model based on the graph data, and trains the GNN model using the learning data, wherein the learning data includes a virtual graph consisting of existing nodes and virtual nodes.

[0009] A third aspect of the present disclosure can provide a computer-readable recording medium having recorded thereon a program for executing the method according to the first aspect on a computer.

[0010] In addition, other methods for implementing the present disclosure, other systems, and computer-readable recording media storing a computer program for executing the method may be further provided.

[0011] Other aspects, features and advantages other than those described above will become apparent from the following drawings, claims and detailed description of the invention.

[0012] Learning data generated according to one embodiment of the present disclosure may not cause a distorted correlation problem between virtual nodes and classes of virtual nodes.

[0013] The learning data generation method according to the embodiment of the present disclosure may have the advantage of being directly applicable to various graph neural network models.

[0014] FIG. 1 is a diagram illustrating an example of a graph neural network model that processes graph data according to one embodiment.

[0015] FIG. 2 is a diagram illustrating an example of the internal configuration of a device for training a graph neural network model using graph data according to one embodiment.

[0016] FIG. 3 is a flowchart illustrating an example of a method for training a graph neural network model using graph data according to one embodiment.

[0017] FIG. 4 is a diagram illustrating an example of graph data according to one embodiment.

[0018] FIG. 5a is a diagram illustrating an example of a graph included in learning data according to one embodiment.

[0019] FIG. 5b is a diagram illustrating another example of a graph included in learning data according to one embodiment.

[0020] FIG. 6 is a flowchart illustrating an example of a method for generating a virtual graph according to one embodiment.

[0021] FIG. 7 is a diagram illustrating an example of a probability distribution of a mixing coefficient according to one embodiment.

[0022] FIG. 8 is a diagram illustrating an example of a method for generating a virtual graph according to one embodiment.

[0023] FIG. 9 is a diagram illustrating another example of a method for generating a virtual graph according to one embodiment.

[0024] FIG. 10 is a drawing for explaining an example of a virtual graph according to one embodiment.

[0025] A method for training a graph neural network (GNN) model using graph data according to one embodiment of the present disclosure may include an operation of obtaining graph data including node data regarding nodes constituting a graph and edge data regarding a connection relationship between the nodes, an operation of configuring learning data used for training the GNN model based on the graph data, and an operation of training the GNN model using the learning data, wherein the learning data may include a virtual graph composed of existing nodes and virtual nodes.

[0026] The advantages and features of the present disclosure, and methods for achieving them, will become clearer with reference to the embodiments described in detail together with the accompanying drawings. However, the present disclosure is not limited to the embodiments presented below, but may be implemented in various different forms, and it should be understood that it includes all transformations, equivalents, and substitutes included in the spirit and technical scope of the present disclosure. The embodiments presented below are provided to ensure that the disclosure of the present disclosure is complete and to fully inform those skilled in the art of the present disclosure of the scope of the invention. In describing the present disclosure, if a detailed description of a related known technology is determined to obscure the gist of the present disclosure, the detailed description thereof will be omitted.

[0027] The terminology used in this application is only used to describe specific embodiments and is not intended to limit the present disclosure. The singular expression includes the plural expression unless the context clearly indicates otherwise. In this application, it should be understood that the terms “comprise” or “have” indicate the presence of a feature, number, step, operation, component, part, or combination thereof described in the specification, but do not exclude in advance the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.

[0028] Some embodiments of the present disclosure may be represented by functional block configurations and various processing operations. Some or all of these functional blocks may be implemented by various hardware and / or software configurations that perform specific functions. For example, the functional blocks of the present disclosure may be implemented by one or more microprocessors or by circuit configurations for a given function. Furthermore, for example, the functional blocks of the present disclosure may be implemented in various programming or scripting languages. The functional blocks may be implemented by algorithms that execute on one or more processors. Furthermore, the present disclosure may employ conventional techniques for electronic configuration, signal processing, and / or data processing. Terms such as “mechanism,” “element,” “means,” and “configuration” may be used broadly and are not limited to mechanical and physical configurations.

[0029] Additionally, the connecting lines or connecting members between components depicted in the drawings are merely exemplary representations of functional connections and / or physical or circuit connections. In an actual device, connections between components may be represented by various functional connections, physical connections, or circuit connections that may be replaced or added.

[0030] Below, embodiments are described in detail with reference to the attached drawings. However, the embodiments may be implemented in various different forms and are not limited to the examples described herein.

[0031] FIG. 1 is a diagram illustrating an example of a graph neural network model that processes graph data according to one embodiment.

[0032] As the diversity of data and the complexity of relationships increase, interest in graph data, which can represent data as a series of objects and their relationships, is increasing.

[0033] Here, graph data is data structured with nodes (which can be expressed as points, vertices, etc.) and edges (which can be expressed as lines connecting the points, etc.). Graph data can express complex relationships and interactions through nodes and edges. For example, friendships between users in a social network or the relationships between products and users in a product recommendation system can be expressed through graph data.

[0034] As illustrated in the examples above, graph data can offer the advantage of intuitively understanding abstract concepts such as data structure, relationships, and interactions. Furthermore, by representing various types of data through node characteristic information (or feature information, attribute information, etc.) or edges, graph data can also offer the advantage of integrating diverse types of information into a single structure.

[0035] Graph neural network (GNN) models (110) have recently attracted significant attention due to their ability to directly analyze such graph data. For example, graph neural network models (110) can be utilized in various fields such as social network analysis, molecular structure analysis, and recommendation systems.

[0036] The input data (120) input to the graph neural network model (110) may be composed of graph data. As described above, the graph data, which is the input data (120), may be composed of nodes and edges. In addition, each node may have characteristic information, and each edge may have information indicating the relationship between nodes.

[0037] For example, the graph data, which is input data (120), may be graph data in various forms depending on the purpose of using the graph neural network model (110). For example, the graph data, which is input data (120), may be a sub-graph of the entire graph in order to perform a graph classification task. As another example, the graph data, which is input data (120), may be graph data in which class classification for some nodes is not completed in order to perform a node classification task. As yet another example, the graph data, which is input data (120), may be graph data in which connections between some nodes are not completed in order to perform a link prediction task.

[0038] The output data (130) output by the graph neural network model (110) may include various data depending on the purpose for which the user uses the graph neural network model (110). For example, the graph neural network model (110) may perform tasks such as node classification, link prediction, and graph classification, and the output data (130) when performing each task may be a predicted class for the corresponding node, whether there is a predicted connection between nodes, and a category to which a given graph belongs.

[0039] As an example, the process by which the graph neural network model (110) performs node classification will be described in more detail. First, the graph neural network model (110) can initialize the characteristic information of each node included in the graph data. Each node can have initial characteristic information, and some nodes can be models with classified classes, and some other nodes can be models with unclassified classes. Here, the characteristic information of the node can mean the information that each node has depending on the type of graph data. For example, in graph data related to social networks, the characteristic information of the node can mean information about each user, and in graph data related to molecular structures, the characteristic information of the node can mean information related to the characteristics of each atom or molecule.

[0040] Thereafter, the graph neural network model (110) can perform an embedding process for the target node that is the subject of node classification. In other words, the characteristic information of neighboring nodes connected to the target node can be collected and aggregated to update the characteristic information for the target node. Here, the graph neural network model (110) can perform the process of collecting and aggregating the characteristic information of neighboring nodes for multiple layers. That is, the graph neural network model (110) can reflect the characteristic information of neighboring nodes that are indirectly connected as well as neighboring nodes that are directly connected to the target node in updating the characteristic information of the target node.

[0041] Finally, the graph neural network model can obtain the final embedding result for the target node. For example, the graph neural network model can obtain the embedding result by reflecting not only the characteristic information of the target node and the characteristic information of the neighboring nodes surrounding the target node, but also the structural information of the graph. Based on the final embedding result, the graph neural network model (110) can predict the class of the target node using a classifier. For example, the graph neural network model (110) can predict user tendencies, etc., from social network graph data.

[0042] Meanwhile, in order for the graph neural network model (110) to perform tasks such as the examples described above, it is necessary to learn node embeddings. Furthermore, in order for the graph neural network model (110) to learn node embeddings, it is necessary to learn using graph data. Accordingly, the present disclosure discloses a method for training a graph neural network model using graph data. The graph neural network model described below in FIGS. 2 to 10 is a model trained using a learning method according to an embodiment of the present disclosure, and may be a model capable of performing the tasks described above in FIG. 1.

[0043] FIG. 2 is a diagram illustrating an example of the internal configuration of a device for training a graph neural network model using graph data according to one embodiment.

[0044] Referring to FIG. 2, the device (200) includes a processor (210), a memory (220), an input / output interface (230), and a communication module (240). For convenience of explanation, only components related to the present disclosure are illustrated in FIG. 2. Therefore, in addition to the components illustrated in FIG. 2, other general components may be further included in the device (200). In addition, it will be apparent to a person skilled in the art related to the present disclosure that the processor (210), memory (220), input / output interface (230), and communication module (240) illustrated in FIG. 2 may be implemented as independent devices.

[0045] The processor (210) can process computer program commands by performing basic arithmetic, logic, and input / output operations. Here, the commands can be provided from memory (220) or an external device. In addition, the processor (210) can generally control the operations of other components included in the device (200).

[0046] The processor (210) may be implemented as an array of a plurality of logic gates, or may be implemented as a combination of a general-purpose microprocessor and a memory storing a program that can be executed on the microprocessor. For example, the processor (210) may include a general-purpose processor, a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a controller, a microcontroller, a state machine, etc. In some environments, the processor (210) may include an application-specific integrated circuit (ASIC), a programmable logic device (PLD), a field programmable gate array (FPGA), etc. For example, the processor (210) may refer to a combination of processing devices, such as a combination of a digital signal processor (DSP) and a microprocessor, a combination of a plurality of microprocessors, a combination of one or more microprocessors coupled with a digital signal processor (DSP) core, or any other such combination of configurations.

[0047] The memory (220) may include any non-transitory computer-readable recording medium. As an example, the memory (220) may include a non-permanent mass storage device such as a random access memory (RAM), a read only memory (ROM), a disk drive, a solid state drive (SSD), a flash memory, etc. As another example, the non-permanent mass storage device such as a ROM, an SSD, a flash memory, a disk drive, etc. may be a separate permanent storage device distinct from the memory. In addition, the memory (220) may store an operating system (OS) and at least one program code (e.g., code for the processor (210) to perform the operations described with reference to FIGS. 1 to 10).

[0048] These software components may be loaded from a computer-readable recording medium separate from the memory (220). This separate computer-readable recording medium may be a recording medium that can be directly connected to the device (200), and may include, for example, a computer-readable recording medium such as a floppy drive, a disk, a tape, a DVD / CD-ROM drive, a memory card, etc. Alternatively, the software components may be loaded into the memory (220) through a communication module (240) other than a computer-readable recording medium. For example, at least one program may be loaded into the memory (220) based on a computer program (e.g., a computer program for the processor (210) to perform the operations described with reference to FIGS. 1 to 10) that is installed by files provided by developers or a file distribution system that distributes installation files of applications through the communication module (240).

[0049] The input / output interface (230) may be a means for interfacing with a device (e.g., a keyboard, a mouse, etc.) for input or output that may be connected to or included in the device (200). In FIG. 2, the input / output interface (230) is illustrated as an element configured separately from the processor (210), but is not limited thereto, and the input / output interface (230) may be configured to be included in the processor (210).

[0050] The communication module (240) may provide a configuration or function for the server (60) and the device (200) to communicate with each other via a network. In addition, the communication module (240) may provide a configuration or function for the device (200) to communicate with other external devices. For example, control signals, commands, data, etc. provided under the control of the processor (210) may be transmitted to the server (60) and / or the external device via the communication module (240) and the network.

[0051] FIG. 3 is a flowchart illustrating an example of a method for training a graph neural network model using graph data according to one embodiment.

[0052] Referring to FIG. 3, a method for training a graph neural network model using graph data may include operations 310 to 350. However, the method is not limited thereto, and other general operations in addition to the operations illustrated in FIG. 3 may be further included in the method for training a graph neural network model using graph data.

[0053] First, in operation 310, the processor (210) can obtain graph data including node data regarding nodes constituting the graph and edge data regarding connection relationships between nodes.

[0054] In the present disclosure, graph data means data in the form of a graph having a structure composed of nodes and edges, and will not be limited by the type or field of data expressed as a graph, the number of nodes, the number of edges, the number of characteristics, the number of classes, etc.

[0055] For example, graph data may include data that represents academic papers in a graph format, such as the Cora data set, the CiteSeer data set, and the PubMed data set. Here, each node included in the graph data may represent a paper, and edges may represent citation relationships between papers.

[0056] As another example, graph data may include data that represents proteins or molecules as a graph, such as a Protein-Protein Interaction (PPI) data set or a Molecular Graphs data set. Here, each node included in the graph data may represent a protein or an atom, and edges may represent interactions between proteins or interactions between atoms (e.g., chemical bonds).

[0057] As another example, graph data may include a social network dataset that graphically represents interactions or connections between users of a social network service. For example, a social network dataset may refer to a dataset related to social network services such as Flickr, Reddit, Facebook, and Twitter.

[0058] Meanwhile, node data may refer to data about the nodes that make up the graph. For example, node data may include features for each node and the classes into which each node is classified.

[0059] For example, a characteristic of a node may refer to unique information about the node, such as its properties or status. For example, a node in a social network data set may correspond to a user, and the characteristic of the node may include unique information about the user, such as the user's age, location, occupation, gender, and origin. As another example, a node in a PPI data set or a molecular structure data set may correspond to a protein or an atom, and the characteristic of the node may include the type of protein, the type of atom, or the number of covalent bonds between atoms.

[0060] For example, a class for a node may refer to a category or group to which the node belongs, or may refer to a label assigned to the node. For example, a class for a node in a social network data set may include a user's group affiliation, political inclination, etc. In other words, a class may be the purpose of a graph neural network model performing a node classification task, and the graph neural network model may classify unclassified nodes based on nodes that have been classified into classes. Furthermore, according to one embodiment, a class for a node may also be utilized when a graph neural network model performs a link prediction task or a graph classification task.

[0061] Meanwhile, edge data can refer to data about which nodes in a graph are connected by edges. For example, if one node is connected to another by an edge, it could indicate some form of relationship or interaction between the two nodes. For example, in a social network dataset, an edge between two nodes could indicate an interaction between two users (e.g., a friendship or a response to a post). Alternatively, in a paper dataset, an edge between two nodes could indicate that one paper cited the other.

[0062] Meanwhile, according to one embodiment, graph data may include a transductive data set and an inductive data set. For example, the inductive data set may have a clear distinction between a training data set and a test data set, with the training data set consisting of labeled nodes and the test data set consisting of unlabeled nodes. A graph neural network model can complete learning for an inference model by observing only the labeled training data set during the learning phase, and can then perform class predictions for the unlabeled test set.

[0063] As another example, the training and test data sets in a transductive dataset may contain nodes for which class classification has not yet been completed. Furthermore, a graph neural network model can observe both the training and test data sets during the learning phase and, using the characteristics of the nodes in the unlabeled training data set, can predict the classes of the nodes in the unlabeled test set.

[0064] FIG. 4 is a diagram illustrating an example of graph data according to one embodiment.

[0065] Referring to FIG. 4, the processor can obtain graph data (410) consisting of nodes and edges.

[0066] For example, graph data (410) may include a first node (421), a second node (422), and a third node (423). Each node may correspond to a user, a paper, etc., depending on the type of data set for the graph data (410).

[0067] Additionally, the graph data (410) may include node data that includes characteristics of the nodes constituting the graph data (410) and classes into which each node is classified. For example, the node data may include characteristics and classes for the first node (421) to the third node (423). As another example, the node data may include classes for the first node (421) and the second node (422), but may not include classes for the third node (423).

[0068] Additionally, the graph data (410) may include edges between nodes. For example, the graph data (410) may include a first edge (431) between a first node (421) and a second node (422), a second edge (432) between a first node (421) and a third node (423), and a third edge (433) between a second node (422) and a third node (423). In other words, it may mean that the first node (421) to the third node (423) in the graph data (410) interact with each other.

[0069] Referring again to FIG. 3, at operation 330, the processor (210) may configure learning data used for learning the GNN model based on graph data.

[0070] For example, training data may consist of inputs input to a graph neural network model and true values ​​(ground truth, or correct answers, target values, labels, targets, etc.) corresponding to the inputs. However, depending on the method of training the graph neural network model, training data in supervised learning may include true values, but training data in semi-supervised learning or unsupervised learning may not include true values ​​corresponding to some inputs, so this is not limited thereto.

[0071] In one embodiment, the graph included in the training data may be a subgraph corresponding to a portion of the entire graph included in the graph data. The subgraph is a portion of the entire graph and may be composed of some nodes and edges that constitute the entire graph. The subgraph may preserve the structure and relationships of the entire graph and may include some of the characteristics of the entire graph.

[0072] For example, referring to FIG. 5a, a graph (510) included in the learning data may be a subgraph centered around a target node (511).

[0073] In another embodiment, the graph included in the training data may be an augmented graph generated based on the graph data. For example, the processor (210) may generate the augmented graph by dropping or masking some nodes or edges from the graph data. Through this, the processor (210) can resolve the overfitting problem that occurs when the training data does not include a sufficient number of nodes and edges.

[0074] Referring to FIG. 5b, for example, the learning data may include a first augmented graph (520) generated by perturbing some edges in the graph data. For example, the change to the edges in the first augmented graph (520) may mean the omission of some edges (e.g., the edge between nodes B and C and the edge between nodes E and F). However, this is not limited thereto, and the inclusion of edges not included in the graph data may also be included in the change to the edges.

[0075] Continuing with reference to FIG. 5b, as another example, the training data may include a second augmented graph (530) generated by dropping some nodes from the graph data. For example, the second augmented graph (530) may be a graph in which node B is dropped, and as node B is dropped, the edges connected to node B may be dropped.

[0076] Meanwhile, according to one embodiment, the learning data may include a virtual graph composed of existing nodes and virtual nodes. Here, the existing node refers to a node included in the graph data acquired by the processor (210), and the virtual node refers to a virtual node created based on the existing node. In addition, the processor (210) may create a virtual link connected to the virtual node to create a virtual graph together with the virtual node. For example, the processor (210) may create one or more virtual nodes by mixing up the characteristics of any two nodes included in the graph data, and may create a virtual link connecting the virtual node to neighboring nodes to create a virtual graph composed of the virtual node and neighboring nodes.

[0077] The present disclosure discloses a method for generating a virtual graph based on a linear interpolation method. For example, the processor (210) may assume that any two nodes are endpoints located on a straight line, and generate a virtual node by estimating the location of a point located between the endpoints.

[0078] A more detailed description of a method for generating a virtual graph according to one embodiment of the present disclosure will be described with reference to FIGS. 6 to 10 below.

[0079] FIG. 6 is a flowchart illustrating an example of a method for generating a virtual graph according to one embodiment.

[0080] Referring to FIG. 6, a method for generating a virtual graph may include operations 610 to 690. However, the present invention is not limited thereto, and other general operations may be further included in the method for generating a virtual graph in addition to the operations illustrated in FIG. 6.

[0081] First, in operation 610, the processor (210) can randomly select a first node and a second node from the graph data.

[0082] Here, the first node and the second node may each include node data. For example, the first node data of the first node may include characteristics of the first node and a class to which the first node is classified, and the second node data of the second node may include characteristics of the second node and a class to which the second node is classified.

[0083] According to one embodiment, the first node and the second node may be randomly selected from among the nodes in the graph data for which class classification has been completed. In other words, the processor (210) may randomly select the first node and the second node from among the nodes in the graph data for which class classification has been completed.

[0084] Thereafter, in operation 630, the processor (210) may determine a mix-up coefficient related to a ratio for mixing the first node and the second node.

[0085] Here, the mixing coefficient can be determined as a value between 0 and 1. For example, the mixing coefficient can be determined based on a probability distribution having values ​​between 0 and 1.

[0086] More specifically, the probability distribution may be a continuous probability distribution according to the beta distribution. The beta distribution is a continuous probability distribution with values ​​between 0 and 1, and the shape of the distribution can be determined by two positive parameters.

[0087] In one embodiment, the two positive parameters that determine the shape of the beta distribution can have the same value. This means that no one parameter is given a higher weight than the other, and the shape of the beta distribution can be a probability distribution that is symmetrical about the central axis.

[0088] FIG. 7 is a diagram illustrating an example of a probability distribution of a mixing coefficient according to one embodiment.

[0089] For example, referring to FIG. 7, the mixing coefficient can be determined based on either a first probability distribution (710) or a second probability distribution (720) that has a value between 0 and 1 and is symmetrical with respect to a central axis (730). Here, the central axis (730) refers to an axis corresponding to the probability that the value of the mixing coefficient is 0.5. Since the first probability distribution (710) and the second probability distribution (720) are probability distributions that are symmetrical with respect to the central axis (730), this means that no importance or priority is given to any one node in the process of mixing the first node and the second node.

[0090] Meanwhile, the shape of the probability distribution will not be limited to the first probability distribution (710) or the second probability distribution (720). The shape of the probability distribution that determines the mixing coefficient can be any probability distribution that has values ​​between 0 and 1 and is symmetrical around the central axis.

[0091] Here, as described above, the shape of the probability distribution can be determined by the positive parameter values ​​in the beta distribution.

[0092] For example, the probability distribution may have a shape similar to the first probability distribution (710) as the positive parameter value decreases. In the first probability distribution (710), as the mixing coefficient approaches 0.5, the probability that the mixing coefficient can be determined as the corresponding mixing coefficient value may decrease, and the probability that the mixing coefficient can be determined as a value close to 0 or a value close to 1 may be relatively high.

[0093] As another example, the probability distribution may have a shape similar to the second probability distribution (720) as the positive parameter value increases. In the second probability distribution (720), the probability that the mixing coefficient can be determined as 0.5 may be relatively highest, and the probability may decrease as the value moves away from 0.5.

[0094] In other words, the shape of the probability distribution for which the mixing coefficient is determined may vary depending on the positive parameter value between the first probability distribution (710) and the second probability distribution (720).

[0095] Meanwhile, what it means that the mixing coefficient is determined according to the first probability distribution (710) or the second probability distribution (720) in generating a virtual graph will be described below together with FIG. 8.

[0096] Thereafter, in operation 650, the processor (210) may generate a virtual node by mixing first node data regarding the first node and second node data regarding the second node based on a mixing coefficient.

[0097] For example, the processor (210) can generate a virtual characteristic by mixing the characteristics of the first node and the characteristics of the second node based on a mixing coefficient.

[0098] For example, if the mixing coefficient is determined to be 0.5 in operation 630, the processor (210) may generate a virtual characteristic by adding the values ​​obtained by multiplying the characteristics of the first node and the characteristics of the second node by 0.5. In other words, the virtual characteristic may mean a characteristic that divides the characteristics of the first node and the characteristics of the second node in a 1:1 ratio.

[0099] As another example, if the mixing coefficient is determined to be 0.7 in operation 630, the processor (210) may generate a virtual characteristic by adding a value obtained by multiplying the characteristic of the first node by 0.7 and a value obtained by multiplying the characteristic of the second node by 0.3 (which may correspond to, for example, 1 - the mixing coefficient). In other words, the virtual characteristic may mean a characteristic that divides the characteristic of the first node and the characteristic of the second node in a ratio of 7:3.

[0100] Additionally, the processor (210) can generate a virtual class by mixing the class of the first node and the class of the second node based on a mixing coefficient. An example of a virtual class generated based on the determined mixing coefficient value may be the same as an example of generating a virtual characteristic, so a duplicate description will not be provided.

[0101] Additionally, the processor (210) may generate a virtual node in which the virtual characteristics and virtual classes generated by the above-described method are included in the node data. In other words, the node data for the virtual node may include the virtual characteristics and virtual classes generated by the above-described method.

[0102] Thereafter, in operation 670, the processor (210) may randomly select a neighboring node connected to the virtual node among existing nodes connected to the first node or the second node based on a mixing coefficient.

[0103] For example, the processor (210) can randomly select neighboring nodes by masking some of the existing nodes according to a masking probability based on a mixing coefficient.

[0104] More specifically, for example, the masking probability may be determined based on a mixing coefficient. For example, if the mixing coefficient for mixing the first node and the second node is determined to be 0.7, the masking probability for the first node may be determined to be 0.3 (e.g., 1 - the mixing coefficient) and the masking probability for the second node may be determined to be 0.7.

[0105] Additionally, the processor (210) may mask some of the existing nodes connected to the first node and the second node according to the determined masking probability. In this case, the processor (210) may use an adjacency matrix for the first node and the second node. The adjacency matrix represents the connection relationship between nodes of the graph in the form of a matrix, and may represent whether or not there is a connection with surrounding nodes in the form of a matrix.

[0106] For example, the processor (210) can generate a masking matrix for the first node and the second node according to the masking probability, and perform a product operation on the masking matrix and the adjacency matrix for each of the first node and the second node, thereby masking some of the existing nodes connected to the first node and the second node.

[0107] In other words, among the existing nodes, the unmasked nodes may be selected as neighboring nodes connected to the virtual node.

[0108] Thereafter, in operation 690, the processor (210) may generate a virtual graph composed of virtual nodes and neighboring nodes. For example, the processor (210) may generate a virtual graph by connecting a virtual node and a randomly selected neighboring node with an edge.

[0109] FIG. 8 is a diagram illustrating an example of a method for generating a virtual graph according to one embodiment.

[0110] Referring to FIG. 8, the processor (210) can arbitrarily select a first node (810) and a second node (820) from the graph data.

[0111] In addition, the processor (210) can determine a mixing coefficient related to a ratio for mixing the first node (810) and the second node (820). For example, it is assumed that the mixing coefficient is determined to be 0.6 based on one of the first probability distribution (710) and the second probability distribution (720) illustrated in FIG. 7. Meanwhile, as described above, since the probability distribution according to the embodiment of the present disclosure is a probability distribution that is symmetrical with respect to the central axis, the probability that the mixing coefficient is determined to be 0.6 and the probability that the mixing coefficient is determined to be 0.4 may be the same. In other words, the probability that the mixing ratio of the first node (810) and the second node (820) is 6:4 and the probability that it is 4:6 may both be the same probability. This means that, according to the embodiment of the present disclosure, the importance of two randomly selected nodes can be treated equally.

[0112] Meanwhile, the processor (210) may generate a virtual node (830) by mixing first node data regarding the first node (810) and second node data regarding the second node (820) based on a mixing coefficient. For example, the characteristics and class of the virtual node (830) may be obtained by dividing the characteristics of the first node (810) and the characteristics of the second node (820) in a ratio of 6:4.

[0113] In addition, the processor (210) can randomly select a neighboring node connected to the virtual node (830) from among the existing nodes connected to the first node (810) or the second node (820) based on a mixing coefficient. For example, among the existing nodes 1-1 (841), 1-2 (842), and 1-3 (843) connected to the first node (810), the existing node 1-3 (843) can be masked, and the existing nodes 1-1 (841) and 1-2 (842) can be selected as neighboring nodes of the virtual node (830). Similarly, among the existing nodes 2-1 (851) to 2-4 (854) connected to the second node (820), the existing nodes 2-1 (851) and 2-2 (852) can be selected as neighboring nodes of the virtual node (830).

[0114] The processor (210) can generate a virtual graph (860) composed of a virtual node (830) and neighboring nodes. That is, the virtual graph (860) can be generated by connecting previously arbitrarily selected neighboring nodes and the virtual node (830) with edges.

[0115] Here, the virtual node (830) in the virtual graph (860) internalizes the characteristics and classes of the randomly selected first node (810) and second node (820), and the neighboring nodes connected to the virtual node (830) correspond to nodes that were connected to the first node and the second node, so that the virtual graph (860) generated according to the embodiment of the present disclosure may not have a distorted correlation problem between the virtual nodes and the classes of the virtual nodes.

[0116] In addition, according to the embodiment of the present disclosure, there may be an advantage in that it can be directly applied to various graph neural network models since node embedding is not used in the process of generating a virtual graph (860).

[0117] Meanwhile, according to one embodiment, the processor (210) can randomly select a neighboring node from among one or more surrounding virtual nodes and existing nodes based on a mixing coefficient.

[0118] Here, an existing node may refer to a node connected to the first node or the second node. Furthermore, one or more surrounding virtual nodes may refer to virtual nodes created by mixing the first and second nodes, if the first and second nodes are connected by edges.

[0119] In more detail, the processor (210) can randomly select a neighboring node from among the candidate nodes. The candidate node may include a node connected to the randomly selected first node and second node. Here, if the randomly selected first node and second node are connected by an edge, the candidate node may include a virtual node generated by mixing the first node and the second node, and the virtual node may be a surrounding virtual node for the virtual node. That is, if the randomly selected first node and second node are connected by an edge, the generated virtual node may have two options for randomly selectable neighboring nodes: an existing node and a virtual node.

[0120] FIG. 9 is a diagram illustrating another example of a method for generating a virtual graph according to one embodiment.

[0121] Referring to FIG. 9, a first node (910) and a second node (920) randomly selected from the graph data may be nodes connected by edges. In addition, the first node (910) may be connected to the second node (920) and node v4, and the second node (920) may be connected to the first node (910), node v3, and node v5.

[0122] In one embodiment, the processor (210) may create a virtual node (930) by mixing the first node (910) and the second node (920). In addition, the processor (210) may randomly select a neighboring node from among one or more surrounding virtual nodes (e.g., a virtual node for v2) and existing nodes (e.g., v2, v3, v4, and v5) based on a mixing coefficient.

[0123] For example, as a result of random selection, the first existing node (941), the second existing node (942), the third existing node (943), and the surrounding virtual node (951) can be randomly selected as neighboring nodes connected to the virtual node (930).

[0124] Here, the virtual node (930) may have two options, including the existing node v2 (941) and the surrounding virtual node (951). That is, in selecting a neighboring node to be connected to the virtual node (930), only the existing node v2 (941) may be selected, only the surrounding virtual node (951) may be selected, or both the existing node v2 (941) and the surrounding virtual node (951) may be selected.

[0125] However, a connectivity issue may occur if the first and second nodes randomly selected from the graph data are nodes connected by edges and have completed class classification.

[0126] Accordingly, according to one embodiment, the processor (210) may exclude some nodes from among the randomly selected neighboring nodes when the first node and the second node are nodes connected by an edge, and the first node and the second node are nodes randomly selected from among nodes for which class classification is completed and included in the graph data.

[0127] In more detail, the processor (210) can generate a virtual graph by connecting any one of the existing nodes to the virtual node instead of any one of the peripheral virtual nodes, when the first node and the second node are connected within a predetermined hop distance, and any one of the peripheral virtual nodes generated by mixing the first node and the second node is randomly selected as one of the neighboring nodes.

[0128] Referring again to FIG. 9, if a first node (910) and a second node (920) randomly selected from the graph data are nodes connected by edges and are nodes randomly selected from among nodes for which class classification has been completed and are included in the graph data, the processor (210) may exclude some nodes from among the randomly selected neighboring nodes.

[0129] For example, if the existing node v2 (941) and the surrounding virtual node (951) are randomly selected as neighboring nodes, the processor (210) may exclude some nodes from the selected neighboring nodes.

[0130] For example, if a first node (910) and a second node (920) are connected within a predetermined hop distance, and one of the peripheral virtual nodes (951) (e.g., a virtual node for v2) generated by mixing the first node (910) and the second node (920) is randomly selected as one of the neighboring nodes, the processor (210) may connect one of the existing nodes (e.g., an existing node v2 (941)) to the virtual node (930) instead of the peripheral virtual node (951) to generate a virtual graph.

[0131] That is, according to one embodiment, to avoid connectivity issues, a virtual node (930) may only have one option: to connect to an existing node v2 (941) instead of a neighboring virtual node (951) when the neighboring virtual node (951) is randomly selected as a neighboring node.

[0132] FIG. 10 is a drawing for explaining an example of a virtual graph according to one embodiment.

[0133] For example, the first virtual graph (1010) may be a virtual graph that can be created when the first node and the second node are connected by edges. It can be confirmed that the virtual nodes v1 and v2 included in the first virtual graph (1010) are connected by edges.

[0134] As another example, the second virtual graph (1020) may be a virtual graph that can be created when the first node and the second node are connected by edges and are nodes for which class classification has been completed. It can be confirmed that the virtual nodes v1 and v2 included in the second virtual graph (1020) are each connected to existing nodes by edges, and that there is no edge connection between the virtual nodes v1 and v2.

[0135] Referring again to FIG. 3, at operation 350, the processor (210) may train a GNN model using training data.

[0136] For example, a GNN model can learn an embedding for a target node using training data. For example, the GNN model can learn to collect and aggregate characteristic information from neighboring nodes connected to the target node to update the characteristic information for the target node. The GNN model can then learn to obtain a final node embedding result and, using the node embedding result, output results such as node classification, link prediction, and graph classification.

[0137] A GNN model trained according to an embodiment of the present disclosure will have relatively little overfitting problems with respect to training data, and thus the performance of the model may also be improved.

[0138] Embodiments according to the present disclosure may be implemented in the form of a computer program that can be executed through various components on a computer, and such a computer program may be recorded on a computer-readable medium. In this case, the medium may include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical recording media such as CD-ROMs and DVDs, magneto-optical media such as floptical disks, and hardware devices specifically configured to store and execute program instructions, such as ROMs, RAMs, and flash memories.

[0139] Meanwhile, the computer program may be specifically designed and configured for the present disclosure, or may be known and available to those skilled in the computer software field. Examples of computer programs may include not only machine language code, such as that generated by a compiler, but also high-level language code that can be executed by a computer using an interpreter or the like.

[0140] According to one embodiment, the method according to various embodiments of the present disclosure may be provided as included in a computer program product. The computer program product may be traded as a product between a seller and a buyer. The computer program product may be distributed in the form of a machine-readable storage medium (e.g., compact disc read-only memory (CD-ROM)), or may be distributed online (e.g., downloaded or uploaded) through an application store (e.g., Play Store™) or directly between two user devices. In the case of online distribution, at least a portion of the computer program product may be temporarily stored or temporarily generated in a machine-readable storage medium, such as the memory of a manufacturer's server, an application store's server, or a relay server.

[0141] Unless the operations constituting the method according to the present disclosure are explicitly described in a specific order or are otherwise described in a different order, the operations can be performed in any suitable order. The present disclosure is not necessarily limited by the order in which the operations are described. The use of any examples or exemplary terms (e.g., “etc.”) in this disclosure is merely intended to illustrate the present disclosure in more detail, and the scope of the present disclosure is not limited by the examples or exemplary terms unless otherwise defined by the claims. Furthermore, those skilled in the art will appreciate that various modifications, combinations, and variations can be configured according to design conditions and factors within the scope of the appended claims or their equivalents.

[0142] Therefore, the spirit of the present disclosure should not be limited to the embodiments described above, and all scopes equivalent to or equivalently modified from the following claims as well as the following claims are considered to fall within the scope of the spirit of the present disclosure.

Claims

1. A method for training a graph neural network (GNN) model using graph data, An operation of obtaining graph data including node data regarding nodes constituting a graph and edge data regarding connection relationships between the nodes; An operation of configuring learning data used for learning the GNN model based on the above graph data; and An operation of training the GNN model using the above learning data; including; A method wherein the above learning data includes a virtual graph composed of existing nodes and virtual nodes.

2. In paragraph 1, The above node data is, A method comprising a feature for each of the above nodes and a class into which each of the above nodes is classified.

3. In paragraph 1, The actions that constitute the above learning data are: An action of randomly selecting a first node and a second node from the above graph data; An operation of determining a mixing coefficient related to a ratio for mixing the first node and the second node; An operation of generating the virtual node by mixing first node data regarding the first node and second node data regarding the second node based on the mixing coefficient; An operation of randomly selecting a neighboring node connected to the virtual node among the existing nodes connected to the first node or the second node based on the mixing coefficient; and A method comprising: generating a virtual graph comprising the virtual node and the neighboring node; 4. In paragraph 3, A method wherein the above mixing coefficient has a value between 0 and 1 and is determined based on a probability distribution that is symmetrical about the central axis.

5. In paragraph 3, The action of creating the above virtual node is: An operation of generating a virtual characteristic by mixing the characteristics of the first node and the characteristics of the second node based on the mixing coefficient; An operation of generating a virtual class by mixing the class of the first node and the class of the second node based on the mixing coefficient; and A method comprising: an operation of generating the virtual node in which the virtual characteristic and the virtual class are included in the node data; 6. In paragraph 3, The above randomly selected actions are: A method comprising an operation of randomly selecting the neighboring nodes by masking some of the existing nodes according to a masking probability based on the mixing coefficient.

7. In paragraph 3, The above randomly selected actions are: An operation of randomly selecting a neighboring node among one or more surrounding virtual nodes and the existing nodes based on the mixing coefficient, One or more of the above peripheral virtual nodes, A method in which a virtual node is created by mixing the first node and the second node when the first node and the second node are connected by an edge.

8. In paragraph 7, A method further comprising an operation of excluding some nodes from among the randomly selected neighboring nodes, when the first node and the second node are nodes randomly selected from among nodes for which class classification has been completed and are included in the graph data.

9. In paragraph 8, The action of generating the above virtual graph is: If the first node and the second node are connected within a predetermined hop distance, and one of the surrounding virtual nodes generated by mixing the first node and the second node is randomly selected as one of the neighboring nodes, A method comprising the action of generating the virtual graph by connecting any one of the existing nodes to the virtual node instead of any one of the surrounding virtual nodes.

10. In a device for training a graph neural network model using graph data, memory in which at least one program is stored; and comprising a processor for executing at least one program; The above processor, Obtain graph data including node data about nodes that constitute a graph and edge data about the connection relationship between the nodes, Based on the above graph data, training data used for training the GNN model is constructed, The GNN model is trained using the above learning data, A device wherein the above learning data includes a virtual graph composed of existing nodes and virtual nodes.

11. In paragraph 10, The above node data is, A device comprising characteristics for each of the nodes and a class into which each of the nodes is classified.

12. In paragraph 10, The above processor, Randomly select the first node and the second node from the above graph data, Determine a mixing coefficient related to a ratio for mixing the first node and the second node, The virtual node is generated by mixing the first node data regarding the first node and the second node data regarding the second node based on the mixing coefficient, Among the existing nodes connected to the first node or the second node, a neighboring node connected to the virtual node is randomly selected based on the mixing coefficient, A device comprising generating a virtual graph comprising the virtual node and the neighboring node.

13. In paragraph 12, A device wherein the above mixing coefficient has a value between 0 and 1 and is determined based on a probability distribution that is symmetrical about the central axis.

14. In paragraph 12, The above processor, The characteristics of the first node and the characteristics of the second node are mixed based on the mixing coefficient to generate a virtual characteristic, A virtual class is created by mixing the class of the first node and the class of the second node based on the mixing coefficient, A device comprising generating a virtual node in which the virtual characteristics and the virtual class are included in the node data.

15. In paragraph 12, The above processor, A device comprising randomly selecting the neighboring nodes by masking some of the existing nodes according to a masking probability based on the mixing coefficient.

16. In paragraph 12, The above processor, Including randomly selecting the neighboring node among one or more surrounding virtual nodes and the existing node based on the mixing coefficient, One or more of the above peripheral virtual nodes, A device that is a virtual node created by mixing the first node and the second node when the first node and the second node are connected by an edge.

17. In paragraph 16, The above processor, A device further comprising, when the first node and the second node are nodes randomly selected from among nodes for which class classification is completed and included in the graph data, excluding some nodes from among the randomly selected neighboring nodes.

18. In paragraph 17, The above processor, If the first node and the second node are connected within a predetermined hop distance, and one of the surrounding virtual nodes generated by mixing the first node and the second node is randomly selected as one of the neighboring nodes, A device comprising generating the virtual graph by connecting any one of the existing nodes to the virtual node instead of any one of the surrounding virtual nodes.

19. A computer-readable recording medium recording a program for executing the method of paragraph 1 on a computer.

Citation Information

Patent Citations

  • Method for generating graph representation learning model

    KR102375668B1

  • System and method for structure learning for graph neural networks

    US20220101103A1