Joint extraction of entities and relations based on multi-head self-attention mechanism and adversarial training
Extracting entities and relations is an important stage in the construction of the knowledge graph,with the goal of extracting pairs of entities that have semantic relationships with one another from a given text.To solve the problems of redundant relation prediction,overlapping entities and relations,and the inadequate capture of semantic information by prevalent methods for the joint extraction of entities and relations,we propose the fusion of a multi-head self-attention mechanism with adversarial training in this study to jointly extract entities and relations from texts.The proposed method uses a multi-head self-attention mechanism to capture the potential semantic features of the text and enhance the ability of the model to identify contextual semantic information.Adversarial training is introduced to the training of the model to enhance its robustness and capability for generalization.The results of experiments showed that the proposed model achieved higher values of the F1 score than prevalent models in the area on both the NYT and the WebNLG public datasets,and maintained stable performance when dealing with overlapping entities and relations as well as an indefinite number of triple extractions.This verifies the effectiveness of the proposed model.
joint extraction of entities and relationsadversarial trainingmulti-head self-attention mechanismknowledge graph