Learning to Screen for Fast Softmax Inference on Large Vocabulary Neural Networks
Not on the map. Why?
Abstract (arXiv)
Neural language models have been widely used in various NLP tasks, including machine translation, next word prediction and conversational agents. However, it is challenging to deploy these models on mobile devices due to their slow prediction speed, where the bottleneck is to compute top candidates in the softmax layer. In this paper, we introduce a novel softmax layer approximation algorithm by exploiting the clustering structure of context vectors. Our algorithm uses a light-weight screening model to predict a much smaller set of candidate words based on the given context, and then conducts an exact softmax only within that subset. Training such a procedure end-to-end is challenging as traditional clustering methods are discrete and non-differentiable, and thus unable to be used with back-propagation in the training process. Using the Gumbel softmax, we are able to train the screening model end-to-end on the training set to exploit data distribution. The algorithm achieves an order of magnitude faster inference than the original softmax layer for predicting top-k words in various tasks such as beam search in machine translation or next words prediction. For example, for machine translation task on German to English dataset with around 25K vocabulary, we can achieve 20.4 times speed up with 98.9% precision@1 and 99.3% precision@5 with the original softmax layer prediction, while state-of-the-art ~citepMSRprediction only achieves 6.7x speedup with 98.7% precision@1 and 98.1% precision@5 for the same task.
Key facts. Cited by 10 papers in the map (data through 7 Oct 2026). First posted on arXiv 29 Oct 2018.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 1; 2022: 4; 2023: 2; 2024: 2; 2025: 0; 2026: 1.
10 papers.
- 2021A Review of the Gumbel-max Trick and its Extensions for Discrete Stochasticity in Machine Learningcited by 82
- 2022FINGER: Fast Inference for Graph-based Approximate Nearest Neighbor Searchcited by 4
- 2023PEFA: Parameter-Free Adapters for Large-scale Embedding-based Retrieval Modelscited by 4
- 2022The Devil is in the Details: On the Pitfalls of Vocabulary Selection in Neural Machine Translationcited by 3
- 2024From Algorithm to Hardware: A Survey on Efficient and Safe Deployment of Deep Neural Networkscited by 2
- 2024Scaling the Vocabulary of Non-autoregressive Models for Efficient Generative Retrievalcited by 2
- 2026FlashHead: Efficient Drop-In Replacement for the Classification Head in Language Model Inferencecited by 2
- 2022Fast Vocabulary Projection Method via Clustering for Multilingual Machine Translation on GPUcited by 1
- 2023An Ambiguity Measure for Recognizing the Unknowns in Deep Learningcited by 1
- 2022From Knowledge Augmentation to Multi-tasking: Towards Human-like Dialogue Systemscited by 0
- 2026FlashHead: Efficient Drop-In Replacement for the Classification Head in Language Model Inference15 Mar 2026
- 2024Scaling the Vocabulary of Non-autoregressive Models for Efficient Generative Retrieval10 Jun 2024
- 2024From Algorithm to Hardware: A Survey on Efficient and Safe Deployment of Deep Neural Networks9 May 2024
- 2023An Ambiguity Measure for Recognizing the Unknowns in Deep Learning11 Dec 2023
- 2023PEFA: Parameter-Free Adapters for Large-scale Embedding-based Retrieval Models5 Dec 2023
- 2022From Knowledge Augmentation to Multi-tasking: Towards Human-like Dialogue Systems14 Nov 2022
- 2022Fast Vocabulary Projection Method via Clustering for Multilingual Machine Translation on GPU14 Aug 2022
- 2022FINGER: Fast Inference for Graph-based Approximate Nearest Neighbor Search22 Jun 2022
- 2022The Devil is in the Details: On the Pitfalls of Vocabulary Selection in Neural Machine Translation13 May 2022
- 2021A Review of the Gumbel-max Trick and its Extensions for Discrete Stochasticity in Machine Learning4 Oct 2021