GenIE: Generative Information Extraction
Abstract
Structured and grounded representation of text is typically formalized by closed information extraction , the problem of extracting an exhaustive set of (subject, relation, object) triplets that are consistent with a predefined set of entities and relations from a knowledge base schema.
Most existing works are pipelines prone to error accumulation, and all approaches are only applicable to unrealistically small numbers of entities and relations.
We introduce GenIE (generative information extraction), the first end-toend autoregressive formulation of closed information extraction.
GenIE naturally exploits the language knowledge from the pre-trained transformer by autoregressively generating relations and entities in textual form.
Thanks to a new bi-level constrained generation strategy, only triplets consistent with the predefined knowledge base schema are produced.
Our experiments show that GenIE is state-of-the-art on closed information extraction, generalizes from fewer training data points than baselines, and scales to a previously unmanageable number of entities and relations.
With this work, closed information extraction becomes practical in realistic scenarios, providing new opportunities for downstream tasks.
Finally, this work paves the way towards a unified end-to-end approach to the core tasks of information extraction.
Introduction
The ability to extract structured semantic information from unstructured texts is crucial for many AI tasks such as knowledge discovery (Ji and Grishman, 2011; Trisedya et al., 2019), knowledge maintenance (Tang et al., 2019), symbolic representation and reasoning (Ji et al., 2021).
The interface between free text and structured knowledge is formalized by knowledge base population (KBP; Ji and Grishman, 2011), which proposes to represent the information contained in text using (subject, relation, object) fact triplets.
In this work, we focus on closed information extraction (cIE), the problem
US president Biden was born in Pennsylvania.
<
United States of America, president, Joe Biden> <Joe Biden, ___ , ___ >
Encoder + Autoregressive Decoder
Global Structural Constraint
RelationConstraint place of death place of birth country death
he
Entity Constraint
California
Pennsylvania of the he of extracting exhaustive sets of fact triplets expressible under the relation and entity constraints defined by a Knowledge Base (KB) schema.
Traditionally, cIE was approached with pipelines that sequentially combine named entity recognition (Tjong Kim Sang, 2002), entity linking (Milne and Witten, 2008), and relation extraction (Miller et al., 1998).
Entity linking and relation extraction serve as grounding steps, matching entities and relations to numerical identifiers in a KB, e.g.,
QIDs and PIDs for Wikidata (Vrande ˇ ci ´ c, 2012).
Recently, Trisedya et al.
(2019) pointed out that such pipeline architectures suffer from the accumulation of errors and proposed an end-to-end alternative.
Nevertheless, existing methods are still only prac- tical for small schemas with unrealistically small numbers of relations and entities.
Alternatively, some works have focused on a simpler syntactic task: open information extraction (oIE), which produces free-form triplets from texts.
In this setup, the entities and relations are not grounded in a KB and, usually, do not represent facts (Gashteovski et al., 2020).
As oIE triplets contain only surface relations, they have ambiguous semantics, making them hard to use in downstream tasks (Broscheit et al., 2017) if not first aligned with a KB (Gashteovski et al., 2020).
Since, in practice, oIE often consists of structured substring selection, it has recently been framed as an endto-end sequence-to-sequence problem with great success (Huguet Cabot and Navigli, 2021; Dognin et al., 2021).
Indeed, such autoregressive formulations can exploit the language knowledge already encoded in pre-trained transformers (Devlin et al., 2019).
For example, some tokens can be more easily recognized as possible entities or relations thanks to the pre-training information.
Inspired by recent successes in oIE, we propose the first autoregressive end-to-end formulation of cIE that scales to many entities and relations, making cIE practical for more realistic KB schemas (i.e. schemas with millions of entities).
1 We employ a sequence-to-sequence BART model (Lewis et al., 2020), and exploit a novel bi-level constrained generation strategy operating on the space of possible triplets (from a fixed schema induced by Wikidata) to ensure that only valid triplets are generated.
Our resulting model, GenIE , performs Gen erative
I nformation E xtraction and combines the advantages of a known schema with an autoregressive formulation.
The high-level overview of GenIE is provided in Fig.
The constrained generation encodes the known schema and enables the autoregressive decoder to generate textual tokens but only
from the set of allowed entities or relations.
Contributions.
• We present the first end-to-end autoregressive formulation of closed information extraction.
• We describe a constrained decoding strategy that exploits the Wikidata schema to generate only valid fact triplets, demonstrating how constrained beam search can be applied on large, structured, and compositional spaces.
• We propose a model that achieves state-of-theart performance on the cIE task and scales to previously unmanageable numbers of entities (6M) and relations (more than 800).
• We point out and address weaknesses in the evaluation methodologies of recent previous works stemming from their small scale and the large imbalances in the available data per relation.
We demonstrate the importance of reporting performance as a function of the number of relation occurrences in the data.
• We release pre-processed data, pre-trained models, and code within a general template designed to facilitate future research at https: //github.com/epfl-dlab/GenIE .
Background and Related Work 2. Closed Information Extraction
In this work, we address the task of closed information extraction (cIE), which aims to extract the exhaustive set of facts from natural language, expressible under the relation and entity constraints defined by a knowledge base (KB).
Most of the existing methods address the problem with a pipeline solution.
One line of work starts by first extracting the entity mentions and the relations between them from raw text.
This is followed by a disambiguation step in which the entity and relation predicates are mapped to their corresponding items in the KB.
The sub-task of extracting the free-form triplets was originally proposed by Banko et al.
and it is commonly referred to as open information extraction (oIE) or text-to-graph in the literature (Guo et al., 2020; Castro Ferreira et al., 2020; Huguet Cabot and Navigli, 2021;
Shen et al., 2015).
Another line of work employs a pipeline of models for (i) named entity recognition (NER) – detecting the entity mentions; (ii) entity linking (EL) – mapping the mentions to specific entities from the KB; (iii) relation classification (RC) – detecting the relations that are expressed between the entities (Galárraga et al., 2014; Angeli et al., 2015b; Chaganty et al., 2017).
Due to their architecture, pipeline methods are plagued by error propagation, which significantly affects their performance (Mesquita et al., 2019; Trisedya et al., 2019).
End-to-end systems that jointly perform the extraction and the disambiguation of entities and relations have been proposed to address the error propagation (Trisedya et al., 2019;
Sui et al., 2021; Liu et al., 2018).
To mitigate the propagation of errors, these systems are endowed with the ability to leverage entity information in the relation extraction and vice-versa, which has resulted in significant performance gains.
Conceptually, for producing the output triplets, existing methods all rely on atomic, multi-class classification-based ranking of relations and entities.
Classification methods particularly suffer from imbalances in the data.
On the contrary, our model, GenIE, is autoregressive and copes better with imbalances.
While cIE requires the constituent elements of the output triplets to be entities and relations associated with the KB, the output triplets in oIE are free-text.
This makes the cIE task fundamentally harder than oIE and renders the majority, if not all, oIE methods inapplicable to the cIE setting.
We report an additional discussion on relevant, but not fundamental, related work on oIE in Appendix A.
2. Autoregressive Entity Linking
The tasks of entity linking (EL) and entity disambiguation (ED) have been extensively studied in the past (Huang et al., 2015; Wu et al., 2020; Le and Titov, 2018; Kolitsas et al., 2018; Arora et al., 2021).
Most existing approaches associate entities with unique atomic labels and cast the retrieval problem as multi-class classification across them.
The match between the context and the label can then be represented as the dot product between the dense vector encodings of the input and the entity’s meta information (Wu et al., 2020).
This general approach has led to large performance gains.
Recently, De Cao et al.
(2021a,b, 2022) have suggested that the classification-based paradigm for retrieval comes with several shortcomings such as (i) the failure to capture fine-grained interactions between the context and the entities; (ii) the necessity of tuning an appropriately hard set of negative samples during training.
Building on these observations, they propose an alternative solution that casts the entity retrieval problem as one of autoregressive generation in which the entity names are generated token-by-token in an autoregressive fashion.
The (freely) generated output will not always be a valid entity name, and to solve this problem De Cao et al.
(2021b) propose a constrained decoding strategy that enforces this by employing a prefix trie.
Their method scales to millions of entities, achieving state-of-the-art performance on monolingual and multilingual entity linking.
Inspired by the intuition that language models are well suited for predicting entities, we propose a novel approach for cIE by framing the problem in an autoregressive generative formulation.
Method
In this section we formalize GenIE, an autoregressive end-to-end model for closed information extraction.
Let us assume a knowledge base (KB) consisting of a collection of entities E , a collection of relations R , and a set of facts ( s , r , o ) ∈
E × R × E stored as (subject, relation, object) triplets.
Additionally, we assume that each entity e ∈ E and relation r ∈ R is assigned to a textual label (corresponding to its name).
The Wikidata KB (Vrandeˇci´c, 2012), with Wikipedia page titles as entity names, and the Wikidata relation labels as relation names satisfy these assumptions.
3. Model
We cast the task of information extraction as one of autoregressive generation.
More concretely, given some text input x , GenIE strives to generate the linearized sequence representation y of the exhaustive set of facts expressed in x .
The conditional probability (parameterized by θ ) assigned to the output y is computed in the autoregressive formulation: p θ ( y | x ) = (cid:81) | y | i = 1 p θ ( y i |
y <
i , x ) .
This can be seen as translating the unstructured text to a structured, unambiguous representation in a sequence-to-sequence formulation.
GenIE employs the BART (Lewis et al., 2020) transformer architecture.
It is trained to maximize the target sequence’s conditional log-likelihood with teacher forcing (Sutskever et al., 2011, 2014), using the cross-entropy loss.
We use dropout (Srivastava et al., 2014) and label smoothing for regularization (Szegedy et al., 2016).
3. Output Linearization
To represent the output with a sequence of symbols that is compatible with sequence-to-sequence architectures, we introduce the special tokens <sub>, <rel>, <obj> to demarcate the start of the subject entity, the relation type and the object entity for each triplet.
The special token <et> is introduced to demarcate the end of the object entity, which is also the end of the triplet.
We construct the sequence representation by concatenating the textual representations of its constituent triplets.
While the sequence representation has an intrinsic notion of order, the output set of triplets does not.
To mitigate the effects of this discrepancy, we enforce a consistent ordering of the target triplets during training.
Concretely, whenever the triplets’ entities are linked to the entity mentioned in the textual input, we consider first the triplets for which the subject entity appears earlier in the text.
Ties are resolved by considering the appearance position of the object entity.
3. Inference with Constrained Beam Search
The space of triplets corresponds to T =
E ×
R × E , and the target space, which consists of triplet sets of arbitrary cardinality, is equivalent to
S =
(cid:83) ∞
i =
[ E × R × E ] i .
At inference time, GenIE tackles the task of retrieving the linearized representation y S ∈ S of a set of facts S
= { t 1 ,..., t n } constituted by triplets t i ∈ T expressed in the input text x .
Ideally, we would consider every element y ∈ S in the target space, assign it a score p θ ( y | x ) , and retrieve the most probable y .
Unfortunately, this is prohibitively expensive since we are dealing with a compositional target space whose size is gigantic (e.g., if we consider a Wikidata entity catalog of | E | ≈ 6M elements and a relation catalog of | R | ≈ 1000 relations, that can express a total of | T | ≈ 10 15 triplets; even if we limit ourselves to sentences that express only two facts, this provides us with ≈ 10 30 different output options).
On the other hand, the output needs to follow a particular structure, and contain only valid entity and relation identifiers.
This does not necessarily hold for an arbitrary generation from a sequenceto-sequence model.
GenIE employs constrained beam search (BS;
Sutskever et al., 2014; De Cao et al., 2021b) to resolve both of these problems.
Instead of explicitly scoring all of the elements in the target space S , the idea is to search for the top- k eligible options, using BS with k beams and a prefix trie.
BS considers one step ahead – the next token to be generated – conditioned on the previous ones.
The prefix trie restricts the BS to candidate tokens that could lead to valid identifiers.
However, for the cIE setting we are interested in, the target space is prohibitively large to pre-compute the necessary trie.
Therefore, we enforce a bi-level constraint on the output that allows for compositional, dynamic generation of the valid prefixes.
More specifically, GenIE employs: (i) a high-level structural constraint which asserts that the output follows the linearization schema defined in Sec. 3.2; (ii) lower level validity constraints which use an entity trie and a relation trie to force the model to only generate valid entity or relation identifiers, respectively – depending on the specific element of the structure that is being generated.
This outlines a general approach for applying BS to search through large compositional structured spaces.
Experimental Setup 4. Knowledge Base: Wikidata
We use Wikidata 2 (Vrandeˇci´c, 2012) as the target KB to link to, filtering out all entities that do not have an English Wikipedia page associated with them.
The filtering guarantees that all entity names are unique.
Our final entity set E contains 5,891,959 items.
We define our relation set R as the union of all the relations considered in the datasets described below, resulting in 857 relations.
For different datasets, we consider only the subset of annotated relations to better compare with baselines.
Although large, the number of entity (and relation) names is not a memory bottleneck as the generated prefix trie occupies ≈ 200MB of storage (e.g., the entity linking system proposed by Wu et al.
2020 needs > 20 times more storage).
4. Datasets and Evaluation Metrics
In this work, we further annotate and adapt
REBEL (Huguet Cabot and Navigli, 2021) and
Wiki-NRE for training, validation and testing.
Additionally, we use Geo-NRE (Trisedya et al., 2019), and FewRel (Han et al., 2018) for testing purposes only.
Appendix B contains descriptions of these datasets and their statistics.
We measure the performance in terms of micro and macro precision, recall and F1.
See Appendix C for a detailed and formal description of these metrics.
We also report a 1-standard-deviation confidence interval constructed from 50 bootstrap samples of the data.
4. Baselines
We compare GenIE against Set Generation Networks (SetGenNet; Sui et al., 2021) which is, to the best of our knowledge, the strongest model on
Wiki-NRE and Geo-NRE.
Note that the authors did not release code or the model and there is no other model from the literature trained and evaluated on
REBEL for cIE.
SetGenNet (Sui et al., 2021) is an end-to-end state-of-the-art model for triplet extraction.
It consists of a transformer encoder (Vaswani et al., 2017) that encodes the input followed by a non-autoregressive transformer decoder (Gu et al., 2018).
The decoder generates embeddings that are used to predict entities and relations.
SetGenNet further uses candidate selection (Ganea and Hofmann, 2017; Kolitsas et al., 2018) to reduce the output space and a bipartite matching loss that handles different prediction orderings (i.e., it generates a set).
Note that there are weaker baselines (e.g.,
Trisedya et al. 2019)
we could have used to compare on REBEL, but we were not able to reproduce their code.
We report details on the effort made to use these baselines in Appendix D.
We also implement a pipeline baseline, consisting of 4 independent steps, namely: (i) named entity recognition (NER), which selects the spans in the input source likely to be entity mentions; (ii) entity disambiguation (ED), which links mentions to their corresponding identifiers in the KB; (iii) relation classification (RC), which predicts the relation between a given pair of entities, and finally; (iv) triplet classification (TC), which predicts whether a given triplet is actually entailed by the context.
TC is necessary because the previous step (RC) predicts a relation for every pair of entities.
Each step needs to be trained independently with a specific architecture tailored for the task, and we made an optimal choice for each step.
For the NER component we used the state-of-the-art tagger FLAIR 3 (Akbik et al., 2019), while for ED we used the GENRE linker 4 (De Cao et al., 2021b).
These two models were already trained, and we use them for inference only.
For RC and TC, we trained a RoBERTa (Liu et al., 2019) model with a linear classification layer on top (as these two sub-tasks are typically cast as classification problems).
Trisedya et al.
(2019) also proposed many other pipeline baselines but ours outperforms them (see Table 5 in Appendix G for comparison).
Results 5. Performance Evaluation
Models performing cIE can base their predictions on different schemas.
In this section, we distinguish between small and large evaluation schema .
The small evaluation schema is consistent with pre- vious approaches where models only have to decide between a small set of relations and entities (the schema induced by Wiki- and Geo-NRE).
In the large evaluation schema , models use the schema induced by REBEL.
Models also use the large evaluation schema of REBEL when tested on FewRel, as a high-quality and challenging recall-based evaluation.
We consider 3 training setups for GenIE and the pipeline baseline comprised of SotA components: (i) the training set of Wiki-NRE (W) only, (ii) the training set of REBEL (R) only, and (iii) pre-training on REBEL and fine-tuning on WikiNRE (R+W).
The implementation details are given in
Appendix E. We report the macro and micro precision, recall, and F1 in Table 1.
Unfortunately, as the code for SetGenNet is not available, we cannot compute its macro performance, thus we report the micro scores only.
First, on Wiki-NRE (W), we observe a large and significant F1 improvement of 8 and 28 absolute points obtained by GenIE over SetGenNet and the pipeline baseline, respectively, when trained on the same dataset.
Despite the much bigger schema employed by REBEL, pre-training on it and then finetuning (R+W), improves the performance on WikiNRE and Geo-NRE for 3% and 5%, respectively.
This highlights that: (i) GenIE can effectively transfer knowledge across datasets/schemas; (ii) GenIE can quickly adapt to new schemas.
Due to its rigid, monolithic relation classifier, the pipeline baseline does not possess these qualities.
However, the pretraining does improve its macro scores.
Only the newly developed pipeline baseline and
GenIE can scale-up to the larger schema 5 , and as expected, this setting is more challenging for both models.
However, GenIE still preserves a good
F1 score of 68 micro and 34 macro, which is a relative increase of 60% and 320%, respectively, over the baseline.
While the pipeline has a steeper drop from micro to macro scores, in general, a significant difference between the two is observed in every setting.
This suggests that the models perform better for relations associated with many training examples and significantly worse for the rest.
These findings call for the fine-grained analysis of performance in Sec.
5.2 that partitions the relations according to their occurrence count in the training data.
For completeness, we also provide an analysis of performance as a function of the number of relations considered, in Appendix F.1. [Table]
[Table] Finally, on FewRel, recall is the only welldefined metric (see Appendix B).
In this setting as well, GenIE greatly outperforms the baseline by 13 (micro) and 11 (macro) recall points (micro and macro are close as the dataset is class-balanced).
Ablation study.
In Table 2 we summarize the results of an ablation study considering the pretraining and the constrained generation.
We consider three different starting points: (i) a random initialization; (ii) BART (Lewis et al., 2020) pretrained language model (PLM); (iii) a pre-trained autoregressive entity retrieval model GENRE (De
Cao et al., 2021b).
The pre-trained models are better in terms of recall and exhibit a better outof-domain generalization on FewRel.
In contrast, they are slightly worse in terms of precision, which translates to maximum improvement of a single point in F1 on REBEL.
Another salient advantage of pre-training is reducing the training steps necessary for achieving good results.
Indeed, when starting from GENRE, 3-5k steps are sufficient for competitive performance; starting from a PLM necessitates 5-10k steps; while a random initialization requires 40-50k steps for competitive performance.
Additionally, the pre-trained versions converge to a lower validation loss (see Fig.
5 in Appendix G).
To quantify the benefits from the constrained generation, we compare the results attained by the randomly initialized model with and without constraints.
In addition to ensuring a structure on the output, the constrained generation strategy results in an increase of 2-3 absolute points in terms of F1.
5. Analysis of Performance as a Function of the Relation Occurrence Count
The datasets naturally present large imbalances, where few relations occur a lot, but most relations are rare.
In the previous section, we already observed a large difference between macro and micro
F1 scores of models, indicating that the number of occurrences impacts model performances.
Thus, we now measure F1 scores after bucketing relations according to their number of occurrences in the training dataset.
In Fig.
2, we create buckets i ∈ { 0 ,..., 20 } , where bucket i contains all the relations occurring at least 2 i times and less than 2 i +times in the REBEL dataset.
The height of the histogram for bucket i shows how many relations are contained in this bucket.
Finally, we report the F1 scores of GenIE and the pipeline of SotA components per bucket.
Note that micro F1 from
Table 1 is equivalent to putting all relations in one single bucket (equal weight to each data point), and macro F1 is equivalent to averaging the F1 with one bucket per relation (equal weight to each relation).
The histogram first confirms that most of the relations occur in only a few triplets from the train- N u m b e r o f r e l a t i o n s Distribution of relations [Figure]
[Figure]
[Figure]
Number of relation occurrences in the training dataset [Figure] ing data. Models thus need to perform few-shot learning for most of the relations.
GenIE is significantly better than the pipeline baseline for all the buckets.
Finally, it is important to highlight that even though the performance of both methods, unsurprisingly, declines for relations that appear less often in the training data, GenIE already performs well for relations with at least 2 [-
-]6 =occurrences.
On the contrary, the baseline needs 2 14 = 16 , 384 samples to reach a comparable level of performance, and scores better than GenIE does for the 2 6 = 64 bucket only after seeing at least 2 19 = 524 , 288 samples.
This confirms that GenIE is not only better at macro and micro F1, but it is also capable of performing fewer-shot learning than the baseline.
It further shows that, contrary to the baseline, GenIE’s good scores do not come solely from its ability to perform well on the few most frequent relations.
5. Disentangling the Errors
The task of cIE, explicitly or implicitly, encompasses NER, NEL and RC as its subtasks.
Failure in any subtask directly translates to failure on the original task.
Therefore, to effectively compare different cIE models and accurately characterize their behavior, we need to evaluate their performance on each of the subtasks.
The separation of responsibility between the pipeline components leads to a natural error attribution for the SotA pipeline model.
To estimate the
NER error, we take the entity mentions predicted by the NER component and compare them with the [Figure] corresponding mentions of the constituent entities of the output triplets.
All triplets that concern an entity whose mention was not retrieved by the NER component are considered erroneous.
We differentiate between two settings: (i) exact, which requires that the generated mention exactly matches the target mention; and (ii) partial, for which any overlap between the generated and the target triplet is sufficient.
The NEL error is calculated by considering the output of the NEL component and comparing the linked entities to those in the output triplets.
Again, all of the triplets that concern an incorrectly linked entity are considered erroneous.
Finally, for the pipeline, every correctly predicted relation label translates to a correctly extracted triplet.
Therefore, we calculate the RC error using the cIE definition of recall given in Appendix C.
End-to-end systems tackle all of the sub-tasks jointly, which makes the error attribution, in this setting, less obvious.
To estimate errors corresponding to a particular target triplet, we need a reference triplet (among the predicted ones) for comparison.
We start by outlining a bipartite matching procedure.
Let each triplet be a node in a graph.
We add an edge between each target–prediction pair of triplets.
The edges are assigned a weight determined as a function of the pair of triplets they connect.
Concretely, an edge e that connects the target triplet t T = ( s T , r T , o T ) and the predicted triplet t P =
( s P , r P , o P ) will be assigned a weight of: 1 , if the triplets are the same; 2 , if they express the same relation, but either the subject or the object differ; 3 , if they concern the same entities, but the relation differs; 4 , if they share only a single entity; 5 , if they share only a single relation; 6 if they have nothing in common.
We construct the matching by selecting edges in a greedy fashion until all of the target triplets have been matched.
The procedure ensures that every target triplet is paired with its closest (yet unpaired) match.
Finally, we estimate the NEL error as the portion of edges that were assigned a weight w ∈ { 2 , 4 , 5 , 6 } , and the RC error as the portion of edges that where assigned a weight w ∈ { 3 , 4 , 6 } .
The results of this analysis are summarized in
Fig.
Immediately, the NER component in the pipeline method introduces an 18% error by completely missing on relevant entity mentions.
An additional 12 absolute points hinge on a partial matching.
The NEL component matches most of the entity mentions that are retrieved, but at this point, even with a (hypothetical) perfect RC, the performance of the pipeline will be only on par with GenIE.
In practice, the RC component adds 30% to the inherited error, effectively doubling it.
On another note, the absolute error attributed to
NEL by the pipeline and GenIE differs in a few absolute points only, while the difference for the (non-inherited) error stemming from RC is less than 10%.
Adding these two together leaves us much shorter than the actual gap of 28 absolute points in performance on the cIE task.
This gap suggests a strong correlation between the performance on NEL and RC for GenIE, which is fueled by the increased flow of information between the subtasks.
The flow of information allows for more fine-grained interactions between the entities, the relations, and the context to be captured, consequently improving the overall performance.
Alternatively, whenever the model captures a misleading correlation/interaction, it is amplified and hinders the performance on both subtasks.
This result is echoed by the fact that the sum of the errors attributed to NEL and RC is significantly smaller than the error on the cIE task.
Based on this observation, we hypothesize that any improvement on NEL will overflow to the RC subtask – and viceversa – thereby directly translating to performance gains on the overall task.
Discussion
Unifying the cIE spectrum.
There is a full spectrum of tasks that are closely related to cIE and are central to the field of information extraction.
The typical setup assumes a KB associated with entities and relations, and the goal is to either annotate the text with information from the KB, or extract structured unambiguous information from the text.
The tasks of entity linking and relation classification, already discussed in Sec. 2 and Sec. 4.3, are two such examples.
Another example is slot filling (SF), the task of extracting information for a specific entity and relation (e.g., entity Mick Jagger , relation member of ) from natural language (Surdeanu, 2013; Petroni et al., 2021).
All of these problems rely on the same set of logical tasks: identifying entities from the KB in text and understanding how they interact.
Therefore, it would be beneficial to assume a single model, or a set of models that share parts of the weights and collectively solve all of the tasks.
This would allow for the information from a dataset collected for one task (e.g., RC) to be leveraged for improving the performance of another (e.g., SF or cIE).
Bridging the gap between oIE and cIE.
In this work, we only considered triplets for which both entities are element in the entity catalog.
However, for many useful relations one of the objects is a literal (Mesquita et al., 2019), e.g., date of birth, length, size, number of employees or others.
GenIE can be readily extended to accommodate for this, by adapting the decoding strategy allowing that for specific relations the entity can be a substring from the input.
This is a subtle connection to oIE which has thus far been treated as a separate problem.
Current state-of-the-art methods on the oIE task address the problem in a similar autoregressive formulation (see Appendix A for more discussion).
Real world implications.
Generative models have been shown to be very effective even in massive multilingual settings—e.g., De Cao et al.
(2022) proposed mGENRE, a multilingual version of
GENRE trained and tested on more than 100 language.
Our GenIE formulation would not need substantial modifications to adapt to such setting.
Having a single model that works in hundreds of languages would be extremely useful and a very promising direction for future work.
While autoregressive models have a nonnegligible computation footprint, De Cao et al.
(2021a) show that autoregressive EL can be sped up 70x with no cost on performance.
The fact that this solution can be adapted to GenIE makes the practical impact of our method even greater.
Conclusion
This paper provides a new view on closed information extraction (cIE) by casting the problem as autoregressive sequence-to-sequence generation.
Our method, GenIE, leverages the autoregressive formulation to capture the fine-grained interactions expressed in the text and employs a bi-level constrained generation strategy to effectively retrieve the target representation from a large, structured, compositional predefined space of outputs.
Experiments show that GenIE achieves state-of-the-art performance on cIE and can scale to a previously unmanageable number of entities and relations.
We believe that our autoregressive formulation of cIE, coupled with constrained decoding, is a stepping stone towards a unified approach for addressing the core tasks in information extraction.
Acknowledgments
West’s lab received support from the Swiss National Science Foundation (grant 200021_185043), the European Union (TAILOR, grant 952215), the Microsoft Swiss Joint Research Center, and the Microsoft Turing Academic Program, as well as gifts from Facebook and Google.
De Cao was supported by the SAP Innovation Center Network. We thank Ivan Titov and Wilker Aziz for insightful discussions and help.
A Additional Background and Related Work A. Generative Open Information Extraction
Early work had focused on pipeline architecture for oIE.
In general, these methods first detect the entity mentions present in the text and then, for pair of entities, in a classification setting, predict the existence of a relation between the two entities and the relation type (Angeli et al., 2015a; Corro and
Gemulla, 2013).
The advent of transformers (Devlin et al., 2019; Lan et al., 2020; Liu et al., 2019) and pipeline architectures that allow for information to flow between the two subtasks – usually by sharing some parameters of the encoder – have allowed these models to do well on the oIE task.
However, they do come with some general limitations: (i) assuming the existence of a single relation between a pair of entities; (ii) inability to capture the interactions between triplets.
Much of the current research is focused on studying the oIE problem in the autoregressive generative setting, which seamlessly mitigates the limitations mentioned above (Huguet Cabot and Navigli, 2021; Dognin et al., 2021; Nayak and Ng, 2020).
For instance, ReGen (Dognin et al., 2021) significantly improves upon published results and establishes state-of-the-art results on the dataset used in the WebNLG 2020+ Challenge (Castro Ferreira et al., 2020).
REBEL (Huguet Cabot and Navigli, 2021), on the other hand, achieves state-of-the-art performances across a suite of oIE benchmarks.
Moreover, both of these methods address the problem in a similar formulation that takes the text as input context and generates the output triplets tokenby-token in an autoregressive fashion.
The output triplets in oIE are free-text, while cIE requires the constituent elements of the output triplets to come from the entity and relation sets associated with the KB.
This makes the cIE task fundamentally harder than oIE, and renders these methods not applicable to the cIE setting.
Finally, Taillé et al.
(2020) make an effort to describe the many issues with the evaluation of oIE systems in literature and call for a unified evaluation setting for a fair comparison between systems.
These problems get only exacerbated in cIE where the performance of a model would highly depend on the entity and relation catalogue considered.
To alleviate some of these issues, we annotate the
REBEL dataset (Huguet Cabot and Navigli, 2021) with unique textual entity identifiers and textual relation labels, and propose a suite of meaningful evaluation settings while considering an approximately 6 million long entity catalogue comprised of all the entities in the English Wikipedia, andlong relation catalogue supported by the dataset.
B Datasets
Table 3 summarizes the statistics of all datasets used in this work.
For each dataset, we remove datapoints containing triplets with entities that do not have an associated Wikipedia page (i.e., entities not associated to a unique name).
This filtering removes a negligible portion of the data in most cases (i.e., < 0.5%) except for REBEL where 3.4% of datapoints were removed.
We evaluate the models in a standard setups for
Wiki-NRE and Geo-NRE.
For these datasets, the schema is unrealistically small:
≈ 300K entities with 157 relations for Wiki-NRE and 124 entities with 11 relations for Geo-NRE.
Therefore, we scale to previously unexplored schema sizes for cIE using the REBEL dataset ( ≈ 6M entities andrelations).
We also use FewRel as a high-quality dataset for recall evaluation using the large schema from REBEL.
REBEL (Huguet Cabot and Navigli, 2021) is a dataset created from Wikipedia abstracts.
It consists of an alignment between sentences, Wikipedia hyperlinks and their corresponding Wikidata entities, and relations.
REBEL proposed an alignment expanding on Elsahar et al.
(2018), a pipeline of mention detection, coreference resolution, entity disambiguation and then mapping triplets to each sentence.
Huguet Cabot and Navigli (2021) further filtered false positives using an Natural Language
Inference (NLI) model to check if the relation was truly entailed by the text.
In this setting, we consider the full ≈ 6M long entity and 857 long relation catalog.
We use this dataset for both training and testing.
Additionally, we employ REBEL to analyze the performance as a function of the number of relations, by simulating different environments pertaining to subsets of the top- n most frequent relations.
Wiki-NRE (Trisedya et al., 2019) is a dataset created from Wikipedia.
Authors aligned hyperlinks to Wikidata entities as in REBEL but they applied a different filtering: they (i) extracted sentences that contain implicit entity names using co-reference resolution (Clark and Manning, 2016), and (ii)
they
Dataset
Documents
Triplets
[Table]
filtered and assigned relations to sentences using paraphrase detection from different sources (Nakashole et al., 2012; Ganitkevitch et al., Grycner and Weikum, 2016).
We used this dataset for both training and testing.
Geo-NRE (Trisedya et al., 2019) is constructed in the same way as Wiki-NRE
but from a collection of user reviews on 100 popular landmarks in
Australia, instead of Wikipedia.
Due to its small size and to compare with the literature, we used this dataset only for testing.
FewRel (Han et al., 2018) is also extracted from
Wikipedia where Wikidata is the KB.
Contrary to the other datasets, FewRel does not provide distant supervision but it is fully annotated by humans.
The dataset was first automatically constructed and then filtered as annotators were asked to judge whether the relations are explicitly expressed in the sentences.
Each input in FewRel is associated with a single triplet only, and not all of the triplets entailed by it.
Therefore, this dataset can be used for precisely measuring recall (but not precision or F1).
We employ it only for testing.
To simulate a more realistic scenario, we train the models on many relations, and leverage the high quality
FewRel data to calculate the performance metrics for the subset of relations annotated.
C Performance Metrics
We measure standard precision, recall and F1 for all settings.
A fact is regarded as correct if the relation and the two corresponding entities are all correct.
More precisely, we denote the set of all predicted triplets of a document d ∈ D as P d , and the set of gold triplets as G d .
Then: micro
[Equation]
precision
[Equation]
and
[Equation]
Micro scores are useful for measuring the overall performance of a model but they are less informative for imbalanced datasets (e.g., when some entities or relations are disproportionately more present in both training and test sets).
Indeed, micro scores assign equal weight to every sample while macro scores assign equal weight to every class.
Thus, we also measure macro scores by aggregating per relation type.
If we denote P ( r ) d and G ( r ) d as the predicted and gold set only containing the relation r ∈ R of a document d , then macro-precision is defined as:
[Equation]
and macro-recall as:
[Equation]
D Note on End-to-End Baselines
We invested a considerable amount of time trying to use a strong end-to-end baseline to compare
GenIE with.
Unfortunately, most works do not have available or directly usable code.
In particular, we first concentrated on SetGenNet (Sui et al., 2021) as, to the best of our knowledge, it is the strongest model on the task of cIE.
However, the authors do not report a link to the code 6 in neither the arXiv nor the ACL Antology version of the paper.
We could not find any related repository on GitHub either.
For these reasons we were unable to use their method as a baseline for REBEL.
We then focused on the work most similar to SetGenNet, that is the system proposed by Trisedya et al.
They released code and we were able to run it.
However, the code was incomplete: they included code for training only a part of their system.
They start with pre-trained word, entity and relation embeddings, but did not release code for pre-training them.
The closest solution we found was using Wikipedia2Vec (Yamada et al., 2020), which does not include relation embeddings.
Besides, the pre-trained word embeddings on the official Wikipedia2Vec website 7 do not match the dimensionality used by Trisedya et al.
Finally, the authors did not include code to train the “triple classifier” of their model.
The classifier is instead directly loaded in their code.
For these reasons we were unable to use their method as a baseline for REBEL.
E Implementation Details
Data.
The train, test and validation splits are either inherited from the original dataset (see Appendix B for details) or sampled at random.
To facilitate reproducibility, we release the exact splits employed in our experiments.
Additionally, we release the curated entity and relation catalogs for both the large and the small schema, in which the redirects have been resolved and each of the QID/PID is paired with a unique, semantically meaningful textual identifier.
We hope that this will allow for a fair comparison of future work in which the same evaluation setup can be maintained.
E. GenIE
Infrastructure.
For training we used a single machine with 24 Intel(R) Xeon(R) CPU E5-2690 v @ 2.60GHz processor cores and 441 GB of RAM, equipped with 4 Tesla V100-PCIE-16GB GPUs.
Training.
The models were trained using the Adam optimizer (Kingma and Ba, 2015) with a learning rate of 3e-5, 0.1 gradient clipping and a varying weight decay (cf.
Table 4).
The learning rate is updated using a polynomial decay schedule with an end value of 0.
While most of the parameters were left at their default values for BART, the rest were tuned on the respective datasets’ validation set, and their corresponding optimal values are given in Table 4.
Inference.
At test time, we use Constrained Beam
Search with 10 beams.
We restrict the input and the output sequence to be at most 256 tokens, cutting from the right side if the input is too long.
We normalize the log-probabilities by sequence length, and allow for any number of n-gram repetition.
The other parameters are kept to their default values for inference with BART.
E. SotA Pipeline
We described our SotA pipeline system baseline in
Sec. 4.3.
We release code to both train and run inference with the proposed pipeline.
The named entity recognition and the entity disambiguation components were not trained.
The relation classification module is a linear layer on top of RoBERTa (Liu et al., 2019).
We trained it learning rate 3e-4 using the Adam optimizer (Kingma and Ba, 2015).
We trained for a maximum number of steps using early stopping on the validation sets.
We restrict the input sequence to be at most 128 tokens cutting from the right side if the input is too long.
All other hyperparameters are reported in Table 4.
The triple classification module is also a linear layer on top of RoBERTa (Liu et al., 2019) with the same hyperparameters of the relation classification module but we trained for less steps.
F Additional Experiments F. Analysis of Performance as a Function of the Number of Relations
Previous works focus on small schemas meaning that few relations were considered.
Indeed, classification problems on a large set of possible classes become particularly difficult under large class imbalances, which is the case here as shown by Fig.
However, scaling up to larger schemas with more relations is crucial for the models to be useful in downstream tasks.
To measure the scaling ability of GenIE, we create different setups with variable numbers of relations.
To create such setups, we start with the REBEL dataset and schema (857 relations) and choose subsets of relations with their associated training data.
In Fig.
4, we report GenIE and the pipeline baseline F1 for schemas with 100, 400, and 857 relations.
To choose a subset of n relations, we take the n most frequent relations to mimic the strategies used by previous works to reduce the schemas (Sui et al., 2021).
Max steps Warm-up steps Batch size Dropout Weight decay
Training time
GenIE (W) 60, 1,  0.
0.5 GPU days
GenIE (R) 100, 5,  0.
18.5 GPU days
GenIE (R + W) 100, 5,  0.
20.5 GPU days
GenIE - Genre 50, 3, 2, 0.
11 GPU days
GenIE - PLM 50, 3, 2, 0.
17 GPU days
SoTA Rel-class (W) 20,   0.
0.2 GPU days
SoTA Rel-class (R) 250,   0.
2.5 GPU days
SoTA Rel-class (R + W) 250,   0.
2.5 GPU days
SoTA Tri-class (R) 50,   0.
0.3 GPU days
SoTA Tri-class (W) 5,   0.
0.1 GPU days
SoTA Tri-class (R + W) 50,   0.
0.3 GPU days
[Figure]
testing time.
Full results (i.e., precision and recall) are reported in Table 6 in Appendix G.
We first observe that GenIE is always largely better than the baseline.
The baseline suffers from the same difficulty as previous works; classifying among a large set of relations is hard with large imbalances.
GenIE and the baseline have similar absolute decrease in performance when the number of relations increases, corresponding to a more considerable relative decrease for the baseline.
More concretely, GenIE’s micro F1-score goes from 70.36 % for the top 100 relations, to 68.82 % and 68.93 % for the top 400 and 857 relation setups, respectively.
This translates to a relative decrease of 2 % only in the first step.
For the baseline, the absolute score of 47.67 % first falls to 44.25 % and subsequently to 42.5 % as the number of relations grows.
This in turn, is an overall relative drop of almost 11 %.
Notably, when looking at precision and recall separately (cf.
Table 6 in Appendix G), GenIE has a slight proportional decrease of 1-2 absolute points, both in precision and recall, which reflects the increased difficulty of the task due to larger number of relations.
The baseline exhibits a similar drop in precision, but a much more significant drop in the recall of almost 10 absolute or 16 point relative.
This suggests that the baseline simply ignores most of the relations with lower occurrence counts, which is consistent with the results in Sec. 2, and the hypothesis that the relation classification task is a bottleneck for effectively scaling the baseline system to a large number of relations.
We already have to deploy several techniques to help the baseline better deal with these issues (see
Sec. 4.3), while GenIE, thanks to its generative autoregressive formulation, can effectively scale and manage the inherent imbalances of the task much more naturally.
G Additional Results
Wiki-NRE
Geo-NRE
Precision
Recall
F
Precision
Recall
F
Pipeline baselines
AIDA + MinIE 36.
NeuralEL + MinIE 35.
AIDA + ClauseIE 36.
NerualEL + ClauseIE 34.
AIDA + CNN 40.
NeuralEL + CNN 36.
Encoder-decoder baselines
Single Attention 45.
Single Attention (+pre-trained) 47.
Single Attention (+beam) 60.
Single Attention (+triplet classifier) 73.
Transformer 46.
Transformer (+pre-trained) 47.
Transformer (+beam) 58.
Transformer (+triplet classifier) 73.
Our pipeline baseline 67.
[Table]
[Figure]
N
[Figure]
g a t i v e l o g - li k e li h
oo d
[Figure]