Graph natural language processing device, graph natural language processing method, and program

The graph natural language processing device addresses inconsistencies and biases in converting graph networks to text by using node tokens formed from node types and attributes, enhancing efficiency and reducing computational complexity.

WO2026100103A1PCT designated stage Publication Date: 2026-05-15MITSUBISHI ELECTRIC CORP
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
MITSUBISHI ELECTRIC CORP
Filing Date
2025-03-03
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing graph natural language processing methods face issues with inconsistencies and biases due to arbitrary node ID assignments, leading to exponential increases in data augmentation requirements and computational costs, especially when converting graph networks to text.

Method used

A graph natural language processing device that generates text data by combining node types and attributes into node tokens, replacing node IDs, thereby eliminating the need for data augmentation and reducing computational complexity.

Benefits of technology

This approach allows for efficient conversion of graph data to text without artificially inflating data, maintaining consistency and reducing computational overhead, while preserving the characteristics of the graph data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2025007341_15052026_PF_FP_ABST
    Figure JP2025007341_15052026_PF_FP_ABST
Patent Text Reader

Abstract

This graph natural language processing device (1) comprises: a node extraction unit (12) that extracts, from graph data, a node including a node type and a node attribute; and a processing unit (14) that outputs a text in which a node token obtained by combining the node type and the node attribute extracted by the node extraction unit (12), a node token of a node of interest in the graph data, and a node token of a node adjacent to the node of interest are listed.
Need to check novelty before this filing date? Find Prior Art

Description

Graph natural language processing device, graph natural language processing method, and program

[0001] This disclosure relates to a graph natural language processing device, a graph natural language processing method, and a program.

[0002] Graph networks, composed of nodes and edges, are used in various fields. For example, Patent Document 1 describes a technique for converting objects contained in a drawing into text information. This technique converts objects into graph information, which is a graph network, and then converts the graph information into text information.

[0003] International Publication No. 2021 / 014256

[0004] When converting a graph network to text, there are multiple ways to represent it, considering node names, node types, node order, edge names, edge types, and edge order. For example, a node has three elements: a node identifier (hereinafter referred to as node ID), node type, and node attributes. Of these elements, the node ID is an identifier that uniquely identifies each node in the graph. This node ID distinguishes between nodes and makes it possible to specify a particular node.

[0005] When converting a graph network to text, differing ranges of node IDs can lead to inconsistencies. For example, when converting a graph network to text containing names with the same first and last name, if node IDs such as "1", "2", "3", etc. are assigned to the text to ensure individual uniqueness, then in a dataset with 10 people with the same name and a dataset with 6 people with the same name, "_7" through "_10" will only appear in the former dataset. In this case, graph data containing "_7" through "_10" will be a factor that biases the generated results of the graph network.

[0006] Such biases in the number of graph data combinations caused by node IDs can occur due to the arbitrary nature of node ID assignment. For example, if the dataset is natural data without human intervention, according to Benford's Law, there will tend to be more texts with node IDs of "_1" or "_2" than those with "_8" or "_9".

[0007] However, if the dataset administrator arbitrarily assigns values ​​to node IDs, certain node IDs may be favored depending on how they are assigned. For example, if the administrator prefers to assign "_1" or "_2" to node IDs, these node IDs will be more numerous than node IDs assigned other numbers. This could lead to inequality in node ID assignment during graph network generation.

[0008] To address this inequality, data can be augmented by increasing the number of permutations (different sequences of node IDs). For example, the original dataset can be copied multiple times, and the node IDs can be reassigned in a different order to each copy. This results in a different distribution of node IDs in each copy of the dataset. By using these multiple datasets, the arbitrariness in the distribution of node IDs can be equalized.

[0009] However, as the number of node IDs increases, the number of node ID combinations increases exponentially, leading to a problem where the amount of text data that needs to be created through data augmentation increases. For example, if there are 10 people with the same name, and each person is assigned a node ID from "_1" to "_10", then a massive amount of text data (10 factorial combinations) needs to be created through data augmentation. The same problem applies to edge IDs used to identify edges.

[0010] This disclosure aims to solve the above-mentioned problems and to provide a graph natural language processing device that can create text data from graph data without artificially inflating the data by assigning node IDs to different node ID sequences.

[0011] The graph natural language processing device according to this disclosure includes an extraction unit that extracts nodes including node types and node attributes from graph data, and a processing unit that outputs text which combines the node types and node attributes extracted by the extraction unit to form node tokens, node tokens of the node of interest in the graph data, and node tokens of adjacent nodes of the node of interest.

[0012] The graph natural language processing device described herein outputs text that combines node tokens formed by combining node types and node attributes, node tokens for the node of interest in the graph data, and node tokens for the neighboring nodes of the node of interest. As a result, node IDs are replaced with node tokens formed by combining node types and node attributes, so the graph natural language processing device described herein can create text data from graph data without artificially inflating the data by assigning node IDs to match the number of different node ID sequences.

[0013] This is a block diagram showing an example configuration of a graph natural language processing device according to Embodiment 1. This is a flowchart showing a graph natural language processing method according to Embodiment 1. This is a diagram showing an example of a graph network in Embodiment 1. This is a flowchart showing the details of the graph natural language processing method according to Embodiment 1. This is a block diagram showing the hardware configuration that realizes the functions of the graph natural language processing device according to Embodiment 1. This is a block diagram showing the hardware configuration that executes the software that realizes the functions of the graph natural language processing device according to Embodiment 1. This is a flowchart showing a graph natural language processing method according to Embodiment 2. This is a diagram showing an example of a graph network (1) in Embodiment 2. This is a diagram showing an example of a graph network (2) in Embodiment 2. This is a diagram showing an example of a graph network (3) in Embodiment 2. This is a diagram showing an example of a graph network (4) in Embodiment 2. This is a diagram showing an example of a graph network for directional nodes in Embodiment 2. This is a diagram showing an example of a graph network for directional edges in Embodiment 2. This is a diagram showing an example of a graph network (1) in Embodiment 3. This is a diagram showing an example of a graph network (2) in Embodiment 3. This is a diagram showing an example of a graph network (3) in Embodiment 3. This is a circuit diagram showing the processing target circuit in Embodiment 6. This is a diagram showing an example of a graph network (1) in Embodiment 6. This is a diagram showing an example of a graph network (2) in Embodiment 6. This is a diagram showing an example of a graph network (3) in Embodiment 6. This figure shows an example of a graph network in Embodiment 6 (4). This figure shows an example of a graph network in Embodiment 6 (5). This figure shows an example of a graph network in Embodiment 6 (6).

[0014] Embodiment 1. The graph natural language processing device according to Embodiment 1 acquires graph data representing a graph network (hereinafter referred to as "graph") and generates text data based on the graph data. In other words, the graph natural language processing device according to Embodiment 1 converts graph data into text data that is easy for a natural language processing device to process. Here, graph natural language processing is the process of converting graph data into text data that is easy for natural language processing. Furthermore, the graph natural language processing device according to Embodiment 1 itself may have a function to perform natural language processing on the text data obtained by converting the graph data. In addition, the graph natural language processing device itself may have a function to convert the generated text data back into graph data. If the natural language processing device is an external device connected to the graph natural language processing device according to Embodiment 1 by wire or wireless, the graph natural language processing device according to Embodiment 1 may access the natural language processing device and have it perform natural language processing on the text data.

[0015] (Basic Configuration of Graph Natural Language Processing Unit) Figure 1 is a block diagram showing an example configuration of a graph natural language processing unit 1 according to Embodiment 1. In Figure 1, the graph natural language processing unit 1 comprises a graph data acquisition unit 11, a node extraction unit 12, an edge extraction unit 13, and a processing unit 14. For example, the graph natural language processing unit 1 is implemented by a computer. The computer's memory stores programs that constitute information processing applications for realizing each of the functions of the graph data acquisition unit 11, the node extraction unit 12, the edge extraction unit 13, and the processing unit 14. The computer's processor executes the information processing applications read from the memory, thereby realizing each of the functions of the graph data acquisition unit 11, the node extraction unit 12, the edge extraction unit 13, and the processing unit 14. Note that when the processor is a CPU (Central Processing Unit), RAM (Random Access Memory) is often used, and the memory refers to memory for temporarily storing data or programs necessary for the computer's operation. Furthermore, when the processor is a GPU, the memory mentioned above often refers to VRAM (Video Random Access Memory), which is memory designed to enhance the ability to process large amounts of data quickly for image data.

[0016] (Graph Data Acquisition Unit) The graph data acquisition unit 11 acquires graph data that constitutes the graph network. For example, the graph data is stored in a storage unit (not shown in Figure 1) provided by the graph natural language processing unit 1. Alternatively, the graph data may be managed by an external device connected to the graph natural language processing unit 1 by wire or wireless connection. In this case, the graph data acquisition unit 11 reads and acquires the graph data from the storage unit. The graph data acquisition unit 11 may also access the external device using a communication device (not shown in Figure 1) provided by the graph natural language processing unit 1 and receive graph data from the external storage.

[0017] The graph natural language processing device 1 may include an input device not shown in Figure 1. For example, when the input device receives an input operation from an operator, it outputs the input operation information to the graph data acquisition unit 11. The graph data acquisition unit 11 acquires graph data of the type specified by the operator based on the input operation information. The functions of the graph data acquisition unit 11 may be provided by a node extraction unit 12 and an edge extraction unit 13. In this case, since the node extraction unit 12 and the edge extraction unit 13 acquire the graph data, the graph data acquisition unit 11 is omitted from the graph natural language processing device 1.

[0018] (Graph Data) Graph data is a dataset of geometric data, text data, or tabular data that can be represented by a graph. For example, the fully connected channels of a hidden layer in a neural network, atoms or interatomic bonds in a molecular structure, circuit components or wiring in an electrical circuit, quantum gates or quantum entanglement in a quantum circuit, relationships between individuals or organizations such as companies in a social network, communication networks with servers in a computer network, vehicles or traffic lights in a transportation network, logistics hubs or transportation networks in a road network or logistics network, connections between vertices of a mesh obtained from a physical simulation such as the finite element method or boundary element method, citations and citeds in papers, patents, websites or books, amino acids and connections between amino acids in a protein, nucleic acid bases and connections between nucleic acid bases in a gene, connections between products and customers in e-commerce (electronic commerce), connections between power plants, smart meters, and power equipment in a smart grid, network connections between devices and network equipment in security, or connections between synapses in the brain are all datasets represented by a graph structure consisting of at least nodes.

[0019] Furthermore, graph data is a dataset that includes at least nodes, and it is possible to additionally assign node types and node attributes, or edges, edge types and edge attributes. Graph data that does not have node types or node attributes will have a graph composed of nodes and edges. For example, when representing a "molecule" in a graph, the node type will be set to "atom," and the edges will be set to "bonds between atoms." The edge type will be set to, for example, "covalent bond" or "ionic bond" between atoms, and the edge attribute will be set to, for example, "bond energy." The node attribute can be set to, for example, "atomic mass."

[0020] When representing a "molecule" in a graph, it is not necessary to assign the "atomic type" to the node attribute in order to determine the "mass of the atom." However, for example, when representing a "carbon atom" in a graph, setting the node type to "carbon" and the node attribute to "isotope value" will allow the graph to include isotopic information. It should be noted that carbon has isotopes such as carbon-12, carbon-13, and carbon-14 that exist in nature, and the existence of isotopes from carbon-8 to carbon-22 that can be artificially created is also known.

[0021] Node types or node attributes, and edge types or edge attributes, are not necessarily required to define graph data, but they do form the characteristics of graph data. For this reason, much graph data has node types or node attributes. For example, in a graph representing an electrical circuit, nodes represent circuit components, and edges represent the wiring connecting circuit components.

[0022] For example, when representing a "social network" as a graph, nodes can represent "individuals" and edges can represent "relationships between individuals." Furthermore, by representing "companies and users" as nodes and "products of a specific company" as edges, it's possible to construct graph data where the relationship between companies and users is linked by the products used by the users. In this way, graphs are composed of nodes and edges.

[0023] (Node Extraction Unit) The node extraction unit 12 is an extraction unit that extracts nodes from graph data acquired by the graph data acquisition unit 11. For example, the node extraction unit 12 extracts node types from the nodes included in the graph data, indicating the type of node. Node types include homogeneous graphs, where all nodes in a graph network are of the same type, and heterogeneous graphs, where multiple types of nodes exist and each node has a different role or characteristic. An example of a case where all nodes are of the same type is a social network where general people are represented by nodes. An example of a case where multiple types of nodes exist is a knowledge graph where different entities such as people, places, or events are represented by nodes.

[0024] Furthermore, the node extraction unit 12 extracts node attributes from the nodes included in the graph, which indicate the attributes of each node. Node attributes are additional information that each node possesses, representing the characteristics or state of the node. For example, when representing a social network in a graph, if the node type is "user," the node attributes will include information such as username, age, place of residence, interests, or number of friends.

[0025] (Edge Extraction Unit) The edge extraction unit 13 is an extraction unit that extracts nodes connected to both ends of an edge from among the nodes included in the graph data acquired by the graph data acquisition unit 11. In addition, although not included in the text data output by the processing unit 14, the edge extraction unit 13 may also extract the edge ID of the edge included in the graph data during processing by the processing unit 14. For example, in the case of a multi-edge, which is multiple edges connecting two nodes, the nodes connected to both ends of the edge are the same, so it is not possible to narrow down the edge to one using only information about the nodes connected to both ends of the edge. In this case, it is possible to identify the edge that makes up the multi-edge by using the edge ID, which exists only once in the graph. Note that the node extraction unit 12 and the edge extraction unit 13 may be a single extraction unit that extracts nodes from graph data.

[0026] (Processing Unit) The processing unit 14 outputs text that combines node tokens extracted by the node extraction unit 12 by combining the node type and node attributes, node tokens of the node of interest in the graph data, and node tokens of adjacent nodes of the node of interest extracted by the edge extraction unit 13. The node of interest is a node selected one by one from the graph network by the processing unit 14. Here, a token is the unit used in natural language processing to convert a sentence into a small unit such as a word or string. When learning from scratch in natural language processing, text can be freely divided into tokens, but when performing transfer learning or fine tuning with a trained model, it is not possible to add new tokens or delete unnecessary tokens, and it is necessary to divide the string using tokens used in the trained model. Also, when creating a sentence using a generative AI, the generative AI can only understand fixed tokens. The processing unit 14 creates a token sequence by dividing the input text into tokens based on the trained model and processing it, and then generates a sentence by converting the created token sequence back into characters that humans can understand. Furthermore, when arranging the node of interest and adjacent nodes, the processing unit 14 may hold a node token and a node ID as a set, and may also hold an edge ID and the node IDs of the nodes connected to both ends of the edge indicated by the edge ID as a set. This allows the node IDs of the nodes connected to both ends of the edge to be selected when an edge is selected, thereby associating the edge with the node token.

[0027] The graph natural language processing device 1 may also include a display processing unit, which is not shown in Figure 1. For example, the display processing unit generates display information for displaying the text data created by the processing unit 14 and outputs the generated display information to a display device. The display device displays the text data created by the processing unit 14 based on the display information. The display device may be a separate display device from the graph natural language processing device 1, or it may be a display unit included in the graph natural language processing device 1. Furthermore, the display device may be a display unit included in an external device that is communicated with the graph natural language processing device 1 via a network.

[0028] Furthermore, the graph natural language processing unit 1 may include an output unit, which is not shown in Figure 1. The output unit outputs the text data created by the processing unit 14 to an external device. For example, the output unit outputs the text data created by the processing unit 14 as graph data to a graph neural network. The graph neural network is a neural network that learns graph structures using the input graph data. The output unit may also output some or all of the graph data output to the graph neural network to an external device.

[0029] (Graph Natural Language Processing Method) Next, a graph natural language processing method according to Embodiment 1 will be described. Figure 2 is a flowchart showing the graph natural language processing method according to Embodiment 1, and shows a series of operations by the graph natural language processing device 1. The graph data acquisition unit 11 acquires graph data (step ST1). For example, if an external server manages the graph data, the graph data acquisition unit 11 connects to the external server via a communication unit and acquires the graph data received from the external server. The graph data acquired by the graph data acquisition unit 11 is output to the node extraction unit 12 and the edge extraction unit 13. If the node extraction unit 12 and the edge extraction unit 13 have the functions of the graph data acquisition unit 11, the process of step ST1 executed by the graph data acquisition unit 11 is omitted from the series of processes shown in Figure 2. In this case, the following description of graph data acquired by the graph data acquisition unit 11 should be read as graph data acquired by the node extraction unit 12 and graph data acquired by the edge extraction unit 13.

[0030] The node extraction unit 12 extracts nodes from the graph data acquired by the graph data acquisition unit 11 (step ST2). Here, the node extraction unit 12 extracts the node type from the graph data and further extracts the node attributes. The node extraction unit 12 outputs the extracted node type and node attributes to the processing unit 14.

[0031] The edge extraction unit 13 extracts edges from the graph data acquired by the graph data acquisition unit 11 (step ST3). For example, the edge extraction unit 13 focuses on one of the nodes included in the graph data and designates that node as the target node. The edge extraction unit 13 extracts the edges connected to the target node. Among the two nodes connected to the edge extracted by the edge extraction unit 13, a node different from the target node is defined as an adjacent node. Then, the edge extraction unit 13 extracts all adjacent nodes corresponding to the target node and outputs the adjacent nodes to the processing unit 14.

[0032] The processing unit 14 executes creation processing (step ST4). Here, the processing unit 14 creates a node token by combining the node type and node attribute extracted by the node extraction unit 12, creates a node token of the target node in the graph data specified from the edges extracted by the edge extraction unit 13, and creates and outputs a text in which the node tokens of the adjacent nodes of the target node specified from the edges extracted by the edge extraction unit 13 are arranged.

[0033] Note that the target nodes are determined one by one in order so that all the nodes included in the graph represented by the graph network are selected once. The edge extraction unit 13 repeats the process of extracting adjacent nodes from the edges of the target nodes determined in a graph having two or more nodes. The processing unit 14 creates text data each time the process of extracting adjacent nodes is repeated.

[0034] In response to the extraction of the nodes connected to both ends of the edge, the node extraction unit 12 and the edge extraction unit 13 may acquire the node ID or the edge ID. That is, the node extraction unit 12 extracts the node ID of the node designated as the target node, and the edge extraction unit 13 extracts the edge ID of the edge connected to the node with the node ID extracted by the node extraction unit 12. Then, the node extraction unit 12 designates, as an adjacent node, the node connected to the end opposite to the end connected to the target node of the edge with the edge ID extracted by the edge extraction unit 13, and extracts the node ID thereof.

[0035] In addition to using the node ID or edge ID, when there is only one node name or node token with the same name in the graph, the node name or node token may be used instead of the node ID. Also, if the node ID and node name, and the edge ID and edge name do not appear in the text data created by the processing unit 14, the processing unit 14 may hold all of the node ID and node name, and the edge ID and edge name.

[0036] Three types of delimiter characters will be described below. The first is the delimiter character used when creating a node token that combines the node type and node attributes. The second is the "first delimiter character" that serves to separate the target node and the adjacent node when arranging the node tokens of the target node and the adjacent node. The third is the "second delimiter character" used when splitting by a tokenizer in natural language processing when arranging the node token and the first delimiter character.

[0037] The first delimiter character is used as part of the node token. In natural language processing, the delimiter character is converted to a number as a token. For this reason, the delimiter character is not included in the result of natural language processing and is used to separate the node type and node attributes from the text generated by natural language processing.

[0038] The second first delimiter becomes a token and is therefore included in the result of natural language processing. In natural language processing, text is described only by node tokens and first delimiters. For this reason, even when generating text using natural language processing, only node tokens or first delimiters are generated, and because of this characteristic, abnormal graphs are not generated. For example, when generating text using natural language processing, the first delimiter may be used multiple times in a row, but by treating the consecutive first delimiters as a single first delimiter, an abnormal graph is not generated. Also, if no first delimiter appears and node tokens appear consecutively, they become adjacent nodes, so an abnormal graph is not generated. Furthermore, if one node token and one first delimiter are generated, they become a node of interest with no adjacent nodes, so an abnormal graph is not generated. In this way, by constructing natural language processing tokens with only two types, node tokens and first delimiters, abnormal graphs are not generated.

[0039] The third, second delimiter is a character used to divide the string into tokens for natural language processing, i.e., the text data created by the processing unit 14, into words, i.e., individual node tokens. The second delimiter can be set freely. Furthermore, the second delimiter can be any character as long as it divides only the node tokens or the first delimiter, and does not divide the node tokens themselves or the first delimiter themselves.

[0040] (Delimiters that make up node tokens) Let's explain the first delimiter. For example, suppose the node types included in the graph data are the strings "A", "B", or "AB", and the character indicating the node attribute is "B". In this case, if we combine the node type "A" and the node attribute "B" without using a delimiter, it is impossible to determine whether the node token "AB" is a node token that only has a node type, or a node token that combines a node type and a node attribute. In this case, we can separate the two by using a delimiter such as ":" to make "A:B".

