Search

CN-121998082-A - Knowledge enhancement and evidence guidance based document level relation extraction method and system

CN121998082ACN 121998082 ACN121998082 ACN 121998082ACN-121998082-A

Abstract

The invention discloses a document-level relation extraction method and system based on knowledge enhancement and evidence guidance, and belongs to the technical field of natural language processing and information extraction. The invention mainly works cooperatively through three core modules, namely a document map enhancement module constructs a hierarchical heterogram and fuses common-finger analysis to strengthen semantic representation, a knowledge enhancement module introduces an external knowledge base and adopts a confidence filtering mechanism to reduce knowledge noise, and a evidence guiding reasoning module realizes multi-hop reasoning through axial attention and evidence supervision, so that the technical problems of the existing method that reasoning capacity is distributed and modeling, knowledge integration noise is large, evidence guiding is insufficient and long-range dependency capturing capacity is limited are solved. Experiments show that the method can effectively capture inter-sentence dependence, inhibit knowledge noise and improve multi-hop reasoning stability, and can be widely applied to the scenes such as knowledge graph construction, intelligent question-answering, information retrieval and the like.

Inventors

  • ZHANG YIJIA
  • CHEN CHENGBIN
  • LIU ZHI

Assignees

  • 大连海事大学

Dates

Publication Date
20260508
Application Date
20251230

Claims (8)

  1. 1. A knowledge enhancement and evidence guided document level relationship extraction method, comprising the steps of: acquiring a document to be processed, wherein the document comprises a sentence set and an entity set, and each entity corresponds to at least one mention; Sending the document to be processed into an encoder for semantic coding, constructing a hierarchical heterogram based on the semantic coding of the document, and optimizing the semantic representation of the entity by combining with co-instruction analysis; searching an external knowledge base to acquire knowledge triples of entity pairs by taking entity nodes subjected to common-finger analysis optimization in the heterograms as a reference, screening effective knowledge triples based on a confidence coefficient filtering mechanism, and updating entity representations; calculating evidence distribution of entity pairs based on entity representations after document semantic coding, and performing multi-hop reasoning by utilizing an axial attention mechanism based on the evidence distribution to obtain context enhancement representation of the entity pairs, wherein the axial attention mechanism takes semantic information fused by the entity representations of different patterns and external knowledge as input, and realizes multi-hop reasoning of cross entity pairs through row and column bidirectional self-attention; and performing end-to-end training on the model based on the combined training target, and outputting the entity-relation triplet.
  2. 2. The method of claim 1, wherein constructing a hierarchical iso-graph based on semantic coding of a document in combination with co-fingering optimizes semantic representations of entities, comprises: encoding the document by using a pre-training language model to obtain token embedding and a cross attention matrix; The construction node types comprise mention nodes, sentence nodes and document nodes, and the edge types comprise document-sentence edges, sentence-sentence edges, mention-sentence edges, co-occurrence mention-mention edges and hierarchical heterograms of co-reference mention-mention edges; Calculating the importance of the edges by using the graph annotation force network, and updating the node representation after normalization by softmax; and identifying co-reference words in the document by adopting a pre-trained co-reference analytic model, and enhancing semantic representation by using the attention moment array.
  3. 3. The method according to claim 1 or 2, wherein the co-fingering uses a pre-trained language model coref-spanbert-large, and the semantic representation of the co-fingering is updated by an attention matrix, which is a token-level attention weight matrix output by the pre-trained language model.
  4. 4. The method of claim 1, wherein retrieving the knowledge triples of the external knowledge base acquisition entity pairs comprises: Acquiring a standard identifier of an entity in the knowledge base through an interface of an external knowledge base; querying a relation triplet among the entities, and adding the retrieved effective relation as a new edge into the graph to form a knowledge enhancement graph structure.
  5. 5. The method of claim 1, wherein filtering the valid knowledge triples based on a confidence filtering mechanism, updating the entity representation, comprises: Calculating confidence weights for each knowledge edge, and carrying out normalization processing through a sigmoid function, wherein only triples with confidence degrees higher than a threshold value are reserved to participate in subsequent calculation; the confidence is optimized through trust loss, and noise influence is reduced.
  6. 6. The method of claim 1, wherein computing an evidence distribution of an entity pair based on the semantically encoded entity representation of the document, and wherein performing multi-hop reasoning using an axial attention mechanism based on the evidence distribution results in a context-enhanced representation of the entity pair, comprises: for each entity pair, calculating token-level importance weights based on the attention vectors of the entity pairs, and aggregating the token-level importance weights into sentence-level evidence distribution; Utilizing KL divergence loss function, marking evidence distribution as a supervision signal, and restraining predicted evidence distribution; merging the context information to generate an enhanced entity pair representation; through an axial attention mechanism, self-attention computation is performed on the row dimension and the column dimension of the tensor along the entity respectively to perform multi-hop reasoning, so that a final context enhancement representation is obtained.
  7. 7. The method of claim 1, wherein the goals of the joint training include relationship classification loss, knowledge confidence loss, and evidence supervision loss, the relationship classification loss employing an adaptive threshold loss function to distinguish between valid and invalid relationships for each entity to dynamic learning.
  8. 8. A knowledge enhancement and evidence guided document level relationship extraction system comprising: the document acquisition module is used for acquiring a document to be processed, wherein the document comprises a sentence set and an entity set, and each entity corresponds to at least one mention; the document map enhancement module is used for constructing a hierarchical heterogram based on semantic coding of the document and optimizing semantic representation of the entity by combining co-fingering analysis; The knowledge enhancement module is used for searching an external knowledge base to acquire knowledge triples of entity pairs by taking entity nodes subjected to common-finger analysis optimization in the heterogeneous graph as a reference, screening effective knowledge triples based on a confidence level filtering mechanism, and updating entity representations; The evidence guiding reasoning module is used for calculating evidence distribution of entity pairs based on entity representation after document semantic coding, and carrying out multi-hop reasoning by utilizing an axial attention mechanism based on the evidence distribution to obtain context enhancement representation of the entity pairs; And the training module is used for carrying out end-to-end training on the model based on the combined training target and outputting an entity-relation triplet.

Description

Knowledge enhancement and evidence guidance based document level relation extraction method and system Technical Field The invention belongs to the technical field of natural language processing and information extraction, and particularly relates to a document-level relation extraction method and system based on knowledge enhancement and evidence guidance. Background With the explosive growth of internet information, massive unstructured text data such as news stories, scientific research papers, medical records, judicial documents, enterprise announcements, social media content and the like are generated in various fields of society. The texts contain rich entities and relation information thereof, and are important bases for constructing intelligent applications such as knowledge maps, intelligent retrieval, question-answering systems, risk early warning, decision support and the like. In order to mine structured relationship information from unstructured text, researchers have proposed a relationship extraction (Relation Extraction, RE) technique whose core goal is to identify semantic associations between entities in text. Most conventional relation extraction methods are based on sentence-level analysis, i.e. it is assumed that both entities and their relations appear in the same sentence. However, with the expansion of application requirements, this assumption has been difficult to meet the complexity of the actual scenario, so in recent years, document-level relation extraction (Document-level Relation Extraction, docRE) tasks are proposed, which require a model to synthesize the context information of the whole Document, and identify the entity relation across sentences and even paragraphs. Despite some progress in the direction of document-level relationship extraction, most current approaches still have significant limitations. For example, the graph-based method only relies on internal signals of documents to construct entities/mention graphs, ignores the supplement of external common sense knowledge to implicit relations, and the partial knowledge enhancement method introduces an external knowledge base, but mostly regards knowledge injection as preprocessing or feature splicing steps, does not dynamically screen effective knowledge in training, the evidence guidance type method usually takes 'supporting sentence extraction' as an auxiliary task, has weak coupling with relation classification, and cannot effectively guide a model to focus on related texts of the relations, and in addition, the traditional self-attention mechanism has the problems of high calculation cost and insufficient entity-level interactive modeling when processing long documents, and is difficult to capture the entity association across multiple sentences efficiently. In summary, the existing model has defects in the aspects of reasoning modeling, knowledge integration, evidence guidance, long-range dependency capture and the like, so that the performance of the existing model in the tasks of long-document reasoning and implicit relation detection is poor. Therefore, there is a need in the art for a unified framework to coordinate multiple inference capabilities to improve the accuracy and robustness of relationship extraction. Disclosure of Invention In view of the above, the invention provides a document-level relation extraction method and a system based on knowledge enhancement and evidence guidance, which are used for solving the technical problems of the existing document-level relation extraction method in the aspects of decentralized modeling of reasoning capacity, large knowledge integration noise, insufficient evidence guidance, limited long-range dependency capturing capacity and the like. The technical scheme adopted by the invention is as follows: In one aspect, the invention provides a knowledge enhancement and evidence guided document level relation extraction method, comprising the following steps: acquiring a document to be processed, wherein the document comprises a sentence set and an entity set, and each entity corresponds to at least one mention; Sending the document to be processed into an encoder for semantic coding, constructing a hierarchical heterogram based on the semantic coding of the document, and optimizing the semantic representation of the entity by combining with co-instruction analysis; searching an external knowledge base to acquire knowledge triples of entity pairs by taking entity nodes subjected to common-finger analysis optimization in the heterograms as a reference, screening effective knowledge triples based on a confidence coefficient filtering mechanism, and updating entity representations; calculating evidence distribution of entity pairs based on entity representations after document semantic coding, and performing multi-hop reasoning by utilizing an axial attention mechanism based on the evidence distribution to obtain context enhancement representation of the entity pairs, w