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 View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

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

For agents, on Syntology's MCP service (how to connect):

Code

No sample from the archive's official repository (salesforce/awd-lstm-lm) is linked to this paper; the 7 samples below come from 3 community repositories. Syntology harvested code from salesforce/awd-lstm-lm for another paper.

salesforce/awd-lstm-lm: Syntology's graph links these samples to Compositional Demographic Word Embeddings (arXiv:2010.02986; that paper's own run record: 4 ran (of which 0 constructed an object rather than computing a result; 4 with no instrument failure: 2 honoured, 0 violated, 2 with no contract checked; 0 where Syntology's instrument failed) · 1 unverified); nothing checks that they implement this paper's method.

Syntology 7 code samples harvested from 3 repositories linked to this paper: 6 ran (of which 0 constructed an object rather than computing a result; 2 with no instrument failure: 2 honoured, 0 violated, 0 with no contract checked; 4 where Syntology's instrument failed) · 1 unverified. Where Syntology's instrument failed: 3 where our contract draft was wrong; 1 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: community (archive-listed): 7 samples from 3 repositories, 6 ran (2 with no instrument failure; 4 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

No sample is linked to this paper from 17 of its repositories that Syntology harvested for other papers:

Levels written on 2026-09-22 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

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

salesforce/awd-lstm-lm officialmentioned on GitHubpytorchBSD-3-ClauseSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Compositional Demographic Word Embeddings (arXiv:2010.02986; that paper's own run record: 4 ran (of which 0 constructed an object rather than computing a result; 4 with no instrument failure: 2 honoured, 0 violated, 2 with no contract checked; 0 where Syntology's instrument failed) · 1 unverified); nothing checks that they implement this paper's method. report
Asteur/RERITES-AvgWeightDescentLSTM-PoetryGeneration mentioned on GitHubpytorchSyntology: 1 sample, 1 ran (0 instrument-failed) · 0 unverified report
AtheMathmo/AggMo mentioned on GitHubpytorchSyntology: not harvested report
AtheMathmo/lookahead-lstm mentioned on GitHubpytorchBSD-3-ClauseSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to An Analysis of Neural Language Modeling at Multiple Scales (arXiv:1803.08240; that paper's own run record: 14 ran (of which 0 constructed an object rather than computing a result; 13 with no instrument failure: 2 honoured, 0 violated, 11 with no contract checked; 1 where Syntology's instrument failed) · 4 unverified); nothing checks that they implement this paper's method. report
BenjiKCF/AWD-LSTM-sentiment-classifier mentioned on GitHubpytorchSyntology: not harvested report
Han-JD/GRU-D mentioned on GitHubpytorchSyntology: not harvested report
Janus-Shiau/awd-lstm-tensorflow mentioned on GitHubtfSyntology: not harvested report
JessikaSmith/language_model mentioned on GitHubtfSyntology: not harvested report
Machine-Learning-Tokyo/Poetry-GAN mentioned on GitHubMITSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context (arXiv:1901.02860; that paper's own run record: 67 ran (of which 37 constructed an object rather than computing a result; 49 with no instrument failure: 4 honoured, 1 violated, 44 with no contract checked; 18 where Syntology's instrument failed) · 76 unverified); nothing checks that they implement this paper's method. report
Mees-Molenaar/protein_location mentioned on GitHubpytorchSyntology: not harvested report
NightmareVoid/LSTM_for_EEG mentioned on GitHubpytorchSyntology: not harvested report
S-Abdelnabi/awt mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Adversarial Watermarking Transformer: Towards Tracing Text Provenance with Data Hiding (arXiv:2009.03015; that paper's own run record: 2 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 1 honoured, 0 violated, 0 with no contract checked; 1 where Syntology's instrument failed) · 2 unverified); nothing checks that they implement this paper's method. report
SachinIchake/KALM mentioned on GitHubpytorchBSD-3-ClauseSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to An Analysis of Neural Language Modeling at Multiple Scales (arXiv:1803.08240; that paper's own run record: 14 ran (of which 0 constructed an object rather than computing a result; 13 with no instrument failure: 2 honoured, 0 violated, 11 with no contract checked; 1 where Syntology's instrument failed) · 4 unverified); nothing checks that they implement this paper's method. report
ahmetumutdurmus/awd-lstm mentioned on GitHubpytorchSyntology: 3 samples, 3 ran (2 instrument-failed) · 0 unverified report
alexandra-chron/ntua-slp-wassa-iest2018 mentioned on GitHubpytorchSyntology: not harvested report
alexandra-chron/wassa-2018 mentioned on GitHubpytorchSyntology: not harvested report
ari-holtzman/genlm mentioned on GitHubpytorchBSD-3-ClauseSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to An Analysis of Neural Language Modeling at Multiple Scales (arXiv:1803.08240; that paper's own run record: 14 ran (of which 0 constructed an object rather than computing a result; 13 with no instrument failure: 2 honoured, 0 violated, 11 with no contract checked; 1 where Syntology's instrument failed) · 4 unverified); nothing checks that they implement this paper's method. report
arvieFrydenlund/awd-lstm-lm mentioned on GitHubpytorchBSD-3-ClauseSyntology: not harvested report
castorini/Castor mentioned on GitHubpytorchSyntology: not harvested report
castorini/hedwig mentioned on GitHubpytorchApache-2.0Syntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to DocBERT: BERT for Document Classification (arXiv:1904.08398; that paper's own run record: 11 ran (of which 0 constructed an object rather than computing a result; 11 with no instrument failure: 0 honoured, 0 violated, 11 with no contract checked; 0 where Syntology's instrument failed) · 3 unverified); nothing checks that they implement this paper's method. report
chris-tng/semi-supervised-nlp mentioned on GitHubpytorchMITSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Manifold Mixup: Better Representations by Interpolating Hidden States (arXiv:1806.05236; that paper's own run record: 7 ran (of which 0 constructed an object rather than computing a result; 5 with no instrument failure: 0 honoured, 0 violated, 5 with no contract checked; 2 where Syntology's instrument failed) · 4 unverified); nothing checks that they implement this paper's method. report
cstorm125/thai2fit mentioned on GitHubpytorchSyntology: not harvested report
google-research/google-research mentioned on GitHubtfSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Efficient Neural Architecture Search via Parameter Sharing (arXiv:1802.03268; that paper's own run record: 18 ran (of which 10 constructed an object rather than computing a result; 12 with no instrument failure: 1 honoured, 0 violated, 11 with no contract checked; 6 where Syntology's instrument failed) · 20 unverified), Milking CowMask for Semi-Supervised Image Classification (arXiv:2003.12022; that paper's own run record: 1 ran (of which 1 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 0 where Syntology's instrument failed) · 1 unverified; the one sample that ran constructed an object rather than computing a result), Neural Additive Models: Interpretable Machine Learning with Neural Nets (arXiv:2004.13912; that paper's own run record: 26 ran (of which 14 constructed an object rather than computing a result; 26 with no instrument failure: 5 honoured, 0 violated, 21 with no contract checked; 0 where Syntology's instrument failed) · 7 unverified) and 21 more (every one in this page's JSON twin); nothing checks that they implement this paper's method. report
iwangjian/ByteCup2018 mentioned on GitHubpytorchSyntology: not harvested report
jb33k/awd-lstm-lm-ThinkNet mentioned on GitHubpytorchBSD-3-ClauseSyntology: not harvested report
jhave/RERITES-AvgWeightDescentLSTM-PoetryGeneration mentioned on GitHubpytorchSyntology: not harvested report
jkkummerfeld/emnlp20lm mentioned on GitHubpytorchSyntology: not harvested report
llppff/ptb-lstmorqrnn-pytorch mentioned on GitHubpytorchBSD-3-ClauseSyntology: not harvested report
mamamot/Russian-ULMFit mentioned on GitHubpytorchSyntology: not harvested report
mnhng/hier-char-emb mentioned on GitHubpytorchBSD-3-ClauseSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to An Analysis of Neural Language Modeling at Multiple Scales (arXiv:1803.08240; that paper's own run record: 14 ran (of which 0 constructed an object rather than computing a result; 13 with no instrument failure: 2 honoured, 0 violated, 11 with no contract checked; 1 where Syntology's instrument failed) · 4 unverified); nothing checks that they implement this paper's method. report
muellerzr/CodeFest_2019 mentioned on GitHubSyntology: not harvested report
nkcr/overlap-ml mentioned on GitHubpytorchBSD-3-ClauseSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Breaking the Softmax Bottleneck: A High-Rank RNN Language Model (arXiv:1711.03953; that paper's own run record: 12 ran (of which 0 constructed an object rather than computing a result; 11 with no instrument failure: 0 honoured, 0 violated, 11 with no contract checked; 1 where Syntology's instrument failed) · 11 unverified); nothing checks that they implement this paper's method. report
noise-field/Russian-ULMFit mentioned on GitHubpytorchSyntology: not harvested report
philippwirth/awd-lstm-test mentioned on GitHubpytorchBSD-3-ClauseSyntology: not harvested report
philippwirth/treelangrnn mentioned on GitHubpytorchBSD-3-ClauseSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to An Analysis of Neural Language Modeling at Multiple Scales (arXiv:1803.08240; that paper's own run record: 14 ran (of which 0 constructed an object rather than computing a result; 13 with no instrument failure: 2 honoured, 0 violated, 11 with no contract checked; 1 where Syntology's instrument failed) · 4 unverified); nothing checks that they implement this paper's method. report
prajjwal1/language-modelling mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Universal Language Model Fine-tuning for Text Classification (arXiv:1801.06146; that paper's own run record: 2 ran (of which 0 constructed an object rather than computing a result; 0 with no instrument failure: 0 honoured, 0 violated, 0 with no contract checked; 2 where Syntology's instrument failed) · 3 unverified); nothing checks that they implement this paper's method. report
rajs96/ULMFiT-Twitter-US-Airline-Sentiment mentioned on GitHubSyntology: not harvested report
soyoung97/awd-lstm-gru mentioned on GitHubpytorchBSD-3-ClauseSyntology: not harvested report
uchange/ulangel mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Universal Language Model Fine-tuning for Text Classification (arXiv:1801.06146; that paper's own run record: 2 ran (of which 0 constructed an object rather than computing a result; 0 with no instrument failure: 0 honoured, 0 violated, 0 with no contract checked; 2 where Syntology's instrument failed) · 3 unverified); nothing checks that they implement this paper's method. report
uclanlp/NamedEntityLanguageModel mentioned on GitHubpytorchBSD-3-ClauseSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Building Language Models for Text with Named Entities (arXiv:1805.04836; that paper's own run record: 0 ran · 1 unverified); nothing checks that they implement this paper's method. report
varshinireddyt/ULMFiT mentioned on GitHubSyntology: not harvested report
vganesh46/awd-lstm-pytorch-implementation mentioned on GitHubpytorchSyntology: 3 samples, 2 ran (2 instrument-failed) · 1 unverified report
dmlc/gluon-nlp mxnetApache-2.0Syntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to GluonCV and GluonNLP: Deep Learning in Computer Vision and Natural Language Processing (arXiv:1907.04433; that paper's own run record: 1 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified); nothing checks that they implement this paper's method. report
fastai/fastai pytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to fastai: A Layered API for Deep Learning (arXiv:2002.04688; that paper's own run record: 1 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 0 where Syntology's instrument failed) · 7 unverified); nothing checks that they implement this paper's method. 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.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

7 samples harvested: 6 ran (of which 0 constructed an object rather than computing a result; 2 with no instrument failure: 2 honoured, 0 violated, 0 with no contract checked; 4 where Syntology's instrument failed) · 1 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

2ran · honoured contract
3ran · our draft was wrong
1ran; the contract check could not run
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; the list below is grouped by repository, each group headed by its name and what it is to the paper. “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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

Asteur/RERITES-AvgWeightDescentLSTM-PoetryGeneration community (archive-listed) 1 sample, 1 ran (0 instrument-failed) · 0 unverified
one_hot in 150 papers
census: 18 implementations from 25 papers, 10 distinct outputs across 6 buckets, one shared input per bucket
pointer.py ran · honoured contract fingerprinted no licence file found · pointer only · d38f82da04a3f93e · report fixture: signature idx:int/0/int, size:int/0/int, cuda:bool/0/bool · returned Tensor · level recorded 2026-09-22
ahmetumutdurmus/awd-lstm community (archive-listed) 3 samples, 3 ran (2 instrument-failed) · 0 unverified
batchify in 71 papers
census: 6 implementations from 6 papers, 3 distinct outputs across 3 buckets, one shared input per bucket this sample: bucket 2 of 3, arg 1: rank 1, kind float, dtype float32
finetune.py ran · our draft was wrong fingerprinted no licence file found · pointer only · 5edffb2dfb36c8c4 · report fixture: signature data:Tensor/1/float, batch_size:int/0/int · returned Tensor · level recorded 2026-09-22
get_seq_len finetune.py ran · honoured contract fingerprinted no licence file found · pointer only · 3976786dc1c29943 · report fixture: signature bptt:int/0/int · returned int · level recorded 2026-09-22
minibatch finetune.py ran · our draft was wrong fingerprinted no licence file found · pointer only · b34f2200862bbeed · report fixture: signature data:Tensor/2/float, seq_length:int/0/int · returned list · level recorded 2026-09-22
vganesh46/awd-lstm-pytorch-implementation community (archive-listed) 3 samples, 2 ran (2 instrument-failed) · 1 unverified
accuracy in 872 papers
census: 8 implementations from 7 papers, 7 distinct outputs across 6 buckets, one shared input per bucket
model/net.py ran; the contract check could not run (RAISES) · metamorphic tier: invariant no licence file found · pointer only · 9e004b5978b51581 · report fixture: signature outputs:ndarray/2/float, labels:ndarray/2/int · returned float64 · level recorded 2026-09-22
evaluate in 514 papers evaluate.py ran · our draft was wrong no licence file found · pointer only · 785b28e30c24782a · report fixture: signature model:callable/0/?, loss_fn:callable/0/?, data_iterator:generator/0/?, metrics:dict/0/?, params:Params/0/?, num_steps:int/0/int · returned dict · level recorded 2026-09-22
loss_fn in 55 papers
census: 8 implementations from 9 papers, 6 distinct outputs across 3 buckets, one shared input per bucket
model/net.py 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