An Entity Linking Method Based on Multi-view Distillation Enhancement

Through multi-view enhanced knowledge distillation technology, the problem that existing entity linking models are difficult to represent diverse entities is solved, and high-quality entity representation learning is realized for different contexts, which significantly improves the performance of the entity linking system.

CN118760772BActive Publication Date: 2025-04-01INSTITUTE OF INFORMATION ENGINEERING CHINESE ACADEMY OF SCIENCES
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410736212.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2025-04-01
Estimated Expiration
2044-06-07

AI Technical Summary

Technical Problem

Existing entity linking models have difficulty accurately representing semantic information fragments related to mentions within entities, especially for diverse and sparsely distributed entities, the current double tower encoder framework cannot represent this type of entity well.

Method used

A solid linking method based on multi-view enhancement knowledge distillation technology is proposed. Through technologies such as multi-view entity representation, multi-view distillation enhancement, joint training and strong negative example mining, diversified solid representations are learned to match mentions in different contexts.

Benefits of technology

Through multi-view distillation-enhanced entity representation learning framework MVD, the knowledge mentioned related parts in the entity can be effectively transferred from the teacher model to the student model, improving the performance of the entity recall model and significantly improving the overall performance of the entity link system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118760772B_ABST
    Figure CN118760772B_ABST
Patent Text Reader

Abstract

The present invention discloses an entity linking method based on multi-view distillation enhancement. The method includes: 1) multi-view entity representation: the original chapter-level text description of each entity is divided into multiple sentence-level views, each view is independently encoded through a language model, and a vector representation corresponding to each sentence view is obtained; a vector representation of a view that is most relevant to the mention is selected as the vector representation of the entity to avoid the introduction of information irrelevant to the mention into the entity representation; 2) multi-view distillation enhancement: after the fine-grained view representation is introduced, the correlation score distribution between the student model and the teacher model is aligned in two dimensions, the original entity level and the fine-grained view level, respectively, through the cross-alignment and self-alignment mechanisms, thereby promoting the fine-grained knowledge distillation from the teacher model to the student model. The present invention promotes the improvement of the overall performance of the entity linking system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of text information extraction, and specifically is an entity linking method based on multi-view enhanced knowledge distillation technology. Background Art

[0002] As the data on the Internet has expanded exponentially in recent years, these natural language data with high diversity and ambiguity have brought great challenges to people's acquisition of correct information. If the network data can be associated with a knowledge base such as DBpedia or YAGO that contains rich world knowledge, the relevant information in the knowledge base can be used to eliminate ambiguity in the text to help correctly understand the semantic information in the text, thereby achieving efficient processing of massive text data. Entity Linking (EL) is a key technology to solve this problem.

[0003] Entity linking is the process of mapping mentions in text to corresponding entities in the knowledge base. Entity is the basic unit in the knowledge base (KB) and an important language unit that carries information in text. Mention is a language fragment that expresses an entity in the text, which often appears in the context in the form of an alias or abbreviation of the entity. Since natural language itself is highly diverse and ambiguous, an entity may correspond to multiple mentions in different contexts, and each mention may correspond to multiple entities with the same name in the knowledge base, which is more obvious for some entities with higher frequency of occurrence. As a basic task in natural language processing (NLP), entity linking technology is widely used in knowledge-intensive downstream tasks, including information extraction, open domain question answering, knowledge graph construction, information retrieval, and knowledge-enhanced large language models (LLMs). By obtaining the corresponding attributes of the target entity from the external knowledge base, it provides entity-related data foundation and the association between entities for downstream tasks, thereby eliminating ambiguity in natural language to promote semantic understanding of text.

