Effective Modeling of Generative Framework for Document-level Relational Triple Extraction (2025)

Abstract: Document-level relation triple extraction (DocRTE) is a complex task that involves three key sub-tasks: entity mention extraction, entity clustering, and relation triple extraction. Past work has applied discriminative models to address these three sub-tasks, either by training them sequentially in a pipeline fashion or jointly training them. However, while end-to-end discriminative or generative models have proven effective for sentence-level relation triple extraction, they cannot be trivially extended to the document level, as they only handle relation extraction without addressing the remaining two sub-tasks, entity mention extraction or clustering. In this paper, we propose a three-stage generative framework leveraging a pre-trained BART model to address all three tasks required for document-level relation triple extraction. Tested on the widely used DocRED dataset, our approach outperforms previous generative methods and achieves competitive performance against discriminative models.

## introduction extracting relational triples-composed of a subject entity, an object entity, and the relation between them-from documents is a vital yet challenging task in natural language processing (nlp). unlike sentence-level relation extraction tasks @xcite @xcite , the challenges in document-level extraction increase significantly. the first major challenge is the extended context of documents, which requires capturing long-distance dependencies between entities across larger spans of text. another challenge is that an entity may appear multiple times in a document with different surface forms, making entity resolution crucial. this complexity is less pronounced in sentence-level tasks, where entities are generally mentioned only once within a shorter context. an example of document-level relational triple extraction (docrte) is shown in generative models @xcite have shown strong performance in sentence-level relational triple extraction. building on this, cabot and navigli (2021) proposed rebel for document-level relational triple extraction using the docred dataset @xcite . rebel introduced a linearization scheme that encodes all triples in a document as a sequence of tokens, using bart-large as the base model. the model's decoder then generates a token sequence, from which triples are extracted through straightforward post-processing. however, rebel's linearization scheme does not fully address the entity mention extraction and entity clustering sub-tasks within docrte. it only captures the initial mentions of entities involved in relations and does not handle the extraction of mentions with different surface forms. in contrast, @xcite proposed an alternative linearization scheme for docrte, including all mentions of subject and object entities in the output sequence for each relational triple. this approach partially addresses some challenges of mention extraction and entity clustering. however, it redundantly extracts entity clusters multiple times if they are involved in multiple relational triples, which increases sequence length without added value. it also overlooks clusters that do not appear in any relation. in contrast, jerex @xcite proposed a three-stage approach to address the tasks of entity mention extraction, entity clustering, and relational triple extraction, which can be trained either in a pipeline or jointly. the first stage employs a span-based classifier to identify entity mentions within the document. the second stage uses pairwise classification between entity mentions for clustering, and the third stage applies a relation classifier to determine relationships, or 'no relation,' between pairs of entity clusters. tag (zhang as discussed, the single-stage generative approach does not address two key sub-tasks of docrte -mention extraction and entity clustering -while discriminative approaches face class imbalance issues due to their structural design. to overcome these challenges, we propose a novel three-stage generative framework, 3g-docrte, for docrte that effectively integrates both paradigms. in the first stage, we use a generative model to extract all entity mentions by linearizing mentions from the documents. in the second stage, we mark the identified mentions within the input documents and use a generative approach to normalize varying surface forms of the same entity into a unified entity cluster representation, with the first mention's surface form serving as the cluster representative. in the third stage, we employ the rebel lineariza-tion scheme @xcite to extract relational triples within the document. our experiments on the docred dataset show that our approach outperforms previous generative models on all three sub-tasks of docrte and achieves competitive performance compared to sota discriminative models. ## task formulation given a document d composed of l tokens, represented as @xmath0, t 2 , . . . , t l }, our objective is to perform document-level relation extraction. this task encompasses following three structured sub-tasks: ## proposed framework: 3g-docrte we introduce a three-step, multi-level generative framework, 3g-docrte, for document-level relational triple extraction (docrte), comprising (i) entity mention extraction, (ii) entity clustering, and (iii) relational triple extraction. first, we process documents containing multiple sentences to extract entity mentions. next, we cluster these mentions to form entities along with their respective types. finally, in the third stage, we generate relational triples present within the input document at the entity level. a generative sequence-to-sequence model, such as bart @xcite models the probability of each output token o i in the output sequence o based on the input sequence x and the previously generated output tokens @xmath1: n @xmath2, x). the model is trained by maximizing the log-likelihood of the output tokens in the training data. we model this input and output sequence in an effective way for the three stages in our framework. ## experimental results the performance comparison of generative models and discriminative models are summarized in ## related work relational triple extraction (rte) is a crucial task for extracting knowledge from text, where this knowledge is represented in triple form, consisting of two entities (subject and object) and a directed relation from the subject to the object. these triples can be added to knowledge bases (kbs) to enrich them. there are two distinct approaches to addressing this task: (i) relation classification (rc) and (ii) relational triple extraction (rte). in the relation classification approach, entities are preidentified, and models are required to identify the relations, or 'no relation', between pairs of entities. in the relational triple extraction approach, models simultaneously extract corresponding entity pairs and their relations. recently, rte approaches have gained popularity as they provide an end-to-end solution for this task. @xcite introduced the distant supervision method to generate large-scale datasets for relation classification task without the need for human annotations. it has significantly fostered the research in this area. following the introduction of word embeddings in nlp @xcite , numerous neural models were proposed to address this task. @xcite introduced cnn-based models for classifying relations or 'no relation' between two entities within a short sentence-level context. additionally, jat et al. (2018); nayak and ng (2019) proposed attention models for the same task. relational triple extraction is relatively new task and @xcite was very first to introduce a tagging-based approach for this task, while @xcite ; nayak and ng (2020) explored sequence-to-sequence learning for the same task. eberts and ulges (2021) used a pre-trained bart based model that represents relational triples using a linearization mechanism. the bart decoder of their model can generate this representation in an auto-regressive manner. recent models have leveraged pre-trained transformers like bert @xcite to encode the sentences to get a better representation. models such as tplinker @xcite , casrel @xcite , tdeer @xcite , prgc @xcite , pfn @xcite , grte @xcite , onerel @xcite , and birte @xcite have proposed various neural architectures based on bert to address rte at the sentence level. recently, with the introduction of the docred dataset @xcite , document-level relation extraction has gained significant traction in the research community. initially, in this field, most research work focused on relation classification at the entity levels within documents. nan et al. (2020); wang et al. (2020a); zeng et al. (2020, 2021); xu et al. (2021b,a ) introduced various attention models and graph convolution models for this task. more recently, researchers have explored the document-level relational triple extraction task on the docred dataset. this task is notably more challenging than its sentence-level counterpart, as it involves longer context lengths, requires coreference resolution across the longer text, and the models need to perform multi-hop reasoning to extract triples. rebel (cabot and navigli, 2021) and seq2rel @xcite have proposed sequence-to-sequence models for document-level relational triple extraction using a linearized triple representation. alternatively, jerex @xcite , joint-m @xcite , and tag @xcite have proposed multistage discriminative approaches for the same task. ## conclusion in this work, we propose an effective way of using generative frameworks for the document-level relational triple extraction task (docrte). our approach completely addresses all three sub-tasks of docrte: entity mention extraction, entity clustering, and relational triple extraction, whereas, the previous generative approaches exhibit significant deficiencies in managing these sub-tasks. on the docred dataset, our proposed framework surpasses earlier generative models. additionally, when compared with multi-stage discriminative approaches on the same dataset, our method achieves competitive performance across the three sub-tasks of docrte.