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 word nodes and edge tokens, reducing data augmentation and computational costs, and maintaining graph data characteristics.

WO2026100102A1PCT 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 creates word nodes by combining node types and attributes, and edge tokens by combining word nodes at both ends of edges, eliminating the need for node ID sequences and reducing data augmentation.

Benefits of technology

This approach allows for efficient conversion of graph data into text without inflating data volume, maintaining unity and reducing computational complexity, while preserving the characteristics of the graph data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2025007340_15052026_PF_FP_ABST
    Figure JP2025007340_15052026_PF_FP_ABST
Patent Text Reader

Abstract

A graph natural language processing device (1) comprises: a node extraction unit (12) that extracts nodes each including a node type and node attributes from graph data; an edge extraction unit (13) that extracts edges between nodes from the graph data; and a processing unit (14) that creates word nodes by combining the node types and the node attributes extracted by the node extraction unit (12), creates an edge token by combining word nodes corresponding to the nodes at both ends of each edge extracted by the edge extraction unit (13), and outputs text in which one or a plurality of edge tokens are arranged.
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. This technique converts objects into graph information, which is a graph network, and then converts the graph information into text.

[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 from graph data without artificially inflating the data by the number of different node ID sequences that result from assigning node IDs.

[0011] The graph natural language processing device according to this disclosure includes a node extraction unit that extracts nodes including node types and node attributes from graph data, an edge extraction unit that extracts edges between nodes from graph data, a processing unit that creates word nodes by combining the node types and node attributes extracted by the node extraction unit, creates edge tokens by combining word nodes corresponding to the nodes at both ends of the edges extracted by the edge extraction unit, and outputs text consisting of one or more edge tokens.

[0012] The graph natural language processing device according to this disclosure creates word nodes by combining the node type and node attributes of nodes extracted from graph data, creates edge tokens by combining word nodes corresponding to the nodes at both ends of an edge extracted from graph data, and outputs text consisting of one or more edge tokens. As a result, node IDs are replaced with word nodes that combine the node type and node attributes, so the graph natural language processing device according to this disclosure can create text from graph data without augmenting the data by the number of different node ID sequences that result from assigning node IDs.

[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 block diagram showing a hardware configuration that realizes the functions of a graph natural language processing device according to Embodiment 1. This is a block diagram showing a hardware configuration that executes software that realizes the functions 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 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 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 in Embodiment 4. This is a circuit diagram showing the equivalent circuit of the circuit to be processed in Embodiment 5. This is a diagram showing an example of a graph network (1) in Embodiment 5. This is a diagram showing an example of a graph network (2) in Embodiment 5. This is a diagram showing an example of a graph network (3) in Embodiment 5. This is a diagram showing each model in Embodiment 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. The function of converting from graph data to text data and the function of converting from generated text data back into graph data are conversion and inverse conversion. If the natural language processing device is a 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 that temporarily stores 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 device.

[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, node attributes, edges, edge types, and edge attributes. Graph data that does not have node types or node attributes is composed of nodes and edges. For example, when representing a molecule as a graph, atoms are set as node types, and bonds between atoms are set as edges. Edge types are set to, for example, covalent bonds or atomic bonds between atoms, and edge attributes are set to, for example, bond energy.

[0020] Node attributes can, for example, be set to the mass of an atom. When representing a molecule in a graph, it is not necessary to assign the type of atom to the node attribute in order to determine the mass of the atom. However, for example, when representing a carbon atom in a graph, if you set the node type to carbon and the isotope value to the node attribute, the graph data can include isotopic information. Note that carbon has isotopes carbon-12, carbon-13, and carbon-14 that exist in nature, and the existence of isotopes carbon-8 through carbon-22 that can be artificially created is also known.

[0021] Node types or node attributes, and edge types or edge attributes, do not necessarily have to be part of the definition of graph data, but they do form the characteristics of graph data. For this reason, many graph data have 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 extracts nodes from the 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 the graph 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 the nodes. 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. Almost all graphs have at least one of either node attributes or node type information. However, even if a node does not have node attributes or node type, all nodes can be assigned node attributes or node type by setting the number of edges connected to the node as a node attribute, or by defining one or more nodes in the graph and setting the distance from that node as a node attribute.

[0025] (Edge Extraction Unit) The edge extraction unit 13 extracts edges from the graph data acquired by the graph data acquisition unit 11. In edge extraction, the unit focuses on the nodes included in the graph and extracts the edges connected to the ends of the nodes. 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 edges that make up the multi-edge by using the edge ID, which exists only once in the graph.

[0026] (Processing Unit) The processing unit 14 has the function of creating a node (hereinafter referred to as a word node) by combining the node type and node attributes of the node extracted by the node extraction unit 12, creating an edge token by combining word nodes corresponding to the nodes at both ends of the edge between nodes extracted by the edge extraction unit 13, and outputting text consisting of one or more edge tokens. Here, a token is the unit used in natural language processing when converting a sentence into a small unit such as a word or string. The processing unit 14 creates a word node by combining the node type and node attributes as a single word. At this time, the processing unit 14 may store this word node and a node ID or node name as a set, and may also store an edge ID or edge name and a node ID or node name as a set. As a result, when the processing unit 14 selects an edge from the graph, for example, it can identify the nodes connected to both ends of the selected edge from the node ID or node name, and thus associate the edge with the word node.

[0027] Note that the graph natural language processing device 1 may include a display processing unit not shown in FIG. 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 display device provided separately from the graph natural language processing device 1, or may be a display unit included in the graph natural language processing device 1. Further, the display device may be a display unit included in an external device that is communicatively connected to the graph natural language processing device 1 via a network.

[0028] Also, the graph natural language processing device 1 may include an output unit not shown in FIG. 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 to a graph neural network as graph data. The graph neural network is a neural network that learns a graph structure using the input graph data. The output unit may also output part 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). For example, the node extraction unit 12 extracts the node type from the graph data and then extracts the node attributes. The edge extraction unit 13 extracts edges from the graph data acquired by the graph data acquisition unit 11 (step ST3). If necessary when extracting nodes connected to both ends of an edge, the node extraction unit 12 may also extract node IDs or node names from the graph data. These are used only for node extraction and do not appear in the output of the processing unit 14.

[0031] Graph data includes those with node types and node attributes, those without at least one of them, those with edge types and edge attributes, or those without at least one of them. Hereinafter, the graph data having node types and node attributes will be described. However, the graph natural language processing device 1 is also applicable to graph data having only node types without node attributes or graph data having only node attributes without node types. For example, in graph data having only node types, it is desirable to set the node attributes to blank and make the node types equal to word nodes.

[0032] The processing unit 14 executes the creation process (step ST4). Here, the processing unit 14 creates a word node by combining the node type and node attributes of the nodes extracted by the node extraction unit 12 as one word, creates an edge token by combining the word nodes corresponding to the nodes at both ends of the edge extracted by the edge extraction unit 13, and creates and outputs a text by arranging the created edge tokens.

[0033] The processing unit 14 may separate node types and node attributes by assigning a common delimiter. The delimiter used to separate node types and node attributes must be a character or string that does not appear in the created text data and must be a different character or string from the delimiter used in the text data consisting of edge tokens. Embodiment 1 uses three delimiters: the first is a delimiter that separates node types and node attributes, the second is a delimiter that separates word nodes, and the third is a delimiter that separates edge tokens. In particular, in natural language processing, the third delimiter is used to divide the text into words that can be processed in natural language, i.e., edge tokens in this embodiment, and then a method called one-hot encoding or indexing is applied, which replaces each edge token with a number in a lookup table, to convert the text into a numerical sequence. In natural language processing, a processing program for dividing into edge tokens is called a tokenizer. This tokenizer needs to define the first and second delimiters in order to divide the text into edge tokens. In other words, the first and second delimiters must be selected so that they are not split by the tokenizer. Specifically, the first delimiter must not be the same as the third delimiter, nor a delimiter containing the third delimiter must be selected, the first delimiter must be selected so that part of the string formed by the combination of the node type, node attribute, and the first delimiter does not become the third delimiter, and the second delimiter must be selected so that part of the string formed by the combination of the first and second word nodes and the second delimiter that constitute the edge token does not become the third delimiter. Alternatively, if the word node or edge token contains the third delimiter, the third delimiter contained in the word node or edge token is replaced with a first character that does not contain the third delimiter.Then, by using the replaced word nodes or edge tokens as text separated by a third delimiter, the tokenizer can split the text into elements containing only edge tokens. By defining the third delimiter in this way, the tokenizer can split the text using only the third delimiter, without splitting it using the first and second delimiters.

[0034] For example, if the string indicating the node type is "AA-B" and the string indicating the node attribute is "C", and the character "-" is used as a delimiter to separate the node type and the node attribute, the word node created by combining the node type and node attribute with the delimiter will be "AA-B-C". Here, since the character "-" is a delimiter included in the string indicating the node type "AA-B", it is not possible to determine which characters constitute the node type, and therefore the node type and node attribute cannot be separated.

[0035] Therefore, the processing unit 14 uses characters such as ":::" that are not included in the string indicating the node type or node attribute as delimiters to create the word node "AA-B:::C". In the string indicating the word node "AA-B:::C", it is clear which characters are the node type and which are the node attribute, and the node type and node attribute can be extracted from the word node alone.

[0036] Furthermore, if node type and node attribute can be extracted from a word node without using delimiters, then delimiters are not necessary. For example, when a node represents a carbon atom, the node type is a string that does not contain numbers, and the node attribute is a string that contains only numbers. In a word node formed by combining these strings as a single word, the node type and node attribute can be separated by the position of the numbers. In this case, the node type and node attribute can be extracted from the word node, and delimiters are not required.

[0037] Furthermore, if all the strings indicating the node types in the graph data are known, and it is known that even if a part of the string indicating the node type is combined with a part of the string indicating the node attribute, the part of the string indicating the node attribute will not be included in the string indicating the node type, then the processing unit 14 does not need to use a delimiter to create word nodes.

[0038] 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, it is impossible to determine whether the word node "AB", which is created by combining the node type "A" and the node attribute "B" without using a delimiter, is a word node "AB" without a node attribute, or a word node that combines a node type and a node attribute. Therefore, the processing unit 14 uses a delimiter such as the string ":::", which is not included in the string indicating the node type or node attribute, to create the string "A:::B" as a word node.

[0039] However, in a word node, the order in which characters indicating the node type and characters indicating the node attribute are combined does not matter. Therefore, the processing unit 14 may use the string "BA", which is formed by arranging characters indicating the node type next to characters indicating the node attribute, as a word node. 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.

[0040] The processing unit 14 may create word nodes that each have two or more node types or node attributes. In this case, the processing unit 14 outputs a string representing all the nodes included in the graph data in the same order, and further uses a character or string that is different from the string used as a delimiter, such as ":::", and is not included in the string representing the node type or node attribute, as a delimiter.

[0041] For an edge where a node is connected to only one end, the edge token is a string formed by combining a word node and a word node indicating an empty node attribute. That is, if a word node is connected to only one end of an edge, the processing unit 14 defines a new word node indicating that the other end of the edge is empty (Representation Method A). For example, if the string indicating the word node connected to one end of the edge is "A:10" and the word node indicating that it is empty is "None", the processing unit 14 creates the string "A:10-None" as the edge token. However, if "None" is defined, when converting the text to a graph, unlike other nodes, a "None" node is not created, and the edge corresponding to the edge token containing "None" must be an edge where a node is connected to only one end. Alternatively, the edge token of an edge where a node is connected to only one end can be treated as a word node. That is, the processing unit 14 may treat the edge token of an edge where a node is connected to only one end as a word node (Representation Method B). For example, if the string representing a word node is "A:10", then the string representing the edge token will also be "A:10".

[0042] By using representation method A or representation method B, word nodes can be created even if no nodes are connected to any end of an edge. In natural language processing, each word is assigned a token, so if even a part of a word is different, that word will be assigned a different token. Therefore, by using representation method A or representation method B, it is possible to create word nodes in which the node type and node attributes can be separated.

[0043] 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 node types. However, if there is only one node type in the graph data, only node attributes may be used. Furthermore, a node type may not have any node attributes. In addition, a node may have two or more node types and at least one of two or more node attributes. 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."

[0044] 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.

[0045] 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, which is arbitrary. Furthermore, it creates an inequality in the graph generation where "_1" is more likely to be assigned as the node ID.

[0046] 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.

[0047] 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 involved creating 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.

[0048] 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 x 10 factorials or more texts must be created, and these texts must then be processed using natural language processing.

[0049] 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. Therefore, bias occurs when generating text data about graph data in graph natural language processing.

[0050] The increase in the amount of text mentioned above becomes a significant problem when graphically representing molecules or genes with limited node types. For example, molecules containing many carbon or hydrogen atoms have a high degree of freedom and arbitrariness in assigning node IDs. Similarly, DNA or RNA, which are genetic materials, are composed of only five types of nucleic acid bases—adenine, guanine, cytosine, thymine, and uracil—and therefore have a high degree of freedom and arbitrariness in assigning node IDs.

[0051] The atoms that make up a molecule or the nucleic acid bases that make up a genetic material each possess the same properties. 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.

[0052] (Creation of word nodes) In the graph natural language processing device 1, instead of node IDs, word nodes are created by combining node types and node attributes, and edge tokens are created by combining word nodes. As a result, node IDs are replaced with word nodes, and the graph natural language processing device 1 can uniquely create text data from graph data without having to augment the data by the number of different node ID sequences that would result from assigning node IDs.

[0053] 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 the node type is set to people of the same nationality, then in large graph data, there will be many people of the same nationality. Therefore, the node type cannot replace the node ID, which requires uniqueness to mean that there is only one in the graph data. The same applies to node attributes; if height or weight is set as a node attribute, it is expected that there will be many people with the same height and the same weight, and therefore it cannot replace the node ID.

[0054] In contrast, the word nodes created by the processing unit 14 utilize the fact that combining node types and node attributes improves unity, and can serve as a substitute for node IDs. For example, a word node created by combining "nationality," which is set as the node type, with "height" and "weight," which are set as node attributes, has enough unity to serve as a substitute for a node ID. Furthermore, by combining elements such as "gender," "age," or "place of residence" in addition to "nationality" as the node type, the unity of the word node is improved, making it possible to substitute for a node ID. In this way, by using word nodes, graphs can be represented without using node IDs, and as a result, graph data can be converted into text.

[0055] (Creation of edge tokens by combining word nodes) When there are few types of nodes, node attributes are discrete values, and the graph is large, many identical word nodes may occur, and it may not be possible to guarantee unity with word nodes alone. However, even if a word node does not have unity on its own, it can be identified by its relative relationship with the surrounding nodes, which are called "adjacent nodes," so this word node can be converted into text data without losing the characteristics of the graph data. Therefore, the processing unit 14 combines the word nodes connected to both ends of an edge as a single word to create an edge token. In other words, the processing unit 14 does not create edge tokens for edges that do not have nodes connected to both ends. This further improves the unity of word nodes and can serve as a substitute for node IDs.

[0056] In word nodes, a colon ":" is used as a delimiter, placed between the node type and the node attribute. However, if the node type and node attribute are separable strings, a delimiter is not required in word nodes. 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 as a graph, a word node 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 string indicating the node type and the string indicating the node attribute, the string indicating the word node can be represented as "height:nationality".

[0057] Assuming all country names are known, "nationality" is not represented by a number, while "height" is. Therefore, a word node 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 word node may be represented by the string "nationality height" or "height nationality". By replacing all nodes in the graph data with word nodes in this way, the increase in computational complexity can be suppressed without increasing the data volume 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.

[0058] Furthermore, 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 as a graph, depending on the position of the strings in the text data created by the processing unit 14, the numerical value corresponding to the string "height (m)" may be created as the numerical value corresponding to the string "weight (kg)", resulting in abnormal data being created with the combination of "height" and "weight", or text data containing only "height" without "weight" may be created, or multiple text data containing only "height" may be generated. For example, the numerical value corresponding to height (m) becoming 70 (kg) is a result of abnormal data being created. Since this text data cannot be converted into a graph, it needs to be processed as abnormal data where physical constraints are not maintained.

[0059] In learning natural language processing of text data, using text data that includes word data, where node types and node attributes are combined as single words, enables learning while maintaining physical constraints. Furthermore, the text data containing word data is created while maintaining physical constraints. Therefore, all text data created by the processing unit 14 can be converted into graphs.

[0060] As mentioned above, word nodes do not need to have individual uniqueness, but for example, if the same word node is used only once in the graph data, it cannot be learned as a feature of the text data. Also, if the number of significant digits for "height" and "weight" set in the node attributes is set to nine digits, for example, statistically there is only one person on Earth with the same height and weight, making it difficult to learn as a feature of the graph data. For example, if "height" has nine digits and "weight" has nine digits, that's 18 digits. Even if the Earth's population is 7 billion, the probability of choosing 7 billion out of 18 digits, i.e., 100 quadrillion, increases, so even assuming that height or weight has a specific distribution, it is highly likely that they will only be used once. Furthermore, even if each has four digits, adding conditions other than height and weight can create word nodes that are used only once in the dataset.Therefore, the processing unit 14 may create text data as training data for natural language processing and text data used for graph inference by natural language processing so that the same word nodes are included.

[0061] Next, we will describe the edges that connect word nodes. Hereafter, we will assume that word nodes 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.

[0062] Although the direction or sign of an edge can be set as one element of the edge attributes, the edge information is replaced by the word nodes 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.

[0063] Nodes included in the graph data are replaced with word nodes, so from a single edge, two word nodes connected to both ends can be extracted. Processing unit 14 creates an edge token by combining the extracted word nodes. Word nodes do not necessarily need to be connected by a delimiter, but in the following explanation, ":" is used as the delimiter for word nodes and "-" is used as the delimiter for edge tokens. Furthermore, it is necessary to select a delimiter so that the same string does not occur in combinations of node types and node attributes, or combinations of word nodes. Note that if word nodes can be split without using a delimiter, it is not necessary to use one.

[0064] When representing a social network as a graph, if two word nodes, "Nationality A: Height B" and "Nationality C: Height D," are connected via an edge, the edge token becomes "Nationality A: Height B - Nationality C: Height D." By combining word nodes as a single word to create an edge token in this way, the uniqueness that was insufficient with word nodes alone can be enhanced through the relationship between word nodes and their adjacent word nodes. Therefore, the graph can be represented using text data without using node IDs and node names.

[0065] Furthermore, if a word node contains the same character as the delimiter, it is desirable not only to change the delimiter but also to replace the character identical to the delimiter in the word node with a different character or string. For example, in a word node, the delimiter may be a half-width space. In this case, the processing unit 14 either deletes the half-width space contained in the word node from the edge token, or replaces the half-width space with a character other than a half-width space. As a character other than a half-width space, for example, it can be replaced with a tab "¥t". This makes it possible to use a half-width space as a delimiter, which is easier to work with in natural language processing.

[0066] Given an edge token with the string "Nationality A: Height B - Nationality C: Height D", we can see that there are two word nodes: the string "Nationality A: Height B" and the string "Nationality C: Height D". Furthermore, the word node for the string "Nationality A: Height B" has the node type "Nationality A" and the node attribute "Height B". Additionally, the word node for the string "Nationality C: Height D" has the node type "Nationality C" and the node attribute "Height D". In this case, the word node for the string "Nationality A: Height B" and the word node for the string "Nationality C: Height D" are connected via an edge.

[0067] In Embodiment 1, graph data can be represented by combining four different types of information: node ID, node type, node attribute, and edge ID. When converting graph data to text data, if a string assigned node ID 1 is represented as "Node ID 1 Node Type a Edge 1 Edge 2 Edge 3 Node Attribute b", and a string assigned node ID 2 is represented as "Node ID: 2 Node Type c Edge 4 Node Attribute d", then it is necessary to generate text data in an appropriate order and number according to each node ID. In this case, the number of edges can change, and the number of edges can be modified.

[0068] On the other hand, the number of node attributes is such that, for example, there is one attribute for a specific node ID. Whether there are zero or two or more node attributes, text data cannot be converted into a graph. Therefore, it is treated as abnormal text data.

[0069] Furthermore, the order in which data is generated is a physical constraint required when representing a graph; all node and edge information must be generated in a fixed order and in a fixed number of instances. For example, if the string assigned to node ID 1 is "Node ID 1 Edge 1 Edge 2 Edge 3 Node type a Node attribute b" and the string assigned to node ID 2 is "Node ID 2 Node type c Edge 4 Node attribute d", then this text cannot be converted into a graph because it contains strings with two node IDs in different orders. For text data to represent information as a graph, the order and number must be appropriately assigned to all node IDs.

[0070] Furthermore, it is necessary to generate node types and node attributes that are closely related. For example, if the node types are "walking" and "car," and the node attribute is "speed," then walking at 100 km / h is unrealistic. Therefore, if a word node with the string "walking: 100 km / h" is created, it should be judged as abnormal data. In this way, node types and node attributes are closely related.

[0071] In contrast, if we use the combination of strings "car: 100 km / h" and "walking: 3 km / h" as word nodes, no abnormal characteristics will arise in the generation of text data using natural language processing. Furthermore, since only edge tokens containing node information and connection information between nodes are generated, all generated text data can be converted into a graph. However, such word nodes have the disadvantage that the combination of node type and node attributes cannot be freely selected in natural language processing.

[0072] Therefore, we propose a method for changing node attributes for each node type. For example, the processing unit 14 may have a processing unit that augments data with edge tokens that have word nodes with modified node attributes. Although not shown in Figure 1, this processing unit uses domain knowledge to create word nodes for strings with varying speed values, such as "car: 30 km / h" and "car: 50 km / h", in addition to the string "car: 100 km / h", and replaces the string "car: 100 km / h" in the graph with these word nodes to create text. This improves the degree of freedom in natural language processing representation of the text data created by the processing unit 14.

[0073] Furthermore, the processing unit 14 may have a processing unit that augments data with edge tokens having word nodes that have undergone at least one of the following: changing the node attributes of nodes of the same node type but with different node attributes, or swapping node attributes between nodes.Although not shown in Figure 1, if the number of nodes included in the graph data is sufficiently large, this processing unit creates word nodes of the same node type but with node attributes changed to different attribute values, and augments data with edge tokens having the created word nodes. For example, if the string "car: 48 km / h" is in the graph or another graph, the processing unit 14 creates text data in which word nodes with the string "car: 100 km / h" in different nodes in the same graph or in another graph are replaced with word nodes with the string "car: 48 km / h". In this way, the processing unit 14 can improve the expressiveness of text in natural language processing within the constraint that it must be convertible to a graph by increasing the number of combinations of node types and node attributes. Furthermore, the processing unit may augment data with edge tokens having word nodes that have undergone at least one of the following: swapping node attributes between nodes.

[0074] However, randomly swapping node attributes without domain knowledge may generate abnormal graphs. Therefore, the processing unit 14 may have a processing unit that augments data with edge tokens that have word nodes in which at least one of the following has been performed: changing the node attributes of nodes that are the same node type and node degree but have different node attributes, or swapping node attributes between nodes. This processing unit is not shown in Figure 1, but for example, it augments data by creating edge tokens that have word nodes in which the node attributes of nodes that are the same node type and node degree but have different node attributes have been changed. This reduces the possibility that the created text will result in an abnormal graph.

[0075] Furthermore, if there is sufficient graph data in a large graph or dataset, the processing unit 14 may augment the data by using domain knowledge to create text data using node attribute values ​​that satisfy specific conditions, based on the node type or node attribute of adjacent nodes of word nodes. Alternatively, the processing unit 14 may augment the data by calculating the range or distribution of node attribute values ​​and creating text data based on that range or distribution.

[0076] Furthermore, the processing unit 14 may calculate the range or distribution of node attribute values ​​for a single node type from multiple nodes of the same node type but with different node attributes, and create new node attributes that conform to that distribution or range.

[0077] Data augmentation is also known as "data extension." For example, data extension can be performed by creating multiple data points from a single data point, such as by performing affine transformations that rotate or stretch image data, or by extracting a part of an image to create a new image. This improves the breadth of the dataset, i.e., increases its coverage. As a result, it can suppress overfitting that occurs when the model falls to a minimum value due to increased expressive power, or overfitting that occurs when the model memorizes all the training data.

[0078] Furthermore, since the amount of data subject to natural language processing is enormous, obtaining new data takes priority over data augmentation. Therefore, data augmentation can be performed by using domain knowledge to replace words with synonyms or by rearranging the order of sentences.

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

[0080] Furthermore, the processing unit 14 may change the node type based on domain knowledge. For example, carbon atoms and silicon (Si) atoms have the same node order of 4 and similar properties. Therefore, the processing unit 14 may augment the data by changing elements other than node attributes, such as by replacing some or all of the carbon atoms in the molecule with silicon atoms.

[0081] 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.

[0082] 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 as type B, 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 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.

[0083] 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 trivial to replace node IDs with word nodes in a graph or graph neural network. Furthermore, unlike when node IDs are assigned, replacing node IDs with word nodes does not necessarily guarantee unity.

[0084] Therefore, in the graph natural language processing device 1 according to Embodiment 1, the characteristics of a node are expressed relatively in relation to the surrounding nodes by combining word nodes connected to both ends of an edge. As a result, the graph natural language processing device 1 can suppress the generation of graph data with abnormal characteristics without using node IDs.

[0085] 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 word nodes that combine node type and node attribute to be included in the nodes.

[0086] Specifically, if we use the colon ":" as the delimiter between node type and node attribute, the graph shown in Figure 3 yields word nodes with the string "A:1000", word nodes with the string "B:1", word nodes with the string "B:10", and word nodes with the string "C:100". Furthermore, the graph shown in Figure 3 has the following four edges: The edge with the string "Edge ID: 1" connects the word node "C:100" and the word node "A:1000". The edge with the string "Edge ID: 2" connects the word node "B:1" and the word node "B:10". The edge with the string "Edge ID: 3" connects the word node "A:1000" and the word node "B:10". The edge with the string "Edge ID: 4" connects the word node "B:10" and the word node "C:100".

[0087] If the delimiter between word nodes is "-", the edge tokens will be the strings "C:100-A:1000", "B:1-B:10", "A:1000-B:10", and "B:10-C:100". Next, the processing unit 14 places a delimiter " " (space) between the edge tokens. For example, the processing unit 14 outputs the text data "C:100-A:1000 B:1-B:10 A:1000-B:10 B:10-C:100".

[0088] A tokenizer is a tool used in natural language processing to divide text data into words. The delimiter " " is a delimiter that can be used by the tokenizer. However, the delimiter included in a word node is not limited to " ". For example, any character or string that can be used by the tokenizer as a delimiter, is not included in any of the edge tokens, and is not included in any combination of edge tokens can be used.

[0089] When a half-width space is used as the delimiter, a whitespace tokenizer may be used. For example, if the string "&&&" is used as the delimiter, the tokenizer can separate the words before and after "&&&" when it appears in the text data. The delimiter between edge tokens can be freely selected as long as it is a character or string that the tokenizer can use to divide the text data into words in natural language processing.

[0090] As described above, since the tokenizer does not use spaces as delimiters in the text data that it processes, the processing unit 14 can use spaces as delimiters to create word nodes or edge tokens. In particular, although the processing unit 14 creates text data that includes delimiters, in natural language processing only the characters before and after the delimiters are considered, so the text data obtained as a result of natural language processing does not include the delimiters as tokens. In other words, in learning and inference in natural language processing, delimiters between edge tokens are not included as tokens, and in the generation of text data, tokens representing delimiters between edge tokens are not included.

[0091] However, in order to convert the generated sequence of tokens back into the original edge tokens and represent those edge tokens as a string, a delimiter between edge tokens may be used as a post-processing step after natural language processing inference. In this case, the delimiter used to arrange the edge tokens from the graph and the delimiter used to convert the generated edge tokens into text do not need to be the same, as long as the natural language processing can reliably recognize them as delimiters between edge tokens. Any delimiter can be used.

[0092] 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, but they may also be a CPU that executes a program stored in memory, a GPU, TPU (Tensor Processing Unit), or NPU (Neural network Processing Unit) that executes a program or dataset stored in graphics memory.

[0093] Figure 4 is a block diagram showing the hardware configuration for realizing the functions of the graph natural language processing device 1. Figure 5 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 4 and 5, 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 device, which is a natural language processing device, or to a natural language processing unit (not shown in Figure 1) provided by the graph natural language processing device 1.

[0094] If the processing circuit is a dedicated hardware processing circuit 102 as shown in Figure 4, 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.

[0095] When the processing circuit is the processor 103 shown in Figure 5, the functions of the graph natural language processing device 1, namely the graph data acquisition unit 11, node extraction unit 12, edge extraction unit 13, and processing unit 14, 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.

[0096] 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.

[0097] 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.

[0098] 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.

[0099] 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, an edge extraction unit 13 that extracts edges between nodes from graph data, and a processing unit 14 that creates word nodes by combining the node types and node attributes extracted by the node extraction unit 12, creates edge tokens by combining word nodes corresponding to the nodes at both ends of the edges extracted by the edge extraction unit 13, and outputs text consisting of one or more edge tokens. Since node IDs are replaced by word nodes that combine node types and node attributes, the graph natural language processing device 1 can create text data from graph data without increasing the data volume by the number of different node ID sequences that result from assigning node IDs.

[0100] In the graph natural language processing device 1 according to Embodiment 1, the processing unit 14 outputs text with delimiters between edge tokens. As a result, the graph natural language processing device 1 can create text data that allows two or more edge tokens to be individually identified.

[0101] In the graph natural language processing device 1 according to Embodiment 1, the processing unit 14 has a processing unit that augments data with edge tokens having word nodes whose node attributes have been modified. This makes it possible to improve the expressiveness of text in natural language processing within the constraint that it must be convertible to a graph.

[0102] In the graph natural language processing device 1 according to Embodiment 1, the processing unit 14 has a processing unit that augments data with edge tokens having word nodes that have undergone at least one of the following: changing the node attributes of nodes of the same node type but with different node attributes, or swapping node attributes between nodes. This makes it possible to improve the expressiveness of text in natural language processing within the constraint that it must be convertible to a graph.

[0103] In the graph natural language processing device 1 according to Embodiment 1, the processing unit 14 has a processing unit that augments data with edge tokens having word nodes that have undergone at least one of the following: changing the node attributes of nodes that are the same node type, the same node order, and have different node attributes, or swapping node attributes between nodes. This reduces the possibility that the created text data will result in an abnormal graph.

[0104] In the graph natural language processing device 1 according to Embodiment 1, the processing unit 14 does not treat edges that are not connected to nodes at both ends as edge tokens. This further improves the unity of word nodes and allows for the substitution of node IDs.

[0105] In the graph natural language processing device 1 according to Embodiment 1, edge tokens of edges where a node is connected to only one end are defined as word nodes. This allows the graph natural language processing device 1 to create word nodes even if no node is connected to either end of an edge.

[0106] In the graph natural language processing device 1 according to Embodiment 1, the edge token of an edge to which a node is connected at only one end is a string formed by combining a word node and a word node indicating that it is an empty node attribute. As a result, the graph natural language processing device 1 can create a word node even if no node is connected at either end of the edge.

[0107] In the graph natural language processing device 1 according to Embodiment 1, the 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.

[0108] In the graph natural language processing device 1 according to Embodiment 1, half-width spaces contained in the output edge tokens and word nodes are removed, or half-width spaces are replaced with characters that do not contain half-width spaces. This makes it possible to use half-width spaces as delimiters, which are easier to work with in natural language processing.

[0109] In the graph natural language processing device 1 according to Embodiment 1, the node type is a discrete value, and the node attribute is a continuous value. As a result, the node type can be classified into classes, and the node attribute can be set to information related to the node type.

[0110] The graph natural language processing method according to Embodiment 1 includes the following steps: Step ST2 in which a node extraction unit 12 extracts nodes including node type and node attributes from graph data; Step ST3 in which an edge extraction unit 13 extracts edges between nodes from graph data; and Step ST4 in which a processing unit 14 creates word nodes by combining the node type and node attributes extracted by the node extraction unit 12, creates edge tokens by combining word nodes corresponding to the nodes at both ends of the edge extracted by the edge extraction unit 13, and outputs text consisting of one or more edge tokens. By executing the above method, the graph natural language processing device 1 can create text data from graph data without increasing the data volume by the number of different node ID sequences that occur when assigning node IDs.

[0111] A 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, an edge extraction unit that extracts edges between nodes from graph data, a processing unit 14 that creates word nodes by combining the node type and node attributes extracted by the node extraction unit 12, creates edge tokens by combining word nodes corresponding to the nodes at both ends of the edges extracted by the edge extraction unit 13, and outputs text consisting of one or more edge tokens. This makes it possible to create text data from graph data without increasing the data volume by the number of different node ID sequences that occur when assigning node IDs.

[0112] 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.

[0113] Figure 6 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 ST1A). 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.

[0114] The node extraction unit 12 extracts specific nodes from the graph data acquired by the graph data acquisition unit 11 (step ST2A). 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 ST3A).

[0115] (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.

[0116] 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.

[0117] If a specific node exists in the graph (step ST3A; 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 ST4A). 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.

[0118] The processing unit 14 connects edges to multiple new nodes (step ST5A). 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.

[0119] 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.

[0120] Next, the processing unit 14 deletes unnecessary edges (step ST6A). 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.

[0121] Next, the processing unit 14 deletes the specific node (step ST7A). 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.

[0122] If the processing up to step ST7A is completed, or if there is no specific node in the graph (step ST3A; NO), the node extraction unit 12 extracts the node type from the graph data converted by the processing unit 14 (step ST8A). Furthermore, the node extraction unit 12 extracts the node attributes from the graph data converted by the processing unit 14 (step ST9A).

[0123] Next, the processing unit 14 creates a word node by combining the node type and node attribute extracted by the node extraction unit 12 as a single word (step ST10A). Subsequently, the edge extraction unit 13 extracts edges from the graph data converted by the processing unit 14 (step ST11A).

[0124] The processing unit 14 creates an edge token by combining the word nodes connected to both ends of the edge extracted by the edge extraction unit 13 (step ST12A). Next, the processing unit 14 creates text by arranging the created edge tokens and outputs the text.

[0125] Next, the graph data in Embodiment 2 will be described. Figure 7 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, the node formed by combining node type B and node attribute 10 is the specific node. Since this specific node is connected to three edges, it is a multi-terminal node that has three pieces of information regarding connections to 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. For example, the processing unit 14 divides the multi-terminal node connected to three or more edges into the same number of terminal nodes as the number of edges connected to it, 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. Alternatively, the processing unit 14 may divide a multi-terminal node having three or more terminals into the same number of terminal nodes as the number of terminals, change the ends of the edges connected to the multi-terminal node from the multi-terminal node to connections to each terminal node, and delete the multi-terminal node.

[0126] 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.

[0127] Furthermore, the new nodes obtained through the splitting process can be identified as word nodes in combination with neighboring nodes, just like the nodes included in the original graph data, without the need to assign elements. For the sake of simplicity, node numbers will be assigned to the nodes obtained through the splitting process, and nodes will be identified by these node numbers. A node number is a unique identification number assigned to each node.

[0128] For example, as shown in Figure 7, if the string of a specific word node is "B:10", the processing unit 14 splits this node to create a word node with the string "B:10_1", a word node with the string "B:10_2", and a word node with the string "B:10_3" (notation (1)). This ensures that each node has different information.

[0129] Furthermore, by splitting a node attribute into two elements, it is possible to create a node with the string "B: [10, 1]", a node with the string "B: [10, 2]", and a node with the string "B: [10, 3]" (notation (2)). In this case, it is desirable to match the number of elements for unsplit word nodes, for example, by changing the string "A: 1000" to the string "A: [1000, None]".

[0130] Hereafter, new nodes created by splitting will be represented by notation (1). Furthermore, it is desirable to assign node numbers to new nodes according to certain conditions, such as the lexicographical order of adjacent word nodes. In Figure 7, node number "_1" is added to the split node adjacent to the word node whose string is "A:1000". Similarly, node number "_2" is added to the split node adjacent to the word node whose string is "B:1". Furthermore, node number "_3" is added to the split node adjacent to the word node whose string is "C:100". In addition to adjacent word nodes, if terminal numbers are defined for nodes, node numbers may be assigned in order of terminal numbers.

[0131] For example, when representing a semiconductor using graph data, its terminal numbers are clearly indicated in the manufacturer's published specifications. Therefore, based on the specifications, the terminal numbers can be used as node numbers and assigned to node attributes.

[0132] The processing unit 14 connects the edges that were previously connected to specific nodes to the newly created nodes. Specifically, it connects the word node with the string "A:1000" to the word node with the string "B:10_1" with an edge, connects the word node with the string "B:1" to the word node with the string "B:10_2" with an edge, and connects the word node with the string "C:100" to the word node with the string "B:10_3" with an edge. As a result, as shown in Figure 7, the strings of the word nodes become "A:1000", "B:1", "B:10_1", "B:10_2", "B:10_3", and "C:100". Furthermore, the edge tokens will be strings such as "B:10_2-B:1", "B:10_1-A:1000", "B:10_3-C:100", and "C:100-A:1000".

[0133] These edge tokens are similar to those shown in Embodiment 1 and are suitable for natural language processing. Since these edge tokens are text data, the connections between nodes separated from the word node names are obvious. This means that it is not always necessary to connect the separated nodes. In a graph network, nodes that are not connected via edges are considered to have no connection. However, if the data is text, we can obtain text such as "B:10_1", "B:10_2", and "B:10_3". This means that even nodes that are not connected via edges can be returned to the graph as a single separated node.

[0134] As shown in Figure 7, not connecting the divided nodes reduces the number of elements in the text data, thereby reducing the types and number of tokens targeted for natural language processing. This reduces the computation time or cost required for training in natural language processing.

[0135] By reducing the types of tokens that can be selected in 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.

[0136] For example, when representing a computer circuit with graph data, the connections between 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 specific nodes are word nodes, bus wiring is converted into multi-edges. When the processing unit 14 converts multi-edges into text data, multiple identical edge tokens are created because the word nodes connected to both ends of the multi-edge are the same before and after the conversion. For example, if the node type is the string "CPU" and the node attribute is the number "1", and the node type is the string "Memory" and the node attribute is the number "1", the bus wiring is represented by the strings "CPU:1-Memory:1", "CPU:1-Memory:1", "CPU:1-Memory:1", and "CPU:1-Memory:1".

[0137] However, the edge token itself does 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 generated text data, and a netlist that can be simulated as a circuit is created from the graph. In this case, if the semiconductor terminal numbers 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.

[0138] 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 becomes a different edge token. For example, in the case of the semiconductor circuit described above, an edge token with the string "CPU: 1_1 - Memory: 1_1", an edge token with the string "CPU: 1_2 - Memory: 1_2", an edge token with the string "CPU: 1_3 - Memory: 1_3", and an edge token with the string "CPU: 1_4 - Memory: 1_4" are created. In the edge token, the number after 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. Here, "high accuracy" means that it is possible to input the netlist into the circuit simulator, or that no calculation errors occur when inputting into the circuit simulator, or that the generated graph matches the design requirements.

[0139] For example, in the graph data shown in Figure 3, the word node for the string "B:10" is set to "Company," and the word nodes 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 word node "B:10" representing the company is connected to the nodes representing multiple users via edges.

[0140] The user is interested in various aspects of the "company" indicated by the word node "B:10". 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 device 1 creates nodes by dividing the word node into multiple nodes based on the information corresponding to each aspect, and connects each of the created nodes to the user with an edge.

[0141] 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 missing in the text data. Also, as shown in Figure 7, the nodes newly created by the division do not necessarily have to be connected. As a result of the lack of connections, the graph data is insufficient. However, since the graph data is converted into text data and node numbers are assigned to the node attributes, the original single node can be reconstructed from only the word nodes.

[0142] Figure 8 shows an example (2) of a graph network in Embodiment 2. This example takes the 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. The processing unit 14 may provide one or more virtual nodes for a single multi-terminal node and connect terminal nodes via the virtual nodes. Usually, one virtual node is sufficient, but if there are many terminal nodes connected to one virtual node, all the node attributes of the terminals are concentrated in the virtual node, making it easier for the node attributes of the terminal nodes to be rounded up. In contrast, providing multiple virtual nodes divides the node attributes of the terminal nodes, thus suppressing information rounding. For example, rounding can be suppressed by providing virtual nodes that are about 1 / 10 the number of terminal nodes. For example, as shown in Figure 8, a word node with the string "B:10" can be used as a virtual node, and the word nodes "B:10_1", "B:10_2", and "B:10_3" can be connected via the virtual node. This is because word nodes that are not connected to edges cannot be converted into edge tokens.

[0143] In response, virtual nodes are used to create new edge tokens named "B:10-B:10_1", "B:10-B:10_2", and "B:10-B:10_3". The structure that connects the divided nodes using virtual nodes is called a star graph.

[0144] Furthermore, if the number of terminals to be divided is small, for example, 10 or less, a structure called a complete graph may be used where 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.

[0145] In Figure 8, the word nodes are "A:1000", "B:1", "B:10", "B:10_1", "B:10_2", "B:10_3", and "C:100". This corresponds to a star graph. As a result, edge tokens are created as follows: "B:10_1-B:10_2", "B:10_2-B:10_3", "B:10_3-B:10_1", "B:10_3-A:1000", "B:10_1-C:100", and "C:100-A:1000".

[0146] When the number of divided nodes is three, the number of edge tokens is six in both a star graph and a complete graph; there is no difference. As the number of divided nodes increases, the number of edges in a star graph increases proportionally to the number of nodes, whereas in a 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, in a complete graph, if the number of divided nodes is 10, 45 edge tokens are required, and if it is 100, 4950 edge tokens are required. Note that the divided nodes do not necessarily have to be connected, so if the number of nodes exceeds, for example, five, it is preferable to use a star graph. By replacing specific nodes with a star graph in this way, terminals without edge connections are also retained as part of the graph data.

[0147] Figure 9 shows an example (3) of a graph network in Embodiment 2. The star graph shown in Figure 9 has a structure in which a word node called "B:10-4", which is connected only to virtual nodes, is added to the star graph shown in Figure 8. The node degree of the word node "B:10-4" is "1".

[0148] For example, when representing a circuit with graph data, the word nodes "B:10", "B:10_1", "B:10_2", "B:10_3", and "B:10_4" are multi-terminal nodes representing "semiconductors". The word nodes "B:10_1", "B:10_2", "B:10_3", and "B:10_4" are terminal nodes representing "terminals". Of these, the word node "B:10_4" is connected to an edge at only one end, so it can be treated as an NC (Non-Connection) terminal.

[0149] When NC terminals are represented as shown in Figure 7, it is difficult to convert them into edge tokens because no edges are connected to the NC terminals. In contrast, the graph natural language processing device 1 according to Embodiment 2 represents nodes with a node order of 1, such as NC terminals, as shown in Figures 8 and 9, so that the terminal information can be converted into text data that can be processed in natural language.

[0150] While we have shown how to split nodes connected to multiple edges, even if a node is connected to four edges, such as a node representing a carbon atom, if there is no terminal information indicating the connection points—that is, if it doesn't matter which part of the carbon atom is bonded to a hydrogen atom and which part is bonded to an oxygen atom—then there is no need to split the node. This is because there is no information degradation when converting text data without terminal information into a graph structure.

[0151] For example, if an inorganic compound is represented by a graph network shown by graph data generated by graph natural language processing, 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.

[0152] Figure 10 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 10 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.

[0153] A node having characteristics asymmetric with respect to direction is defined as a directional node. In Embodiment 2, the 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 a different node type, i.e., different information, to each of the divided nodes.

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

[0155] As a result, the edge token between word node A:Sink and word node A:Source becomes "A:Sink-A:Source". In natural language processing, an edge token whose string is "A:Sink-A:Source" is processed as having a direction from sink to source.

[0156] In graph neural networks, processing directional nodes requires using a directed graph capable of processing directed edges to restrict the direction of the edges. Therefore, the graph natural language processing device 1 can preserve the directionality of nodes by dividing the directed nodes and treating them as undirected graphs. In particular, in graph neural networks, using directed nodes means that signals only propagate in the defined direction, making it impossible to handle the reverse bias characteristics of diodes. In contrast, the graph natural language processing device has no restrictions on the direction of signals, and by learning the dataset, the graph natural language processing device can acquire asymmetric characteristics.

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

[0158] The graph natural language processing device 1 processes a graph with directed edges as an undirected graph using edge tokens. That is, the processing unit 14 divides the nodes at both ends of a directional edge into two nodes each, and assigns a different node type to each of the divided nodes. For example, the nodes connected to both ends of a directed edge are divided into two nodes, with one node designated as a sink and the other as a source. The processing unit 14 designates “A:Sink”, “A:Source”, “B:Sink”, and “B:Source” as word nodes, connects the edge that was connected to the node representing information A to the word node “A:Sink”, and connects the edge that was connected to the node representing information B to the word node “B:Source”.

[0159] Since nodes A and B each possess only one piece of information, their node types are not changed, and only node attributes containing orientation information are added. Then, the nodes representing information A and B, which were directed edges, are connected by undirected edges, "A:Source" and "B:Sink". Additionally, because the previously separated nodes are connected by edges, the edge tokens become "A:Sink-A:Source", "A:Source-B:Sink", and "B:Sink-B:Source".

[0160] For example, in text generation, if the text contains the string "A: Source - B: Sink", it is converted into a graph as a directed edge from "A: Source" to "B: Sink". This allows the graph natural language processing device 1 to maintain directionality even when treating the directed graph as an undirected graph.

[0161] As described above, 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 connected to it, 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. This makes it possible to convert graph data into text data without losing terminal number information.

[0162] 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 terminals into the same number of terminal nodes as the number of connected 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. This makes it possible to convert graph data obtained by generation by the natural language processing device or node optimization, etc., into text data without losing terminal number information. Preferably, edges connected to the same terminal of a multi-terminal node are connected to the same terminal node.

[0163] In the graph natural language processing device 1 according to Embodiment 2, the processing unit 14 provides one or more virtual nodes for each multi-terminal node and connects the terminal nodes via the virtual nodes. This allows graph data obtained by generation by the natural language processing device or node optimization to be converted into text data without losing terminal number information.

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

[0165] 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 a different node type to each of the divided nodes. A directional node, such as a diode, can be processed using only an undirected graph.

[0166] 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 each, and assigns a different node type to each of the divided nodes. Nodes with directionality, such as diodes, can be processed using only an undirected graph.

[0167] Embodiment 3. In the graph natural language processing devices according to Embodiments 1 and 2, the order in which word nodes connected to both ends of an edge are connected is not defined. Therefore, even if the word nodes connected to both ends represent the same edge token, they may become different edge tokens depending on the order in which the word nodes are arranged. Therefore, the graph natural language processing device according to Embodiment 3 arranges the two word nodes of an edge token in lexicographical order. As a prerequisite, word nodes 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.

[0168] Furthermore, even if there are multiple node types, these node types are described in the same order within the graph. Similarly, even if there are multiple node attributes, these node types are described in the same order within the graph. For example, the node types "Nationality" and "Gender" can be represented in two ways: "Nationality_Gender" and "Gender_Nationality." Regardless of which representation is used, they are all represented in the same order within the graph data set. The same applies to node attributes.

[0169] Furthermore, when using delimiters for node type and node attribute, the same delimiter is used within the graph. These prerequisites are common to the data used for training or inference in natural language processing, and are common to both single graph data and multiple graph datasets. In Embodiment 1, as shown in Figure 3, the edge tokens are arbitrary in the prerequisites. Therefore, the edge tokens can be expressed as "C:100-A:1000", "B:1-B:10", "A:1000-B:10", and "B:10-C:100".

[0170] The processing unit 14 of the graph natural language processing device 1 according to Embodiment 3 focuses on the word nodes at both ends of an edge and creates an edge token "C:100-A:1000" by combining them. When the two word nodes included in this edge token are arranged alphabetically, "A" comes before the initial letter "C" in alphabetical order, so the order of "C:100" and "A:1000" is swapped, and it is represented as "A:1000-C:100". In addition to arranging word nodes alphabetically, word nodes may also be arranged under the same conditions for all data in the dataset based on the information that the node possesses, i.e., node information. As an example of node information, word nodes can be created based on conditions created by statistical processing such as the averaging or variance of attribute values, such as node type, node attribute, node degree, maximum node degree, type of edge connected to the node, edge attribute connected to the node, or a combination of these information. In this case, it is not necessary to use all node information.

[0171] The word nodes at both ends of “B:1-B:10”, “B:1-B:10”, “A:1000-B:10”, “A:1000-B:10”, “B:10-C:100”, and “B:10-C:100” are arranged in lexicographical order, so their order is not changed. The processing unit 14 uses these word nodes to create edge tokens composed of the strings “A:1000-C:100”, “B:1-B:10”, “A:1000-B:10”, and “B:10-C:100”.

[0172] If the delimiter between edge tokens is a space (" "), the processing unit 14 creates an edge token of the same name as "A:1000-C:100 B:1-B:10 A:1000-B:10 B:10-C:100", and this edge token becomes text data representing the graph data. Although sorting in ascending order of the dictionary has been explained, sorting in descending order of the dictionary is also acceptable if the word nodes in the graph are sorted under the same conditions. By sorting in dictionary order, the same edge token can be created from edges connected to the same word nodes at both ends, and the same text can be created from the same graph. In addition to the dictionary sort of 1, 10, 100, 2, 3, a natural sort of 1, 2, 3, 10, 100 can also be used, which sorts in the same order that a person would sort numbers.

[0173] In particular, if the order of word nodes representing edge tokens is not defined, data augmentation by rearranging the order becomes necessary. For example, for most edges, there are two possible rearrangements. Note that if the word nodes connected to both ends in a self-loop are the same, there is only one possible rearrangement, hence the phrase "most." If there are N edges, and the order is not defined, then 2 to the power of N data augmentation is required to treat all edges equally. For example, even in a small graph with about 10 edges, it is necessary to create text data represented by 1,024 edge tokens through data augmentation.

[0174] Therefore, the processing unit 14 of the graph natural language processing device 1 according to Embodiment 3 creates text data in which edge tokens are arranged in lexicographical order of the word nodes at both ends of the edge. By defining the order in which word nodes are arranged in the text data in this way, one edge token can be represented by a string that represents one edge token. This significantly reduces the amount of computation required for natural language processing.

[0175] As described above, in the graph natural language processing device 1 according to Embodiment 3, the processing unit 14 outputs edge tokens arranged based on the information contained in the word nodes at both ends of an edge. This allows each edge token to be represented by a string of one edge token, thereby significantly reducing the computational load required for natural language processing.

[0176] In the graph natural language processing device 1 according to Embodiment 3, the processing unit 14 outputs edge tokens arranged based on at least one of the following orders: node degree order, node type order, node attribute order, and lexicographical order, for the word nodes at both ends of an edge. As a result, one edge token can be represented by a string that represents one edge token, which significantly reduces the computational amount required for natural language processing.

[0177] Embodiment 4. In Embodiment 3, the order of the edge tokens themselves is not defined, so even with the same graph having the same edge tokens, different text will be output depending on the order in which the edge tokens are arranged. In contrast, the graph natural language processing device according to Embodiment 4 defines the order of the edge tokens. 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 with reference to Figure 1.

[0178] There are two ways to determine the order of edge tokens in Embodiment 4. The first is to determine the order of edge tokens by node degree. The second is to determine the order of edge tokens by distance from centroid node to edge. These will be explained in detail below.

[0179] (Determining the order of edge tokens based on node degree) The processing unit 14 creates text data in which the edge tokens are arranged in an order based on their node degree. For example, in the graph data shown in Figure 3, the node degree of the word node for the string "A: 1000" is "2", the node degree of the word node for the string "C: 100" is "2", the node degree of the word node for the string "B: 1" is "1", and the node degree of the word node for the string "B: 10" is "3". When these word nodes are arranged in order of node degree, they become "B: 10", "C: 100", "A: 1000", and "B: 1".

[0180] The edge tokens for each string, "C:100-A:1000", "B:1-B:10", "A:1000-B:10", and "B:10-C:100", are arranged in the order "B:1-B:10", "A:1000-B:10", "B:10-C:100", and "C:100-A:1000".

[0181] (Maximum Node Degree) For example, the processing unit 14 may have a processing unit that extracts the maximum node degree, which is the larger of the two word nodes that constitute each edge token, and arranges the edge tokens in order of maximum node degree. This processing unit, although not shown in Figure 1, extracts the node degrees of the word nodes connected to both ends of the edge from the two word nodes that constitute each edge token, sets the larger of the extracted node degrees as the "maximum node degree," and creates text by arranging the edge tokens in order of maximum node degree. For example, the maximum node degree of the edge token of the string "B:1-B:10" is the node degree of the word node of the string "B:10" which is "3." The maximum node degree of the edge token of the string "A:1000-B:10" is the node degree of the word node of the string "B:10" which is "3." The maximum node degree of the edge token of the string "C:100-A:1000" is the node degree of the word node of the string "C:100" which is "2." Furthermore, the maximum node degree of the edge token in the string "B:10-C:100" is the node degree of the word node in the string "B:10", which is "3". The processing unit 14 creates text data by arranging the strings of edge tokens "B:1-B:10", "A:1000-B:10", "B:10-C:100", and "C:100-A:1000" in order of maximum node degree. In this way, the processing unit 14 may arrange the edge tokens having the target node based on the node degree, or it may rearrange the edge tokens in order of the maximum node degree.

[0182] (Sum of Node Degrees) The processing unit 14 may have a processing unit that arranges edge tokens in the order of the sum of the node degrees of the nodes at both ends of each edge. This processing unit, although not shown in Figure 1, creates text data in which edge tokens are arranged in the order of the sum of the node degrees of the nodes connected to both ends of the edge. For example, in the edge tokens "A:1000-C:100", "B:1-B:10", "A:1000-B:10", and "B:10-C:100", the sum of the node degrees is "4" for "A:1000-C:100", "4" for "B:1-B:10", "5" for "A:1000-B:10", and "5" for "B:10-C:100". The strings formed by arranging edge tokens are "A:1000-B:10", "B:10-C:100", "B:1-B:10", and "A:1000-C:100". However, when arranging by node degree or sum of node degrees, the same degree may exist as described above. In this case, it is sufficient to rearrange the first word node in the edge tokens in lexicographical order, and if the first word nodes in the edge tokens are the same, it is preferable to rearrange by the second word node.

[0183] In edge tokens, if the first and second word nodes are the same, the edge tokens are the same, so it doesn't matter which one is written first, as they are the same edge token. Therefore, the processing unit 14 arranges the edge tokens using the same node degree, the sum of the node degrees of the two ends of the edge in the edge token, and lexicographical order. For example, if the edge tokens are arranged in the order of the sum of the node degrees of the word nodes connected to both ends of the edge, the edge tokens "A:1000-B:10", "B:10-C:100", "B:1-B:10", "A:1000-C:100" will be arranged as "A:1000-B:10", "B:10-C:100", "A:1000-C:100", "B:1-B:10".

[0184] Furthermore, the processing unit 14 may have a processing unit that sorts edge tokens by maximum node degree, and then sorts edge tokens with the same maximum node degree in order of the sum of their node degrees. Alternatively, the processing unit 14 may have a processing unit that sorts edge tokens with the same maximum node degree in lexicographical order. This processing unit, though not shown in Figure 1, sorts edge tokens with the same maximum node degree in lexicographical order. The processing unit 14 may also have a processing unit that sorts edge tokens with the same sum of node degrees in lexicographical order. This processing unit, though not shown in Figure 1, sorts edge tokens with the same sum of node degrees in lexicographical order. By sorting in these ways, the same text data can be created from the same graph.

[0185] The processing unit 14 may have a processing unit that arranges edge tokens corresponding to edges connected to nodes with terminal numbers in order of terminal number. Although not shown in Figure 1, when arranging edge tokens in order based on node degree, this processing unit outputs text in which edge tokens corresponding to edges connected to nodes with terminal numbers are arranged in order of terminal number or in order of edges connected to this node. When using a decoder model or sequence model (e.g., encoder-decoder model) that performs natural language processing to generate text data, input is often received from nodes with higher node degrees. By creating text data in which edge tokens are arranged in the above order, the constraint of natural language processing that input is received from nodes with higher node degrees can be reduced.

[0186] When processing text data representing a circuit using a decoder model, the text data input to the decoder model often represents large components with high node order, such as semiconductors, rather than small components like resistors or capacitors. This is because text data representing small components rarely represents the overall characteristics of the circuit, while text data representing high-node-order components more easily represents the overall characteristics, making it easier to construct the desired circuit. Thus, determining the order of edge tokens has the disadvantage of requiring the use of these characteristics, but it offers significant advantages that far outweigh the disadvantage of not being able to process graphs with natural language processing.

[0187] (Ordering edge tokens based on distance from centroid node) The processing unit 14 may have a processing unit that arranges edge tokens in order of distance from the centroid node, which is a single node, to each edge. This processing unit, although not shown in Figure 1, creates text data arranged in order of distance from the centroid node selected from the nodes extracted by the node extraction unit 12 to each edge. The centroid node may be, for example, a node that has a node type or node attribute that all data in the dataset has. In this case, the centroid node has a node type or node attribute that is common to all datasets, including multiple graphs. This makes it possible to specify a node that has a common node type or the same node attribute in all these datasets. Furthermore, when dealing with datasets containing multiple data, it is desirable to select a node that is common to all data, as this eliminates bias depending on how the centroid node is selected. In addition, the centroid node may be a node that has a node type or node attribute that exists only once in a single data. It is desirable that there is one centroid node per data, so that the centroid node is uniquely determined, and thus bias during generation can be eliminated by the selection of the centroid node. However, if, for example, a node is included in 90% of the data but not in the remaining 10%, then it is acceptable to select a node common to the 90% as the centroid node, and then select a node common to the remaining 10% as the centroid node. Even when a unique centroid node cannot be determined, it is desirable to select a node connected to a specific node, or a node with a high node degree, from among the candidate centroid nodes. This has the effect of allowing a centroid node to be defined for all datasets.

[0188] Figure 12 shows an example of a graph network in Embodiment 4. In Figure 12, the node "A:1000" is selected from among the nodes "A:1000", "B:1", "B:10", and "C:100" extracted by the node extraction unit 12 and is set as the centroid node. In this case, the distance of "A:1000" from the centroid node is "1" at edge 1 connected to the node "B:1", "2" at edge 2 connected to the node "B:10", "3" at edge 3 connected to the node "C:100", and "4" at edge 4 connected to the node "C:100". Although a detailed explanation is omitted, there may also be a distance between the input and output of a node. This corresponds to, for example, the propagation delay that occurs due to the length of the wiring in a circuit, as well as the delay time that occurs between the input and output in semiconductors or coils, etc.

[0189] The distance to an edge is the distance from the centroid node to the exit of the edge. As a result, the edge token corresponding to edge 2 is "A:1000-B:10", the edge token corresponding to edge 1 is "B:1-B:10", the edge token corresponding to edge 4 is "A:1000-C:100", and the edge token corresponding to edge 3 is "B:10-C:100". The processing unit 14 arranges these edge tokens in order and outputs each edge token as "A:1000-B:10", "B:1-B:10", "A:1000-C:100", and "B:10-C:100".

[0190] When determining the order of edge tokens based on distance from the centroid node, a disadvantage is that, similar to node degree, the degree of freedom in representing text in natural language processing using decoder or sequence models is reduced. When processing text data representing a circuit using a decoder model, the text data indicating a part of the circuit component is often input to the decoder model, and this input often indicates peripheral circuits with high node degrees. Therefore, determining the order of edge tokens according to distance from the centroid node has a significant advantage that far outweighs the disadvantage of being able to process graphs in natural language processing, similar to determining the order according to node degree.

[0191] Furthermore, determining the arrangement of edge tokens based on their distance from the centroid node differs from determining the arrangement based on the first node degree. This allows for flexible arrangement of edge tokens by utilizing the characteristics of the graph. However, if there is no domain knowledge, or if the graph has no special characteristics, it is desirable to designate the node with the highest node degree as the centroid node. This reduces the degree of freedom in representing text with the graph, but it reduces the amount of data used to augment data to mitigate data inequality, enabling natural language processing training without increasing the amount of training data. In particular, in circuits, the node with the highest node degree tends to be the ground node, and ground nodes are included in all circuits. Therefore, all graph data can be represented by a common metric, making it a desirable centroid node. In addition to the ground node, the node corresponding to the load or output of the circuit, or, if there is only one main power supply, the main power supply node, may also be designated as the centroid node. If the distance of an edge is not defined, one edge in the graph can be designated as having a distance of "1," and the distances of other edges can be calculated based on this distance. For example, in a circuit, distance information can be assigned to the circuit by defining the wiring length or electrical length on the printed circuit board or within the semiconductor as an edge attribute, and then defining that edge attribute as a distance.

[0192] Furthermore, distance information may also be assigned to nodes. For example, by including a distance element in the node attributes, the distance between nodes can be made longer or shorter. For instance, when representing a transportation network with graph data, if edges represent "roads" and nodes represent "traffic lights," then long roads or congested roads will have a longer distance. Although there is no change in physical distance to traffic lights, the distance to them increases by calculating the time required to slow down the speed of movement to the traffic light. Therefore, they have a distance element. The distance of an edge or a node does not necessarily have to be a positive value; it may also be a negative value. In addition, in circuits, propagation delays on the order of nanoseconds to picoseconds occur in semiconductors or long coils, and propagation delays also occur in the wiring connecting circuit components, i.e., edges. Therefore, it is desirable to use these propagation delay times as a common indicator, such as the distance of an edge.

[0193] As described above, the same text output can be obtained from the same graph by using at least one of the following methods: ordering based on node degree or the sum of node degrees, ordering based on distance from the centroid node, ordering based on terminal number, and ordering based on a dictionary of word nodes that make up edge tokens.

[0194] If not based on Embodiment 4, the degree of freedom in text representation is high, and inequality arises depending on the order of each edge token. To suppress this inequality, a massive amount of data augmentation is required depending on the permutations of changing the order of the edge tokens. For example, even in a graph with a small number of edges, such as 10, it is necessary to create text through data augmentation in 3,628,800 ways. Therefore, by using at least one of the following methods for ordering: ordering based on node degree or the sum of node degrees, ordering based on distance from the centroid node, ordering based on terminal number, and ordering based on a dictionary of word nodes that constitute the edge tokens, data augmentation, which increases exponentially with the number of edges, becomes unnecessary. This significantly reduces the computation time, computation cost, or memory amount required for learning natural language processing.

[0195] In particular, by combining the word node order shown in Embodiment 3 with the edge token order shown in Embodiment 4, the creation of edge tokens and the arrangement of edge tokens can be made unique. For this reason, if the number of edges in a graph with N edges is freely combined, it becomes necessary to augment the data by multiplying the number of data by the product of 2 to the power of N and N factorial.

[0196] In contrast, by combining Embodiment 3 and Embodiment 4, it is only necessary to learn one graph. This significantly reduces the amount of computation. For example, the processing unit 14 may have a processing unit that arranges edge tokens with equal distances from the centroid node in lexicographical order. This processing unit, although not shown in Figure 1, creates text data in which edge tokens with equal distances from the centroid node are arranged in lexicographical order.

[0197] Furthermore, if the node ID shown in Embodiment 1 is not a node that combines node type and node attribute, the number of combinations increases exponentially by the number of node ID or edge ID combinations. For this reason, even from a relatively small graph with about 10 nodes, it is necessary to augment the data with trillions of combinations. In contrast, by combining the methods of Embodiments 1, 3, and 4, it is only necessary to create one set of text data, making it possible to process graph data using natural language with realistic time and computational cost.

[0198] For example, if one node is assigned the number 1 and another the number 2, a node assigned the number 1 is more likely to be generated than a node assigned the number 2 during generation. This is also known as Benford's Law, which indicates that the distribution of the first digits of many numbers that appear in nature is not uniform, but follows a specific distribution. In a graph, for example, if there is an antenna node that rarely appears, one circuit may have two antenna nodes, while many other circuits may have no antenna nodes or only one.

[0199] If we designate the two antenna nodes in a circuit as antenna node 1 and antenna node 2, then antenna node 2 will appear less frequently during generation because it will not be used by other circuits. The reason why antenna node 2 is less likely to be generated depends on how the antenna nodes are numbered, which represents an inequality due to the numbering system.

[0200] The constraints on the arrangement in Embodiments 3 and 4 have the advantage of producing only one possible graph, but problems can arise when using decoder models or sequence models for natural language processing. For example, GPT (Generative Pre-trained Transformer), one type of decoder model, takes some nodes and edges from a graph as input and converts them into edge tokens for output. Furthermore, if edge tokens are directly input, GPT generates text following the input data, completing the graph. In addition to the GPT transformer model's decoder model, any model capable of learning text, such as a Selective State Space Model (SSM), is acceptable. SSM, in particular, is preferable to GPT for large-scale graphs because, compared to GPT in the same computing environment, it excels at processing longer token sequences, i.e., longer texts. Here, "large-scale" refers to a graph with approximately 10,000 edge tokens. The basis for 10,000 is that in GPT, considering the square of the edge tokens and the memory used to store the 50 hidden layers and the difference during backpropagation, the square is multiplied by 100. Therefore, during training, it becomes 10,000 x 10,000 x 100 = 10 billion, and if each edge token can be processed as a 4-byte float, at least 40 GB of memory would be required. In contrast, in SSM, it is proportional to the first power of the edge tokens, so it becomes 10,000 x 100 = 1 million, and it is possible to create the graph with 4 MB of memory.

[0201] However, if degrees of freedom are not considered during training, i.e., data augmentation is not performed, the variation in the predicted value of the next edge token after a particular edge token decreases, thus reducing the degree of freedom of representation.

[0202] Therefore, the graph natural language processing device 1 according to Embodiment 4 performs data augmentation in three main ways. This data augmentation improves the degree of freedom of text representation, which has been reduced too much by constraints on the arrangement of word nodes or edge tokens, without reducing graph generation efficiency. Since these data augmentations are performed to increase the degree of freedom of text representation, it is possible to freely set whether to use only one method or to combine all three methods.

[0203] Furthermore, the processing unit 14 may augment the data by creating text in which two or more edge tokens have been modified. The data augmentation described above to eliminate inequality may not eliminate inequality if two or more edge tokens are modified simultaneously, depending on how they are modified. For this reason, it is necessary to augment the edge tokens one at a time. In contrast, the following three methods aim to improve the expressiveness of the data and to increase graph data, which is often less abundant than image data or natural language data, and may modify two or more edge tokens simultaneously. Thus, data augmentation to eliminate inequality and data augmentation to improve the expressiveness of the data are both data augmentation, but they have different characteristics.

[0204] (Data augmentation method A) The processing unit 14 may have a processing unit that augments data by rearranging the order of edge tokens with the same maximum node degree. This processing unit, although not shown in Figure 1, rearranges the order of edge tokens corresponding to the edges connected to the node with the higher node degree (the node with the highest node degree) among all adjacent nodes. For example, the processing unit 14 augments data by rearranging the order of edge tokens with the same maximum node degree. For example, in the graph data shown in Figure 3, the node with the highest node degree among the adjacent nodes is the string "B:10". As a result, the order of edge tokens containing "B:10", such as "B:1-B:10", "A:1000-B:10", and "B:10-C:100", is rearranged, and data augmentation is performed.

[0205] The augmented data (1) is the following dataset: “A:1000-C:100”, “B:1-B:10”, “B:10-C:100”, “A:1000-B:10” The augmented data (2) is the following dataset: “A:1000-C:100”, “A:1000-B:10”, “B:10-C:100”, “B:10-B:10” The augmented data (3) is the following dataset: “A:1000-C:100”, “A:1000-B:10”, “B:1-B:10”, “B:10-C:100” The augmented data (4) is the following dataset: The augmented data (5) is the following dataset: "A:1000-C:100", "B:10-C:100", "B:1-B:10", "A:1000-B:10" The augmented data (6) is the following dataset: "A:1000-C:100", "B:10-C:100", "B:10-C:100", "A:1000-B:10"

[0206] Nodes with the highest node degree are the most influential nodes in the graph. Therefore, by improving the degree of freedom in text representation around influential nodes, the overall textual expressiveness of the graph can be improved.

[0207] (Data augmentation method B) The processing unit 14 may have a processing unit that augments data by rearranging the order of multiple edge tokens whose node degrees are equal. This processing unit, although not shown in Figure 1, rearranges the order of edge tokens for edges connected to nodes with the same node degree and augments data by rearranging the order of edge tokens whose node degrees are equal. For example, in the graph data shown in Figure 3, the edges "A:1000-C:100", "A:1000-B:10", and "B:10-C:100", which are connected to the node "A:1000" and the node "C:100", which have the same node degree, are rearranged to augment data.

[0208] The augmented data (1) is the following dataset: "A:1000-C:100", "B:1-B:10", "B:10-C:100", "A:1000-B:10" The augmented data (2) is the following dataset: "B:10-C:100", "B:1-B:10", "A:1000-C:100", "A:1000-B:10" The augmented data (3) is the following dataset: "B:10-C:100", "B:1-B:10", "A:1000-B:10", "A:1000-C:100" The augmented data (4) is the following dataset: The augmented data (5) is the following dataset: “A:1000-B:10”, “B:1-B:10”, “B:10-C:100”, “A:1000-C:100”

[0209] While similar to data augmentation method A, data augmentation method B determines whether to augment data based solely on the node degree, regardless of the node degree of surrounding nodes. This means that, as seen in the text representation of the bus wiring between the CPU and memory in the circuit shown in Embodiment 2, where the node degrees of adjacent nodes are also high, data augmentation method A will prioritize the node with the higher degree. In contrast, data augmentation method B can augment data for either node, improving the flexibility of graph representation. The choice between data augmentation method A and data augmentation method B should ideally be based on the characteristics of the dataset.

[0210] (Data augmentation method C) The processing unit 14 may have a processing unit that augments data with edge tokens having word nodes whose node attributes have been changed. This processing unit, although not shown in Figure 1, augments data with edge tokens having word nodes whose node attributes have been changed. That is, this processing unit augments data by creating edge tokens having word nodes whose node attributes have been changed. For example, in the graph data shown in Figure 3, the word node "A:1000" has its node attributes changed to "A:10" and "A:100". This augments the data of the edge tokens.

[0211] This is text data from augmented data (1). "B:1-B:10", "A:10-B:10", "B:10-C:100", "A:1000-C:100" This is text data from augmented data (2). "B:1-B:10", "A:100-B:10", "B:10-C:100", "A:1000-C:100" This text data is output from the graph natural language processing device 1.

[0212] Typically, graph data, unlike images or natural language, has a small amount of data. Therefore, it tends to be prone to overfitting. In contrast, data augmentation method C increases the degrees of freedom that word nodes can take, thus improving the degrees of freedom even for small amounts of graph data. However, defining the range of possible node attributes requires not only domain knowledge but also the entire graph data. Therefore, accurately defining the range of possible node attributes is difficult.

[0213] When the node type is set to "car" and the node attribute is set to "car speed," it is not always correct to set the node attribute to a range from "30 km / h" to "60 km / h." For example, in graph data representing highways, this may not satisfy the node attribute and could result in an abnormal word node. Therefore, it is desirable to impose constraints on the width of the node attribute.

[0214] The first constraint is to augment the data using edge tokens that have word nodes with modified node attributes for nodes in the graph data that are of the same node type but have different node attributes. In other words, the processing unit 14 may have a processing unit that augments the data using edge tokens that have word nodes that have undergone at least one of the following: modification of node attributes of nodes of the same node type but with different node attributes, or swapping of node attributes between nodes. This processing unit, although not shown in Figure 1, extracts nodes that are of the same node type but have different node attributes already included in the graph data, and augments the data using those different node attributes. This has the effect of making it less likely to generate abnormal word nodes, for example, in a dataset representing highways, because the data can be augmented with similar car speeds.

[0215] Furthermore, nodes that are already included in the graph data, have the same node type, the same node degree, and different node attributes may be extracted, and data augmentation may be performed using those different node attributes. That is, the processing unit 14 may have a processing unit that augments data with edge tokens having word nodes that have undergone at least one of the following: changing the node attributes of nodes that have the same node type, the same node degree, and different node attributes, or swapping node attributes between nodes. This processing unit, although not shown in Figure 1, augments data with edge tokens having word nodes whose node attributes have been changed to different node attributes for nodes that have the same node type, the same node degree, and different node attributes. For example, in a dataset representing a highway, a node for a congested car has an average node degree of "4" because there are cars within 10m of many cars in front, behind, to the left, and to the right. A node for a car that is not congested has a node degree of "1" or "2" because there are cars in front and behind it, or cars are sparsely present to the left and right. By extracting similar node attributes depending on the environment and using these different node attributes to augment the data, the creation of abnormal word nodes can be significantly reduced.

[0216] Furthermore, the processing unit 14 may have a processing unit that augments data by rearranging the order of multiple edge tokens that have the same shortest distance from the centroid node. This processing unit is not shown in Figure 1, but augments data by rearranging the order of multiple edge tokens that have the same shortest distance from the centroid node. For example, the processing unit 14 augments data by rearranging the order of multiple edge tokens that have the same shortest distance from the centroid node, among the distances from the centroid node to each edge selected from the nodes extracted by the node extraction unit 12. This reduces the degree of freedom in representing text with a graph and reduces the amount of data that is augmented to suppress data inequality.

[0217] As described above, in the graph natural language processing device 1 according to Embodiment 4, the processing unit 14 has a processing unit that extracts the maximum node degree, which is the larger of the two word nodes constituting each edge token, and arranges the edge tokens in order of maximum node degree. As a result, the degree of freedom in representing text with a graph is reduced, the amount of data that is augmented to suppress data inequality can be reduced, and natural language processing can be trained without increasing the amount of training data.

[0218] In the graph natural language processing device 1 according to Embodiment 4, the processing unit 14 has a processing unit that arranges edge tokens in the order of the sum of the node degrees at both ends of each edge. This reduces the degree of freedom in representing text using a graph, reduces the amount of data used to augment data to suppress data inequality, and enables learning of natural language processing without increasing the amount of training data.

[0219] In the graph natural language processing device 1 according to Embodiment 4, the processing unit 14 has a processing unit that arranges edge tokens in order of distance from a centroid node, which is a single node, to each edge. This reduces the degree of freedom in representing text using a graph, reduces the amount of data used to augment data to suppress data inequality, and enables learning of natural language processing without increasing the amount of training data.

[0220] In the graph natural language processing device 1 according to Embodiment 4, the centroid node is the node with the highest node degree. This reduces the degree of freedom in representing text using a graph, reduces the amount of data used for data augmentation to suppress data inequality, and enables natural language processing training without increasing the amount of training data.

[0221] In the graph natural language processing device 1 according to Embodiment 4, the centroid node is a node that has the node type or node attribute that all the data in the dataset possesses. This makes it possible to select a node common to all datasets in the case of a dataset containing multiple graphs, and to specify the same specific node for all the data in the dataset.

[0222] In the graph natural language processing device 1 according to Embodiment 4, the centroid node may be a node that has a node type or node attribute that exists only once within a single data point. Since there is only one centroid node per data point, the centroid node is uniquely determined, and therefore, bias during generation can be eliminated by selecting the centroid node.

[0223] In the graph natural language processing device 1 according to Embodiment 4, the processing unit 14 has a processing unit that arranges edge tokens with the same maximum node degree in lexicographical order. This makes it possible to create the same text data from the same graph.

[0224] In the graph natural language processing device 1 according to Embodiment 4, the processing unit 14 has a processing unit that arranges edge tokens whose node degrees are equal in lexicographical order. This makes it possible to create the same text data from the same graph.

[0225] In the graph natural language processing device 1 according to Embodiment 4, the processing unit 14 has a processing unit that arranges edge tokens that are the same distance from the centroid node in lexicographical order. This makes it possible to create the same text data from the same graph.

[0226] In the graph natural language processing device 1 according to Embodiment 4, the processing unit 14 has a processing unit that arranges edge tokens corresponding to edges connected to nodes with terminal numbers in order of terminal number. This makes it possible to create the same text data from the same graph.

[0227] In the graph natural language processing device 1 according to Embodiment 4, the processing unit 14 has a processing unit that augments data by rearranging the order of edge tokens with the same maximum node degree. As a result, the same text data can be created from the same graph, reducing the degree of freedom in representing text with the graph and reducing the amount of data augmented to suppress data inequality.

[0228] In the graph natural language processing device 1 according to Embodiment 4, the processing unit 14 has a processing unit that augments data by rearranging the order of multiple edge tokens whose node degrees are equal. As a result, the same text data can be created from the same graph, reducing the degree of freedom in representing text with the graph and reducing the amount of data augmented to suppress data inequality.

[0229] In the graph natural language processing device 1 according to Embodiment 4, the processing unit 14 has a processing unit that augments data by rearranging the order of multiple edge tokens that are the same shortest distance from the centroid node. As a result, the same text data can be created from the same graph, reducing the degree of freedom in representing text with a graph, and reducing the amount of data that is augmented to suppress data inequality.

[0230] In the graph natural language processing device 1 according to Embodiment 4, the processing unit 14 has a processing unit that augments data with edge tokens having word nodes whose node attributes have been changed. As a result, the same text data can be created from the same graph, reducing the degree of freedom in representing text with the graph and reducing the amount of data augmented to suppress data inequality.

[0231] In the graph natural language processing device 1 according to Embodiment 4, the processing unit 14 has a processing unit that augments data with edge tokens having word nodes that have undergone at least one of the following: changing the node attributes of nodes of the same node type but with different node attributes, or swapping node attributes between nodes. As a result, the same text data can be created from the same graph, reducing the degree of freedom in representing text with a graph, and reducing the amount of data that needs to be augmented to suppress data inequality.

[0232] In the graph natural language processing apparatus 1 according to Embodiment 4, the processing unit 14 has a processing unit that duplicates data with edge tokens having word nodes in which at least one of the following operations is performed: changing the node attributes of nodes having the same node type, the same node degree, and different node attributes, and swapping the node attributes between nodes. As a result, the same text data can be created from the same graph, so the degree of freedom in expressing text by the graph is reduced, and the number of data for data duplication to suppress data inequality can be reduced.

[0233] In the graph natural language processing apparatus 1 according to Embodiment 4, the processing unit 14 creates text in which two or more edge tokens are changed. As a result, the same text data can be created from the same graph, so the degree of freedom in expressing text by the graph is reduced, and the number of data for data duplication to suppress data inequality can be reduced.

[0234] Embodiment 5. The graph natural language processing apparatus according to Embodiment 5 applies a graph network to a circuit. The graph natural language processing apparatus according to Embodiment 5 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 5 will be described with reference to FIG. 1.

[0235] FIG. 13 is a circuit diagram showing an equivalent circuit of the circuit to be processed in Embodiment 5. The circuit shown in FIG. 13 has a semiconductor with six terminals from X 1-1 to X 1-6 . An AC power supply V 1-1 is connected to the terminal X 1 of this semiconductor, and a capacitor C 1 with a capacitance of 1 μF is connected in parallel with the AC power supply V 1 . Also, the terminals X 1-2 [[ID=!23]]and the terminal X 1-3 are short-circuited. A diode D 1-4 with a model number of "1N914" is connected to the terminal X 1The anode terminal is connected. Terminal X 1-5 This is a feedback terminal, and diode D 1 The cathode terminal and a capacitor C with a capacitance of 1 μF. 2 And a resistor R with a resistance value of 10Ω 1 It is connected to terminal X. 1-6 Ground is connected to it. The ground potential of the earth is the reference potential of the circuit.

[0236] The graph data acquisition unit 11 acquires graph data for the above circuit in which circuit components and ground are represented as nodes and wiring is represented as edges. For example, a graph network is a graph network in which the type of circuit component is the node type and the circuit constant or the circuit model number is the node attribute. Figure 14 is a diagram showing an example (1) of a graph network in Embodiment 5, which is a graph representation of the circuit in Figure 13. As shown in Figure 14, each node is assigned a word node. Ground GND does not have a node attribute. Therefore, word nodes are made up only of node types. For example, when dividing ground GND 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 word node of frame ground FG as the string "GND:0" and the word node of signal ground SG as the string "GND:1". In this way, circuits using different grounds GND can also be represented by word nodes. Typically, the signal ground SG is connected to the frame ground FG using circuit components such as coils, resistors, or capacitors, or by a single-point connection with extremely narrow wiring widths to increase residual inductance. In this case, it is desirable not to assign an ID to the ground GND, to treat the frame ground FG as a ground node, and to also treat the signal ground connected via a node representing a circuit component or residual inductance as a ground node. This is because, in general circuits, the frame ground FG and signal ground SG are not separated, and treating ground nodes specially can easily lead to bias in the generated data. However, if graph natural language processing is trained using only circuits where the frame ground FG and signal ground SG are separated in many of the circuits that make up the dataset, it is desirable to assign an ID to the ground GND and to refer to the frame ground as "FGND" and the signal ground as "SGND," as described above.

[0237] Grounds are connected by circuit components such as capacitors or resistors, coils, wiring constrained by physical dimensions such as residual inductance or parasitic capacitance, or by the circuit board structure. Grounds are also connected to a metal enclosure or earth. Grounds may also be nodes accessed via circuit components or parasitic components. When separating grounds, the above-mentioned wiring or circuit board structure must be considered. That is, in the graph natural language processing device 1, circuit components and grounds are treated as nodes, and wiring excluding grounds is treated as edges. This allows information about ground nodes to be retained in the graph network, enabling the ground to be represented even in generated text data.

[0238] In Figure 13, 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. Also, if the power supply has both DC and AC components, the two can be separated by representing the node type as DC power supply (e.g., VDC) and AC power supply (e.g., VAC). However, multiple datasets representing special power supplies, such as an AC power supply with a DC bias, may include both DC power supply and AC power supply as node attributes. For example, strings representing the amplitude of the DC power supply and the amplitude of the AC power supply can be connected with a comma. This allows the DC power supply to be represented by the word node string "V: 1V, 0V", and the AC power supply to be represented by the word node string "V: 0V, 1V". An AC power supply with a DC bias can be represented by the word node string "V: 1V, 1V".

[0239] As mentioned above, circuit components can be represented as word nodes, node types, or node attributes. This utilizes a characteristic of natural language processing that different word nodes can be processed as having different characteristics.

[0240] 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.

[0241] Furthermore, it is undesirable to subdivide word nodes or edge tokens to such an extent that the same token is not used in the training data and the inference data. If the subdivision is too large, the number of elements in the node attributes must be reduced, similar to the number of significant digits in the node attributes in Embodiment 1. For example, if an edge token appears only once during training of the graph natural language processing device 1, edge tokens will not be generated under the same conditions during inference. This reduces the expressiveness of the generation. On the other hand, if the same edge token appears multiple times during training, the expressiveness of the generation can be improved during inference by generating edge tokens in contexts similar to those that have appeared multiple times. Moreover, if it is undesirable to reduce the number of elements in the node attributes, data augmentation may be performed to create text data such as node attributes that have the same tokens.

[0242] Furthermore, in the circuit shown in Figure 13, there are two word nodes 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 Texts like this also need to be created by augmenting the data.

[0243] In contrast, in Embodiment 5, even if a word node "C:1u" exists, the relationship between each string "C:1u" and the surrounding nodes, i.e., the structure of the graph, allows for characteristics close to a single (unique) node ID to be obtained from the string "C:1u" itself. Therefore, natural language processing is possible without data augmentation.

[0244] In the graph shown in Figure 14, the word node representing the semiconductor string "X: LTM805a" has a self-loop, and the word nodes at both ends of this self-loop are word nodes of the string "X: LTM805a". Therefore, the edge token becomes the string "X: LTM805a - X: LTM805a". Based on this, the processing unit 14 creates and outputs the following text data. By expressing it in this way, even if the word node "C: 1u" itself is not a single entity, it can be defined by its relationship with adjacent word nodes. V-X:LTM805a VC:1u C:1u-X:LTM805a X:LTM805a-X:LTM805a X:LTM805a-D:1N914 X:LTM805a-D:1N914 X:LTM805a-C:1u X:LTM805a-R:10 X:LTM805a-GND D:1N914-C:1u D:1N914-R:10 V-GND C:1u-GND C:1u-GND R:10-GND

[0245] Furthermore, “C: 1u-GND C: 1u-GND” indicates that two capacitors with a capacitance of 1 (μF) are connected to a word node representing ground (GND). In this way, the presence of two capacitors can be expressed without using node IDs.

[0246] Furthermore, if we describe the edge tokens in this text in lexicographical order, similar to Embodiment 3, we get the following: “X: LTM805a-V C: 1u-X: LTM805a X: LTM805a-X: LTM805a D: 1N914-X: LTM805a D: 1N914-X: LTM805a C: 1u-X: LTM805a R: 10-X: LTM805a GND-X: LTM805a C: 1u-D: 1N914 D: 1N914-R: 10 GND-V C: 1u-GND C: 1u-GND GND-R: 10”

[0247] For example, the edge token "V-X:LTM805a" and the edge token "X:LTM805a-V" between word node "V" and word node "X:LTM805a" represent the same information. However, the graph natural language processing device 1 treats these as different information. Therefore, by rewriting the edge tokens in lexicographical order, the graph natural language processing device 1 eliminates the need for data augmentation without compromising the freedom of expression when converting the graph to text.

[0248] Similar to Embodiment 4, when sorted by node degree, in descending order of node degree, the word node "X: LTM805a" has a node degree of "8", the word node "GND" has a node degree of "5", the word node "D: 1N914" has a node degree of "3", the word node "C: 1u" connected in parallel with the word node "R: 10" has a node degree of "3", the word node "R: 10" has a node degree of "3", the word node "V" has a node degree of "2", and the word node "C: 1u" connected in parallel with the word node "V" has a node degree of "2".

[0249] Therefore, each node is represented as follows: X: The sum of the degree nodes of LTM805a-V is 10. C: The sum of the degree nodes of 1u-X: LTM805a is 10. X: The sum of the degree nodes of LTM805a-X: LTM805a is 16. D: The sum of the degree nodes of 1N914-X: LTM805a is 11. C: The sum of the degree nodes of 1u-X: LTM805a is 11. R: The sum of the degree nodes of 10-X: LTM805a is 11. GND-X: The sum of the degree nodes of LTM805a is 13. C: The sum of the degree nodes of 1u-D: 1N914 is 6. D: The sum of the degree nodes of 1N914-R: 10 is 6. The sum of the order nodes in GND-V is 7. The sum of the order nodes in C:1u-GND is 8. The sum of the order nodes in C:1u-GND is 7. The sum of the order nodes in GND-R:10 is 8.

[0250] Using the above word nodes, the processing unit 14 creates edge tokens in the following order: "X: LTM805a - X: LTM805a GND - X: LTM805a D: 1N914 - X: LTM805a D: 1N914 - X: LTM805a C: 1u - X: LTM805a R: 10 - X: LTM805a X: LTM805a - V C: 1u - X: LTM805a C: 1u - GND GND - R: 10 GND - V C: 1u - GND C: 1u - D: 1N914 D: 1N914 - R: 10"

[0251] However, there are multiple edge tokens that have the same node order sum. Therefore, the word nodes to the left of the edge token are sorted alphabetically, and if the left word nodes are the same, the right word nodes are sorted alphabetically. As a result, the string representing the edge token will be as follows: "X:LTM805a-X:LTM805a GND-X:LTM805a C:1u-X:LTM805a D:1N914-X:LTM805a D:1N914-X:LTM805a R:10-X:LTM805a C:1u-X:LTM805a X:LTM805a-V C:1u-GND GND-R:10 C:1u-GND GND-V C:1u-D:1N914 D:1N914-R:10"

[0252] As described above, according to Embodiments 3 and 4, only one text is generated from one graph data. Therefore, data augmentation is unnecessary. However, due to the relationship of node degrees, the self-loop "X: LTM805a - X: LTM805a" is described first. However, for example, when inputting a part of a circuit into a decoder model for natural language processing, it is a natural input method to input sequentially from the first terminal of the semiconductor. Therefore, similar to Embodiment 4, the decoder model is input in the order of node degrees, and for word nodes that have terminal numbers, edge tokens are arranged in order of terminal number. That is, terminal "X 1-1 The edge tokens connected to "" are "X: LTM805a-V" and "C: 1u-X: LTM805a". Terminal "X 1-2 "and terminal "X 1-3The edge token connected to "" is "X:LTM805a-X:LTM805a". Terminal "X 1-4 The edge token that connects to "" is "D:1N914-X:LTM805a". Terminal "X 1-5 The edge tokens connected to "" are "D:1N914-X:LTM805a", "C:1u-X:LTM805a", and "R:10-X:LTM805a". Terminal "X 1-6 The edge token to connect to is "GND-X: LTM805a".

[0253] The processing unit 14 places the edge token "X:LTM805a" first because the node order of "X:LTM805a" is "8", which is the maximum. This results in the following string: "X:LTM805a-V C:1u-X:LTM805a X:LTM805a-X:LTM805a D:1N914-X:LTM805a D:1N914-X:LTM805a C:1u-X:LTM805a R:10-X:LTM805a GND-X:LTM805a"

[0254] The remaining edge tokens, "C:1u-GND", "GND-R:10", "C:1u-GND", "GND-V", "C:1u-D:1N914", and "D:1N914-R:10", are in the order of the node degrees of the word nodes at both ends. Therefore, by outputting the text in that order, it is possible to create a string that takes the following terminal order into consideration. “X:LTM805a-V C:1u-X:LTM805a GND-X:LTM805a C:1u-GND GND-R:10 C:1u-GND GND-V C:1u-D:1N914 D:1N914-R:10"

[0255] Even in this case, just as when arranging them in order of node degree, terminal "X 1-1 Edge token and terminal "X" that connect to " 1-5An edge token connected to "" has two or more edges. Therefore, it is not possible to uniquely determine its order. By determining the order according to lexicographical order, the amount of data that needs to be augmented can be further reduced.

[0256] Terminal “X” 1-1 The edge tokens connected to "" are "X: LTM805a-V" and "C: 1u-X: LTM805a". Terminal "X 1-5 The edge tokens connected to " are "C:1u-X:LTM805a", "D:1N914-X:LTM805a", and "R:10-X:LTM805a". Therefore, the string is as follows: "X:LTM805a-V C:1u-X:LTM805a X:LTM805a-X:LTM805a D:1N914-X:LTM805a C:1u-X:LTM805a D:1N914-X:LTM805a R:10-X:LTM805a GND-X:LTM805a C:1u-GND GND-R:10 C:1u-GND GND-V C:1u-D:1N914 D:1N914-R:10”

[0257] As described above, by fixing the order of edge tokens, it is possible to create only one text from one graph data, which has the special effect of being processable by natural language processing. As shown in Embodiment 4, graph data differs from image or natural language processing in that it is often difficult to prepare a sufficient amount of data. For example, with images or photographs, tens of thousands to tens of millions of data can be easily obtained, and while natural language processing can use several petabytes of data for training, with graph data, at most tens of thousands of data, and in some cases only a few data, can be obtained. Also, for example, social networks or road traffic networks require training using only one large graph network using graph network data. For this reason, it is necessary to extract many features from a single data set compared to images or natural language.

[0258] Therefore, domain knowledge is used to augment the graph data. This augmentation is not intended to eliminate the inequality caused by assigning node IDs, but rather to make it easier to extract features from the graph data. For this reason, the former creates multiple texts from the same graph data, while the latter creates multiple texts from graph data where at least one node type or node attribute is different.

[0259] Furthermore, while the former method aims to eliminate inequality by allowing only one change in a single text, the latter method enhances the expressiveness of the data, allowing for the creation of text data with two or more different texts. Additionally, the former method involves data augmentation by creating multiple texts from a single graph, whereas the latter method involves data augmentation by creating multiple texts from different graphs.

[0260] The processing unit 14 performs data augmentation of node attributes as a way to improve the expressiveness of graph data. Generally, changing the node type is likely to cause the circuit to malfunction, whereas changing node attributes is likely to allow the circuit to function. Specifically, by changing the node attributes related to the passive components of the circuit, it becomes less likely that abnormal circuits will occur due to data augmentation. For example, changing the capacitance of a smoothing 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 augmentation is possible. On the other hand, if the capacitance of a capacitor used in a filter circuit that utilizes resonance or anti-resonance changes, the characteristics of the filter change, so signals will not pass through, or unwanted signals will pass through, causing the circuit to malfunction. For this reason, it is difficult to perform data augmentation without domain knowledge. In addition, data augmentation is possible for passive components other than those with circuit constants.

[0261] Replacing a diode with a specific model number with another diode of the same type, or replacing a capacitor with a similar model number but with a similar voltage rating or frequency characteristics, 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.

[0262] Furthermore, although domain knowledge is required, in the case of power supply circuits, it is acceptable 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 the same terminal order or arrangement and similar characteristics are often manufactured by different manufacturers. For this reason, it is possible to inflate data for components such as semiconductors.

[0263] For example, 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 creating nodes and edges to connect those nodes to other nodes. In other words, the processing unit 14 augments data by creating a graph network of equivalent circuits that include the parasitic components of circuit components. Since parasitic components are used to represent high-frequency components, a graph representation that takes high-frequency components into account is possible. This makes it easier to extract feature quantities from the graph data, and data augmentation can be achieved by adding nodes or changing node attributes based on physical quantities. Furthermore, 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, or residual resistance. 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 word node representing residual inductance in series with the word node representing resistance, and by adding a word node representing parasitic capacitance in parallel with the word node representing resistance. 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.

[0264] 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.

[0265] Furthermore, when current flows through a circuit component, mutual inductance is generated in the surrounding conductors or the circuit component itself. This magnetic coupling induces an electromotive force in the surrounding conductors, while simultaneously suppressing the current in the target conductor. Such parasitic capacitance or mutual inductance does not create abnormal circuits and, like individual circuit components, is a desirable data augmentation. This not only provides circuits with characteristics close to the actual values ​​for high-frequency circuits (several MHz and above), but does not affect low-frequency circuits.

[0266] Adding these parasitic elements requires changing the number of nodes in the graph, which in turn increases or decreases the number of word nodes or edge tokens. Therefore, it is desirable to change the graph structure through data augmentation. The node attributes, i.e., edge tokens, that are changed through data augmentation do not have to be just one; data augmentation can involve changing two or more edge tokens simultaneously. However, in natural language processing, learning is possible even if several edge tokens surrounding the target edge token are changed simultaneously, as long as the graph structure or active components do not change, in order to learn the relationships between edge tokens.

[0267] Furthermore, by modifying one or more edge tokens to augment the data, the amount of text data input for natural language processing training can be reduced, improving training efficiency. In addition, the graph shown in Figure 14 has two edges between word node "X: LTM805a" and word node "D: 1N914". Even if natural language processing is performed on the two edges, the connected terminals cannot be determined, and the graph data cannot be converted into a circuit. Similarly, for self-loops, since the terminals of the short-circuited semiconductors cannot be determined, it is not possible to generate circuit simulation or circuit data that operates on actual hardware from the text data representing the graph data obtained from circuit generation.

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

[0269] When a split node operation is performed on text created using the sum of node degrees and terminal numbers, it is replaced with the following text. V-X:LTM805a_1 VC:1u C:1u-X:LTM805a_1 X:LTM805a_2-X:LTM805a_3 X:LTM805a_4-D:1N914 X:LTM805a_5-C:1u X:LTM805a_5-R:10 X: LTM805a_5-D: 1N914 X: LTM805a_6-GND D: 1N914-C: 1u D: 1N914-R: 10 V-GND C: 1u-GND C: 1u-GND R: 10-GND X:LTM805a-X:LTM805a_2 X:LTM805a-X:LTM805a_3 X:LTM805a-X:LTM805a_4 X:LTM805a-X:LTM805a_5 X:LTM805a-X:LTM805a_6

[0270] Since terminal numbers do not degrade in information, it is possible to generate a graph that can be operated in circuit simulation from text data containing graph data generated by natural language processing, and from the graph, a netlist that can be operated 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 in a star graph. For example, it is not necessary to include the word node "X: LTM805a", which is a virtual node shown in Figure 15.

[0271] Figure 16 shows an example (3) of a graph network in Embodiment 5, and shows a graph that does not include the word node ":LTM805a". In a graph neural network, if there is no edge connection between nodes, they become unrelated nodes. In contrast, in Embodiment 5, word nodes corresponding to the nodes at both ends of an edge token have a circuit model number and a terminal number as node attributes. From this information, it is possible to predict that it is a single component and to determine that it is a single component. That is, if the word nodes 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.

[0272] Thus, the graph natural language processing unit 1 can represent text without using virtual nodes, suppressing the increase in the number of tokens and reducing the computational cost required for learning. Furthermore, it generates a small number of tokens and avoids redundant representations. Abnormal graph data is less likely to be generated.

[0273] Through the process described above, the processing unit 14 creates the following text data. V-X:LTM805a_1 C:1u-X:LTM805a_1 V-C:1u X:LTM805a_2-X:LTM805a_3 X:LTM805a_4-D:1N914 X:LTM805a_5-C:1u D:1N914-X:LTM805a_5 X:LTM805a_5-R:10 X:LTM805a_5-D:1N914 C: 1u-GND R: 10-GND

[0274] 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.

[0275] (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.

[0276] (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 augmented data by swapping information with different node attributes.

[0277] (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.

[0278] 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 to suit the environment.

[0279] As described above, in the graph natural language processing device 1 according to Embodiment 5, the graph network represented by the graph data is a graph network in which the type of circuit component is the node type and the circuit constant or the circuit model number is the node attribute. This allows various circuits to 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.

[0280] In the graph natural language processing device 1 according to Embodiment 5, circuit components and ground are defined as nodes, and wiring excluding ground is defined as an edge. This allows information about ground nodes to be retained in the graph network, so that a graph including ground can be obtained from the generated text data.

[0281] In the graph natural language processing device 1 according to Embodiment 5, the processing unit 14 augments data by forming an equivalent circuit including parasitic components of circuit parts into a graph network. Since the parasitic components are used to represent high-frequency components, a graph representation that takes high-frequency components into account is possible. As a result, it becomes easier to extract the feature quantities that the graph data has, and data augmentation can be achieved by adding nodes based on physical quantities or changing node attributes.

[0282] In the graph natural language processing device 1 according to Embodiment 5, the processing unit 14 augments data by forming a graph network of equivalent circuits that include parasitic capacitance or residual inductance, or residual resistance, between circuit components, between circuit components and wiring, between wirings, and between wirings. Since the parasitic components are used to represent high-frequency components, a graph representation that takes high-frequency components into account is possible. As a result, it becomes easier to extract the feature quantities that the graph data has, and data augmentation can be achieved by adding nodes based on physical quantities or changing node attributes.

[0283] Embodiment 6. The graph natural language processing device according to Embodiment 6 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 feature quantities of the text data input from the graph natural language processing device according to Embodiment 6, text data containing graph data that includes the input text data, or text data containing graph data different from the input text data. Such changes in input and output can be changed by the structure of the neural network inside the natural language processing device and the combination of input and output data provided during training. For example, if the input data is text created by the natural language processing device and the output data is provided as training data with correct answer data representing the type of graph, the weight matrix inside the natural language processing device is updated so that a predicted value close to the correct answer data can be obtained from the input. Thus, the structure of the neural network and the data used for training are the same as those of a general natural language processing device. 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. The graph natural language processing device according to Embodiment 6 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 6 will be described below with reference to Figure 1.

[0284] (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 6 is input, the unit analyzes the text by performing time-series processing with the order of the input text as the time direction. For example, the processing unit 14 of the graph natural language processing unit 1 according to Embodiment 6 uses the natural language processing unit to obtain the time-series processing result of the text. Deep learning is known as a time-series processing method. The following describes time-series processing based on deep learning.

[0285] For time series processing, convolutional neural networks (CNNs) in deep learning may be used. Alternatively, recurrent neural networks (RNNs) or selective state-space models (SSMs) may be used. Recurrent neural networks will be explained below.

[0286] 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.

[0287] However, RNNs, as well as LSTM or 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, parallel processing is difficult, resulting in low hardware utilization efficiency. For example, utilization efficiency averages around 30%. Consequently, large-scale training and inference require a long time.

[0288] 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.

[0289] Embodiment 6 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. Figure 17 is a diagram showing each model in Embodiment 6. The sequence model shown in Figure 17 includes a neural network model called T5 (Text-to-Text Transformer Transformer). The encoder model includes a neural network model called Bert (Bidirectional Encoder Representations from Transformers). The decoder model includes a neural network model called GPT (Generative Pre-trained Transformer). In addition, the selective state-space model also includes neural network models such as Mamba, Samba, and Jamba.

[0290] However, there are hundreds of models derived from these. Hundreds of similar technologies have also been published. Furthermore, any combination of these technologies—that is, the structures of neural networks—is acceptable as long as it is based on a transformer model.

[0291] In this embodiment, the transformer model is used for evaluation simply because it currently has high inference accuracy; any method with high inference accuracy is acceptable, and it does not have to be a neural network-based method.

[0292] 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 data into edge tokens using a delimiter. Therefore, dividing text into words is easy.

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

[0294] 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.

[0295] The graph natural language processing device 1 according to Embodiment 6 may include a Sentence Piece Tokenizer. The Sentence Piece Tokenizer divides a string of text data by making the number of tokens the same as the number of edge tokens. The Sentence Piece Tokenizer divides the text into words, determines the frequency of each word, treats high-frequency words as one token, and divides low-frequency words into shorter words, each also becoming one token. This reduces the number of tokens. Furthermore, while the Whitespace Tokenizer can only be used for languages ​​with delimiters between words, such as English, the Sentence Piece Tokenizer can be used for languages ​​without delimiters between words. Therefore, for example, when inputting a string containing Japanese text and edge tokens into graph natural language processing, processing can be performed by using the Sentence Piece Tokenizer. Since the number of edge tokens related to graphs is smaller than that of natural language to train similar circuits, low-frequency edge tokens tend to become one token as well. For this reason, the same division as with the Whitespace Tokenizer is possible.

[0296] For example, the text data converted from the graph shown in Figure 5 is "B:10-B:1 B:10-A:1000 B:10-C:100 C:100-A:1000". The processing unit 14 sets the string "B:10-B:1" to "1", "B:10-A:1000" to "2", "B:10-C:100" to "3", and "C:100-A:1000" to "4". As a result, the text data is converted to "1 2 3 4". This converted data is then input to the natural language processing unit.

[0297] However, transformer models have the problem of losing token position information due to parallel processing. Therefore, similar to attention, positional encoding can be used to incorporate the position of each token within the text as a feature into the latent space of natural language processing for learning.

[0298] 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, it is possible to output circuits with different circuit topologies, part numbers of circuit components used, or circuit constants.

[0299] The processing unit 14 may input edge tokens in which one or more edge tokens have been replaced with hidden characters, and output the hidden characters. For example, the encoder model may be input edge tokens in which one or more edge tokens have been replaced with hidden characters, and the hidden characters may be obtained. This allows the encoder model to perform sentiment analysis of input natural language, or, if part of the text is hidden during input, to predict the tokens of the hidden text.

[0300] Furthermore, it can also be used as a regression problem. For example, when text data representing a circuit is input to an encoder model, the encoder model can predict the area of ​​the board required for implementation, estimate the cost, or the physical quantity of heat or noise generated. In addition, edges can be predicted by inputting hidden edge tokens and predicting the hidden values. Moreover, the processing unit 14 may input a part of the graph network indicated by the graph data, i.e., a part of the text representing the graph network, and output edge tokens for the entire graph network. In this case, the text may be text used for training graph natural language processing, text created by augmenting that text, or text not used for training. For example, a part of the text (edge ​​tokens) may be input to the decoder model, and the remaining text (edge ​​tokens) may be predicted. Furthermore, the processing unit 14 may input text representing the entire graph network indicated by the graph data, and output text (edge ​​tokens) representing a graph network different from the input graph network text. In this case, the text may be text created by augmenting the text used for training graph natural language processing, or text not used for training. In particular, when used in circuit design, it is used to optimize the created circuit. By inputting unknown text that is not used for training, an optimized circuit can be obtained. For example, the entire text (edge ​​tokens of the entire graph network) is input to a decoder model, and a summary of the input text is created. The summary consists of edge tokens from a graph network different from the input graph network.

[0301] The processing unit 14 may use a decoder model to input text data representing a part of the circuit and create text data representing the remaining circuit necessary to complete the circuit. Alternatively, the processing unit 14 may input edge tokens of the entire graph network shown by the graph data and output features of the graph network. Furthermore, as shown below, it is also possible to learn normal and abnormal data and use the learned features to determine whether the input text is normal or abnormal. In addition, as described above, it is also possible to train the model to classify graph data, perform regression from graph data, or calculate two predicted values ​​such as classification and regression from the same features. For example, text data representing the entire circuit is input to the decoder model, and text data representing the function or features of the circuit is converted 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.

[0302] Next, we will explain how to evaluate the graphs generated by the sequence model, encoder model, or decoder model. It should be assumed that all data input to the model as graph data is normal graph data.

[0303] Therefore, the processing unit 14 creates anomaly value training data by modifying the graph data from normal training data by changing node types, node attributes, adding or deleting nodes, or adding or deleting edges. The processing unit 14 then evaluates the graph using a learning device trained in binary classification (also called Anomaly Detection) or multi-class classification, which determines that the training data is normal and the anomaly value training data is abnormal. In natural language processing inference, the text output by the natural language processing unit is input to the learning device, and if it is determined to be normal, the generation is considered successful; if it is determined to be abnormal, the generation is considered to have failed.

[0304] The learning device may be trained in natural language processing according to Embodiments 1 to 5, or it may be trained in a graph classification problem using a graph neural network. The anomaly detection model tends to have high inference accuracy, and when the circuit described later is used as the dataset, it has an inference accuracy of 99.58%, which can be used to evaluate the generated graph.

[0305] For example, in the text data representing the circuit shown in Embodiment 5, even if the circuit constants, which are node attributes, change slightly, it will still be treated as a normal circuit. Specifically, determining that a capacitor with a capacitance of 1 μF is normal and determining that one with a capacitance of 3.3 μF is abnormal is considered an over-determined judgment. That is, the graph natural language processing device 1 learns normal data, abnormal data obtained by changing the node type of the normal data, and data generated by graph natural language processing based on the normal and abnormal data, and then determines whether the input data is normal or abnormal. In this case, node attributes are not used for the learning data and the learning data for abnormality, only the node type is used for learning, and the generated text is also text data consisting only of node types, and the normality or abnormality of the graph data composed of the generated text is determined. In this way, the graph natural language processing device 1 extracts normal data from the edge tokens output from the processing unit 14. This makes it possible to accurately determine that a normal graph is normal using only the node type.

[0306] Next, the experimental results are presented. The experiment involved using the circuit described in Embodiment 5, with one experiment each conducted on 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 created from the circuit was directly input to the natural language processing unit were performed for comparison.

[0307] 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.

[0308] 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 expressed as follows: 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

[0309] The processing unit 14 inputs the above netlist into Bert, a natural language processing encoder model, and performs scratch learning without using a pre-trained model. In scratch learning, learning starts with a uniform weight matrix of random numbers. The reason for performing scratch learning is that when performing transfer learning or fine tuning of a pre-trained model, it is difficult to change the tokenizer, add or delete tokens. In other words, edge tokens cannot be assigned to a single token, and the edge tokens are divided into partitioned tokens.

[0310] For example, “X:LTM805a-C:1u” is split into separate elements: “X”, “LT”, “M”, “805”, “a-”, “C:”, and “1u”. When split into separate elements in this way, they are output as separate elements during generation, so the output text is not necessarily a graph, which contradicts the objective of this embodiment to improve graph generation efficiency and is therefore undesirable. However, current natural language processing does not allow assigning new tokens to a trained model. For this reason, it is preferable to perform scratch learning, starting from random numbers, rather than performing fine tuning and transfer learning using a trained model to freely determine tokens. The data used for evaluation consisted of 3,308 data points, with 70% used for training and the remaining 30% for testing, and the inference accuracy was checked.

[0311] Furthermore, to reduce the impact of variability between training and test data, ten combinations were created for both training and inference data, and the average inference accuracy was taken. The data allocated to training and inference data was also made common. As a result, when the graph natural language processing device 1 according to Embodiment 6 was used as a graph classifier and a netlist derived from LTspice was directly input, the inference accuracy was 96.72%. In contrast, when the graph was converted into a string and training and inference were performed using any of the methods from Embodiments 1 to 3, the inference accuracy improved to 97.11%. In this case, the processing unit 14 did not perform the data augmentation shown in Embodiment 3.

[0312] In Embodiment 6, the focus has been on graph generation, but the encoder model yields results equivalent to or better than those obtained using node IDs. Therefore, it can be confirmed that no information degradation occurs when node IDs are replaced with word nodes and edge tokens.

[0313] As a result, data augmentation as shown in Embodiment 4 was not performed on any of the datasets. However, data augmentation as shown in Embodiment 4 further improves the inference accuracy of graph classification. As an experiment using a decoder model, a power supply circuit with 2,477 circuits from the LTspice dataset was used as training data. GPT-2 was used as the decoder model, and the text was split using a whitespace tokenizer during scratch training.

[0314] Then, a unique token was assigned to each edge token. At this point, there were 41,732 types of edge tokens with the string "X:LTM805a-C:1u", and the number of tokens created by combining these tokens was 136,422.

[0315] Using the trained GPT-2 model, the first 10 tokens of the text generated from each of the 2,477 power supply circuits were input into the trained model, and the remaining circuits were predicted. As mentioned above, the average number of edge tokens in a power supply circuit is 37.78, the same as the number of edges, so 10 edge tokens represent about a quarter of the entire circuit. When the predicted circuits were converted into graphs, all 2,477 text data could be converted into graphs. However, the graph converted by GPT-2 sometimes contains nodes with a node degree of "1," and since a closed loop cannot be formed when the node degree is "1," it does not become a circuit. Therefore, to make it easier to satisfy the conditions for becoming a circuit, the processing unit 14 connects nodes with a node degree of "1" to ground nodes with edges. That is, among the output edge tokens, nodes with a node degree of "1" are connected to ground nodes with edges. However, if a node degree is "1" and the connected adjacent node is a ground node, the processing unit 14 deletes the node with a node degree of "1". In other words, among the outputted edge tokens, the nodes connected only to ground nodes are deleted.

[0316] The graph generated in this way was then analyzed for normality using a graph neural network model trained to determine normality or abnormality based solely on node type. The inference accuracy of the graph neural network model trained to determine normality and abnormality was 99.58%. Using this trained model, 41.85% of the 2,477 power supply circuits generated were determined to be normal.

[0317] On the other hand, for comparison with conventional methods, we trained and generated 2,477 power supply circuits using the graph neural network-based method with the highest generation accuracy. The generation accuracy was less than 0.1% with GraphRNN, which had the highest generation efficiency.

[0318] Furthermore, when the LTspice power supply circuit was directly input to the GPT-2 and the same processing as above was performed, 675 nodes, or 27%, of the generated text were found to satisfy the constraints of the graph data when converted to a graph. In addition, the processing unit 14 either connected the 675 nodes with a node order of 1 to the ground node with an edge or deleted them. When this was input into a model that determines normal and abnormal based on a graph neural network, 10.96% of the 675 were determined to be normal circuits. This corresponds to 2.99% of the 2,477 circuits.

[0319] The results above show that, compared to conventional graph neural network-based circuit generation, the accuracy of generating normal circuits is increased by more than 400 times (from 0.1% to 41.85%), and furthermore, it has the effect of being able to generate circuits with specific circuit components or wiring. In addition, compared to the method of directly inputting a netlist into a natural language processing unit and generating circuits using a natural language processing decoder model, which is a method that can be easily inferred by those involved in circuit generation, the method according to Embodiment 6 improves the efficiency of generating normal circuits by more than 10 times (from 2.99% to 41.85%). For this reason, the graph natural language processing method according to Embodiment 6 has special advantages compared to conventional methods.

[0320] Furthermore, conventional graph neural network-based methods not only fail to create targeted circuits containing specific circuit elements, but also have a low probability of the generated circuits being recognized as normal circuits. This indicates that they are unsuitable for generating data with strong physical constraints, such as circuits.

[0321] Furthermore, in Graph RNNs, which are based on graph neural networks and have high generation accuracy, nodes and edges are generated sequentially, including their type and attributes. As a result, the computational complexity during training or generation increases exponentially. For this reason, general-purpose computers are limited to training and generating around 20 nodes. When the dataset was limited to 20 nodes or less and training was performed, 10 million graph data points were generated, and only 120 were judged to be normal. Moreover, it was confirmed that the circuits judged to be normal were not the intended circuits.

[0322] Although the latest technologies such as Graph AutoEncoder, Graph Diffusion, Graph Reinforcement Learning, and Graph GAN were applied in addition to Graph RNN, it was difficult to surpass the accuracy of Graph RNN with respect to the graph data shown in Embodiment 6. In contrast, the graph natural language processing device 1 according to Embodiment 6 has no limit on the number of nodes it can handle, can perform learning and inference on a general low-spec computer, and can generate graph data containing specific elements with high accuracy.

[0323] Furthermore, many conventional methods, such as Graph AutoEncoder or Graph Diffusion, use the graph as a feature space and add noise to this feature space, resulting in the generation of graphs containing specific elements with a very low probability. In contrast, the graph natural language processing device 1 according to Embodiment 6 can include specific elements in the text input to the trained model, thus enabling the generation of circuits containing specific elements with 100% efficiency.

[0324] Furthermore, the graph natural language processing device 1 according to Embodiment 6 is not limited to circuits and can be used for any type of graph data. In particular, the graph natural language processing device 1 treats graph data as a normal graph and data with modified graph data as abnormal data, and creates an evaluation function using a graph neural network. As a result, the graph natural language processing device 1 can evaluate the generated graph for any type of graph data without using domain knowledge.

[0325] The graph natural language processing device 1 according to Embodiment 6 can be easily used for applications other than circuits, such as inorganic compounds, proteins, genes, or physical simulation models. The physical simulation model is one that divides space into tetrahedrons or hexahedrons, for example. The graph natural language processing device 1 can not only perform predictions from conventional graph data, but also generate graphs based on graph data, according to the processing described in Embodiment 6.

[0326] For example, if the graph network relates to mesh data of the three-dimensional finite element method, the graph natural language processing unit 1 adds edges to nodes of the same node type that are adjacent to nodes with a node degree of 2 or less among the edge tokens output from the processing unit 14, and outputs a graph network in which the minimum node degree is 3 or greater. When representing a space containing an object made up of multiple iron elements in a graph, boundary conditions must be considered between the iron elements and the air in the space. For this reason, edges are added between nodes of the same iron node type for the iron elements. This eliminates abnormal mesh data, thereby improving the efficiency of mesh data generation. This method can also be applied to the two-dimensional finite element method by applying it to nodes with a node degree of 1 or less.

[0327] As described above, in the graph natural language processing device 1 according to Embodiment 6, text is divided into edge tokens using a delimiter. This makes it possible to create text containing multiple edge tokens.

[0328] The graph natural language processing device 1 according to Embodiment 6 takes a portion of the text representing the graph network shown by the graph data as input and outputs edge tokens for the entire graph network. This makes it possible to generate a graph having a specified node.

[0329] The graph natural language processing device 1 according to Embodiment 6 takes text representing the entire graph network shown by the graph data as input and outputs text representing a graph network different from the input graph network. This makes it possible to optimize the graph network.

[0330] The graph natural language processing device 1 according to Embodiment 6 takes edge tokens in which one or more edge tokens have been replaced with hidden characters as input and outputs the hidden characters. This allows for the optimization of edge tokens, making it possible to predict node types, node attributes, and edges.

[0331] The graph natural language processing device 1 according to Embodiment 6 takes edge tokens representing the entire graph network as input and outputs feature quantities of the graph network. This allows for the extraction of feature quantities of the graph network using natural language processing.

[0332] In the graph natural language processing device 1 according to Embodiment 6, the nodes with a node order of 1 among the output edge tokens are connected to the ground node by an edge. This improves the efficiency of circuit generation.

[0333] In the graph natural language processing device 1 according to Embodiment 6, nodes connected only to ground nodes are deleted from the output edge tokens. This improves the efficiency of circuit generation.

[0334] In the graph natural language processing device 1 according to Embodiment 6, normal data, abnormal data obtained by changing the node type of the normal data, and data generated by graph natural language processing after learning the normal and abnormal data are input, and the input data is judged to be normal or abnormal. This makes it possible to evaluate the efficiency of graph generation and to separate graph networks that do not require evaluation. This takes advantage of the fact that the inference cost of determining normal or abnormal based on the graph natural language processing device 1 is smaller than the cost required for evaluation.

[0335] In the graph natural language processing device 1 according to Embodiment 6, normal data is extracted from the output edge tokens. This makes it possible to accurately determine that a graph is normal using only the node type.

[0336] In the graph natural language processing device 1 according to Embodiment 1, the graph network represented by the graph data relates to mesh data of the finite element method. Edges are added to nodes of the same node type that are adjacent to nodes with a node degree of 2 or less among the output edge tokens, and a graph network is output with a minimum node degree of 3 or more. This improves the efficiency of mesh data generation.

[0337] The graph natural language processing device 1 according to Embodiment 6 includes a whitespace tokenizer for dividing text. This allows a string to be divided into edge tokens.

[0338] The graph natural language processing device 1 according to Embodiment 6 includes a sentence piece tokenizer that divides text. This allows a string to be divided into edge tokens.

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

[0340] 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.

[0341] 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: a node extraction unit that extracts nodes including node type and node attributes from graph data; an edge extraction unit that extracts edges between nodes from the graph data; a processing unit that creates word nodes by combining the node type and node attributes extracted by the node extraction unit, creates edge tokens by combining word nodes corresponding to the nodes at both ends of the edges extracted by the edge extraction unit, and outputs text consisting of one or more edge tokens.

2. The graph natural language processing device according to claim 1, characterized in that the processing unit outputs text with delimiters between edge tokens.

3. The graph natural language processing device according to claim 1, 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 connected 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.

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

5. The graph natural language processing device according to claim 3 or 4, characterized in that the processing unit provides one or more virtual nodes for one of the multi-terminal nodes and connects the terminal nodes via the virtual nodes.

6. The graph natural language processing device according to claim 1, characterized in that the processing unit outputs edge tokens arranged based on the information possessed by the word nodes at both ends of the edge.

7. The graph natural language processing device according to claim 6, characterized in that the processing unit outputs edge tokens obtained by arranging the word nodes at both ends of an edge in order of at least one of the following: node degree order, node type order, node attribute order, and lexicographical order.

8. The graph natural language processing device according to any one of claims 1, 6, and 7, characterized in that the processing unit has a processing unit that extracts the maximum node degree, which is the larger of the two word nodes constituting each edge token, and arranges the edge tokens in order of maximum node degree.

9. The graph natural language processing device according to any one of claims 1, 6, and 7, characterized in that the processing unit has a processing unit that arranges edge tokens in the order of the sum of the node degrees at both ends of each edge.

10. The graph natural language processing device according to claim 1, characterized in that the processing unit has a processing unit that arranges edge tokens in order of distance from a centroid node, which is a single node, to each edge.

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

12. The graph natural language processing device according to claim 10, characterized in that the centroid node is a node that has the node type or node attribute that all the data in the dataset has.

13. The graph natural language processing device according to claim 12, characterized in that the centroid node is a node having a node type or node attribute that exists only once in a single data set.

14. The graph natural language processing device according to claim 6 or 8, characterized in that the processing unit has a processing unit that arranges edge tokens with the same maximum node degree in lexicographical order.

15. The graph natural language processing device according to claim 6 or 9, characterized in that the processing unit has a processing unit that arranges edge tokens whose node degrees are equal in lexicographical order.

16. The graph natural language processing device according to claim 10, characterized in that the processing unit has a processing unit that arranges edge tokens that are the same distance from the centroid node in lexicographical order.

17. The graph natural language processing device according to claim 1 and any one of claims 8 to 16, characterized in that the processing unit has a processing unit that arranges edge tokens in order of terminal number for edge tokens corresponding to edges connected to nodes having terminal numbers.

18. The graph natural language processing device according to claim 8, characterized in that the processing unit has a processing unit that augments data by rearranging the order of edge tokens with the same maximum node degree.

19. The graph natural language processing device according to claim 9, characterized in that the processing unit has a processing unit that augments data by rearranging the order of edge tokens whose node degrees are equal.

20. The graph natural language processing device according to claim 10, characterized in that the processing unit has a processing unit that augments data by rearranging the order of edge tokens that are the same distance from the centroid node.

21. The graph natural language processing device according to any one of claims 1 to 16 and 18 to 20, characterized in that the processing unit has a processing unit that augments data with edge tokens having word nodes whose node attributes have been changed.

22. The graph natural language processing device according to any one of claims 1 to 16 and 18 to 20, characterized in that the processing unit has a processing unit that augments data with edge tokens having word nodes that have undergone at least one of the following: changing the node attributes of nodes of the same node type but with different node attributes, and swapping node attributes between nodes.

23. The graph natural language processing device according to any one of claims 1 to 16 and 18 to 20, characterized in that the processing unit has a processing unit that augments data with edge tokens having word nodes that have undergone at least one of the following: changing the node attributes of nodes of the same node type, the same node order, and different node attributes, and swapping node attributes between nodes.

24. The graph natural language processing device according to claim 1, characterized in that edges that are not connected to nodes at both ends are not treated as edge tokens.

25. The graph natural language processing device according to claim 1, characterized in that the edge tokens of an edge to which a node is connected only at one end are used as word nodes.

26. The graph natural language processing device according to claim 1, characterized in that the edge token of an edge to which a node is connected only at one end is a string formed by concatenating a word node and a word node indicating that it is an empty node attribute.

27. The graph natural language processing device according to claim 2, characterized in that it divides text into edge tokens using the delimiter.

28. The graph natural language processing device according to 27, characterized in that it takes a portion of the text representing the graph network shown by the graph data as input and outputs edge tokens for the entire graph network.

29. The graph natural language processing device according to 27, characterized in that it takes text representing the entire graph network shown by the graph data as input and outputs text representing a graph network different from the input graph network.

30. The graph natural language processing device according to claim 27, characterized in that it takes an edge token in which one or more edge tokens have been replaced with hidden characters as input, and outputs the hidden characters.

31. The graph natural language processing device according to claim 27, characterized in that it takes edge tokens of the entire graph network shown by the graph data as input and outputs feature quantities of the graph network.

32. The graph natural language processing device according to claim 1, characterized in that the graph network shown by the graph data is a graph network in which the types of circuit components are used as node types and circuit constants or circuit model numbers are used as node attributes.

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

34. The graph natural language processing device according to any one of claims 28 to 30 and 33, characterized in that it connects the node with node degree 1 among the output edge tokens with the ground node via an edge.

35. The graph natural language processing device according to any one of claims 28 to 30 and 33, characterized in that it removes nodes from the output edge tokens that are connected only to ground nodes.

36. A graph natural language processing device according to any one of claims 28 to 30, characterized in that it takes normal data, abnormal data obtained by changing the node type of the normal data, and data generated by graph natural language processing that learns the normal data and the abnormal data and converts graph data into text as input, and determines whether the input data is normal or abnormal.

37. The graph natural language processing device according to 36, characterized in that it extracts normal data from the output edge tokens.

38. The graph natural language processing device according to any one of claims 28 to 30, wherein the graph network shown by the graph data relates to an inorganic compound, and the processing unit adds hydrogen atoms as nodes to nodes among the output edge tokens whose valence is less than the number of edges, and connects them to satisfy the valence.

39. The graph natural language processing device according to any one of claims 28 to 30, wherein the graph network shown by the graph data relates to mesh data of the finite element method, and edges are added to nodes of the same node type that are adjacent to nodes with a node degree of 2 or less among the output edge tokens, and a graph network is output in which the minimum node degree is 3 or more.

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

41. The graph natural language processing device according to 40, characterized in that it removes the half-width space contained in the output edge token and word node, or replaces the half-width space with a character that does not contain the half-width space.

42. The graph natural language processing device according to claim 1, characterized in that the node type is a discrete value and the node attribute is a continuous value.

43. The graph natural language processing device according to claim 40, characterized by comprising a whitespace tokenizer for splitting text.

44. The graph natural language processing device according to claim 40, characterized by comprising a sentence piece tokenizer for splitting text.

45. The graph natural language processing device according to claim 1, characterized in that the processing unit divides a directional node into two nodes and assigns a different node type to each of the divided nodes.

46. ​​The graph natural language processing device according to claim 1, characterized in that the processing unit divides the nodes at both ends of a directional edge into two nodes each, and assigns a different node type to each of the divided nodes.

47. The graph natural language processing device according to any one of claims 1 to 16 and 18 to 20, characterized in that the processing unit creates text in which two or more edge tokens have been modified.

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

49. The graph natural language processing device according to 32, characterized in that the processing unit augments data by forming an equivalent circuit including parasitic capacitance or residual inductance or residual resistance between circuit components, between circuit components and wiring, between wiring, and between wiring into a graph network.

50. A graph natural language processing method using a graph natural language processing device, comprising: a step of a node extraction unit extracting nodes including node types and node attributes from graph data; a step of an edge extraction unit extracting edges between nodes from graph data; and a step of a processing unit creating word nodes by combining the node types and node attributes extracted by the node extraction unit, creating edge tokens by combining word nodes corresponding to the nodes at both ends of the edges extracted by the edge extraction unit, and outputting text consisting of one or more edge tokens.

51. A program to cause a computer to function as: a node extraction unit that extracts nodes including node type and node attributes from graph data; an edge extraction unit that extracts edges between nodes from the graph data; a processing unit that creates word nodes by combining the node types and node attributes extracted by the node extraction unit, creates edge tokens by combining word nodes corresponding to the nodes at both ends of the edges extracted by the edge extraction unit, and outputs text consisting of one or more edge tokens.