[0004] Mainstream entity linking systems follow the following two-stage paradigm: (1) Entity recall: efficiently and accurately retrieve a small number of candidate entities from a large-scale knowledge base; (2) Entity disambiguation: use a more accurate model to sort the recalled candidates to obtain the final target entity. In recent years, with the development of pre-trained language models (PLMs), deep representation learning technology based on supervised learning has been widely used in the entire process of entity linking. In the entity recall stage, the mainstream method is based on dense vector retrieval technology. Through a pre-trained language model with a dual-encoder structure, the text content of the mention and entity is encoded into a single fixed-dimensional dense vector, and then the correlation between the mention and the entity is modeled through lightweight interaction strategies such as dot products to meet the needs of quickly and accurately recalling candidate entities from a large-scale knowledge base. In the entity disambiguation stage, a pre-trained language model based on a cross-encoder structure is used to jointly encode the text content of the mention and its candidate entity, thereby modeling the deep contextual interaction between the two to obtain a more accurate relevance score, and finally sorting the target entity according to the relevance score.

[0005] Since mentions often appear in texts as aliases or abbreviations of entities, corresponding to parts of the entity text description, the main challenge in modeling the correlation between mentions and entities is how to accurately represent the mention-relevant part of the entity. Based on the diversity of internal information in the entity text content, we observed two different categories of entities: the key information in the first category of entities is homogeneous and evenly distributed in the text content (usually event-type entities), often corresponding to a single related mention, which can be accurately represented by a single fixed-dimensional dense vector; however, for entities with diverse internal information and sparsely distributed in different locations (usually person-type entities), their text descriptions can match multiple mentions in different contexts. Limited by the single-vector entity representation and coarse-grained mention-entity correlation modeling strategy, the current dual-tower encoder framework cannot well represent this type of entity. To solve this problem, some works have attempted to construct multi-vector entity representations to represent entities from different perspectives. Nevertheless, these methods still rely on coarse-grained entity-level supervision signals for training and lack the necessary supervision signals to select the most relevant entity representation for the corresponding mention from multiple entity vectors, making it impossible for the entity recall model to learn fine-grained entity representations that can match mentions in different contexts, thereby limiting the performance of the entity recall task and the overall entity linking system. Summary of the invention

[0006] To overcome the above challenges and enable the entity linking model to learn to obtain diverse entity representations to match mentions in different contexts, this patent proposes an entity representation learning framework MVD (Multi-View Enhanced Distillation) based on multi-view distillation enhancement. Based on the idea of ​​knowledge distillation, MVD can effectively transfer the knowledge of the mention-related parts of the entity from a more accurate teacher model to the entity recall model as a student to learn diverse entity representations. The teacher model is based on the structure of a cross encoder and jointly models the text content of mentions and entities. Compared with the student model that models mentions and entities separately based on a dual encoder structure, the calculated probability score will be more accurate. Each entity is divided into multiple views to avoid information unrelated to the mention being introduced into the entity representation. We further designed a cross-alignment and self-alignment mechanism for the framework to promote fine-grained knowledge distillation from the teacher model to the student model by aligning the mention-related entity representations between the cross encoder and the dual encoder.

[0007] In order to overcome the shortcomings of existing text keyword extraction and summary extraction technologies, such as low accuracy and recall, this paper proposes a novel pre-training and fine-tuning framework for multi-task learning of keyword extraction and summary extraction. A high-quality single-domain text annotated corpus with keywords and summaries is constructed.

[0008] The main contents of the present invention are:

[0009] 1) Multi-view entity representation: The original paragraph-level text description of each entity is divided into multiple sentence-level views, that is, each sentence in the text description of the entity constitutes a view, which is independently encoded by the language model to obtain the vector representation corresponding to each sentence view (i.e., sentence-level view representation); the vector representation of the view most relevant to the mention is selected as the vector representation of the entity to avoid introducing information irrelevant to the mention into the entity representation.

[0010] 2) Multi-view distillation enhancement: After introducing fine-grained view representation, the correlation score distribution between the student model and the teacher model is aligned in two dimensions, the original entity level and the fine-grained view level, through cross-alignment and self-alignment mechanisms, thereby promoting fine-grained knowledge distillation from the teacher model to the student model.

[0011] 3) Joint Training and Strong Negative Mining: Inspired by previous work, MVD jointly optimizes the student and teacher models during training and uses effective strong negative mining techniques to facilitate the transfer of knowledge that is difficult to train in distillation.