[0041] However, since the order in which the characters indicating the node type and the characters indicating the node attribute are combined does not matter, the processing unit 14 may use the string "BA", which is formed by arranging the characters indicating the node type next to the characters indicating the node attribute, as the node token. Since the string "BA" is not included in any of the strings indicating the node type, such as "A", "B", or "AB", the node type and node attribute can be separated without using a delimiter.

[0042] Furthermore, for example, if the node type is a string that does not contain numbers, and the node attribute consists only of numbers, then the node type and node attribute can be separated, and therefore a delimiter is not necessary. In addition, a node type or node attribute may each have two or more components.

[0043] The processing unit 14 must output all nodes included in the graph data in the same order. The delimiter can be freely selected, provided that it is different from the above delimiter and is not included in any other string. Furthermore, the processing unit 14 may use more than one delimiter. For example, a node token of type "A" with node attributes "B" and "C" can be represented as "A:[B,C]". In this case, ":", "[", "," and "]" correspond to delimiters.

[0044] (First delimiter) The first delimiter is explained below. When there is one node, there are no adjacent nodes, and even when there are two nodes, the string is symmetrical, so the first delimiter is not necessary. However, in graphs with three or more nodes, the node of interest and adjacent nodes are described by the same node token, so it is desirable to use the first delimiter to separate them. That is, the processing unit 14 outputs text consisting of the node token of the node of interest and the node token of the adjacent node, with the first delimiter separating them.

[0045] The first delimiter is a character different from other delimiters and is not a character or string that appears in the text created from the graph. For example, if ":" is used as the first delimiter, and the node token of the node of interest is "AA:B" and the node token of the adjacent node is "C:D", and the node of interest and adjacent nodes are arranged in that order, with the first delimiter placed between the node of interest and the adjacent node, the string of text data output from the processing unit 14 will be "AA:B:C:D". In this string, the node type and node attribute cannot be separated, and at the same time, the node of interest and the adjacent node cannot be separated, and the effect of the first delimiter is not obtained. For this reason, for example, the first delimiter is a character that is not included in the node type or node attribute, such as ":::". In this case, the string output from the processing unit 14 will be "AA:B:::C:D", which can be separated into two node tokens, and the node type and node attribute can be separated from the two separated node tokens "AA:B" and "C:D".

[0046] (Second Delimiter) The second delimiter is explained below. The method of separating node tokens from other node tokens, or from the first delimiter, is arbitrary. However, by standardizing the delimiter to use the second delimiter, natural language processing can be easily applied to text separated by the second delimiter. In other words, in text data, a second delimiter different from the first delimiter is placed between node tokens and between node tokens and the first delimiter.

[0047] As a second delimiter, for example, by adding a "half-width space" between node tokens and also between a node token and the first delimiter, the first delimiter can be processed as a single token. For example, if the node token of the node in question is "AA:B", and the node tokens of the adjacent node are "C:D" and "E:F", and the first delimiter ":::" is used to separate them, the string becomes "AA:B:::C:D E:F". Note that for clarity, half-width spaces are represented as " " here.

[0048] The second delimiter is a space, and the data is split using a tokenizer. This splits the data into "AA:B:::C:D and E:F". At this point, the node of interest, the first delimiter, and the adjacent nodes form a single token and cannot be separated into "AA:B", ":::", "C:D", and "E:F".

[0049] Furthermore, if a half-width space is placed between "AA:B::: C:D E:F" and ":::" and "C:D", the tokenizer will split it into "AA:B:::", "C:D", and "E:F", and the node of interest and the first delimiter will become a single token "AA:B:::".

[0050] In this case as well, "AA:B:::" becomes a different token from "AA:B" and ":::", and is treated as different information in natural language processing. As a result, the expected partitioning does not occur, and the same node token is treated as a different token, for example, "AA:B" becomes "AA:B:::", which increases the number of redundant token types and has the disadvantage of requiring a large amount of training data.

[0051] Furthermore, if we divide "AA:B," which can be both a node of interest and an adjacent node, into a node of interest and an adjacent node, the nodes of interest and adjacent nodes in the graph will no longer have an equal relationship. For this reason, we divide between node tokens and between node tokens and the first delimiter using a second delimiter. In other words, the string becomes "AA:B ::: C:D E:F". With this, the tokenizer can divide the string into words based on the second delimiter, resulting in "AA:B", ":::", "C:D", and "E:F".

[0052] Although symbols were used for the delimiter, first delimiter, and second delimiter, numbers or letters may also be used as delimiters, as long as they can effectively split the target characters or strings as expected.

[0053] Graph data can vary depending on the dataset, sometimes having node types or node attributes, and sometimes not. However, in Embodiment 1, the data will be described as having node types and node attributes. Embodiment 1 can also be used for datasets that have only node types and no node attributes, or datasets that have only node attributes and no node types. For example, if only node types are present, it is desirable to leave the node attribute blank for the node token and use the node type as the node token, or to assign the number of edges connected to the node, which is the node's order, as a node attribute.

[0054] Furthermore, if the graph data includes elements with node attributes and elements without node attributes, elements without node attributes may be assigned a specific character representing an empty node attribute, such as "None," and treated as node tokens. Alternatively, node tokens may be defined solely by their node type.

[0055] When a node exists at only one end of an edge, there are two ways to represent it. First, there is a method of defining a new node token to represent an empty node (representation method A). For example, if the node token of the node of interest connected to one end of the edge is "A:10" and the node token for an empty node is "None", the processing unit 14 creates the string "A:10:::None".

[0056] Furthermore, the processing unit 14 may delete nodes that are located at only one end of an edge (representation method B). This converts the data into text data that can be processed using natural language processing, assuming that there are nodes at both ends of all edges. Therefore, when text data is generated, it is possible to convert the text data into a graph under the condition that there are nodes at both ends. In other words, Embodiment 1 can be applied even when there are not necessarily nodes at both ends of an edge.

[0057] In the following, node types are defined as discrete values ​​that can be classified, and node attributes are defined as continuous or discrete values ​​related to the node type. For example, when representing a social network with graph data, node types may be discrete values ​​such as "nationality" or "gender," and node attributes may be continuous values ​​such as "age," "height," or "weight."

[0058] Furthermore, each node ID is assigned a unique number. However, if the node ID is the person's name, unity cannot be maintained if there are people with the same name, and it becomes impossible to assign a single node. In this case, it is possible to address the issue by changing only the names that do not maintain unity, i.e., only the names that have the same name, but this creates a matter of discretion: whether to change one of the names or both names.

[0059] For example, when assigning nodes to two people with the same name, assigning "_1" as the node ID to one person and "_2" to the other person ensures that each person is unique. However, this also creates the possibility of assigning "_2" to one person and "_1" to the other, and creates an inequality in graph generation where "_1" is more likely to be assigned as the node ID.

[0060] For example, in a dataset with 10 people with the same name and a dataset with 6 people with the same name, the node ID "_7" will only appear in the former dataset. This creates inequality for people assigned the node ID "_7". Furthermore, when a dataset is natural data without human intervention, node ID assignment follows Benford's Law. In this case, the node ID is assigned a number that follows a specific distribution. For example, Benford's Law states that the first digits in a sequence, "_1" or "_2", have a higher probability of occurring than the later digits, "_8" or "_9". This can be a factor that causes bias in the dataset.

[0061] On the other hand, assigning node IDs involves the discretion of the dataset administrator, who can freely determine the node IDs. This discretion can also lead to bias in the dataset. Therefore, conventional techniques have been used to create text data by augmenting the dataset by the same number of permutations of node IDs, i.e., the number of different sequences of node IDs.

[0062] For example, in a dataset with 10 people sharing the same name, assigning each person a node ID from "_1" to "_10" would require 10 factorials (10! = 3,628,800) possible combinations. Similarly, when representing graph data as text including node IDs, it becomes necessary to create a massive amount of text—10 factorials—through data augmentation. For instance, if a single text has 100 lines, then 100 lines × 10 factorials or more of text must be created, and these texts must then be processed using natural language processing.

[0063] As the number of nodes increases, the number of combinations including node IDs also increases exponentially, so the amount of text that needs to be generated through data augmentation also increases. This means that the computational cost required to assign node IDs increases, and the amount of memory required for this process increases, making it difficult to process all of the generated text data in natural language. On the other hand, if data augmentation is not performed, node IDs can be assigned freely by the dataset administrator, resulting in inequality in node ID assignment. This leads to a bias in the creation of text data related to graph data.

[0064] The increase in the number of text elements mentioned above becomes a significant problem when graphically representing molecules or genes with limited node types. Furthermore, in circuits, multiple line-to-line or ground-to-line capacitors with similar capacitances are often used to stabilize the power supply voltage. Therefore, in large circuits, the need for dozens or more identical capacitors is a common and significant problem. For example, molecules containing many carbon or hydrogen atoms offer greater freedom and arbitrariness in assigning node IDs. Similarly, DNA or RNA, being genetic material, are composed of only five nucleic acid bases—adenine, guanine, cytosine, thymine, and uracil—also offer greater freedom and arbitrariness in assigning node IDs.

[0065] The atoms that make up a molecule or the nucleic acid bases that make up a genetic material have the same properties when viewed individually. Therefore, if we create text (strings) for all possible combinations that can be selected when assigning node IDs by augmenting the data, we can eliminate the inequality that arises when assigning node IDs. However, as mentioned above, the number of texts for all possible combinations that can be selected when assigning node IDs increases factorially in proportion to the number of nodes, making it difficult to process the text data in natural language within a realistic time and cost.

[0066] Therefore, based on the idea that node IDs are essential for management but hinder graph generation, we introduce node tokens that combine node type and node attributes instead of node IDs. However, in graph data, there can be many nodes with the same node type. For example, when representing a social network as a graph, if we set the node type to people of the same nationality, there will be many people of the same nationality in large graph data. For this reason, node type cannot replace node IDs, which require uniqueness to mean that there is only one in the graph data. The same applies to node attributes; if we set height or weight as a node attribute, it is expected that there will be many people with the same height and the same weight, so it cannot replace node IDs.

[0067] Furthermore, by combining elements such as "gender," "age," or "place of residence" in addition to "nationality" as node types, the unity of node tokens can be improved, making it possible to replace node IDs. However, even without unity, nodes can also be defined by their relative relationships with surrounding nodes, allowing them to be converted to text data without losing the characteristics of graph data. In other words, by dividing the node into a focus node and adjacent nodes connected to the focus node by edges, and representing node tokens by combining the focus node and adjacent nodes, the relative relationships of nodes are defined, improving unity and achieving an effect equivalent to node IDs. Conversely, defining a graph based on node IDs, node types, node attributes, and connections between nodes via edges, and then representing the graph in text, becomes a redundant representation. This illustrates that node IDs can be replaced by combining node types and node attributes, and by connections between nodes via edges.

[0068] In the following explanation, a colon ":" is used as a delimiter in node tokens, placed between the node type and node attribute. However, if the node type and node attribute are separable strings, a delimiter is not required in the node token. For example, if all node types in graph data are known and only the node type can be extracted by combining the node type and node attribute, a delimiter is unnecessary. For example, when representing a social network with graph data, a node token combining the string "nationality" set as the node type and the string "height" set as the node attribute can be represented as the string "nationality:height". Alternatively, by reversing the order of the strings indicating the node type and the strings indicating the node attribute, the string representing the node token can be represented as "height:nationality".

[0069] Assuming all country names are known, "nationality" is not represented by a number, while "height" is. Therefore, a node token combining the string "nationality" set in the node type and the string "height" set in the node attribute does not require a delimiter, and this node token can be represented by the string "nationality height" or "height nationality". By replacing all nodes in the graph data with node tokens in this way, the increase in computational complexity can be suppressed without augmenting the data by the number of different node ID sequences that result from assigning node IDs. This provides a number of text data combinations that are suitable for natural language processing.

[0070] This section will specifically explain the additional effects obtained by creating node tokens. While node types and node attributes are required to be related values, in the generation of text data using natural language processing, these are not always output as related values. For example, when representing a social network with graph data, depending on the position of the strings in the text data created by processing unit 14, a value that should be associated with the string "height (m)" may be created as a value associated with the string "weight (kg)," abnormal data with incorrect combinations of "height" and "weight" may be created, text data containing only "height" without "weight" may be created, or multiple text data containing only "height" may be generated. Since this text data cannot be converted into a graph, it must be treated as abnormal data where physical constraints are not maintained.

[0071] Next, we will explain the edges that connect node tokens. Hereafter, we will assume that node tokens are connected to both ends of all edges extracted from the graph data. Edges are extracted from the graph data by the edge extraction unit 13. Some edges have edge types or edge attributes, but the graph natural language processing device 1 is only applicable to edges for which no edge type or edge attributes have been set.

[0072] Although the direction or sign of an edge can be set as one element of the edge attributes, the edge information is replaced by node tokens connected to both ends of the edge, so it is not possible to include information indicating the direction or sign of the edge. The graph data acquisition unit 11 acquires graph data that does not include the direction or sign of the edge.

[0073] Since nodes are replaced by node tokens, when focusing on an edge, we can extract the node tokens of the two nodes connected to both ends of the edge. Of these node tokens, one is designated as the node of interest, and the other as the adjacent node. While it is not always necessary to use a delimiter to connect node tokens, we will use ":" as the delimiter below, and use ":::" as the first delimiter to separate the node of interest from the adjacent node. Even with this first delimiter, it is necessary to select one that does not produce the same string depending on the combination of node type, node attribute, or node token, and it may not be necessary to use a delimiter if it is possible to split the node token.

[0074] Considering the social network described above, for example, if node tokens “Nationality A: Height B” and “Nationality C: Height D” are connected by an edge, the string would be, for example, “Nationality A: Height B ::: Nationality C: Height D”. Since the position of the first delimiter does not matter, it can also be “::: Nationality A: Height B Nationality C: Height D”. This is because the node of interest can be defined by its relative position to the first delimiter. Furthermore, it is desirable to separate the first delimiter and the node token with a second delimiter. If they are not separated, the first delimiter and the node token of the node of interest are processed as a single token in natural language processing, the node of interest does not become an adjacent node, and the expressiveness of the graph is reduced. On the other hand, when separated by a second delimiter, the same token as the node of interest can be represented as an adjacent node, thus not hindering the expressiveness of the graph. However, in the case of a directed graph or other data set where it is desirable to process the source or sink node separately from its neighbors, the first delimiter and the node token of the node of interest do not necessarily have to be separated by the second delimiter.

[0075] By combining node tokens in this way and using the first delimiter to represent the node of interest and its neighbors, the uniqueness that was insufficient with node tokens alone can be enhanced through the relationship between node tokens and their neighbors. Therefore, the graph can be represented in text without using node IDs.

[0076] Furthermore, in the string “Nationality A: Height B ::: Nationality C: Height D”, it is clear that there are node tokens for “Nationality A: Height B” and “Nationality C: Height D”. The first is the node of interest, which is a node that combines the node type “Nationality A” and the node attribute “Height B”. The second is the adjacent node, which is a node of the node type “Nationality C” and has the node attribute “Height D”. This means that each node is connected by an edge. The graph according to Embodiment 1 can be represented as graph data by combining four different types of words: node ID, node type, node attribute, and edge ID.

[0077] However, when converting graph data to text, conventionally, for example, if the string for node ID 1 is expressed as "Node ID 1 Node type a Edge 1 Edge 2 Edge 3 Node attribute b" and the string for node ID 2 is expressed as "Node ID: 2 Node type c Edge 4 Node attribute d", then it is necessary to generate text with the appropriate order and number for each node ID. In this case, the number of edges can change and can be modified.

[0078] On the other hand, the number of node attributes is also important. For example, if a node ID is assigned one attribute, having zero or more attributes will result in abnormal text data that cannot be converted into a graph. The order is also important. For example, if text is generated where node ID 1 is "Node ID 1 Edge 1 Edge 2 Edge 3 Node type a Node attribute b" and node ID 2 is "Node ID 2 Node type c Edge 4 Node attribute d", the order of the nodes of interest is not consistent, making it impossible to convert it into a graph.

[0079] Thus, for text to function as a graph, the order and number of nodes must be appropriately generated for each node ID. Furthermore, the node type and node attributes must also be closely related. For example, if the node types are "walking" and "car," and the node attribute is "speed," then since walking at 100 km / h is practically impossible, a node token representing "walking: 100 km / h" should be considered abnormal data.

[0080] Thus, the type of node and the node attributes are closely related. In contrast, the graph natural language processing device 1 according to Embodiment 1 defines the combination of car: 100 km / h and walking: 3 km / h as a node token, which allows all text data to be converted into a graph without creating abnormal characteristics during text generation. However, forming such node tokens has the disadvantage that combinations of node types and node attributes cannot be freely generated.

[0081] Therefore, we will show a method for changing node attributes based on the node type. For this change, we use domain knowledge; for example, if a car is defined as being between 30 km / h and 120 km / h, we create node tokens with different values, such as car: 30 km / h, car: 50 km / h, and so on, not just car: 100 km / h. By creating text in which car: 100 km / h is replaced with these node tokens and using it as training data during natural language processing training, we can improve the flexibility of expression in natural language processing.

[0082] Furthermore, if sufficient graph data is available, data augmentation may be performed by changing node tokens to attribute values ​​of nodes of the same type but with different node attributes. For example, if there is a car: 48 km / h in one graph or another, the node token for car: 100 km / h in a different node or another graph can be replaced with the node token for car: 48 km / h. However, haphazardly replacing data without domain knowledge may generate text that represents an abnormal graph.

[0083] Therefore, it is desirable to augment the data not only by using the same node type, but also by using the attribute values ​​of nodes that have the same node degree and different node attributes. This can reduce the possibility of abnormal graphs. Furthermore, if there is sufficient text data, it is desirable to augment the data by using node attributes that satisfy specific conditions, such as having a particular type of node in an adjacent node, based on adjacent node types or node attributes, using domain knowledge. Furthermore, it is desirable to calculate the width or distribution of those node attribute values ​​and augment the data based on the calculated width or distribution.

[0084] Data augmentation is also known as "data extension." For example, data extension, which involves creating multiple data points from a single data point by performing affine transformations such as rotating or stretching image data, or by extracting a portion of an image to create a new image, can suppress the occurrence of overfitting.

[0085] Furthermore, since the amount of data subject to natural language processing is enormous, obtaining new data takes priority over data augmentation. Therefore, it is acceptable to augment the data by using domain knowledge to replace words with similar ones or by rearranging the order of sentences.

[0086] Furthermore, similar to general data augmentation techniques, in addition to the methods described above, overfitting can be suppressed even with small datasets by replacing node tokens with node tokens that have similar node attributes.

[0087] In a typical graph neural network, node IDs are not explicitly assigned to nodes. However, when converting a graph into an adjacency matrix that can be processed by a graph neural network, it is necessary to assign node IDs to one of the rows and columns of the adjacency matrix. For example, considering node A in a graph neural network with N nodes, the adjacency matrix will be an N x N matrix. The elements in the Mth row and Mth column of this adjacency matrix indicate whether or not node A is connected to any other nodes, and the diagonal elements represent self-loops. Note that M is an integer between 0 and N (exclusive). Thus, even though node A is not explicitly assigned a node ID, the integer M can be considered the node ID of node A.

[0088] In graph neural networks, node attributes are assigned in association with node IDs. Therefore, along with an N x N adjacency matrix, there exists a dataset representing node attributes, expressed as N x B columns. The node ID is used to associate the elements of the adjacency matrix with the dataset representing node attributes. B indicates a node type classified into B categories, and in graph neural networks, node attributes are assigned using one-hot vectors. Therefore, the same number of columns as node types are required. Typically, node IDs are not explicitly assigned; instead, the row numbers of the adjacency matrix are often associated with the row numbers of the dataset representing node attributes. However, in large graphs, subgraphs are sometimes used. In this case, node IDs may be explicitly assigned.

[0089] In graph neural networks, an association is made between nodes corresponding to the adjacency matrix and node attributes. In this case, node IDs and graph data are closely related, and it is not obvious that node IDs can be replaced with node tokens in a graph or graph neural network. Furthermore, replacing node IDs with node tokens does not necessarily guarantee unity, unlike when node IDs are assigned.

[0090] The graph natural language processing unit 1 represents the characteristics of a node relatively in relation to its surrounding nodes by combining node tokens of nodes connected to both ends of an edge. This allows the graph natural language processing unit 1 to avoid using node IDs and to suppress the generation of graph data with abnormal characteristics.

[0091] Figure 3 is a diagram showing an example of a graph network in Embodiment 1, and shows a graph composed of four nodes and four edges. The graph shown in Figure 3 has a node containing node type A and node attribute 1000, a node containing node type B and node attribute 1, a node containing node type B and node attribute 10, and a node containing node type C and node attribute 100. The processing unit 14 creates node tokens that combine node type and node attribute to be included in the nodes.

[0092] Specifically, when the colon ":" is used as the delimiter, the graph shown in Figure 3 yields node tokens with the strings "A:1000", "B:1", "B:10", and "C:100". Furthermore, the graph shown in Figure 3 has the following four edges: The edge with the string "ID:1" connects the node token "C:100" and the node token "A:1000". The edge with the string "ID:2" connects the node token "B:1" and the node token "B:10". The edge with the string "ID:3" connects the node token "A:1000" and the node token "B:10". The edge with the string "ID:1" connects the node token "B:10" and the node token "C:100".

