WO2022135121A1 - 一种基于对比学习的分子图表示学习方法 - Google Patents

一种基于对比学习的分子图表示学习方法 Download PDF

Info

Publication number
WO2022135121A1
WO2022135121A1 PCT/CN2021/135524 CN2021135524W WO2022135121A1 WO 2022135121 A1 WO2022135121 A1 WO 2022135121A1 CN 2021135524 W CN2021135524 W CN 2021135524W WO 2022135121 A1 WO2022135121 A1 WO 2022135121A1
Authority
WO
WIPO (PCT)
Prior art keywords
molecular
representation
learning
encoder
molecule
Prior art date
Application number
PCT/CN2021/135524
Other languages
English (en)
French (fr)
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 浙江大学
Priority to US17/792,167 priority Critical patent/US20230052865A1/en
Publication of WO2022135121A1 publication Critical patent/WO2022135121A1/zh

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
    • G06N3/042Knowledge-based neural networks; Logical representations of neural networks
    • 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
    • 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
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • 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/084Backpropagation, e.g. using gradient descent
    • 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/0895Weakly supervised learning, e.g. semi-supervised or self-supervised learning
    • 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/0985Hyperparameter optimisation; Meta-learning; Learning-to-learn
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16CCOMPUTATIONAL CHEMISTRY; CHEMOINFORMATICS; COMPUTATIONAL MATERIALS SCIENCE
    • G16C20/00Chemoinformatics, i.e. ICT specially adapted for the handling of physicochemical or structural data of chemical particles, elements, compounds or mixtures
    • G16C20/70Machine learning, data mining or chemometrics

