B i SPN : Generating Entity Set and Relation Set Coherently in One Pass (2023)

Abstract: By modeling the interaction among instances and avoiding error propagation, Set Prediction Networks (SPNs) achieve state-of-the-art performance on the tasks of named entity recognition and relation triple extraction respectively. However, how to jointly extract entities and relation triples via SPNs remains an unexplored problem, where the main challenge is the maintenance of coherence between the predicted entity/relation sets during one-pass generation. In this work, we present Bipartite Set Prediction Network (BiSPN), a novel joint entity-relation extraction model that can efficiently generate entity set and relation set in parallel. To overcome the challenge of coherence, BiSPN is equipped with a novel bipartite consistency loss as well as an entity-relation linking loss during training. Experiments on three biomedical/clinical datasets and a general-domain dataset show that BiSPN achieves new state of the art in knowledge-intensive scene and performs competitively in general-domain, while being more efficient than two-stage joint extraction methods.

## introduction extracting entities and relation triples from text is a fundamental task of information extraction. there have been many efforts that decompose the problem into separate tasks, i.e. named entity recognition (ner) and relation triple extraction (re), and solve them respectively. among these efforts, set prediction networks (spns) have demonstrated state-of-the-art performance on ner @xcite and re @xcite . typically, spns leverage a set of learnable queries to model the interaction among instances (entities or relation triples) via attention mechanism and generate the set of instances naturally. the success of spns on ner and re inspires us to explore * corresponding author. the possibility of jointly solving the extraction of entities and relation triples with spns, which is a promising but unexplored direction. in this paper, we propose bipartite set prediction network (bispn), a variant of spns, to generate target entity set and relation set in one pass. it can not only avoid the negative effect of cascade error but also enjoy the benefit of high inference speed. however, it is challenged by the difficulty to maintain the coherence between the generated entity set and relation set, due to its parallel design. as illustrated in figure 1 , the head/tail entities of generated relation triples should be included in the generated entity set. the significance of this coherence is two-fold: 1) by requiring the generated entity set to contain the head/tail entities, the recall of the generated entities is more guaranteed; 2) by restricting the head/tail entities within the generated entity set, the precision and recall of the generated triples are more guaranteed. despite that, it is difficult to maintain such consistency when generating the two sets in parallel, since all instance queries are assumed to be of equal status and their hidden representations are updated using bidirectional attention without any further restriction. to overcome this challenge, we come up with two novel solutions. the first one is a bipartite consistency loss function. it works by looking for a reference entity from the generated entity set for each relational subject/object and forcing the subject/object to simulate the reference entity. symmetrically, it also find a reference subject/object for each entity classified as involved in relation and force the entity to simulate the reference subject/object. our second solution is an entity-relation linking loss function, which works in the hidden semantic space. by computing the linking scores between the projected representations of entity queries and relation queries, it encourages the model to learn the interaction between entity instances and relation triple instances. to sum up, our main contributions include: ## conclusion in this work, we present bispn, a novel joint entity relation extraction framework based on bipartite set prediction. it generates entity set and relation set in a distributed manner, so as to avoid error propagation. to maintain the coherency between the generated entity set and relation set, we come up with two novel loss designs, namely bipartite consistency loss and entity-relation linking loss. the first one pulls closer the predicted boundary/type distributions of entities and head/tail entities, while the second one enforces the interaction between entity queries and relation queries. extensive experiments demonstrate the advantage of bispn in knowledge-intensive scene, as well as the effectiveness of the proposed bipartite consistency loss and entity-relation linking loss.