Information processing apparatus, information processing method, and storage medium for performing embedding on data of a graph structure
In general, according to one embodiment, an information processing apparatus includes a processor. The processor includes hardware configured to extract a sub-graph that is a graph structure operating independently from data of an input graph structure including a plurality of nodes and an edge connecting the nodes, extract a path from the extracted sub-graph, and perform learning of an embedding model using the extracted path. The embedding model performs embedding on data of a graph structure.
1 . An information processing apparatus comprising:
a processor including hardware configured to
extract a sub-graph that is a graph structure from data of an input graph structure, wherein the input graph structure includes a plurality of nodes and a plurality of edges connecting the nodes, the sub-graph is constituted by a combination of extracted nodes and edges that are extracted from the input graph structure, and an operation of the sub-graph is completed only by the combination of extracted nodes and edges,
extract a path from the extracted sub-graph,
input data of a graph structure of the extracted path to an embedding model, and
perform learning of the embedding model using the extracted path such that the embedding model performs embedding on the data of the graph structure of the extracted path,
wherein the data of the input graph structure is data of a source code of a program, and the processor is configured to:
input test data to the Program represented by the data of the input graph structure,
record information on a combination of nodes corresponding to processing of the program operated by the input test data, and
extract, as the sub-graph, a combination of the nodes that were operated a number of times greater than a threshold.
2 . The information processing apparatus according to claim 1 , wherein the processor
extracts one or more closed circuits in data of the input graph structure,
determines presence or absence of a node representing a power supply for each extracted closed circuit, and
extracts, as the sub-graph, a graph structure having the node representing the power supply.
3 . The information processing apparatus according to claim 1 , wherein
the processor randomly extracts a predetermined number of the paths from the sub-graph.
4 . The information processing apparatus according to claim 1 , wherein
the embedding model is a model of word2vec or a model of ngram2vec.
5 . An information processing method comprising:
extracting a sub-graph that is a graph structure from data of an input graph structure, wherein the input graph structure includes a plurality of nodes and a plurality of edges connecting the nodes, the sub-graph is constituted by a combination of extracted nodes and edges that are extracted from the input graph structure, and an operation of the sub-graph is completed only by the combination of extracted nodes and edges,
extracting a path from the extracted sub-graph,
inputting data of a graph structure of the extracted path to an embedding model, and
performing learning of the embedding model using the extracted path such that the embedding model performs embedding on the data of the graph structure of the extracted path,
wherein the data of the input graph structure is data of a source code of a program, and the method comprises:
inputting test data to the program represented by the data of the input graph structure,
recording information on a combination of nodes corresponding to processing of the program operated by the input test data, and
extracting, as the sub-graph, a combination of the nodes that were operated a number of times greater than a threshold.
6 . A non-transitory computer-readable storage medium storing a computer-readable information processing program for causing a computer to execute
extracting a sub-graph that is a graph structure from data of an input graph structure, wherein the input graph structure includes a plurality of nodes and a plurality of edges connecting the nodes, the sub-graph is constituted by a combination of extracted nodes and edges that are extracted from the input graph structure, and an operation of the sub-graph is completed only by the combination of extracted nodes and edges,
extracting a path from the extracted sub-graph,
input data of a graph structure of the extracted path to an embedding model, and
performing learning of the embedding model using the extracted path such that the embedding model forms embedding on the data of the graph structure of the extracted path,
wherein the data of the input graph structure is data of a source code of a program, and the computer is caused to execute:
inputting test data to the program represented by the data of the input graph structure,
recording information on a combination of nodes corresponding to processing of the program operated by the input test data, and
extracting, as the sub-graph, a combination of the nodes that were operated a number of times greater than a threshold.