TL;DR
MoVE (Mixture-of-Vocabulary-Experts) allows encoder-only models to scale their input vocabulary up to 500,000 tokens without suffering from the "rare token" problem. By using a specialized Mixture-of-Experts layer to construct embeddings, a 4-layer model can match the performance of a 12-layer model while achieving a 35% speedup in inference.
What Problem Does This Paper Address?
In the world of Transformers, vocabulary size is a double-edged sword. A larger vocabulary is great because it allows the model to process text in fewer, more meaningful chunks (tokens), which reduces sequence length and speeds up computation. However, scaling up vocabulary creates a "long tail" problem: rare words or phrases appear so infrequently in the training data that their embeddings never receive enough gradient updates to become "well-trained."
For encoder-only models (like BERT), which are the backbone of modern search and retrieval systems, poor token embeddings lead to poor document representations. Previous solutions for "over-tokenization" were mostly designed for decoder-only LLMs and often relied on synthetic data or complex n-gram mappings that didn't scale well or capture deep semantics.
Methods
The authors introduce Mixture-of-Vocabulary-Experts (MoVE), a novel architecture for the embedding layer. Instead of a standard, flat lookup table for a massive vocabulary, MoVE uses a two-tier approach:
- Base vs. Routing Vocabulary: The model maintains a small "base" vocabulary ($V_s$, e.g., 30k tokens) and a much larger "routing" vocabulary ($V_l$, e.g., 500k tokens).
- Decomposition: Every token in the large vocabulary is represented as a combination of tokens from the base vocabulary (e.g., "Mercedes benz" might be decomposed into "mer," "ce," "des," and "benz").
- Expert Routing: A set of specialized "experts" (small feed-forward networks) processes these base embeddings. A simple hash-balanced routing function assigns each large-vocab token to a specific expert based on its frequency.
- Aggregation: The expert's outputs for the constituent base tokens are mean-pooled to create the final embedding for the large-vocab token.
The "Killer Feature": While MoVE uses a Mixture-of-Experts structure during training, the resulting embeddings for the 500k tokens can be computed offline once training is finished. This means the final model used in production is just a standard transformer with a very large embedding table—carrying zero computational overhead for the MoE logic during inference.
Datasets
- Vocabulary Construction: The authors used the C4 corpus to build vocabularies ranging from 1k to 500k tokens using the TokenMonster tokenizer.
- Training: Models were trained on the Weakly-Supervised Contrastive Pretraining Data (470M sentence pairs) and refined on a supervised finetuning set (1.6M pairs).
- Evaluation: The primary benchmark was a 47-task subset of the MTEB (Massive Text Embedding Benchmark), covering retrieval, reranking, classification, and clustering. They also used BEIR for information retrieval tasks and MS MARCO for latency analysis.
Key Insights and Ideas
- Vocabulary as a Scaling Law: The paper reinforces that vocabulary size is a critical scaling dimension. Just as we scale model depth or data size, scaling vocabulary can yield massive performance gains for the same "compute budget."
- The 3x Efficiency Gain: One of the most striking findings is that a 4-layer BERT model using MoVE with a 500k vocabulary performs as well as a standard 12-layer BERT model with a 30k vocabulary. This suggests we can trade embedding parameters for model depth to get faster, more efficient encoders.
- Sparsity Overlap: The authors found that putting MoE in the embedding layer is more effective than putting it in the Transformer's feed-forward networks (FFNs). They hypothesize that the sparsity benefits of MoE are better utilized when addressing the sparse nature of vocabulary distribution.
- Latency Paradox: Usually, adding parameters makes a model slower. With MoVE, adding millions of parameters to the embedding table actually makes the model faster because the larger vocabulary results in significantly shorter input sequences for the Transformer blocks to process.
Key Results
- Performance: On the MTEB benchmark, MoVE (500k vocab) consistently outperformed naive vocabulary scaling and state-of-the-art baselines like SCONE and Over-Encoding (OE).
- Statistical Parity: A BERT-4L model with MoVE 500k achieved an average MTEB score of ~57.23, statistically comparable to a BERT-12L model with a 30k vocab (~57.20).
- Speedup: In latency tests on MS MARCO, MoVE models achieved over a 35% relative speedup compared to standard models at a batch size of 256, primarily due to reduced sequence lengths.
- Data Efficiency: MoVE proved much more robust than baselines in "data-scarce" settings (training with only 1M or 2M pairs), where other methods actually performed worse than the baseline.
Limitations and Future Work
- Model Scale: The study focused on relatively small models (BERT-4L and BERT-12L). The authors acknowledge that MoVE has not yet been tested on "frontier-scale" models (billions of parameters).
- Architecture Scope: The work is currently limited to encoder-only models.
- Future Directions: The team aims to extend MoVE to decoder-only LLMs and explore its application in multi-modal settings where token representation is equally critical. They also suggest investigating how MoVE could be used to adapt pre-trained models to new vocabularies without starting from scratch.
Summary updated