Learning Sparse Mixture of Experts for Visual Question Answering

Vardaan Pahuja, Jie Fu, Christopher J. PalarXiv 2019

Abstract

Visual Question Answering (VQA) typically involves heavy computational costs due to the fixed processing of high-resolution images by deep Convolutional Neural Networks (CNNs). This paper proposes a Sparse Mixture of Experts (MoE) approach to modularize the ResNeXt CNN backbone. By employing a gating mechanism that activates only the most relevant convolutional paths based on the input question, the model achieves significant efficiency gains. Experimental results on VQA v2 and CLEVR datasets demonstrate that the proposed method can reduce CNN FLOPs by approximately 50% with negligible loss in accuracy.

Introduction

Visual Question Answering is a complex multimodal task requiring simultaneous understanding of visual and linguistic information. Standard architectures use a "one-size-fits-all" CNN backbone to extract image features, regardless of the specific question being asked. This approach is computationally inefficient, especially for deployment on resource-constrained devices.

This research introduces conditional computation to VQA. The core idea is that different questions require different visual features; for instance, a question about color might prioritize different neural pathways than one about spatial counting. By dynamically selecting a subset of "expert" convolutional paths, the network can reduce redundant computations.

Methods

The proposed architecture leverages the grouped convolution structure of the ResNeXt model.

Modularized ResNeXt

The researchers treat each parallel path within a ResNeXt block as an individual "expert." In a standard ResNeXt-101 architecture, each block contains 32 such parallel paths. By modularizing these paths, the network can selectively activate them.

Modularization of ResNeXt blocks into parallel expert paths.

Gating and Sparsity

A gate controller is introduced to manage these experts. It takes the question representation (from an LSTM or GRU) and image features as input to predict weights for each expert path. To achieve efficiency, a Top-k Sparsity strategy is applied: only the $k$ paths with the highest weights are executed. Contributions from the remaining paths are zeroed out. To ensure these theoretical savings translate to actual speedups, the model physically aggregates only the selected feature maps.

To prevent the "rich-get-richer" phenomenon where only a few experts are ever trained, a balancing loss based on the coefficient of variation is added, encouraging the gate to utilize the full diversity of the expert pool across different inputs.

Results

The model was evaluated on the VQA v2 and CLEVR benchmarks.

VQA v2 Performance

On the VQA v2 validation set, the modular approach demonstrated remarkable efficiency. As shown in the table below, a modular ResNeXt-32 with 50% sparsity ($k=16$) achieved an accuracy of 54.47%, nearly identical to the baseline's 54.51%, while cutting the CNN's computational cost from 156.04E+09 to 77.72E+09 FLOPs.

Performance and efficiency comparison on the VQA v2 dataset.

CLEVR and Sparsity Limits

Similar trends were observed on the CLEVR dataset, where 50% sparsity resulted in a minor accuracy drop (92.23% vs. 94.05% baseline). However, increasing sparsity to 75% ($k=8$) led to a more significant performance decline on VQA v2 (51.28%), suggesting that a minimum number of experts is necessary to maintain the reasoning capabilities required for complex real-world questions.

Conclusion

This work demonstrates that the vision backbone of VQA models is significantly over-parameterized for individual tasks. By repurposing the grouped structure of ResNeXt into a Sparse Mixture of Experts, computational costs can be halved with minimal impact on accuracy. Future research may extend this conditional computation to other components of the VQA pipeline, such as language embeddings or attention mechanisms, to further optimize multimodal reasoning.

Summary updated

BibTeX
@misc{pahuja2019learning,
  author = {Vardaan Pahuja and Jie Fu and Christopher J. Pal},
  title = {{Learning Sparse Mixture of Experts for Visual Question Answering}},
  year = {2019},
  eprint = {1909.09192},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1909.09192},
}
Figure