[0093] If the first delimiter is ":::", the string will look like this: A:1000 B:10 C:100:::B:1 B:10:::B:10 B:1 A:1000 C:100:::C:100 A:1000 B:10

[0094] At this time, if the delimiters between node tokens and between node tokens and the first delimiter are represented by " " (half-width space), the string will look like this: "A:1000 B:10 C:100:::B:1 B:10:::B:10 B:1 A:1000 C:100:::C:100 A:1000 B:10" Processing unit 14 creates text data of this string.

[0095] To avoid increasing the number of node token types, a second delimiter is added between node tokens and between node tokens and the first delimiter. For example, if the second delimiter is "&&&", the above string becomes as follows: A:1000&&&B:10&&&C:100&&&:::&&&B:1&&&B:10&&&:::&&&B:10&&&B:1&&&A:1000&&&C:100&&&:::&&&C:100&&&A:1000&&&B:10

[0096] In this case, the node tokens of the node of interest are A:1000, B:1, B:10, and C:100. B:1 is ":::&&&B:1", B:10 is ":::&&&B:10", and C:100 is ":::&&&C:100", while A:1000 does not contain the first and second delimiters, making it impossible to determine that A:1000 is the node of interest.

[0097] Therefore, the processing unit 14 may create the following string, starting with ":::&&&" and making the first node token A:1000 the node of interest: :::&&&A:1000&&&B:10&&&C:100&&&:::&&&B:1&&&B:10&&&:::&&&B:10&&&B:1&&&A:1000&&&C:100&&&:::&&&C:100&&&A:1000&&&B:10

[0098] The second delimiter, "&&&", is used for natural language processing by the tokenizer. Thus, the second delimiter can be anything as long as it is different from all node tokens, the first delimiter, the strings generated by combinations of node tokens, or the strings generated by combinations of node tokens and the first delimiter.

[0099] If the second delimiter is a half-width space, a whitespace tokenizer can be used. However, since some datasets contain half-width spaces in their node tokens, you may choose a character other than a half-width space as the second delimiter. Alternatively, you may replace the half-width spaces in the node tokens with other characters, such as the tab character "¥t", and use a half-width space as the second delimiter.

[0100] When "&&&" is used as the second delimiter, a tokenizer that can split the string into words using "&&&" can be used. In this way, by not using a half-width space as a delimiter, it is possible to use a delimiter to represent node tokens. Using a tokenizer, the above string can be broken down into a sequence of words as shown below. Note that the divided words are represented separated by newlines. ::: A:1000 B:10 C:100 ::: B:1 B:10 ::: B:10 B:1 A:1000 C:100 ::: C:100 A:1000 B:10

[0101] In graph natural language processing, each divided word can be replaced with a numerical value, allowing it to be input into a natural language processing unit. The natural language processing unit, while maintaining the physical constraints for constructing the graph, uses a tokenizer to divide the text into elements consisting of two types of words: node tokens or only the first delimiter. This enables graph-based natural language processing.

[0102] Figure 4 is a flowchart illustrating the details of the graph natural language processing method according to Embodiment 1, showing a series of processes from converting a graph into a string that can be processed in natural language using node tokens, a first delimiter, and a second delimiter. For example, a newline character, i.e., the newline code "\n", is selected as the first delimiter. The node token following the newline code is designated as the node of interest, and the other node tokens are designated as adjacent nodes.

[0103] The graph data acquisition unit 11 acquires graph data (step ST1A). The node extraction unit 12 extracts node types from the graph data (step ST2A) and extracts node attributes (step ST3A). The node extraction unit 12 combines the extracted node types and node attributes to create node tokens (step ST4A).

[0104] The edge extraction unit 13 extracts edges from the graph data acquired by the graph data acquisition unit 11 (step ST5A). For example, the edge extraction unit 13 focuses on one node among the nodes included in the graph data and designates that node as the node of interest. The edge extraction unit 13 extracts edges connected to the node of interest. Of the two nodes connected to the edge extracted by the edge extraction unit 13, the node that is different from the node of interest is designated as the adjacent node.

[0105] The processing unit 14 extracts all adjacent nodes corresponding to the node of interest and creates node tokens for the node of interest and adjacent nodes using a first delimiter (step ST6A). The processing unit 14 creates text data by combining the nodes between node tokens and between node tokens and the first delimiter using a second delimiter (step ST7A). By performing the processing from step ST1A to step ST7A, the text data created by the processing unit 14 can separate the node of interest and adjacent nodes.

[0106] Thus, the first delimiter does not have to be a character that appears in the text created by the processing unit 14, as long as it can be defined as a single character, such as a half-width space, a full-width space, a newline character, a tab character "¥t", or a combination of two or more of these characters.

[0107] For example, in the example in Figure 3, using the newline character "\n" allows the first node token after the newline to be treated as the node of interest, and all other node tokens to be treated as adjacent nodes. Therefore, the first delimiter does not necessarily have to be used. A:1000 B:10 C:100 B:1 B:10 B:10 B:1 A:1000 C:100 C:100 A:1000 B:10

[0108] Next, the hardware configuration for realizing the functions of the graph natural language processing device 1 will be described. The functions of the graph data acquisition unit 11, node extraction unit 12, edge extraction unit 13, and processing unit 14 of the graph natural language processing device 1 are realized by processing circuits. That is, the graph natural language processing device 1 includes processing circuits for executing the processes from step ST1 to step ST4 shown in Figure 2. The processing circuits may be dedicated hardware, or they may be a CPU (Central Processing Unit) that executes a program stored in memory. Next, the hardware configuration of the graph natural language processing device will be described with reference to Figures 5 and 6.

[0109] Figure 5 is a block diagram showing the hardware configuration for realizing the functions of the graph natural language processing device 1. Figure 6 is a block diagram showing the hardware configuration for executing the software that realizes the functions of the graph natural language processing device 1. In Figures 5 and 6, the graph data acquisition unit 11 acquires graph data from an external device or a storage unit (not shown in Figure 1) provided by the graph natural language processing device 1 via the input interface 100. The processing unit 14 outputs the created text data via the output interface 101 to an external natural language processing device or a natural language processing unit (not shown in Figure 1) provided by the graph natural language processing device 1.

[0110] If the processing circuit is a dedicated hardware processing circuit 102 as shown in Figure 5, the processing circuit 102 may be, for example, a single circuit, a composite circuit, a programmed processor, a parallel programmed processor, an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), or a combination thereof. The graph data acquisition unit 11, node extraction unit 12, edge extraction unit 13, and processing unit 14 of the graph natural language processing device 1 may be implemented by separate processing circuits, or these functions may be implemented together by a single processing circuit.

[0111] When the processing circuit is the processor 103 shown in Figure 6, the functions of the graph data acquisition unit 11, node extraction unit 12, edge extraction unit 13, and processing unit 14 of the graph natural language processing device 1 are realized by software, firmware, or a combination of software and firmware. The software or firmware is written as a program and stored in memory 104.

[0112] The processor 103 reads and executes a program stored in the memory 104, thereby realizing the functions of the graph data acquisition unit 11, node extraction unit 12, edge extraction unit 13, and processing unit 14 of the graph natural language processing device 1. For example, the graph natural language processing device 1 includes a memory 104 for storing a program that, when executed by the processor 103, will result in the execution of steps ST1 to ST4 shown in Figure 2. These programs cause the computer to execute the procedures or methods of processing performed by the graph data acquisition unit 11, node extraction unit 12, edge extraction unit 13, and processing unit 14. The memory 104 may be a computer-readable storage medium that stores a program for causing the computer to function as the graph data acquisition unit 11, node extraction unit 12, edge extraction unit 13, and processing unit 14.

[0113] Memory 104 includes, for example, non-volatile or volatile semiconductor memory such as RAM (Random Access Memory), ROM (Read Only Memory), flash memory, EPROM (Erasable Programmable Read Only Memory), and EEPROM (Electrically-EPROM) (registered trademark), as well as magnetic disks, flexible disks, optical disks, compact disks, minidiscs, DVDs, and the like.

[0114] Some of the functions of the graph data acquisition unit 11, node extraction unit 12, edge extraction unit 13, and processing unit 14 of the graph natural language processing device 1 may be implemented by dedicated hardware, while other parts may be implemented by software or firmware. For example, the function of the graph data acquisition unit 11 may be implemented by a processing circuit 102 which is dedicated hardware, and the functions of the node extraction unit 12, edge extraction unit 13, and processing unit 14 may be implemented by a processor 103 reading and executing a program stored in memory 104. In this way, the processing circuit can implement the above functions by hardware, software, firmware, or a combination thereof.

[0115] As described above, the graph natural language processing device 1 according to Embodiment 1 includes a node extraction unit 12 that extracts nodes including node types and node attributes from graph data, and a processing unit 14 that outputs text arranged by combining the node types and node attributes extracted by the node extraction unit 12, the node token of the node of interest in the graph data, and the node tokens of the adjacent nodes of the node of interest. As a result, since the node ID is replaced by a node token that combines the node type and node attributes, the graph natural language processing device 1 can create text data from graph data without increasing the amount of data equal to the number of different node ID sequences that occur when assigning node IDs.

[0116] In the graph natural language processing device 1 according to Embodiment 1, the processing unit 14 outputs text consisting of a node token of the node of interest and a first delimiter for separating the node tokens of adjacent nodes. As a result, the node ID is replaced with a node token that combines the node type and node attributes, so the graph natural language processing device 1 can create text from graph data without augmenting the data by the number of different node ID sequences that occur when assigning node IDs.

[0117] In the graph natural language processing device 1 according to Embodiment 1, the text data has a second delimiter, different from the first delimiter, placed between node tokens and between node tokens and the first delimiter. As a result, the node ID is replaced by a node token that combines the node type and node attribute, so the graph natural language processing device 1 can create text from graph data without increasing the data volume by the number of different node ID sequences that occur when assigning node IDs.

[0118] In the graph natural language processing device 1 according to Embodiment 1, the second delimiter is a half-width space. This allows for the inclusion of a half-width space as a delimiter, which facilitates integration with natural language processing.

[0119] The graph natural language processing method according to Embodiment 1 comprises the steps of: a node extraction unit 12 extracting nodes including node types and node attributes from graph data in step ST2; and a processing unit 14 outputting text in which node tokens formed by combining the node types and node attributes extracted by the node extraction unit 12, node tokens of the node of interest in the graph data, and node tokens of adjacent nodes of the node of interest are arranged. By executing the above method, the graph natural language processing device 1 replaces node IDs with node tokens formed by combining node types and node attributes, so that text can be created from graph data without increasing the amount of data equal to the number of different node ID sequences that occur when assigning node IDs.

[0120] The computer executing the program according to Embodiment 1 functions as a node extraction unit 12 that extracts nodes including node type and node attributes from graph data, a node token formed by combining the node type and node attributes extracted by the node extraction unit 12, a node token of the node of interest in the graph data, and a processing unit 14 that outputs text arranged in the order of the node tokens of the adjacent nodes of the node of interest. As a result, the program according to Embodiment 1 can function as a graph natural language processing device 1 that can create text from graph data without artificially inflating the data by the number of different node ID sequences that occur when assigning node IDs.

[0121] Embodiment 2. The graph natural language processing device according to Embodiment 2 extracts specific nodes from acquired graph data that match pre-set specific conditions, and generates text data based on the extracted graph data. The graph natural language processing device according to Embodiment 2 has the same components as the graph natural language processing device 1 shown in Figure 1, but the functions of each component differ as will be described later. The configuration of the graph natural language processing device according to Embodiment 2 will be described below with reference to Figure 1.

[0122] Figure 7 is a flowchart showing a graph natural language processing method according to Embodiment 2, illustrating a series of operations performed by the graph natural language processing device 1 according to Embodiment 2. The graph data acquisition unit 11 acquires graph data (step ST1B). Here, the graph data acquisition unit 11 acquires graph data having a plurality of nodes and a plurality of edges connecting these plurality of nodes to each other. For example, if an external server manages the graph data, the graph data acquisition unit 11 communicates with the external server via the communication unit and acquires the graph data received from the external server. The graph data acquired by the graph data acquisition unit 11 is output to the node extraction unit 12 and the edge extraction unit 13. If the node extraction unit 12 and the edge extraction unit 13 have the functions of the graph data acquisition unit 11, the process of step ST1B executed by the graph data acquisition unit 11 is omitted from the series of processes shown in Figure 7. In this case, the following description of graph data acquired by the graph data acquisition unit 11 should be read as graph data acquired by the node extraction unit 12 and graph data acquired by the edge extraction unit 13.

[0123] The node extraction unit 12 extracts specific nodes from the graph data acquired by the graph data acquisition unit 11 (step ST2B). Here, a specific node is a node that matches a predetermined set condition. The node extraction unit 12 determines whether or not a specific node exists in the graph shown by the graph data acquired by the graph data acquisition unit 11 (step ST3B).

[0124] (Specific Conditions) Specific conditions include, for example, whether a node possesses multiple pieces of information and is connected to an edge associated with each of these pieces of information. For example, the multiple pieces of information could be information indicating a directional node or information indicating nodes connected to both ends of a directional edge. Specifically, components such as diodes with two terminals or electrolytic capacitors with polarity can be treated as nodes with directionality in terms of rectification direction or polarity direction. Also, when representing a DC power supply with nodes, the direction of current flow can be assigned to the edges.

[0125] Furthermore, nodes connected to two or more edges may be extracted as specific nodes. For example, when semiconductors are represented by nodes, the graph natural language processing device 1 is pre-configured with the semiconductor's spec sheet information. The node extraction unit 12 determines the number of terminals of the semiconductor based on the spec sheet information and extracts specific nodes connected to multiple edges.

[0126] If a specific node exists in the graph (step ST3B; YES), the processing unit 14 creates multiple new nodes based on the multiple pieces of information that the specific node possesses, which have been extracted from the graph data by the node extraction unit 12 (step ST4B). For example, if the specific node is a node connected to an edge associated with each of the multiple pieces of information, the processing unit 14 creates multiple new nodes corresponding to each piece of information.

[0127] The processing unit 14 connects edges to multiple new nodes (step ST5B). For example, the processing unit 14 connects the edges that were previously connected to a specific node to each of the newly created nodes. Alternatively, the processing unit 14 may create new edges to connect the new nodes together and use these edges to connect multiple new nodes. For example, the processing unit 14 creates a new edge and connects the node that was previously connected to a specific node to one of the multiple new nodes created via the edge.

[0128] Assume that a specific node has multiple pieces of information, including first information and second information, and is a node to which multiple edges are connected, including a first edge associated with the first information and a second edge associated with the second information. The processing unit 14 creates multiple edges, including a new edge in which one end is connected to the same destination as the first edge and the other end is connected to the first node corresponding to the first information, and a new edge in which one end is connected to the same destination as the second edge and the other end is connected to the second node corresponding to the second information.

[0129] Next, the processing unit 14 deletes unnecessary edges (step ST6B). For example, the processing unit 14 deletes edges that have become unnecessary due to the creation of multiple nodes. Specifically, the processing unit 14 deletes edges that are connected to a particular node.

[0130] Next, the processing unit 14 deletes the specific node (step ST7B). As a result, the original graph data is converted into new graph data in which the specific node extracted by the node extraction unit 12 is replaced, with a subgraph having multiple new nodes and new edges connecting these new nodes to each other.

[0131] If the processing up to step ST7B is completed, or if there is no specific node in the graph (step ST3B; NO), the node extraction unit 12 extracts the node type from the graph data converted by the processing unit 14 (step ST8B). Furthermore, the node extraction unit 12 extracts the node attributes from the graph data converted by the processing unit 14 (step ST9B).

[0132] Next, the processing unit 14 creates a node token by combining the node type and node attribute extracted by the node extraction unit 12 as a single word (step ST10B). Subsequently, the edge extraction unit 13 extracts edges from the graph data converted by the processing unit 14 (step ST11B). The processing unit 14 creates text data by combining the node tokens of the node of interest extracted by the edge extraction unit 13 and its adjacent nodes with a first delimiter (step ST12B).

[0133] Next, a specific example of the processing performed by the graph natural language processing device 1 according to Embodiment 2 will be described. Figure 8 is a diagram showing an example of a graph network (1) in Embodiment 2, and shows the graph data that constitutes the graph network. First, the graph data acquisition unit 11 acquires the graph data shown in Figure 3. The node extraction unit 12 extracts nodes to which three or more edges are connected from the graph data shown in Figure 3. In Figure 3, a node in which node type B and node attribute 10 are combined is a specific node. Since this specific node is connected to three edges, it is assumed to have three pieces of information regarding the connections with the edges. The processing unit 14 creates three new nodes corresponding to each piece of information. As a result, the specific node is divided into three new nodes.

[0134] Since the node types of the newly created nodes are the same, the processing unit 14 may assign the node type of the specific node before the split to these nodes. Alternatively, the processing unit 14 may use domain knowledge to change the node type of the specific node before the split and assign the changed node type to the newly created nodes. Furthermore, the processing unit 14 may use domain knowledge to add, delete, or modify the node attributes of the specific node before the split and assign the processed node attributes to the newly created nodes. If domain knowledge is unavailable, the processing unit 14 may assign the same node attributes to the newly created nodes as before the split. The processing unit 14 may also assign the split node number or an element that replaces the number.

[0135] When the node token of a particular node is "B:10", the new node tokens can be set to "B:10_1", "B:10_2", and "B:10_3" to maintain that they are different information. It is desirable that the node numbers to be added be assigned according to certain conditions, such as the lexicographical order of adjacent node tokens. In this case, as shown in Figure 8, "_1" is added to the partition node adjacent to node token "A:1000", "_2" is added to the partition node adjacent to node token "B:1", and "_3" is added to the partition node adjacent to node token "C:100".

[0136] In addition to adjacent node tokens, if node terminal numbers are also defined, it is desirable to assign node numbers in order of terminal number. For example, when considering a circuit, a semiconductor can be considered a node that holds multiple pieces of information. In the case of semiconductors, the terminal numbers are clear from the spec sheet published by the manufacturer, so the terminal numbers can be used as node numbers and assigned to node attributes.

[0137] The processing unit 14 connects the edges that were connected to specific nodes to the newly created node. Specifically, it connects the node token with the string "A:1000" to the node token with the string "B:10_1" with an edge, connects the node token with the string "B:1" to the node token with the string "B:10_2" with an edge, and connects the node token with the string "C:100" to the node token with the string "B:10_3" with an edge. As a result, as shown in Figure 8, the strings of the node tokens become "A:1000", "B:1", "B:10_1", "B:10_2", "B:10_3", and "C:100". Thus, the strings of the node of interest and its neighbors are as follows. A:1000 B:10_1 C:100 ::: B:1 B:10_2 ::: C:100 A:1000 B:10_3 ::: B:10_1 A:1000 ::: B:10_2 B:1 ::: B:10_3 C:100

[0138] In this string, the connections between the divided nodes "B:10_1", "B:10_2", and "B:10_3" are obvious from the string itself. This means that it is not always necessary to connect the divided nodes. Not connecting the divided nodes reduces the number of elements in the text data, and thus reduces the types and number of tokens that need to be processed by natural language processing. This reduces the computation time or cost required for training natural language processing.

[0139] By reducing the types of tokens that can be selected for text generation using natural language processing and the number of tokens required to form a graph network, it is possible to reduce the computation time or cost required for these processes, as well as suppress the occurrence of abnormal graphs.

[0140] For example, when representing a computer circuit with graph data, the CPU and memory, the CPU and GPU, or the CPU and FPGA are connected by bus wiring, and numerous signals are sent and received. Also, as shown in Figure 3, in a graph where a specific node is treated as a single node, the bus wiring is converted into multiple edges. When the processing unit 14 converts the multiple edges into text data, the node tokens connected to both ends of the multiple edges remain the same before and after the conversion, so multiple combinations of the same node of interest and its neighbors are created. For example, if the node type is the string "CPU", the node attribute is the number "1", the node type is the string "Memory", the node attribute is the number "1", the node of interest is "CPU:1", the adjacent node is "Memory:1", and there are four bus connections, it can be represented by the strings "CPU:1 ::: Memory:1", "CPU:1 ::: Memory:1", "CPU:1 ::: Memory:1", and "CPU:1 ::: Memory:1", "Memory:1 ::: CPU:1", "Memory:1 ::: CPU:1", "Memory:1 ::: CPU:1", "Memory:1 ::: CPU:1".

[0141] However, the CPU and memory do not contain information about the terminal numbers of the semiconductors connected to both ends of the edge. Therefore, when converting the text data created by the processing unit 14 into a semiconductor circuit, there is a problem in that the circuit cannot be accurately represented. For example, a graph is created from the text data, and a netlist that can be simulated as a circuit is created from the graph. In this case, if the terminal numbers of the semiconductors are not accurate, it becomes difficult to input the netlist into the circuit simulator, or even if it is input into the circuit simulator, calculation errors occur, and calculations cannot be performed.

[0142] In contrast, in the graph natural language processing device 1 according to Embodiment 2, each of the multiple semiconductors included in the circuit is represented by a different node, so each one is a different combination of the node of interest and adjacent nodes. For example, in the case of the semiconductor circuit described above, “CPU: 1_1 ::: Memory: 1_1”, “CPU: 1_2 ::: Memory: 1_2”, “CPU: 1_3 ::: Memory: 1_3”, “CPU: 1_4 ::: Memory: 1_4”, and “CPU: 1_4-Memory: 1_4”, “Memory: 1_1 ::: CPU: 1_1”, “Memory: 1_2 ::: CPU: 1_2”, “Memory: 1_3 ::: CPU: 1_3”, and “Memory: 1_4 ::: CPU: 1_4”. The number following the character "_" is used as the terminal number. This allows the terminal number to be stored, and a highly accurate graph that enables circuit simulation can be generated from the text data created by the processing unit 14.

[0143] Furthermore, terminal numbers are specified in the spec sheet for each semiconductor. Therefore, there is no arbitrariness in assigning terminal numbers, eliminating the need to inflate data to eliminate inequality and suppressing the increase in computational load required for natural language processing. For example, in the graph data shown in Figure 3, the node token for the string "B:10" is set to "Company," and the node tokens for the strings "A:1000," "B:1," and "C:100" are set to "User." In this case, in the graph showing that connections are formed between a company and multiple users, the node token "B:10" representing the company is connected to nodes representing multiple users via edges.

[0144] The user is interested in various aspects of the "company" represented by the "B:10" node token. For example, the company's products, profits, and after-sales service are aspects that the user is interested in. Therefore, the graph natural language processing unit 1 creates nodes by dividing the node token into multiple nodes based on the information corresponding to each aspect, and connects each created node to the user at an edge.

[0145] On the other hand, as shown in Figure 3, in the case of a node that possesses multiple pieces of information, the aspects of the node cannot be preserved as graph data. This is reflected in the text data created from the graph data, and can be considered as so-called information degradation, where some of the information from the graph data is lost in the text data. Thus, by applying Embodiment 2, it is possible to modify the graph data in a way that prevents the information degradation that occurs when the information contained in the graph data is converted to text. Also, as shown in Figure 7, the nodes newly created by the division do not necessarily have to be connected. As such, the lack of connections makes the graph data insufficient. However, the graph data is converted to text data, and node numbers are assigned to the node attributes. Therefore, it is possible to reconstruct a single node before the division using only the node tokens.

[0146] The processing unit 14 may divide a multi-terminal node connected to three or more edges into a number of terminal nodes equal to the number of terminals, change the ends of the edges connected to the multi-terminal node from connections to the multi-terminal node to connections to each terminal node, and delete multi-terminal nodes that are not connected to any edges. This allows the processing unit 14 to divide into multi-terminal nodes when the number of terminals is known. Alternatively, the processing unit 14 may divide a multi-terminal node connected to three or more edges into a number of terminal nodes equal to the number of connected edges, change the ends of the edges connected to the multi-terminal node from connections to each terminal node, and delete multi-terminal nodes that are not connected to any edges. This allows the processing unit 14 to divide into multi-terminal nodes even when the number of terminals is unknown. Furthermore, the processing unit 14 may divide a multi-terminal node with three or more edges into a number of terminal nodes equal to the number of terminals, change the ends of the edges connected to the multi-terminal node from connections to each terminal node, and delete the multi-terminal node. In addition, the processing unit 14 may combine the above three methods. For example, for circuit components with a known number of terminals, the component can be divided into the same number of terminals to retain that information. Conversely, if there is even one circuit component with an unknown number of terminals, it can be divided into the same number of terminal nodes as the number of edges, allowing it to be divided into multi-terminal nodes. The ends of the edges can then be changed to connect from multi-terminal nodes to individual terminal nodes. By combining these three methods, it becomes possible to accommodate all multi-terminal nodes.

[0147] Figure 9 shows an example (2) of a graph network in Embodiment 2. This example illustrates a case where a specific node to be divided has terminals that are not connected to edges, and the terminal information is stored as text data. In this case, the processing unit 14 provides one virtual node for each multi-terminal node and connects the terminal nodes via the virtual node. For example, as shown in Figure 9, a node token with the string "B:10" can be used as a virtual node, and the node tokens "B:10_1", "B:10_2", and "B:10_3" can be connected via this virtual node.

[0148] As a result, the strings "B:10:::B:10_1", "B:10_2", and "B:10_3" are newly created in the node of interest "B:10". The structure that connects the nodes divided using virtual nodes is called a star graph. With this, the processing unit 14 creates the following text data: A:1000 B:10_1 C:100 ::: B:1 B:10_2 ::: C:100 A:1000 B:10_3 ::: B:10_1 A:1000 B:10 ::: B:10_2 B:1 B:10 ::: B:10_3 C:100 B:10 ::: B:1 B:10_1 B:10_2 B:10_3

[0149] Furthermore, if the number of terminals is small, a structure called a complete graph may be used, in which virtual nodes are not defined and the divided terminals are directly connected to each other. A complete graph has the advantage that the relationships between nodes become clear because the divided nodes are directly connected. In this case, the processing unit 14 creates the following text data: A: 1000 B: 10_1 C: 100 ::: B: 1 B: 10_2 ::: C: 100 A: 1000 B: 10_3 ::: B: 10_1 A: 1000 B: 10_2 B: 10_3 ::: B: 10_2 B: 1 B: 10_1 B: 10_3 ::: B: 10_3 C: 100 B: 10_1 B: 10_2

[0150] When the number of divided nodes is three, the number of edges is six in both the star graph and the complete graph; there is no difference. However, as the number of divided nodes increases, the number of edges in the star graph increases proportionally to the number of nodes, whereas in the complete graph, the number of edges increases proportionally to the number of combinations of nodes, i.e., roughly the square of the number of nodes. For example, if the number of divided nodes is 10, 45 edges are required, and if it is 100, 4950 edges are required. Since the number of adjacent nodes increases proportionally to twice the number of edges, the processing unit 14 does not necessarily have to connect the divided nodes, as shown in Figure 8. For this reason, if the number of divided nodes exceeds, for example, 10, and it is necessary to connect the divided nodes, it is desirable to use a star graph.

[0151] Figure 10 shows an example (3) of a graph network in Embodiment 2. The star graph shown in Figure 10 allows for the addition of nodes that do not have edge connections to anything other than the star graph, compared to the star graph shown in Figure 9. The node order of the node corresponding to the node token "B:10-4" is 1. For example, when representing a circuit with graph data, the node tokens "B:10", "B:10_1", "B:10_2", "B:10_3", and "B:10_4" are multi-terminal nodes representing "semiconductors". The node tokens "B:10_1", "B:10_2", "B:10_3", and "B:10_4" are terminal nodes representing "terminals". Of these, the node of the node token "B:10_4" is connected to an edge at only one end, so it can be an NC (Non-Connection) terminal.

[0152] When NC terminals are represented as shown in Figure 8, no edges are connected to the NC terminals, making it impossible to define adjacent nodes to the node of interest. Therefore, when converted to text data, only the node of interest is represented, making it impossible to determine which node the NC terminal is. In contrast, the graph natural language processing device 1 according to Embodiment 2 can identify nodes that have NC terminals and create text data that includes the NC terminals.

[0153] Figure 11 shows an example (4) of a graph network in Embodiment 2. The graph shown in Figure 11 is a graph in which edges are oriented from node token "C:100" to node tokens "B:10" and "A:1000" as shown in Figure 3. The edges between node tokens "B:10" and "B:1", and node tokens "A:1000" and "B:10" are bidirectional and have the same functionality as the undirected graph in Figure 3. In this case, the processing unit 14 in Embodiment 2 configures the node token of an adjacent node only when the node of interest is the source, which is the starting point of the signal, in the directed graph. For example, the node of interest is the source and the adjacent node is the sink. Note that for bidirectional edges that have the same functionality as undirected edges, the nodes connected to both ends of the edge can be considered as the source. For this reason, the processing unit 14 creates the following text data. A:1000 B:10 ::: B:1 B:10 ::: B:10 B:1 A:1000 ::: C:100 A:1000 B:10

[0154] Similarly, a node token for an adjacent node may be constructed only if the node of interest is the sink, which is the endpoint of the signal. For example, if the node of interest is the sink and the adjacent node is the source, the string will be as follows: A:1000 B:10 C:100 ::: B:1 B:10 ::: B:10 B:1 A:1000 C:100 ::: C:100

[0155] By utilizing the source-sink relationship in this way and changing whether or not node tokens are included in adjacent nodes, directed graphs can be handled. This allows both directed and undirected graphs to be represented in text. However, in graph generation based on natural language processing, adjacent nodes representing bidirectional edges are not always generated. Therefore, if it is known that a graph is undirected, adjacent nodes representing unidirectional edges can be considered bidirectional if they are generated.

[0156] Furthermore, depending on the dataset, an edge may be considered bidirectional only if adjacent nodes representing bidirectional edges are generated. However, in Embodiment 2, for undirected graphs, even if adjacent nodes representing one-sided edges are generated as described above, they are considered bidirectional edges. This has a particular effect when there are few bidirectional edges in datasets with directed graphs. For example, in Embodiments 1 and 2, the processing unit 14 creates strings with expressions that signify connections between the same nodes, twice each for the node of interest and adjacent nodes, regardless of the type of graph. This results in redundant expressions. In contrast, for unidirectional edges, a directional edge can be defined with a single generation, thus avoiding redundant expressions. Thus, this has a particular effect when there are few bidirectional edges. However, if it is known from the characteristics of the graph data that bidirectional edges make up the majority, processing the graph as undirected edges even with a single output can improve generation efficiency and generate graphs with fewer anomalies using natural language processing. Handling graphs in this way with natural language processing makes it easier to adjust to the dataset compared to graph neural networks.

[0157] Figure 12 shows an example of a graph network for directional nodes in Embodiment 2. For example, when representing a circuit with graph data, the nodes shown in Figure 12 are directional nodes corresponding to diodes. A diode has an anode and a cathode, and can pass a signal from the anode to the cathode with a forward bias characteristic, and can pass a signal from the cathode to the anode with a reverse bias characteristic. However, unlike circuit components that do not have a direction, such as resistors, the forward bias characteristic and the reverse bias characteristic are asymmetric with respect to voltage, and the output result will differ depending on the direction of the input signal.

[0158] Nodes that have characteristics asymmetric with respect to direction are called directional nodes. In Embodiment 2, directional nodes are converted so that they can be treated as an undirected graph. If it is an undirected graph, Embodiments 1 and 2 can be used as is. A directional node has two pieces of information in one node. Therefore, the processing unit 14 divides the directional node into two nodes connected in series and assigns to each of the divided nodes information that is different in at least one of either the node type or the node attribute. If either the node type or the node attribute is different, it becomes a different node token, and thus has the effect of being able to be processed as different information. Note that it is sufficient for them to be converted into different node tokens, so it is also acceptable for both the node type and node attribute to be different, or for the number of node types and node attributes to be different. Alternatively, the processing unit 14 may divide the nodes at both ends of a directional edge into two nodes and assign to each of the divided nodes information that is different in at least one of either the node type or the node attribute. In a graph neural network that can process a graph network with directionality, if direction is defined, signals do not flow in the reverse direction, and reverse bias cannot be handled. In contrast, in graph natural language processing device 1, the direction depends solely on the node token. That is, in natural language processing within graph natural language processing, the direction is determined by the training data, so both forward and reverse directions can be handled. Furthermore, even for nodes with asymmetrical orientations, the asymmetry is learned based on the data, so asymmetrical directional nodes can be handled simply by splitting them into two nodes, which is a special effect not found in conventional graph processing, including graph neural networks.

[0159] In Figure 12, the processing unit 14 divides node token A into node token A: Sink and node token B: Source, and connects node token A: Sink and node token B: Source with an edge. Furthermore, the processing unit 14 connects the edge that was connected to one end of node token A to node token A: Sink, and connects the edge that was connected to the other end of node token A to node token B: Source.

[0160] As a result, the relationship between the node token of interest and the node tokens of neighboring nodes between node token A: Sink and node token B: Source is "A: Sink ::: B: Source". In natural language processing, when "A: Sink ::: B: Source" is output, it is processed as having directionality from sink to source. In order to process directional nodes in a graph neural network, it is necessary to restrict the direction of edges by using a directed graph that can process directed edges.

[0161] Therefore, the graph natural language processing device 1 can treat directed nodes as a combination of undirected nodes. By changing the types of divided nodes "A" and "B", a directional node can be converted into two undirected nodes without any loss of information in natural language processing. The same effect can also be obtained by changing the node attributes while keeping the node type a common "A". Changing the node attributes can be done, for example, by separating them into Sink and Source, which means giving them node tokens "A: Sink" and "A: Source". Note that although the node attributes were separated into Sink and Source, they could also be assigned to, for example, 0 and 1.

[0162] Furthermore, when adding node attributes such as Sink and Source, it is desirable to also add node attributes to nodes other than the divided node. For example, by adding a node attribute such as "both" to represent bidirectionality to nodes other than the divided node, it is possible to make the number of elements in the node attributes of all nodes equal. For example, in order to handle directional nodes in a graph neural network, it is necessary to restrict the direction of edges in a directed graph that can process directed edges. In this way, even if the graph natural language processing device 1 divides a directed node into two nodes and treats it as an undirected graph, the node does not lose its directionality. Although we have used both, Sink, and Source in this explanation, for example, both could be set to 0, Sink to 1, and Source to 2.

[0163] Figure 13 shows an example of a graph network for directional edges in Embodiment 2. The example shown in Figure 13 shows a case where the relationship between citations and cited papers is represented using graph data. A node with information A cites a node with information B, and conversely, a node with information B is cited by a node representing information A. This relationship can be represented in the graph by directed edges pointing from a node with information A to a node with information B.

[0164] The graph natural language processing unit 1 processes a graph with directed edges as an undirected graph using node tokens. For example, it divides the nodes connected to both ends of a directed edge into two nodes, with one node acting as the sink and the other as the source. The processing unit 14 uses "A:Sink", "A:Source", "B:Sink", and "B:Source" as node tokens, connects the edges that were connected to the node with information A to "A:Sink", and connects the edges that were connected to the node with information B to "B:Source".

[0165] Furthermore, the node with information A and the node with information B, which were directed edges, are connected by undirected edges, "A: Source" and "B: Sink". Because the previously separated nodes are connected by edges, the text will look like this: "A: Sink ::: A: Source A: Source ::: A: Sink B: Sink B: Sink ::: A: Source B: Source B: Source ::: B: Sink".

[0166] For example, in text generation, if the text contains the string "A: Source ::: A: Sink B: Sink", it is converted into a graph as a directed edge from "A: Source" to the node token "B: Sink", which has a different node type and whose node attribute is sink. As a result, even if the graph natural language processing device 1 treats the directed graph as an undirected graph, the edges can retain their directionality.

[0167] The method for converting a directed graph to an undirected graph, as explained using Figures 12 and 13, differs from the directed graph shown in Figure 11 in that it increases the number of nodes or tokens, making it effective when there are few unidirectional edges in the graph. In particular, in the example shown in Figure 12, there are two directed nodes, and in the example shown in Figure 13, one node becomes four nodes for each directed edge. As a result, applying this method to graphs containing many directed nodes and directed edges has the disadvantage of exponentially increasing the computational complexity.

[0168] On the other hand, most common datasets are undirected graphs, and even directed graphs have only a limited number of unidirectional edges or nodes with directionality. The graph natural language processing device 1 according to Embodiment 2 can treat these directed graph datasets as undirected graphs, which are the subject of ongoing research.

[0169] As described above, in the graph natural language processing device 1 according to Embodiment 2, the node of interest is used as the source and the adjacent nodes are used as the sink. This allows the graph natural language processing device 1 to represent a directed graph using node tokens.

[0170] In the graph natural language processing device 1 according to Embodiment 2, the node of interest is used as the sink, and the adjacent nodes are used as the source. This allows the graph natural language processing device 1 to represent a directed graph using node tokens. In this case, either relationship can be used as long as the source-sink relationship is common to all data in the dataset.

[0171] In the graph natural language processing device 1 according to Embodiment 2, the processing unit 14 divides a multi-terminal node connected to three or more edges into terminal nodes equal to the number of terminals, changes the ends of the edges connected to the multi-terminal node from the multi-terminal node to connections to each terminal node, and deletes multi-terminal nodes that are not connected to edges. By dividing a multi-terminal node into terminal nodes equal to the number of terminals, graph data can be converted into text data without losing terminal number information.

[0172] In the graph natural language processing device 1 according to Embodiment 2, the processing unit 14 divides a multi-terminal node connected to three or more edges into the same number of terminal nodes as the number of edges, changes the ends of the edges connected to the multi-terminal node from the multi-terminal node to connections to each terminal node, and deletes the multi-terminal node. By dividing a multi-terminal node into the same number of terminal nodes as the number of edges, graph data can be converted into text data without losing terminal number information.

[0173] In the graph natural language processing device 1 according to Embodiment 2, the processing unit 14 divides a multi-terminal node having three or more edges into terminal nodes equal to the number of terminals, changes the ends of the edges connected to the multi-terminal node from connections to the multi-terminal node to connections to each terminal node, and deletes the multi-terminal node. As a result, graph data can be converted into text data without losing terminal number information.

[0174] In the graph natural language processing device 1 according to Embodiment 2, the processing unit 14 provides one virtual node for each multi-terminal node and connects the terminal nodes via the virtual node. This makes it possible to convert graph data into text data without losing terminal number information.

[0175] In the graph natural language processing device 1 according to Embodiment 2, the processing unit 14 divides a directional node into two nodes and assigns information to each of the divided nodes that differs in at least one of either the node type or the node attribute. Nodes with directionality, such as diodes, can be processed using only an undirected graph.

[0176] In the graph natural language processing device 1 according to Embodiment 2, the processing unit 14 divides the nodes at both ends of a directional edge into two nodes, and assigns information to each of the divided nodes that differs in at least one of either the node type or the node attribute. This makes it possible to process directional nodes such as diodes using only an undirected graph.

[0177] Embodiment 3. Embodiments 1 and 2 do not define the order in which adjacent nodes are arranged, so even with the same graph, different strings may be produced depending on the order in which the node tokens of adjacent nodes are arranged. In contrast, the graph natural language processing device according to Embodiment 3 arranges the node tokens of adjacent nodes in lexicographical order. As a prerequisite, node tokens are created by combining them in the order of node type and node attribute, or node attribute and node type. The graph natural language processing device according to Embodiment 3 has the same components as the graph natural language processing device 1 shown in Figure 1, but the functions of each component are different as will be described later. The configuration of the graph natural language processing device according to Embodiment 3 will be described below with reference to Figure 1.

[0178] When there are multiple node types, when creating a node token, the node types must be described in the same order for all nodes in the graph. Nodes without a node type will be assigned a node type that indicates they have no node type and are empty, such as "None". When there are multiple node attributes, these node types must be described in the same order within the graph. For example, if the node types "Nationality" and "Gender" are defined as "Nationality_Gender", the order must not be changed to "Gender_Nationality". Similarly, the number or order of node attributes must be the same for all nodes.

[0179] Furthermore, nodes that do not have node attributes are assigned a node attribute to indicate that they do not have node attributes, for example, "None". Nodes indicating the "GND" of a circuit often do not have node attributes, but even without node attributes, if the node type is clear, the node can be identified according to its type, and it does not need to have node attributes. In addition, the same character is used as the delimiter between the node type and node attributes throughout the graph. These preconditions are common to the data used for learning or inference in natural language processing by the graph natural language processing device 1, and are common whether it is a single graph data set or multiple graph datasets.

[0180] Given the above preconditions, if we use ":" as the delimiter, with the first delimiter being a space " " and the second delimiter being a newline character "\n", the string will be as follows: A:1000 ::: B:10 C:100 B:1 ::: B:10 B:10 ::: B:1 A:1000 C:100 C:100 ::: A:1000 B:10

[0181] On the other hand, the graph natural language processing device 1 according to Embodiment 3 arranges the node tokens of neighboring nodes to the node of interest in order of node degree. For example, if the node degree of "A: 1000" is "2", the node degree of "B: 1" is "1", the node degree of "B: 10" is "3", and the node degree of "C: 100" is "2", the neighboring nodes to the node of interest are represented as follows: The neighboring nodes to the node of interest "A: 1000" are "B: 10 C: 100". The neighboring nodes to the node of interest "B: 10" are "A: 1000 C: 100 B: 1". The neighboring nodes to the node of interest "C: 100" are "B: 10 A: 1000". When these are arranged in order, it looks like this. A:1000 ::: B:10 C:100 B:1 ::: B:10 B:10 ::: A:1000 C:100 B:1 C:100 ::: B:10 A:1000

[0182] Furthermore, there may be multiple adjacent nodes with the same node degree, and it is possible that multiple strings can be created from a single graph. For this reason, data augmentation is necessary to include all such possibilities. The graph natural language processing device 1 according to Embodiment 3 does not perform such data augmentation and creates a string of node tokens by arranging adjacent nodes with the same node degree in lexicographical order so that only one string can be created from a single graph. The node degrees are as follows: "A: 1000" is 2, "B: 1" is 1, "B: 10" is 3, "C: 100" is 2, and "A: 1000" and "C: 100" are equal. The processing unit 14 compares the initial letters "A" and "C" of the target node "B:102" which has both adjacent nodes, and arranges them in the order "A:1000 C:100". If the initial letters are the same, it compares the subsequent characters and arranges them in alphabetical order. As a result, the text data created by the processing unit 14 is as follows: A:1000 ::: B:10 C:100 B:1 ::: B:10 B:10 ::: A:1000 C:100 B:1 C:100 ::: B:10 A:1000

