CN111897974B - Heterogeneous knowledge graph learning method based on multilayer attention mechanism - Google Patents

Heterogeneous knowledge graph learning method based on multilayer attention mechanism Download PDF

Info

Publication number
CN111897974B
CN111897974B CN202010807155.1A CN202010807155A CN111897974B CN 111897974 B CN111897974 B CN 111897974B CN 202010807155 A CN202010807155 A CN 202010807155A CN 111897974 B CN111897974 B CN 111897974B
Authority
CN
China
Prior art keywords
instance
path
meta
knowledge graph
heterogeneous knowledge
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.)
Active
Application number
CN202010807155.1A
Other languages
Chinese (zh)
Other versions
CN111897974A (en
Inventor
杨博
刘丁菠
张钰雪晴
彭羿达
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jilin University
Original Assignee
Jilin University
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 Jilin University filed Critical Jilin University
Priority to CN202010807155.1A priority Critical patent/CN111897974B/en
Publication of CN111897974A publication Critical patent/CN111897974A/en
Application granted granted Critical
Publication of CN111897974B publication Critical patent/CN111897974B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Animal Behavior & Ethology (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a heterogeneous knowledge graph learning method based on a multilayer attention mechanism, which comprises the following steps: and (3) a step of: mapping various types of examples in the heterogeneous knowledge graph into a unified feature space, and respectively learning importance degrees of the examples under different element path views through local level attention; and II: the importance of each meta-path view is learned through global level attention mechanics, and embedded features of the instance under each meta-path view are fused; thirdly,: calculate the loss and perform end-to-end optimization. The method utilizes abundant structural features and example features in the heterogeneous knowledge graph, calculates the influence of different examples related to the heterogeneous knowledge graph on the heterogeneous knowledge graph for each example through the interaction of a local and global level attention mechanism, and simultaneously characterizes the importance of different element path views on example representation, so that the fusion problem of the example representation under different views is guided, more discriminative features are learned, and the quality of the heterogeneous knowledge graph in the process of performing tasks such as classification, connection prediction and the like is improved.

Description

Heterogeneous knowledge graph learning method based on multilayer attention mechanism
Technical Field
The invention relates to a heterogeneous knowledge graph learning method based on a multi-layer attention mechanism.
Background
The knowledge graph can be used as an information carrier to conveniently store various entities and the relation among the entities. In the knowledge graph, the relation between the entities corresponds to the relation between words and word contexts in natural language, so that the network structure of the knowledge graph can be regarded as a natural language, the semantic-level information is used for carrying out dimension reduction representation on the entities in the knowledge graph to obtain low-dimension embedded vectors, and the low-dimension embedded vectors are applied to tasks such as classification, clustering, connection prediction and the like, so that the actual value of the low-dimension embedded vectors is obtained. There are currently a series of work that can learn a low-dimensional representation for network architecture, such as the random walk-based approach with deep walk, LINE, node2vec, matrix decomposition-based approach, deep neural network-based approach. These works can automatically learn features for examples therein based on network structure, but they focus only on homogeneous networks, while many types of examples are usually in knowledge maps in the real world, and embedding methods based on homogeneous networks ignore important information contained in other types of examples. If other types of instance information are considered to enrich the content of the network representation, a more suitable representation method can be learned for the network, which is based on the advantage of the heterogeneous knowledge graph representation learning method. The heterogeneous knowledge graph representation learning method mainly focuses on the preservation of structural information based on element paths, meta 2vec designs a random walk method based on element paths, a skip-gram model is utilized to obtain the embedding of examples in the heterogeneous knowledge graph, but meta 2vec only can utilize one element path, and other useful information can be possibly ignored. The HIN2VEC may learn representation vectors for instances and relationships simultaneously; the PME maps different types of instances to the same space and then obtains similarities between the instances through euclidean distances. None of these approaches take into account the attention mechanism problem in heterogeneous knowledge graph representation problems.
Disclosure of Invention
The invention aims to provide a heterogeneous knowledge graph learning method based on a multi-layer attention mechanism, which integrates the structural characteristics of examples in a network under local level and global level attention and solves the problem of hierarchical integration of attention mechanisms in the problem of heterogeneous knowledge graph representation, which is not considered in the prior art.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
a heterogeneous knowledge graph learning method based on a multi-layer attention mechanism is characterized by comprising the following steps:
step one: mapping various types of examples in the heterogeneous knowledge graph into a unified feature space, and learning the weight of the related example to which each example is connected according to a specific element path through local level attention;
step two: the weight of each element path is learned through global level attention combination, and the examples under different element path views are fused according to the weight for embedding;
step three: calculating loss and performing end-to-end optimization;
the core idea is as follows: modeling heterogeneous knowledge graph structural features using local and global level attention mechanisms;
given instance i and the corresponding meta-path, consider the relevant instance of instance i to be all instances in the heterogeneous knowledge-graph that it is connected to through the meta-path;
the meta-path represents the connection mode of different types of examples under various types of relations, and is recorded asWherein->Representing example V 1 To example V l A composite relationship between them.
As a further description of the above technical solution:
the first specific step is as follows:
1) By a specific conversion matrixMapping different types of instances to the same space:
x i and x' i Representing the original features and the mapped features of instance i, respectively;
2) Learning the importance of each instance using a self-attention mechanism, we can notice the importance of instance j to instance i by local level attention mechanics, assuming instance i is connected to instance j by a meta-path, i.e., instance j is the relevant instance of instance i
The above formula represents the feature x 'according to two examples' i ,x' j The importance of the instance j for the instance i under the specific meta-path mode phi is drawn, and the weight of each related instance is calculated respectively;
the weight values of the relevant instances are then mapped to the (0, 1) interval based on the softmax function:
3) The related examples of the current example in each meta-path mode are integrated by combining the weights, and the related examples are expressed:
the projection characteristics and weight coefficients of all relevant examples of the example i in the meta-path view phi are aggregated, so that the representation of the example i in the meta-path view phi can be obtained:
assume that heterogeneous knowledge-graph has a set of meta-paths { phi } 01 ,…,φ P The operation of obtaining the instance information is carried out once for each view formed by each element path, so as to obtain the embedded representation set of the instance relative to each element path view
As a further description of the above technical solution:
the second step comprises the following steps:
taking the example embedded feature as input, learning importance weights of each element path based on a global level attention mechanism:
att in the above global (. Cndot.) represents a deep neural network that performs global level attention;
the specific operation is as follows:
5) Transforming the instance representation under the particular element path by nonlinear transformation;
6) Measuring the similarity between each converted instance representation and the element path attention vector q;
7) Averaging the similarity to obtain importance weight of each element pathThe calculation formula is as follows:
8) Normalization using a softmax function to obtain each meta-path φ i Importance weight of (2)To->As coefficients, the example representations under the different meta-path views are fused:
as a further description of the above technical solution:
the third specific steps are as follows:
1) After obtaining the instance embedded vector fusing the multiple meta-path information, for the instance classification task, a cross entropy function is used as a loss function:
wherein C is a parameter of the classifier, Y is a real label of the instance, and Z is an embedding vector of the instance;
2) An embedded representation of the back-propagation optimization instance is made based on this loss function.
The invention has at least the following beneficial effects:
by utilizing abundant structural features and example features in the heterogeneous knowledge graph, the influence, namely the importance degree, of different examples related to the heterogeneous knowledge graph is calculated for each example through the interaction of a local and global level attention mechanism, meanwhile, the importance of different meta-path views for example representation is also described, and the fusion problem of the example representation under different views is guided according to the importance of the meta-path, so that more discriminant features are learned for the examples in the heterogeneous knowledge graph, and the quality of the examples in the process of performing tasks such as classification, connection prediction and the like is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 shows a flow diagram provided in accordance with an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Example 1
Referring to fig. 1, a heterogeneous knowledge graph learning method based on a multi-layer attention mechanism includes the following steps:
step one: mapping various types of examples in the heterogeneous knowledge graph into a unified feature space, and learning the weight of the related example to which each example is connected according to a specific element path through local level attention;
aggregating information about the relevant instance of an instance may have a positive effect on learning the embedded representation of this instance, as its relevant instance typically has a similar structure and function as it; but the importance of different related instances is different, for example, if there is a related instance with a larger degree, then this instance may be less important because of the loss of generality, so we introduce a local level attention mechanism to understand the importance of the related instance of each instance in the heterogeneous knowledge graph, and aggregate the embedded representations of the more important related instances to form the embedded representation vector of the current instance;
1) By a specific conversion matrixMapping different types of instances to the same space:
x i and x' i Representing the original features and the mapped features of instance i, respectively;
2) Learning the importance of each instance using a self-attention mechanism, we can notice the importance of instance j to instance i by local level attention mechanics, assuming instance i is connected to instance j by a meta-path, i.e., instance j is the relevant instance of instance i
The above formula represents the feature x 'according to two examples' i ,x' j The importance of the instance j for the instance i under the specific meta-path mode phi is drawn, and the weight of each related instance is calculated respectively;
the weight values of the relevant instances are then mapped to the (0, 1) interval based on the softmax function:
3) The related examples of the current example in each meta-path mode are integrated by combining the weights, and the related examples are expressed:
the projection characteristics and weight coefficients of all relevant examples of the example i in the meta-path view phi are aggregated, so that the representation of the example i in the meta-path view phi can be obtained:
assume that heterogeneous knowledge-graph has a set of meta-paths { phi } 01 ,…,φ P The operation of obtaining the instance information is carried out once for each view formed by each element path, so as to obtain the embedded representation set of the instance relative to each element path view
Step two: the weight of each element path is learned through global level attention combination, and the instance embedding under the semantics of each element path is fused according to the weight;
each instance in the heterogeneous knowledge graph is connected with other types of instances through various meta-paths; therefore, the information of the multiple element paths is fused, so that better representation can be learned for the examples in the heterogeneous knowledge graph;
taking the example embedded feature as input, learning importance weights of each element path based on a global level attention mechanism:
att in the above global (. Cndot.) represents a deep neural network that performs global level attention;
the specific operation is as follows:
1) Transforming the instance representation under the particular element path by nonlinear transformation;
2) Measuring the similarity between each converted instance representation and the element path attention vector q;
3) Averaging the similarity to obtain importance weight of each element pathThe calculation formula is as follows:
4) Normalization using a softmax function to obtain each meta-path φ i Importance weight of (2)To->As coefficients, the example representations under the different meta-path views are fused:
step three: calculating loss and performing end-to-end optimization;
1) After obtaining the instance embedded vector fusing the multiple meta-path information, for the instance classification task, a cross entropy function is used as a loss function:
wherein C is a parameter of the classifier, Y is a real label of the instance, and Z is an embedding vector of the instance;
2) An embedded representation of the back-propagation optimization instance is made based on this loss function.
The core idea is as follows: modeling heterogeneous knowledge graph structural features using local and global level attention mechanisms;
given instance i and the corresponding meta-path, consider the relevant instance of instance i to be all instances in the heterogeneous knowledge-graph that it is connected to through the meta-path;
the meta-path represents that different types of instances are connected by different types of edgesThe pattern of (2) is recorded asWherein->R l Representing example V 1 To example V l A composite relationship between the two; for example meta-path->Representing two authors writing a paper together, meta-pathThe papers that represent two authors were published are recorded by one journal.
Working principle: for example, to represent a heterogeneous knowledge graph of paper-author-meeting, first two meta-paths of author-paper-author, author-paper-meeting-paper-author are extracted, each type of instance (paper, author, meeting) is mapped into the same feature space, and then the weight of the relevant instance of each instance is learned using local level attentiveness mechanism; the importance of the two element paths on the instance is learned by using a global level attention mechanism, namely the weight of the element paths, the embedding characteristics of the instance learned by different element paths are fused, and finally the loss is calculated; through interaction of the local and global level attention mechanisms, importance degrees of different examples can be distinguished, importance of different element paths can be distinguished, more discriminative characteristics are learned for examples, and quality of example representation in tasks such as classification, connection prediction and the like can be improved.
The foregoing has shown and described the basic principles, principal features and advantages of the invention. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, and that the above embodiments and descriptions are merely illustrative of the principles of the present invention, and various changes and modifications may be made therein without departing from the spirit and scope of the invention, which is defined by the appended claims. The scope of the invention is defined by the appended claims and equivalents thereof.

