KR102485944B1 - Graph Encoding Method in Transformer Neural Network - Google Patents

Graph Encoding Method in Transformer Neural Network Download PDF

Info

Publication number
KR102485944B1
KR102485944B1 KR1020220081406A KR20220081406A KR102485944B1 KR 102485944 B1 KR102485944 B1 KR 102485944B1 KR 1020220081406 A KR1020220081406 A KR 1020220081406A KR 20220081406 A KR20220081406 A KR 20220081406A KR 102485944 B1 KR102485944 B1 KR 102485944B1
Authority
KR
South Korea
Prior art keywords
node
relationship information
nodes
graph
edge connection
Prior art date
Application number
KR1020220081406A
Other languages
Korean (ko)
Inventor
박원표
장웅기
김준태
이동건
Original Assignee
주식회사 스탠다임
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 스탠다임 filed Critical 주식회사 스탠다임
Application granted granted Critical
Publication of KR102485944B1 publication Critical patent/KR102485944B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/082Learning methods modifying the architecture, e.g. adding, deleting or silencing nodes or connections
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/01Dynamic search techniques; Heuristics; Dynamic trees; Branch-and-bound

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Health & Medical Sciences (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The present invention relates to a graph encoding method in a transformer neural network. More specifically, the present invention relates to the graph encoding method that can achieve a precise positioning of the nodes and a tight integration of a node-edge and node-space information in a process of encoding a graph consisting of a plurality of nodes and edges. The graph encoding method comprises: a step of operating the spatial relationship information between the plurality of nodes; a step of including a type of edge that connects the nodes to each other; a step of operating the node-edge connection relationship information; and a step of operating the relationship information between the nodes.

Description

트랜스포머 신경망에서의 그래프 인코딩 방법{Graph Encoding Method in Transformer Neural Network}Graph Encoding Method in Transformer Neural Network}

본 발명은 트랜스포머 신경망에서의 그래프 인코딩 방법에 관한 것으로, 보다 구체적으로 다수의 노드와 엣지로 이루어진 그래프를 인코딩하는 과정에서 노드들의 정확한 위치, 그리고 노드-엣지 및 노드-공간 정보의 긴밀한 통합을 이룰 수 있는 그래프 인코딩 방법에 관한 것이다.The present invention relates to a graph encoding method in a transformer neural network, and more specifically, in the process of encoding a graph consisting of a plurality of nodes and edges, precise location of nodes and close integration of node-edge and node-space information can be achieved. It is about a graph encoding method that has.

신약 개발에 소요되는 비용은 신규 치료제 개발의 성공률이 감소함에 따라 급격히 증가하고 있는 추세이다. 특히, 선도 물질 탐색(lead finding) 및 선도 물질 최적화(lead optimization) 단계에서 신약 개발 비용을 낮추기 위해 심층 신경망을 통한 대규모 스크리닝이 큰 주목을 받고 있다. 분자를 그래프 형태로 표현하는 것에 의해, 약물-유사성, 용해도 또는 합성 가능성과 같은 중요한 특성을 예측함으로써 그래프 신경망을 스크리닝에 사용할 수 있다. 따라서, 그래프 표현 학습은 약물 발견의 핵심 기술이 되고 있다.The cost of developing a new drug is rapidly increasing as the success rate of developing a new treatment decreases. In particular, large-scale screening through deep neural networks is receiving great attention in order to lower the cost of new drug development in the stages of lead finding and lead optimization. By representing molecules in graphical form, graph neural networks can be used for screening by predicting important properties such as drug-likeness, solubility or synthesizability. Therefore, graph representation learning is becoming a key technology for drug discovery.

한편, Vaswani et al. (2017)에 의해 소개된 트랜스포머 신경망은 셀프 어텐션을 사용하여 그래프 컨볼루션망(Graph convolutional network)의 편향을 극복하는 데 효과적이다. 하지만, 그래프 컨볼루션망에서 위치의 명시적 표현은 손실되기 때문에 셀프 어텐션의 숨겨진 표현에 그래프 구조를 통합하는 것이 핵심적 과제로 부상하고 있다.Meanwhile, Vaswani et al. (2017) is effective in overcoming the bias of graph convolutional networks using self-attention. However, since the explicit representation of position is lost in graph convolutional networks, integrating the graph structure into the hidden representation of self-attention has emerged as a key challenge.

종래 기술로서, 그래프 라플라시안을 사용하여 그래프를 선형화하는 방법은 각 노드의 절대적 위치를 인코딩하는 방법을 개시한다(Dwivedi & Bresson, 2020; Kreuzer et al., 2021). 하지만, 그래프의 선형화로 인해 위치의 정확성을 잃게 되는 단점이 있다.As a prior art, a method for linearizing a graph using the graph Laplacian discloses a method for encoding the absolute position of each node (Dwivedi & Bresson, 2020; Kreuzer et al., 2021). However, there is a disadvantage in that positional accuracy is lost due to linearization of the graph.

또 다른 기술은 바이어스 항(bias term)을 갖는 다른 노드에 대한 위치를 인코딩하는 방법을 개시한다(Ying et al., 2021). 이는, 노드-엣지 및 노드-공간 정보의 긴밀한 통합을 잃게 되는 단점이 있다.Another technique discloses a method of encoding a position relative to another node with a bias term (Ying et al., 2021). This has the disadvantage of losing the tight integration of node-edge and node-space information.

이에, 본 발명자들은 트랜스포머 신경망 모델에서 다수의 노드와 엣지로 이루어진 그래프를 인코딩하는 과정에서, 노드들의 정확한 위치가 유지되면서도, 노드-엣지 및 노드-공간 정보의 긴밀한 통합을 이룰 수 있는 본 발명을 개발하기에 이르렀다.Accordingly, the present inventors developed the present invention capable of achieving close integration of node-edge and node-space information while maintaining accurate positions of nodes in the process of encoding a graph consisting of a plurality of nodes and edges in a transformer neural network model. came to do

한국등록특허문헌 제10-2389255호(2022.04.22.)Korean Registered Patent Document No. 10-2389255 (2022.04.22.) 한국공개특허문헌 제10-2021-0113192호(2021.09.15.)Korean Patent Publication No. 10-2021-0113192 (2021.09.15.)

상기한 과제를 해결하기 위해 본 발명은 노드 간의 관계 정보를 연산하는 과정에서 노드-공간 관계 정보를 사용함으로써, 그래프를 구성하는 노드 간의 상대 위치 정보가 손실없이 보존되면서 그래프를 인코딩할 수 있는 방법 및 시스템을 제공하는 것에 그 목적이 있다.In order to solve the above problems, the present invention provides a method for encoding a graph while preserving relative position information between nodes constituting the graph by using node-space relation information in the process of calculating relation information between nodes, and Its purpose is to provide a system.

또한, 노드 간의 관계 정보를 연산하는 과정에서 노드-엣지 연결 관계 정보를 사용함으로써, 그래프 그 자체의 정보 역시 손실없이 보존되면서 그래프를 인코딩할 수 있는 방법 및 시스템을 제공하는 것에 그 목적이 있다.In addition, an object of the present invention is to provide a method and system capable of encoding a graph while preserving the information of the graph itself without loss by using the node-edge connection relation information in the process of calculating the relation information between nodes.

또한, 그래프-인코딩된 값을 연산하는 과정에서도 노드 간의 공간 관계 정보 및 노드 간의 엣지 연결 관계 정보를 사용함으로써, 정보 손실 없이 그래프를 인코딩할 수 있는 방법 및 시스템을 제공하는 것에 그 목적이 있다.In addition, an object of the present invention is to provide a method and system capable of encoding a graph without loss of information by using spatial relationship information between nodes and edge connection relationship information between nodes even in the process of calculating a graph-encoded value.

또한, 트랜스포머 신경망을 사용하기 때문에, 기존의 신경망 모델에서는 달성하기 어려운, 그래프 상의 멀리 떨어져 있는 2개의 노드 간의 관계까지 고려하여 그래프를 인코딩할 수 있는 방법 및 시스템을 제공하는 것에 그 목적이 있다.In addition, since a transformer neural network is used, an object of the present invention is to provide a method and system capable of encoding a graph by considering the relationship between two distant nodes on the graph, which is difficult to achieve in the existing neural network model.

상기한 목적을 달성하기 위한 본 발명의 일 실시예는, 트랜스포머 신경망(Transformer Neural Network)에서, 다수의 노드와 상기 다수의 노드를 서로 연결하는 엣지들로 이루어진 그래프를 인코딩하는 방법으로서, 노드 간의 거리를 이용하여 상기 다수의 노드 간의 공간 관계(spatial relation) 정보가 연산되는 단계, 노드 간의 엣지 연결 관계를 이용하여 상기 다수의 노드 간의 엣지 연결 관계 정보가 연산되는 단계로서, 상기 엣지 연결 관계 정보는 노드 간을 서로 연결하는 엣지의 유형을 포함하는, 단계, 상기 공간 관계 정보 및 상기 엣지 연결 관계 정보 중 하나 이상과, 노드의 특징(feature)을 이용하여 노드-공간 관계 정보(bspatial) 및 노드-엣지 연결 관계 정보(bedge) 중 하나 이상이 연산되는 단계 및 노드-노드 인터렉션 값과, 상기 노드-공간 관계 정보(bspatial) 및 상기 노드-엣지 연결 관계 정보(bedge) 중 하나 이상을 이용하여 노드 간의 관계 정보(

Figure 112022069064913-pat00001
)가 연산되는 단계를 포함하는, 트랜스포머 신경망에서의 그래프 인코딩 방법을 제공한다.One embodiment of the present invention for achieving the above object is a method of encoding a graph consisting of a plurality of nodes and edges connecting the plurality of nodes to each other in a Transformer Neural Network, wherein the distance between nodes A step in which spatial relation information between the plurality of nodes is calculated using , and an edge connection relation information between the plurality of nodes is calculated using an edge connection relation between nodes, wherein the edge connection relation information is a node A step including the type of edge connecting the nodes to each other, using at least one of the spatial relationship information and the edge connection relationship information and the feature of the node to use node-spatial relationship information (b spatial ) and node- Step of calculating one or more of the edge connection relationship information (b edge ) and node-node interaction value, and using one or more of the node-spatial relationship information (b spatial ) and the node-edge connection relationship information (b edge ) relationship information between nodes (
Figure 112022069064913-pat00001
) is calculated, it provides a graph encoding method in a transformer neural network.

일 실시예에 있어서, 상기 노드 간의 거리를 이용하여 상기 다수의 노드 간의 공간 관계(spatial relation) 정보가 연산되는 단계는, 노드 간의 최단 거리를 이용하여, 상기 다수의 노드 간의 공간 관계 정보가 연산되는 단계를 더 포함할 수 있다.In one embodiment, the calculating of the spatial relation information between the plurality of nodes using the distance between the nodes includes calculating the spatial relation information between the plurality of nodes using the shortest distance between the nodes. Further steps may be included.

일 실시예에 있어서, 상기 노드 간의 공간 관계 정보는, 노드 간의 거리가 기 설정된 값(L) 이하이면 그 거리에 따라 서로 다른 값을 가지고, 노드 간의 거리가 상기 기 설정된 값(L)보다 크면, 그 거리가 다르더라도 서로 동일한 값을 가질 수 있다. In one embodiment, the spatial relationship information between nodes has different values depending on the distance if the distance between nodes is less than or equal to a preset value (L), and if the distance between nodes is greater than the preset value (L), Even if the distances are different, they may have the same value.

일 실시예에 있어서, 상기 기 설정된 값(L)은 1 이상 4 이하의 자연수일 수 있다. In one embodiment, the preset value (L) may be a natural number of 1 or more and 4 or less.

일 실시예에 있어서, 상기 노드 간의 엣지 연결 관계 정보는, 노드 간을 서로 연결하는 엣지의 유형에 따라 서로 다른 값을 가지고, 서로 동일한 노드 간의 엣지 연결 관계 정보들은 서로 동일한 제1 값을 가지며, 엣지를 통해 직접 연결되지 않은 노드 간의 엣지 연결 관계 정보들은 서로 동일한 제2 값을 가질 수 있다.In one embodiment, the edge connection relationship information between the nodes has a different value according to the type of edge connecting the nodes to each other, the edge connection relationship information between the same nodes has the same first value, Edge connection relationship information between nodes that are not directly connected through may have the same second value.

일 실시예에 있어서, 상기 그래프는 분자이며, 상기 노드는 원자이고, 상기 엣지는 원자 간의 결합일 수 있다.In one embodiment, the graph may be a molecule, the node may be an atom, and the edge may be a bond between atoms.

일 실시예에 있어서, 상기 노드는 원자의 종류에 따라 그 특징이 다르고, 상기 엣지는 결합의 종류에 따라 그 특징이 다를 수 있다.In one embodiment, the node may have different characteristics depending on the type of atom, and the edge may have different characteristics depending on the type of bond.

일 실시예에 있어서, 상기 노드-공간 관계 정보(bspatial)는 아래의 수식에 의해 결정되고,In one embodiment, the node-space relationship information (b spatial ) is determined by the following formula,

Figure 112022069064913-pat00002
Figure 112022069064913-pat00002

여기서,

Figure 112022069064913-pat00003
는 노드 i와 노드 j 간의 노드-공간 관계 정보이고,
Figure 112022069064913-pat00004
는 노드 i의 쿼리 벡터이고,
Figure 112022069064913-pat00005
는 노드 i와 노드 j 간의 최단 거리를 고려한 공간 관계 정보이며,
Figure 112022069064913-pat00006
는 노드 j의 키 벡터이며,
Figure 112022069064913-pat00007
는 노드 i와 노드 j 간의 최단 거리를 고려한 공간 관계 정보이며, i와 j는 1 이상의 서로 다른 자연수일 수 있다.here,
Figure 112022069064913-pat00003
Is the node-space relationship information between node i and node j,
Figure 112022069064913-pat00004
is the query vector of node i,
Figure 112022069064913-pat00005
is spatial relationship information considering the shortest distance between node i and node j,
Figure 112022069064913-pat00006
is the key vector of node j,
Figure 112022069064913-pat00007
is spatial relationship information considering the shortest distance between node i and node j, and i and j may be 1 or more different natural numbers.

일 실시예에 있어서, 상기 노드-엣지 연결 관계 정보(bedge)는 아래의 수식에 의해 결정되고,In one embodiment, the node-edge connection relationship information (b edge ) is determined by the following formula,

Figure 112022069064913-pat00008
Figure 112022069064913-pat00008

여기서,

Figure 112022069064913-pat00009
는 노드 i와 노드 j의 노드-엣지 연결 관계 정보이고,
Figure 112022069064913-pat00010
는 노드 i의 쿼리 벡터이고,
Figure 112022069064913-pat00011
는 노드 i와 노드 j의 엣지 연결 관계 정보이며,
Figure 112022069064913-pat00012
는 노드 j의 키 벡터이며,
Figure 112022069064913-pat00013
는 노드 i와 노드 j 의 엣지 연결 관계 정보이며, i와 j는 1 이상의 서로 다른 자연수일 수 있다.here,
Figure 112022069064913-pat00009
Is the node-edge connection relationship information of node i and node j,
Figure 112022069064913-pat00010
is the query vector of node i,
Figure 112022069064913-pat00011
is the edge connection relationship information between node i and node j,
Figure 112022069064913-pat00012
is the key vector of node j,
Figure 112022069064913-pat00013
is edge connection relationship information between node i and node j, and i and j may be 1 or more different natural numbers.

일 실시예에 있어서, 상기 노드-노드 인터렉션 값은, 어느 하나의 노드의 쿼리 벡터와 다른 하나의 노드의 키 벡터를 이용하여 연산될 수 있다.In one embodiment, the node-node interaction value may be calculated using a query vector of one node and a key vector of another node.

일 실시예에 있어서, 상기 노드 간의 관계 정보는 아래의 수식에 의해 결정되고,In one embodiment, the relationship information between the nodes is determined by the following formula,

Figure 112022069064913-pat00014
Figure 112022069064913-pat00014

여기서,

Figure 112022069064913-pat00015
는 노드 i와 노드 j 간의 관계 정보이고,
Figure 112022069064913-pat00016
는 노드 i와 노드 j 간의 노드-공간 관계 정보이며,
Figure 112022069064913-pat00017
는 노드 i와 노드 j 간의 노드-엣지 연결 관계 정보이며,
Figure 112022069064913-pat00018
는 쿼리 벡터 및 키 벡터의 차원일 수 있다.here,
Figure 112022069064913-pat00015
Is the relationship information between node i and node j,
Figure 112022069064913-pat00016
is the node-space relationship information between node i and node j,
Figure 112022069064913-pat00017
is node-edge connection relationship information between node i and node j,
Figure 112022069064913-pat00018
may be the dimensions of the query vector and key vector.

일 실시예에 있어서, (e) 상기 노드 간의 관계 정보, 상기 공간 관계 정보 및 상기 엣지 연결 관계 정보를 이용하여 그래프-인코딩된 값이 연산되는 단계를 더 포함할 수 있다.In an embodiment, the method may further include calculating a graph-encoded value using the relationship information between the nodes, the spatial relationship information, and the edge connection relationship information.

일 실시예에 있어서, 상기 그래프-인코딩된 값은 아래의 수식에 의해 결정되고,In one embodiment, the graph-encoded value is determined by the formula below,

Figure 112022069064913-pat00019
Figure 112022069064913-pat00019

여기서,

Figure 112022069064913-pat00020
는 그래프-인코딩된 값이고,
Figure 112022069064913-pat00021
는 노드 i와 노드 j간의 관계 정보이며,
Figure 112022069064913-pat00022
Figure 112022069064913-pat00023
에 대해 softmax 함수를 취한 값이며,
Figure 112022069064913-pat00024
는 노드 j의 밸류 벡터이며,
Figure 112022069064913-pat00025
는 노드 i와 노드 j 간의 최단 거리를 고려한 공간 관계 정보이며,
Figure 112022069064913-pat00026
는 노드 i와 노드 j의 엣지 연결 관계 정보일 수 있다.here,
Figure 112022069064913-pat00020
is a graph-encoded value,
Figure 112022069064913-pat00021
Is the relationship information between node i and node j,
Figure 112022069064913-pat00022
Is
Figure 112022069064913-pat00023
It is the value obtained by taking the softmax function for
Figure 112022069064913-pat00024
is the value vector of node j,
Figure 112022069064913-pat00025
is spatial relationship information considering the shortest distance between node i and node j,
Figure 112022069064913-pat00026
may be edge connection relationship information between node i and node j.

또한, 본 발명은 전술한 방법을 사용하여 다수의 노드와 상기 다수의 노드를 서로 연결하는 엣지들로 이루어진 그래프를 인코딩하는 인코더로서, 노드 간의 거리를 이용하여 상기 다수의 노드 간의 공간 관계(spatial relation) 정보를 연산하는 공간 관계 정보 연산 모듈, 노드 간의 엣지 연결 관계를 이용하여 상기 다수의 노드 간의 엣지 연결 관계 정보를 연산하는 엣지 관계 정보 연산 모듈로서, 상기 엣지 연결 관계 정보는 노드 간을 서로 연결하는 엣지의 유형을 포함하는, 엣지 관계 정보 연산 모듈, 상기 공간 관계 정보 및 상기 엣지 연결 관계 정보 중 하나 이상과, 노드의 특징(feature)을 이용하여 노드-공간 관계 정보(bspatial) 및 노드-엣지 연결 관계 정보(bedge) 중 하나 이상을 연산하는 노드-공간 관계 정보 연산 모듈 및 노드-노드 인터렉션 값과, 상기 노드-공간 관계 정보(bspatial) 및 상기 노드-엣지 연결 관계 정보(bedge) 중 하나 이상을 이용하여 노드 간의 관계 정보를 연산하는 노드-노드 관계 정보 연산 모듈을 포함하는, 인코더를 제공한다.In addition, the present invention is an encoder that encodes a graph consisting of a plurality of nodes and edges connecting the plurality of nodes to each other using the above-described method, using a distance between nodes to determine the spatial relation between the plurality of nodes. ) A spatial relationship information calculation module that calculates information, and an edge relationship information calculation module that calculates edge connection relationship information between the plurality of nodes using edge connection relationships between nodes, wherein the edge connection relationship information connects nodes to each other Node-spatial relationship information (b spatial ) and node-edge using at least one of an edge relationship information calculation module, the spatial relationship information, and the edge connection relationship information, including the type of edge, and a feature of a node. A node-spatial relationship information calculation module for calculating one or more of connection relationship information (b edge ) and a node-node interaction value, and the node-spatial relationship information (b spatial ) and the node-edge connection relationship information (b edge ) It provides an encoder including a node-node relationship information calculation module for calculating relationship information between nodes using one or more of the following.

