Sharp Nearby, Fuzzy Far Away: How Neural Language Models Use Context
Open accessThe DOI matches its Crossref record; 30 of the 34 references it cites were found in a registry or an index.
Abstract
We know very little about how neural language models (LM) use prior linguistic context.In this paper, we investigate the role of context in an LSTM LM, through ablation studies.Specifically, we analyze the increase in perplexity when prior context words are shuffled, replaced, or dropped.On two standard datasets, Penn Treebank and WikiText-2, we find that the model is capable of using about 200 tokens of context on average, but sharply distinguishes nearby context (recent 50 tokens) from the distant history.The model is highly sensitive to the order of words within the most recent sentence, but ignores word order in the long-range context (beyond 50 tokens), suggesting the distant past is modeled only as a rough semantic field or topic.We further find that the neural caching model (Grave et al., 2017b) especially helps the LSTM to copy words from within this distant context.Overall, our analysis not only provides a better understanding of how neural LMs use their context, but also sheds light on recent success from cache-based models.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Figures







Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
The source backs part of the claim, not all of it — or backs it for a different population, condition or comparison.
In the citing paper
“These observations complement prior work, which found that non-instruction fine-tuned language models are biased towards recent tokens (i.e., the end of the input context; Khandelwal et al., 2018;Press et al., 2021).”
From Lost in the Middle: How Language Models Use Long Contexts (2024) · cites this paper as Khandelwal et al., 2018
Experimental — accuracy not yet measuredThe source backs part of the claim, not all of it — or backs it for a different population, condition or comparison.
In the citing paper
“Transformers process natural language as a sequence on finite context windows; however, global relationships among words beyond these windows cannot be completely modeled via sequence processing only.”
From Emotion Classification With Visibility Graphs (2025) · cites this paper as [13]
Experimental — accuracy not yet measured
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Hochreiter, S., & Schmidhuber, J. (1997) · Neural Computation · doi:10.1162/neco.1997.9.8.1735 · Cited by 102,318 · cited 1×
“LSTMs are designed to capture long-range dependencies in sequences (Hochreiter and Schmidhuber, 1997).”
BackgroundNeural Machine Translation by Jointly Learning to Align and Translate
Bahdanau, D., Cho, K., & Bengio, Y. (2014) · arXiv · doi:10.48550/arxiv.1409.0473 · Cited by 16,213 · cited 1×
“However, the success of copy mechanisms such as attention and caching (Bahdanau et al., 2015; Hill et al., 2016; Merity et al., 2017; Grave et al., 2017a,b) suggests that information in the distant context is very useful.”
BackgroundBuilding a Large Annotated Corpus of English: The Penn Treebank
Marcus, M. (1993) · doi:10.21236/ada273556 · Cited by 7,405
The Stanford CoreNLP Natural Language Processing Toolkit
Manning, C., Surdeanu, M., Bauer, J., Finkel, J., Bethard, S., & McClosky, D. (2014) · Proceedings of 52nd Annual Meeting of the Association for Computational Linguistics: System Demonstrations · doi:10.3115/v1/p14-5010 · Cited by 7,037 · cited 1×
“We obtain part-of-speech tags using Stanford CoreNLP (Manning et al., 2014).”
MethodRecurrent neural network based language model
Mikolov, T., Karafiát, M., Burget, L., Černocký, J., & Khudanpur, S. (2010) · Interspeech 2010 · doi:10.21437/interspeech.2010-343 · Cited by 5,390 · cited 1×
“We analyze two datasets commonly used for language modeling, Penn Treebank (PTB) (Marcus et al., 1993; Mikolov et al., 2010) and Wikitext-2 (Wiki) (Merity et al., 2017).”
MethodGenerating Sequences With Recurrent Neural Networks
Graves, A. (2013) · arXiv · doi:10.48550/arxiv.1308.0850 · Cited by 2,894 · cited 1×
“For several years now, neural language models (NLMs) (Graves, 2013; Jozefowicz et al., 2016; Grave et al., 2017a; Dauphin et al., 2017; Melis et al., 2018; Yang et al., 2018) have consistently outperformed classical n -gram models, an improvement often attributed to their ability to model…”
Background(2013) · Cited by 2,056
A theoretically grounded application of dropout in recurrent neural networks
Gal, Y., & Ghahramani, Z. (2016) · Cambridge University Engineering Department Publications Database · Cited by 1,600
Language Modeling with Gated Convolutional Networks
Dauphin, Y., Fan, A., Auli, M., & Grangier, D. (2016) · arXiv (Cornell University) · doi:10.48550/arxiv.1612.08083 · Cited by 1,080 · cited 2×
“For several years now, neural language models (NLMs) (Graves, 2013; Jozefowicz et al., 2016; Grave et al., 2017a; Dauphin et al., 2017; Melis et al., 2018; Yang et al., 2018) have consistently outperformed classical n-gram models, an improvement often attributed to their ability to model long-range dependencies in far…”
BackgroundExploring the Limits of Language Modeling
Józefowicz, R., Vinyals, O., Schuster, M., Shazeer, N., & Wu, Y. (2016) · arXiv (Cornell University) · doi:10.48550/arxiv.1602.02410 · Cited by 823 · cited 2×
“For several years now, neural language models (NLMs) (Graves, 2013; Jozefowicz et al., 2016; Grave et al., 2017a; Dauphin et al., 2017; Melis et al., 2018; Yang et al., 2018) have consistently outperformed classical n-gram models, an improvement often attributed to their ability to model long-range dependencies in far…”
Background
Cited by
Items 301–339 of 339
Transformer-based language modeling and decoding for conversational speech recognitionPreprint
Nassar, K. (2020) · arXiv (Cornell University) · doi:10.48550/arxiv.2001.01140 · Cited by 1
“and focus on past 50 words more heavily [2].”
BackgroundFlexible neural architectures for sequence modeling
Krause, B. (2020) · ERA · doi:10.7488/era/389 · Cited by 1
On-the-Fly Attention Modularization for Neural GenerationPreprint
Dong, Y., Bhagavatula, C., Lu, X., Hwang, J. D., Bosselut, A., Cheung, J. C. K., & Choi, Y. (2021) · arXiv (Cornell University)
Neural Network Algorithms for Ontology Informed Information Extraction
Xu, D. (2021) · UA Campus Repository (The University of Arizona)
Neural approaches to dialog modeling
Sankar, C. (2020) · doi:10.71781/10967 · Cited by 1
Chong, T. Y., Wang, X., Yang, L., & Wang, J. (2021) · arXiv (Cornell University) · doi:10.48550/arxiv.2104.01572
“Also, as the recurrent neural networks have shown to focus on only the nearest 50 tokens [7], the self-attention mechanism provides a better solution to exploit longer contexts.”
BackgroundDeep learning with knowledge graphs for fine-grained emotion classification in text
Schoene, A. M. (2021) · Repository@Hull (Worktribe) (University of Hull)
DCT: Dynamic Compressive Transformer for Modeling Unbounded SequencePreprint
Chang, K.-P., & Ma, W.-Y. (2021) · arXiv (Cornell University) · doi:10.48550/arxiv.2110.04821
Yan, B., Wang, H.-W., Chiu, S., Chiu, H.-S., & Chen, B. (2021) · arXiv (Cornell University)
Natural language processing on noisy text
Dong, R. (2021) · Digital Repository Service (Northeastern University) · doi:10.17760/d20416553
Joshi, A. (2022) · Buleria (Universidad de León) · doi:10.18002/10612/14429 · Cited by 1
Fadeev, V. A., Zaidullin, S. V., & Nadeev, A. (2022) · T-Comm - Телекоммуникации и Транспорт · doi:10.36724/2072-8735-2022-16-4-52-60 · Cited by 1
Processing of Analyzed Textual Information to a Meaningful Structure
Semenov, R. (2023) · Lecture notes in electrical engineering · doi:10.1007/978-3-031-22311-2_30
STP‐Net: A Signal Prediction Method of Laminar Decompression Robot Based on Swin Transformer
Hu, L., Zhang, Y., Zhang, J., Zhang, T., Song, X., Ji, X., Liu, S., Li, Z., & Li, W. (2023) · International Journal of Intelligent Systems · doi:10.1155/2023/7842495
“Khandelwal et al. experimentally showed that the efective context size of an LSTM-based language model averages about 200 tokens; however, it can only clearly distinguish 50 tokens that are nearby [24].”
BackgroundLeveraging Cross-Utterance Context For ASR Decoding
Flynn, R., & Ragni, A. (2023) · Interspeech (USB) · doi:10.21437/interspeech.2023-1941
“No benefit is found to using greater than 4 sentences of prior context, which may be due limitations of LSTMs use of context [20].”
BackgroundResearch on an Improved Transformer Model for Predicting Crude Oil Prices
Guan, H. (2024) · Management Science Informatization and Economic Innovation Development Conference (MSIEID) · doi:10.4108/eai.8-12-2023.2344782
Predictive Indicators of the Performance of Large Language Models
Sandia National Laboratories (SNL-NM), A., Link, H., Administration, U. A. S. F. H. R. A., Berman, B., Cooper, R., Dodge, H., Fluke, N., & VanCleave, R. (2024) · OSTI OAI (U.S. Department of Energy Office of Scientific and Technical Information) · doi:10.2172/2480207
Zhou, S., Zhang, X., Xing, X., Zhang, R., & Chen, J. (2024) · Asian Conference on Artificial Intelligence Technology (ACAIT) · doi:10.1109/acait63902.2024.11022277
“Moreover, modifications of RNNs like Gated Recurrent Units (GRUs) [8]and Long Short-Term Memory (LSTM) networks [9] have demonstrated limitations in retaining semantic information within documents [10].”
Rasel, H., Didar, A. B. S., Dinar, A. A. M., Fahad, F. I., Khan, M. A., & Biplob, M. B. (2025) · Preprints.org · doi:10.20944/preprints202507.1600.v1 · Cited by 1
Evaluation Framework for Highlight Explanations of Context Utilization in Language Models
Sun, J., Atanasova, P., Choudhury, S. R., Islam, S. M., & Augenstein, I. (2026) · Computational Linguistics · doi:10.1162/coli.a.621 · Cited by 1
Semantic Parsing in Limited Resource Conditions
LI, Z. (2023) · arXiv (Cornell University) · doi:10.26180/24083265 · Cited by 1
Towards Better Generative Models of Language
Melis, G. (2024) · UCL Discovery (University College London)
On representation learning for generative models of text
Subramanian, S. (2021) · doi:10.71781/11090
Implications of generative AI on small to medium sized e-commerce businesses
Aydin, J. (2025) · Theseus (Ammattikorkeakoulujen) · Cited by 1
Päivärinta, M. (2022) · UTUPub (University of Turku) · Cited by 5
Pilault, J. (2025) · PolyPublie (École Polytechnique de Montréal)
Classification of health product defect reports by deep learning
Sancenón, V., Huang, Y., Zou, L., Teo, D. C. H., Dorajoo, S. R., Ang, P. S., Goh, H. L., & Ta, A. W. A. (2026) · Scientific Reports · doi:10.1038/s41598-026-43961-3
“We selected a BERT-based architecture due to its lightweight and ability to extract long term syntactic and semantic dependencies 7–9 compared to less efficient RNNs 18,53 .”
How Well Can AI Contribute to Interior Architecture? A Comparative Analysis of Descriptive Accuracy
Şekerci, Y., & Develier, M. (2026) · Journal of Computational Design · doi:10.53710/jcode.1765357
Towards efficient, general and robust entity disambiguation systems
Chen, L. (2023) · theses.fr (ABES) · doi:10.70675/abee8a0cz824dz4e34z917azffda9fe5cd83
Machine learning for timing estimation
Amalou, A. N. (2023) · theses.fr (ABES) · doi:10.70675/d276d583z0ce4z41b2za54azf081cb28f62c · Cited by 2
Inter-case Informed Business Process Suffix Prediction Integrating Trace and Log Information
He, X., Smedt, J. D., Broucke, S. V., & Weerdt, J. D. (2026) · Lecture notes in business information processing · doi:10.1007/978-3-032-13426-4_4 · Cited by 1
Ψηφιοποίηση Μεγάλης Κλίμακας Δεδομένων Χειρόγραφου Ιατρικού Φακέλου
Rongakos, K. (2026) · DSpace - NTUA (National Technical University of Athens) · doi:10.26240/heal.ntua.32385
Wang, X., Ji, Y., & Fukuda, K. (2026) · IEEE Wireless Communications and Networking Conference · doi:10.1109/wcnc65185.2026.11555586 · Cited by 1
“However, these methods typically follow a unitary model paradigm, which requires scaling up the model to extend the effective context length ( a.k.a. the memory horizon [7], [8]) for long-sequence inputs.”
An Effective AI-Driven Prompting Approach for Video Summarization System Using Flan-T5 Model
Shankar, R. P., Kumar, M. K., Raj, P. M. S., & Chetti, P. (2026) · Communications in computer and information science · doi:10.1007/978-3-032-27117-4_22
Mitigating Tokenization-Induced Distance Distortion in Long-Context Multilingual Machine Translation
Selialia, K., Nzeyimana, A., & Anwar, F. M. (2026) · Proceedings of the conference - Association for Computational Linguistics. Meeting · doi:10.18653/v1/2026.acl-long.1696 · Cited by 1
Efficient Learned Data Compression via Dual-Stream Feature Decoupling
Ma, H., Shi, X., Hui, S., Yue, X., Liu, X., Wang, G., & Cai, W. (2026) · Proceedings of the conference - Association for Computational Linguistics. Meeting · doi:10.18653/v1/2026.acl-long.324 · Cited by 2
Can Open-Weight LLMs Predict Test Outcomes from Traces? A Cross-Subject Boundary Study on Tests4Py
Rasper, G., Mammadov, T., Smytzek, M., & Zeller, A. (2026) · doi:10.1145/3843782.3844663
The New Perspectiva Artificialis: From the Mechanical Eye to the Algorithmic Symbolic Form
Hutson, J., & Plate, D. (2026) · Routledge eBooks · doi:10.4324/9781042013173
Metadata
- Authors
- Khandelwal, U., He, H., Qi, P., & Jurafsky, D.
- Affiliations
- Stanford University (US)
- Venue
- Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)
- Published
- 2018
- Pages
- 284-294
- ISSN
- 0736-587X (ISSN-L)
- OpenAlex
- W2963951265
- Cited by
- 303
- References
- 34
- Citations by year
- 2026: 9 · 2025: 9 · 2024: 24 · 2023: 42 · 2022: 43 · 2021: 56 · 2020: 48 · 2019: 57 · 2018: 15
- FWCI
- 17.96
- Type
- conference paper
- Language
- en
- Open access
- hybrid
- doi.org
- Licence
- cc-by
- Locations
- Proceedings of the conference - Association for Computational Linguistics. Meeting (publishedVersion, cc-by)
- arXiv (Cornell University) (submittedVersion)
- arXiv (Cornell University)
- Funders
- National Science Foundation (1514268)
- Defense Advanced Research Projects Agency
- Army Research Office
- Topics
- Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
- Physical Sciences › Computer Science › Artificial Intelligence › Natural Language Processing Techniques
- Physical Sciences › Computer Science › Artificial Intelligence › Speech Recognition and Synthesis
- Keywords
- neural language models, long-range context, LSTM, context length, perplexity, semantic field, topic modeling, ablation study, Penn Treebank, WikiText-2
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.