Sebastian J. Mielke

Sebastian J. Mielke

Spell Once, Summon Anywhere: A Two-Level Open-Vocabulary Language Model

2018-09-09

tl;dr: find the paper on arXiv.

We show how the spellings of known words can help us deal with unknown words in open-vocabulary NLP tasks. The method we propose can be used to extend any closed-vocabulary generative model, but in this paper we specifically consider the case of neural language modeling. Our Bayesian generative story combines a standard RNN language model (generating the word tokens in each sentence) with an RNN-based spelling model (generating the letters in each word type). These two RNNs respectively capture sentence structure and word structure, and are kept separate as in linguistics. By invoking the second RNN to generate spellings for novel words in context, we obtain an open-vocabulary language model. For known words, embeddings are naturally inferred by combining evidence from type spelling and token context. Comparing to baselines (including a novel strong baseline), we beat previous work and establish state-of-the-art results on multiple datasets.

Figure 1 from the paper, showing the generative model.

Results

Bits per character (lower is better) on the dev and test set of WikiText-2 for our model and baselines, where full refers to our main proposed model and HCLM and HCLMcache refer to Kawakami et al.'s proposed models. All our hybrid models use a vocabulary size of 50000, pure-bpe uses 40000 merges. All pairwise differences except for those between pure-bpe, uncond, and sep-reg are statistically significant (paired permutation test over all 64 articles in the corpus, p < 0.011).

WikiText-2devtest
words w/ count0[1,100)[100;infty)allall
pure-char3.892.081.381.7411.775
pure-bpe4.011.701.081.4301.468
only-reg4.371.681.101.4521.494
sep-reg4.171.651.101.4281.469
no-reg4.141.651.101.4261.462
1-gram5.091.731.101.5031.548
uncond4.131.651.101.4291.468
full4.001.641.101.4161.455
HCLM------1.6251.670
HCLM-cache------1.4801.500

Samples from the speller

Take an in-vocabulary word and sample a spelling from pspell, conditioned on that word's embedding. How close is it to the actual spelling of the word?

original word   sampled spelling
grounded stipped
differ coronate
Clive Dickey
Southport Strigger
Carl Wuly
Chants Tranquels
valuables migrations