[0183] In particular, nodes with higher node degrees tend to better represent the characteristics of the graph. Therefore, by arranging adjacent nodes in order of node degree, the graph will be generated from elements that are likely to represent the characteristics of the graph. This prevents data augmentation and improves generation efficiency.

[0184] As an indicator different from node degree, we will explain the centroid node. The centroid node is a single node selected from the nodes in the graph. The node tokens of adjacent nodes are arranged in order of distance from the centroid node, which is a single node in the graph data, to each node. Processing unit 14 extracts the node tokens or node IDs arranged in order of distance from the centroid node to each node, and arranges the adjacent nodes in distance order. In this way, depending on how the centroid node is selected, a unique string is created from a single graph, similar to node degree.

[0185] Furthermore, it is desirable that the same string be generated even when multiple graph data are provided. For this reason, for example, by making the centroid node the node with the highest node degree in a single graph, a unique string can be created from a single graph. Using Figure 3 as an example, if "A: 1000" is the centroid node, then "A: 1000" has a distance of "0", "B: 1" has a distance of "2", "B: 10" has a distance of "1", and "C: 100" has a distance of "1". Therefore, the processing unit 14 arranges the node tokens of adjacent nodes in the order A: 1000 → B: 10 → C: 100 → B: 1. Moreover, if the dataset consists of multiple graphs, it is desirable to select nodes that are common to all graphs so that graph natural language processing can be performed on all data under the same conditions.

[0186] The neighboring nodes of the node of interest "A:1000" are "B:10 C:100", the neighboring nodes of the node of interest "B:10" are "A:1000 C:100 B:1", and the neighboring nodes of the node of interest "C:100" are "A:1000 B:10". Processing unit 14 creates text data with these neighboring nodes arranged in this order. A:1000 ::: B:10 C:100 B:1 ::: B:10 B:10 ::: A:1000 C:100 B:1 C:100 ::: A:1000 B:10

[0187] However, similar to the case of node degree, there are many nodes that are the same distance from the centroid node. Therefore, by arranging the node tokens of adjacent nodes that are the same distance from the centroid node in lexicographical order, it is possible to create a unique string from a single graph. For example, if "A: 1000" is the centroid node, then "A: 1000" is at a distance of "0", "B: 1" is at a distance of "2", "B: 10" is at a distance of "1", and "C: 100" is at a distance of 1. Thus, the above string becomes as follows: A: 1000 ::: B: 10 C: 100 B: 1 ::: B: 10 B: 10 ::: A: 1000 B: 1 C: 100 C: 100 ::: A: 1000 B: 1

[0188] Unlike node degrees, the centroid node allows for the free selection of the starting node. Furthermore, the processing unit 14 converts the data into text according to the graph distance from the selected node, so for example, information that is likely to be characteristic of the graph can be attached to the centroid node. It also has the feature of being able to preferentially generate data around the nodes that are characteristic of the graph.

[0189] Furthermore, since the graph is constructed sequentially from the centroid node outwards, it becomes easier to represent the graph's characteristics. Ideally, the centroid node should be selected using domain knowledge to identify nodes that are likely to represent the graph's characteristics. However, if domain knowledge is unavailable or the graph lacks special features, it is preferable to designate the centroid node as the node with the highest node degree.

[0190] The node tokens of adjacent nodes corresponding to the node of interest, which has a terminal number, may be arranged in order of terminal number. Figure 14 shows an example (1) of a graph network in Embodiment 3. In addition, some nodes have a dataset that has terminal numbers like a circuit. As shown in Figure 14, for the node token "B:10", the terminal number connected to the edge between "C:100" is "1", the terminal number connected to the edge between "B:1" is "2", and the terminal number connected to the edge between "A:1000" is "3", then when arranged in order of terminal number for the node of interest "B:10", the string will be as follows: A:1000 ::: B:10 C:100 B:1 ::: B:10 B:10 ::: C:100 B:1 A:1000 C:100 ::: A:1000 B:10

[0191] The text may be an alphabetical arrangement of node tokens from adjacent nodes with the same node degree. In Figure 14, since one edge is connected to one terminal, a unique string can be created from a single graph. However, multiple edges can also be connected to a single terminal. In this case, similar to node degree or centroid nodes, a unique string can be created from a single graph by alphanumerically arranging the node tokens of adjacent nodes connected to edges with the same terminal number. In this way, by arranging adjacent nodes according to preconditions and alphanumerically arranging adjacent nodes with the same conditions, the same text can be created from edges connected to nodes whose ends have the same node tokens. Therefore, it becomes easier to create a unique text from a single graph.

[0192] Furthermore, if the order of adjacent nodes is not determined, data augmentation by rearranging the order becomes necessary. However, if there are M nodes and an average of N adjacent nodes to one node of interest, there are N × (N-1) / 2 possible arrangements of the node tokens of adjacent nodes for one node of interest. Since there are as many of these as there are nodes of interest, the number of possible arrangements is (N × (N-1) / 2). MThere are many possible combinations. For example, if there are 10 nodes and N is 3, approximately 3 to the power of 10 combinations, or 59,049 combinations of data augmentation, would be required. In contrast, the graph natural language processing device 1 according to Embodiment 3 can represent the data with a single text by defining the order of node tokens, thereby significantly reducing the computational load required for natural language processing.

[0193] Furthermore, arranging adjacent nodes based on node degree, distance from the centroid node, or terminal number has the effect of making it easier to create one text from one graph, but it also creates the constraint that only one text representation is allowed from one graph. Therefore, in order to relax the above constraint, the processing unit 14 augments the data by rearranging the order of adjacent nodes with the same node degree, rearranging the order of adjacent nodes with the same distance from the centroid node, or rearranging the order of adjacent nodes connected to the same terminal number. This is different from the data augmentation to resolve the inequality of node IDs shown in Embodiment 1. Also, the order of multiple adjacent nodes may be changed simultaneously in a single data augmentation, and this can be freely changed according to computational cost and memory amount.

[0194] Thus, while strong constraints that fix the order of adjacent nodes enable graph natural language processing, introducing data augmentation to weaken these overly strong constraints allows graph natural language processing to extract more features from a single graph.

[0195] In addition, graphs with edges where a node token node is connected to only one end can also be handled, and there are mainly two methods for doing so. The first is to remove edges that are not connected to a node token. That is, for edges where a node is connected to only one end, the node token of the adjacent node is not set. Figure 15 shows an example (2) of a graph network in Embodiment 3. As shown in Figure 15, since edges "ID: 1" and "ID: 4" are connected to a node at only one end, edges "ID: 1" and "ID: 4" are ignored, i.e., removed from the text data created by the processing unit 14. As a result, the text data will be as follows: This is effective when a single node or edge can be ignored in a large graph, and can reduce computational cost. A: 1000 ::: B: 10 B: 1 ::: B: 10 B: 10 ::: B: 1 A: 1000

[0196] The second method involves providing a node token to indicate an empty node for edges where a node token node is connected to only one end. Figure 16 shows an example (3) of a graph network in Embodiment 3. As shown in Figure 16, when an empty node is set to "None", the processing unit 14 creates the following text data. By expressing it in this way, information about edges that have a node token on only one end can be retained, and for example, the type of empty node and the node attributes can be inferred using graph natural language processing. A:1000 ::: B:10 None B:1 ::: B:10 B:10 ::: B:1 A:1000 None None ::: A:1000 B:10

[0197] However, since this increases computational costs, the processing unit 14 may choose one of the two methods described above depending on the characteristics of the data, the purpose of graph classification or graph generation, or graph optimization.

[0198] As described above, the graph natural language processing device 1 according to Embodiment 3 arranges the node tokens of adjacent nodes to the node of interest in order of node degree. This reduces the degree of freedom in the text representation of the graph while reducing the amount of data that is used to augment the data.

[0199] In the graph natural language processing device 1 according to Embodiment 3, the node tokens of adjacent nodes are arranged in order of the distance from the centroid node, which is one node in the graph data, to each node. This reduces the degree of freedom in the text representation of the graph while reducing the amount of data that needs to be augmented.

[0200] In the graph natural language processing device 1 according to Embodiment 3, the centroid node is the node with the highest node degree. This reduces the degree of freedom in the text representation of the graph while reducing the amount of data that is used to augment the data.

[0201] The graph natural language processing device 1 according to Embodiment 3 arranges the node tokens of adjacent nodes corresponding to the node of interest which has a terminal number, in order of terminal number. This reduces the degree of freedom in the text representation of the graph while reducing the amount of data that is augmented.

[0202] In the graph natural language processing device 1 according to Embodiment 3, node tokens of adjacent nodes with the same node degree are arranged in lexicographical order. This reduces the degree of freedom in the text representation of the graph while reducing the amount of data that is used to augment the data.

[0203] In the graph natural language processing device 1 according to Embodiment 3, node tokens of adjacent nodes that are the same distance from the centroid node are arranged in lexicographical order. This reduces the degree of freedom in the text representation of the graph while reducing the amount of data that is used to augment the data.

[0204] In the graph natural language processing device 1 according to Embodiment 3, node tokens of adjacent nodes with the same terminal number are arranged in alphabetical order. This reduces the degree of freedom in the text representation of the graph while reducing the amount of data that is used to augment the data.

[0205] In the graph natural language processing device 1 according to Embodiment 3, the processing unit 14 augments data by rearranging the order of adjacent nodes that are the same distance from the centroid node. This augments data to prevent excessive reduction in the degree of freedom of the graph's text representation and improves the degree of freedom of the graph's representation.

[0206] In the graph natural language processing device 1 according to Embodiment 3, the processing unit 14 augments data by rearranging the order of adjacent nodes with the same terminal number. This augments data to prevent excessive reduction in the degree of freedom of the graph's text representation, thereby improving the degree of freedom of the graph's representation.

[0207] In the graph natural language processing device 1 according to Embodiment 3, node tokens for adjacent nodes are not set at edges where nodes are connected to only one end. This reduces the possibility of generating abnormal graphs and improves the efficiency of graph generation.

[0208] In the graph natural language processing device 1 according to Embodiment 3, a node token representing an empty node is set at the adjacent node in an edge where a node is connected to only one end. As a result, the graph natural language processing device 1 can create a node token even if no node is connected to either end of the edge.

[0209] Embodiment 4. In Embodiment 3, since the order of the nodes of interest is not defined, even with the same graph having the same node tokens, different text may be output depending on the arrangement of the nodes of interest. In contrast, the graph natural language processing device according to Embodiment 4 defines the order in which the nodes of interest are arranged. The graph natural language processing device according to Embodiment 4 has the same components as the graph natural language processing device 1 shown in Figure 1, but the functions of each component are different as will be described later. The configuration of the graph natural language processing device according to Embodiment 4 will be described below using Figure 1. Embodiment 4 will explain how to determine the order of the nodes of interest. There are three main ways to determine the order.

[0210] (Method of determining the order (1)) The first method is to define the maximum node degree as the greater of the node degrees of the node of interest or adjacent nodes for the node of interest, and then arrange the node tokens of the node of interest in order of maximum node degree. For example, in Figure 3, the node degrees are 2 for node token "A: 1000", 2 for node token "C: 100", 1 for node token "B: 1", and 3 for node token "B: 10". All nodes are connected to node token "B: 10", which corresponds to the node with the maximum node degree. Therefore, the node degree of the node of interest or adjacent nodes is common to node token "B: 10", and the order of the node of interest is not changed. In this way, in graphs where the maximum node degree is the same, the order of the node of interest is arbitrary. For this reason, a massive amount of data augmentation is required to eliminate the inequality caused by artificially assigning the order.

[0211] Therefore, the processing unit 14 arranges the node tokens of the node of interest in alphabetical order in a graph where the maximum node order is equal. As a result, the order of the node tokens of the node of interest becomes "A: 1000" → "B: 1" → "B: 10" → "C: 100". Therefore, the text data created by the processing unit 14 will be as follows. For clarity, the newline character "\n" is used as the second delimiter. A: 1000 ::: B: 10 C: 100 B: 1 ::: B: 10 B: 10 ::: B: 1 A: 1000 C: 100 C: 100 ::: A: 1000 B: 10

[0212] Node tokens can be directly arranged alphabetically without considering the order of the highest node degree. However, when considering graph features, nodes with higher node degrees often represent the graph's features. In particular, as an example of generating text representing a graph based on natural language processing, a portion of the graph is input into a natural language processing unit to predict the entire graph. In this case, the portion of the graph to be input is often one with a high node degree. This is because nodes with low node degrees do not easily represent the graph's features. For example, when considering a graph that constitutes a molecular structure, the node representing a hydrogen atom has a node degree of 1, but even if two nodes are combined to form a hydrogen molecule, it does not easily represent the graph's features.

[0213] On the other hand, by prioritizing input of structures that combine nodes representing carbon molecules with high node orders, the nodes representing carbon molecules tend to exhibit the characteristics of the graph more easily, making it easier to obtain the expected output. For these reasons, converting graphs to text based on the maximum node order has a special effect.

[0214] The graph natural language processing device 1 according to Embodiment 4 can create only one complete text from a single graph by combining the method of arranging the node tokens of adjacent nodes described in Embodiment 3 with the method of determining the order (1). Furthermore, if there is sufficient time for natural language processing training, training cost, or computational resources required for training, data augmentation may be performed to enhance the expressiveness of the graph. Specifically, while it has been explained that one complete text is created from a single graph by rearranging the nodes of interest with the same maximum node degree in lexicographical order, data augmentation may also be performed by creating multiple texts by rearranging the order of the node tokens of the nodes of interest with the same maximum node degree.

[0215] Furthermore, if all nodes are connected to node "B:10," which has the highest node degree, the four nodes of interest can be freely arranged, allowing for the generation of 4 factorial combinations (4! = 24 combinations) of text. However, unlike data augmentation to eliminate inequality caused by the artificial assignment of node IDs, data augmentation by rearranging the order of nodes of interest is a data augmentation to enhance the expressiveness of a single graph. Therefore, processing unit 14 can output text with the rows of two or more nodes of interest rearranged simultaneously without causing inequality, and thus has the effect of being able to be modified according to computing resources.

[0216] (Method of determining the order (2)) The second method is to extract the sum of the node degrees of the adjacent nodes for the node of interest, and then arrange the node tokens of the node of interest in order of the sum of the node degrees. In the example shown in Figure 3, the node degrees are 2 for node token "A: 1000", 1 for node token "B: 1", 3 for node token "B: 10", and 2 for node token "C: 100". Therefore, the sum of the node degrees for the node of interest "A: 1000" is the sum of the node degree of "B: 10", which is 3, and the node degree of "C: 100", which is 2, resulting in 5. For "B: 1", the node degree is 3, which is "B: 10". For "B: 10", the node degree is 1, which is "B: 1", which is "A: 1000", which is "A: 1000", which is "C: 100", which is "C: 100", resulting in 5. "C:100" is the sum of the node degree of "A:1000" (2) and the node degree of "B:10" (3), which is 5. Therefore, the processing unit 14 creates text data by arranging the node tokens of the node of interest in order of the sum of their node degrees: "B:10" → "A:1000" → "C:100" → "B:1". The text data created by the processing unit 14 is as follows: B:10 ::: B:1 A:1000 C:100 A:1000 ::: B:10 C:100 C:100 ::: A:1000 B:10 B:1 ::: B:10

[0217] Arranging the node tokens of the node of interest in order of the sum of their node degrees is equivalent to arranging them in order of highest node degree, starting with the nodes that best represent the characteristics of the graph. Therefore, when combined with natural language processing, it becomes easier to obtain the expected output.

[0218] The processing unit 14 may also sort the node tokens of the nodes of interest whose sum of node degrees is the same into lexicographical order. For example, “A: 1000”, “B: 10”, and “C: 100” all have a sum of node degrees of 5, so the processing unit 14 sorts these node tokens into lexicographical order. This results in the order “A: 1000” → “B: 10” → “C: 100” → “B: 1”. As a result, the text data created by the processing unit 14 will be as follows: A: 1000 ::: B: 10 C: 100 B: 10 ::: B: 1 A: 1000 C: 100 C: 100 ::: A: 1000 B: 10 B: 1 ::: B: 10

[0219] The graph natural language processing device 1 according to Embodiment 4 can create only one complete text from a single graph by combining the method of arranging node tokens of adjacent nodes described in Embodiment 3 with the method of determining the order (2). Furthermore, if there is sufficient time for natural language processing training, training cost, or computational resources required for training, data augmentation may be performed to enhance the expressiveness of the graph. Specifically, while it has been explained that one complete text can be created from a single graph by rearranging the node tokens of focus nodes whose sum of node degrees is the same in lexicographical order, data augmentation may also be performed by creating multiple texts by rearranging the order of focus nodes whose sum of node degrees is the same. For example, the sum of node degrees is 5 for focus node "A: 1000", 3 for "B: 1", 5 for "B: 10", and 5 for "C: 100". Therefore, the sum of node degrees is the same for each node "A: 1000", "B: 10", and "C: 100". Since the three nodes of interest can be arranged freely, it is possible to generate text in three factorial ways (3! ways = 6 ways).

[0220] However, unlike data augmentation aimed at eliminating inequality caused by the artificial assignment of node IDs, data augmentation by rearranging the order of the nodes of interest is aimed at enhancing the expressive power of a single graph. For this reason, the processing unit 14 may output text with the rows of two or more nodes of interest rearranged simultaneously.

[0221] (Method of determining the order (3)) The third method is to select one node from among the nodes included in the graph network as the centroid node, and arrange the node tokens of the nodes of interest in order of distance from the centroid node to each node. In the example shown in Figure 3, if "A: 1000" is the centroid node, the distance to "A: 1000" is 0, the distance to "B: 1" is 2, the distance to "B: 10" is 1, and the distance to "C: 100" is 1. Therefore, the processing unit 14 arranges the nodes of interest in the order of "A: 1000" → "B: 10" → "C: 100" → "B: 1". As a result, the processing unit 14 creates text data as shown below. A:1000 ::: B:10 C:100 B:10 ::: B:1 A:1000 C:100 B:1 ::: B:10 C:100 ::: A:1000 B:10

[0222] The processing unit 14 may also arrange the node tokens of the nodes of interest that are the same distance from the centroid node in lexicographical order. For example, the processing unit 14 may arrange the nodes of interest in lexicographical order, in the order of "B:10" → "C:100", because the distance to "B:10" is 1 and the distance to "C:100" is 1, and the distances are equal. In the above example, the nodes are arranged in this order, so there is no change in the string.

[0223] The graph natural language processing device 1 according to Embodiment 4 can create only one set of text from a single graph by combining the method of arranging node tokens of adjacent nodes described in Embodiment 3 with the method of determining the order (3). In particular, when using centroid nodes, the node that will be the centroid can be freely determined according to the dataset. For example, by using domain knowledge to select a node that easily represents the features of the graph, it is possible to generate text that represents the expected graph with less text input than the method of determining the order (1) or the method of determining the order (2). Specifically, it has been explained that one set of text can be created from a single graph by rearranging the node tokens of the node of interest that are the same distance from the centroid node in lexicographical order, but instead of rearranging in lexicographical order, data augmentation may be performed by creating multiple texts in which the order of the node of interest that is the same distance from the centroid node is rearranged.

[0224] The processing unit 14 may create a string with two or more node tokens changed. Alternatively, the processing unit 14 may create a string with two or more node tokens swapped. For example, if "A: 1000" is the centroid node, the distance to "A: 1000" is 0, the distance to "B: 1" is 2, the distance to "B: 10" is 1, and the distance to "C: 100" is 1. Therefore, two nodes of interest can be freely arranged. For this reason, the processing unit 14 can create the following two types of text, A and B. However, unlike data augmentation to eliminate inequality caused by the artificial assignment of node IDs, data augmentation by swapping the order of nodes of interest is data augmentation to enhance the expressiveness of a single graph. For this reason, the processing unit 14 may output text with the rows of two or more nodes of interest swapped at the same time. (Text A) A: 1000 ::: B: 10 C: 100 B: 1 ::: B: 10 B: 10 ::: A: 1000 C: 100 B: 1 C: 100 ::: A: 1000 B: 10 (Text B) A: 1000 ::: B: 10 C: 100 B: 1 ::: B: 10 C: 100 ::: A: 1000 B: 10 B: 10 ::: A: 1000 C: 100 B: 1

[0225] As described above, in the graph natural language processing device 1 according to Embodiment 4, the processing unit 14 arranges the node tokens of the node of interest in order of the highest node degree. This reduces the amount of data used for data augmentation while decreasing the degree of freedom in the text representation of the graph.

[0226] In the graph natural language processing device 1 according to Embodiment 4, the processing unit 14 arranges the node tokens of the node of interest in order of the sum of the node degrees of adjacent nodes. This reduces the amount of data used for data augmentation while decreasing the degree of freedom in the text representation of the graph.