[0012] The technical solution of the present invention is:

[0013] A multi-view distillation-enhanced entity linking method, the steps of which include:

[0014] 1) Select a training set, where each training sample in the training set includes a mention and its corresponding K entities {e 1 ,e 2 ,…,e K} as a label, e i is the i-th entity, i=1~K; select a cross encoder as the teacher model, and select an entity recall model including a dual encoder structure as the student model;

[0015] 2) Training phase,

[0016] 21) Each entity e in each of the training samples i The text description is divided into multiple segments, and a view is constructed based on each segment j and the entity name t in the training sample. Then use the student model to analyze the view e j Text content Encode to get vector representation Using the teacher model to j Text content Encode to get vector representation j = 1, 2, .., n, where n is the total number of training sample segments;

[0017] 22) Using the student model to analyze the text content m of the training sample that mentions m enc Encode to obtain the vector representation E(m); according to the vector representation E(m) of m and view e j Vector representation of Calculate the mention m and view e j Relevance score Then calculate the number of mentions m and entities e in the training sample i The correlation score between Then, the teacher model is used to identify the text content m mentioned in the training sample. enc and entity e i Each view of j Text content Perform joint encoding to obtain the feature vector And input it into the linear layer for mapping to get the soft label As a supervision signal; using the teacher model to mention the text content m enc Encode to get vector representation E de (m), represents E according to the vector that mentions m de (m) and view e j Vector representation of Calculating relevance scores

[0018] 23) Calculate the cross alignment loss Self-alignment loss in, Mentions m and entities e calculated for the student model i Representative view of i ce Relevance score After the softmax operation, in the candidate entity list {e 1 ,e 2 ,…,e K}, Mentions m and entities e calculated for the teacher model i Representative view of i ce Relevance score After the softmax operation, in the candidate entity list {e 1 ,e 2 ,…,e K}Probability distribution on ; Mentions m and views calculated for the student model Relevance score After softmax operation, in all views The probability distribution on ; Mentions m and views calculated for the teacher model Relevance score After softmax operation, in all views Probability distribution over m; mentions m and representative views i encoded by the student model ce The vector representation of the correlation score is calculated Mentions m and representative views i encoded by the teacher model ce The vector representation of the correlation score is calculated

[0019] 24) According to the total loss function L total =L de +L ce +αL cross +βL self Optimize the teacher model and the student model; where L de To train the supervised learning loss of the student model using the training samples, L ce is the supervised learning loss for training the teacher model using training samples, and α and β are weights;

[0020] 3) In the application phase, the text description of each entity in the entity set ε is divided into multiple segments, a view is constructed according to each segment of the entity and the entity name of the entity, and then the view is encoded using the trained student model to obtain a vector representation of the corresponding view; for a target mention m', the target mention m' is encoded using the trained student model to obtain a vector representation E(m'), and the correlation between the vector representation E(m') and the vector representation of each view contained in each entity in the entity set ε is calculated, and the entities corresponding to the vector representations of multiple views with the highest correlation scores are selected as recall candidate entities of the target mention m', and then the entity link of the target mention m' is generated based on the recall candidate entities of the target mention m'.

[0021] Furthermore, view index

[0022] Furthermore, the dual encoder structure includes two BERT-structured language models, one of which is Enc m (·) is used to encode the mention m to obtain the vector representation E(m); another language model Enc e (·) for view e j Encode to get the vector representation E(e j ).

[0023] Furthermore, we use the entity recall model to retrieve the top-N candidate entities for mention m, and then randomly sample K negative examples {e 1 ,e 2 ,…,e K} as the label of the mention m and generate the training sample.

[0024] A server, characterized in that it comprises a memory and a processor, wherein the memory stores a computer program, the computer program is configured to be executed by the processor, and the computer program comprises instructions for executing each step in the above method.

[0025] A computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the above method when executed by a processor.

[0026] Compared with the existing methods, the positive effects of the present invention are:

