NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Meta-Ensemble Parameter Learning

Zhengcong Fei, Shuman Tian, Junshi Huang, Xiaoming Wei, Xiaolin WeiarXiv 2022

TL;DR

This paper introduces "Meta-Ensemble Parameter Learning," a novel task and a Transformer-based model called "WeightFormer" that directly predicts the weights of a student model from multiple teacher models in a single forward pass. This approach aims to achieve ensemble-level performance with the efficiency of a single model, overcoming the limitations of traditional knowledge distillation and model ensembling.

What Problem Does This Paper Address?

Ensemble methods in machine learning are known to boost performance and robustness, but they come with significant drawbacks: high memory requirements and computationally expensive inference. Knowledge distillation (KD) offers a solution by training a single student model to mimic an ensemble's behavior, but it faces scalability issues, especially when new teacher models are introduced, requiring costly retraining. The core problem this paper addresses is the inefficiency and lack of scalability in obtaining the benefits of ensembles, particularly when dealing with dynamic sets of teacher models. They propose a new paradigm that bypasses the need for retraining by directly learning to generate the student model's parameters.

Methods

The paper introduces WeightFormer, a Transformer-based architecture designed to directly predict the parameters (weights) of a student model. Instead of traditional KD where a student learns from teacher outputs, WeightFormer takes the parameters of multiple teacher models as input and, in a single forward pass, outputs the weights for a student model.

Key novelties include:

  • Meta-Ensemble Parameter Learning Task: A new task formulation where the goal is to learn a function that maps teacher model parameters to student model parameters, enabling direct generation.
  • Transformer Architecture: Leverages the power of Transformers to process and learn from the concatenated weight matrices of teacher models.
  • Cross-Layer Information Flow: Incorporates information from previous layers into the prediction of current layer weights, recognizing that layers are not independent. This is achieved by adding a special [cross] token that is globally attended to.
  • Shift Consistency: A regularization technique that ensures the generated weights are invariant to the order of teacher models. This is implemented by feeding the same input twice, once with the original teacher model order and once with a shifted order, and minimizing the difference between the two generated weight sets.

Datasets

The experiments were conducted on three standard image classification datasets:

  • CIFAR-10 (C-10)
  • CIFAR-100 (C-100)
  • ImageNet

The paper does not introduce new benchmarks but rather uses these established datasets to evaluate the proposed method against existing approaches.

Key Insights and Ideas

  • Direct Parameter Generation is Feasible: The most significant insight is that it's possible to directly learn a mapping from teacher parameters to student parameters, bypassing the need for intermediate distillation steps or inference-time ensembling.
  • Transformer as a Weight Generator: The Transformer architecture proves to be a powerful tool for processing and learning complex relationships within weight matrices, enabling it to act as a "weight generator."
  • Cross-Layer and Shift Consistency are Crucial: The proposed novelties, cross-layer information flow and shift consistency, are shown to be vital for achieving high performance and robustness, indicating that the model effectively captures inter-layer dependencies and order invariance.
  • Scalability Beyond KD: The approach offers a significant advantage over traditional KD in terms of scalability, as it can handle unseen teacher models without retraining, which is a major bottleneck for KD.

Key Results

  • Competitive Performance: WeightFormer achieves classification performance comparable to or exceeding that of a deep ensemble of models.
  • Outperforms KD and Baselines: The proposed method significantly outperforms standard Knowledge Distillation (KD) and a simple MLP baseline that attempts to predict weights. For instance, on CIFAR-10, WeightFormer achieved 93.3% ACC-1, compared to KD's 92.8% and a single model's 92.4%.
  • Exceeds Ensemble with Fine-tuning: Encouragingly, WeightFormer, when fine-tuned with a small amount of additional data, can even surpass the performance of the average ensemble. For example, on ViT-B/32 for ImageNet, the fine-tuned WeightFormer (WF*) achieved 80.5% ACC-1, while the ensemble was at 78.3%.
  • Robustness: The results from WeightFormer show less variance and more robust prediction performance compared to KD.
  • Parameter Efficiency: The Transformer architecture in WeightFormer is more parameter-efficient than an MLP-based approach, especially when dealing with a large number of layers and teacher models.

Limitations and Future Work

  • Teacher Architecture Diversity: The current work primarily focuses on generating weights for models with similar architectures. The authors acknowledge that exploring weight generation for diverse teacher architectures is a promising future direction.
  • Generalization to Unseen Models: While WeightFormer shows good generalization to unseen teacher models, further research could enhance this capability.
  • Complex Teacher Structures: The paper suggests that more complex teacher model structures, like Swin Transformers, could benefit from further exploration with the WeightFormer framework.
  • Broader Applications: The authors believe their task and model can lead to a new paradigm for ensemble networks, suggesting potential applications beyond image classification.

Summary updated

BibTeX
@misc{fei2022meta,
  author = {Zhengcong Fei and Shuman Tian and Junshi Huang and Xiaoming Wei and Xiaolin Wei},
  title = {{Meta-Ensemble Parameter Learning}},
  year = {2022},
  eprint = {2210.01973},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2210.01973},
}

Loading related content...

Figure