Claims (3)

1. A heterogeneous knowledge graph learning method based on a multi-layer attention mechanism is characterized by comprising the following steps:
step one: mapping various types of examples in the heterogeneous knowledge graph into a unified feature space, and learning the weight of the related example to which each example is connected according to a specific element path through local attention;
step two: the weight of each element path is learned through global level attention combination, and the examples under different element path views are fused according to the weight for embedding;
step three: calculating loss and performing end-to-end optimization;
the core idea is as follows: modeling heterogeneous knowledge graph structural features using local and global level attention mechanisms;
given instance i and the corresponding meta-path, consider the relevant instance of instance i to be all instances in the heterogeneous knowledge-graph that it is connected to through the meta-path;
the meta-path represents the connection mode of different types of examples under various types of relations, and is recorded asWherein->Representing example V 1 To example V l A composite relationship between the two;
the first specific step is as follows:
1) By a specific conversion matrixMapping different types of instances to the same space:
x i and x' i Representing the original features and the mapped features of instance i, respectively;
2) Learning the importance of each instance using a self-attention mechanism, we can learn the importance of instance j to instance i by locally attention mechanics, assuming instance i is connected to instance j by a meta-path, i.e., instance j is the relevant instance of instance i
The above formula represents the feature x 'according to two examples' i ,x j ' the importance of the instance j to the instance i under the specific meta-path mode phi is described, and the weight of each related instance is calculated respectively;
the weight values of the relevant instances are then mapped to the (0, 1) interval based on the softmax function:
3) The related examples of the current example in each meta-path mode are integrated by combining the weights, and the related examples are expressed:
the projection characteristics and weight coefficients of all relevant examples of the example i in the meta-path view phi are aggregated, so that the representation of the example i in the meta-path view phi can be obtained:
assume that heterogeneous knowledge-graph has a set of meta-paths { phi } 01 ,…,φ P The operation of obtaining the instance information once is carried out for the view formed by each element path, and the instance is obtained relative to each elementEmbedded representation sets under path views
2. The heterogeneous knowledge graph learning method based on a multi-layer attention mechanism according to claim 1, wherein the importance weight of each element path is learned based on a global level attention mechanism by taking an instance embedded feature as an input:
att in the above global (. Cndot.) represents a deep neural network that performs global level attention;
the specific operation is as follows:
1) Transforming the instance representation under the particular element path by nonlinear transformation;
2) Measuring the similarity between each converted instance representation and the element path attention vector q;
3) Averaging the similarity to obtain importance weight of each element pathThe calculation formula is as follows:
4) Normalization using a softmax function to obtain each meta-path φ i Importance weight of (2)To->As coefficients, the example representations under the different meta-path views are fused:
3. the heterogeneous knowledge graph learning method based on a multi-layer attention mechanism of claim 1, wherein the third specific steps are as follows:
1) After obtaining the instance embedded vector fusing the multiple meta-path information, for the instance classification task, a cross entropy function is used as a loss function:
wherein C is a parameter of the classifier, Y is a real label of the instance, and Z is an embedding vector of the instance;
2) An embedded representation of the back-propagation optimization instance is made based on this loss function.
CN202010807155.1A 2020-08-12 2020-08-12 Heterogeneous knowledge graph learning method based on multilayer attention mechanism Active CN111897974B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010807155.1A CN111897974B (en) 2020-08-12 2020-08-12 Heterogeneous knowledge graph learning method based on multilayer attention mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010807155.1A CN111897974B (en) 2020-08-12 2020-08-12 Heterogeneous knowledge graph learning method based on multilayer attention mechanism

