Abstract
Current state-of-the-art text generators build on powerful language models such as GPT-2, achieving impressive performance. However, to avoid degenerate text, they require sampling from a modified softmax, via temperature parameters or ad-hoc truncation techniques, as in top-k or nucleus sampling. This creates a mismatch between training and testing conditions. In this paper, we use the recently introduced entmax transformation to train and sample from a natively sparse language model, avoiding this mismatch. The result is a text generator with favorable performance in terms of fluency and consistency, fewer repetitions, and n-gram diversity closer to human text. In order to evaluate our model, we propose three new metrics for comparing sparse or truncated distributions: 𝜖-perplexity, sparsemax score, and Jensen-Shannon divergence. Human-evaluated experiments in story completion and dialogue generation show that entmax sampling leads to more engaging and coherent stories and conversations.- Anthology ID:
- 2020.emnlp-main.348
- Volume:
- Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)
- Month:
- November
- Year:
- 2020
- Address:
- Online
- Venue:
- EMNLP
- SIG:
- Publisher:
- Association for Computational Linguistics
- Note:
- Pages:
- 4252–4273
- Language:
- URL:
- https://aclanthology.org/2020.emnlp-main.348
- DOI:
- 10.18653/v1/2020.emnlp-main.348
- Cite (ACL):
- Pedro Henrique Martins, Zita Marinho, and André F. T. Martins. 2020. Sparse Text Generation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 4252–4273, Online. Association for Computational Linguistics.
- Cite (Informal):
- Sparse Text Generation (Martins et al., EMNLP 2020)
- PDF:
- https://preview.aclanthology.org/starsem-semeval-split/2020.emnlp-main.348.pdf
- Code
- deep-spin/sparse_text_generation
- Data
- BookCorpus, WikiText-103, WikiText-2, WritingPrompts