arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2401.11374cs.CLcs.AIcs.LG
收藏

语言模型作为层级编码器

Language Models as Hierarchy Encoders

University of Oxford(牛津大学);University of Cambridge(剑桥大学);The University of Manchester(曼彻斯特大学)

Yuan He, Zhangdie Yuan, Jiaoyan Chen, Ian Horrocks

AI总结:

本文提出将预训练语言模型重新训练为层级Transformer编码器(HiTs),通过在自适应曲率的庞加莱球中结合双曲聚类与向心损失显式编码层级结构,并在传递推理、蕴含预测和跨层级迁移任务上一致优于多种基线。

摘要:

解释语言中潜在的层级结构是当前语言模型(LMs)的一个关键局限。尽管先前研究已隐式利用这些层级来增强语言模型,但对其显式编码的方法仍有待探索。为解决这一问题,我们提出了一种新颖的方法,将基于Transformer编码器的语言模型重新训练为层级Transformer编码器(HiTs),利用双曲空间的广阔特性。我们的方法将预训练语言模型的输出嵌入空间置于一个曲率随嵌入维度自适应调整的庞加莱球中,随后在双曲聚类和向心损失上进行训练。这些损失旨在有效地对相关实体(以文本形式输入)进行聚类,并将其按层级组织。我们将HiTs与预训练语言模型、标准微调语言模型以及多个双曲嵌入基线进行了评估,重点关注它们在模拟传递推理、预测蕴含关系以及跨层级迁移知识方面的能力。结果表明,HiTs在这些任务中一致地优于所有基线,突显了我们重新训练的层级编码器的有效性和可迁移性。

英文摘要:

Interpreting hierarchical structures latent in language is a key limitation of current language models (LMs). While previous research has implicitly leveraged these hierarchies to enhance LMs, approaches for their explicit encoding are yet to be explored. To address this, we introduce a novel approach to re-train transformer encoder-based LMs as Hierarchy Transformer encoders (HiTs), harnessing the expansive nature of hyperbolic space. Our method situates the output embedding space of pre-trained LMs within a Poincaré ball with a curvature that adapts to the embedding dimension, followed by training on hyperbolic clustering and centripetal losses. These losses are designed to effectively cluster related entities (input as texts) and organise them hierarchically. We evaluate HiTs against pre-trained LMs, standard fine-tuned LMs, and several hyperbolic embedding baselines, focusing on their capabilities in simulating transitive inference, predicting subsumptions, and transferring knowledge across hierarchies. The results demonstrate that HiTs consistently outperform all baselines in these tasks, underscoring the effectiveness and transferability of our re-trained hierarchy encoders.

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

↑