Reconsidering the Past: Optimizing Hidden States in Language Models
Not on the map. Why?
Abstract (arXiv)
We present Hidden-State Optimization (HSO), a gradient-based method for improving the performance of transformer language models at inference time. Similar to dynamic evaluation (Krause et al., 2018), HSO computes the gradient of the log-probability the language model assigns to an evaluation text, but uses it to update the cached hidden states rather than the model parameters. We test HSO with pretrained Transformer-XL and GPT-2 language models, finding improvement on the WikiText103 and PG-19 datasets in terms of perplexity, especially when evaluating a model outside of its training distribution. We also demonstrate downstream applicability by showing gains in the recently developed prompt-based few-shot evaluation setting, again with no extra parameters or training data.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 22 of its 28 references that are in the map. First posted on arXiv 16 Dec 2021.
Builds on
22 of 28 references.
References · 22
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2014Adam: A Method for Stochastic Optimizationcited by 36,960
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019Parameter-Efficient Transfer Learning for NLPcited by 4,195
- 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,878
- 2016Pointer Sentinel Mixture Modelscited by 2,992
- 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
- 2018Deep contextualized word representationscited by 2,285
- 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,830
- 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,371
- 2021What Makes Good In-Context Examples for GPT-3?cited by 1,184
10 more
- 2019How Can We Know What Language Models Know?cited by 953
- 2019Plug and Play Language Models: A Simple Approach to Controlled Text Generationcited by 793
- 2019Compressive Transformers for Long-Range Sequence Modellingcited by 699
- 2020GeDi: Generative Discriminator Guided Sequence Generationcited by 377
- 2021Learning How to Ask: Querying LMs with Mixtures of Soft Promptscited by 376
- 2021How Many Data Points is a Prompt Worth?cited by 197
- 2020Back to the Future: Unsupervised Backprop-based Decoding for Counterfactual and Abductive Commonsense Reasoningcited by 65
- 2017Dynamic Evaluation of Neural Sequence Modelscited by 53
- 2020Plug-and-Play Conversational Modelscited by 30
- 2019Dynamic Evaluation of Transformer Language Modelscited by 23
Built on by
Citing papers per year: 2022: 1; 2023: 0; 2024: 1; 2025: 1.
3 papers.