Publications (2)

Publication Number Publication Date
CN111897974A CN111897974A (en) 2020-11-06
CN111897974B true CN111897974B (en) 2024-04-16

Family

ID=73228936

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010807155.1A Active CN111897974B (en) 2020-08-12 2020-08-12 Heterogeneous knowledge graph learning method based on multilayer attention mechanism

Country Status (1)

Country Link
CN (1) CN111897974B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112417314A (en) * 2020-11-26 2021-02-26 清华大学 Social network suicidal ideation detection method and system
CN113094484A (en) * 2021-04-07 2021-07-09 西北工业大学 Text visual question-answering implementation method based on heterogeneous graph neural network
CN113191539B (en) * 2021-04-15 2022-03-15 电子科技大学 High-density composite scene track prediction method based on heterogeneous graph aggregation network
CN113312500B (en) * 2021-06-24 2022-05-03 河海大学 Method for constructing event map for safe operation of dam
CN114519097B (en) * 2022-04-21 2022-07-19 宁波大学 Academic paper recommendation method for heterogeneous information network enhancement

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110334219A (en) * 2019-07-12 2019-10-15 电子科技大学 The knowledge mapping for incorporating text semantic feature based on attention mechanism indicates learning method
WO2020143137A1 (en) * 2019-01-07 2020-07-16 北京大学深圳研究生院 Multi-step self-attention cross-media retrieval method based on restricted text space and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10366166B2 (en) * 2017-09-07 2019-07-30 Baidu Usa Llc Deep compositional frameworks for human-like language acquisition in virtual environments

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020143137A1 (en) * 2019-01-07 2020-07-16 北京大学深圳研究生院 Multi-step self-attention cross-media retrieval method based on restricted text space and system
CN110334219A (en) * 2019-07-12 2019-10-15 电子科技大学 The knowledge mapping for incorporating text semantic feature based on attention mechanism indicates learning method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于注意力模型的混合学习算法;杨博, 苏小红, 王亚东;软件学报;20050630(第06期);全文 *