Definitions

  • the invention belongs to the field of graph representation learning, and in particular relates to a molecular graph representation learning method based on contrastive learning.
  • Graph Representation Learning has become a popular research area for analyzing graph-structured data.
  • Graph representation learning aims to learn an encoding function that takes full advantage of graph data to transform graph data with complex structures into dense representations in a low-dimensional space that preserve diverse graph properties and structural features.
  • the traditional unsupervised graph representation learning method transforms the graph into a sequence of nodes using the random walk method, and models the co-occurrence relationship between the central node and the neighbor nodes.
  • this kind of learning framework has two obvious shortcomings: one is the lack of parameter sharing between encoders, which will take up too much computing resources; the other is the lack of generalization ability of the model, which is difficult to apply to new graphs.
  • Graph neural networks usually update the hidden state of a node by a weighted sum of neighborhood states. By passing information between nodes, a graph neural network is able to capture information from its neighborhood.
  • Molecular graphs are a type of natural graph data with rich structural information. At present, many studies have used deep learning methods to encode molecules to accelerate drug development and molecular identification. To represent molecules in a vector space, traditional molecular fingerprints attempt to encode molecules as fixed-length binary vectors, with each bit on the molecular fingerprint corresponding to a molecular fragment.
  • graph neural networks which take the SMILES representation of molecules as input, learn the representation of molecules in low-dimensional vector spaces, and apply them to downstream tasks such as attribute prediction.
  • the invention provides a molecular graph representation learning method based on contrastive learning, which can obtain the molecular graph representation with domain information and distinguishing, and solve the problems of molecular attribute prediction and the like.
  • a molecular graph representation learning method based on contrastive learning including the following steps:
  • Model molecular graphs with heterogeneous graphs which are graphs containing different types of nodes and edges, different atoms correspond to different node types, and different bonds correspond to different edge types;
  • the invention uses the similarity of molecular fingerprints as the basis for selecting positive and negative samples, compares them with molecular data in the feature space, and integrates chemical domain knowledge into the molecular representation, so as to obtain a molecular graph representation with domain information and distinctiveness , to solve problems such as molecular property prediction.
  • step (1) the SMILES representation of the molecule is converted into a molecular fingerprint by Rdkit, a powerful tool for cheminformatics. According to different calculation methods, different kinds of molecular fingerprints of the same molecule can be obtained.
  • the molecular fingerprint is one of Morgan fingerprint, MACCs fingerprint and topological fingerprint.
  • Morgan fingerprints set a radius from a specific atom to count the number of partial molecular structures within the radius to form molecular fingerprints;
  • MACCs fingerprints pre-designate the partial molecular structures of 166 molecules.
  • the topological fingerprint does not need to pre-specify part of the molecular structure, but calculates all molecular paths between the minimum number of keys and the maximum number of keys, and performs a hash operation on each subgraph to generate each Bit ID, and then generate molecular fingerprints.
  • the evaluation method often used in the calculation of similarity between compound molecules is the Tanimoto coefficient.
  • the similarity between two molecular fingerprints is calculated using the Tanimoto coefficient, and the formula is:
  • a and b represent the number of 1s displayed in the A and B molecules, respectively, and c represents the number of 1s displayed in the A and B molecules at the same time.
  • the functional group is an atom or atomic group that determines the chemical properties of the compound molecule.
  • the same functional group leads to the same or similar chemical reaction, regardless of the size of the molecule to which it belongs.
  • the SMARTS representation of the full amount of functional groups was crawled from the Daylight chemical information system, and the functional groups were sorted by the number of atoms contained in the functional group to find out which functional group each atom in the molecule belongs to. When an atom belongs to multiple functional groups, the functional group with the most atoms is preferentially matched as the functional group corresponding to the atom.
  • step (3) modeling the molecular graph with heterogeneous graph is beneficial to describe the different attributes of each node and edge.
  • step (4) The specific process of step (4) is:
  • the relational graph convolutional network RGCN in the structure-aware molecular encoder calculates and aggregates information by computing and aggregating information for different types of edges, and for different types of Nodes integrate information aggregated by different edges to transmit information;
  • the nodes and the features of the functional group are aggregated to obtain the structure-aware feature representation of the molecule.
  • R is the set of all edges, are all neighbor nodes of edge type r adjacent to node i, c i,r is a parameter that can be learned, is the weight matrix of the current layer l, is the feature vector of the current layer l to the current node i; the feature of the neighbor node is multiplied by the weight corresponding to the edge type, multiplied by a learnable parameter and summed, and finally the information transmitted by the self-loop edge is added.
  • the activation function ⁇ is used as the output of this layer and the input of the next layer.
  • step (5) when selecting positive and negative samples, select 1 molecule whose similarity with the target molecule is greater than a certain threshold as a positive sample, and select K molecules whose similarity is less than a certain threshold as a negative sample;
  • the representation is denoted as q
  • the feature representation of positive samples is denoted as k 0
  • the feature representation of K negative samples is denoted as k 1 ,...,k K .
  • the loss function is used to calculate the loss, and the parameters of the structure-aware molecule encoder are updated through the back-propagation algorithm, so that the model recognizes the target molecule and the positive samples as similar instances. and distinguish from dissimilar samples.
  • is a hyperparameter
  • the loss function prompts the model to identify the target molecule q and positive sample k 0 as similar instances, and distinguish q from dissimilar instances k 1 ,...,k K.
  • step (6) The specific process of step (6) is:
  • the molecular encoder with structure awareness is trained on the large sample molecular data set by the comparative learning method described in step (5); then the molecular data in the small sample data set is input into the molecular encoder with structure awareness, and then the linear classifier is used The molecular representation output by the encoder is classified and the molecular properties are predicted.
  • the present invention has the following beneficial effects:
  • the present invention uses the self-supervised contrastive learning method to train the structure-aware molecular encoder.
  • Supervised learning has the problem of insufficient labeled data, and the models obtained through label training often only involve specific knowledge, which is far less informative than the structure of the data itself. Therefore, using a self-supervised contrastive learning method to construct labels based on the structure or properties of the molecular graph data itself for molecular graph representation learning is helpful to capture richer molecular structural information, and it is easier to obtain discriminative high-level features.
  • the present invention uses the isomer graph to model the molecular graph, which is beneficial to describe the different properties of each atom and bond.
  • the present invention proposes to use a structure-aware graph neural network to learn molecular representations, and directly encode functional group information that will play a decisive role in molecular properties into the graph. Feature representation.
  • FIG. 1 is a schematic flowchart of a molecular diagram representation learning method based on contrast learning provided by an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a structure-aware molecular encoder provided by an embodiment of the present invention.
  • the molecular map representation learning method based on comparative learning provided by the present invention can be used in application scenarios such as chemical molecule attribute prediction, virtual screening, etc., and selects positive and negative samples based on the similarity of molecular fingerprints, and compares them with molecular data in the feature space. And the knowledge of functional groups in the chemical domain is directly encoded into the representation of the molecule to obtain a molecular graph representation with chemical domain knowledge and discriminative.
  • the invention solves the problem of insufficient labeling data in supervised learning, and makes full use of the structure or characteristics of the molecular map data itself to construct labels.
  • a molecular graph representation learning method based on contrastive learning includes the following steps:
  • the SMILES representation of a molecule is first transformed into a molecular fingerprint by Rdkit, a powerful tool for cheminformatics. For each molecule, use the Tanimoto coefficient to calculate the fingerprint similarity between it and all other molecules, select 1 molecule whose similarity with the molecule is greater than a certain threshold as a positive sample, and select K molecules whose similarity is less than a certain threshold as negative sample.
  • the target molecule and its corresponding positive and negative samples are modeled using heterogeneous graphs, which aim to describe the different properties of each node and edge.
  • the feature representation corresponding to the target molecule is denoted as q
  • the feature representation of positive samples is denoted as k 0
  • the feature representation of K negative samples is denoted as k 1 ,...,k K .
  • the parameters of the model are updated through the back-propagation algorithm, which encourages the model to identify the target molecule and positive samples as similar instances, and at the same time distinguish them from dissimilar instances to learn discriminative structure-aware Molecular feature representation.
  • the loss function is InfoNCE, and the formula is:
  • is a hyperparameter
  • the loss function prompts the model to identify the target molecule q and positive sample k 0 as similar instances, and distinguish q from dissimilar instances k 1 ,...,k K.
  • FIG. 2 it is a schematic diagram of a structure-aware graph neural network provided by an embodiment of the present invention.
  • Molecules are modeled using heterogeneous graphs with initialized node features and functional group features, characterizing the different properties of each node and edge.
  • the heterogeneous graph is used as the input of the structure-aware molecular encoder, and then RGCN is used to calculate and aggregate information for different types of edges, and integrate the information aggregated by different edges for different types of nodes to transfer information.
  • RGCN takes into account the type of edge, and in order to transfer the features of the nodes in the previous layer to the next layer, RGCN adds a special self-loop edge to each node.
  • the specific information transfer process is as follows:
  • R is the set of all edges, are all neighbor nodes of edge type r adjacent to node i, c i,r is a parameter that can be learned, is the weight matrix of the current layer l, is the feature vector of the current layer l to the current node i. Multiply the feature of the neighbor node by the weight corresponding to the edge type, multiply it by a learnable parameter and sum it up, and finally add the information transmitted by the self-loop edge, after the activation function ⁇ , as the output of this layer, the next layer input.
  • the features of the nodes and functional groups are aggregated through the aggregation function to obtain the structure-aware feature representation of the molecule.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Chemical & Material Sciences (AREA)
  • Crystallography & Structural Chemistry (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Image Analysis (AREA)

Abstract

一种基于对比学习的分子图表示学习方法,包括:获取每个分子的分子指纹表示,计算每两个分子指纹之间的相似度;收集全量的化学官能团信息,为分子中的每个原子匹配对应的官能团;用异构图对分子图建模;利用结构感知分子编码器中的RGCN编码分子中每个原子的表示及其所属官能团的表示,通过聚合函数将分子映射到特征空间,得到具有结构感知的特征表示;根据分子之间的指纹相似度,选取正、负样本,在特征空间中进行对比学习;在大样本分子数据集上利用对比学习的方法进行训练,得到具有结构感知的分子编码器,应用于下游分子属性的预测任务。上述方法有助于捕捉更丰富的分子结构信息,解决分子属性预测的问题。

Description

一种基于对比学习的分子图表示学习方法 技术领域
本发明属于图表示学习领域,尤其是涉及一种基于对比学习的分子图表示学习方法。
背景技术
在过去几年中,图表示学习(Graph Representation Learning)已成为分析图结构数据的热门研究领域。图表示学习旨在学习一种编码函数,该函数充分利用图数据的优势,将具有复杂结构的图数据转换为保留多样化图属性和结构特征的低维空间中的密集表示。
传统的无监督图表示学习方法,利用随机游走方法将图转化为节点序列,建模了中心节点与邻居节点之间的共现关系。但是这类学习框架有两个明显缺点:一是编码器之间缺少参数共享,会占用过多计算资源;二是模型缺乏泛化能力,难以推广应用于新图。
近年来,使用图神经网络(Graph Neural Network,GNN)进行图表示学习受到了广泛的关注。图神经网络通常通过邻域状态的加权总和来更新节点的隐藏状态。通过节点之间的信息传递,图神经网络能够捕捉来自其邻域的信息。
分子图是一类天然具有丰富结构信息的图数据,目前有众多研究利用深度学习方法编码分子,以加速药物的研发和分子识别。为了表示向量空间中的分子,传统的分子指纹试图将分子编码为固定长度的二进制向量,分子指纹上的每个比特位对应于一种分子片段。
为了提高分子指纹的表达能力,一些研究引入图神经网络,将分子的SMILES表示作为输入,学习分子在低维向量空间中的表示,并应用于下游的属性预测等任务。
但是,获取分子性质标签的实验过程既耗时又消耗资源,分子任务面临标记数据不足等问题。同时,由于分子空间极为庞大,模型泛化能力一般较差。为提高神经网络的泛化能力,一些工作试图在分子的图表示上建立预训练模型。大多数工作在预训练的节点级别任务中,将原子的类型作为标签,但由于分子中原子的类型较少,且存在个别原子几乎在所有分子中频繁出现的情况,这样训练出的模型未必能捕捉到有价值的化学领域信息。而在有监督的图级别任务中,通过标签训练所得到的模型往往只涉及部分特定知识,且大多数分子缺乏标注,这也限制了模型在实际场景中的使用。
因此,亟需设计一种新的分子图表示学习方法,来解决现有技术存在的上述问题。
发明内容
本发明提供了一种基于对比学习的分子图表示学习方法,可以获得具有领域信息且具有区分性的分子图表示,解决分子属性预测等问题。
一种基于对比学习的分子图表示学习方法,包括以下步骤:
(1)获取每个分子的分子指纹表示,计算每两个分子指纹之间的相似度;
(2)收集全量的化学官能团信息,为分子中的每个原子匹配对应的官能团;其中,当某个原子属于多个官能团时,优先匹配包含原子个数多的官能团;
(3)用异构图对分子图建模,异构图为包含不同类型节点和边的图,不同原子对应不同的节点类型,不同键对应不同的边类型;
(4)构建结构感知分子编码器,利用结构感知分子编码器中的关系图卷积网络RGCN编码分子中每个原子的表示及其所属官能团的表示,通过聚合函数将分子映射到特征空间,得到具有结构感知的特征表示;
(5)根据分子之间的指纹相似度,选取正、负样本,在特征空间中进行对比学习;
(6)通过在大样本分子数据集上利用对比学习的方法进行训练,得到具有结构感知的分子编码器,应用于下游分子属性的预测任务。
本发明将分子指纹相似度作为选取正、负样本的依据,与分子数据在特征空间中进行对比,并将化学领域知识融入到分子表示中,以获得具有领域信息且具有区分性的分子图表示,解决分子属性预测等问题。
步骤(1)中,通过化学信息学的强力工具Rdkit将分子的SMILES表示转化为分子指纹。根据不同的计算方法,可以获得同一分子不同种类的分子指纹。
所述的分子指纹选择Morgan指纹、MACCs指纹和拓扑指纹中的一种。Morgan指纹通过设定一个从特定原子出发的半径,来统计该半径内部分分子结构的数量以组成分子指纹;MACCs指纹预先指定了166种分子的部分分子结构,当含有该分子结构时,对应位置记为1,反之则记为0;拓扑指纹无需预先指定部分分子结构,而是计算所有介于最小键和最大键数量之间的分子路径,并对每个子图进行哈希运算,产生每个比特位的ID,进而生成分子指纹。
化合物分子之间的相似度计算经常使用到的评价方法是谷本系数(tanimoto coefficient)。两个分子指纹之间的相似度计算采用谷本系数,公式为:
Figure PCTCN2021135524-appb-000001
其中,a和b分别表示在A、B分子中显示1的数量,c表示A、B分 子中同时显示1的数量。
步骤(2)中,官能团是决定化合物分子的化学性质的原子或原子团。相同的官能团会导致相同或相似的化学反应,无论其所属分子的大小如何。从Daylight化学信息系统中爬取全量的官能团的SMARTS表示,并按官能团包含的原子个数对官能团排序,找出分子中的每个原子所属的官能团。当某个原子属于多个官能团时,优先匹配原子个数多的官能团作为该原子对应的官能团。
步骤(3)中,利用异构图对分子图进行建模有利于刻画每一种节点和边的不同属性。
步骤(4)的具体过程为:
将具有初始化节点特征和官能团特征的异构图作为结构感知分子编码器的输入,结构感知分子编码器中的关系图卷积网络RGCN通过对不同类型的边计算和聚合信息,以及对不同类型的节点整合不同边所聚合的信息来进行信息传递;
得到每个原子及其所属官能团的特征表示后,再将节点与官能团的特征进行聚合,得到分子的具有结构感知的特征表示。
关系图卷积网络RGCN进行信息传递的公式如下:
Figure PCTCN2021135524-appb-000002
其中,R是所有边的集合,
Figure PCTCN2021135524-appb-000003
是与节点i相邻的边类型为r的所有邻居节点,c i,r是一个可以学习的参数,
Figure PCTCN2021135524-appb-000004
是当前层l的权重矩阵,
Figure PCTCN2021135524-appb-000005
是当前层l对当前节点i的特征向量;对邻居节点的特征乘以边类型所对应的权重,再乘以一个可学习的参数后求和,最后加上自环边所传递的信息,经过激活函数σ,作为本层的输出,下一层的输入。
步骤(5)中,选取正、负样本时,选取1个与目标分子相似度大于某阈值的分子为正样本,选取K个相似度小于某阈值的分子为负样本;将 目标分子对应的特征表示记为q,将正样本的特征表示记为k 0,将K个负样本的特征表示记为k 1,…,k K
获得每个目标分子及其正、负样本的特征表示后,利用损失函数计算损失,并通过反向传播算法更新结构感知分子编码器的参数,促使模型将目标分子与正样本识别为相似实例,并与不相似的样本区分开。
所述的损失函数为InfoNCE,公式为:
Figure PCTCN2021135524-appb-000006
其中,τ为超参数,该损失函数促使模型将目标分子q与正样本k 0识别为相似实例,将q与不相似的实例k 1,…,k K区分开。
步骤(6)的具体过程为:
在大样本分子数据集上通过步骤(5)所述的对比学习方法训练具有结构感知的分子编码器;然后将小样本数据集中的分子数据输入具有结构感知的分子编码器,再利用线性分类器对编码器输出的分子表示做分类,进行分子属性的预测。
与现有技术相比,本发明具有以下有益效果:
1、不同于现有的有监督预训练方法,本发明利用自监督的对比学习方法训练结构感知分子编码器。有监督学习存在标注数据不足的问题,而且通过标签训练所得到的模型往往只涉及特定的知识,远不如数据本身的结构信息丰富。因此,利用自监督的对比学习方法,通过分子图数据本身的结构或特性构造标签进行分子的图表示学习,有助于捕捉更丰富的分子结构信息,且更易于获得具有区分性的高层特征。
2、本发明利用异构图对分子图进行建模,有利于刻画每一种原子和键的不同属性。
3、不同于现有的缺乏化学领域先验知识的分子图表示学习方法,本发明提出使用具有结构感知的图神经网络学习分子表示,将对分子性质起 决定性作用的官能团信息直接编码进图的特征表示中。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图做简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动前提下,还可以根据这些附图获得其他附图。
图1为本发明实施例提供的基于对比学习的分子图表示学习方法的流程示意图;
图2为本发明实施例提供的结构感知分子编码器的结构示意图。
具体实施方式
下面结合附图和实施例对本发明做进一步详细描述,需要指出的是,以下所述实施例旨在便于对本发明的理解,而对其不起任何限定作用。
本发明提供的基于对比学习的分子图表示学习方法可用于化学分子属性预测、虚拟筛选等应用场景,将分子指纹的相似度作为依据选取正、负样本,与分子数据在特征空间中进行对比,并将化学领域的官能团知识直接编码到分子的表示中,以获得具有化学领域知识且具有区分性的分子图表示。本发明解决了有监督学习存在的标注数据不足的问题,充分利用了分子图数据本身的结构或特性来构造标签。
如图1所示,一种基于对比学习的分子图表示学习方法,包括以下步骤:
首先将分子的SMILES表示通过化学信息学的强力工具Rdkit转化为分子指纹。对于每个分子,利用谷本系数计算其与其他所有分子之间的指纹相似度后,选取1个与该分子相似度大于某阈值的分子为正样本,选取K个相似度小于某阈值的分子为负样本。
对目标分子及其对应的正、负样本利用异构图进行建模,旨在刻画每一种节点和边的不同属性。将分子的样本数据输入由图2所示的结构感知分子编码器,可以得到目标样本及正、负样本对应的特征表示。将目标分子对应的特征表示记为q,将正样本的特征表示记为k 0,将K个负样本的特征表示记为k 1,…,k K
将InfoNCE作为损失函数,通过反向传播算法更新模型的参数,促使模型将目标分子与正样本识别为相似实例,同时将其与不相似的实例区分开,以学习具有区分性的具有结构感知的分子特征表示。
损失函数为InfoNCE,公式为:
Figure PCTCN2021135524-appb-000007
其中,τ为超参数,该损失函数促使模型将目标分子q与正样本k 0识别为相似实例,将q与不相似的实例k 1,…,k K区分开。
如图2所示,为本发明实施例提供的结构感知图神经网络示意图。利用具有初始化节点特征和官能团特征的异构图对分子进行建模,刻画每一种节点和边的不同属性。将异构图作为结构感知分子编码器的输入,再利用RGCN对不同类型的边计算和聚合信息,对不同类型的节点整合不同边所聚合的信息来进行信息传递。RGCN考虑到了边的类型,同时为了将上一层节点的特征传递到下一层,RGCN为每个节点添加了特殊的自环边。其具体信息传递过程如下:
Figure PCTCN2021135524-appb-000008
其中,R是所有边的集合,
Figure PCTCN2021135524-appb-000009
是与节点i相邻的边类型为r的所有邻居节点,c i,r是一个可以学习的参数,
Figure PCTCN2021135524-appb-000010
是当前层l的权重矩阵,
Figure PCTCN2021135524-appb-000011
是当前层l对当前节点i的特征向量。对邻居节点的特征乘以边类型所对应的权重,再乘以一个可学习的参数后求和,最后加上自环边所传递的信息,经过激 活函数σ,作为本层的输出,下一层的输入。
通过RGCN得到分子中每个原子的表示及其所属官能团的表示后,再通过聚合函数将节点与官能团的特征进行聚合,得到分子的具有结构感知的特征表示。
以上所述的实施例对本发明的技术方案和有益效果进行了详细说明,应理解的是以上所述仅为本发明的具体实施例,并不用于限制本发明,凡在本发明的原则范围内所做的任何修改、补充和等同替换,均应包含在本发明的保护范围之内。

Claims (7)

  1. 一种基于对比学习的分子图表示学习方法,其特征在于,包括以下步骤:
    (1)获取每个分子的分子指纹表示,计算每两个分子指纹之间的相似度;
    (2)收集全量的化学官能团信息,为分子中的每个原子匹配对应的官能团;其中,当某个原子属于多个官能团时,优先匹配包含原子个数多的官能团作为该原子对应的官能团;
    (3)用异构图对分子图建模,异构图为包含不同类型节点和边的图,不同原子对应不同的节点类型,不同键对应不同的边类型;
    (4)构建结构感知分子编码器,利用结构感知分子编码器中的关系图卷积网络RGCN编码分子中每个原子的表示及其所属官能团的表示,通过聚合函数将分子映射到特征空间,得到具有结构感知的特征表示;具体过程为:
    将具有初始化节点特征和官能团特征的异构图作为结构感知分子编码器的输入,结构感知分子编码器中的关系图卷积网络RGCN通过对不同类型的边计算和聚合信息,以及对不同类型的节点整合不同边所聚合的信息来进行信息传递;得到每个原子及其所属官能团的特征表示后,再将节点与官能团的特征进行聚合,得到分子的具有结构感知的特征表示;
    关系图卷积网络RGCN进行信息传递的公式如下:
    Figure PCTCN2021135524-appb-100001
    其中,R是所有边的集合,
    Figure PCTCN2021135524-appb-100002
    是与节点i相邻的边类型为r的所有邻居节点,c i,r是一个可以学习的参数,
    Figure PCTCN2021135524-appb-100003
    是当前层l的权重矩阵,
    Figure PCTCN2021135524-appb-100004
    是当前层 l对当前节点i的特征向量;对邻居节点的特征乘以边类型所对应的权重,再乘以一个可学习的参数后求和,最后加上自环边所传递的信息,经过激活函数σ,作为本层的输出,下一层的输入;
    (5)根据分子之间的指纹相似度,选取正、负样本,在特征空间中进行对比学习;
    (6)通过在大样本分子数据集上利用对比学习的方法进行训练,得到具有结构感知的分子编码器,应用于下游分子属性的预测任务。
  2. 根据权利要求1所述的基于对比学习的分子图表示学习方法,其特征在于,步骤(1)中,通过Rdkit将分子的SMILES表示转化为分子指纹;所述的分子指纹选择Morgan指纹、MACCs指纹和拓扑指纹中的一种。
  3. 根据权利要求2所述的基于对比学习的分子图表示学习方法,其特征在于,步骤(1)中,两个分子指纹之间的相似度计算采用谷本系数,公式为:
    Figure PCTCN2021135524-appb-100005
    其中,采用MACCs指纹预先指定了166种分子的部分分子结构,当含有该分子结构时,对应位置记为1,反之则记为0;a和b分别表示在A、B分子中显示1的数量,c表示A、B分子中同时显示1的数量。
  4. 根据权利要求1所述的基于对比学习的分子图表示学习方法,其特征在于,步骤(5)中,选取正、负样本时,选取1个与目标分子相似度大于某阈值的分子为正样本,选取K个相似度小于某阈值的分子为负样本;将目标分子对应的特征表示记为q,将正样本的特征表示记为k 0,将K个负样本的特征表示记为k 1,…,k K
  5. 根据权利要求4所述的基于对比学习的分子图表示学习方法,其特征在于,获得每个目标分子及其正、负样本的特征表示后,利用损失函数计算损失,并通过反向传播算法更新结构感知分子编码器的参数,促使 结构感知分子编码器将目标分子与正样本识别为相似实例,并与不相似的样本区分开。
  6. 根据权利要求5所述的基于对比学习的分子图表示学习方法,其特征在于,所述的损失函数为InfoNCE,公式为:
    Figure PCTCN2021135524-appb-100006
    其中,τ为超参数,该损失函数促使模型将目标分子q与正样本k 0识别为相似实例,将q与不相似的实例k 1,…,k K区分开。
  7. 根据权利要求1所述的基于对比学习的分子图表示学习方法,其特征在于,步骤(6)的具体过程为:
    在大样本分子数据集上通过步骤(5)所述的对比学习方法训练具有结构感知的分子编码器;然后将小样本数据集中的分子数据输入具有结构感知的分子编码器,再利用线性分类器对编码器输出的分子表示做分类,进行分子属性的预测。
PCT/CN2021/135524 2020-12-25 2021-12-03 一种基于对比学习的分子图表示学习方法 WO2022135121A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/792,167 US20230052865A1 (en) 2020-12-25 2021-12-03 Molecular graph representation learning method based on contrastive learning

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011564310.8A CN112669916B (zh) 2020-12-25 2020-12-25 一种基于对比学习的分子图表示学习方法
CN202011564310.8 2020-12-25

Publications (1)

Publication Number Publication Date
WO2022135121A1 true WO2022135121A1 (zh) 2022-06-30

Family

ID=75409302

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/135524 WO2022135121A1 (zh) 2020-12-25 2021-12-03 一种基于对比学习的分子图表示学习方法

Country Status (3)

Country Link
US (1) US20230052865A1 (zh)
CN (1) CN112669916B (zh)
WO (1) WO2022135121A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115129896A (zh) * 2022-08-23 2022-09-30 南京众智维信息科技有限公司 基于对比学习的网络安全应急响应知识图谱关系提取方法
CN115329211A (zh) * 2022-08-01 2022-11-11 山东省计算中心(国家超级计算济南中心) 一种基于自监督学习和图神经网络的个性化兴趣推荐方法

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112669916B (zh) * 2020-12-25 2022-03-15 浙江大学 一种基于对比学习的分子图表示学习方法
CN113160894B (zh) * 2021-04-23 2023-10-24 平安科技(深圳)有限公司 药物与靶标的相互作用预测方法、装置、设备及存储介质
CN113110592B (zh) * 2021-04-23 2022-09-23 南京大学 一种无人机避障与路径规划方法
CN113314189B (zh) * 2021-05-28 2023-01-17 北京航空航天大学 一种化学分子结构的图神经网络表征方法
CN113409893B (zh) * 2021-06-25 2022-05-31 成都职业技术学院 一种基于图像卷积的分子特征提取及性能预测方法
CN113436689B (zh) * 2021-06-25 2022-04-29 平安科技(深圳)有限公司 药物分子结构预测方法、装置、设备及存储介质
CN113470761B (zh) * 2021-09-03 2022-02-25 季华实验室 发光材料性质预测方法、系统、电子设备和存储介质
CN113971992B (zh) * 2021-10-26 2024-03-29 中国科学技术大学 针对分子属性预测图网络的自监督预训练方法与系统
CN114386694B (zh) * 2022-01-11 2024-02-23 平安科技(深圳)有限公司 基于对比学习的药物分子性质预测方法、装置及设备
CN115631798B (zh) * 2022-10-17 2023-08-08 哈尔滨工业大学(深圳)(哈尔滨工业大学深圳科技创新研究院) 一种基于图对比学习的生物分子分类方法及装置
CN116304066B (zh) * 2023-05-23 2023-08-22 中国人民解放军国防科技大学 一种基于提示学习的异质信息网络节点分类方法
CN117473124B (zh) * 2023-11-03 2024-04-16 哈尔滨工业大学(威海) 一种具备抵制过度平滑能力的自监督异质图表示学习方法
CN117316333B (zh) * 2023-11-28 2024-02-13 烟台国工智能科技有限公司 基于通用的分子图表示学习模型的逆合成预测方法及装置
CN117649676A (zh) * 2024-01-29 2024-03-05 杭州德睿智药科技有限公司 一种基于深度学习模型的化学结构式的识别方法
CN117829683A (zh) * 2024-03-04 2024-04-05 国网山东省电力公司信息通信公司 基于图对比学习的电力物联数据质量分析方法及系统

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109583562A (zh) * 2017-09-28 2019-04-05 西门子股份公司 Sgcnn:结构的基于图的卷积神经网络
US20190251480A1 (en) * 2018-02-09 2019-08-15 NEC Laboratories Europe GmbH Method and system for learning of classifier-independent node representations which carry class label information
CN110263780A (zh) * 2018-10-30 2019-09-20 腾讯科技(深圳)有限公司 实现异构图、分子空间结构性质识别的方法、装置和设备
CN111063398A (zh) * 2019-12-20 2020-04-24 吉林大学 一种基于图贝叶斯优化的分子发现方法
CN111710375A (zh) * 2020-05-13 2020-09-25 中国科学院计算机网络信息中心 一种分子性质预测方法及系统
CN111724867A (zh) * 2020-06-24 2020-09-29 中国科学技术大学 分子属性测定方法、装置、电子设备及存储介质
CN111783100A (zh) * 2020-06-22 2020-10-16 哈尔滨工业大学 基于图卷积网络对代码图表示学习的源代码漏洞检测方法
CN112669916A (zh) * 2020-12-25 2021-04-16 浙江大学 一种基于对比学习的分子图表示学习方法

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109583562A (zh) * 2017-09-28 2019-04-05 西门子股份公司 Sgcnn:结构的基于图的卷积神经网络
US20190251480A1 (en) * 2018-02-09 2019-08-15 NEC Laboratories Europe GmbH Method and system for learning of classifier-independent node representations which carry class label information
CN110263780A (zh) * 2018-10-30 2019-09-20 腾讯科技(深圳)有限公司 实现异构图、分子空间结构性质识别的方法、装置和设备
CN111063398A (zh) * 2019-12-20 2020-04-24 吉林大学 一种基于图贝叶斯优化的分子发现方法
CN111710375A (zh) * 2020-05-13 2020-09-25 中国科学院计算机网络信息中心 一种分子性质预测方法及系统
CN111783100A (zh) * 2020-06-22 2020-10-16 哈尔滨工业大学 基于图卷积网络对代码图表示学习的源代码漏洞检测方法
CN111724867A (zh) * 2020-06-24 2020-09-29 中国科学技术大学 分子属性测定方法、装置、电子设备及存储介质
CN112669916A (zh) * 2020-12-25 2021-04-16 浙江大学 一种基于对比学习的分子图表示学习方法

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115329211A (zh) * 2022-08-01 2022-11-11 山东省计算中心(国家超级计算济南中心) 一种基于自监督学习和图神经网络的个性化兴趣推荐方法
CN115329211B (zh) * 2022-08-01 2023-06-06 山东省计算中心(国家超级计算济南中心) 一种基于自监督学习和图神经网络的个性化兴趣推荐方法
CN115129896A (zh) * 2022-08-23 2022-09-30 南京众智维信息科技有限公司 基于对比学习的网络安全应急响应知识图谱关系提取方法
CN115129896B (zh) * 2022-08-23 2022-12-13 南京众智维信息科技有限公司 基于对比学习的网络安全应急响应知识图谱关系提取方法

Also Published As

Publication number Publication date
US20230052865A1 (en) 2023-02-16
CN112669916B (zh) 2022-03-15
CN112669916A (zh) 2021-04-16

Similar Documents

Publication Publication Date Title
WO2022135121A1 (zh) 一种基于对比学习的分子图表示学习方法
Bai et al. Boundary content graph neural network for temporal action proposal generation
Wen et al. Big data driven marine environment information forecasting: a time series prediction network
CN109902145B (zh) 一种基于注意力机制的实体关系联合抽取方法和系统
WO2023065545A1 (zh) 风险预测方法、装置、设备及存储介质
Liu et al. A selective multiple instance transfer learning method for text categorization problems
CN111666406B (zh) 基于自注意力的单词和标签联合的短文本分类预测方法
CN108428478B (zh) 基于异质医疗数据挖掘的甲状腺癌风险预测方法
CN113407660B (zh) 非结构化文本事件抽取方法
CN111126563B (zh) 基于孪生网络的时空数据的目标识别方法及系统
WO2023155508A1 (zh) 一种基于图卷积神经网络和知识库的论文相关性分析方法
CN113254675B (zh) 基于自适应少样本关系抽取的知识图谱构建方法
CN112288013A (zh) 基于元度量学习的小样本遥感场景分类方法
CN116383399A (zh) 一种事件舆情风险预测方法及系统
Yu et al. Tulsn: siamese network for trajectory-user linking
CN115718831A (zh) 基于动态异质图的社交媒体机器人检测方法及相关装置
Fu et al. Deep momentum uncertainty hashing
CN109993188B (zh) 数据标签识别方法、行为识别方法及装置
CN113314188A (zh) 图结构增强的小样本学习方法、系统、设备及存储介质
CN108664607A (zh) 一种基于迁移学习的电力通信网数据质量提升方法
CN112735604B (zh) 一种基于深度学习算法的新型冠状病毒分类方法
CN113990408A (zh) 一种基于化学元素知识图谱的分子图对比学习方法
Spalević et al. Hierarchical protein function prediction with tail-GNNs
Seyed Ebrahimi et al. A Novel Learning-Based PLST Algorithm for Multi-Label Classification
Yu et al. Metric Learning with Distillation for Overcoming Catastrophic Forgetting

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21909118

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21909118

Country of ref document: EP

Kind code of ref document: A1