Model Composition: Can Multiple Neural Networks Be Combined into a Single Network Using Only Unlabeled Data?

Amin Banitalebi-Dehkordi, Xinyu Kang, Yong Zhang

TL;DR

This paper introduces a method to combine multiple specialized neural networks into a single, more capable model using only unlabeled data. By treating existing models as "black-box" teachers that generate and aggregate pseudo-labels, the researchers can merge disparate skills (like detecting cars and detecting people) into one efficient architecture without ever seeing the original training data or labels.

What Problem Does This Paper Address?

In the current deep learning landscape, we suffer from an embarrassment of riches: there are thousands of pre-trained models available, each specialized in different tasks or trained on different datasets. However, deploying five different models to perform five different tasks is computationally expensive and slow.

The authors tackle the "Model Composition" challenge: How do we fuse these specialized models into one? Standard approaches like Knowledge Distillation usually require the original labeled training data, which is often private or lost. Other methods like Multi-Task Learning require training from scratch. This paper asks: Can we create a "Frankenstein’s monster" of a model—one that inherits the best traits of its parents—using only a pile of unlabeled images and an inference API?

Methods

The proposed framework follows a four-stage pipeline that treats input models as black boxes:

  1. Pseudo-label Generation: An unlabeled dataset is passed through all "input" models. Each model provides its best guess (pseudo-labels) for the objects it recognizes.
  2. Filtering: Not all guesses are good. The system uses an entropy-based thresholding mechanism. If a model is "confused" (high entropy) about a prediction, that label is discarded to prevent noisy data from corrupting the new model.
  3. Aggregation: This is the "committee" phase. For tasks like object detection, the system looks for consensus. If multiple models see a "car" in the same spot, that label is prioritized. The authors use a consensus-based strategy (majority voting) and Soft-NMS to refine overlapping bounding boxes.
  4. Training: A fresh "target" model (which can have a completely different architecture than the inputs) is trained on these aggregated pseudo-labels.

Crucially, if a small amount of labeled data is available, the model can be fine-tuned in a semi-supervised fashion to further boost performance.

Datasets

The authors evaluated their method across several standard benchmarks:

  • Object Detection: COCO, Pascal-VOC, and Open-Images-V5 (OID).
  • Image Classification: Caltech-256 and OID.
  • Specialized Tasks: Face detection (WIDERFACE) and Mask detection (MAFA) were combined to create a joint face-and-mask detector.

Key Insights and Ideas

  • Architecture Agnostic: You can combine an EfficientDet and a YOLO model into a RetinaNet. The target architecture is entirely up to the user, allowing for the selection of "device-friendly" models for mobile deployment.
  • Privacy-Preserving: Because the method only requires an inference API, model owners don't need to share their weights, code, or proprietary training data.
  • The "Union of Skills": The combined model doesn't just mimic one teacher; it learns the union of all categories. If Model A knows "dogs" and Model B knows "hats," the composed model learns both.
  • Better than Supervised (with low data): One of the most surprising findings was that using this method as a pre-training step for semi-supervised learning (with only 1% of labels) outperformed standard supervised training by a massive margin.

Key Results

  • Object Detection: In a scenario combining three different specialized detectors, the unsupervised composed model achieved 32.6% mAP, very close to the "upper bound" supervised model's 35.1%.
  • Low-Data Regime: When fine-tuned with only 1% of ground-truth labels, the composed model showed an +18.6% mAP improvement over a model trained from scratch on that same 1% of data.
  • Scaling Up: The method successfully combined 10 different models trained on different subsets of COCO, proving it can scale to complex "model market" scenarios.
  • Practical Use-Case: They successfully merged a face detector and a mask detector into one model that achieved 38.90% AP, significantly higher than the individual models' performance on the joint task.

Limitations and Future Work

The authors note that the distribution of the unlabeled data matters. If you use unlabeled data that is wildly different from the original training data (a "domain shift"), the pseudo-labels become less reliable, leading to a drop in performance.

While the paper shows that "light" domain shifts are manageable, the authors leave the exploration of more robust handling of extreme domain shifts for future research. Additionally, the process of generating pseudo-labels from 10+ models can be time-consuming, though the authors point out this can be easily parallelized in a production environment.

Summary updated

Abstract

The diversity of deep learning applications, datasets, and neural network architectures necessitates a careful selection of the architecture and data that match best to a target application. As an attempt to mitigate this dilemma, this paper investigates the idea of combining multiple trained neural networks using unlabeled data. In addition, combining multiple models into one can speed up the inference, result in stronger, more capable models, and allows us to select efficient device-friendly target network architectures. To this end, the proposed method makes use of generation, filtering, and aggregation of reliable pseudo-labels collected from unlabeled data. Our method supports using an arbitrary number of input models with arbitrary architectures and categories. Extensive performance evaluations demonstrated that our method is very effective. For example, for the task of object detection and without using any ground-truth labels, an EfficientDet-D0 trained on Pascal-VOC and an EfficientDet-D1 trained on COCO, can be combined to a RetinaNet-ResNet50 model, with a similar mAP as the supervised training. If fine-tuned in a semi-supervised setting, the combined model achieves +18.6%, +12.6%, and +8.1% mAP improvements over supervised training with 1%, 5%, and 10% of labels.
BibTeX
@inproceedings{banitalebidehkordi2021model,
  author = {Amin Banitalebi-Dehkordi and Xinyu Kang and Yong Zhang},
  title = {{Model Composition: Can Multiple Neural Networks Be Combined into a Single Network Using Only Unlabeled Data?}},
  booktitle = {BMVC},
  year = {2021},
  url = {https://openreview.net/forum?id=UxpBFqq1YwS},
}

Loading related content...

Figure