Skip to main content
QUICK REVIEW

[论文解读] GNN-LM: Language Modeling based on Global Contexts via GNN

Yuxian Meng, Shi Zong|arXiv (Cornell University)|Oct 17, 2021
Topic ModelingComputer Science参考文献 67被引用 18
一句话总结

GNN-LM 提出了一种新颖的语言建模框架,通过图神经网络(GNN)整合全局上下文信息,提升序列预测性能。该方法构建了一个异构图,将输入标记与训练语料库中语义相似的邻近上下文关联起来,使 GNN 能够聚合跨上下文的信息以改善解码效果。该方法在 WikiText-103 上实现了 14.8 的新 SOTA 语言模型困惑度,较基线模型提升了 3.9 个点。

ABSTRACT

Inspired by the notion that ``{\it to copy is easier than to memorize}``, in this work, we introduce GNN-LM, which extends the vanilla neural language model (LM) by allowing to reference similar contexts in the entire training corpus. We build a directed heterogeneous graph between an input context and its semantically related neighbors selected from the training corpus, where nodes are tokens in the input context and retrieved neighbor contexts, and edges represent connections between nodes. Graph neural networks (GNNs) are constructed upon the graph to aggregate information from similar contexts to decode the token. This learning paradigm provides direct access to the reference contexts and helps improve a model's generalization ability. We conduct comprehensive experiments to validate the effectiveness of the GNN-LM: GNN-LM achieves a new state-of-the-art perplexity of 14.8 on WikiText-103 (a 3.9 point improvement over its counterpart of the vanilla LM model), and shows substantial improvement on One Billion Word and Enwiki8 datasets against strong baselines. In-depth ablation studies are performed to understand the mechanics of GNN-LM. \footnote{The code can be found at https://github.com/ShannonAI/GNN-LM

研究动机与目标

  • 为解决基于记忆的语言模型在处理罕见或长尾样本时因过度依赖内部参数化而表现受限的问题。
  • 探究参考相似训练上下文(即“开卷”策略)是否能提升语言建模的泛化能力并降低困惑度。
  • 设计一种结构化机制,通过基于图的表征学习,有效整合检索到的邻近上下文信息至解码过程。
  • 评估将 GNN-LM 与 k-NN 语言模型结合以进一步提升性能的有效性。

提出的方法

  • 模型构建一个有向异构图,其中节点代表输入上下文及其通过密集向量相似度检索到的 k 个最近邻上下文中的标记。
  • 定义两类边:连接同一上下文内标记的上下文内边(intra-context edges),以及连接邻近上下文标记与输入上下文的上下文间边(inter-context edges)。
  • 图神经网络(GNN)在上下文内和上下文间边上传播信息,更新节点表征以捕捉跨上下文依赖关系。
  • 使用输入上下文最后一个标记的更新表征,通过词汇表上的 softmax 层预测下一个标记。
  • 通过插值最近邻的预测结果,将框架与 k-NN-LM 结合,进一步提升性能。
  • 邻近上下文的检索基于上下文序列的密集向量表示,相似度通过余弦距离度量。

实验结果

研究问题

  • RQ1将语义相似的训练上下文作为外部参考,是否能超越记忆机制,提升语言模型性能?
  • RQ2异构图结构如何增强输入上下文与检索到的邻近上下文之间的信息流动?
  • RQ3基于 GNN 的消息传递在聚合跨上下文知识以用于下一个标记预测方面有何贡献?
  • RQ4将 GNN-LM 与 k-NN-LM 结合后,对标准基准测试的困惑度和泛化能力有何影响?

主要发现

  • GNN-LM 在 WikiText-103 基准测试中实现了 14.8 的新 SOTA 困惑度,较基线语言模型提升 3.9 个点。
  • 该模型在 One Billion Word 和 Enwik8 数据集上也表现出显著提升,优于所有三个基准测试中的强基线模型。
  • 消融实验证实,GNN 中的上下文内与上下文间消息传递均对性能提升有显著贡献。
  • 将 k-NN-LM 与 GNN-LM 结合后产生协同增益,证明了检索方法与图方法之间的互补性。
  • 复杂度分析表明,该方法仍具有可扩展性,但检索与图构建在大规模数据集上仍是计算瓶颈。

阅读本论文

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

在 Nubint 中阅读本论文

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