GEMS: Generating Efficient Meta-Subnets

Varad Pimpalkhute, Shruti Kunde, Rekha Singhal

TL;DR

This paper introduces GEMS, a novel meta-learning framework that efficiently trains a single model to adapt to tasks from multiple, diverse distributions. GEMS achieves this by learning to dynamically identify and utilize task-specific layers (BMP) or even sub-networks (MMSUP), outperforming existing methods in both accuracy and training speed, especially in challenging multi-distribution scenarios.

What Problem Does This Paper Address?

Meta-learning, particularly gradient-based meta-learning (GBML) methods like MAML, aims to train models that can quickly adapt to new tasks with minimal data and gradient updates. A core assumption in many GBML algorithms is that tasks are sampled from a single, consistent distribution. However, real-world applications often involve tasks drawn from multiple, distinct distributions. When faced with such multi-distributional data, standard GBML methods suffer from "negative knowledge transfer," leading to a significant drop in accuracy.

Existing solutions, like Multi-MAML, attempt to address this by training separate model initializations for each distribution. While this improves accuracy, it drastically increases training time by a factor of N (where N is the number of distributions). This creates a trade-off between model performance and computational cost. The paper's central problem is to break this trade-off: how can we achieve good performance across diverse task distributions without incurring prohibitive training costs?

Methods

GEMS (Generating Efficient Meta-Subnets) proposes two novel approaches to tackle multi-distributional meta-learning:

  • Binary Mask Perceptron (BMP): This method learns to dynamically identify and freeze specific layers within the network that are relevant for a given input task. It achieves this by introducing a "binary mask adapter" that generates a binary mask and a task-specific learning rate for each gradient update in the inner loop. This allows the model to focus updates on the most pertinent layers for the current task, reducing negative transfer.
  • Multi-modal Meta Supermask (MMSUP): This approach goes a step further than BMP by identifying and training sub-networks of neurons within layers, rather than entire layers. Inspired by the Lottery Ticket Hypothesis, MMSUP aims to find the most relevant parameters for each task distribution. This allows for more fine-grained control over parameter updates and knowledge sharing between distribution-agnostic parameters.

Both GEMS approaches train a single base model, making them computationally more efficient than methods that train multiple independent models. The core idea is to leverage task-specific parameter selection to improve generalization while minimizing computational overhead.

Datasets

The paper evaluates GEMS on quasi-benchmark datasets commonly used in meta-learning for image classification. These include:

  • CUBirds (CUB200)
  • Aircraft
  • VGG Flowers
  • Fungi

These datasets are used in both same-distribution and cross-domain settings to test the model's ability to generalize across different types of visual tasks.

Key Insights and Ideas

  • Dynamic Layer/Subnet Selection is Key: The most significant insight is that instead of freezing fixed layers (like ANIL) or training separate models (like Multi-MAML), dynamically identifying and utilizing task-specific components (layers or sub-networks) is crucial for effective multi-distributional meta-learning.
  • Breaking the Accuracy-Cost Trade-off: GEMS demonstrates that it's possible to achieve competitive or superior accuracy compared to Multi-MAML while significantly reducing training time. This is achieved by training a single, efficient model.
  • Layer-wise vs. Parameter-wise Masking: BMP's layer-level masking and MMSUP's parameter-level (sub-network) masking offer different levels of granularity. While MMSUP is more fine-grained, BMP can sometimes offer better cross-domain performance by selecting entire layers that might contain relevant, albeit not perfectly specific, parameters.
  • Adaptation Steps Matter (for BMP): The study on adaptation steps reveals that for BMP, fewer adaptation steps can lead to better performance. This suggests that the model quickly learns a good prior, and extensive fine-tuning might not always be beneficial, especially in multi-distribution scenarios.

Key Results

  • Accuracy Improvement: GEMS (both BMP and MMSUP) consistently outperforms MAML in multi-distributional settings. In many cases, it also achieves comparable or better accuracy than Multi-MAML.
  • Significant Speedup: GEMS achieves a substantial speedup in training time compared to Multi-MAML. For instance, in a 5-dataset scenario, Multi-MAML trains 5 separate models, whereas GEMS trains a single model, leading to significantly lower overall training times (e.g., ~2x to 4x faster).
  • Cross-Domain Performance: GEMS shows strong performance in cross-domain scenarios, indicating its ability to generalize to distributions not explicitly seen during training.
  • BMP vs. MMSUP: BMP generally has a slightly lower training time than MMSUP due to its layer-level granularity. MMSUP, while more computationally intensive, offers finer control over parameter selection.

Limitations and Future Work

  • Training Time Overhead: While GEMS is faster than Multi-MAML, both BMP and MMSUP incur a higher training time than the base MAML. This is attributed to the additional compute required by the adapter network (for BMP) or the sub-network identification process (for MMSUP).
  • Sparsity Tuning: The paper notes that while varying sparsity in MMSUP can improve performance, finding the optimal sparsity configuration might require careful tuning. Fixed sparsity across all layers doesn't always yield optimal results.
  • Future Work: The authors plan to extend GEMS to other domains like image segmentation, object detection, and reinforcement learning. They also aim to explore multi-modal scenarios where models need to generalize across different input modalities.

Summary updated

BibTeX
@inproceedings{pimpalkhute2023gems,
  author = {Varad Pimpalkhute and Shruti Kunde and Rekha Singhal},
  title = {{GEMS: Generating Efficient Meta-Subnets}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2023},
}
Figure