Also Published As

Publication number Publication date
CN111897974A (en) 2020-11-06

Similar Documents

Publication Publication Date Title
CN111897974B (en) Heterogeneous knowledge graph learning method based on multilayer attention mechanism
CN111291212B (en) Zero sample sketch image retrieval method and system based on graph convolution neural network
CN111488734B (en) Emotional feature representation learning system and method based on global interaction and syntactic dependency
CN111709518A (en) Method for enhancing network representation learning based on community perception and relationship attention
CN111538835B (en) Social media emotion classification method and device based on knowledge graph
CN112347268A (en) Text-enhanced knowledge graph joint representation learning method and device
CN113312452B (en) Chapter-level text continuity classification method based on multi-task learning
CN113095439A (en) Heterogeneous graph embedding learning method based on attention mechanism
CN112800222B (en) Multi-task auxiliary limit multi-label short text classification method using co-occurrence information
CN112417063B (en) Heterogeneous relation network-based compatible function item recommendation method
Ren et al. Multiple Instance Visual-Semantic Embedding.
CN116204706A (en) Multi-mode content retrieval method and system for text content and image analysis
CN113761250A (en) Model training method, merchant classification method and device
CN112597766A (en) Noisy semi-supervised text classification method based on BERT-base network
CN113780003A (en) Cross-modal enhancement method for space-time data variable-division encoding and decoding
CN116362245A (en) OPC UA information model construction method based on unstructured text data
CN114004220A (en) Text emotion reason identification method based on CPC-ANN
CN114241606A (en) Character interaction detection method based on adaptive set learning prediction
CN112035689A (en) Zero sample image hash retrieval method based on vision-to-semantic network
CN113128667B (en) Cross-domain self-adaptive graph rolling balance migration learning method and system
CN116186350A (en) Power transmission line engineering searching method and device based on knowledge graph and topic text
CN115631504A (en) Emotion identification method based on bimodal graph network information bottleneck
CN113435190B (en) Chapter relation extraction method integrating multilevel information extraction and noise reduction
CN114219089A (en) Construction method and equipment of new-generation information technology industry knowledge graph
CN113705195A (en) Sentence continuity checking method

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