[0027] This paper proposes a novel entity representation learning framework MVD based on multi-view distillation enhancement. MVD can better represent entities through multiple views of different granularities, and use the strong negative examples obtained by dynamic mining as information carriers during the training process to effectively transfer the knowledge of multiple fine-grained and mentioned related views from the more powerful cross encoder as the teacher model to the entity recall model with a dual encoder structure as the student model to improve its performance. This paper also designs cross-alignment and self-alignment mechanisms for the framework to promote fine-grained knowledge distillation from the teacher model to the student model. This paper conducts detailed experiments on several entity linking datasets based on Wikipedia and Wikidata knowledge bases. The results show that compared with previous baseline methods, the method proposed in this paper has achieved the best results on all entity linking benchmarks, and the improvement over the baseline is very significant, which proves that the method in this paper promotes the overall performance of the entity linking system by retrieving a high-quality candidate entity list in the recall stage. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 Schematic diagram of the learning framework and training process used in the present invention. DETAILED DESCRIPTION

[0029] The present invention is further described in detail below in conjunction with the accompanying drawings. The examples given are only used to explain the present invention but not to limit the scope of the present invention.

[0030] Task Definition

[0031] The present invention is mainly oriented to the entity linking task, which is defined as: for a given mention m and its corresponding context composed of text s= <c l ,m,c r >, the purpose is to obtain a large-scale entity set ε = {e 1 ,e 2 ,…,e N} to efficiently obtain the entities corresponding to the mention m, where each entity e is defined by its name t and description d. Since the recall stage in entity linking is more challenging than the disambiguation stage, and the quality of the recalled candidate entities strictly limits the upper limit of the disambiguation stage performance, the method proposed in this paper mainly focuses on the entity recall task in the first stage.

[0032] Multi-view entity representation

[0033] First, the text information of the entity is split into multiple fine-grained local views, so as to explicitly model the key information of the entity to match the mentions in different contexts. Specifically, the original paragraph-level text description d of each entity e is split into multiple different segments d at the sentence level granularity. j (j=1,2,..,n), and then concatenate each fragment with the entity name t to obtain the corresponding view e j (j=1,2,..,n).

[0034] Then, the entity recall model as the student model is composed of a dual-tower encoder Enc based on a language model such as BERT. m (·) and Enc e (·) respectively model the text content m that mentions m enc and each view e in entity e j Text content The corresponding vector representation is as follows:

[0035] E(m)=Enc m ([CLS]m enc [SEP])=Enc m ([CLS]c l [SEP]m[SEP]c r [SEP])#(1)

[0036]

[0037] Finally, the relevance score s(m,e) between mention m and entity e can be obtained by the vector representation of m and each view e j The score corresponding to the view with the highest score is selected as the final relevance score. The specific formula is as follows:

[0038] s(m,e)=max j {s(m,e j )}=max j {E(m)·E(e j )}#(3)

[0039] During recall, the fast nearest neighbor search technique can be used to retrieve all views with pre-calculated vector representations in the knowledge base, and map the views to their corresponding entities, thereby meeting the need to quickly and accurately recall candidate entities from a large-scale knowledge base.

[0040] Multi-view distillation enhancement

[0041] The overall structure of the training framework is as follows Figure 1 As shown in Figure 2, in order to learn diverse entity representations that can match different mentions, during the training process, we introduce a cross encoder Enc that is also based on BERT. ce (·) is used as the teacher model by analyzing the text content m that mentions m in Formula 1. enc and each view e of entity e in Formula 2 j Text content Joint encoding is performed to achieve deep contextual interaction between the two. The encoding formula is as follows:

[0042]

[0043] s(m,e j )=MLP(E(m,e j ))#(5)

[0044] The cross encoder as a teacher model can explicitly capture the content of the part of entity e related to the mention m and encode it into a vector E(m,e j ), and then a more accurate soft label s(m,e) is obtained through linear layer mapping. j ) as a supervisory signal to promote the student model to learn the fine-grained content inside the entity. Based on the fine-grained view-level supervisory signal generated by the cross encoder, the knowledge of the relevant parts of the entity mentioned can be transferred from the cross encoder to the dual encoder through knowledge distillation technology to learn diverse entity representations that can match different mentions. This paper further designs a cross-alignment and self-alignment mechanism for the framework to align the corresponding relevance score distributions from the original entity level and the fine-grained view level, respectively, thereby promoting fine-grained knowledge distillation from the teacher model to the student model.

