GNN-LM: Language Modeling based on Global Contexts via GNN

Yuxian Meng, Shi Zong, Xiaoya Li, Xiaofei Sun, Tianwei Zhang +2 more
10/17/2021
cs.CL
gnn

Official code: ShannonAI/GNN-LM (47 stars, Python, MIT, last commit 2021-12-10).

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.

Show full abstract

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

View on arXivView PDF

Code Implementations(1)

ShannonAI/GNN-LMOfficial100%
MIT
477Python, CudaNov 17, 20214 years agoMIT

Similar Papers

Cite this paper

@article{meng2021gnnlm,
  title  = {GNN-LM: Language Modeling based on Global Contexts via GNN},
  author = {Yuxian Meng and Shi Zong and Xiaoya Li and Xiaofei Sun and Tianwei Zhang and Fei Wu and Jiwei Li},
  year   = {2021},
  eprint = {2110.08743},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2110.08743}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2110.08743.svg)](https://codeofpaper.com/paper/2110.08743)

Discussion