일 실시예에 있어서, 상기 노드 간의 관계 정보, 상기 공간 관계 정보 및 상기 엣지 연결 관계 정보를 이용하여 그래프-인코딩된 값을 연산하는 그래프 인코딩 값 연산 모듈을 더 포함하고, 상기 그래프-인코딩된 값이 인코딩의 결과값일 수 있다.In one embodiment, a graph encoding value calculation module for calculating a graph-encoded value using the relationship information between the nodes, the spatial relationship information, and the edge connection relationship information, wherein the graph-encoded value is It may be the result of encoding.

또한, 본 발명은 전술한 방법을 실행하도록 컴퓨터 판독 가능한 기록 매체에 저장된, 컴퓨터 프로그램을 제공한다.In addition, the present invention provides a computer program stored in a computer readable recording medium to execute the above-described method.

본 발명에 따르면, 노드 간의 관계 정보를 연산하는 과정에서 노드-공간 관계 정보를 사용함으로써, 그래프를 구성하는 노드 간의 상대 위치 정보가 손실없이 보존되면서 그래프를 인코딩할 수 있다.According to the present invention, by using the node-space relationship information in the process of calculating the relationship information between nodes, the graph can be encoded while maintaining relative position information between nodes constituting the graph without loss.

또한, 노드 간의 관계 정보를 연산하는 과정에서 노드-엣지 연결 관계 정보를 사용함으로써, 그래프 그 자체의 정보 역시 손실없이 보존되면서 그래프를 인코딩할 수 있다.In addition, by using the node-edge connection relationship information in the process of calculating the relationship information between the nodes, the graph itself can be encoded while the information of the graph itself is also preserved without loss.

또한, 그래프-인코딩된 값을 연산하는 과정에서도 공간 관계 정보 및 엣지 연결 관계 정보를 사용함으로써, 정보 손실 없이 그래프를 인코딩할 수 있다.In addition, by using the spatial relationship information and the edge connection relationship information even in the process of calculating the graph-encoded value, the graph can be encoded without information loss.

또한, 트랜스포머 신경망을 사용하기 때문에, 기존의 신경망 모델에서는 달성하기 어려운, 그래프 상의 멀리 떨어져 있는 2개의 노드 간의 관계까지 고려하여 그래프를 인코딩할 수 있다.In addition, since a transformer neural network is used, the graph can be encoded by considering even the relationship between two distant nodes on the graph, which is difficult to achieve in the existing neural network model.

도 1은 본 발명의 실시예에 따른 트랜스포머 신경망 모델에서의 인코더 및 디코더를 설명하기 위한 개략적인 도면이다.
도 2 및 3은 본 발명의 실시예에 따른 인코더 및 인코더에서 수행되는 인코딩 과정을 보다 상세히 설명하기 위한 도면이다.
도 4는 그래프(G)를 예로 든 공간 관계 정보 및 엣지 연결 관계 정보를 설명하기 위한 도면이다.
도 5는 본 발명의 실시예에 따른 인코딩 방법을 보다 상세히 설명하는 도면이다.
도 6은 공간 관계 정보를 연산하는데 사용되는 최대 최단 경로 거리(L)를 증가시킴에 따라 변화하는 예측 성능을 나타낸 그래프이다.
도 7은 본 발명의 실시예에 따른 인코딩 방법을 설명하기 위한 순서도이다.
1 is a schematic diagram for explaining an encoder and a decoder in a transformer neural network model according to an embodiment of the present invention.
2 and 3 are diagrams for explaining in detail an encoder and an encoding process performed by the encoder according to an embodiment of the present invention.
4 is a diagram for explaining spatial relationship information and edge connection relationship information using a graph G as an example.
5 is a diagram illustrating an encoding method according to an embodiment of the present invention in more detail.
6 is a graph showing prediction performance that changes as the maximum shortest path distance (L) used to calculate spatial relationship information is increased.
7 is a flowchart for explaining an encoding method according to an embodiment of the present invention.

이하, 첨부된 도면을 참조하여 본 발명을 상세히 설명한다.Hereinafter, the present invention will be described in detail with reference to the accompanying drawings.

1. 본 발명의 설명1. Description of the Invention

첨부된 도면을 참조하여, 본 발명의 실시예에 따른 그래프 인코딩 방법을 구체적으로 설명한다.Referring to the accompanying drawings, a graph encoding method according to an embodiment of the present invention will be described in detail.

먼저, 본 발명의 실시예에 따른 그래프 인코딩 방법은 트랜스포머 신경망 모델에 적용될 수 있다. 여기서, 트랜스포머 신경망 모델이란, 종래 기술인 seq2seq의 구조인 인코더-디코더로 구성되고, 인코더가 입력 시퀀스를 하나의 벡터 표현(context vector)으로 압축하고, 디코더는 압축된 벡터 표현을 통해서 출력 시퀀스를 출력하는 것을 따르면서도, 어텐션(Attention)만으로 구현된 모델을 의미한다. 이는 본 기술 분야에서 널리 알려진 기술로서, 자세한 설명은 생략하기로 한다.First, the graph encoding method according to an embodiment of the present invention can be applied to a transformer neural network model. Here, the transformer neural network model is composed of an encoder-decoder, which is a structure of seq2seq, which is a prior art, and the encoder compresses the input sequence into one vector representation (context vector), and the decoder outputs the output sequence through the compressed vector representation. It means a model implemented only with attention while following the rules. This is a technique widely known in the art, and a detailed description thereof will be omitted.

본 발명에서 인코딩 대상이 되는 그래프는 다수의 노드와, 상기 다수의 노드를 서로 연결하는 엣지들로 이루어진 형태로 표현될 수 있다.In the present invention, a graph to be encoded may be expressed in a form consisting of a plurality of nodes and edges connecting the plurality of nodes to each other.

예를 들어, 상기 데이터는 분자일 수 있으며, 노드는 분자를 구성하는 원자를, 엣지는 원자 간의 결합일 수 있다. 즉, 노드는 원자의 종류마다 서로 다른 특징을 가질 것이며, 엣지 역시 결합의 종류(단일 결합, 이중 결합, 삼중 결합 등)에 따라 서로 다른 특징을 가질 수 있다.For example, the data may be a molecule, a node may be an atom constituting a molecule, and an edge may be a bond between atoms. That is, a node may have different characteristics for each type of atom, and an edge may also have different characteristics depending on the type of bond (single bond, double bond, triple bond, etc.).

위에서는, 분자를 예로 들어 설명하였으나, 이미지와 같이 다수의 노드(픽셀)와, 다수의 노드를 서로 연결하는 엣지(픽셀 간의 관계)들로 이루어진 형태로 표현될 수 있는 데이터이면 특별히 이에 한정되지 않고 본 발명의 범주에 포함될 수 있다.In the above, molecules have been described as an example, but data that can be expressed in the form of a plurality of nodes (pixels) and edges (relationships between pixels) connecting a plurality of nodes to each other, such as an image, is not particularly limited thereto. may be included in the scope of the present invention.

먼저, 공간 관계 정보 연산 모듈(11)이 노드 간의 거리를 이용하여, 다수의 노드 간의 공간 관계(spatial relation) 정보를 연산하고, 엣지 관계 정보 연산 모듈(12)이 노드 간의 엣지 연결 관계를 이용하여 다수의 노드 간의 엣지 관계 정보를 연산한다.First, the spatial relation information calculation module 11 calculates spatial relation information between a plurality of nodes using the distance between nodes, and the edge relation information calculation module 12 uses the edge connection relation between nodes. Edge relationship information between multiple nodes is calculated.

도 4에 노드 n1, n2, n3, n4 및 n5와, 엣지 Edge 0 및 Edge 1로 이루어진 그래프(G)가 도시된다.FIG. 4 shows a graph G composed of nodes n 1 , n 2 , n 3 , n 4 and n 5 and edges Edge 0 and Edge 1 .

도 4의 그래프를 예로 들면, 공간 관계 정보는 도 4의 상단의 표와 같이 나타내어질 수 있다. 즉, 공간 관계 정보는 그래프에 포함된 노드 간의 상대 위치(relative position) 정보를 의미한다. 즉, 0개의 엣지를 사이에 둔 노드(예를 들어, 노드 n1과 노드 n1)들은 '0'의 값을 가지고, 하나의 엣지를 사이에 둔 노드들은 '1'의 값을 가지고, 두 개의 엣지를 사이에 둔 노드들은 '2'의 값을 가지며, 세 개 이상의 엣지를 사이에 둔 노드들은 'far'의 값을 가질 수 있다. 하지만, 세 개의 엣지를 사이에 둔 노드들이 '3'의 값을, 네 개의 엣지를 사이에 둔 노드들이 '4'의 값을 갖는 등의 형태로 표현되는 것도 가능하다. 즉, 공간 관계 정보는 데이터에 포함된 노드 간의 상대 위치를 수치적으로 표현한 값일 수 있다.Taking the graph of FIG. 4 as an example, spatial relationship information may be represented as a table at the top of FIG. 4 . That is, the spatial relationship information means relative position information between nodes included in the graph. That is, nodes with 0 edges in between (eg, node n 1 and node n 1 ) have a value of '0', nodes with one edge in between have a value of '1', and two Nodes with two edges in between may have a value of '2', and nodes with three or more edges in between may have a value of 'far'. However, it is also possible to represent nodes with three edges interposed with a value of '3', nodes with four edges interposed with a value of '4', and the like. That is, the spatial relationship information may be a value numerically expressing relative positions between nodes included in the data.

