CN114819152A - Graph embedding expert entity alignment method based on reinforcement learning enhancement - Google Patents
Graph embedding expert entity alignment method based on reinforcement learning enhancement Download PDFInfo
- Publication number
- CN114819152A CN114819152A CN202210060387.4A CN202210060387A CN114819152A CN 114819152 A CN114819152 A CN 114819152A CN 202210060387 A CN202210060387 A CN 202210060387A CN 114819152 A CN114819152 A CN 114819152A
- Authority
- CN
- China
- Prior art keywords
- node
- expert
- entity
- reinforcement learning
- graph embedding
- Prior art date
- Legal status (The legal status 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 status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N5/00—Computing arrangements using knowledge-based models
- G06N5/02—Knowledge representation; Symbolic representation
- G06N5/022—Knowledge engineering; Knowledge acquisition
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N5/00—Computing arrangements using knowledge-based models
- G06N5/02—Knowledge representation; Symbolic representation
- G06N5/027—Frames
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Evolutionary Computation (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Computational Linguistics (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Artificial Intelligence (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明公开了一种基于强化学习增强的图嵌入实体对齐方法。本发明采用构建异构子图的方式,仅对待对齐实体对的n‑hop邻居进行消息聚合,直接降低计算资源要求。使用基于特征线性调制的图嵌入学习算法,引入超网络思想,以少量参数完成高计算复杂性的消息传递机制与节点更新机制,从而更好地利用节点间的交互信息。此外,本发明提出了一种强化学习增强的节点选择器,提出并在节点选择器中应用基于自监督信号的可靠性度量方法,采样一定数量的可靠边,在限制异构子图的大小的同时过滤问题边,保证参与节点更新的边的可靠性。本发明还实现了一种基于强化学习的节点采样数量更新策略,动态优化采样节点数目,增强节点选择器。
The invention discloses a graph embedding entity alignment method based on reinforcement learning enhancement. The present invention adopts the method of constructing a heterogeneous subgraph, and only performs message aggregation on the n-hop neighbors of the pair of entities to be aligned, thereby directly reducing computing resource requirements. The graph embedding learning algorithm based on feature linear modulation is used, and the idea of super network is introduced to complete the message passing mechanism and node update mechanism of high computational complexity with a small number of parameters, so as to make better use of the interaction information between nodes. In addition, the present invention proposes a node selector enhanced by reinforcement learning, proposes and applies a reliability measurement method based on self-supervised signals in the node selector, samples a certain number of reliable edges, and limits the size of the heterogeneous subgraph. At the same time, the problem edges are filtered to ensure the reliability of the edges participating in the node update. The invention also realizes a node sampling number update strategy based on reinforcement learning, dynamically optimizes the number of sampling nodes, and strengthens the node selector.
Description
技术领域technical field
本发明涉及自然语言处理中的知识图谱技术领域,尤其涉及一种基于强化学习增强的图嵌入实体对齐方法。The invention relates to the technical field of knowledge graphs in natural language processing, in particular to a graph embedding entity alignment method based on reinforcement learning enhancement.
背景技术Background technique
“21世纪的竞争是人才的竞争”,人才要素占据产业要素的核心地位。人才知识库可作为要素调度、人才推荐、项目精准投资等下游决策任务的上游数据知识支撑,是各地政府为完善和优化产业转型、合理协调并调动各大产业要素的决策依据。当前,海量的人才相关数据广泛分布在学术机构网站、学术搜索引擎等互联网平台上,存在孤岛现象严重、数据类型多样、质量参差不齐等问题。为构建一个大规模、高质量的人才知识库,整合其他人才知识库的知识是必要手段之一。专家实体作为链接不同知识库的枢纽,对于整合各个人才知识库而言十分重要。识别不同的人才知识库中表达现实世界中同一个体的专家实体的过程,称为专家实体对齐。"The competition in the 21st century is the competition of talents", and the talent element occupies the core position of the industrial element. The talent knowledge base can be used as the upstream data knowledge support for downstream decision-making tasks such as factor scheduling, talent recommendation, and project precision investment. At present, massive amounts of talent-related data are widely distributed on Internet platforms such as academic institution websites and academic search engines. In order to build a large-scale, high-quality talent knowledge base, integrating the knowledge of other talent knowledge bases is one of the necessary means. As a hub linking different knowledge bases, the expert entity is very important for integrating various talent knowledge bases. The process of identifying expert entities representing the same individual in the real world in different talent knowledge bases is called expert entity alignment.
实体对齐通常通过比较待对齐实体对的一些特征,如实体名称、实体属性和属性值,使用一些机器学习方法或基于表示学习的方法进行相似度计算打分。然而,对于人才知识库来说,其存在的数据特征以及现实场景应用要求,对现有的实体对齐方法提出了一些要求:第一,可利用的信息减少。人才知识库中的关系与属性具有可枚举性,无需进行对齐。这一特点使得现有的一些实体对齐方法无法利用关系谓词和属性谓词的对齐信息,造成模型性能下降。第二,计算资源有限且运行结果不稳定。人才知识库中实体规模非常庞大,且每日将新增大量论文实体或专家实体,且不同专家发表的成果数量也有较大差异,在实际应用场景下可能造成一定程度上的计算不稳定性。第三,知识库中存在的问题边。在现有的各种知识库中,存在错误的三元组数据是比较普遍的情况,这些错误的问题边的存在无疑对模型判断实体对是否为同一现实实体产生消极影响。Entity alignment usually compares some features of the entity pair to be aligned, such as entity name, entity attribute and attribute value, and uses some machine learning methods or methods based on representation learning to calculate and score the similarity. However, for the talent knowledge base, the existing data characteristics and the application requirements of real-world scenarios put forward some requirements for the existing entity alignment methods: First, the available information is reduced. The relationships and attributes in the talent knowledge base are enumerable and do not need to be aligned. This feature makes some existing entity alignment methods unable to utilize the alignment information of relation predicates and attribute predicates, resulting in model performance degradation. Second, the computing resources are limited and the running results are unstable. The scale of entities in the talent knowledge base is very large, and a large number of paper entities or expert entities will be added every day, and the number of results published by different experts is also quite different, which may cause a certain degree of computational instability in practical application scenarios. Third, there are problem edges in the knowledge base. In various existing knowledge bases, it is relatively common to have wrong triple data, and the existence of these wrong problem edges will undoubtedly have a negative impact on whether the model determines whether the entity is the same real entity.
发明内容SUMMARY OF THE INVENTION
本发明的目的在于克服现有技术的不足,提供一种基于强化学习增强的图嵌入专家实体对齐方法。本发明的技术方案如下:The purpose of the present invention is to overcome the deficiencies of the prior art, and to provide a graph embedding expert entity alignment method enhanced by reinforcement learning. The technical scheme of the present invention is as follows:
本发明提供了一种基于强化学习增强的图嵌入专家实体对齐方法,其包括如下步骤:The present invention provides a graph embedding expert entity alignment method based on reinforcement learning enhancement, which includes the following steps:
步骤1:获得两个人才知识库的数据G1=(E1,T1,R)和G2=(E2,T2,R),其中E 代表实体集合,实体类型包括专家实体、论文实体;R代表关系集合;T代表三元组集合,是E×R×E的子集;Step 1: Obtain the data G 1 =(E 1 , T 1 , R) and G 2 =(E 2 , T 2 , R) of two talent knowledge bases, where E represents the entity set, and the entity types include expert entities, papers Entity; R stands for relation set; T stands for triple set, which is a subset of E×R×E;
步骤2:对于某一人才知识库中的每一专家实体e,根据专家姓名,通过候选实体对生成模块,基于正则匹配模板生成器的方法从另一个人才知识库汇中生成候选专家集合C;Step 2: For each expert entity e in a certain talent knowledge base, according to the expert name, through the candidate entity pair generation module, based on the method of regular matching template generator, generate a candidate expert set C from another talent knowledge base ;
步骤3:对于每个候选专家c∈C,构建关于实体对<e,c>的2-hop异构子图 HG=(V,H,T,R),其中H1、H2分别代表两个人才知识库的实体初始向量集合;初始的节点向量表示h(0):Step 3: For each candidate expert c∈C, construct a 2-hop heterogeneous subgraph HG=(V,H,T,R) about entity pair <e,c>, where H 1 and H 2 respectively represent the entity initial vector sets of the two talent knowledge bases; the initial node vector represents h (0) :
hstruct=LINE(G)h struct =LINE(G)
其中表示向量拼接操作,hattr为实体各属性特征通过skip-gram模型获得的词向量的平均向量,hstruct则是通过LINE模型对知识库中每个实体的结构信息进行编码得到的结构向量;in Represents the vector splicing operation, h attr is the average vector of word vectors obtained by each attribute feature of the entity through the skip-gram model, and h struct is the structure vector obtained by encoding the structural information of each entity in the knowledge base through the LINE model;
步骤4:在节点向量更新模块,在每一层图嵌入层中,使用基于自监督信号的可靠性度量方法计算每条边的可靠性;Step 4: In the node vector update module, in each layer of the graph embedding layer, use the reliability measurement method based on the self-supervised signal to calculate the reliability of each edge;
步骤5:在每一层图嵌入层中,对异构子图HG,使用top-p采样策略,根据步骤4计算所得的可靠性,从大到小对每种关系采样pr条可靠边,并使用基于强化学习的节点采样数量更新策略更新节点采样数量;Step 5: In each layer of graph embedding layer, for the heterogeneous subgraph HG, use the top-p sampling strategy, according to the reliability calculated in step 4, sample p r reliable edges for each relationship from large to small, And use the node sampling number update strategy based on reinforcement learning to update the node sampling number;
步骤6:在每一层图嵌入层中,获得采样后的异构子图后,使用基于特征线性调制的图嵌入学习算法更新节点向量;Step 6: In each layer of graph embedding layer, after obtaining the sampled heterogeneous subgraph, use the graph embedding learning algorithm based on feature linear modulation to update the node vector;
步骤7:经过L层图嵌入层后,取出更新后的待对齐实体对<e,c>的节点向量和通过多层感知机计算匹配概率 Step 7: After passing through the L-layer graph embedding layer, take out the updated node vector of the entity pair <e, c> to be aligned and Calculation of Matching Probabilities by Multilayer Perceptron
步骤8:根据所有候选实体的匹配概率,取概率最高的候选专家为匹配专家。Step 8: According to the matching probability of all candidate entities, the candidate expert with the highest probability is selected as the matching expert.
与现有方法相比,本发明方法的优点在于:Compared with the existing methods, the advantages of the method of the present invention are:
(1)针对可利用信息减少的问题,使用一种基于特征线性调制的图嵌入学习算法,引入超网络思想,可根据目标节点向量动态生成关系权重矩阵,以少量参数完成高计算复杂性的消息传递机制与节点更新机制,从而更好地利用节点间的交互信息;(1) Aiming at the problem of reducing the available information, a graph embedding learning algorithm based on feature linear modulation is used, and the idea of super network is introduced. The relationship weight matrix can be dynamically generated according to the target node vector, and the message with high computational complexity can be completed with a small number of parameters. Transfer mechanism and node update mechanism, so as to better utilize the interaction information between nodes;
(2)针对知识库中存在的问题边,本发明方法提出了一种强化学习增强的节点选择器,其应用一种基于自监督信号的可靠性度量方法,基于已有边构建自监督信号,使得可根据可靠性采样关系边,以此过滤问题边,保证参与节点更新的边的可靠性。由于采样后的异构子图的大小得到控制,同时解决了计算资源有限且运行结果不稳定的问题。(2) Aiming at the problem edges existing in the knowledge base, the method of the present invention proposes a node selector enhanced by reinforcement learning, which applies a reliability measurement method based on self-supervised signals, constructs self-supervised signals based on existing edges, This makes it possible to sample relational edges according to reliability, so as to filter the problem edges and ensure the reliability of the edges participating in node update. Since the size of the sampled heterogeneous subgraph is controlled, the problems of limited computing resources and unstable running results are also solved.
(3)为避免大量人工调整节点采样数量,节点选择器还实现了一种基于强化学习的节点采样数量更新策略,动态优化采样节点数目。(3) In order to avoid a large number of manual adjustment of the number of node sampling, the node selector also implements a node sampling number update strategy based on reinforcement learning to dynamically optimize the number of sampling nodes.
附图说明Description of drawings
图1是基于强化学习增强的图嵌入专家实体对齐方法整体框架图。Figure 1 is the overall framework diagram of the expert entity alignment method for graph embedding based on reinforcement learning enhancement.
图2是候选实体正则匹配模板生成器整体流程图。Figure 2 is the overall flow chart of the candidate entity regular matching template generator.
图3是节点向量更新模块整体流程图,其中虚线框部分仅在训练过程中实现。Figure 3 is the overall flow chart of the node vector update module, in which the dashed box is only implemented during the training process.
具体实施方式Detailed ways
下面结合具体实施方式对本发明做进一步阐述和说明。所述实施例仅是本公开内容的示范且不圈定限制范围。本发明中各个实施方式的技术特征在没有相互冲突的前提下,均可进行相应组合。The present invention will be further elaborated and described below in conjunction with specific embodiments. The described embodiments are merely exemplary of the present disclosure and do not delineate the scope of limitation. The technical features of the various embodiments of the present invention can be combined correspondingly on the premise that there is no conflict with each other.
人才知识库通常包含多种实体类型与关系类型信息,给定两个人才知识库, G1=(E1,T1,R)和G2=(E2,T2,R),其中E代表实体集合,实体类型包括专家实体、论文实体;R代表关系集合;T代表三元组集合,是E×R×E的子集。种子实体对集合表示用于训练的已对齐实体对集合。专家实体对齐任务旨在利用已知的实体对信息训练得到一个模型,并以此预测潜在的专家对齐结果其中等号代表两个专家实体指向真实世界中同一个体。The talent knowledge base usually contains a variety of entity types and relationship type information. Given two talent knowledge bases, G 1 =(E 1 , T 1 , R) and G 2 =(E 2 , T 2 , R), where E Represents entity set, entity types include expert entity and paper entity; R represents relation set; T represents triple set, which is a subset of E×R×E. set of seed entity pairs Represents the set of aligned entity pairs used for training. The expert entity alignment task aims to use the known entity pair information to train a model to predict potential expert alignment results. The equal sign indicates that two expert entities refer to the same individual in the real world.
给定某一人才知识库中专家实体,寻找其在另一个人才知识库中所对应的专家实体的过程可视为匹配问题,即在某一特征空间下,计算给定专家实体与另一人才知识库中所有候选专家实体的匹配概率,并将匹配得分最高的实体视为对齐结果。Given an expert entity in a talent knowledge base, the process of finding its corresponding expert entity in another talent knowledge base can be regarded as a matching problem, that is, in a certain feature space, calculating the relationship between a given expert entity and another The matching probability of all candidate expert entities in the talent knowledge base, and the entity with the highest matching score is regarded as the alignment result.
如图1所示,本发明设计了强化学习增强的图嵌入专家实体对齐方法整体框架图:对于两个人才知识库,首先根据姓名生成候选实体对;然后对于每对实体对,构建2-hop异构子图;接着在节点向量更新模块,在每一层图嵌入层内,先利用基于自监督信号的节点选择器进行异构子图的可靠边采样,并同时利用强化学习模块进行可靠边采样数目的动态更新,过滤问题边后的异构子图经由基于特征线性调制的图嵌入完成当前层的节点向量更新,共L层图嵌入层;最后取出待对齐专家实体对的最终节点向量表示,进行向量点乘后,使用多层感知机完成匹配概率的计算。As shown in Fig. 1, the present invention designs an overall framework diagram of a graph embedding expert entity alignment method enhanced by reinforcement learning: for two talent knowledge bases, first generate candidate entity pairs according to names; then for each pair of entity pairs, construct a 2-hop Heterogeneous subgraph; then in the node vector update module, in each layer of the graph embedding layer, the node selector based on the self-supervised signal is used to sample the reliable edges of the heterogeneous subgraph, and at the same time, the reinforcement learning module is used to perform reliable edge sampling. The number of samples is dynamically updated, and the heterogeneous subgraph after filtering the problem edge completes the node vector update of the current layer through the graph embedding based on feature linear modulation, with a total of L layers of graph embedding layers; finally, the final node vector representation of the expert entity pair to be aligned is taken out. , after the vector point product, the multi-layer perceptron is used to complete the calculation of the matching probability.
以下对本发明中各模块(步骤)进行详细介绍。Each module (step) in the present invention will be described in detail below.
S1候选实体对生成:为了应对中英文姓名由于缩写、多音字、复姓等情况,实现了一种基于正则匹配模板生成器的方法。图2详细描述了正则匹配模板生成器如何生成正则匹配模板的过程。S1 candidate entity pair generation: In order to deal with the situation of Chinese and English names due to abbreviations, polyphonic characters, and complex surnames, a method based on regular matching template generator is implemented. Figure 2 details the process of how the regular matching template generator generates the regular matching template.
首先分别处理中英文姓名,使用姓名解析器生成解析字典。对于英文姓名,先进行姓氏和名字的解析,根据一定规则确定是否可以确定姓氏和名字的顺序,然后生成解析字典。对于中文姓名,将中文姓名转换为拼音形式,即转化为英文名字,同时考虑多音字与复姓,生成中间解析结果后同英文名处理。表1展示了中文名转化为英文名的解析规则,表2展示了针对英文名/转换后的中文拼音名如何确定姓氏与名字顺序的规则,表3展示了解析字典生成方法。First, the Chinese and English names are processed separately, and the name parser is used to generate a parsing dictionary. For English names, first parse the surname and first name, determine whether the order of the surname and first name can be determined according to certain rules, and then generate a parsing dictionary. For Chinese names, the Chinese names are converted into pinyin form, that is, into English names, and polyphonic characters and compound surnames are considered at the same time, and the intermediate analysis results are generated and processed as English names. Table 1 shows the parsing rules for converting Chinese names into English names, Table 2 shows the rules for determining the order of surnames and first names for English names/transformed Chinese Pinyin names, and Table 3 shows the method of generating a parsing dictionary.
表1中文名转化为英文的解析规则Table 1 Parsing rules for converting Chinese names into English
表2确定姓氏与名字顺序的规则Table 2 Rules for determining the order of last names and first names
表3解析字典生成方法Table 3 Parsing dictionary generation method
将姓名解析器生成的解析字典作为模板生成器的输入,输出相应的正则模板。首先根据是否能确定姓氏与名字的顺序,然后判断名字是否为缩写,最后根据“姓在前”与“姓在后”两种顺序生成2组或4组正则模板。表4展示了缩写判断规则,表5展示了根据解析字典生成正则模板的规则。The parsing dictionary generated by the name parser is used as the input of the template generator, and the corresponding regular template is output. First, according to whether the order of the surname and the first name can be determined, then determine whether the first name is an abbreviation, and finally generate 2 or 4 groups of regular templates according to the two orders of "surname first" and "surname last". Table 4 shows the abbreviation judgment rules, and Table 5 shows the rules for generating regular templates from the parsing dictionary.
表4缩写判断规则Table 4 Abbreviation Judgment Rules
表5根据解析字典生成正则模板的规则Table 5 Rules for generating regular templates from parsing dictionaries
S2构建n-hop异构子图:以n=2为例,对于待对齐专家实体对<a1,a′1>,分别从G1和G2中获得其一阶邻居节点,包括发表的论文节点、会议/期刊节点、共同作者关系的专家节点,以及一阶邻居专家节点的论文节点与会议/期刊节点,从而构建出以a1或a′1为核心的子图。在已知部分实体对齐的结果下(比如通过会议/期刊名是否相同、论文标题是否相同、已对齐专家实体),可以将原本分离的两个子图合并,获得一张以待对齐专家实体对<a1,a′1>为核心的异构子图。S2 constructs an n-hop heterogeneous subgraph: taking n=2 as an example, for the expert entity pair <a 1 , a' 1 > to be aligned, obtain its first-order neighbor nodes from G 1 and G 2 respectively, including the published Paper nodes, conference/journal nodes, expert nodes of co-authorship relationships, and paper nodes and conference/journal nodes of first-order neighbor expert nodes, thus constructing a subgraph with a 1 or a' 1 as the core. Under the result of known partial entity alignment (such as whether the conference/journal name is the same, whether the paper title is the same, and the expert entity has been aligned), the two originally separated subgraphs can be merged to obtain a pair of expert entities to be aligned < a 1 , a′ 1 > as the core heterogeneous subgraph.
S3节点向量更新模块:此步骤通过L层图嵌入层完成异构子图中的节点向量表示更新,需获得初始的节点向量表示h(0),每层图嵌入层节点向量更新的具体流程如图3所示,首先通过基于自监督信号的可靠性度量方法计算每条边的可靠性,然后采用top-p采样策略,根据计算所得的可靠性,从大到小对每种关系采样一定数量pr的可靠边,在获得采样的异构子图后,使用基于特征线性调制的图嵌入学习算法更新节点向量,最后取出待对齐实体对的最终节点向量表示,通过多层感知机计算匹配概率。在训练阶段,为了得到更优秀的可靠性度量方法,通过采样已存在关系边SPT,并以1:1的比例采样与目标节点不存在该关系的节点构建不存在的关系边SPF,构建自监督信号,计算平均边采样损失,从而训练可靠性度量方法中的权重矩阵。此外,为了动态更新每种关系的节点采样数量pr,计算已采样边的平均不可靠性,使用基于强化学习的节点采样数量更新策略更新采样数量。S3 node vector update module: This step completes the update of the node vector representation in the heterogeneous subgraph through the L-layer graph embedding layer, and the initial node vector representation h (0) needs to be obtained. The specific process of updating the node vector of each graph embedding layer is as follows As shown in Figure 3, the reliability of each edge is first calculated by the reliability measurement method based on the self-supervision signal, and then the top-p sampling strategy is adopted. According to the calculated reliability, a certain number of each relationship is sampled from large to small. Reliable edge of p r , after obtaining the sampled heterogeneous subgraph, use the graph embedding learning algorithm based on feature linear modulation to update the node vector, and finally take out the final node vector representation of the entity pair to be aligned, and calculate the matching probability through the multilayer perceptron . In the training stage, in order to obtain a better reliability measurement method, the non-existing relationship edge SPF is constructed by sampling the existing relationship edge SPT, and sampling nodes that do not have the relationship with the target node at a ratio of 1:1 to construct a self-supervised relationship. signal, computes the average edge sampling loss to train the weight matrix in the reliability measure. In addition, in order to dynamically update the number of node samples pr for each relation, and calculate the average unreliability of sampled edges, the number of samples is updated using a reinforcement learning-based node sample number update strategy.
初始的节点向量表示h(0):The initial node vector representation h (0) :
hstruct=LINE(G)h struct =LINE(G)
其中表示向量拼接操作,hattr为实体各属性特征(包括论文标题、摘要、会议 /期刊名等)通过skip-gram模型获得的词向量的平均向量,hstruct则是通过LINE 模型对知识库中每个实体的结构信息进行编码。in Represents the vector splicing operation, h attr is the average vector of the word vectors obtained by the skip-gram model of each attribute feature of the entity (including paper title, abstract, conference/journal name, etc.), and h struct is the LINE model. Encoding the structural information of each entity.
计算每条边的可靠性:对于三元组<u,r,v>(即节点u与节点v间存在关系 r,且方向为u指向v),其可靠性S(u,v)的计算过程如下:Calculate the reliability of each edge: For triples <u, r, v> (that is, there is a relationship r between node u and node v, and the direction is u points to v), the calculation of its reliability S(u, v) The process is as follows:
首先计算节点在每种关系上的特征表示η:First compute the feature representation η of a node on each relation:
ηu,ηv=σ1(Wτ(u)hu),σ1(Wτ(v)hv))η u , η v =σ 1 (W τ(u) h u ), σ 1 (W τ(v) h v ))
其中Wτ(u)和Wτ(v)分别代表对应的节点类型相关的权重矩阵,其维度为R|R|×d, hu和hv是节点u和v在这一层图嵌入层的节点向量表示,维度为d。where W τ(u) and W τ(v) respectively represent the weight matrix related to the corresponding node type, its dimension is R |R|×d , h u and h v are the nodes u and v in the graph embedding layer of this layer The node vector representation of , with dimension d.
然后计算节点对<u,v>存在关系r的概率αu,v:Then calculate the probability α u, v that the node pair <u, v> has a relationship r:
αu,v=σ2(WTF·(ηu⊙ηv))α u,v =σ 2 (W TF ·(η u ⊙η v ))
其中WTF的维度为R2×|R|,⊙为向量点乘操作。The dimension of W TF is R 2×|R| , and ⊙ is the vector dot product operation.
最后使用曼哈顿距离计算不可靠性D(u,v),并得到可靠性S(u,v):Finally, the unreliability D(u, v) is calculated using the Manhattan distance, and the reliability S(u, v) is obtained:
D(u,v)=||αu,v||1 D(u, v)=||α u, v || 1
S(u,v)=1-D(u,v)S(u,v)=1-D(u,v)
top-p采样策略:对于异构子图中每个节点,对于其每种关系r,根据计算所得的可靠性,从大到小采样pr条边。top-p sampling strategy: For each node in the heterogeneous subgraph, for each relationship r , according to the calculated reliability, sample pr edges from large to small.
基于特征线性调制的图嵌入学习算法更新节点向量:在第l层时,对于节点v,其节点向量由更新为hv∈Rd:The graph embedding learning algorithm based on feature linear modulation updates the node vector: at the lth layer, for node v, its node vector is given by update to h v ∈ R d :
其中Wr (l)∈Rd×d是消息转换函数权重,σ为ReLU函数,分别是节点v在第l层图嵌入层中计算所得的每个邻居节点u的消息权重:where W r (l) ∈ R d×d is the weight of the message conversion function, σ is the ReLU function, are the message weights of each neighbor node u calculated by node v in the lth layer of graph embedding layer:
其中g(hv;θg,l,r)是一个超网络,使用单层线性层实现,θg,l,r∈R2d×d是这个超网络的参数。where g(h v ; θ g, l, r ) is a super-network implemented using a single linear layer, and θ g, l, r ∈ R 2d×d are the parameters of this hyper-network.
S4计算匹配概率:经过L层图嵌入层后,取出更新后的待对齐实体对<e,c> 的节点向量和通过多层感知机计算匹配概率具体计算过程为:S4 calculates the matching probability: After passing through the L-layer graph embedding layer, take out the updated node vector of the entity pair <e, c> to be aligned and Calculation of Matching Probabilities by Multilayer Perceptron The specific calculation process is as follows:
其中FC是3层线性层,且每层使用一个ReLU非线性函数。where FC is a 3-layer linear layer, and each layer uses a ReLU nonlinear function.
S5训练阶段更新节点采样数量以及计算损失函数:(1)计算已采样边的平均不可靠性,利用强化学习策略动态优化节点采样数量;(2)构建自监督信号,并计算平均边采样损失,并与对齐损失加和获得最终损失。S5 training phase to update the number of node samples and calculate the loss function: (1) Calculate the average unreliability of the sampled edges, and use the reinforcement learning strategy to dynamically optimize the number of node samples; (2) Build a self-supervised signal and calculate the average edge sampling loss, And sum with the alignment loss to get the final loss.
构建自监督信号:对于每种关系r,采样图中其中60%的已存在的部分关系边 SPT={<u,r,v>|<u,r,v>∈T},作为正例,并以1:1的比例采样与目标节点不存在该关系的节点构建不存在的关系边作为负例,构建基于已有关系边的自监督信号。Build a self-supervised signal: For each relation r, 60% of the existing partial relation edges in the sampling graph SPT={<u, r, v>|<u, r, v>∈T}, as a positive example, And sample nodes that do not have the relationship with the target node at a ratio of 1:1 to construct non-existing relationship edges As a negative example, a self-supervised signal based on existing relational edges is constructed.
计算平均边采样损失:使用交叉熵损失作为损失函数,最小化所有图嵌入层的平均边采样损失从而训练计算可靠性时使用的各项权重系数:Calculate the average edge sampling loss: Minimize the average edge sampling loss across all graph embedding layers using the cross-entropy loss as the loss function Thus training the various weight coefficients used in calculating reliability:
其中ψ(u,r,v)=1代表边<u,r,v>存在,反之,ψ(u,r,v)=0则代表该边不存在。Where ψ(u, r, v)=1 means that the edge <u, r, v> exists, otherwise, ψ(u, r, v)=0 means that the edge does not exist.
计算已采样边的平均不可靠性:在每个epoch e,对于关系r,计算已采样边Er,sampled的平均不可靠性 Calculate the mean unreliability of sampled edges: at each epoch e, for relation r, calculate the mean unreliability of sampled edges Er, sampled
更新节点采样数量:根据相邻两个epoch之间的平均不可靠性之间的变化趋势更新关系r的节点采样数目pr,使用的强化学习策略中的Action、Reward、 Termination分别为:Update the number of node samples: According to the change trend between the average unreliability between two adjacent epochs, the number of node samples p r to update the relationship r, the Action, Reward, and Termination in the reinforcement learning strategy used are:
Action={+∈,-∈}Action={+∈,-∈}
其中∈为一个较小的固定整数。where ∈ is a small fixed integer.
如果当前epoch的平均不可靠性要小于上一epoch时,奖励函数为正,采用即时奖励的方式来贪心增加pr,否则,则减少pr。If the average unreliability of the current epoch is smaller than the previous epoch, the reward function is positive, and the instant reward method is used to greedily increase p r , otherwise, decrease p r .
在训练过程中,专家实体对齐任务的损失除了基于自监督信号的可靠性度量方法的平均边采样损失外,还包括所有待对齐实体对的对齐损失该损失的目标是使得对齐的专家实体对的向量表示对<ze,zc>经过多层感知机后得到的概率越高,接近于1,而非对齐的向量表示对的分数接近于0:During the training process, the loss of the expert entity alignment task includes the alignment loss of all entity pairs to be aligned in addition to the average edge sampling loss of the reliability measure based on self-supervised signals The goal of this loss is to make the vector representation pair <z e , z c > of aligned expert entity pairs get a higher probability after passing through the MLP, close to 1, while the score of the unaligned vector representation pair is close to 0 :
模型最终的损失函数为对齐损失与平均边采样损失的加权和:The final loss function of the model is the weighted sum of the alignment loss and the average edge sampling loss:
其中||Θ||2为L2正则化惩罚项,λ3是对应的惩罚项系数,λ1和λ2分别是对齐损失和平均边采样损失的权重系数。where ||Θ|| 2 is the L2 regularization penalty term, λ 3 is the corresponding penalty term coefficient, and λ 1 and λ 2 are the weight coefficients for alignment loss and average edge sampling loss, respectively.
在实验中,本实施实例使用了数据集OAG,该数据集涉及微软学术网络和 AMiner两大学术网络,其网络规模大小如表6,数据集的基本统计信息如表7。In the experiment, this example uses the data set OAG, which involves two major academic networks, Microsoft Academic Network and AMiner. The size of the network is shown in Table 6, and the basic statistical information of the data set is shown in Table 7.
表6 OAG数据集中网络数据规模Table 6 The scale of network data in the OAG dataset
表7 OAG数据集的基本统计信息Table 7 Basic statistics of OAG dataset
评价指标:使用精确率(Precision)、召回率(Recall)与F1值(F1-score) 作为评估指标。Precision是评估分类器预测的正样本中预测正确的比例,其取值越大,则代表模型对正样本的预测准确程度越高。Recall是评估分类器所预测正确的正样本占所有正样本的比例,其值越大,则代表模型将正确的正样本预测出来的概率越高。F1-score综合评价Precision和Recall,其值越高,则代表模型整体预测性能越好。Evaluation Metrics: Use Precision, Recall and F1-score as evaluation metrics. Precision is the proportion of correct predictions in the positive samples predicted by the classifier. The larger the value, the higher the accuracy of the model's prediction of positive samples. Recall is the ratio of the correct positive samples predicted by the evaluation classifier to all positive samples. The larger the value, the higher the probability that the model will predict the correct positive samples. F1-score comprehensively evaluates Precision and Recall. The higher the value, the better the overall prediction performance of the model.
超参数设置:实验中将epoch=100,每个batch的大小为64,每个节点的向量表示的维度d=300,优化器选择Adam,基于特征线性调制的图嵌入学习算法的学习率为0.005,而基于自监督信号的可靠性度量方法的学习率为0.001;每种关系初始的采样数量pr均为30,强化学习更新策略中每次动作更新∈为2;节点向量更新模块中的图嵌入层数L=3,损失函数中的损失系数λ1,λ2,λ3分别为2、1、0.001。多层感知机中3层线性层的权重系数维度依次为R3d×d、RdX3d、Rd×2。Hyperparameter settings: In the experiment, epoch=100, the size of each batch is 64, the dimension of the vector representation of each node is d=300, the optimizer selects Adam, and the learning rate of the graph embedding learning algorithm based on feature linear modulation is 0.005 , and the learning rate of the reliability measurement method based on self-supervised signals is 0.001; the initial sampling number p r of each relationship is 30, and each action update ∈ in the reinforcement learning update strategy is 2; the graph in the node vector update module The number of embedding layers is L=3, and the loss coefficients λ 1 , λ 2 , and λ 3 in the loss function are 2, 1, and 0.001, respectively. The dimensions of the weight coefficients of the three linear layers in the multilayer perceptron are R 3d×d , R dX3d , and R d×2 in turn.
将本实施实例方法与5种方法进行对比:(1)Exact Name Match,如果待对齐实体对姓名完全匹配,则认为该两个待对齐实体为匹配;(2)SVM,使用专家姓名、从属机构、常出现的会议/期刊名、论文标题关键词和共同作者姓名这些属性的字符级4-gram相似度;(3)COSNET,将两个实体的属性作为局部因子,将实体对之间的关系作为相关因子,认为两个对齐的实体对应拥有相同的标签,使用一种因子图模型传播这种标签信息;(4)MEgo2Vec,挖掘潜在匹配的实体对,作为匹配ego网络的节点,使用一种多视图节点嵌入的方式建模不同属性的字面语义特征,并利用注意力机制区分不同邻居节点的影响,加以图的拓扑结构获得正则化后的结构嵌入;(5)LinKG,同样利用潜在匹配的实体对信息,然而其构建的网络节点依然为实体,而非实体对,其利用一种基于节点类型的多头注意力机制计算注意力权重,完成基于关系图注意力网络的节点向量更新。同时设计了两个消融实验:(1)本方法-无可靠性,仅使用基于特征线性调制的图嵌入学习算法;(2)本方法-无强化学习,在本方法的基础上去掉强化学习动态更新策略;分别验证基于特征线性调制的图嵌入学习算法、基于自监督信号的可靠性度量方法以及基于强化学习的节点采样数量更新策略对模型的贡献。表8展示了在OAG数据集上,本实施实例方法与其他对比方法的性能比较。The method of this embodiment is compared with 5 methods: (1) Exact Name Match, if the entity to be aligned matches the name completely, it is considered that the two entities to be aligned are matched; (2) SVM, using the name of the expert, the affiliation , character-level 4-gram similarity of attributes such as frequently-occurring conference/journal names, paper title keywords, and co-author names; (3) COSNET, which uses the attributes of two entities as local factors, the relationship between entity pairs As a correlation factor, two aligned entities are considered to have the same label correspondingly, and a factor graph model is used to propagate this label information; (4) MEgo2Vec, mining potential matching entity pairs, as the nodes of the matching ego network, using a The multi-view node embedding method models the literal semantic features of different attributes, and uses the attention mechanism to distinguish the influence of different neighbor nodes, and adds the topological structure of the graph to obtain the regularized structural embedding; (5) LinKG, also uses the potential matching Entity pair information, however, the network nodes constructed by it are still entities, not entity pairs. It uses a multi-head attention mechanism based on node type to calculate the attention weight and complete the node vector update based on the relationship graph attention network. At the same time, two ablation experiments are designed: (1) this method - no reliability, only uses the graph embedding learning algorithm based on feature linear modulation; (2) this method - no reinforcement learning, on the basis of this method, the reinforcement learning dynamic is removed Update strategy; respectively verify the contribution of the graph embedding learning algorithm based on feature linear modulation, the reliability measurement method based on self-supervised signal and the node sampling number update strategy based on reinforcement learning to the model. Table 8 shows the performance comparison between the method of this implementation example and other comparative methods on the OAG dataset.
表8 OAG数据集上各方法的对比实验结果Table 8 Comparative experimental results of each method on the OAG dataset
实验结果表明,本方法在三项评估指标上均明显优于5种对比方法,在F1值上得到至少2.78%的提升。通过本方法-无可靠性这一实验结果,其在F1值上较5 种对比方法至少提升2.38%,证明了基于特征线性调制的图嵌入学习算法的有效性。通过本方法-无强化学习与本方法-无可靠性的实验结果对比,前者在F1值上得到0.20%的提升,验证了基于自监督信号的可靠性度量方法的有效性。通过本方法与本方法-无强化学习的实验结果对比,前者在F1值上得到0.20%的提升,验证了基于强化学习的节点采样数量更新策略的有效性。The experimental results show that this method is significantly better than the five comparison methods in the three evaluation indicators, and the F1 value is improved by at least 2.78%. Through the experimental result of this method - no reliability, its F1 value is at least 2.38% higher than that of the five comparison methods, which proves the effectiveness of the graph embedding learning algorithm based on feature linear modulation. By comparing the experimental results of this method without reinforcement learning and this method without reliability, the former achieves a 0.20% improvement in the F1 value, which verifies the effectiveness of the reliability measurement method based on self-supervised signals. By comparing the experimental results of this method and this method without reinforcement learning, the former achieves a 0.20% improvement in the F1 value, which verifies the effectiveness of the node sampling number update strategy based on reinforcement learning.
以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本发明专利范围的限制。对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。The above-mentioned embodiments only represent several embodiments of the present invention, and the descriptions thereof are specific and detailed, but should not be construed as a limitation on the scope of the patent of the present invention. For those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can be made, which all belong to the protection scope of the present invention.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210060387.4A CN114819152B (en) | 2022-01-19 | 2022-01-19 | A graph embedding expert entity alignment method enhanced by reinforcement learning |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210060387.4A CN114819152B (en) | 2022-01-19 | 2022-01-19 | A graph embedding expert entity alignment method enhanced by reinforcement learning |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114819152A true CN114819152A (en) | 2022-07-29 |
CN114819152B CN114819152B (en) | 2025-04-18 |
Family
ID=82527359
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210060387.4A Active CN114819152B (en) | 2022-01-19 | 2022-01-19 | A graph embedding expert entity alignment method enhanced by reinforcement learning |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114819152B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115860135A (en) * | 2022-11-16 | 2023-03-28 | 中国人民解放军总医院 | Method, apparatus, and medium for solving heterogeneous federated learning using a super network |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020147594A1 (en) * | 2019-01-16 | 2020-07-23 | 阿里巴巴集团控股有限公司 | Method, system, and device for obtaining expression of relationship between entities, and advertisement retrieval system |
CN111931505A (en) * | 2020-05-22 | 2020-11-13 | 北京理工大学 | Cross-language entity alignment method based on subgraph embedding |
CN112800770A (en) * | 2021-04-15 | 2021-05-14 | 南京樯图数据研究院有限公司 | Entity alignment method based on heteromorphic graph attention network |
US20210216887A1 (en) * | 2020-01-14 | 2021-07-15 | Nec Laboratories America, Inc. | Knowledge graph alignment with entity expansion policy network |
-
2022
- 2022-01-19 CN CN202210060387.4A patent/CN114819152B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020147594A1 (en) * | 2019-01-16 | 2020-07-23 | 阿里巴巴集团控股有限公司 | Method, system, and device for obtaining expression of relationship between entities, and advertisement retrieval system |
US20210216887A1 (en) * | 2020-01-14 | 2021-07-15 | Nec Laboratories America, Inc. | Knowledge graph alignment with entity expansion policy network |
CN111931505A (en) * | 2020-05-22 | 2020-11-13 | 北京理工大学 | Cross-language entity alignment method based on subgraph embedding |
CN112800770A (en) * | 2021-04-15 | 2021-05-14 | 南京樯图数据研究院有限公司 | Entity alignment method based on heteromorphic graph attention network |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115860135A (en) * | 2022-11-16 | 2023-03-28 | 中国人民解放军总医院 | Method, apparatus, and medium for solving heterogeneous federated learning using a super network |
CN115860135B (en) * | 2022-11-16 | 2023-08-01 | 中国人民解放军总医院 | Heterogeneous federation learning method, equipment and medium based on super network |
Also Published As
Publication number | Publication date |
---|---|
CN114819152B (en) | 2025-04-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102814880B1 (en) | Methods and apparatuses for information processing, and information recommendation, electronic device, storage medium and computer program product | |
CN107608953B (en) | A word vector generation method based on variable-length context | |
KR102697095B1 (en) | Method, apparatus and computer program for buildding knowledge graph using qa model | |
CN113157957A (en) | Attribute graph document clustering method based on graph convolution neural network | |
CN107590139B (en) | Knowledge graph representation learning method based on cyclic matrix translation | |
CN117435715B (en) | A question-answering method based on auxiliary supervision signals to improve time-series knowledge graphs | |
CN113361627A (en) | Label perception collaborative training method for graph neural network | |
CN118966339A (en) | A multimodal knowledge graph fusion method, system, device and medium based on data enhancement | |
CN115114542A (en) | Object recommendation method, system, training method, medium and computer equipment | |
CN118334463A (en) | Adversarial knowledge distillation method, system and device for visual language model | |
Xie et al. | Heterogeneous graph contrastive learning for cold start cross-domain recommendation | |
CN114444694A (en) | An open world knowledge graph completion method and device | |
CN114936890A (en) | Counter-fact fairness recommendation method based on inverse tendency weighting method | |
CN119783037A (en) | Multi-source heterogeneous data fusion and processing method based on big data | |
CN113297385A (en) | Multi-label text classification model and classification method based on improved GraphRNN | |
Hu et al. | Large language model meets graph neural network in knowledge distillation | |
CN114819152A (en) | Graph embedding expert entity alignment method based on reinforcement learning enhancement | |
CN110083676B (en) | Short text-based field dynamic tracking method | |
CN115310594A (en) | Method for improving expandability of network embedding algorithm | |
CN115062123A (en) | Knowledge base question-answer pair generation method of conversation generation system | |
Wu et al. | Improving dynamic graph convolutional network with fine-grained attention mechanism | |
CN118865394A (en) | A method and system for optimizing large models of Wensheng graphs based on multi-objective optimization | |
Xue et al. | Deep reinforcement learning based ontology meta-matching technique | |
CN118673404A (en) | False news detection method based on self-supervision learning and propagation consistency | |
CN112966096A (en) | Cloud service discovery method based on multi-task learning |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |