arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2310.00299cs.CL
收藏

RelBERT: 利用语言模型嵌入关系

RelBERT: Embedding Relations with Language Models

Cardiff University(卡迪夫大学)

Asahi Ushio, Jose Camacho-Collados, Steven Schockaert

AI总结:

针对知识图谱不完整、大语言模型效率低难控制的问题,提出用小语言模型微调得到的RelBERT提取关系嵌入,细粒度捕捉关系相似性,在类比基准上超大规模提示模型,泛化性强。

摘要:

许多应用需要获取关于不同概念与实体间关联方式的背景知识。尽管知识图谱(KG)和大语言模型(LLM)能在一定程度上满足这一需求,但KG不可避免地存在不完整性,且其关系模式通常过于粗粒度;而LLM则效率低下且难以控制。作为替代方案,我们提出从规模相对较小的语言模型中提取关系嵌入。具体而言,我们证明像RoBERTa这样的掩码语言模型仅需少量训练数据,即可直接通过微调实现这一目标。由此得到的模型我们命名为RelBERT,它能以惊人的细粒度捕捉关系相似性,助力我们在类比基准测试中创下新的最优水平。关键在于,RelBERT能够建模远超其训练期间见过的关系类型。例如,我们用仅在概念间词汇关系上训练的模型,在命名实体间的关系任务上取得了优异结果;还观察到RelBERT尽管未在形态类比样本上训练,却能识别这类类比。总体而言,我们发现RelBERT的性能显著优于基于提示规模大几个数量级的语言模型的策略,包括近期的基于GPT的模型和开源模型。

英文摘要:

Many applications need access to background knowledge about how different concepts and entities are related. Although Knowledge Graphs (KG) and Large Language Models (LLM) can address this need to some extent, KGs are inevitably incomplete and their relational schema is often too coarse-grained, while LLMs are inefficient and difficult to control. As an alternative, we propose to extract relation embeddings from relatively small language models. In particular, we show that masked language models such as RoBERTa can be straightforwardly fine-tuned for this purpose, using only a small amount of training data. The resulting model, which we call RelBERT, captures relational similarity in a surprisingly fine-grained way, allowing us to set a new state-of-the-art in analogy benchmarks. Crucially, RelBERT is capable of modelling relations that go well beyond what the model has seen during training. For instance, we obtained strong results on relations between named entities with a model that was only trained on lexical relations between concepts, and we observed that RelBERT can recognise morphological analogies despite not being trained on such examples. Overall, we find that RelBERT significantly outperforms strategies based on prompting language models that are several orders of magnitude larger, including recent GPT-based models and open source models.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