Skip to main content
QUICK REVIEW

[论文解读] LLM with Relation Classifier for Document-Level Relation Extraction

Xingzuo Li, Kehai Chen|arXiv (Cornell University)|Aug 25, 2024
Natural Language Processing TechniquesComputer Science被引用 3
一句话总结

本文提出LMRC,一种两阶段框架,通过使用预训练分类器在将实体对输入大语言模型(LLM)进行关系分类前,先过滤掉非关系性实体对。通过减少对无关实体对的注意力分散,LMRC显著提升了基于LLM的文档级关系抽取性能,在DocRED和Re-DocRED基准上实现了基于LLM方法的最先进性能,并与传统模型表现相当。

ABSTRACT

Large language models (LLMs) have created a new paradigm for natural language processing. Despite their advancement, LLM-based methods still lag behind traditional approaches in document-level relation extraction (DocRE), a critical task for understanding complex entity relations within long context. This paper investigates the causes of this performance gap, identifying the dispersion of attention by LLMs due to entity pairs without relations as a key factor. We then introduce a novel classifier-LLM approach to DocRE. Particularly, the proposed approach begins with a classifier designed to select entity pair candidates that exhibit potential relations and then feed them to LLM for final relation classification. This method ensures that the LLM's attention is directed at relation-expressing entity pairs instead of those without relations during inference. Experiments on DocRE benchmarks reveal that our method significantly outperforms recent LLM-based DocRE models and narrows the performance gap with state-of-the-art BERT-based models.

研究动机与目标

  • 探究为何基于LLM的方法在文档级关系抽取(DocRE)中表现不如传统模型。
  • 识别基于LLM的DocRE性能下降的根本原因,特别是候选实体对空间中的不平衡问题。
  • 提出一种新颖的两阶段框架LMRC,通过预过滤无关实体对,提升基于LLM的效率与准确性。
  • 在标准DocRE基准上,验证LMRC在多种LLM(包括LLaMA2、GPT-3.5-turbo和GPT-4-turbo)上的有效性。

提出的方法

  • 训练一个预分类器,从完整的候选空间中识别并过滤掉非关系性(NA)实体对,显著减少输入LLM的实体对数量。
  • 分类器利用注意力机制捕捉长距离依赖关系与上下文线索,实现有效的候选选择。
  • 仅将经过筛选的高潜力实体对输入LLM进行最终的关系分类,确保注意力集中于相关关系。
  • 使用DocRED数据集中的示例,以三样本 few-shot in-context learning 格式提示LLM,以提升零样本泛化能力。
  • 对于域外关系,采用SBERT进行语义相似度对齐,使用余弦相似度阈值θ丢弃低置信度映射。
  • 采用两阶段流水线进行评估:关系候选生成(RCP)后接关系分类(RC),并对LLaMA2-13B-Chat进行微调。
Figure 1: Statistics on the number of entity pairs in DocRED and Re-DocRED training set. NA : entity pairs that do not express any relation. Rel: entity pairs expressing relations.
Figure 1: Statistics on the number of entity pairs in DocRED and Re-DocRED training set. NA : entity pairs that do not express any relation. Rel: entity pairs expressing relations.

实验结果

研究问题

  • RQ1为何基于LLM的方法在文档级关系抽取中表现不如传统模型?
  • RQ2候选实体对空间中的不平衡如何影响LLM在DocRE中的注意力机制与性能表现?
  • RQ3预分类器能否通过过滤非关系性实体对,提升基于LLM的DocRE效率与准确性?
  • RQ4LMRC框架在不同LLM架构(包括GPT-4-turbo和微调后的LLaMA2)上的表现如何?
  • RQ5基于阈值的域外关系语义对齐在多大程度上提升了最终F1分数?

主要发现

  • 当使用微调后的LLaMA2-13B-Chat时,LMRC框架在DocRED开发集上达到58.16的F1分数,显著优于直接提示GPT-4-turbo(34.84 F1)。
  • 该方法通过过滤掉90%以上的非关系性实体对,减少了注意力分散,这一结果在原始候选空间中NA对的高比例中得到验证。
  • 使用θ = 0.55作为语义相似度对齐的阈值可最大化F1性能,且因域外关系频率较低,阈值变化影响微乎其微。
  • 与直接提示相比,LMRC方法在GPT-3.5-turbo-16k上F1提升超过20分,在GPT-4-turbo上提升超过30分。
  • 微调后的LLaMA2-13B-Chat结合LMRC在句内关系上达到65.88 F1,在句间关系上达到52.66 F1,展现出对不同类型关系的鲁棒性。
  • 该方法在性能上与领先的传统DocRE模型相当,为基于LLM的DocRE设立了新基准。
Figure 2: Illustration of LMRC . Relation Candidate Proposal(RCP) leverages localized context pooling Zhou et al. ( 2021 ) in the construction of a pre-processing classifier, focusing on selecting entity pairs that contain relations. Relation Classification(RC) takes the results from the previous st
Figure 2: Illustration of LMRC . Relation Candidate Proposal(RCP) leverages localized context pooling Zhou et al. ( 2021 ) in the construction of a pre-processing classifier, focusing on selecting entity pairs that contain relations. Relation Classification(RC) takes the results from the previous st

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。