MixMo: Mixing Multiple Inputs for Multiple Outputs via Deep Subnetworks

Alexandre Ramé, Rémy Sun, Matthieu Cord

Abstract

Recent strategies have achieved ensembling "for free" by fitting concurrently diverse subnetworks inside a single base network. The main idea during training is that each sub-network learns to classify only one of the multiple inputs simultaneously provided. However, the question of how to best mix these multiple inputs has not been studied so far. In this paper, we introduce MixMo, a new generalized framework for learning multi-input multi-output deep subnetworks. Our key motivation is to replace the suboptimal summing operation hidden in previous approaches by a more appropriate mixing mechanism. For that purpose, we draw inspiration from successful mixed sample data augmentations. We show that binary mixing in features—particularly with rectangular patches from CutMix—enhances results by making subnetworks stronger and more diverse. We improve state of the art for image classification on CIFAR-100 and Tiny ImageNet datasets. Our easy to implement models notably outperform data augmented deep ensembles, without the inference and memory overheads.

Introduction

In deep learning, ensembling—training several different models and averaging their predictions—is a gold standard for improving accuracy and uncertainty estimation. However, ensembling is traditionally expensive; an ensemble of five models typically requires five times the memory and computation.

Recent research into Multi-Input Multi-Output (MIMO) configurations attempted to solve this by training multiple "subnetworks" inside a single base model. While promising, early MIMO approaches relied on simply adding input features together (summation). We argue that summation is a suboptimal and restrictive way to merge information, as it fails to encourage sufficient diversity between subnetworks, leading them to homogenize and defeating the purpose of an ensemble.

The MixMo Framework

MixMo generalizes the MIMO framework by introducing a sophisticated Mixing Block and a specialized training regime designed to maximize subnetwork diversity.

Architecture and Mixing

The model architecture consists of $M$ separate shallow encoders to process $M$ different input images, a shared "core" network, and $M$ separate dense output heads. The core innovation is the Mixing Block ($\mathcal{M}$). Instead of adding encoded features, MixMo utilizes Cut-MixMo. This technique takes a patch from the feature map of one image and pastes it into the feature map of another, similar to the CutMix data augmentation technique but performed in the latent feature space.

Overview of the MixMo architecture. The framework replaces the standard summation of features (MIMO) with a patch-based mixing block (Cut-MixMo) to improve subnetwork diversity.

Training and Inference

Because patch mixing is inherently asymmetric (one image might occupy a larger spatial area than another), we introduce an asymmetric loss weighting function $w_r$. This power-law weighting ensures the network does not ignore the "smaller" image during training, balancing the learning process across all subnetworks. At test time, a single image is fed into all $M$ encoders. The core network processes the combined features, and the $M$ heads produce predictions that are averaged to provide ensemble benefits in a single forward pass.

Experimental Results

We evaluated MixMo on standard image classification benchmarks, including CIFAR-100 and Tiny ImageNet, as well as robustness benchmarks like CIFAR-100-c.

State-of-the-Art Accuracy

On CIFAR-100 using a WideResNet-28-10, Cut-MixMo achieved 85.40% Top-1 accuracy, significantly outperforming the original MIMO (83.06%). It also reached a new state-of-the-art of 70.24% on Tiny ImageNet. As shown in the scaling analysis, MixMo achieves results comparable to a Deep Ensemble of two separate models while using roughly half the parameters and inference time.

Performance comparison across varying network widths. Cut-MixMo consistently outperforms Deep Ensembles and standard MIMO while maintaining lower computational costs.

Uncertainty and Robustness

MixMo demonstrates superior uncertainty estimation, showing much lower Negative Log-Likelihood (NLL) scores than standard models. This indicates that its predictions are better calibrated. Furthermore, in tests on corrupted images (CIFAR-100-c), MixMo proved more resilient than standard data augmentation or basic ensembling methods.

Discussion and Conclusion

MixMo effectively "recycles" the wasted capacity of over-parameterized modern networks to host multiple subnetworks. By using binary masking (patches), MixMo simulates occlusion, forcing each subnetwork to find relevant information in different spatial locations. This prevents subnetworks from relying on the same features, thereby increasing ensemble diversity.

While the framework supports $M > 2$ subnetworks, performance gains tend to diminish as $M$ increases, suggesting that subnetworks eventually compete for the core network's capacity. Future research will focus on applying MixMo to non-convolutional architectures like Vision Transformers and developing even more specialized mixing blocks.

Summary updated

BibTeX
@misc{rame2021mixmo,
  author = {Alexandre Ramé and Rémy Sun and Matthieu Cord},
  title = {{MixMo: Mixing Multiple Inputs for Multiple Outputs via Deep Subnetworks}},
  year = {2021},
  eprint = {2103.06132},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2103.06132},
}
Figure