[0227] In the graph natural language processing device 1 according to Embodiment 4, the processing unit 14 arranges the node tokens of the node of interest in order of distance from the centroid node, which is one node in the graph data, to each node. This reduces the amount of data augmentation while decreasing the degree of freedom in the text representation of the graph.

[0228] In the graph natural language processing device 1 according to Embodiment 4, the processing unit 14 arranges the node tokens of the nodes of interest with the same maximum node degree in lexicographical order. This reduces the amount of data used for data augmentation while decreasing the degree of freedom in the text representation of the graph.

[0229] In the graph natural language processing device 1 according to Embodiment 4, the processing unit 14 arranges the node tokens of the nodes of interest whose sum of node degrees is equal in lexicographical order. This reduces the amount of data used for data augmentation while decreasing the degree of freedom in the text representation of the graph.

[0230] In the graph natural language processing device 1 according to Embodiment 4, the processing unit 14 arranges the node tokens of the nodes of interest that are the same distance from the centroid node in alphabetical order. This reduces the amount of data used to augment the data while decreasing the degree of freedom in the text representation of the graph.

[0231] In the graph natural language processing device 1 according to Embodiment 4, the processing unit 14 augments data by rearranging the order of nodes of interest that have the same maximum node degree. This reduces the amount of data augmented while decreasing the degree of freedom of the text representation of the graph.

[0232] In the graph natural language processing device 1 according to Embodiment 4, the processing unit 14 augments data by rearranging the order of nodes of interest whose sum of node degrees is equal. This reduces the amount of data augmented while decreasing the degree of freedom of the text representation of the graph.

[0233] In the graph natural language processing device 1 according to Embodiment 4, the processing unit 14 augments data by rearranging the order of nodes of interest that are equal in distance from the centroid node. This reduces the amount of data augmented while decreasing the degree of freedom in the text representation of the graph.

[0234] In the graph natural language processing device 1 according to Embodiment 4, the processing unit 14 creates a string by changing two or more node tokens. This allows many features to be extracted from a single graph data, while preventing an increase in the amount of text used for training due to data augmentation necessary to extract many features, and enabling natural language processing to be trained with low computational cost.

[0235] In the graph natural language processing device 1 according to Embodiment 4, the processing unit 14 creates a string by swapping two or more node tokens. This allows many features to be extracted from a single graph data, prevents an increase in the amount of text used for training due to data augmentation necessary to extract many features, and enables natural language processing to be trained with low computational cost.

[0236] Embodiment 5. The graph natural language processing device according to Embodiment 5 improves the degree of freedom of graph representation that was reduced by node tokens. The graph natural language processing device according to Embodiment 5 has the same components as the graph natural language processing device 1 shown in Figure 1, but the functions of each component are different as will be described later. The configuration of the graph natural language processing device according to Embodiment 5 will be described below with reference to Figure 1.

[0237] Graph data is less numerous than images or natural language data, and it is necessary to extract many features from a single graph data set. Therefore, Embodiment 3 demonstrates data augmentation by changing the order of adjacent nodes, and Embodiment 4 demonstrates data augmentation by changing the order of the node of interest. However, because node tokens are formed by combining node types and node attributes, elements other than the node attributes combined with the node type do not appear. This is a disadvantage that reduces the degree of freedom compared to when elements that can become node attributes for node types are generated by natural language processing if they are not combined as node tokens.

[0238] Therefore, the graph natural language processing device 1 according to Embodiment 5 describes a method for improving the degree of freedom of graph representation that has been reduced by node tokens. One method is to augment the data with node tokens whose node attributes have been changed. For example, the string representing the graph shown in Figure 3 as text is as follows: B:10 ::: B:1 A:1000 C:100 A:1000 ::: B:10 C:100 B:1 ::: B:10 C:100 ::: A:1000 B:10

[0239] For example, considering a node attribute "A:100" that is different from the node token "A:1000", the processing unit 14 creates a new string like the following by replacing "A:1000" with "A:100": A:100 ::: B:10 C:100 B:1 ::: B:10 B:10 ::: B:1 A:100 C:100 C:100 ::: A:100 B:10

[0240] Furthermore, if there is also "B:3" in addition to "B:1" and "B:10", the processing unit 14 will replace "B:1" with "B:3" to create the following new string text data: A:100 ::: B:10 C:100 B:3 ::: B:10 B:10 ::: B:3 A:100 C:100 C:100 ::: A:100 B:10

[0241] The new string shown above is created by replacing "A:1000" with "A:100" and "B:1" with "B:3". Unlike data augmentation aimed at eliminating inequality through node ID assignment, this is data augmentation aimed at improving the expressiveness of the graph, so it is acceptable to create a string with two or more node tokens changed simultaneously.

[0242] Furthermore, while data augmentation to eliminate inequality represents the same graph, the data augmentation in Embodiment 5 differs in that it creates text representing different graphs. However, changing node attributes requires domain knowledge, and it is necessary to use appropriate node attributes for the node type and to make changes according to the characteristics of the graph. For example, if the node type is set to "car" and the node attribute is set to "average speed," even for the same car, the average speed when driving on an ordinary road is different from the average speed when driving on a highway. Therefore, the range of possible node attributes differs between a graph representing an ordinary road and a graph representing high speed. For this reason, it is necessary to change the node attributes to match the characteristics of the graph.

[0243] Therefore, nodes with the same node type but different node attributes within the same graph are used. In the example above, node tokens "B:1" and "B:10" have the same node type but different node attributes. At this time, the processing unit 14 creates the following strings: (1) obtained by replacing "B:1" with "B:10", (2) obtained by replacing "B:10" with "B:1", or (3) obtained by replacing "B:1" with "B:10" and "B:10" with "B:1". These strings (1) to (3) are used to augment the data as new strings. (String (1)) B:10 ::: B:10 A:1000 C:100 A:1000 ::: B:10 C:100 B:10 ::: B:10 C:100 ::: A:1000 B:10 (String (2)) B:1 ::: B:1 A:1000 C:100 A:1000 ::: B:1 C:100 B:1 ::: B:1 C:100 ::: A:1000 B:10 (String (3)) B:10 ::: B:10 A:1000 C:100 A:1000 ::: B:1 C:100 B:10 ::: B:1 C:100 ::: A:1000 B:1

[0244] Typically, graph information, unlike images or natural language, tends to overfit due to its small data size. To address this, the processing unit 14 may augment the data by using node tokens that swap node attributes in nodes of the same type but with different node attributes. For example, augmenting node attributes increases the range of values ​​that a node attribute can take in relation to surrounding nodes, thereby improving the freedom of text representation even with small graph data. However, defining the range of possible values ​​for a node attribute requires not only domain knowledge but also consideration of the entire graph data, making it difficult to accurately define the range of possible values ​​for a node attribute. For example, if the node type is set to "car" and the node attribute is set to "car speed," it is not always correct to assume that the node attribute can take values ​​between 30 km / h and 60 km / h. Therefore, it is desirable to impose constraints on the range of node attributes.

[0245] Furthermore, the processing unit 14 may extract nodes already included in the graph data that are of the same node type, have the same node degree, and have different node attributes, and perform data augmentation with node tokens obtained by swapping these different node attributes. For example, in a dataset representing a highway, a node for a congested car can be represented by a node with a node degree of 4 because there are cars in front, behind, and to the left and right, while a node for a car that is not congested will have a node degree of 1 or 2 because there are cars in front and behind, or cars are sparsely distributed in front and behind. In this way, similar node attributes can be extracted depending on the environment, and by performing data augmentation using these different node attributes, the creation of abnormal node tokens can be greatly reduced.

[0246] Furthermore, the processing unit 14 may augment the data not only by using the node type or node order, but also by using node attributes of nodes that are identical or similar to the environment in which the target node is located, such as the characteristics of the entire graph, the types of surrounding nodes, and the attributes of surrounding nodes, depending on the dataset. Here, the characteristics of the entire graph are, for example, characteristics that indicate whether the graph represents the traffic situation on a highway or a general road. The types of surrounding nodes are information such as whether the surrounding area consists only of nodes representing cars, or whether there are nodes representing people or bicycles in the surrounding area. The attributes of surrounding nodes are information such as whether the speed of the surrounding cars is 30 km / h or 100 km / h.

[0247] As described above, in the graph natural language processing device 1 according to Embodiment 5, the processing unit 14 augments the data with node tokens whose node attributes have been modified. This makes it possible to augment the data even if the data tends to be relatively small in the graph network.

[0248] In the graph natural language processing device 1 according to Embodiment 5, the processing unit 14 augments data using node tokens obtained by swapping node attributes in nodes of the same node type but with different node attributes. This makes it possible to augment data even for data that tends to be relatively small in a graph network.

[0249] In the graph natural language processing apparatus 1 according to Embodiment 5, the processing unit 14 duplicates data with node tokens in which node attributes in nodes having the same node type, the same node degree, and different node attributes are swapped. As a result, even data that tends to be relatively scarce in the graph network can be duplicated.

[0250] Embodiment 6. The graph natural language processing apparatus according to Embodiment 6 is obtained by applying a graph network to a circuit. Note that the graph natural language processing apparatus according to Embodiment 6 includes the same components as the graph natural language processing apparatus 1 shown in FIG. 1, but the functions of each component are different as will be described later. Hereinafter, the configuration of the graph natural language processing apparatus according to Embodiment 6 will be described with reference to FIG. 1.

[0251] The graph network relates to a circuit, the node type is the type of circuit component, and the node attribute may include a circuit constant or a model number of the circuit. FIG. 17 is a circuit diagram showing an equivalent circuit of the circuit to be processed in Embodiment 6. The circuit shown in FIG. 17 has a model number of "LTM805a" and shows a semiconductor having six terminals from X 1-1 to X 1-6 An AC power supply V is connected to the terminal X 1-1 1 of this semiconductor, and a capacitor C having a capacitance of 1 μF is connected in parallel with the AC power supply V 1 1 Further, the terminals X 1-2 and X 1-3 of the semiconductor are short-circuited. A cathode terminal of a diode D having a model number of "1N914" is connected to the terminal X 1-4 1 The terminal X 1-5 is a feedback terminal, and is connected to the cathode terminal of the diode D 1 , a capacitor C having a capacitance of 1 μF, and a resistor R having a resistance value of 10 Ω 2 1 A ground is connected to the terminal X 1-6

[0252] Figure 18 shows an example (1) of a graph network in Embodiment 6, and shows a graph of the circuit in Figure 17 with circuit components as nodes and wiring as edges. If the graph shown in Figure 18 is represented using node tokens of the node of interest and adjacent nodes, it will be represented as the following string. Note that each node uses a node token created by the processing unit 14 in Embodiment 1. V:::X:LTM805a X:LTM805a C:1u C:1u C:1u R:10 X:LTM805a:::V V D:1N914:::X:LTM805a X:LTM805a C:1u R:10 C:1u:::V V X:LTM805a X:LTM805a C:1u R:10 C:1u:::V R: 10 D: 1N914 R:10:::X:LTM805a X:LTM805a C:1u C:1u V D:1N914

[0253] However, because connections are made via ground wiring, edges often have multiple edges, and if the number of circuit components connected to ground is N, then there will be N × (N-1) node tokens for adjacent nodes. As a result, in large-scale circuits, there is a problem in that the string of text data created by the processing unit 14 becomes large.

[0254] Therefore, the processing unit 14 uses circuit components and ground as nodes, and wiring excluding ground as edges. Figure 19 is a diagram showing an example (2) of a graph network in Embodiment 6, and shows a graph representation with ground as a node. In Figure 19, although the number of nodes of interest increases by one, if there are N circuit components connected to ground, the increase in adjacent nodes is 2 × N, so the increase in the string is suppressed.

[0255] For example, when dividing ground nodes into frame ground FG and signal ground SG, the node attribute of frame ground FG is set to "0" and the node attribute of signal ground SG is set to "1". The processing unit 14 represents the node token of frame ground FG as the string "GND:0" and the node token of signal ground SG as the string "GND:1". This makes it possible to represent circuits using different ground nodes with node tokens.

[0256] Grounds are connected by wiring or board structures constrained by physical dimensions such as capacitors or resistors, coils, residual inductance, or parasitic capacitance. Grounds are also connected to a metal enclosure or earth. Grounds may also be nodes accessed via circuit components or parasitic elements. When separating grounds, the aforementioned wiring or board structures must be considered.

[0257] In Figure 18, AC power supply V 1 It does not have node attributes. However, if the power supply is a DC power supply, the DC voltage or maximum rated current can be set as the node attribute. If it is an AC power supply, the voltage amplitude, frequency, or maximum rated current may be set as the node attribute.

[0258] Furthermore, in the case of a power supply having both DC and AC components, the two can be separated by representing the node type as a DC power supply (e.g., VDC) and an AC power supply (e.g., VAC). However, for multiple datasets representing special power supplies, such as an AC power supply with a DC bias, both DC and AC power supplies may be included as node attributes. For example, strings representing the amplitude of a DC power supply and the amplitude of an AC power supply can be connected with a comma. This allows a DC power supply to be represented by a node token with the string "V: 1V, 0V", and an AC power supply to be represented by a node token with the string "V: 0V, 1V". An AC power supply with a DC bias can be represented by a node token with the string "V: 1V, 1V".

[0259] If it can be represented as a node token in this way, it doesn't matter whether it's represented as a node type or a node attribute. This utilizes a feature of natural language processing that allows different characters (node ​​tokens) to be processed as having different characteristics.

[0260] In conventional graph neural networks, the results obtained differ significantly depending on whether nodes are treated as node types or node attributes. Therefore, adjustments are necessary for each dataset. However, using graphs in natural language processing eliminates this need for adjustments.

[0261] Furthermore, in the circuit shown in Figure 17, there are two node tokens with the string "C:1u". Using the node ID, each capacitor is C 1 , C 2 It is possible to have the natural language processing unit recognize them as different circuit components. However, if you swap them as in Embodiment 1, "C 1 ", "C 2 " to "C 2 ", "C 1 The text also needs to be created by augmenting the data.

[0262] In contrast, in Embodiment 6, even if "C:1u" exists, characteristics close to a single (unique) node ID can be obtained from the string "C:1u" itself, based on its relationship with the surrounding nodes. Therefore, natural language processing is possible without data augmentation.

[0263] In the graph shown in Figure 19, the node of interest with the string "X:LTM805a" representing the semiconductor has a self-loop, and the node tokens of the nodes at both ends of this self-loop are the string "X:LTM805a". Therefore, the node token of the node of interest is the semiconductor "X:LTM805a", and the node token of the adjacent node is also X:LTM805a. Based on this, the processing unit 14 creates the following text data. V:::X:LTM805a C:1u GND C:1u:::V X:LTM805a GND X:LTM805a:::V X:LTM805a C:1u D:1N914 D:1N914 C:1u R:10 GND D: 1N914:::X:LTM805a X:LTM805a C: 1u R: 10 C: 1u:::X:LTM805a R: 10 D: 1N914 GND R: 10::: C:1u C:1u R:10

[0264] By expressing it in this way, "C:1u" itself can be defined not by being a single entity, but by its relationship with adjacent node tokens. Also, "C:1u-GND C:1u-GND" indicates that two capacitors with a capacitance of 1μF are connected to a node token that represents a ground node. In this way, it is possible to express the presence of two capacitors without using a node ID.

[0265] However, since the connection between ground nodes and neighboring nodes is trivial, ground nodes do not necessarily have to be designated as nodes of interest. In this case, node tokens other than ground nodes can be designated as nodes of interest. That is, the graph in Figure 17 can be represented as a string as follows. V:::X:LTM805a C:1u GND C:1u:::V X:LTM805a GND X:LTM805a:::V X:LTM805a C:1u D:1N914 D:1N914 C:1u R:10 GND D: 1N914:::X:LTM805a X:LTM805a C: 1u R: 10 C: 1u:::X:LTM805a R: 10 D: 1N914 GND R: 10:::

[0266] As shown in Embodiment 4, graphs often suffer from overfitting because sufficient graph data necessary for training cannot be prepared. For example, while tens of thousands to tens of millions of data points can be easily obtained for images or photographs, natural language processing can use several petabytes of data for training, whereas graph data can only yield tens of thousands of data points at most, or even just a few in some cases. Furthermore, for example, social networks or road traffic networks require training using only one large graph network based on graph network data. Therefore, compared to images or natural language, it is necessary to extract many features from a single data point.

[0267] Therefore, in Embodiment 6, domain knowledge is used to augment the graph data. This augmentation is not done to eliminate the inequality caused by the assignment of node IDs, but rather to make it easier to extract features from the graph data. For this reason, it is acceptable to create text data in which the order of node tokens of adjacent nodes and the node of interest is different.

[0268] Generally, changing the node type is likely to cause the circuit to malfunction, so changing node attributes is less likely to cause the circuit to function. Specifically, changing the node attributes related to the passive components of the circuit makes it less likely for abnormal circuits to be generated through data inflation. For example, changing the capacitance of a capacitor connected in parallel with a DC power supply from 1 μF to 33 μF has little effect on the normal operation of the circuit, so data inflation is possible.

[0269] Furthermore, data inflation is possible not only for passive components with circuit constants, but also for components other than those with constants. Replacing a diode with a model number with another diode of the same type, or replacing a capacitor with a similar voltage rating or frequency characteristics with a model number, makes it difficult to create an abnormal circuit, thus allowing for data inflation. This is also true for circuit components other than diodes or capacitors, such as resistors or coils.

[0270] Furthermore, although domain knowledge is required, in the case of power supply circuits, it is possible to change the boost or buck inductor, and in some cases, it is desirable to replace active components with similar active components. In particular, from the perspective of component procurement, semiconductors with identical terminal arrangements and similar characteristics are often manufactured by different manufacturers. For this reason, it is possible to inflate data for components such as semiconductors.

[0271] In addition to changing node attributes, parasitic components such as residual resistance, residual inductance, and parasitic capacitance may be added to individual circuit components by adding nodes and edges that connect those nodes to other nodes. Specifically, for example, a resistor may have a residual inductance component in series with its resistance value and a parasitic capacitance component in parallel with its resistance value. The processing unit 14 can augment the data by adding a node token representing residual inductance in series with the node token representing resistance, and by adding a node token representing parasitic capacitance in parallel with the node token representing the resistance node. In this way, even if parasitic components are added, the circuit will not become an abnormal circuit because it is based on the actual characteristics of the circuit components, making it a desirable method of data augmentation.

[0272] Furthermore, it not only provides circuits with characteristics close to the actual values ​​for circuits with high operating frequencies of several MHz or more, but also has the effect of not affecting circuits with low operating frequencies. Parasitic components may include not only individual circuit components, but also parasitic capacitance or mutual inductance components that occur between circuit components, between circuit components and wiring, and between wiring. Note that when a voltage is applied to a circuit component, the effect of parasitic capacitance will become apparent between surrounding conductors or between circuit components with different potentials.

[0273] Furthermore, the processing unit 14 augments data by creating a graph network of equivalent circuits that include parasitic components of circuit components. For example, the processing unit 14 may augment data by creating a graph network of equivalent circuits that include parasitic capacitance or residual inductance between circuit components, between circuit components and wiring, between wirings, and between wirings. When current flows through a circuit component, mutual inductance is generated in the surrounding conductors or the circuit component, and magnetic coupling generates an induced electromotive force in the surrounding conductors, while the current in the target conductor is suppressed. Such parasitic capacitance or mutual inductance does not create abnormal circuits and, like individual circuit components, is a desirable form of data augmentation. This not only provides circuits with characteristics close to the actual values ​​for circuits with high operating frequencies of several MHz or more, but also does not affect circuits with low operating frequencies.

[0274] Adding these parasitic elements requires changing the number of nodes in the graph network, which increases the number of node tokens and thus the computational cost. However, it is desirable to augment the data and change the graph structure. That is, training with data that has different graph structures and high variance in those structures increases the variance of the generated graph structures, making it easier to generate graph data with a different structure from the training data. The node attribute, or node token, that is changed to augment the data does not have to be just one; data augmentation can be performed by changing one or more node tokens simultaneously. Furthermore, by augmenting the data by changing one or more node tokens, the amount of text data input for natural language processing training can be reduced, improving training efficiency.

[0275] Furthermore, the graphs shown in Figures 18 and 19 have two edges between node token "X: LTM805a" and node token "D: 1N914". Even if two edges are input using natural language processing, the connected terminals cannot be determined, and the graph data cannot be converted into a circuit. Similarly, for self-loops, the terminals of the short-circuited semiconductors cannot be determined, making it impossible to generate circuit simulation or circuit data that operates on actual hardware from the text data representing the graph data obtained from circuit generation.

[0276] Therefore, the processing unit 14 divides a multi-terminal component such as the semiconductor "X:LTM805a" into partitioned nodes according to the number of terminals. Figure 20 is a diagram showing an example (3) of the graph network in Embodiment 6, and shows a graph in which the semiconductor "X:LTM805a" is replaced with a star graph. In this graph, a node token "X:LTM805a", which is a virtual node, is placed at the center of the partitioned nodes divided by terminal, and six terminals "X 1-1 "From terminal "X 1-6 This is a structure in which node tokens corresponding to " are connected.

