Papers › Regularizing and Optimizing LSTM Language Models

Regularizing and Optimizing LSTM Language Models

7 Aug 2017ICLR 2018 1arXiv:1708.02182archive 2025-07-28

Stephen Merity, Nitish Shirish Keskar, Richard Socher

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.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="1708.02182")

Code

Syntology Ran 6 of 7 code samples harvested from 3 repositories linked to this paper; 1 has no recorded run. Of those that ran: 2 ran · honoured contract; 3 ran · our draft was wrong; 1 ran · fixture could not drive it.

By repository: community (archive-listed): 7 samples from 3 repositories, 6 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

45 repositories listed; official and paper-mentioned ones first.

salesforce/awd-lstm-lm officialmentioned on GitHubpytorchBSD-3-Clause report
AtheMathmo/AggMo mentioned on GitHubpytorch report
AtheMathmo/lookahead-lstm mentioned on GitHubpytorchBSD-3-Clause report
BenjiKCF/AWD-LSTM-sentiment-classifier mentioned on GitHubpytorch report
Han-JD/GRU-D mentioned on GitHubpytorch report
Janus-Shiau/awd-lstm-tensorflow mentioned on GitHubtf report
JessikaSmith/language_model mentioned on GitHubtf report
Machine-Learning-Tokyo/Poetry-GAN mentioned on GitHubMIT report
Mees-Molenaar/protein_location mentioned on GitHubpytorch report
NightmareVoid/LSTM_for_EEG mentioned on GitHubpytorch report
S-Abdelnabi/awt mentioned on GitHubpytorch report
SachinIchake/KALM mentioned on GitHubpytorchBSD-3-Clause report
ahmetumutdurmus/awd-lstm mentioned on GitHubpytorch report
alexandra-chron/ntua-slp-wassa-iest2018 mentioned on GitHubpytorch report
alexandra-chron/wassa-2018 mentioned on GitHubpytorch report
ari-holtzman/genlm mentioned on GitHubpytorchBSD-3-Clause report
arvieFrydenlund/awd-lstm-lm mentioned on GitHubpytorchBSD-3-Clause report
castorini/Castor mentioned on GitHubpytorch report
castorini/hedwig mentioned on GitHubpytorchApache-2.0 report
chris-tng/semi-supervised-nlp mentioned on GitHubpytorchMIT report
cstorm125/thai2fit mentioned on GitHubpytorch report
google-research/google-research mentioned on GitHubtf report
iwangjian/ByteCup2018 mentioned on GitHubpytorch report
jb33k/awd-lstm-lm-ThinkNet mentioned on GitHubpytorchBSD-3-Clause report
jkkummerfeld/emnlp20lm mentioned on GitHubpytorch report
llppff/ptb-lstmorqrnn-pytorch mentioned on GitHubpytorchBSD-3-Clause report
mamamot/Russian-ULMFit mentioned on GitHubpytorch report
mnhng/hier-char-emb mentioned on GitHubpytorchBSD-3-Clause report
muellerzr/CodeFest_2019 mentioned on GitHub report
nkcr/overlap-ml mentioned on GitHubpytorchBSD-3-Clause report
noise-field/Russian-ULMFit mentioned on GitHubpytorch report
philippwirth/awd-lstm-test mentioned on GitHubpytorchBSD-3-Clause report
philippwirth/treelangrnn mentioned on GitHubpytorchBSD-3-Clause report
prajjwal1/language-modelling mentioned on GitHubpytorch report
soyoung97/awd-lstm-gru mentioned on GitHubpytorchBSD-3-Clause report
uchange/ulangel mentioned on GitHubpytorch report
uclanlp/NamedEntityLanguageModel mentioned on GitHubpytorchBSD-3-Clause report
varshinireddyt/ULMFiT mentioned on GitHub report
dmlc/gluon-nlp mxnetApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

7 samples harvested; 6 ran; 2 honoured the contract we drafted; 1 has no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · honoured contract
3ran · our draft was wrong
1ran · fixture could not drive it
1unverified

Licence: 7 of the 7 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 3 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

accuracy vganesh46/awd-lstm-pytorch-implementation/model/net.py community (archive-listed) ran · fixture could not drive it fingerprinted no licence file found · pointer only · 9e004b5978b51581 · report
batchify ahmetumutdurmus/awd-lstm/finetune.py community (archive-listed) ran · our draft was wrong fingerprinted no licence file found · pointer only · 5edffb2dfb36c8c4 · report
evaluate vganesh46/awd-lstm-pytorch-implementation/evaluate.py community (archive-listed) ran · our draft was wrong no licence file found · pointer only · 785b28e30c24782a · report
get_seq_len ahmetumutdurmus/awd-lstm/finetune.py community (archive-listed) ran · honoured contract fingerprinted no licence file found · pointer only · 3976786dc1c29943 · report
minibatch ahmetumutdurmus/awd-lstm/finetune.py community (archive-listed) ran · our draft was wrong fingerprinted no licence file found · pointer only · b34f2200862bbeed · report
one_hot Asteur/RERITES-AvgWeightDescentLSTM-PoetryGeneration/pointer.py community (archive-listed) ran · honoured contract fingerprinted no licence file found · pointer only · d38f82da04a3f93e · report
loss_fn vganesh46/awd-lstm-pytorch-implementation/model/net.py community (archive-listed) unverified no licence file found · pointer only · f7bb4492f97bc8b6 · report

Tasks

Image ClassificationLanguage ModelingLanguage ModellingTranslation

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Language Modelling Penn Treebank (Word Level) AWD-LSTM + continuous cache pointer Params 24M #17 of 43 Archive leaderboard report
Language Modelling Penn Treebank (Word Level) AWD-LSTM + continuous cache pointer Test perplexity 52.8 #17 of 43 Archive leaderboard report
Language Modelling Penn Treebank (Word Level) AWD-LSTM + continuous cache pointer Validation perplexity 53.9 #17 of 43 Archive leaderboard report
Language Modelling Penn Treebank (Word Level) AWD-LSTM Params 24M #30 of 43 Archive leaderboard report
Language Modelling Penn Treebank (Word Level) AWD-LSTM Test perplexity 57.3 #30 of 43 Archive leaderboard report
Language Modelling Penn Treebank (Word Level) AWD-LSTM Validation perplexity 60.0 #30 of 43 Archive leaderboard report
Language Modelling WikiText-2 AWD-LSTM + continuous cache pointer Number of params 33M #19 of 38 Archive leaderboard report
Language Modelling WikiText-2 AWD-LSTM + continuous cache pointer Test perplexity 52.0 #19 of 38 Archive leaderboard report
Language Modelling WikiText-2 AWD-LSTM + continuous cache pointer Validation perplexity 53.8 #19 of 38 Archive leaderboard report
Language Modelling WikiText-2 AWD-LSTM Number of params 33M #31 of 38 Archive leaderboard report
Language Modelling WikiText-2 AWD-LSTM Test perplexity 65.8 #31 of 38 Archive leaderboard report
Language Modelling WikiText-2 AWD-LSTM Validation perplexity 68.6 #31 of 38 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Introduced by this paper: AWD-LSTM, NT-ASGD

AWD-LSTMActivation RegularizationDropConnectDropoutEmbedding DropoutLSTMNT-ASGDNeural CacheSigmoid ActivationTanh ActivationTemporal Activation RegularizationVariational DropoutWeight Tying

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections