Lexinvariant Language Models
Not on the map. Why?
Abstract (arXiv)
Token embeddings, a mapping from discrete lexical symbols to continuous vectors, are at the heart of any language model (LM). However, lexical symbol meanings can also be determined and even redefined by their structural role in a long context. In this paper, we ask: is it possible for a language model to be performant without any fixed token embeddings? Such a language model would have to rely entirely on the co-occurence and repetition of tokens in the context rather than the textita priori identity of any token. To answer this, we study textitlexinvariantlanguage models that are invariant to lexical symbols and therefore do not need fixed token embeddings in practice. First, we prove that we can construct a lexinvariant LM to converge to the true language model at a uniform rate that is polynomial in terms of the context length, with a constant factor that is sublinear in the vocabulary size. Second, to build a lexinvariant LM, we simply encode tokens using random Gaussian vectors, such that each token maps to the same representation within each sequence but different representations across sequences. Empirically, we demonstrate that it can indeed attain perplexity comparable to that of a standard language model, given a sufficiently long context. We further explore two properties of the lexinvariant language models: First, given text generated from a substitution cipher of English, it implicitly implements Bayesian in-context deciphering and infers the mapping to the underlying real tokens with high accuracy. Second, it has on average 4X better accuracy over synthetic in-context reasoning tasks. Finally, we discuss regularizing standard language models towards lexinvariance and potential practical applications.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 13 of its 28 references that are in the map. First posted on arXiv 24 May 2023.
Builds on
13 of 28 references.
References · 13
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,346
- 2022Training Compute-Optimal Large Language Modelscited by 2,927
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,346
- 2018Adafactor: Adaptive Learning Rates with Sublinear Memory Costcited by 896
- 2021ByT5: Towards a token-free future with pre-trained byte-to-byte modelscited by 504
- 2016Data Recombination for Neural Semantic Parsingcited by 111
- 2020Learning to Recombine and Resample Data for Compositional Generalizationcited by 65
- 2020Can Sequence-to-Sequence Models Crack Substitution Ciphers?cited by 9
1 more
- 2017Globally Normalized Readercited by 3
Built on by
Citing papers per year: 2026: 1.
1 paper.