공간 관계 정보 연산 모듈(11)은 노드 간의 최단 거리를 이용하여, 공간 관계 정보를 연산한다. 도 4에서 노드 n1과 노드 n4를 예로 들면, n1 - n2 - n3 - n5 - n3 - n4의 순서 또는 n1 - n2 - n3 - n4의 순서로 서로 연결되어 있다고 해석하는 것이 가능하다. 전자의 경우 노드 n1과 노드 n4가'5'만큼 떨어져 있다고 해석될 수 있으나, 후자의 경우 '3'만큼 떨어져 있다고 해석될 수 있다. 공간 관계 정보 연산 모듈(11)은 후자처럼 노드 간의 최단 거리를 이용하여 공간 관계 정보를 연산하게 된다.The spatial relationship information calculation module 11 calculates spatial relationship information using the shortest distance between nodes. In FIG. 4 , node n 1 and node n 4 are connected to each other in the order of n 1 - n 2 - n 3 - n 5 - n 3 - n 4 or in the order of n 1 - n 2 - n 3 - n 4 . It is possible to interpret that In the former case, it can be interpreted that node n 1 and node n 4 are separated by '5', but in the latter case, it can be interpreted that they are separated by '3'. The spatial relationship information calculation module 11 calculates the spatial relationship information using the shortest distance between nodes like the latter.

여기에서, 공간 관계 정보는 노드 간의 거리가 기 설정된 값(L) 이하이면 그 거리에 따라 서로 다른 값을 가지고(거리가 1인 경우 '1'의 값, 거리가 2인 경우 '2의 값을 가질 수 있음), 노드 간의 거리가 기 설정된 값(L)보다 크면, 그 거리가 다르더라도 서로 동일한 값(거리 무관 'far'의 값을 가질 수 있음)을 가질 수 있다. 여기에서, 기 설정된 값(L)은 임의의 자연수일 수 있으며, 구체적으로 1 이상 4 이하의 자연수일 수 있고, 보다 구체적으로 2 또는 3, 더욱 구체적으로 4일 수 있다.Here, the spatial relationship information has different values depending on the distance if the distance between nodes is less than a predetermined value (L) (a value of '1' if the distance is 1, a value of '2' if the distance is 2) may have), and if the distance between nodes is greater than the predetermined value (L), even if the distance is different, they may have the same value (can have a value of 'far' regardless of the distance). Here, the preset value (L) may be any natural number, specifically, 1 or more and 4 or less, more specifically, 2 or 3, and more specifically, 4.

한편, 도 4의 그래프를 예로 들면, 엣지 연결 관계 정보는 도 4의 하단의 표와 같이 나타내어질 수 있다. 즉, 엣지 연결 관계 정보는 그래프에 포함된 노드들이 어떤 엣지로 연결되어 있는지에 대한 정보를 의미한다. 예를 들어, 노드 n1과 노드 n1은 'self'의 형태로, 노드 n2와 노드 n3는 Edge 1로 연결되어 있다는 형태로, 노드 n3과 노드 n4는 Edge 0으로 연결되어 있다는 형태로, 노드 n1과 노드 n3은 Edge로 직접 연결되어 있지 않다는 형태로 표현되는 것이 가능하다. 즉, 엣지 연결 관계 정보는 그래프에 포함된 노드들이 어떤 엣지로 연결되어 있는지 수치적으로 표현한 값일 수 있다.Meanwhile, taking the graph of FIG. 4 as an example, edge connection relationship information may be represented as a table at the bottom of FIG. 4 . That is, the edge connection relationship information means information about which edges nodes included in the graph are connected to. For example, node n 1 and node n 1 are connected in the form of 'self', node n 2 and node n 3 are connected in the form of Edge 1, and node n 3 and node n 4 are connected in the form of Edge 0. As a form, it is possible to express the form that node n 1 and node n 3 are not directly connected to an edge. That is, the edge connection relationship information may be a value numerically expressing which edge the nodes included in the graph are connected to.

즉, 노드 간의 엣지 연결 관계 정보는, 노드 간을 서로 연결하는 엣지의 유형에 따라 서로 다른 값을 가지고(도 4에서는 0 또는 1의 값을 가짐), 서로 동일한 노드 간의 엣지 연결 관계 정보는 서로 동일한 제1 값을 가질 수 있다(도 4의 매트릭스에서 좌상방으로부터 우하방을 향하는 대각 방향에 위치한 'self'값 참조). 또한, 엣지를 통해 서로 연결되지 않은 노드 간의 엣지 연결 관계 정보 역시 서로 동일한 제2 값을 가질 수 있다(도 4의 매트릭스에서는 'no'의 값을 가짐). 여기에서, 제1 값과 제2 값은 다른 값인 것이 바람직하다.That is, edge connection relationship information between nodes has different values depending on the type of edge connecting nodes to each other (has a value of 0 or 1 in FIG. 4), and edge connection relationship information between nodes that are the same It may have a first value (see 'self' value located in a diagonal direction from upper left to lower right in the matrix of FIG. 4). In addition, edge connection relationship information between nodes that are not connected to each other through an edge may also have the same second value (having a value of 'no' in the matrix of FIG. 4). Here, the first value and the second value are preferably different values.

어느 하나의 그래프에서, 공간 관계 정보와 엣지 연결 관계 정보는 행렬(matrix)의 형태로 표현될 수 있다. 그리고 행렬의 크기는 n x n 일 수 있으며, 여기에서 n은 자연수이면서 그 최대값은 그래프에 포함될 수 있는 노드 종류(분자를 예로 들면, 원자 종류)의 최대 개수일 수 있다.In any one graph, spatial relationship information and edge connection relationship information may be expressed in the form of a matrix. In addition, the size of the matrix may be n × n, where n is a natural number and the maximum value may be the maximum number of node types (eg, atoms, for example, molecules) that may be included in the graph.

노드-공간 관계 정보 연산 모듈(13)은, 공간 관계 정보 연산 모듈(11)에 의해 연산된 공간 관계 정보와, 노드의 특징(feature)을 이용하여 노드-공간 관계 정보(bspatial)를 연산한다.The node-spatial relationship information calculation module 13 calculates node-spatial relationship information (b spatial ) using the spatial relationship information calculated by the spatial relationship information calculation module 11 and features of nodes. .

구체적으로, 노드-공간 관계 정보 연산 모듈(13)은 아래의 수학식 1을 통해 노드-공간 관계 정보를 연산한다.Specifically, the node-space relationship information calculation module 13 calculates the node-space relationship information through Equation 1 below.

Figure 112022069064913-pat00027
Figure 112022069064913-pat00027

여기서,

Figure 112022069064913-pat00028
는 노드 i와 노드 j 간의 노드-공간 관계 정보이고,
Figure 112022069064913-pat00029
는 노드 i의 쿼리 벡터이고,
Figure 112022069064913-pat00030
는 노드 i와 노드 j 간의 최단 거리를 고려한 공간 관계 정보이며,
Figure 112022069064913-pat00031
는 노드 j의 키 벡터이며,
Figure 112022069064913-pat00032
는 노드 i와 노드 j 간의 최단 거리를 고려한 공간 관계 정보이며, i와 j는 1 이상의 서로 다른 자연수이다.here,
Figure 112022069064913-pat00028
Is the node-space relationship information between node i and node j,
Figure 112022069064913-pat00029
is the query vector of node i,
Figure 112022069064913-pat00030
is spatial relationship information considering the shortest distance between node i and node j,
Figure 112022069064913-pat00031
is the key vector of node j,
Figure 112022069064913-pat00032
is spatial relation information considering the shortest distance between node i and node j, and i and j are different natural numbers of 1 or more.

즉, 노드-공간 관계 정보 연산 모듈(13)은 쿼리 벡터와 키 벡터에 포함된 노드의 정보(feature), 그리고 노드 간의 공간 관계 정보를 고려하여 노드-공간 관계 정보를 연산함에 따라, 인코딩이 이루어지더라도 데이터에 포함된 노드의 위치 정보가 손실없이 보존될 수 있다.That is, the node-space relationship information calculation module 13 calculates the node-space relationship information in consideration of the feature of the node included in the query vector and the key vector, and the spatial relationship information between nodes, so that encoding is performed. Even if it loses, the location information of the node included in the data can be preserved without loss.

노드-엣지 연결 관계 정보 연산 모듈(14)은 엣지 관계 정보 연산 모듈(12)에 의해 연산된 엣지 관계 정보와, 노드의 특징(feature)을 이용하여 노드-엣지 공간 관계 정보(bedge)를 연산한다.The node-edge connection relationship information calculation module 14 calculates node-edge spatial relationship information (b edge ) using the edge relationship information calculated by the edge relationship information calculation module 12 and the feature of the node. do.

구체적으로, 노드-엣지 연결 관계 정보 연산 모듈(14)은 아래의 수학식 2를 통해 노드-엣지 공간 관계 정보를 연산한다.Specifically, the node-edge connection relationship information calculation module 14 calculates the node-edge spatial relationship information through Equation 2 below.

Figure 112022069064913-pat00033
Figure 112022069064913-pat00033

여기서,

Figure 112022069064913-pat00034
는 노드 i와 노드 j의 노드-엣지 연결 관계 정보이고,
Figure 112022069064913-pat00035
는 노드 i의 쿼리 벡터이고,
Figure 112022069064913-pat00036
는 노드 i와 노드 j 간의 엣지 연결 관계 정보이며,
Figure 112022069064913-pat00037
는 노드 j의 키 벡터이며,
Figure 112022069064913-pat00038
는 노드 i와 노드 j 간의 엣지 연결 관계 정보이며, i와 j는 1 이상의 서로 다른 자연수이다.here,
Figure 112022069064913-pat00034
Is the node-edge connection relationship information of node i and node j,
Figure 112022069064913-pat00035
is the query vector of node i,
Figure 112022069064913-pat00036
Is the edge connection relationship information between node i and node j,
Figure 112022069064913-pat00037
is the key vector of node j,
Figure 112022069064913-pat00038
is edge connection relationship information between node i and node j, and i and j are different natural numbers of 1 or more.

즉, 노드-엣지 연결 관계 정보 연산 모듈(14)은 쿼리 벡터와 키 벡터에 포함된 노드의 정보(feature), 그리고 노드 간의 엣지 연결 관계 정보를 고려하여 노드-엣지 연결 관계 정보를 연산함에 따라, 인코딩이 이루어지더라도 그래프에 포함된 엣지 정보가 손실 없이 보존될 수 있다.That is, as the node-edge connection relationship information calculation module 14 calculates the node-edge connection relationship information in consideration of the feature of the node included in the query vector and the key vector, and the edge connection relationship information between nodes, Even if encoding is performed, edge information included in the graph can be preserved without loss.

다음, 노드-노드 관계 정보 연산 모듈(15)은 어느 하나의 노드의 쿼리 벡터 및 다른 하나의 노드의 키 벡터를 이용하여 연산된 노드-노드 인터렉션 값과, 노드-공간 관계 정보(bspatial) 및 노드-엣지 연결 관계 정보(bedge) 중 하나 이상을 이용하여 노드 간의 관계 정보(노드 인식 어텐션(node-aware attention) 값(

Figure 112022069064913-pat00039
) 또는 노드 인식 어텐션 가중치)을 연산한다.Next, the node-node relationship information calculation module 15 calculates a node-node interaction value using a query vector of one node and a key vector of another node, node-space relationship information (b spatial ), and Node- edge connection relationship information (node-aware attention) value (
Figure 112022069064913-pat00039
) or node-recognized attention weight).

여기에서, 노드-노드 인터렉션 값은 스케일드 닷 프로덕트(scaled dot product)로 지칭될 수 있으며, 이는 어느 하나의 노드와 다른 하나의 노드 간의 관계성을 수치화한 정보로, 예를 들어 softmax 함수와 같이 확률 분포로 정규화시키는 함수를 적용하여 0 내지 1 사이의 값을 가질 수 있으며, 1에 가까운 값일수록 관계성이 높음을 의미할 수 있다.Here, the node-node interaction value may be referred to as a scaled dot product, which is information digitizing the relationship between one node and another node, such as the softmax function. It may have a value between 0 and 1 by applying a function normalizing to a probability distribution, and a value closer to 1 may mean a higher relationship.

구체적으로, 노드-노드 관계 정보 연산 모듈(15)은 아래의 수학식 3을 통해 노드 간의 관계 정보를 연산한다.Specifically, the node-node relationship information calculation module 15 calculates relationship information between nodes through Equation 3 below.

Figure 112022069064913-pat00040
Figure 112022069064913-pat00040

여기서,

Figure 112022069064913-pat00041
는 노드 i와 노드 j 간의 노드-노드 인터렉션 값이고,
Figure 112022069064913-pat00042
는 노드 i와 노드 j 간의 노드-공간 관계 정보이며,
Figure 112022069064913-pat00043
는 노드 i와 노드 j 간의 노드-엣지 연결 관계 정보이며,
Figure 112022069064913-pat00044
는 쿼리 벡터 및 키 벡터의 차원이다.here,
Figure 112022069064913-pat00041
is the node-node interaction value between node i and node j,
Figure 112022069064913-pat00042
is the node-space relationship information between node i and node j,
Figure 112022069064913-pat00043
is node-edge connection relationship information between node i and node j,
Figure 112022069064913-pat00044
is the dimension of the query vector and key vector.

즉, 노드 간의 관계 정보를 연산하는 과정에서, 쿼리 벡터와 키 벡터에 포함된 노드의 정보를 이용함은 물론, 노드-공간 관계 정보와 노드-엣지 연결 관계 정보 모두를 이용함으로써, 데이터에 포함된 정보를 손실 없이 인코딩하는 것이 가능하다.That is, in the process of calculating the relationship information between nodes, the information included in the data is obtained by using both the node-space relationship information and the node-edge connection relationship information as well as the node information included in the query vector and the key vector. It is possible to encode without loss.

다음, 그래프 인코딩 값 연산 모듈(16)은 노드-노드 관계 정보 연산 모듈(15)에 의해 연산된 노드 간의 관계 정보와, 노드의 밸류 벡터, 노드-공간 관계 정보 및 노드-엣지 연결 관계 정보를 이용하여 그래프-인코딩된 값(그래프-인코딩된 밸류 벡터)을 연산한다.Next, the graph encoding value calculation module 16 uses the node-node relationship information calculation module 15 to calculate the relationship between nodes, the value vector of the node, the node-space relationship information, and the node-edge connection relationship information. to calculate the graph-encoded value (graph-encoded value vector).

구체적으로, 그래프 인코딩 값 연산 모듈(16)은 아래의 수학식 4를 통해 그래프-인코딩된 값을 연산한다.Specifically, the graph encoding value calculation module 16 calculates the graph-encoded value through Equation 4 below.

Figure 112022069064913-pat00045
Figure 112022069064913-pat00045

여기서,

Figure 112022069064913-pat00046
는 데이터 i의 그래프-인코딩된 값이고,
Figure 112022069064913-pat00047
는 노드 i와 노드 j간의 관계 정보이며,
Figure 112022069064913-pat00048
Figure 112022069064913-pat00049
에 대해 softmax 함수를 취한 값이며,
Figure 112022069064913-pat00050
는 노드 j의 밸류 벡터이며,
Figure 112022069064913-pat00051
는 노드 i와 노드 j 간의 최단 거리를 고려한 공간 관계 정보이며,
Figure 112022069064913-pat00052
는 노드 i와 노드 j 간의 엣지 연결 관계 정보이다.here,
Figure 112022069064913-pat00046
is the graph-encoded value of data i,
Figure 112022069064913-pat00047
Is the relationship information between node i and node j,
Figure 112022069064913-pat00048
Is
Figure 112022069064913-pat00049
It is the value obtained by taking the softmax function for
Figure 112022069064913-pat00050
is the value vector of node j,
Figure 112022069064913-pat00051
is spatial relationship information considering the shortest distance between node i and node j,
Figure 112022069064913-pat00052
Is edge connection relationship information between node i and node j.

상기의 과정을 통해, 다수의 그래프 각각마다의 그래프-인코딩된 값이 연산될 수 있으며, 본 발명을 통해 연산된 그래프-인코딩된 값은 각 그래프에 포함된 노드 간의 상대 위치 정보, 노드 간의 연결 관계 정보 등이 손실되지 않고 보존되어 있어서, 종래 기술 대비 트랜스포머 신경망에서의 셀프 어텐션 효율이 향상될 수 있다.Through the above process, a graph-encoded value for each of a plurality of graphs can be calculated, and the graph-encoded value calculated through the present invention is relative position information between nodes included in each graph, connection relationship between nodes Since information and the like are preserved without being lost, self-attention efficiency in the transformer neural network can be improved compared to the prior art.

2. 검증 실험2. Validation experiments

본 발명의 우수성을 검증하기 위해 검증 실험을 실시하였다.Verification experiments were conducted to verify the superiority of the present invention.

(1) 가상 노드 추가(1) Add virtual node

먼저, 데이터에 포함된 다른 모든 노드에 연결되는 가상 노드(virtual node)를 그래프에 추가하였다.First, we added a virtual node to the graph that connects to all other nodes included in the data.

또한, 추가된 가상 노드의 쿼리 벡터, 키 벡터 및 밸류 벡터와 관련된 공간 관계 정보(

Figure 112022069064913-pat00053
및 엣지 연결 관계 정보(
Figure 112022069064913-pat00054
를 각각 연산하였다(여기서, 가상 노드와 다른 노드 간의 최단 거리를 고려하여 공간 관계 정보를 연산하지는 않았음).In addition, spatial relationship information related to the query vector, key vector, and value vector of the added virtual node (
Figure 112022069064913-pat00053
and edge connection relationship information (
Figure 112022069064913-pat00054
were calculated respectively (here, the spatial relationship information was not calculated considering the shortest distance between the virtual node and other nodes).

아래의 모든 검증 실험에서 가상 노드를 그래프에 추가하여 실험을 수행하였다.In all of the verification experiments below, the experiments were performed by adding virtual nodes to the graph.

(2) 공간 관계 정보 규정(2) Spatial relation information regulation

노드 i와 노드 j 간의 최단 경로를 사용하여 공간 관계 정보를 연산하였다.Spatial relationship information was calculated using the shortest path between node i and node j.

최단 경로의 최대 거리(L)를 설정하고, L보다 멀리 떨어진 노드-쌍 사이의 공간 관계 정보를

Figure 112022069064913-pat00055
도달할 수 없는(unreachable) 노드-쌍 사이의 공간 관계 정보를
Figure 112022069064913-pat00056
의 인코딩 벡터로 규정하고, 가상 노드와 연결된 노드-쌍 사이의 공간 관계 정보를
Figure 112022069064913-pat00057
의 인코딩 벡터로 규정하였다.Set the maximum distance (L) of the shortest path, and obtain spatial relationship information between node-pairs farther than L.
Figure 112022069064913-pat00055
Spatial relationship information between unreachable node-pairs
Figure 112022069064913-pat00056
It is defined as an encoding vector of , and spatial relationship information between a virtual node and a connected node-pair
Figure 112022069064913-pat00057
It was defined as an encoding vector of .

(3) 엣지 연결 관계 정보 규정(3) Edge connection relation information regulation

데이터(그래프)에 포함된 노드-쌍 중 일부의 노드-쌍은 엣지로 서로 연결되어 있지 않다. 따라서, 어떤 엣지와도 연결되지 않은 노드-쌍 사이의 엣지 연결 관계 정보를

Figure 112022069064913-pat00058
의 인코딩 벡터로 규정하고, 동일한 노드-쌍 사이(예를 들어, 노드 i와 노드 i)의 엣지 연결 관계 정보를
Figure 112022069064913-pat00059
의 인코딩 벡터로 규정하고, 가상 노드의 연결된 노드-쌍 사이의 엣지 연결 관계 정보를
Figure 112022069064913-pat00060
의 인코딩 벡터로 규정하였다.Some of the node-pairs included in the data (graph) are not connected to each other by edges. Therefore, edge connection relationship information between node-pairs that are not connected to any edge
Figure 112022069064913-pat00058
It is defined as an encoding vector of , and edge connection relationship information between the same node-pair (eg, node i and node i)
Figure 112022069064913-pat00059
It is defined as an encoding vector of , and edge connection relationship information between connected node-pairs of virtual nodes
Figure 112022069064913-pat00060
It was defined as an encoding vector of .

(4) 분자 특성 예측(4) prediction of molecular properties

본 발명의 실시예에 따른 방법(본 발명-Small, 본 발명-Standard, 본 발명-Large)과, 종래 기술(GIN, GraphSage, GAT, GCN, GateGCN-PE, MPNN, PNA, GT, SAN, Graphormer) 각각에서의 분자 특성 예측 성능을 비교 평가하였다.Methods according to embodiments of the present invention (invention-Small, invention-Standard, invention-Large) and prior art (GIN, GraphSage, GAT, GCN, GateGCN-PE, MPNN, PNA, GT, SAN, Graphformer) ) Comparatively evaluated molecular property prediction performance in each.

아래의 표 1은 본 발명의 실시예에 따른 방법에 따른 각각의 모델의 구성을 나타낸다.Table 1 below shows the configuration of each model according to the method according to an embodiment of the present invention.

Figure 112022069064913-pat00061
Figure 112022069064913-pat00061

OGBG-MolPCBA (MolPCBA) (Hu et al., 2020), OGBG-MolHIV (MolHIV) (Hu et al., 2020) 및 ZINC (Dwivedi et al., 2020)와 같은 분자 특성 예측 태스크(task)상에서의 검증을 실시하였다.on molecular property prediction tasks such as OGBG-MolPCBA (MolPCBA) (Hu et al., 2020), OGBG-MolHIV (MolHIV) (Hu et al., 2020) and ZINC (Dwivedi et al., 2020) Verification was conducted.

MolPCBA는 437,929개의 데이터로 구성되어 있으며, 다양한 분자 특성을 나타내는 다수의 바이너리 레이블(binary labels)을 예측하였고, 평가 지표로는 AP(Average Precision)를 사용하였다.MolPCBA consists of 437,929 data, predicts a number of binary labels representing various molecular characteristics, and uses AP (Average Precision) as an evaluation index.

MolHIV는 41,127개의 데이터로 구성되어 있으며, 분자가 HIV 바이러스 복제를 억제하는지 여부를 나타내는 바이너리 레이블(binary label)을 예측하였고, 평가 지표로는 AUC(Area Under the Curve)를 사용하였다.MolHIV consists of 41,127 data, predicts a binary label indicating whether a molecule inhibits HIV viral replication, and uses AUC (Area Under the Curve) as an evaluation index.

ZINC는 12,000개의 데이터로 구성되어 있으며, 분자 특성을 회귀시켰고, 평가 지표로는 MAE(Mean Absolute Error)를 사용하였다.ZINC consists of 12,000 data, molecular characteristics were regressed, and MAE (Mean Absolute Error) was used as an evaluation index.

모든 검증 실험 방법을 각각 5회 수행하였으며, 각 검증 실험들의 평균과 표준편차를 구하였다. 아래의 표 2 내지 4는 각각 ZINC 데이터 세트 상에서의 검증 실험 결과, MolHIV에서의 검증 실험 결과, MolPCBA에서의 검증 실험 결과를 나타낸다.All validation experiments were performed 5 times each, and the average and standard deviation of each validation experiment was obtained. Tables 2 to 4 below show the validation experiment results on the ZINC data set, the validation experiment results on MolHIV, and the validation experiment results on MolPCBA, respectively.

Figure 112022069064913-pat00062
Figure 112022069064913-pat00062

Figure 112022069064913-pat00063
Figure 112022069064913-pat00063

Figure 112022069064913-pat00064
Figure 112022069064913-pat00064

ZINC, MolHIV 및 MolPCBA 모두 본 발명의 실시예에 따른 방법이 가장 우수한 성능을 나타냄을 확인할 수 있었다.It was confirmed that the method according to the examples of the present invention showed the best performance in all of ZINC, MolHIV and MolPCBA.

(5) OGB Large scale challenge(5) OGB Large scale challenge

OGB large scale challenge (Hu et al., 2020)의 2개의 데이터세트에서 본 발명의 실시예에 따른 발명의 우수성을 검증하기 위한 실험을 실시하였다.An experiment was conducted to verify the excellence of the invention according to an embodiment of the present invention in two datasets of the OGB large scale challenge (Hu et al., 2020).

상기 2개의 데이터세트는 주어진 분자 데이터에서 DFT 연산된 HOMO-LUMO 에너지 갭을 예측하는 것을 목표로 한다. 총 약 4백만개의 데이터를 포함하는 가장 큰 분자 특성 예측 데이터 세트인 PCQM4M 및 PCQM4Mv2 데이터 세트에 대해 실험을 수행하였다. PCQM4Mv2에는 DFT 연산된 분자의 3차원 구조가 포함되나, 본 검증실험에서는 2차원 분자 데이터만 사용하였다. 실험 전반에 걸쳐 L을 5로 설정하였고, Graphormer(Ying et al., 2021)와의 공평한 비교를 위해 GRPE-Standard 모델을 가지고 검증 실험을 수행하였다. The above two datasets aim to predict the DFT computed HOMO-LUMO energy gap given molecular data. Experiments were performed on the PCQM4M and PCQM4Mv2 data sets, which are the largest molecular property prediction data sets, containing about 4 million data in total. PCQM4Mv2 includes the 3-dimensional structure of the DFT-operated molecule, but only 2-dimensional molecular data was used in this verification experiment. Throughout the experiment, L was set to 5, and a verification experiment was performed with the GRPE-Standard model for fair comparison with Graphformer (Ying et al., 2021).

아래의 표 5 및 6은 각각 PCQM4M 데이터 세트 상에서의 검증 실험 결과와, PCQM4Mv2 데이터 세트 상에서의 검증 실험 결과를 나타낸다.Tables 5 and 6 below show the results of verification experiments on the PCQM4M data set and verification experiments on the PCQM4Mv2 data set, respectively.

Figure 112022069064913-pat00065
Figure 112022069064913-pat00065

Figure 112022069064913-pat00066
Figure 112022069064913-pat00066

표 5 및 6에 나타난 것처럼, 본 발명의 실시예에 따른 방법이 가장 우수한 성능을 보임을 확인할 수 있었다.As shown in Tables 5 and 6, it was confirmed that the method according to the embodiment of the present invention showed the best performance.

(6) 노드-공간 관계 정보, 노드-엣지 연결 관계 정보 및 그래프-인코딩된 값 사용의 우수성 검증(6) Verifying the excellence of using node-space relationship information, node-edge connection relationship information, and graph-encoded values

본 발명의 실시예에 따른 방법에서, 그래프를 손실 없이 인코딩할 수 있는 구성 요소인 노드-공간 관계 정보, 노드-엣지 연결 관계 정보 및 그래프-인코딩된 값 사용 여부에 따른 예측 성능을 검증하는 실험을 수행하였다.In the method according to an embodiment of the present invention, an experiment to verify prediction performance according to whether node-space relationship information, node-edge connection relationship information, and graph-encoded values, which are components capable of encoding a graph without loss, is used, is performed. performed.

ZINC 데이터 세트 상에서 GRPE-Small에 따른 모델을 적용하였으며, 아래의 표 7과 같이 노드-공간 관계 정보 또는 노드-엣지 연결 관계 정보를 사용할수록 에러가 감소하고, 노드-공간 관계 정보 및 노드-엣지 연결 관계 정보를 모두 사용하면 에러가 더욱 감소함을 확인할 수 있었다. 또한, 그래프-인코딩된 값을 추가 사용하면 에러가 감소함을 확인할 수 있었다.A model according to GRPE-Small was applied on the ZINC data set, and as shown in Table 7 below, the error decreased as the node-space relationship information or the node-edge connection relationship information was used, and the node-space relationship information and node-edge connection information were used. It was confirmed that the error was further reduced when all the relational information was used. In addition, it was confirmed that the error was reduced when the graph-encoded value was additionally used.

Figure 112022069064913-pat00067
Figure 112022069064913-pat00067

(7) 최대 최단 경로 거리(7) maximum shortest path distance

최대 최단 경로 거리 L의 효과를 검증하는 실험을 수행하였다. 본 발명-Standard 모델을 사용하였으며, L을 1에서 1씩 증가시키면서 예측 성능을 측정하였다.An experiment was conducted to verify the effect of the maximum shortest path distance L. The present invention-Standard model was used, and prediction performance was measured while increasing L from 1 to 1.

L을 증가시키면 더 멀리 떨어져 있는 노드의 위치를 식별하는 것이 가능하다. 도 3에 도시된 것처럼, 1에서 4로 증가할수록 예측 성능이 증가함을 확인하였으나, 4를 초과하더라도 예측 성능이 크게 향상되지 않음을 확인할 수 있었다. 즉, 예측 성능이 최대가 되는 L은 4임을 확인할 수 있었다.By increasing L, it is possible to identify the locations of more distant nodes. As shown in FIG. 3, it was confirmed that the prediction performance increased as the number increased from 1 to 4, but it was confirmed that the prediction performance did not significantly improve even if the number exceeded 4. That is, it was confirmed that L at which the prediction performance is maximized is 4.

(8) 공간 관계 정보 및 엣지 연결 관계 정보의 공유 효과 검증(8) Verification of the sharing effect of spatial relationship information and edge connection relationship information

트랜스포머 신경망의 모든 레이어(layer)에 대해 공간 관계 정보와 엣지 연결 관계 정보를 공유함으로써 달성되는 효과를 검증하는 실험을 실시하였다(즉, 공간 관계 정보와 엣지 연결 관계 정보를 공유하지 않는다는 것은 레이어별로 공간 관계 정보와 엣지 연결 관계 정보를 다르게 사용하는 것을 의미함). 본 발명-Small을 사용하였으며, 5개의 독립적인 검증 실험을 수행하였다. 아래의 표 8에 도시된 것처럼, 공간 관계 정보와 엣지 연결 관계를 공유하더라도 예측 성능의 큰 향상은 없음을 확인할 수 있었다.An experiment was conducted to verify the effect achieved by sharing spatial relationship information and edge connection relationship information for all layers of the transformer neural network (i.e., not sharing spatial relationship information and edge connection relationship information means spatial relationship information for each layer). means different use of relationship information and edge connection relationship information). Inventive-Small was used, and five independent validation experiments were performed. As shown in Table 8 below, it was confirmed that there is no significant improvement in prediction performance even when spatial relationship information and edge connection relationships are shared.

Figure 112022069064913-pat00068
Figure 112022069064913-pat00068

위 설명한 본 발명의 일 실시예에 따른 인코딩 방법은, 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 본 발명을 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. 상기된 하드웨어 장치는 본 발명을 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The above-described encoding method according to an embodiment of the present invention may be implemented in the form of program instructions that can be executed by various computer means and recorded on a computer readable medium. The computer readable medium may include program instructions, data files, data structures, etc. alone or in combination. Program instructions recorded on the medium may be those specially designed and configured for the present invention or those known and usable to those skilled in computer software. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks and magnetic tapes, optical media such as CD-ROMs and DVDs, and magnetic media such as floptical disks. - includes hardware devices specially configured to store and execute program instructions, such as magneto-optical media, and ROM, RAM, flash memory, and the like. Examples of program instructions include high-level language codes that can be executed by a computer using an interpreter, as well as machine language codes such as those produced by a compiler. The hardware device described above may be configured to operate as one or more software modules to perform the operations of the present invention, and vice versa.

이상, 본 명세서에는 본 발명을 당업자가 용이하게 이해하고 재현할 수 있도록 도면에 도시한 실시예를 참고로 설명되었으나 이는 예시적인 것에 불과하며, 당업자라면 본 발명의 실시예로부터 다양한 변형 및 균등한 타 실시예가 가능하다는 점을 이해할 것이다. 따라서 본 발명의 보호범위는 청구범위에 의해서 정해져야 할 것이다. In the above, the present specification has been described with reference to the embodiments shown in the drawings so that those skilled in the art can easily understand and reproduce the present invention, but this is only exemplary, and those skilled in the art can make various modifications and equivalents from the embodiments of the present invention. It will be appreciated that embodiments are possible. Therefore, the protection scope of the present invention should be defined by the claims.

1: 인코더
11: 공간 관계 정보 연산 모듈
12: 엣지 관계 정보 연산 모듈
13: 노드-공간 관계 정보 연산 모듈
14: 노드-엣지 연결 관계 정보 연산 모듈
15: 노드-노드 관계 정보 연산 모듈
16: 그래프 인코딩 값 연산 모듈
1: encoder
11: spatial relation information calculation module
12: edge relation information calculation module
13: node-space relationship information calculation module
14: node-edge connection relationship information calculation module
15: node-node relationship information calculation module
16: graph encoding value calculation module

Claims (16)

트랜스포머 신경망에서, 다수의 노드와 상기 다수의 노드를 서로 연결하는 엣지들로 이루어진 그래프를 인코딩하는 방법으로서,
노드 간의 거리를 이용하여 상기 다수의 노드 간의 공간 관계 정보가 연산되는 단계;
노드 간의 엣지 연결 관계를 이용하여 상기 다수의 노드 간의 엣지 연결 관계 정보가 연산되는 단계로서, 상기 엣지 연결 관계 정보는 노드 간을 서로 연결하는 엣지의 유형을 포함하는, 단계;
상기 공간 관계 정보와 노드의 특징을 이용하여 노드-공간 관계 정보가 연산되고, 상기 엣지 연결 관계 정보와 노드의 특징을 이용하여 노드-엣지 연결 관계 정보가 연산되는 단계; 및
노드-노드 인터렉션 값, 그리고 상기 노드-공간 관계 정보 및 상기 노드-엣지 연결 관계 정보 중 하나 이상을 이용하여 노드 간의 관계 정보가 연산되는 단계;를 포함하는,
트랜스포머 신경망에서의 그래프 인코딩 방법.
In a transformer neural network, a method of encoding a graph consisting of a plurality of nodes and edges connecting the plurality of nodes to each other,
calculating spatial relationship information between the plurality of nodes using distances between the nodes;
calculating edge connection relationship information between the plurality of nodes using edge connection relationships between nodes, wherein the edge connection relationship information includes types of edges connecting nodes to each other;
calculating node-spatial relationship information using the spatial relationship information and characteristics of nodes, and calculating node-edge connection relationship information using the edge connection relationship information and node characteristics; and
Computing relationship information between nodes using a node-node interaction value and at least one of the node-space relationship information and the node-edge connection relationship information; Including,
A graph encoding method in transformer neural networks.
제1항에 있어서,
상기 노드 간의 거리를 이용하여 상기 다수의 노드 간의 공간 관계 정보가 연산되는 단계는,
노드 간의 최단 거리를 이용하여, 상기 다수의 노드 간의 공간 관계 정보가 연산되는 단계를 더 포함하는,
트랜스포머 신경망에서의 그래프 인코딩 방법.
According to claim 1,
The step of calculating the spatial relationship information between the plurality of nodes using the distance between the nodes,
Further comprising the step of calculating spatial relationship information between the plurality of nodes using the shortest distance between nodes,
A graph encoding method in transformer neural networks.
제1항에 있어서,
상기 노드 간의 공간 관계 정보는,
노드 간의 거리가 기 설정된 값 이하이면 그 거리에 따라 서로 다른 값을 가지고,
노드 간의 거리가 상기 기 설정된 값보다 크면, 그 거리가 다르더라도 서로 동일한 값을 갖는,
트랜스포머 신경망에서의 그래프 인코딩 방법.
According to claim 1,
The spatial relationship information between the nodes,
If the distance between nodes is less than a preset value, different values are obtained according to the distance,
If the distance between nodes is greater than the preset value, they have the same value even if the distance is different.
A graph encoding method in transformer neural networks.
제3항에 있어서,
상기 기 설정된 값은 1 이상 4 이하의 자연수인,
트랜스포머 신경망에서의 그래프 인코딩 방법.
According to claim 3,
The preset value is a natural number of 1 or more and 4 or less,
A graph encoding method in transformer neural networks.
제1항에 있어서,
상기 노드 간의 엣지 연결 관계 정보는,
노드 간을 서로 연결하는 엣지의 유형에 따라 서로 다른 값을 가지고,
서로 동일한 노드 간의 엣지 연결 관계 정보들은 서로 동일한 제1 값을 가지며
엣지를 통해 직접 연결되지 않은 노드 간의 엣지 연결 관계 정보들은 서로 동일한 제2 값을 갖는,
트랜스포머 신경망에서의 그래프 인코딩 방법.
According to claim 1,
Edge connection relationship information between the nodes,
It has different values depending on the type of edge that connects nodes to each other,
The edge connection relationship information between nodes that are identical to each other has the same first value and
Edge connection relationship information between nodes that are not directly connected through an edge has the same second value,
A graph encoding method in transformer neural networks.
제1항에 있어서,
상기 그래프는 분자이며,
상기 노드는 원자이고, 상기 엣지는 원자 간의 결합인,
트랜스포머 신경망에서의 그래프 인코딩 방법.
According to claim 1,
The graph is a molecule,
The node is an atom, and the edge is a bond between atoms,
A graph encoding method in transformer neural networks.
제6항에 있어서,
상기 노드는 원자의 종류에 따라 그 특징이 다르고, 상기 엣지는 결합의 종류에 따라 그 특징이 다른,
트랜스포머 신경망에서의 그래프 인코딩 방법.
According to claim 6,
The node has different characteristics depending on the type of atom, and the edge has different characteristics depending on the type of bond.
A graph encoding method in transformer neural networks.
제1항에 있어서,
상기 노드-공간 관계 정보는 아래의 수식에 의해 결정되는,
Figure 112022069064913-pat00069

여기서,
Figure 112022069064913-pat00070
는 노드 i와 노드 j 간의 노드-공간 관계 정보이고,
Figure 112022069064913-pat00071
는 노드 i의 쿼리 벡터이고,
Figure 112022069064913-pat00072
는 노드 i와 노드 j 간의 최단 거리를 고려한 공간 관계 정보이며,
Figure 112022069064913-pat00073
는 노드 j의 키 벡터이며,
Figure 112022069064913-pat00074
는 노드 i와 노드 j 간의 최단 거리를 고려한 공간 관계 정보이며, i와 j는 1 이상의 서로 다른 자연수인,
트랜스포머 신경망에서의 그래프 인코딩 방법.
According to claim 1,
The node-space relationship information is determined by the following formula,
Figure 112022069064913-pat00069

here,
Figure 112022069064913-pat00070
Is the node-space relationship information between node i and node j,
Figure 112022069064913-pat00071
is the query vector of node i,
Figure 112022069064913-pat00072
is spatial relationship information considering the shortest distance between node i and node j,
Figure 112022069064913-pat00073
is the key vector of node j,
Figure 112022069064913-pat00074
Is spatial relationship information considering the shortest distance between node i and node j, i and j are different natural numbers of 1 or more,
A graph encoding method in transformer neural networks.
제1항에 있어서,
상기 노드-엣지 연결 관계 정보는 아래의 수식에 의해 결정되는,
Figure 112022114663728-pat00075

여기서,
Figure 112022114663728-pat00076
는 노드 i와 노드 j의 노드-엣지 연결 관계 정보이고,
Figure 112022114663728-pat00077
는 노드 i의 쿼리 벡터이고,
Figure 112022114663728-pat00078
는 노드 i와 노드 j 간의 엣지 연결 관계 정보이며,
Figure 112022114663728-pat00079
는 노드 j의 키 벡터이며,
Figure 112022114663728-pat00080
는 노드 i와 노드 j 간의 엣지 연결 관계 정보이며, i와 j는 1 이상의 서로 다른 자연수인,
트랜스포머 신경망에서의 그래프 인코딩 방법.
According to claim 1,
The node-edge connection relationship information is determined by the following formula,
Figure 112022114663728-pat00075

here,
Figure 112022114663728-pat00076
Is the node-edge connection relationship information of node i and node j,
Figure 112022114663728-pat00077
is the query vector of node i,
Figure 112022114663728-pat00078
Is the edge connection relationship information between node i and node j,
Figure 112022114663728-pat00079
is the key vector of node j,
Figure 112022114663728-pat00080
Is the edge connection relationship information between node i and node j, i and j are different natural numbers of 1 or more,
A graph encoding method in transformer neural networks.
제1항에 있어서,
상기 노드-노드 인터렉션 값은,
어느 하나의 노드의 쿼리 벡터와 다른 하나의 노드의 키 벡터를 이용하여 연산되는,
트랜스포머 신경망에서의 그래프 인코딩 방법.
According to claim 1,
The node-node interaction value is,
Calculated using the query vector of one node and the key vector of another node,
A graph encoding method in transformer neural networks.
제1항에 있어서,
상기 노드 간의 관계 정보는 아래의 수식에 의해 결정되는,
Figure 112022114663728-pat00081

여기서,
Figure 112022114663728-pat00082
는 노드 i와 노드 j 간의 관계 정보이고,
Figure 112022114663728-pat00083
는 노드 i와 노드 j 간의 노드-공간 관계 정보이며,
Figure 112022114663728-pat00084
는 노드 i와 노드 j 간의 노드-엣지 연결 관계 정보이며,
Figure 112022114663728-pat00085
는 쿼리 벡터 및 키 벡터의 차원인,
트랜스포머 신경망에서의 그래프 인코딩 방법.
According to claim 1,
The relationship information between the nodes is determined by the following formula,
Figure 112022114663728-pat00081

here,
Figure 112022114663728-pat00082
Is the relationship information between node i and node j,
Figure 112022114663728-pat00083
is the node-space relationship information between node i and node j,
Figure 112022114663728-pat00084
is node-edge connection relationship information between node i and node j,
Figure 112022114663728-pat00085
is the dimension of the query vector and key vector,
A graph encoding method in transformer neural networks.
제1항에 있어서,
상기 노드 간의 관계 정보, 상기 공간 관계 정보 및 상기 엣지 연결 관계 정보를 이용하여 그래프-인코딩된 값을 연산하는 단계를 더 포함하는,
트랜스포머 신경망에서의 그래프 인코딩 방법.
According to claim 1,
Further comprising calculating a graph-encoded value using the relationship information between the nodes, the spatial relationship information, and the edge connection relationship information.
A graph encoding method in transformer neural networks.
제12항에 있어서,
상기 그래프-인코딩된 값은 아래의 수식에 의해 결정되는,
Figure 112022069064913-pat00086
)
여기서,
Figure 112022069064913-pat00087
는 그래프-인코딩된 값이고,
Figure 112022069064913-pat00088
는 노드 i와 노드 j간의 관계 정보이며,
Figure 112022069064913-pat00089
Figure 112022069064913-pat00090
에 대해 softmax 함수를 취한 값이며,
Figure 112022069064913-pat00091
는 노드 j의 밸류 벡터이며,
Figure 112022069064913-pat00092
는 노드 i와 노드 j 간의 최단 거리를 고려한 공간 관계 정보이며,
Figure 112022069064913-pat00093
는 노드 i와 노드 j 간의 엣지 연결 관계 정보인,
트랜스포머 신경망에서의 그래프 인코딩 방법.
According to claim 12,
The graph-encoded value is determined by the formula below,
Figure 112022069064913-pat00086
)
here,
Figure 112022069064913-pat00087
is a graph-encoded value,
Figure 112022069064913-pat00088
Is the relationship information between node i and node j,
Figure 112022069064913-pat00089
Is
Figure 112022069064913-pat00090
It is the value obtained by taking the softmax function for
Figure 112022069064913-pat00091
is the value vector of node j,
Figure 112022069064913-pat00092
is spatial relationship information considering the shortest distance between node i and node j,
Figure 112022069064913-pat00093
Is edge connection relationship information between node i and node j,
A graph encoding method in transformer neural networks.
제1항 내지 제13항 중 어느 한 항에 따른 방법을 사용하여 다수의 노드와 상기 다수의 노드를 서로 연결하는 엣지들로 이루어진 그래프를 인코딩하는 인코더로서,
노드 간의 거리를 이용하여 상기 다수의 노드 간의 공간 관계 정보를 연산하는 공간 관계 정보 연산 모듈;
노드 간의 엣지 연결 관계를 이용하여 상기 다수의 노드 간의 엣지 연결 관계 정보를 연산하는 엣지 관계 정보 연산 모듈로서, 상기 엣지 연결 관계 정보는 노드 간을 서로 연결하는 엣지의 유형을 포함하는, 엣지 관계 정보 연산 모듈;
상기 공간 관계 정보와 노드의 특징을 이용하여 노드-공간 관계 정보를 연산하는 노드-공간 관계 정보 연산 모듈;
상기 엣지 연결 관계 정보와 노드의 특징을 이용하여 노드-엣지 연결 관계 정보를 연산하는 노드-엣지 연결 관계 정보 연산 모듈; 및
노드-노드 인터렉션 값, 그리고 상기 노드-공간 관계 정보 및 상기 노드-엣지 연결 관계 정보 중 하나 이상을 이용하여 노드 간의 관계 정보를 연산하는 노드-노드 관계 정보 연산 모듈;을 포함하는,
인코더.
An encoder for encoding a graph consisting of a plurality of nodes and edges connecting the plurality of nodes to each other using the method according to any one of claims 1 to 13,
a spatial relationship information calculation module for calculating spatial relationship information between the plurality of nodes using distances between nodes;
An edge relationship information calculation module that calculates edge connection relationship information between the plurality of nodes using edge connection relationships between nodes, wherein the edge connection relationship information includes a type of edge connecting nodes to each other. module;
a node-space relationship information calculation module for calculating node-space relationship information using the spatial relationship information and characteristics of nodes;
a node-edge connection relationship information calculation module for calculating node-edge connection relationship information using the edge connection relationship information and characteristics of nodes; and
A node-node relationship information calculation module for calculating relationship information between nodes using a node-node interaction value and at least one of the node-space relationship information and the node-edge connection relationship information; Including,
encoder.
제14항에 있어서,
상기 노드 간의 관계 정보, 상기 공간 관계 정보 및 상기 엣지 연결 관계 정보를 이용하여 그래프-인코딩된 값을 연산하는 그래프 인코딩 값 연산 모듈;을 더 포함하고,
상기 그래프-인코딩된 값이 인코딩의 결과값인,
인코더.
According to claim 14,
A graph encoding value calculation module configured to calculate a graph-encoded value using the relationship information between the nodes, the spatial relationship information, and the edge connection relationship information;
The graph-encoded value is the resultant value of encoding,
encoder.
제1항 내지 제13항 중 어느 한 항에 따른 방법을 실행하도록 컴퓨터 판독 가능한 기록 매체에 저장된,
컴퓨터 프로그램.
Stored in a computer readable recording medium to execute the method according to any one of claims 1 to 13,
computer program.
KR1020220081406A 2021-11-19 2022-07-01 Graph Encoding Method in Transformer Neural Network KR102485944B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20210160345 2021-11-19
KR1020210160345 2021-11-19

