Mixture of Nested Experts: Adaptive Processing of Visual Tokens

Gagan Jain,Nidhi Hegde,Aditya Kusupati,Arsha Nagrani,Shyamal Buch,Prateek Jain,Anurag Arnab,Sujoy Paul
2024-07-31
Abstract:The visual medium (images and videos) naturally contains a large amount of information redundancy, thereby providing a great opportunity for leveraging efficiency in processing. While Vision Transformer (ViT) based models scale effectively to large data regimes, they fail to capitalize on this inherent redundancy, leading to higher computational costs. Mixture of Experts (MoE) networks demonstrate scalability while maintaining same inference-time costs, but they come with a larger parameter footprint. We present Mixture of Nested Experts (MoNE), which utilizes a nested structure for experts, wherein individual experts fall on an increasing compute-accuracy curve. Given a compute budget, MoNE learns to dynamically choose tokens in a priority order, and thus redundant tokens are processed through cheaper nested experts. Using this framework, we achieve equivalent performance as the baseline models, while reducing inference time compute by over two-fold. We validate our approach on standard image and video datasets - ImageNet-21K, Kinetics400, and Something-Something-v2. We further highlight MoNE$'$s adaptability by showcasing its ability to maintain strong performance across different inference-time compute budgets on videos, using only a single trained model.
Computer Vision and Pattern Recognition,Artificial Intelligence,Machine Learning
What problem does this paper attempt to address?
The paper primarily addresses the computational efficiency issues of visual Transformer models (such as Vision Transformer (ViT) and Video Vision Transformer (ViViT)) when processing images and videos by proposing a new solution. Specifically, the paper aims to solve the following problems: 1. **Computational Redundancy**: Due to the significant information redundancy in visual data (images and videos), traditional ViT and ViViT models fail to fully leverage this characteristic to improve computational efficiency, resulting in unnecessary computational costs when processing these models. 2. **Mixture of Experts Network Issues**: Although Mixture of Experts (MoE) networks can effectively scale the model size while maintaining the same inference time cost, they usually increase the number of parameters, thereby increasing storage requirements. Additionally, existing works rely on expert modules with the same number of parameters and computational load, which limits their ability to reduce computational costs without completely skipping certain tokens. To address the above issues, the paper proposes the **Mixture of Nested Experts (MoNE)** framework, whose main contributions include: 1. **Dynamic Resource Allocation**: The MoNE framework can dynamically prioritize tokens based on the computational budget and process redundant tokens through cheaper nested expert modules, thereby achieving dynamic allocation of computational resources. 2. **Significant Computational Efficiency Improvement**: With a fixed number of parameters, MoNE can learn much lower FLOPs (approximately 2.3 times lower) than baseline models while still matching the performance of the baseline models. 3. **High Adaptability**: Experimental validation shows that MoNE is not only applicable to image transformers but also to video transformers, and visualization results indicate that tokens processed by larger expert modules are well associated with regions of interest. In short, the paper addresses the computational inefficiency issues in existing visual Transformer models by introducing the MoNE framework, achieving the goal of significantly reducing computational costs while ensuring performance.