ChatPaper.aiChatPaper

GLiNER-Relex: 联合命名实体识别与关系抽取的统一框架

GLiNER-Relex: A Unified Framework for Joint Named Entity Recognition and Relation Extraction

May 11, 2026
作者: Ihor Stepanov, Oleksandr Lukashov, Mykhailo Shtopko, Vivek Kalyanarangan
cs.AI

摘要

联合命名实体识别(NER)与关系抽取(RE)是从非结构化文本构建知识图谱的自然语言处理基础任务。现有方法通常将NER和RE视为需要独立模型的分离任务,而本研究提出的GLiNER-Relex是一种统一架构,在GLiNER框架基础上扩展,使单一模型能够同时执行实体识别和关系抽取。该方法利用共享双向Transformer编码器联合表示文本、实体类型标签和关系类型标签,从而在推理时实现任意指定实体和关系类型的零样本抽取。GLiNER-Relex从识别出的实体跨度构建实体对表示,并通过专用关系评分模块将这些表示与关系类型嵌入进行匹配评分。我们在四个标准关系抽取基准数据集(CoNLL04、DocRED、FewRel、CrossRE)上进行评估,证明该模型在与专用关系抽取模型及大型语言模型的对比中展现出竞争力,同时保持了GLiNER系列模型的计算高效特性。该模型已作为开源Python包发布,提供简洁的推理API接口,允许用户在推理时指定任意实体和关系类型标签,并通过单次调用同时获取实体和关系三元组。所有模型与代码均已公开。
English
Joint named entity recognition (NER) and relation extraction (RE) is a fundamental task in natural language processing for constructing knowledge graphs from unstructured text. While recent approaches treat NER and RE as separate tasks requiring distinct models, we introduce GLiNER-Relex, a unified architecture that extends the GLiNER framework to perform both entity recognition and relation extraction in a single model. Our approach leverages a shared bidirectional transformer encoder to jointly represent text, entity type labels, and relation type labels, enabling zero-shot extraction of arbitrary entity and relation types specified at inference time. GLiNER-Relex constructs entity pair representations from recognized spans and scores them against relation type embeddings using a dedicated relation scoring module. We evaluate our model on four standard relation extraction benchmarks: CoNLL04, DocRED, FewRel, and CrossRE, and demonstrate competitive performance against both specialized relation extraction models and large language models, while maintaining the computational efficiency characteristic of the GLiNER family. The model is released as an open-source Python package with a simple inference API that allows users to specify arbitrary entity and relation type labels at inference time and obtain both entities and relation triplets in a single call. All models and code are publicly available.
PDF11May 14, 2026