{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,11,14]],"date-time":"2026-11-14T07:06:55Z","timestamp":1794640015249,"version":"4.9.1"},"reference-count":38,"publisher":"MIT Press","license":[{"start":{"date-parts":[[2021,4,28]],"date-time":"2021-04-28T00:00:00Z","timestamp":1619568000000},"content-version":"vor","delay-in-days":117,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":["direct.mit.edu"],"crossmark-restriction":true},"short-container-title":[],"published-print":{"date-parts":[[2021,4,26]]},"abstract":"<jats:title>Abstract<\/jats:title><jats:p>We present a language model that combines a large parametric neural network (i.e., a transformer) with a non-parametric episodic memory component in an integrated architecture. Our model uses extended short-term context by caching local hidden states\u2014similar to transformer-XL\u2014and global long-term memory by retrieving a set of nearest neighbor tokens at each timestep. We design a gating function to adaptively combine multiple information sources to make a prediction. This mechanism allows the model to use either local context, short-term memory, or long-term memory (or any combination of them) on an ad hoc basis depending on the context. Experiments on word-based and character-based language modeling datasets demonstrate the efficacy of our proposed method compared to strong baselines.<\/jats:p>","DOI":"10.1162\/tacl_a_00371","type":"journal-article","created":{"date-parts":[[2021,4,28]],"date-time":"2021-04-28T23:51:36Z","timestamp":1619653896000},"page":"362-373","update-policy":"https:\/\/doi.org\/10.1162\/mitpressjournals.corrections.policy","source":"Crossref","is-referenced-by-count":20,"title":["Adaptive Semiparametric Language Models"],"prefix":"10.1162","volume":"9","author":[{"given":"Dani","family":"Yogatama","sequence":"first","affiliation":[{"name":"DeepMind, London, United Kingdom. dyogatama@google.com"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Cyprien","family":"de Masson d\u2019Autume","sequence":"additional","affiliation":[{"name":"DeepMind, London, United Kingdom. cyprien@google.com"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Lingpeng","family":"Kong","sequence":"additional","affiliation":[{"name":"DeepMind, London, United Kingdom. lingpenk@google.com"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"281","published-online":{"date-parts":[[2021,4,26]]},"reference":[{"key":"2021060823402656800_bib1","article-title":"Adaptive input representations for neural language modeling","volume-title":"Proceedings of ICLR","author":"Baevski","year":"2019"},{"key":"2021060823402656800_bib2","doi-asserted-by":"crossref","DOI":"10.18653\/v1\/N19-1191","article-title":"Non-parametric adaptation for neural machine translation","volume-title":"Proceedings of NAACL-HLT","author":"Bapna","year":"2019"},{"key":"2021060823402656800_bib3","article-title":"Longformer: The long-document transformer","author":"Iz","year":"2020","journal-title":"arXiv preprint arXiv:2004.05150v2"},{"key":"2021060823402656800_bib4","article-title":"Language models are few-shot learners","volume-title":"Proceedings of NeurIPS","author":"Brown","year":"2020"},{"key":"2021060823402656800_bib5","article-title":"Rethinking attention with performers","volume-title":"Proceedings of ICLR","author":"Choromanski","year":"2021"},{"key":"2021060823402656800_bib6","doi-asserted-by":"crossref","DOI":"10.18653\/v1\/P19-1285","article-title":"Transformer-XL: Attentive language models beyond a fixed-length context","volume-title":"Proceedings of ACL","author":"Dai","year":"2019"},{"key":"2021060823402656800_bib7","article-title":"BERT: Pre-training of deep bidirectional transformers for language understanding","volume-title":"Proceedings of NAACL","author":"Devlin","year":"2018"},{"key":"2021060823402656800_bib8","doi-asserted-by":"crossref","DOI":"10.1002\/9781118133880.hop203020","article-title":"Memory systems","volume":"3","author":"Eichenbaum","year":"2012","journal-title":"Handbook of Psychology, Second Edition"},{"key":"2021060823402656800_bib9","article-title":"Unbounded cache model for online language modeling with open vocabulary","volume-title":"Proceedings of NeurIPS","author":"Grave","year":"2017"},{"key":"2021060823402656800_bib10","article-title":"Efficient softmax approximation for GPUs","volume-title":"Proceedings of ICML","author":"Grave","year":"2017"},{"key":"2021060823402656800_bib11","article-title":"Improving neural language models with a continuous cache","volume-title":"Proceedings of ICLR","author":"Grave","year":"2017"},{"key":"2021060823402656800_bib12","article-title":"Accelerating large-scale inference with anisotropic vector quantization","volume-title":"Proceedings of ICML","author":"Guo","year":"2020"},{"key":"2021060823402656800_bib13","doi-asserted-by":"crossref","first-page":"437","DOI":"10.1162\/tacl_a_00030","article-title":"Generating sentences by editing prototypes","volume":"6","author":"Guu","year":"2018","journal-title":"Transactions of the Association for Computational Linguistics"},{"key":"2021060823402656800_bib14","article-title":"Realm: Retrieval-augmented language model pre-training","volume-title":"Proceedings of ICML","author":"Guu","year":"2020"},{"key":"2021060823402656800_bib15","article-title":"The human knowledge compression contest","author":"Hutter","year":"2012"},{"key":"2021060823402656800_bib16","article-title":"Tying word vectors and word classifiers: A loss framework for language modeling","volume-title":"Proceedings of ICLR","author":"Inan","year":"2017"},{"key":"2021060823402656800_bib17","article-title":"Learning to remember rare events","volume-title":"Proceedings of ICLR","author":"Kaiser","year":"2017"},{"key":"2021060823402656800_bib18","doi-asserted-by":"crossref","DOI":"10.18653\/v1\/2020.findings-emnlp.307","article-title":"BERT-kNN: Adding a kNN search component to pretrained language models for better QA","volume-title":"Proceedings of Findings of EMNLP","author":"Kassner","year":"2020"},{"key":"2021060823402656800_bib19","article-title":"Nearest neighbor machine translation","volume-title":"Proceedings of ICLR","author":"Khandelwal","year":"2021"},{"key":"2021060823402656800_bib20","article-title":"Generalization through memorization: Nearest neighbor language models","volume-title":"Proceedings of ICLR","author":"Khandelwal","year":"2020"},{"key":"2021060823402656800_bib21","article-title":"Adam: A method for stochastic optimization","volume-title":"Proceedings of ICLR","author":"Kingma","year":"2015"},{"key":"2021060823402656800_bib22","article-title":"Reformer: The efficient transformer","volume-title":"Proceedings of ICLR","author":"Kitaev","year":"2020"},{"key":"2021060823402656800_bib23","article-title":"Dynamic evaluation of neural sequence models","volume-title":"Proceedings of ICML","author":"Krause","year":"2018"},{"key":"2021060823402656800_bib24","article-title":"Dynamic evaluation of transformer language models","author":"Krause","year":"2019","journal-title":"arXiv preprint arXiv:1904.08378v1"},{"key":"2021060823402656800_bib25","article-title":"Episodic memory in lifelong language learning","volume-title":"Proceedings of NeurIPS","author":"de Masson d\u2019Autume","year":"2019"},{"key":"2021060823402656800_bib26","article-title":"Pointer sentinel mixture models","volume-title":"Proceedings of ICLR","author":"Merity","year":"2017"},{"key":"2021060823402656800_bib27","article-title":"On memory in human and artificial language processing systems","volume-title":"Proceedings of ICLR Workshop on Bridging AI and Cognitive Science","author":"Nematzadeh","year":"2020"},{"key":"2021060823402656800_bib28","doi-asserted-by":"crossref","DOI":"10.18653\/v1\/D16-1124","article-title":"Generalizing and hybridizing count-based and neural language models","volume-title":"Proceedings of EMNLP","author":"Neubig","year":"2016"},{"key":"2021060823402656800_bib29","article-title":"Language models as knowledge bases?","volume-title":"Proceedings of EMNLP","author":"Petroni","year":"2020"},{"key":"2021060823402656800_bib30","article-title":"Improving language understanding by generative pre-training","author":"Radford","year":"2018"},{"key":"2021060823402656800_bib31","article-title":"Language models are unsupervised multitask learners","author":"Radford","year":"2019"},{"key":"2021060823402656800_bib32","article-title":"Compressive transformers for long-range sequence modelling","volume-title":"Proceedings of ICLR","author":"Rae","year":"2020"},{"issue":"1","key":"2021060823402656800_bib33","doi-asserted-by":"crossref","first-page":"599","DOI":"10.1146\/annurev.psych.51.1.599","article-title":"Memory systems in the brain","volume":"51","author":"Rolls","year":"2000","journal-title":"Annual Review of Psychology"},{"key":"2021060823402656800_bib34","article-title":"Megatron-LM: Training multi-billion parameter language models using model parallelism","author":"Shoeybi","year":"2019","journal-title":"arXiv preprint arXiv:1909.08053v4"},{"key":"2021060823402656800_bib35","doi-asserted-by":"crossref","first-page":"385","DOI":"10.1037\/0003-066X.40.4.385","article-title":"How many memory systems are there?","volume":"40","author":"Tulving","year":"1985","journal-title":"American Psychologist"},{"key":"2021060823402656800_bib36","article-title":"Attention is all you need","volume-title":"Proceedings of NIPS","author":"Vaswani","year":"2017"},{"key":"2021060823402656800_bib37","article-title":"Answering complex open-domain questions with multi-hop dense retrieval","volume-title":"Proceedings of ICLR","author":"Xiong","year":"2021"},{"key":"2021060823402656800_bib38","article-title":"Megatron-CNTRL: Controllable story generation with external knowledge using large-scale language models","volume-title":"Proceedings of EMNLP","author":"Peng","year":"2020"}],"container-title":["Transactions of the Association for Computational Linguistics"],"original-title":[],"language":"en","link":[{"URL":"http:\/\/direct.mit.edu\/tacl\/article-pdf\/doi\/10.1162\/tacl_a_00371\/1924150\/tacl_a_00371.pdf","content-type":"application\/pdf","content-version":"vor","intended-application":"syndication"},{"URL":"http:\/\/direct.mit.edu\/tacl\/article-pdf\/doi\/10.1162\/tacl_a_00371\/1924150\/tacl_a_00371.pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2022,12,25]],"date-time":"2022-12-25T19:35:21Z","timestamp":1671996921000},"score":1,"resource":{"primary":{"URL":"https:\/\/direct.mit.edu\/tacl\/article\/doi\/10.1162\/tacl_a_00371\/100688\/Adaptive-Semiparametric-Language-Models"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2021]]},"references-count":38,"URL":"https:\/\/doi.org\/10.1162\/tacl_a_00371","relation":{},"ISSN":["2307-387X"],"issn-type":[{"value":"2307-387X","type":"electronic"}],"subject":[],"published-other":{"date-parts":[[2021]]},"published":{"date-parts":[[2021]]}}}