
摘要
我们提出了SpERT,一种基于跨度的联合实体与关系抽取的注意力模型。其核心贡献在于对BERT嵌入进行轻量级推理,该方法兼具实体识别与过滤功能,并采用局部化、无标记(marker-free)的上下文表示进行关系分类。模型通过强负样本进行训练,这些负样本可在单次BERT前向传播中高效提取,从而支持对句子中所有可能跨度的全面搜索。消融实验表明,预训练、强负样本采样以及局部化上下文表示均显著提升了模型性能。在多个联合实体与关系抽取数据集上,SpERT的F1分数相较以往方法最高提升达2.6%。
代码仓库
markus-eberts/spert
官方
pytorch
GitHub 中提及
lavis-nlp/spert
pytorch
GitHub 中提及
基准测试
| 基准 | 方法 | 指标 |
|---|---|---|
| joint-entity-and-relation-extraction-on | SpERT | Cross Sentence: No Entity F1: 70.33 |
| joint-entity-and-relation-extraction-on | SpERT (with overlap) | Cross Sentence: No Entity F1: 70.3 Relation F1: 50.84 |
| named-entity-recognition-ner-on-scierc | SpERT | F1: 70.33 |
| relation-extraction-on-ade-corpus | SpERT (without overlap) | NER Macro F1: 89.25 RE+ Macro F1: 79.24 |
| relation-extraction-on-ade-corpus | SpERT (with overlap) | NER Macro F1: 89.28 RE+ Macro F1: 78.84 |
| relation-extraction-on-conll04 | SpERT | NER Macro F1: 86.25 NER Micro F1: 88.94 RE+ Macro F1 : 72.87 RE+ Micro F1: 71.47 |