Learning to Compose SuperWeights for Neural Parameter Allocation Search

Piotr Teterwak, Soren Nelson, Nikoli Dryden, Dina Bashkirova, Kate Saenko, Bryan A. Plummer

Abstract

Neural parameter allocation search (NPAS) automates parameter sharing by obtaining weights for a network given an arbitrary, fixed parameter budget. Prior work has two major drawbacks we aim to address. First, there is a disconnect in the sharing pattern between the search and training steps, where weights are warped for layers of different sizes during the search to measure similarity, but not during training, resulting in reduced performance. To address this, we generate layer weights by learning to compose sets of SuperWeights, which represent a group of trainable parameters. These SuperWeights are created to be large enough so they can be used to represent any layer in the network, but small enough that they are computationally efficient. The second drawback we address is the method of measuring similarity between shared parameters. Whereas prior work compared the weights themselves, we argue this does not take into account the amount of conflict between the shared weights. Instead, we use gradient information to identify layers with shared weights that wish to diverge from each other. We demonstrate that our SuperWeight Networks consistently boost performance over the state-of-the-art on the ImageNet and CIFAR datasets in the NPAS setting. We further show that our approach can generate parameters for many network architectures using the same set of weights. This enables us to support tasks like efficient ensembling and anytime prediction, outperforming fully-parameterized ensembles with 17% fewer parameters.

Introduction

In the quest for more efficient AI, Neural Parameter Allocation Search (NPAS) has emerged as a way to automate parameter sharing. The goal is to fit a high-performing network into a fixed, often tiny, parameter budget. However, prior state-of-the-art methods (like SSN) suffered from two major flaws: the "Warping Gap" and "Surface-Level Similarity" metrics.

The Warping Gap refers to the use of bilinear interpolation to "warp" weights between layers of different sizes. This creates a disconnect between the search phase (where warping happens) and the final training phase, leading to lower accuracy. Furthermore, older methods decided which layers should share parameters by looking at the values of the weights. This is often the wrong metric; two layers might have similar weight values but "want" to learn completely different features, leading to a "gradient tug-of-war" that hurts optimization.

Methodology: SuperWeight Networks

To address these issues, we introduce a hierarchical weight construction process centered around SuperWeights.

Avoiding the Warping Gap

Instead of warping one large template, we create "SuperWeights"—fixed-size groups of parameters. To form a layer's weights, we simply concatenate multiple SuperWeights together. This acts like LEGO bricks: you don't stretch a brick to fit a gap; you just add more bricks. This ensures the "effective receptive field" of the parameters stays the same during both search and training, eliminating the performance drop-off seen in earlier NPAS work.

Comparison of prior warping-based methods (a) vs. the proposed SuperWeight approach (b).

Hierarchical Construction

The construction process is hierarchical. Each SuperWeight is itself a linear combination of "Weight Templates." This adds another layer of efficiency, as different SuperWeights can share the same underlying templates but use different coefficients ($\alpha$).

The hierarchical SuperWeight construction process, from templates to final model members.

To find the best sharing strategy, we look at gradient similarity. If two layers receive gradients pointing in similar directions, they are grouped into a "SuperWeight Cluster" to share parameters. If their gradients conflict (point in opposite directions), they are kept separate to avoid optimization issues. This ensures that shared parameters aren't being pulled in two different directions by competing layers.

Experimental Results

The model was evaluated on standard computer vision benchmarks including CIFAR-10, CIFAR-100, and ImageNet.

  • ImageNet Superiority: On ImageNet, SuperWeight Networks (SWN) provided a 1% to 2% boost in top-1 accuracy over previous state-of-the-art NPAS methods within the same parameter budget.
  • Efficiency Gains: The approach outperformed fully-parameterized ensembles on CIFAR while using 17% fewer parameters.
  • Anytime Prediction: SWN supports "anytime prediction" (where you can stop the model early to save time) more effectively than specialized models like Slimmable Networks or MSDNet, providing a wider range of accuracy/latency trade-offs.

Conclusion

SuperWeight Networks provide a robust framework for parameter allocation by replacing weight warping with concatenation and using gradient-based similarity for sharing decisions. This approach not only improves accuracy on standard benchmarks but also enables the creation of heterogeneous ensembles from a single shared parameter pool, significantly improving parameter efficiency.

Summary updated

BibTeX
@inproceedings{teterwak2024learning,
  author = {Piotr Teterwak and Soren Nelson and Nikoli Dryden and Dina Bashkirova and Kate Saenko and Bryan A. Plummer},
  title = {{Learning to Compose SuperWeights for Neural Parameter Allocation Search}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2024},
  url = {https://openreview.net/forum?id=3znH2Gt4LP},
}

Loading related content...

Figure