[0277] The text generated by the processing unit 14 using the sum of the node orders and the terminal numbers is as follows: V:::X:LTM805a_1 C:1u GND C:1u:::V X:LTM805a_1 GND X:LTM805a_1:::X:LTM805a V C:1u X:LTM805a_2:::X:LTM805a X:LTM805a_3:::X:LTM805a X:LTM805a_2 X:LTM805a_4:::X:LTM805a D:1N914 X:LTM805a_5:::X:LTM805a D:1N914 C:1u R:10 X:LTM805a_6:::X:LTM805a GND D:1N914:::X:LTM805a_4 X:LTM805a_5 C:1u R:10 C:1u:::X:LTM805a_5 R:10 D:1N914 GND R:10:::X:LTM805a_5 C:1u D:1N914 GND X:LTM805a:::X:LTM805a_1 X:LTM805a_2 X:L TM805a_3 X:LTM805a_4 X:LTM805a_6 GND:::V C:1u X: LTM805a_6 C: 1u R: 10

[0278] Since terminal numbers do not degrade in information, it is possible to generate a graph that can operate in circuit simulation from text data containing graph data generated by natural language processing, and from the graph, a netlist that can operate in a circuit simulator or on actual hardware can be generated. Unlike graph neural networks, when handling graphs with natural language processing, multi-terminal components do not necessarily have to be arranged in a star graph. For example, it is not necessary to include the node token "X: LTM805a", which is a virtual node shown in Figure 20.

[0279] Figure 21 shows an example (4) of a graph network in Embodiment 6. If the virtual node node token "X:LTM805a" is not included, it can be represented by the graph shown in Figure 21. Based on this, the processing unit 14 creates the following text data. X:LTM805a_1:::V C:1u C:1u:::V X:LTM805a_1 GND V:::X:LTM805a_1 C:1u GND X:LTM805a_2:::X:LTM805a_3 X:LTM805a_3:::X:LTM805a_2 X:LTM805a_4:::D:1N914 D:1N914:::X:LTM805a_4 X:LTM805a_5 C:1u R:10 X:LTM805a_5:::D:1N914 C:1u R:10 C:1u:::X:LTM805a_5 R:10 D:1N914 GND R:10:::X:LTM805a_5 C:1u D:1N914 GND X:LTM805a_6:::GND GND:::V C:1u X:LTM805a_6 C:1u R:10

[0280] In this case, for example, "X: LTM805a_1" has two edges connected, but the nodes of interest are listed in order of terminal number. In particular, the node adjacent to the terminal number after the terminal number is listed as the node of interest. However, since the node degrees of "C: 1u" and "V" connected to terminal number 1 are both 3, the nodes of interest are listed in alphabetical order.

[0281] In a graph neural network, nodes are unrelated unless connected by edges. In contrast, in Embodiment 6, the node token holds the circuit model number and terminal number as node attributes, thus representing a single component. That is, if node tokens from "X: LTM805a_1" to "X: LTM805a_6" are included, the component type "X" indicates that it is a semiconductor, the component model number "LTM805a" indicates that they are the same component, and the number after "_" indicates the terminal number.

[0282] In this way, the number of tokens can be reduced by not using virtual nodes. However, if a single graph data contains two or more semiconductors (or multi-terminal components) of the same node type and with the same node attributes, the divided node names will be common. Therefore, it is not possible to convert the generated data back into two different semiconductors. To address this, the processing unit 14 performs one of the following three processes.

[0283] (Process A) The first is Process A, which treats the data as individual nodes without converting it to a star graph. Although Process A is easy to implement, it has the problem that the terminal numbers cannot be predicted from the generated graph data.

[0284] (Process B) The second process is Process B, which adds different information to the node attributes. In Process B, the same circuit component is treated as different circuit components, resulting in bias. To eliminate this bias, it is necessary to create a text file with data augmentation by swapping information with different node attributes.

[0285] (Process C) The third process, Process C, separates only the dominant circuit components or terminal components with a high node order within the graph, and turns the other multi-terminal circuit components into single nodes. In many cases, the operation of the circuit is determined by one or two large semiconductors. For this reason, it is preferable to use Process B when the circuit is small or when sufficient computing resources are available.

[0286] Furthermore, when used for purposes other than circuit generation, such as graph classification or node prediction, process A is often sufficient. It is desirable to create text data that can be freely combined in this way to suit the environment.

[0287] Figure 22 shows an example (5) of the graph network in Embodiment 6. For example, as shown in Figure 22, when a graph is generated in which a 10μF capacitor C and a series circuit of a 10Ω resistor and a 1μF capacitor C are connected to a power supply V, there are cases where the order of the node is 1, such as 1μF below. In this case, it does not become a circuit and is an abnormal circuit, reducing the generation accuracy. In this case, the 1μF capacitor and the ground node are connected by an edge. The processing unit 14 creates text data as follows: V ::: R:10 C:10u GND R:10 ::: V C:1u C:1u ::: R:10 C:10u ::: V GND GND ::: V C:10u

[0288] Figure 23 shows an example (6) of the graph network in Embodiment 6. For example, in the case of a node with an order of 1, such as the 1μF capacitor shown in Figure 23, if it is connected to a ground node, the connection destination is unknown, so the node token "C:1u" is deleted. Also, "C:10u", which has an order of 1, is connected to a ground node. The processing unit 14 creates the following text data: V ::: C:10u GND C:1u ::: GND C:10u ::: V GND ::: V C:1u When the processing unit 14 creates the above string, it deletes the node token "C:1u" because there are multiple possible connection destinations, and creates the following text data. This prevents a decrease in generation accuracy. V ::: C:10u GND C:10u ::: V GND GND ::: V C:1u

[0289] As described above, in the graph natural language processing device 1 according to Embodiment 6, the graph network relates to circuits, the node type is the type of circuit component, and the node attribute includes circuit constants or the circuit model number. Various circuits can be represented in the graph network using node types and node attributes. Therefore, circuits can be represented using strings that are capable of natural language processing.

[0290] In the graph natural language processing device 1 according to Embodiment 6, circuit components and ground are nodes, and wiring excluding ground is an edge. Since information about ground nodes can be stored in the graph network, ground can be represented even in generated text data.

[0291] In the graph natural language processing device 1 according to Embodiment 6, the processing unit 14 connects nodes with a node order of 1 and ground nodes representing the ground with edges. Since the information of the ground nodes can be stored in the graph network, the ground can be represented even in the generated text data.

[0292] In the graph natural language processing device 1 according to Embodiment 6, the processing unit 14 deletes nodes adjacent only to ground nodes representing the ground. This improves the efficiency of circuit generation.

[0293] In the graph natural language processing device 1 according to Embodiment 6, the processing unit 14 augments data by forming a graph network with equivalent circuits that include parasitic components of circuit parts. In the graph natural language processing device 1 according to Embodiment 6, the processing unit 14 augments data by forming a graph network with equivalent circuits that include parasitic capacitance or residual inductance between circuit parts, between circuit parts and wiring, between wirings, and between wirings. As a result, since parasitic components are used to represent high frequencies, a graph representation that takes into account low to high frequencies can be made, making it easier to extract feature quantities that the graph data has, and since the data augmentation is done by adding nodes or changing node attributes based on physical quantities, abnormal circuit data is not generated.

[0294] Embodiment 7. The graph natural language processing device according to Embodiment 7 outputs the text data obtained from the processing in Embodiments 1 to 4 to a natural language processing device represented by a transformer. This natural language processing device outputs the feature quantities of the text data input from the graph natural language processing device according to Embodiment 7, or text data having graph data that includes the input text data, or text data having graph data different from the input text data. Furthermore, the text data input to the natural language processing device does not need to be text data that includes graph data; it is sufficient if it is text data composed of natural language that describes the features of the graph data to be generated. Note that the graph natural language processing device according to Embodiment 7 has the same components as the graph natural language processing device 1 shown in Figure 1, but the functions of each component are different as will be described later. The configuration of the graph natural language processing device according to Embodiment 7 will be described below with reference to Figure 1.

[0295] (Natural Language Processing Unit) The natural language processing unit is a device not shown in Figure 1. When text data output from the graph natural language processing unit 1 according to Embodiment 7 is input, the unit analyzes the text using time-series processing with the order of the input text as the time direction. That is, the processing unit 14 of the graph natural language processing unit 1 according to Embodiment 7 uses the natural language processing unit to obtain the time-series processing result of the text. Deep learning is known for time-series processing. The following describes time-series processing based on deep learning.

[0296] For time series processing, convolutional neural networks (CNNs) in deep learning may be used. Alternatively, recurrent neural networks (RNNs) may be used. Recurrent neural networks will be explained below.

[0297] Various methods are known for recurrent neural networks. LSTM (Long Short Term Memory) is one method that reduces the time-series forgetting inherent in RNNs. Seq2Seq (Sequence to Sequence) consists of an encoder model that extracts features from time-series data input from LSTM, and a decoder model that creates time-series data from the features extracted by the encoder model. Seq2Seq is highly versatile and can be used, for example, in machine translation because it creates time-series data different from the input time-series data.

[0298] However, RNNs, as well as LSTMs and Seq2Seq, cannot begin predicting the next value until the previous value is determined, even when using hardware that excels at parallel processing (such as GPUs, TPUs, ASICs, and FPGAs). Therefore, hardware utilization efficiency is low, averaging around 30%. Consequently, large-scale training and inference require a long time, depending on the hardware used and its performance.

[0299] The transformer model performs the above-described process using hardware parallel processing. The transformer model enables parallelization by incorporating an attention mechanism that handles word correlations between the encoder and decoder models of Seq2Seq. Furthermore, in addition to sequence models (also called encoder-decoder models) that combine an encoder and decoder model, similar to Seq2Seq, transformer models are known to include an encoder model that extracts features from input text and a decoder model that generates text from those features.

[0300] Embodiment 7 describes a method based on a transformer model. The circuit shown in Embodiment 4 is represented by text data created in each process from Embodiment 1 to Embodiment 3. As an example, the sequence model is a neural network model called T5 (Text-to-Text Transformer Transformer). The encoder model is a neural network model called Bert (Bidirectional Encoder Representations from Transformers). The decoder model is a neural network model called GPT (Generative Pre-trained Transformer).

[0301] However, there are hundreds of models derived from these. Hundreds of similar technologies have also been published. Any combination of these technologies is acceptable as long as it is capable of natural language processing and can handle text as at least one of its inputs or outputs. In addition to transformer models, selective state-space models are known to be used to reduce the memory usage of Attention, and examples of selective state-space models include neural network models such as Mamba, Samba, or Jamba. Because these selective state-space models use relatively little memory, they can input longer texts in the same computing environment compared to Attention. Therefore, Attention cannot handle long texts without splitting them, and furthermore, splitting breaks the relationships between the split graphs, which is undesirable. In contrast, selective state-space models are suitable for learning large graphs. Therefore, transformer models or selective state-space models are currently used for evaluation because they offer high inference accuracy. They can be selected according to the target data, and they can also be used in combination.

[0302] Furthermore, the transformer model is currently being used for evaluation only because it has high inference accuracy; any method with high inference accuracy does not necessarily have to be based on a neural network.

[0303] In natural language processing, a tokenizer divides text into words, and each divided word is replaced with a unique numerical value. The processing unit 14 can divide the text into node tokens by creating text data divided by delimiters. Therefore, dividing text into words is easy.

[0304] Furthermore, the graph natural language processing device 1 according to Embodiment 7 may also include a whitespace tokenizer. The whitespace tokenizer splits the string of text data using a half-width space " " as a delimiter.

[0305] Various tokenizers are known, including BPE (Byte-Pair Encoding), Sentencepiece, Wordpiece, and Unigram. When using a half-width space as a delimiter, it is preferable to use a tokenizer that splits the string using a delimiter that includes a whitespace tokenizer.

[0306] For example, if we split the string A:1000 B:10 C:100 ::: B:1 B:10 ::: B:10 B:1 A:1000 C:100 ::: C:100 A:1000 B:10 using the second delimiter " ", we can split it into the following combinations of node tokens and the first delimiter: A:1000 B:10 C:100 ::: B:1 B:10 ::: B:10 B:1 A:1000 C:100 ::: C:100 A:1000 B:10

[0307] However, while various tokenizers are known, such as BPE (Byte-Pair Encoding), Sentencepiece, Wordpiece, and Unigram, it is preferable to use a whitespace tokenizer when using half-width spaces as delimiters.

[0308] Furthermore, if the number of tokens can be greater than or equal to the sum of the number of node token types and the first delimiter character, a SentencePiece Tokenizer may be used. Since the number of node tokens in graph data is often sufficiently small compared to the number of words that appear in natural language processing, SentencePiece reduces the number of tokens by dividing the text into words, determining the frequency of each word, treating high-frequency words as one token, and dividing low-frequency words into shorter words and treating them as one token each.

[0309] The following is the text created from the graph shown in Figure 3. A: 1000 B: 10 C: 100 ::: B: 1 B: 10 ::: B: 10 B: 1 A: 1000 C: 100 ::: C: 100 A: 1000 B: 10

[0310] When the above text is split into words using a whitespace tokenizer, it looks like this: If we assign ":::" to "0", "A:1000" to "1", "B:10" to "2", "C:100" to "3", and "B:1" to "4", it looks like this: 1 2 3 0 4 2 0 2 4 1 3 0 3 1 2

[0311] In this case, the numbers at the beginning of the string and after the zero represent the node token of the node in question, and the other numbers represent the node tokens of adjacent nodes. Adding "::: " to the beginning results in the following: ::: A:1000 B:10 C:100 ::: B:1 B:10 ::: B:10 B:1 A:1000 C:100 ::: C:100 A:1000 B:10

[0312] This results in 0 1 2 3 0 4 2 0 2 4 1 3 0 3 1 2, where the number after 0 represents the node of interest, and all numbers other than 0 and the node of interest represent adjacent nodes.

[0313] When inputting to a natural language processing decoder model, if the input does not start with ":::", you should add ":::" before using the tokenizer to decompose the input string into words consisting of node tokens and the first delimiter.

[0314] This sequence of numbers is input into natural language processing (the explanation uses the version without the "::: " at the beginning). The decoder model learns through self-supervised learning, that is, by predicting the word that follows a given sequence of words, and creates a trained model that automatically completes sentences. For example, if the first sequence of numbers 1 2 3 0 is input, it is trained to predict the next number, 4, and if 1 2 3 0 4 is input, it is trained to predict the next number, 2.

[0315] However, the transformer model has the problem of losing token position information due to parallel processing. Therefore, similar to Attention, positional encoding is used to process each token, including its position within the text. Furthermore, it is desirable to make the relative position of the first delimiter equal for all nodes of interest. ::: A:1000 B:10 C:100 ::: B:1 B:10 ::: B:10 B:1 A:1000 C:100 ::: C:100 A:1000 B:10 This is equivalent to 0 1 2 3 0 4 2 0 2 4 1 3 0 3 1 2 when converted numerically. Note that a 0 is added to the beginning of the number to represent :::.

[0316] Next, we will explain how to utilize the sequence model, encoder model, and decoder model, respectively. The sequence model can rewrite input text into other text based on the learning results, for example, as used in machine translation. This feature allows the text of an entire graph to be input into the sequence model, and the output to be the optimized entire graph. For example, in the circuit example, if the circuit is input into the sequence model as text data based on Embodiments 1 to 4, circuits with different circuit topologies, part numbers of circuit components used, or circuit constants can be output. For the sequence model, a sequence model such as T5 can be used. Alternatively, RNN, LSTM, or Seq2Seq, which served as the base models for Transformer, may also be used.

[0317] The processing unit 14 may use an encoder model to input text with a portion hidden and predict the tokens of the hidden text. That is, it inputs text in which one or more node tokens in the text are replaced with hidden characters, and outputs node tokens representing the hidden characters. This allows the encoder model to perform sentiment analysis of the input natural language, or, when a portion of the input text is hidden, predict the tokens of the hidden text.

[0318] Furthermore, it can also be used as a regression problem. For example, when text data representing a circuit is input to the encoder model, the encoder model can predict the area of ​​the board required for implementation, estimate the cost, or predict the physical amount of heat or noise generated. In addition, by inputting node tokens while hiding them and predicting the hidden values, edges can be predicted. Furthermore, the processing unit 14 may use the decoder model to, for example, input a portion of the text and predict the rest of the text, or input the entire text and create a summary of the input text.

[0319] A part of a graph network may be input as text, and the entire graph network may be output as text. For example, the processing unit 14 may use a decoder model to input text data representing a part of a circuit and create text data representing the remaining circuit necessary to complete the circuit. Alternatively, the entire text of a graph network may be input, and text different from text representing a different graph network may be output. For example, the decoder model may input text data representing the entire circuit and convert the text data representing the function or characteristics of the circuit into a form that humans can understand as natural language. In this way, by combining training data and natural language, it is possible to utilize this for graph generation or optimization, graph understanding, and node or edge prediction.

[0320] In the graph shown in Figure 3, for example, ":::" is set to 0, "A: 1000" to 1, "B: 10" to 2, "C: 100" to 3, and "B: 1" to 4, and the values ​​are quantified as follows: 1 2 3 0 4 2 0 2 4 1 3 0 3 1 2 This is input, and the system is trained to output, for example, 1 2 3 0 2 1 3 0 3 1 2 by removing the unnecessary B: 1.

[0321] In addition to removing nodes, optimizations such as adding nodes, changing node types, modifying node attributes, and adding or deleting edges are possible. Furthermore, depending on how the training data and evaluation function are provided, it is possible to reconstruct circuits with the same characteristics using fewer components, generate circuits with less noise and heat generation, reduce costs, or generate circuits that satisfy all of these conditions simultaneously.

[0322] Encoder models can perform tasks such as sentiment analysis of input natural language, or predicting tokens in text that has been partially hidden. Leveraging this capability, the entire text of a graph can be input into the encoder model and used for graph classification. For example, in the case of circuits, inputting the circuit as text data into the encoder model can predict the type of circuit and the number of board layers required for its implementation.

[0323] Furthermore, it can be used as a regression problem; for example, by inputting a circuit as text data into the encoder model, it is possible to predict the required board area for implementation, estimate the cost, and the physical amount of heat or noise generated. In addition, by inputting node tokens while hiding them and predicting the hidden values, edge prediction can be performed. The encoder model used is a natural language processing encoder model such as Bert (Bidirectional Encoder Representations from Transformers).

[0324] In an encoder model, for example, if the numerical string is 1 2 3 0 4 2 0 2 4 1 3 0 3 1 2, the model learns by randomly hiding characters. If we represent the hidden (masked) characters with "-", then inputting 1 2 - 0 4 2 - 2 4 1 3 0 3 - 2, the model learns to replace "-" with 3 0 1, and becomes able to predict unknown inference data.

[0325] The Bert model learns to predict the next number from both the beginning and end of a sentence. Furthermore, it learns by hiding characters (actually numbers, as they are converted to numbers) and associating the hidden characters with the features of the string. While the method is not limited, models such as Roberta tend to obtain features more accurately than Bert, and Bert hides characters before training. In contrast, Roberta changes the hidden characters during training (each batch), so the latter tends to yield better results in transformer models with many repetitions. Thus, any model that can predict the output from the input can be used.

[0326] Alternatively, the entire text of a graph network can be input, and the features of the graph network can be output. Here, the features of the graph network are the features in the "latent space." The latent space is the space created by the neural network using the input data, and in this case, the neural network can be thought of as a nonlinear mapping of the input data to the latent space. When comparing with the correct labels during training, or when inferring or generating, these features are input into a neural network such as a multilayer perceptron, and clustering is performed to obtain the desired output. In a decoder model, for example, it is possible to input a part of a text and predict the rest of the text, or input the entire text and summarize the input text. For example, in the example of a circuit, by inputting a part of the circuit as text data, it is possible to generate the remaining circuit necessary to complete the circuit, and it can be used for graph optimization, graph understanding, and node and edge prediction. Decoder models use natural language processing such as GPT.

[0327] Assuming ":::" is 0, "A:1000" is 1, "B:10" is 2, "C:100" is 3, and "B:1" is 4, the text converted from the graph in Figure 3 becomes 1 2 3 0 4 2 0 2 4 1 3 0 3 1 2. Thus, the numbers at the beginning of the string and after 0 represent the node token of the node in question, and the other numbers represent the node tokens of adjacent nodes.

[0328] This sequence of numbers is input into natural language processing. The decoder model learns through self-supervised learning, that is, by predicting the word that follows a given sequence of words, and creates a trained model that automatically completes sentences. For example, it learns to predict 4 when 1 2 3 0 is input, and learns to predict 2 when 1 2 3 0 4 is input.

[0329] Next, we will explain how to evaluate the graphs generated by the sequence model, the encoder model with some text hidden, and the decoder model. It is assumed that all input data is normal graph data.

