Models In a Spelling Bee: Language Models Implicitly Learn the Character Composition of Tokens

Itay Itzhak, Omer Levy
8/25/2021
cs.CLcs.AIcs.LG

Official code: itay1itzhak/SpellingBee (3 stars, Jupyter Notebook, MIT, last commit 2022-07-14).

Abstract

Standard pretrained language models operate on sequences of subword tokens without direct access to the characters that compose each token's string representation. We probe the embedding layer of pretrained language models and show that models learn the internal character composition of whole word and subword tokens to a surprising extent, without ever seeing the characters coupled with the tokens.

Show full abstract

Our results show that the embedding layer of RoBERTa holds enough information to accurately spell up to a third of the vocabulary and reach high average character ngram overlap on all token types. We further test whether enriching subword models with additional character information can improve language modeling, and observe that this method has a near-identical learning curve as training without spelling-based enrichment. Overall, our results suggest that language modeling objectives incentivize the model to implicitly learn some notion of spelling, and that explicitly teaching the model how to spell does not appear to enhance its performance on such tasks.

View on arXivView PDF

Code Implementations(1)

MIT
30Jupyter Notebook, PythonMay 17, 20224 years agoMIT

Similar Papers

Cite this paper

@article{itzhak2021models,
  title  = {Models In a Spelling Bee: Language Models Implicitly Learn the Character Composition of Tokens},
  author = {Itay Itzhak and Omer Levy},
  year   = {2021},
  eprint = {2108.11193},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2108.11193}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2108.11193.svg)](https://codeofpaper.com/paper/2108.11193)

Discussion