Google DeepMind Introduces a Parameter-Efficient Expert Retrieval Mechanism that Leverages the Product Key Technique for Sparse Retrieval from a Million Tiny Experts

In transformer architectures, the computational costs and activation memory grow linearly with the increase in the hidden layer width of feedforward (FFW) layers. This scaling issue poses a significant challenge, especially as models become larger and more complex. Overcoming this challenge is essential for advancing AI research, as it directly impacts the feasibility of deploying large-scale models in real-world applications, such as language modeling and natural language processing tasks.

Current methods addressing this challenge utilize Mixture-of-Experts (MoE) architectures, which deploy sparsely activated expert modules instead of a single dense FFW layer. This approach allows model size to be decoupled from computational cost. Despite the promise of MoEs, as demonstrated by researchers like Shazeer et al. (2017) and Lepikhin et al. (2020), these models face computational and optimization challenges when scaling beyond a small number of experts. The efficiency gains often plateau with increasing model size due to a fixed number of training tokens. These limitations prevent the full potential of MoEs from being realized, especially in tasks requiring extensive and continual learning.

The Researchers from Google DeepMind propose a novel approach called Parameter Efficient Expert Retrieval (PEER), which specifically addresses the limitations of existing MoE models. PEER leverages the product key technique for sparse retrieval from a vast pool of tiny experts, numbering over a million. This approach enhances the granularity of MoE models, resulting in a better performance-compute trade-off. The innovation lies in the use of a learned index structure for routing, enabling efficient and scalable expert retrieval. This method decouples computational cost from parameter count, representing a significant advancement over previous architectures. PEER layers demonstrate substantial improvements in efficiency and performance for language modeling tasks.

The PEER layer operates by mapping an input vector to a query vector, which is then compared with a set of product keys to retrieve the top k experts. These experts are single-neuron multi-layer perceptrons (MLPs) that contribute to the final output through a weighted combination based on router scores. The product key retrieval technique reduces the complexity of expert retrieval, making it feasible to handle over a million experts efficiently. The dataset used for experiments is the C4 dataset, with isoFLOP analysis conducted to compare PEER with dense FFW, coarse-grained MoEs, and Product Key Memory (PKM) layers. The experiments involved varying the model size and the number of training tokens to identify compute-optimal configurations.

The results show that PEER layers significantly outperform dense FFWs and coarse-grained MoEs in terms of performance-compute trade-off. When applied to several language modeling datasets, including the Curation Corpus, Lambada, the Pile, Wikitext, and C4, the PEER models achieved notably lower perplexity scores. For instance, with a FLOP budget of 2e19, PEER models reached a perplexity of 16.34 on the C4 dataset, which is lower compared to 17.70 for dense models and 16.88 for MoE models. These findings highlight the efficiency and effectiveness of the PEER architecture in enhancing the scalability and performance of transformer models.

In conclusion, this proposed method represents a significant contribution to AI research by introducing the PEER architecture. This novel approach addresses the computational challenges associated with scaling transformer models by leveraging a vast number of tiny experts and efficient routing techniques. The PEER model’s superior performance-compute trade-off, demonstrated through extensive experiments, highlights its potential to advance AI research by enabling more efficient and powerful language models. The findings suggest that PEER can effectively scale to handle extensive and continuous data streams, making it a promising solution for lifelong learning and other demanding AI applications.

Check out the Paper. All credit for this research goes to the researchers of this project. Also, don’t forget to follow us on Twitter

Join our Telegram Channel and LinkedIn Group.

If you like our work, you will love our newsletter..

Don’t Forget to join our 46k+ ML SubReddit

Aswin AK is a consulting intern at MarkTechPost. He is pursuing his Dual Degree at the Indian Institute of Technology, Kharagpur. He is passionate about data science and machine learning, bringing a strong academic background and hands-on experience in solving real-life cross-domain challenges.

🚀 [FREE AI WEBINAR] 'Optimise Your Custom Embedding Space: How to find the right embedding model for YOUR data.' (July 18, 2024) [Promoted]