[0045] Strong Negative Mining

[0046] Hard negatives are effective information carriers for conveying difficult knowledge during the distillation process. The mainstream techniques for generating hard negatives include static hard negatives and top-K dynamic hard negatives retrieved using the latest iteration of the recall model. These techniques may face the problem of unstable generated samples or generate pseudo-negatives (such as unlabeled positive examples in the dataset). To alleviate this problem, this paper adopts a simple but effective hard negative mining method. First, the entity recall model is used to retrieve the top-N candidate entities for mention m, and then K negative examples {e 1 ,e 2 ,…,e K} is used for training, thereby reducing the probability of generating false negative examples and improving the generalization ability of the entity recall model.

[0047] Cross alignment mechanism

[0048] The goal is to learn the entity-level relevance score distribution between candidate entities in the context of multi-view entity representation to accurately match the mentioned entities, so as to align the knowledge representation between mentions and entities and eliminate ambiguity. 1 ,e 2 ,…,e K Each entity e in i Corresponding multi-view representations Calculate the correlation between the two; the index of the mention-relevant view corresponding to the dual encoder and the cross encoder is calculated using the following formula:

[0049]

[0050] represents the mention-view correlation score calculated by the student model, which can be obtained by Formula 3; is the mention-view correlation score calculated by the teacher model, which can be obtained by Formula 5. In order to avoid the student model and the teacher model from mismatching entity e during training, i The representation is inconsistent (i de ≠i ce ), we align the entity representations between the two according to the mention-related views selected by the teacher model, i.e., entity e i View i selected by the teacher model ce To express, the cross alignment loss is calculated as follows:

[0051]

[0052] in and Mentions m and entities e calculated for the student model and teacher model respectively i Representative view of i ce Relevance score and After the softmax operation, in the entire candidate entity list {e 1 ,e 2 ,…,e K}, the softmax calculation formula is as follows:

[0053]

[0054] Self-aligning mechanism

[0055] The purpose is to learn the fine-grained view-level relevance score distribution within an entity in the context of multi-view entity representation, so as to distinguish between mention-related views and other mention-irrelevant views, and obtain more accurate, fine-grained entity representation. The self-alignment loss is calculated as follows:

[0056]

[0057] in and The mentions m and views calculated for the student model and the teacher model respectively Relevance score and After softmax operation, in all views The probability distribution on , the softmax calculation formula is as follows:

[0058]

[0059] The overall training loss function of MVD is defined as follows:

[0060] L total =L de +L ce +αL cross +βL self #(10)

[0061] Where L de and L ce are the supervised learning losses of the dual encoder as a student and the cross encoder as a teacher on the labeled data, and α and β are weights. The purpose is to 1 ,e 2 ,…,e K}, maximize the relevance score of mention m to the target entity e.

[0062] Implementation details

[0063] The training process can be divided into two stages: warm-up training and multi-view distillation training (MVDTraining). In warm-up training, this paper independently trains the student model of the dual encoder structure and the teacher model of the cross encoder structure based on the negative examples randomly sampled in the batch and the static strong negative examples; then in multi-view distillation training, the multi-view distillation loss proposed in this invention, i.e., formula 10, is used to jointly optimize the two models.

[0064] During the reasoning process, the present invention only uses the mention encoder part of the model to obtain the text representation of the mention, and then retrieves the candidate entities directly from the pre-computed view representation set through efficient nearest neighbor search technology. These view representations contain global views and local views, which are generated by entity encoders trained through the MVD framework. Although the size of the entity index may increase with the increase in the number of views, due to the widespread application of nearest neighbor search technology, the time complexity of retrieval can maintain a sub-linear relationship with the index size.

[0065] Experimental Evaluation

