# US 2024/0202502 A1 · Method and apparatus for generating both local-level and global-level explanations of graph neural networks

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2024/0202502 A1
- Document ID: US20240202502A1
- Status: Published application
- Kind: A1
- Application number: 18/507,276
- Filed: 2023-11-13
- Published: 2024-06-20
- Earliest claimed: 2022-12-14
- Assignees: Research & Business Foundation Sungkyunkwan University
- Applicants: Research Business Foundation SUNGKYUNKWAN UNIVERSITY
- Inventors: Gyeong Rok PARK; Hogun PARK
- Web page: https://patentgrep.com/patent/US20240202502A1

## CPC

- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/045: Combinations of networks
- G06N 3/08: Learning methods
- G06N 5/045: Explanation of inference; Explainable artificial intelligence [XAI]; Interpretable artificial intelligence
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

There is provided an apparatus of generating explanations for a graph neural network. The apparatus comprises the graph neural network that embeds an input graph into a node representation matrix H, and then outputs a result matrix Z in which a score of a specific class for each node is represented corresponding to the node representation matrix using a weight matrix W.

## Claims

### Claim 1

A method of generating explanations for a graph neural network to be performed by an apparatus for generating explanations for the graph neural network, the method comprising:
preparing the graph neural network that embeds an input graph into a node representation matrix H, and then outputs a result matrix Z in which a score of a specific class for each node is represented corresponding to the node representation matrix using a weight matrix W;
decomposing the weight matrix W into vector products of an orbit weight matrix P containing information on each orbit and an orbit-class score matrix S;
generating a global explanation in which corresponding orbits and graphlets including the corresponding orbits are provided as subgraphs of the input graph in descending order of orbit-class scores indicating contributions of orbits when the graph neural network classifies nodes into a specific class on the basis of results of decomposition;
selecting a specific node among nodes and classifying the selected specific node as the specific class; and
generating a local explanation in which corresponding orbits and graphlets including the corresponding orbits are provided as subgraphs of the input graph in descending order of node-orbit-class scores indicating contributions of nodes when the graph neural network classifies the selected specific node as the specific class on the basis of the results of decomposition.

### Claim 2 (depends on 1)

The method of claim 1, wherein the decomposing includes:
training the orbit weight matrix P using each node embedding vector in the input graph as an input such that presence or absence of a specific orbit for each node is predictable using a vector product of each node embedding vector and an orbit weight vector; and
training orbit-class scores using the trainned orbit weight matrix P as an input such that the weight matrix W is able to be restored using a matrix product of the orbit weight matrix P and the orbit-class score matrix S.

### Claim 3 (depends on 2)

The method of claim 2, wherein the trainof the orbit weight matrix P includes:
calculating the vector product for all node embedding vectors in the input graph, applying a sigmoid function to the vector product, and then training a case in which the specific orbit exists at a corresponding node as 1 and a case in which the specific orbit does not exist at the corresponding node as 0; and
normalizing the trained orbit weight vector in order to obtain an orbit weight vector of a certain size to train a final orbit weight vector containing orbit distribution information.

### Claim 4 (depends on 2)

The method of claim 2, wherein the training of the orbit-class scores comprises training coefficients when a weight vector is decomposed into linear combinations of orbit weights.

### Claim 5 (depends on 4)

The method of claim 4, wherein the orbit-class score is limited to positive numbers at the time of training the coefficients.

### Claim 6 (depends on 4)

The method of claim 4, wherein the training orbit-class scores is performed such that differences from the weight vector are reduced by selecting orbit weights one by one.

### Claim 7

An apparatus for generating explanations for a graph neural network, the apparatus comprising:
a memory configured to store one or more instructions; and
a processor configured to execute the one or more instructions stored in the memory, wherein the instructions, when executed by the processor, cause the processor to:
prepare the graph neural network that embeds an input graph into a node representation matrix H, and then outputs a result matrix Z in which a score of a specific class for each node is represented corresponding to the node representation matrix using a weight matrix W;
decompose the weight matrix W into vector products of an orbit weight matrix P containing information on each orbit and an orbit-class score matrix S;
generate a global explanation in which corresponding orbits and graphlets including the corresponding orbits are provided as subgraphs of the input graph in descending order of orbit-class scores indicating contributions of orbits when the graph neural network classifies nodes into a specific class on the basis of results of decomposition;
select a specific node among nodes and classify the selected specific node as the specific class; and
generate a local explanation in which corresponding orbits and graphlets including the corresponding orbits are provided as subgraphs of the input graph in descending order of node-orbit-class scores indicating contributions of nodes when the graph neural network classifies the selected specific node as the specific class on the basis of the results of decomposition.

### Claim 8 (depends on 7)

The apparatus of claim 7, wherein the processor is configured to:
train the orbit weight matrix P using each node embedding vector in the input graph as an input such that presence or absence of a specific orbit for each node is predictable using a vector product of each node embedding vector and an orbit weight vector; and
train orbit-class scores using the trained orbit weight matrix P as an input such that the weight matrix W is able to be restored using a matrix product of the orbit weight matrix P and the orbit-class score matrix S.

### Claim 9 (depends on 8)

The apparatus of claim 8, wherein, when training the orbit weight matrix P, the processor is configured to:
calculate the vector product for all node embedding vectors in the input graph, apply a sigmoid function to the vector product, and then train a case in which a specific orbit exists at a corresponding node as 1 and a case in which the specific orbit does not exist at the corresponding node as 0; and
normalize the trained orbit weight vector in order to obtain an orbit weight vector of a certain size to train a final orbit weight vector containing orbit distribution information.

### Claim 10 (depends on 8)

The apparatus of claim 8, wherein the processor is configured to train coefficients when a weight vector is decomposed into linear combinations of orbit weights at the time of training the orbit-class scores.

### Claim 11 (depends on 10)

The apparatus of claim 10, wherein the orbit-class score is limited to positive numbers at the time of training the coefficients.

### Claim 12 (depends on 10)

The apparatus of claim 10, wherein the processor is configured to train the coefficients such that differences from the weight vector are reduced by selecting orbit weights one by one.

### Claim 13

A non-transitory computer readable storage medium storing computer executable instructions, wherein the instructions, when executed by a processor, cause the processor to perform a method of generating explanations for a graph neural network, the method comprising:
preparing the graph neural network that embeds an input graph into a node representation matrix H, and then outputs a result matrix Z in which a score of a specific class for each node is represented corresponding to the node representation matrix using a weight matrix W;
decomposing the weight matrix W into vector products of an orbit weight matrix P containing information on each orbit and an orbit-class score matrix S;
generating a global explanation in which corresponding orbits and graphlets including the corresponding orbits are provided as subgraphs of the input graph in descending order of orbit-class scores indicating contributions of orbits when the graph neural network classifies nodes into a specific class on the basis of results of decomposition;
selecting a specific node among nodes and classifying the selected specific node as the specific class; and
generating a local explanation in which corresponding orbits and graphlets including the corresponding orbits are provided as subgraphs of the input graph in descending order of node-orbit-class scores indicating contributions of nodes when the graph neural network classifies the selected specific node as the specific class on the basis of the results of decomposition.

### Claim 14 (depends on 13)

The non-transitory computer readable storage medium of claim 13, wherein the decomposing comprises:
training the orbit weight matrix P using each node embedding vector in the input graph as an input such that presence or absence of a specific orbit for each node is predictable using a vector product of each node embedding vector and an orbit weight vector; and
training orbit-class scores using the trained orbit weight matrix P as an input such that the weight matrix W is able to be restored using a matrix product of the orbit weight matrix P and the orbit-class score matrix S.

### Claim 15 (depends on 14)

The non-transitory computer readable storage medium of claim 14, wherein the training of the orbit weight matrix P comprises:
calculating the vector product for all node embedding vectors in the input graph, applying a sigmoid function to the vector product, and training a case in which a specific orbit exists at a corresponding node as 1 and a case in which the specific orbit does not exist at the corresponding node as 0; and
normalizing the trained orbit weight vector in order to obtain an orbit weight vector of a certain size to train a final orbit weight vector containing orbit distribution information.

### Claim 16 (depends on 14)

The non-transitory computer readable storage medium of claim 14, wherein the training of the orbit-class scores comprises training coefficients when a weight vector is decomposed into linear combinations of orbit weights.

### Claim 17 (depends on 16)

The non-transitory computer readable storage medium of claim 16, wherein the orbit-class score is limited to positive numbers at the time of training the coefficients.

### Claim 18 (depends on 16)

The non-transitory computer readable storage medium of claim 16, wherein training is performed such that differences from the weight vector are reduced by selecting orbit weights one by one at the time of training the coefficients.
