{'fraction_non_alphanumeric': 0.033620015637216574, 'fraction_numerical': 0.0, 'mean_word_length': 5.632124352331606, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Improving Document-level Relation Extraction via Contextualizing Mention Representations andWeighting Mention Pairs

Document-level relation extraction (RE) has attracted considerable attention, because a large number of relational facts are expressed in multiple sentences. Recently, encoder-aggregator based models have become promising for document-level RE. However, these models have two shortcomings: (i) they cannot obtain contextualized representations of a mention by low computational cost, when the mention is involved in different entity pairs; (ii) they ignore the different weights for the mention pairs of a target entity pair. To tackle the above two problems, in this paper, we propose a novel encoder-attender-aggregator model, which introduces two attenders between the encoder and aggregator. Specifically, a mutual attender is first employed on the selected head and tail mentions to efficiently produce contextualized mention representations. Then, an integration attender is utilized to weight the mention pairs of a target entity pair. Extensive experiments on two document-level RE datasets show that the proposed model performs better than the state-of-the-art baselines. Our codes are publicly available at “https://github.com/nefujiangping/EncAttAgg”.