[0066] In the experimental stage, this paper selected an entity linking dataset ZESHEL based on Wikidata and three conventional entity linking datasets AIDA-CoNLL, WNED-CWEB and MSNB based on Wikipedia to evaluate the effect of MVD. ZESHEL follows the setting of zero-shot entity linking. The data and knowledge base in the training set and test set correspond to different fields and tasks respectively, and the intersection between the two is empty. There are 49,275 samples in the training set and 332,632 entities in the knowledge base; there are 10,000 samples in the test set and 70,140 entities in the knowledge base. The three conventional entity linking datasets AIDA-CoNLL, WNED-CWEB and MSNBC are based on the same general domain knowledge base Wikipedia, with a total of 5,903,530 entities, 18,317 samples in the training set, and 4,485, 10,392 and 678 samples in the test set, respectively.

[0067] This paper evaluates the effect of MVD on the one-stage entity recall task and the overall entity linking task. For the former, this paper uses Recall@K (R@K) as the evaluation indicator, which indicates the proportion of positive entities appearing in the Kth position and before in the candidate entity list; for the two-stage entity linking task of recall-disambiguation, this paper uses a cross encoder structure to sort the candidate entity sequence generated by the recall model trained by MVD, and selects the candidate with the highest score as the target entity. U.Acc. (Unnormalized Accuracy) is used as the evaluation indicator to indicate the accuracy of whether the target entity selected from the candidate entity list obtained by recall is a positive entity.

[0068] The experimental results are shown in Table 1 and Table 2. It can be seen that on all entity linking datasets, the MVD model proposed in this paper has surpassed all existing methods and achieved the best results. Compared with the best baseline model MuVER in the past, MVD has better results in all evaluation indicators, especially in R@1 (52.51%, +9.0%), which shows that in some scenarios, the method in this paper can retrieve the target entity directly in the one-stage recall process without going through the high computational overhead entity disambiguation stage. This further demonstrates the effect of MVD. MVD uses strong negative examples as information carriers during training, explicitly transferring knowledge from multiple fine-grained views from the teacher model to better represent entities that can match multiple different mentions, thereby generating higher quality candidate entities for the disambiguation stage.

[0069] Table 1 shows the entity recall effect of each model on the ZESHEL dataset

[0070] Model effect (%) R@1 R@2 R@4 R@8 R@16 R@32 R@50 R@64 BM25 - - - - - - - 69.26 BLINK 45.59 57.55 66.10 72.47 77.65 81.69 84.31 85.56 SOM - - - - - - - 89.62 MuVER 43.49 58.56 68.78 75.87 81.33 85.56 88.35 89.52 GER 42.86 - 66.48 73.00 78.11 82.15 84.41 85.65 MVD 52.51 64.77 73.43 79.74 84.35 88.17 90.43 91.55

[0071] Table 2 shows the entity recall effect of each model on the dataset based on Wikipedia knowledge base.

[0072]

[0073] This paper further evaluates the overall end-to-end entity linking performance on the ZESHEL dataset. This paper trains cross encoders based on BERT-base and BERT-large for the entity disambiguation stage, sorts the top-64 candidate entities obtained by MVD recall, selects the candidate with the highest score as the target entity, and counts the accuracy of whether the target entity is a labeled positive entity. As shown in Table 3, compared with the entity recall models of other methods, the entity recall model and entity disambiguation model trained based on the MVD framework achieved the best results in both stages, which shows that MVD can generate high-quality candidate entity lists for the entity disambiguation stage, thereby promoting the overall entity linking effect.

[0074] Table 3 shows the effect of MVD on the overall entity linking task

[0075] Model effect (%) U.Acc. BM25 55.08 BLINK (base model) 61.34 BLINK (large model) 63.03 SOM (base model) 65.39 SOM (large model) 67.14 MVD (base model) 66.85 MVD (large model) 67.84

[0076] Although the specific embodiments of the present invention are disclosed for the purpose of illustration, the purpose is to help understand the content of the present invention and implement it accordingly, those skilled in the art will understand that various substitutions, changes and modifications are possible without departing from the spirit and scope of the present invention and the appended claims. Therefore, the present invention should not be limited to the content disclosed in the best embodiment, and the scope of the present invention is subject to the scope defined in the claims.

Claims

1. A multi-view distillation enhanced entity linking method, the steps of which include: 1) Select a training set, where each training sample in the training set includes a mention and its corresponding K entities {e1, e2, …, e K } as a label, e i is the i-th entity, i=1~K; select a cross encoder as the teacher model, and select an entity recall model including a dual encoder structure as the student model; 2) Training phase, 21) Each entity e in each of the training samples i The text description is divided into multiple segments, and a view is constructed based on each segment j and the entity name t in the training sample. Then use the student model to analyze the view e j Text content Encode to get vector representation Using the teacher model to j Text content Encode to get vector representation j = 1, 2, .., n, where n is the total number of training sample segments; 22) Using the student model to analyze the text content m of the training sample that mentions m enc Encode to obtain the vector representation E(m); according to the vector representation E(m) of m and view e j Vector representation of Calculate the mention m and view e j Relevance score Then calculate the number of mentions m and entities e in the training sample i The correlation score between Then, the teacher model is used to identify the text content m mentioned in the training sample. enc and entity e i Each view of j Text content Perform joint encoding to obtain the feature vector And input it into the linear layer for mapping to get the soft label As a monitoring signal; Use the teacher model to analyze the text content m that mentions m enc Encode to get vector representation E de (m), represents E according to the vector that mentions m de (m) and view e j Vector representation of Calculating relevance scores 23) Calculate the cross alignment loss Self-alignment loss in, Mentions m and entities e calculated for the student model i Representative view of i ce Relevance score After the softmax operation, in the candidate entity list {e1,e2,…,e K }, Mentions m and entities e calculated for the teacher model i Representative view of i ce Relevance score After the softmax operation, in the candidate entity list {e1,e2,…,e K }Probability distribution on Mentions m and views calculated for the student model Relevance score After softmax operation, in all views The probability distribution on ; Mentions m and views calculated for the teacher model Relevance score After softmax operation, in all views Probability distribution over m; mentions m and representative views i encoded by the student model ce The vector representation of the correlation score is calculated Mentions m and representative views i encoded by the teacher model ce The vector representation of the correlation score is calculated 24) According to the total loss function L total =L de +L ce +αL cross +βL self Optimize the teacher model and the student model; where L de To train the supervised learning loss of the student model using the training samples, L ce is the supervised learning loss for training the teacher model using training samples, and α and β are weights; 3) In the application phase, the text description of each entity in the entity set ε is divided into multiple segments, a view is constructed according to each segment of the entity and the entity name of the entity, and then the view is encoded using the trained student model to obtain a vector representation of the corresponding view; for a target mention m', the target mention m' is encoded using the trained student model to obtain a vector representation E(m'), and the correlation between the vector representation E(m') and the vector representation of each view contained in each entity in the entity set ε is calculated, and the entities corresponding to the vector representations of multiple views with the highest correlation scores are selected as recall candidate entities of the target mention m', and then the entity link of the target mention m' is generated based on the recall candidate entities of the target mention m'.

2. The method according to claim 1, characterized in that View Index 3. The method according to claim 1, characterized in that: The dual encoder structure includes two BERT-structured language models, one of which is Enc m (·) is used to encode the mention m to obtain the vector representation E(m); another language model Enc e (·) for view e j Encode to get the vector representation E(e j ).

4. The method according to claim 1, 2 or 3, characterized in that: Use the entity recall model to retrieve the top-N candidate entities for the mention m, and then randomly sample K negative examples {e1,e2,…,e K } as the label of the mention m and generate the training sample.

5. A server, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, the computer program is configured to be executed by the processor, and the computer program comprises instructions for executing each step in the method according to any one of claims 1 to 4.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Entity relationship extraction method based on knowledge distillation

    CN112528034A

  • Document-level relation extraction method based on forward guidance knowledge distillation

    CN115640809A