Learning to Specialize with Knowledge Distillation for Visual Question Answering

Jonghwan Mun, Kimin Lee, Jinwoo Shin, Bohyung HanNeurIPS 2018

TL;DR

Visual Question Answering (VQA) requires a "jack of all trades" model, but universal models often struggle with specialized reasoning. This paper introduces MCL-KD, a framework that allows ensemble members to specialize in specific types of questions (like counting or color recognition) while using knowledge distillation to ensure they don't "forget" general knowledge or suffer from data deficiency.

The Problem with Specialized Ensembles in VQA

Visual Question Answering is a highly heterogeneous task. A single model must simultaneously understand spatial relationships ("What is behind the red ball?"), attributes ("What color is the car?"), and logic ("Are there more cylinders than cubes?").

While it is intuitive to train an ensemble of specialized models to handle these distinct question types, standard approaches like Multiple Choice Learning (MCL) often fail in VQA. In standard MCL, training examples are assigned to only one (or a few) models in an ensemble. This leads to two major issues:

  1. Data Deficiency: If a model only sees a small fraction of the training data, it lacks the samples needed to learn robust, generalized visual representations.
  2. Overconfidence and Forgetting: Specialized models become experts in their narrow niche but lose the "common sense" or compositional knowledge shared across the entire dataset.

Methods: MCL-KD

To solve these issues, the authors propose Multiple Choice Learning with Knowledge Distillation (MCL-KD). The training happens in two distinct stages:

The MCL-KD framework showing base model training followed by specialization using knowledge distillation.
  1. Base Model Training: First, $M$ "base models" are trained independently on the entire dataset. These act as standard, generalist models.
  2. Specialization with KD: A new ensemble is initialized from these base models. For every training example, the models are split into two groups:
  3. Assigned Models: A subset of $k$ models (those currently performing best on that specific example) are updated to minimize the standard task loss (predicting the ground-truth answer).
  4. Non-Assigned Models: The remaining models are updated using a Knowledge Distillation (KD) loss. Instead of ignoring the example, they are forced to mimic the output distribution of their corresponding "base model" from Stage 1.

This "imitation" strategy ensures that even when a model isn't the designated expert for a question, it still learns from the data by maintaining the general performance of a universal teacher.

Key Insights and Ideas

  • KD as a Regularizer: In this framework, Knowledge Distillation acts as a powerful anchor. It prevents the "specialists" from drifting too far into narrow niches where they might lose the ability to understand basic image features.
  • Solving the MCL Paradox: Standard MCL often performs worse than a simple independent ensemble because of the data deficiency problem. MCL-KD solves this by ensuring every model "sees" every data point—either as a specialist learning the truth or as a generalist mimicking a teacher.
Comparison of model predictions on a CLEVR example. MCL-KD maintains distributed knowledge while standard MCL models become overly confident or fail completely.
  • Model Agnostic: The framework isn't tied to a specific architecture. The authors demonstrated success using simple MLPs, Stacked Attention Networks (SAN), and state-of-the-art Bottom-Up Top-Down attention models.

Key Results

The researchers evaluated their method on three benchmarks: CLEVR (synthetic diagnostic reasoning), VQA v2.0 (real-world images and open-ended questions), and CIFAR-100 (standard image classification).

  • CLEVR: Using a SAN architecture, MCL-KD achieved 88.16% top-1 accuracy, significantly higher than a standard independent ensemble (85.23%) and standard MCL (83.73%).
  • VQA v2.0: MCL-KD consistently outperformed independent ensembles and other MCL variants, showing that specialization helps even in complex, noisy real-world data.
  • CIFAR-100: The results here proved the method's versatility outside of VQA. While standard MCL and Confident MCL (CMCL) actually performed worse than a single model due to the lack of data per specialist, MCL-KD improved accuracy by nearly 2-5% over the independent ensemble baseline.

Limitations and Future Work

While highly effective, the framework has a few limitations. The number of specialized models ($k$) and the weight of the distillation loss ($eta$) are currently fixed hyperparameters; adaptively determining these on a per-example basis could be a fruitful future direction. Additionally, the two-stage training requirement adds computational overhead, and like any ensemble method, MCL-KD requires running multiple models at test time, increasing inference latency compared to a single universal model.

Summary updated

BibTeX
@inproceedings{mun2018learning,
  author = {Jonghwan Mun and Kimin Lee and Jinwoo Shin and Bohyung Han},
  title = {{Learning to Specialize with Knowledge Distillation for Visual Question Answering}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2018},
  url = {https://openreview.net/forum?id=ryWzj8-OZB},
}
Figure