[0330] Therefore, abnormal value training data is created by modifying the graph data from the normal training data by changing node types, node attributes, adding or deleting nodes, or adding or deleting edges. The data is evaluated using a learning device trained in binary classification or multi-class classification, which determines the training data as normal and the abnormal value training data as abnormal. For example, the processing unit 14 receives training data, which is graph data, and abnormal data, which is the training data with the node types swapped, and determines the training data as normal and the abnormal data as abnormal. In fact, by selecting two nodes from a graph created from a circuit and swapping them only once, an accuracy of about 99% was confirmed in experiments. However, swapping nodes that represent parallel components of a circuit does not change the characteristics of the circuit or the graph structure, so it does not become abnormal data. Therefore, after swapping nodes so that such data is not included in the abnormal data, it is checked whether the graph has different node types. Furthermore, the processing unit 14 may classify the node types of the training data and the node types of the abnormal data. In the inference process, the text output by the natural language processing unit is input to the learning unit. If it is judged to be normal, the generation is considered successful; if it is judged to be abnormal, the generation is considered to have failed. The learning process may be natural language processing according to embodiments 1 to 5, or it may be a graph classification problem using a graph neural network.

[0331] For example, in the circuit described in Embodiment 5, it is difficult to determine that a circuit is abnormal even if the circuit constants, which are node attributes, change. Specifically, for example, determining that a capacitor with a capacitance of 1 μF is normal and one with a capacitance of 3.3 μF is abnormal is often an incorrect determination. Therefore, node attributes are not used for the training data and the training data for abnormalities; training is performed using only the node type, and the generated text is also text data consisting only of the node type. This allows for the determination of whether the graph data of the generated text is normal or abnormal.

[0332] Next, the experimental results are presented. The experiment was conducted using the circuit described in Embodiment 5, with experiments performed on both an encoder model and a decoder model. For the encoder model, a method based on a graph neural network was performed for comparison. For the decoder model, a method based on a graph neural network and a method in which the netlist generated from the circuit is directly input to natural language processing were performed for comparison. The circuit data used for evaluation consisted of 3,308 circuits included with LTspice, which is commercially available and freely available from Analog Devices.

[0333] The encoder model presented a classification problem involving 3,308 circuits, categorized into seven types: A / D converter circuits, comparator circuits, filter circuits, operational amplifier circuits, power supply circuits, reference circuits, and switch circuits. The average number of nodes for A / D converter circuits was 12.75, and the average number of edges was 23.75. The average number of nodes for comparator circuits was 8.60, and the average number of edges was 19.56. The average number of nodes for filter circuits was 13.60, and the average number of edges was 32.92. The average number of nodes for operational amplifier circuits was 9.98, and the average number of edges was 21.22. The average number of nodes for power supply circuits was 14.00, and the average number of edges was 37.78. The average number of nodes for reference circuits was 6.17, and the average number of edges was 30.89. The switch circuit has an average of 8.88 nodes and an average of 15.65 edges.

[0334] The netlist will be in the format that LTspice outputs by default. For example, the netlist for the semiconductor LT1026 used in a power supply circuit is shown below: XU1 N001 N003 N004 OUT- 0 IN N002 OUT+ LT1026 C1 N002 N001 1u C2 N003 N004 1u C3 0 OUT- 1u C4 OUT+ 0 1u V1 IN 0 4

[0335] The processing unit 14 may create text by learning from scratch. That is, the netlist is input to Bert, which is an encoder model for natural language processing, and the node tokens are divided using a whitespace tokenizer without using a pre-trained model. Then, the weight matrix is ​​trained from scratch, starting with uniform random numbers. In this case, in order to reduce computation time, the initial values ​​of He or Xavier obtained by normalizing the uniform random numbers may be used. In many natural language processing applications, it is common to use a pre-trained model (a trained weight matrix) for transfer learning and fine tuning in order to reduce the computational cost of training, but it is difficult to change the tokenizer or add or delete tokens in a pre-trained model.

[0336] Furthermore, graph data is often less extensive than the training data used in natural language processing, and the computational cost is also lower, so it is preferable to train the model from scratch without using a pre-trained model. For the test data, 70% of the 3,308 data points were used for training and the remaining 30% for testing, and the inference accuracy was checked.

[0337] To mitigate the impact of variability between training and test data, ten combinations were created for both training and inference data. The average inference accuracy was calculated, and the data allocated to training and inference was kept the same for both sets.

[0338] As a result, when the netlist was directly input to the encoder model, the average inference accuracy was 96.72%, while the methods according to Embodiments 1 to 3 achieved an average inference accuracy of 98.14%. In this case, the data augmentation described in Embodiment 3 was not used. Embodiment 6 has focused on explaining graph generation, but the encoder model also yielded results equivalent to or better than those obtained when using node IDs. This confirms that no information degradation occurs when node IDs are replaced with node tokens.

[0339] Furthermore, for the decoder model, a power supply circuit dataset with 2,477 circuits from the LTspice dataset was used as training data. The decoder model used GPT-2, and without using a pre-trained model, it was trained from scratch by splitting text using a whitespace tokenizer with a half-width space as the second delimiter. Similar to the encoder model, 70% of the 2,477 power supply circuits were used as training data, and the remaining 30% were used as test data.

[0340] Then, the text was divided into words using a whitespace tokenizer, and tokens were assigned to all words. At this point, there were 5,390 types of tokens for all the power supply circuits, and the total number of tokens was 290,547. Using the trained GPT-2, the first 10 tokens of the text created from each of the 2,477 power supply circuits were input, and text predicting the remaining circuits was generated. When the text was converted into a graph, all the text data could be converted into a graph.

[0341] However, in the converted graph, nodes with a node degree of 1 may occur. Since circuit components with a node degree of 1 do not form a circuit, nodes with a node degree of 1 were connected to ground nodes with edges to form a circuit. However, if an adjacent node connected with a node degree of 1 is a ground node, the node with a node degree of 1 was deleted.

[0342] Then, using a graph neural network model trained to determine whether the generated graphs were normal or abnormal based solely on the node type, the proportion of normal circuits was examined. The inference accuracy of the graph neural network model trained to determine normal and abnormal circuits was 99.56%. As a result, 49.43% of the 2,477 power supply circuits generated were determined to be normal circuits.

[0343] On the other hand, for comparison, when we trained and generated 2,477 power supply circuits using the graph neural network-based method with the highest generation accuracy (GraphRNN), the generation accuracy was less than 0.1%. Furthermore, when we directly input the netlist of the power supply circuits into GPT-2 using LTspice and performed the same processing as above, only 27% (675 circuits) were able to satisfy the constraints of the graph data when converting the generated text into a graph. In addition, when we connected the ground node with an edge or deleted a node so that the 675 nodes with node order 1 filled the circuit and input them into a graph neural network-based model that determines normal and abnormal (a model with inference accuracy of 99.56%), 10.96% of the 675 were determined to be normal circuits. This corresponds to 2.99% of the 2,477 circuits.

[0344] From the above results, it can be seen that the method according to Embodiment 6 improves the efficiency of generating a normal circuit by more than 10 times (2.99% to 49.43%) compared to the method based on the idea of ​​directly inputting the netlist into the circuit for natural language processing. This indicates that the method according to Embodiment 7 has special effects compared to conventional methods.

[0345] Furthermore, conventional graph neural network-based methods are not only unable to generate circuits containing specific circuit components or wiring, but the likelihood of the generated circuits being identified as normal is also low, indicating that they are not suitable for generating data with strong physical constraints, such as circuits.

[0346] Furthermore, because GraphRNN, based on a graph neural network method, generates nodes and edges sequentially, including their types and attributes, the computational complexity during training or generation increases exponentially. As a result, a typical computer is limited to training or generating around 20 nodes.

[0347] The dataset was limited to 20 nodes or less for training, and 10 million graph data points were generated through inference. Only 120 (less than 0.1%) were judged to be normal, and it was further confirmed that the circuits judged as normal were not the intended circuits.

[0348] Even when applying the latest technologies other than Graph RNN, such as Graph AutoEncoder, Graph Diffusion, Graph Reinforcement Learning, and Graph GAN, the accuracy of the above-mentioned Graph RNN could not be exceeded. Furthermore, the graph network relates to inorganic compounds. Processing unit 14 may add hydrogen atoms as nodes to nodes whose valence is less than the number of edges and connect them to satisfy the valence. This can improve the efficiency of generating inorganic compounds. Moreover, the graph network relates to mesh data of the finite element method. Processing unit 14 may add edges between adjacent nodes to nodes with a node order of 2 or less and output a graph network with a node order of 3 or more. This can improve the efficiency of generating mesh data.

[0349] As described above, in the graph natural language processing device 1 according to Embodiment 7, a string of characters representing a part of the graph network is input, and a string of characters representing the entire graph network is output. This makes it possible to generate a graph having a specified node.

[0350] The graph natural language processing device 1 according to Embodiment 7 takes the text of the entire graph network as input and outputs text that is different from the text representing a different graph network than the input graph network. This makes it possible to optimize the graph network.

[0351] The graph natural language processing device 1 according to Embodiment 7 takes text in which one or more node tokens in the text have been replaced with hidden characters as input, and outputs node tokens representing the hidden characters. This makes it possible to optimize the strings that make up the graph network, and thus predict the type of node, node attributes, and edges.

[0352] The graph natural language processing device 1 according to Embodiment 7 takes the text of the entire graph network as input and outputs the feature quantities of the graph network. This makes it possible to extract the feature quantities of the graph network using natural language processing.

[0353] In the graph natural language processing device 1 according to Embodiment 7, the processing unit 14 receives training data, which is graph data, and abnormal data, which is the training data with the node types swapped. The processing unit determines the training data to be normal and the abnormal data to be abnormal. This allows for evaluation of the graph generation efficiency and separation of graph networks that do not require evaluation.

[0354] In the graph natural language processing device 1 according to Embodiment 7, the processing unit 14 classifies the node types of the training data and the node types of the abnormal data. This makes it possible to accurately determine whether a graph is normal using only the node type.

[0355] In the graph natural language processing device 1 according to Embodiment 7, the graph network relates to inorganic compounds. The processing unit 14 adds hydrogen atoms as nodes to nodes whose valence is less than the number of edges, and connects them to satisfy the valence. This improves the efficiency of inorganic compound generation.

[0356] In the graph natural language processing device 1 according to Embodiment 7, the graph network relates to mesh data of the finite element method. The processing unit 14 adds edges between adjacent nodes for nodes with a node degree of 2 or less, and outputs a graph network with a node degree of 3 or more. This improves the efficiency of mesh data generation.

[0357] The graph natural language processing device 1 according to Embodiment 7 includes a whitespace tokenizer for splitting strings. This allows strings to be split into node tokens.

[0358] The graph natural language processing device 1 according to Embodiment 7 includes a sentence piece tokenizer that divides a string. This allows the string to be divided into node tokens.

[0359] In the graph natural language processing device 1 according to Embodiment 6, the processing unit 14 makes the order of the node of interest and the first delimiter for the node of interest the same for all nodes of interest. As a result, since parasitic components are used to represent high frequencies, a graph representation that takes high frequencies into account can be made, making it easier to extract the feature quantities that the graph data has, and because it is an addition of nodes or a change in node attributes based on physical quantities, abnormal circuit data is not generated due to data augmentation.

[0360] In the graph natural language processing device 1 according to Embodiment 7, the processing unit 14 creates text by learning from scratch. This allows the string to be divided into node tokens.

[0361] The graph natural language processing device described herein can be used, for example, in various technical fields that deal with graph representations.

[0362] Furthermore, this disclosure allows for free combination of each embodiment, modification of any component of each embodiment, or omission of any component in each embodiment.

[0363] 1 Graph natural language processing unit, 11 Graph data acquisition unit, 12 Node extraction unit, 13 Edge extraction unit, 14 Processing unit, 100 Input interface, 101 Output interface, 102 Processing circuit, 103 Processor, 104 Memory.

Claims

1. A graph natural language processing device comprising: an extraction unit that extracts nodes including node types and node attributes from graph data; and a processing unit that outputs text which combines the node types and node attributes extracted by the extraction unit, the node tokens of the node of interest in the graph data, and the node tokens of the adjacent nodes of the node of interest.

2. The graph natural language processing device according to claim 1, characterized in that the processing unit outputs text consisting of a node token of the node of interest and a first delimiter for separating the node tokens of the adjacent nodes.

3. The graph natural language processing device according to claim 2, characterized in that the text is configured to place a second delimiter different from the first delimiter between node tokens and between node tokens and the first delimiter.

4. The graph natural language processing device according to any one of claims 1 to 3, characterized in that the node of interest is used as the source and the adjacent node is used as the sink.

5. The graph natural language processing device according to any one of claims 1 to 3, characterized in that the node of interest is used as a sink and the adjacent node is used as a source.

6. The graph natural language processing device according to any one of claims 1 to 3, characterized in that the processing unit divides a multi-terminal node connected to three or more edges into terminal nodes equal to the number of terminals, changes the ends of the edges connected to the multi-terminal node from the multi-terminal node to connections to each terminal node, and deletes the multi-terminal node.

7. The graph natural language processing device according to any one of claims 1 to 3, characterized in that the processing unit divides a multi-terminal node connected to three or more edges into the same number of terminal nodes as the number of edges, changes the ends of the edges connected to the multi-terminal node from the multi-terminal node to connections to each terminal node, and deletes the multi-terminal node.

8. The graph natural language processing device according to any one of claims 1 to 3, characterized in that the processing unit divides a multi-terminal node having three or more terminals into terminal nodes equal to the number of terminals, changes the ends of the edges connected to the multi-terminal node from the multi-terminal node to connections to each terminal node, and deletes the multi-terminal node.

9. The graph natural language processing device according to any one of claims 6 to 8, characterized in that the processing unit provides one virtual node for one of the multi-terminal nodes and connects the terminal nodes via the virtual node.

10. The graph natural language processing device according to any one of claims 1 to 3, characterized in that the processing unit divides a directional node into two nodes and assigns to each of the divided nodes information that is different in at least one of either the node type or the node attribute.

11. The graph natural language processing device according to any one of claims 1 to 3, characterized in that the processing unit divides the nodes at both ends of a directional edge into two nodes, and assigns to each of the divided nodes information that is different in at least one of either the node type or the node attribute.

12. The graph natural language processing device according to any one of claims 1 to 3, characterized in that the node tokens of the adjacent nodes to the node of interest are arranged in order of node degree.

13. The graph natural language processing device according to any one of claims 1 to 3, characterized in that the node tokens of the adjacent nodes are arranged in order of distance from the centroid node, which is one node in the graph data, to each node.

14. The graph natural language processing device according to claim 13, characterized in that the centroid node is the node with the highest node degree.

15. The graph natural language processing device according to any one of claims 1 to 3, characterized in that the node tokens of the adjacent nodes corresponding to the node of interest having a terminal number are arranged in order of terminal number.

16. The graph natural language processing device according to claim 12, characterized in that the node tokens of adjacent nodes with the same node degree are arranged in lexicographical order.

17. The graph natural language processing device according to claim 13, characterized in that the node tokens of adjacent nodes that are the same distance from the centroid node are arranged in lexicographical order.

18. The graph natural language processing device according to claim 15, characterized in that the node tokens of adjacent nodes having the same terminal number are arranged in alphabetical order.

19. The graph natural language processing device according to any one of claims 1 to 3, characterized in that the processing unit arranges the node tokens of the node of interest in order of the highest node order.

20. The graph natural language processing device according to any one of claims 1 to 3, characterized in that the processing unit arranges the node tokens of the node of interest in order of the sum of the node degrees of the adjacent nodes.

21. The graph natural language processing device according to any one of claims 1 to 3, characterized in that the processing unit arranges the node tokens of the node of interest in order of the distance from the centroid node, which is one node in the graph data, to each node.

22. The graph natural language processing device according to claim 19, characterized in that the processing unit arranges the node tokens of the nodes of interest, which have the same maximum node degree, in lexicographical order.

23. The graph natural language processing device according to claim 20, characterized in that the processing unit arranges the node tokens of the nodes of interest whose sum of node degrees is equal in lexicographical order.

24. The graph natural language processing device according to claim 21, characterized in that the processing unit arranges the node tokens of the node of interest that are equal in distance from the centroid node in lexicographical order.

25. The graph natural language processing device according to claim 13, characterized in that the processing unit augments data by rearranging the order of adjacent nodes that are the same distance from the centroid node.

26. The graph natural language processing device according to claim 15, characterized in that the processing unit augments data by rearranging the order of adjacent nodes having the same terminal number.

27. The graph natural language processing device according to claim 19, characterized in that the processing unit augments data by rearranging the order of the nodes of interest that have the same maximum node order.

28. The graph natural language processing device according to claim 20, characterized in that the processing unit augments data by rearranging the order of the nodes of interest whose sum of node degrees is equal.

29. The graph natural language processing device according to claim 21, characterized in that the processing unit augments data by rearranging the order of the nodes of interest that are equal in distance from the centroid node.

30. The graph natural language processing device according to any one of claims 1 to 3, characterized in that the processing unit augments data with node tokens whose node attributes have been modified.

31. The graph natural language processing device according to any one of claims 1 to 3, characterized in that the processing unit augments data using node tokens obtained by swapping node attributes in nodes of the same node type but with different node attributes.

32. The graph natural language processing device according to any one of claims 1 to 3, characterized in that the processing unit augments data using node tokens obtained by swapping node attributes in nodes that are of the same node type, have the same node order, and have different node attributes.

33. The graph natural language processing device according to any one of claims 1 to 3, characterized in that, at an edge where a node is connected to only one end, the node token of the adjacent node is not set.

34. The graph natural language processing device according to any one of claims 1 to 3, characterized in that, at an edge where a node is connected to only one end, a node token representing an empty node is set at the adjacent node.

35. A graph natural language processing device according to any one of claims 1 to 3, characterized in that it takes a string of characters representing a part of the graph network shown by the graph data as input and outputs a string of characters representing the entire graph network.

36. A graph natural language processing device according to any one of claims 1 to 3, characterized in that it takes the text of an entire graph network as input and outputs text different from the text representing a graph network different from the input graph network.

37. A graph natural language processing device according to any one of claims 1 to 3, characterized in that it takes as input the text in which one or more node tokens in the text are replaced with hidden characters, and outputs node tokens representing the hidden characters.

38. A graph natural language processing device according to any one of claims 1 to 3, characterized in that it takes the text of the entire graph network as input and outputs the feature quantities of the graph network.

39. The graph natural language processing device according to any one of claims 1 to 3, characterized in that the graph network shown by the graph data relates to a circuit, the node type is the type of circuit component, and the node attribute includes circuit constants or the circuit model number.

40. The graph natural language processing device according to claim 39, characterized in that circuit components and ground are nodes, and wiring excluding ground is an edge.

41. The graph natural language processing device according to any one of claims 36 to 38 and 40, characterized in that the processing unit connects a node with a node order of 1 and a ground node representing the ground with an edge.

42. The graph natural language processing device according to any one of claims 36 to 38 and 41, characterized in that the processing unit deletes nodes adjacent only to ground nodes representing ground.

43. The graph natural language processing device according to any one of claims 36 to 38, characterized in that the processing unit receives the training data, which is graph data, and abnormal data obtained by swapping the node types of the training data, determines the training data to be normal, and determines the abnormal data to be abnormal.

44. The graph natural language processing device according to 43, characterized in that the processing unit classifies the node types of the training data and the node types of the abnormal data.

45. The graph network shown by the graph data relates to an inorganic compound, and the processing unit adds hydrogen atoms as nodes to nodes whose valence is less than the number of edges, and connects them to satisfy the valence, as described in any one of claims 1 to 3.

46. ​​The graph network relates to mesh data of the finite element method, and the processing unit adds edges between adjacent nodes for nodes with a node degree of 2 or less, and outputs a graph network with a node degree of 3 or more, as described in any one of claims 36 to 38.

47. The graph natural language processing device according to claim 3, characterized in that the second delimiter is a half-width space.

48. The graph natural language processing device according to 47, characterized by comprising a whitespace tokenizer for splitting strings.

49. A graph natural language processing device according to any one of claims 1 to 3 and 47, characterized by comprising a sentence piece tokenizer for splitting a string.

50. The graph natural language processing device according to any one of claims 25 to 30, characterized in that the processing unit creates a string in which two or more node tokens have been modified.

51. The graph natural language processing device according to any one of claims 31 to 33, characterized in that the processing unit creates a string by swapping two or more node tokens.

52. The graph natural language processing device according to claim 40, characterized in that the processing unit augments data by making the equivalent circuit including parasitic components of the circuit components into the graph network.

53. The graph natural language processing device according to claim 40, characterized in that the processing unit augments data by making the equivalent circuit, which includes parasitic capacitance or residual inductance between circuit components, between circuit components and wiring, between wirings, and between wirings, into the graph network.

54. The graph natural language processing device according to claim 2, characterized in that the processing unit makes the order in which the nodes of interest and the first delimiter for the nodes of interest are written equal for all of the nodes of interest.

55. The graph natural language processing device according to any one of claims 36 to 39, 49, and 50, characterized in that the processing unit creates the text by learning from scratch.

56. A graph natural language processing method using a graph natural language processing device, comprising: an extraction unit extracting nodes from graph data that include node types and node attributes; and a processing unit outputting text that combines node tokens obtained by combining the node types and node attributes extracted by the extraction unit, node tokens of the node of interest in the graph data, and node tokens of adjacent nodes of the node of interest.

57. A program to cause a computer to function as: an extraction unit that extracts nodes including node types and node attributes from graph data; a processing unit that outputs text containing node tokens formed by combining the node types and node attributes extracted by the extraction unit, node tokens of the node of interest in the graph data, and node tokens of the adjacent nodes of the node of interest.