Publications (1)

Publication Number Publication Date
KR102485944B1 true KR102485944B1 (en) 2023-01-10

Family

ID=84893991

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020220081406A KR102485944B1 (en) 2021-11-19 2022-07-01 Graph Encoding Method in Transformer Neural Network

Country Status (1)

Country Link
KR (1) KR102485944B1 (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019056960A (en) * 2017-09-19 2019-04-11 富士通株式会社 Search method, search program and search apparatus
KR102088304B1 (en) * 2019-04-12 2020-03-13 주식회사 이글루시큐리티 Log Data Similar Pattern Matching and Risk Management Method Based on Graph Database
KR20210040761A (en) * 2019-10-04 2021-04-14 주식회사 루닛 Method and System for analysing image
KR20210113192A (en) 2019-12-27 2021-09-15 선전 센스타임 테크놀로지 컴퍼니 리미티드 Image processing method and apparatus, electronic device and storage medium
KR20210120111A (en) * 2019-03-08 2021-10-06 인터내셔널 비지네스 머신즈 코포레이션 Linking and processing of different knowledge graphs
KR20210147862A (en) * 2020-05-29 2021-12-07 삼성전자주식회사 Method and apparatus for training retrosynthesis prediction model
KR102389255B1 (en) 2019-09-11 2022-04-22 한국과학기술원 Implementation and Interpretation method for 3-D molecules on the graph convolutional network
KR20220091161A (en) * 2020-12-23 2022-06-30 삼성전자주식회사 Method and device for predicting the next event to occur

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019056960A (en) * 2017-09-19 2019-04-11 富士通株式会社 Search method, search program and search apparatus
KR20210120111A (en) * 2019-03-08 2021-10-06 인터내셔널 비지네스 머신즈 코포레이션 Linking and processing of different knowledge graphs
KR102088304B1 (en) * 2019-04-12 2020-03-13 주식회사 이글루시큐리티 Log Data Similar Pattern Matching and Risk Management Method Based on Graph Database
KR102389255B1 (en) 2019-09-11 2022-04-22 한국과학기술원 Implementation and Interpretation method for 3-D molecules on the graph convolutional network
KR20210040761A (en) * 2019-10-04 2021-04-14 주식회사 루닛 Method and System for analysing image
KR20210113192A (en) 2019-12-27 2021-09-15 선전 센스타임 테크놀로지 컴퍼니 리미티드 Image processing method and apparatus, electronic device and storage medium
KR20210147862A (en) * 2020-05-29 2021-12-07 삼성전자주식회사 Method and apparatus for training retrosynthesis prediction model
KR20220091161A (en) * 2020-12-23 2022-06-30 삼성전자주식회사 Method and device for predicting the next event to occur

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Chengxuan Ying 등, "Do Transformers Really Perform Bad for Graph Representation?", arXiv:2106.05234v3, 2021.06.17. 1부.* *

Similar Documents

Publication Publication Date Title
Ma et al. A tensorized transformer for language modeling
CN106202548B (en) Date storage method, lookup method and device
Yan et al. Efficient algorithms for finding optimal meeting point on road networks
CN111199474B (en) Risk prediction method and device based on network map data of two parties and electronic equipment
CN111222976B (en) Risk prediction method and device based on network map data of two parties and electronic equipment
CN104424254B (en) Obtain analogical object set, the method and device that analogical object information is provided
TW201738780A (en) Method for training model using training data, and training system
US11144547B2 (en) Case statement optimization
Gonçalves et al. On moving frames and Noether’s conservation laws
US20190197175A1 (en) Progressive optimization for implicit cast predicates
Garrison et al. Sequence variation aware genome references and read mapping with the variation graph toolkit
WO2022193872A1 (en) Method and apparatus for determining spatial relationship, computer device, and storage medium
Guba On the properties of the Cayley graph of Richard Thompson's group F
KR102485944B1 (en) Graph Encoding Method in Transformer Neural Network
KR20110115281A (en) Partitioning method for high dimensional data
CN112597190A (en) Point neighbor track query method and device, electronic equipment and readable storage medium
Allogmany et al. Implicit Two‐Point Block Method for Solving Fourth‐Order Initial Value Problem Directly with Application
de Albuquerque et al. Euclidean and hyperbolic asymmetric topological quantum codes
US10795920B2 (en) Information processing device, information processing method, and computer-readable storage medium
CN115292962B (en) Path similarity matching method and device based on track rarefaction and storage medium
CN113407538B (en) Incremental acquisition method for data of multi-source heterogeneous relational database
US9165020B2 (en) String substitution apparatus, string substitution method and storage medium
CN114444441A (en) Name similarity calculation method and device, storage medium and calculation equipment
CN105373561B (en) The method and apparatus for identifying the logging mode in non-relational database
Naghipour New classes of quantum codes on closed orientable surfaces

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant