SimpleBooks: Long-term dependency book dataset with simplified English vocabulary for word-level language modeling
Paper · 2019 · Huyen Nguyen
Summary
Smaller benchmarks for word-level language modeling are not good stand-ins for larger ones. In small corpora each word type occurs only a few times. As a result, architectures that lead on small sets, such as LSTMs on WikiText-2, often lose on large sets, where Transformers dominate WikiText-103. This weakens cheap experimentation such as architecture search. The author builds SimpleBooks from Project Gutenberg. Books are selected for having a small vocabulary relative to their length, which mostly yields children's literature. Near-duplicate books are then removed. The result is SimpleBooks-92, with 92M tokens but only about 98K word types, and SimpleBooks-2, a 2M-token training subset that shares the same validation and test sets. Average token frequency approaches that of 1Billion, and OOV rates are very low. Transformer-XL beats AWD-LSTM on both sizes, so the small version mirrors large-data behaviour. The models also need far fewer parameters than their WikiText counterparts. A skip-gram transfer test from simple to normal English shows faster early learning but similar final loss.
Key points
- Selection and splits. The corpus comes from 1,573 Gutenberg books, chosen from about 39K candidates.
- Selection used a vocabulary-to-length ratio that includes a squared term and avoids favouring long books, with a threshold of 0.0012.
- Books were deduplicated greedily, discarding any book with ≥50% 8-gram overlap with books already kept.
- Validation and test sets each consist of 5 books, about 200K tokens each.
- Corpus statistics.
- SimpleBooks-92: about 91.5M tokens, vocabulary 98,304, FREQ 931.4, OOV 0.11%.
- SimpleBooks-2: about 2.2M tokens, vocabulary 11,492, FREQ 195.43.
- Perplexity results. Test perplexity on SB-92 is 8.92 for Transformer-XL versus 20.64 for AWD-LSTM. On SB-2 it is 16.41 versus 16.78.
- Efficiency on SB-2. Transformer-XL used 19.7M parameters and about 80 epochs, while AWD-LSTM used 29.2M parameters and about 200 epochs.
- Comparison with WikiText-103.
- With near-SOTA settings, SB-92 cuts parameters by 45.3% for Transformer-XL and 39.7% for AWD-LSTM compared with WikiText-103, mostly through smaller embedding layers.
- Despite having only 36.7% of WikiText-103's vocabulary, SB-92 covers 92% of its tokens (93% uncased).
Interesting ideas
- I1. Using average occurrences per word type (FREQ) as a diagnostic shows whether a small dataset behaves like a big one, which is more informative than raw token count.
- I2. Greedy near-duplicate removal works by going from the largest document to the smallest and dropping any whose 8-gram overlap with the kept set reaches half. This simple rule keeps editions and reprints from inflating a corpus.
- I3. Children's books serve as a naturally low-vocabulary, long-context source of English, filtered by a lexical-density ratio rather than by manual labelling.
- I4. For warm-start transfer, embeddings learned on simple text initialise the shared rows, and unseen words are drawn uniformly within the learned value range.
- I5. Before measuring vocabulary coverage, re-tokenise the target corpus to match conventions (e.g. "do n't" instead of "don 't"), because otherwise coverage figures are misleading.
For Mova
How these ideas could serve Mova, our small open language model — its files, stages and tests:
- I1 (learn): compute FREQ for silver training sets and small evaluation sets to judge whether results on a small sample should transfer to the full data.
- I2 (answer): apply it to collections of fables and tales so that retold variants do not leak between practice and test stories.
- I3 (tree): use such books as an easier first tier for gparse training or for agreement among witness parsers before moving to harder prose.
- I4 (tree): pre-train gparse's lexical layer on simplified text, then expand to full vocabulary without a scale mismatch for new words.
- I5 (tokens): normalise contraction splitting across treebanks and input text so that lemma and coverage statistics in the en crate are comparable.
Institutions
📚 Shelves 4 Computer Science · 9,086 works Artificial Intelligence · 8,889 works Arts and Humanities · 9,296 works Language and Linguistics · 9,206 works
🧭 Topics 2 Language models & pretraining · 1,343 works English · 1,373 works
Cite
Cite as Huyen Nguyen. 2019. SimpleBooks: Long-term dependency book dataset with simplified English vocabulary for word-level language modeling. arXiv:1911.12391.
@misc{nguyen2019simplebooks,
title = {{SimpleBooks: Long-term dependency book dataset with simplified English vocabulary for word-level language modeling}},
author = {Huyen Nguyen},
year = {2019},
doi = {10.48550/arxiv.1911.12391},
eprint = {1911.12391},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.1911.12391}
}References
- Dan Cireşan, Ueli Meier, and Jürgen Schmidhuber. Multi-column deep neural networks for image classification. arXiv preprint arXiv:1202.2745, 2012. ↗
- Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. arXiv preprint arXiv:1708.07747, 2017. ↗
- Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, Citeseer, 2009. find
- Tomáš Mikolov, Anoop Deoras, Stefan Kombrink, Lukáš Burget, and Jan Černockỳ. Empirical evaluation and combination of advanced language modeling techniques. In Twelfth Annual Conference of the International Speech Communication Association, 2011. find
- Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. arXiv preprint arXiv:1609.07843, 2016. ↗ our card
- Ke Tran, Arianna Bisazza, and Christof Monz. The importance of being recurrent for modeling hierarchical structure. arXiv preprint arXiv:1803.03585, 2018. ↗
- Mostafa Dehghani, Stephan Gouws, Oriol Vinyals, Jakob Uszkoreit, and Łukasz Kaiser. Universal transformers. arXiv preprint arXiv:1807.03819, 2018. ↗
- Zihang Dai, Zhilin Yang, Yiming Yang, William W Cohen, Jaime Carbonell, Quoc V Le, and Ruslan Salakhutdinov. Transformer-xl: Attentive language models beyond a fixed-length context. arXiv preprint arXiv:1901.02860, 2019. ↗
- Ben Krause, Emmanuel Kahembwe, Iain Murray, and Steve Renals. Dynamic evaluation of transformer language models. arXiv preprint arXiv:1904.08378, 2019. ↗
- Chengyue Gong, Di He, Xu Tan, Tao Qin, Liwei Wang, and Tie-Yan Liu. Frage: frequency-agnostic word representation. In Advances in Neural Information Processing Systems, pages 1334–1345, 2018. ↗
- Huyen Nguyen. github.com/chiphuyen/lazynlp: First release of lazynlp. Mar 2019. doi: 10.5281/zenodo. 2582057. ↗
- Matthew Honnibal and Ines Montani. spacy 2: Natural language understanding with bloom embeddings, convolutional neural networks and incremental parsing. To appear, 2017. find
- Stephen Merity, Nitish Shirish Keskar, and Richard Socher. Regularizing and optimizing lstm language models. arXiv preprint arXiv:1708.02182, 2017. ↗ our card
- Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. Distributed representations of words and phrases and their compositionality. In Advances in neural information processing systems, pages 3111–3119, 2013. ↗ our card
Updated
This page in Markdown → https://md.research.elamur.ai/free/en/papers/nguyen-2019-simplebooks-long-term-dependency-book/