Regularizing and Optimizing LSTM Language Models

Stephen Merity, Nitish Shirish Keskar, Richard Socher
8/7/2017
cs.CLcs.LGcs.NE

Official code: salesforce/awd-lstm-lm (1,990 stars, BSD-3-Clause, PyTorch, last commit 2022-02-12).

Abstract

Recurrent neural networks (RNNs), such as long short-term memory networks (LSTMs), serve as a fundamental building block for many sequence learning tasks, including machine translation, language modeling, and question answering. In this paper, we consider the specific problem of word-level language modeling and investigate strategies for regularizing and optimizing LSTM-based models. We propose the weight-dropped LSTM which uses DropConnect on hidden-to-hidden weights as a form of recurrent regularization. Further, we introduce NT-ASGD, a variant of the averaged stochastic gradient method, wherein the averaging trigger is determined using a non-monotonic condition as opposed to being tuned by the user. Using these and other regularization strategies, we achieve state-of-the-art word level perplexities on two data sets: 57.3 on Penn Treebank and 65.8 on WikiText-2. In exploring the effectiveness of a neural cache in conjunction with our proposed model, we achieve an even lower state-of-the-art perplexity of 52.8 on Penn Treebank and 52.0 on WikiText-2.

View on arXivView PDF

Code Implementations(1)

PyTorchBSD-3-Clause

LSTM and QRNN Language Model Toolkit for PyTorch

1,990484Shell, PythonAug 8, 20174 years agoBSD-3-Clause
language-modellstmpytorchqrnnsgd

Cite this paper

@article{merity2017regularizing,
  title  = {Regularizing and Optimizing LSTM Language Models},
  author = {Stephen Merity and Nitish Shirish Keskar and Richard Socher},
  year   = {2017},
  eprint = {1708.02182},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1708.02182}
}

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/1708.02182.svg)](https://codeofpaper.com/paper/1708.02182)

Discussion