Abstract
Mixture of Softmaxes (MoS) has been shown to be effective at addressing the expressiveness limitation of Softmax-based models. Despite the known advantage, MoS is practically sealed by its large consumption of memory and computational time due to the need of computing multiple Softmaxes. In this work, we set out to unleash the power of MoS in practical applications by investigating improved word coding schemes, which could effectively reduce the vocabulary size and hence relieve the memory and computation burden. We show both BPE and our proposed Hybrid-LightRNN lead to improved encoding mechanisms that can halve the time and memory consumption of MoS without performance losses. With MoS, we achieve an improvement of 1.5 BLEU scores on IWSLT 2014 German-to-English corpus and an improvement of 0.76 CIDEr score on image captioning. Moreover, on the larger WMT 2014 machine translation dataset, our MoS-boosted Transformer yields 29.6 BLEU score for English-to-German and 42.1 BLEU score for English-to-French, outperforming the single-Softmax Transformer by 0.9 and 0.4 BLEU scores respectively and achieving the state-of-the-art result on WMT 2014 English-to-German task.
The Softmax Bottleneck
In modern natural language processing, models predict the next word by applying a Softmax function over a large vocabulary. However, recent research has identified a "Softmax Bottleneck": a single Softmax layer often lacks the mathematical rank (expressive power) required to model the complex, high-dimensional distributions inherent in human language.
To overcome this, the Mixture of Softmaxes (MoS) was proposed, which calculates a weighted average of several Softmax distributions. While MoS significantly improves accuracy, it is computationally intensive. For a vocabulary of 50,000 words using 10 mixtures, the model must perform massive matrix multiplications ten times per step. This overhead has historically made MoS difficult to deploy in production or on massive datasets like WMT.
Methodology: Unleashing MoS
The authors propose that the key to making MoS practical is reducing the effective vocabulary size through efficient encoding schemes. They investigate two primary methods:
- Byte Pair Encoding (BPE): A standard technique that decomposes words into subword units. By reducing the number of unique tokens the model predicts, the cost of each Softmax operation is significantly lowered.
- Hybrid-LightRNN: This novel contribution builds on LightRNN, which represents words as sequences of smaller "codes" (similar to coordinates in a table). The "Hybrid" version assigns frequent words their own exclusive codes while using a learned mapping—optimized via Optimal Transport—for the remainder.
By employing these encodings, the model only needs to compute Softmaxes over a small "codebook" or subword vocabulary rather than the full dictionary, drastically reducing the computational footprint.
Experimental Results
The approach was evaluated on three major benchmarks: IWSLT 2014 (German-to-English), WMT 2014 (English-to-German and English-to-French), and MSCOCO for image captioning.
Efficiency and Performance
As shown in Table 5, the proposed methods effectively halved the memory and time consumption of MoS without sacrificing performance. In several instances, a 3-mixture MoS combined with BPE was both faster and more accurate than a standard single-softmax baseline.
State-of-the-Art Translation
On the large-scale WMT 2014 English-to-German task, the MoS-boosted Transformer achieved a BLEU score of 29.6. This represented a state-of-the-art result at the time for models not utilizing additional data augmentation.
Discussion and Insights
The study reveals several key insights:
- Vocabulary as the Primary Bottleneck: The computational burden of MoS stems from the size of the final linear layer rather than the mixture logic itself. Shrinking the target space makes MoS highly efficient.
- Mixtures vs. Vocabulary Size: It is often more beneficial to maintain a smaller vocabulary (via BPE) and use the saved computational budget to add more Softmax mixtures. This provides a better "rank" for the probability matrix than simply increasing the number of unique words.
- Semantic Grouping: Qualitative analysis of the Hybrid-LightRNN table indicated that the model naturally grouped syntactically and semantically similar words (e.g., numbers or geographical locations) into the same rows/columns, effectively sharing representation power.
Limitations
While the authors used an approximation for the Optimal Transport problem in Hybrid-LightRNN, the training process remains more complex to implement than standard BPE. Additionally, the benefits of increasing the number of mixtures ($K$) tend to plateau after $K=9$ or $K=18$. Future research may focus on further optimizing these encoding schemes to reflect deeper semantic correlations, potentially leading to even more compact and efficient codebooks.
Summary updated