Scalable Weight Reparametrization for Efficient Transfer Learning

Byeonggeun Kim, Jun-Tae Lee, Seunghan yang, Simyung Chang

TL;DR

Scalable Weight Reparametrization (SWR) is a new transfer learning method that allows developers to precisely control the trade-off between accuracy and the number of updated parameters. By using a policy network to decide which layers to update, SWR achieves state-of-the-art performance on tiny edge-device models with zero additional inference computation and significantly fewer task-specific parameters.

What Problem Does This Paper Address?

Transfer learning is the bread and butter of modern AI: you take a massive pre-trained model and "fine-tune" it for a specific task. However, if you have dozens of downstream tasks (e.g., a voice assistant that needs to recognize keywords in 20 different languages), saving a full copy of the model for every task is a memory nightmare for mobile and edge devices.

Existing "efficient" transfer learning methods usually fall into two traps:

  1. Increased Complexity: They add "adapter" modules or extra layers that increase the number of calculations (FLOPs) during inference.
  2. Lack of Control: They don't provide a reliable way to say, "I only have room for 10% more parameters; give me the best accuracy possible within that budget."

The authors tackle these gaps, specifically focusing on "tiny models" where every kilobyte of memory and every clock cycle counts.

Methods

The core of SWR is a simple but clever reparametrization formula for each layer $l$: $$w_l = w_l^0 + b_l w'_l$$ Here, $w_l^0$ is the frozen pre-trained weight, $w'_l$ is a new task-specific weight, and $b_l$ is a binary "policy" (either 0 or 1). If $b_l=1$, the layer gets a task-specific update; if $b_l=0$, it stays frozen. Crucially, at inference time, $w_l^0$ and $w'_l$ can be summed together into a single weight matrix, meaning there is zero extra computation compared to the original model.

To make this work, the authors introduce a Policy Network ($h$). This small network takes a "target cost" ($c$) as input—representing the fraction of parameters you're willing to update—and decides which layers should have $b_l=1$.

The training happens in two stages, as shown in the figure below:

Fig. 1. Two-stage training of SWR. f, g, and h are the feature extractor, the classifier, and the policy-net. Given a downstream task, c is the target cost for f after transfer learning, and b is the binary policies for L layers. 1⃝The policy-net is trained upon the super-net, which fine-tunes all the L layers. 2⃝Layers are updated by weight reparametrization for a target policy.
  1. Stage 1 (Policy Learning): They train a "super-net" where all layers are learnable to get a baseline. Then, they freeze the super-net and train the policy network to select layers that minimize task loss while strictly adhering to the target cost $c$. They use a Gumbel-Softmax trick to make the discrete binary decisions ($0$ or $1$) differentiable during training.
  2. Stage 2 (Weight Learning): The policy network is frozen. Given a specific cost $c$, it generates a fixed policy. Only the task-specific weights ($w'_l$) for the selected layers are then trained from scratch.

Datasets

The authors evaluated SWR on two main fronts:

  • Multi-lingual Keyword Spotting (KWS): A new, challenging benchmark they created by combining GSC2 (Google Speech Commands v2 for English) and MC-KWS (Mandarin Chinese Scripted Speech Corpus). This tests how well a model pre-trained on multiple languages can adapt to a single-language task.
  • ImageNet-to-Sketch: A standard vision benchmark involving five downstream tasks (Flowers, WikiArt, Sketch, Cars, CUB) adapted from an ImageNet pre-trained ResNet-50.

Key Insights and Ideas

  • Controllability is King: Unlike previous methods like TAPS, which are sensitive to hyperparameters, SWR's policy network allows users to hit a specific parameter budget (e.g., exactly 10% or 30% additional parameters) reliably.
  • Layer Importance varies by Architecture: For the BCResNet-8 architecture, the policy network learned to prioritize updating depth-wise kernels over 1x1 convolutions. Depth-wise kernels have fewer parameters, so updating them is "cheaper" and allows the model to adapt more layers within the same budget.
  • BN Freezing: The authors found that for tiny models, updating the affine parameters (scale and shift) of Batch Normalization layers was actually counter-productive. Freezing these and only updating the running mean/variance saved parameters without hurting accuracy.
  • Super-net Initialization: Using a fully-trained "super-net" to guide the policy network's learning was essential. Without this two-stage approach, the policy network struggled to identify which layers were truly informative.

Key Results

  • SOTA on Tiny Models: On the KWS benchmark using BCResNet-8, SWR with a target cost of just 0.1 (10% extra parameters) outperformed all other efficient transfer learning baselines (SpotTune, Adapter, Rep-Net, TAPS).
  • Better than Full Fine-Tuning: Remarkably, SWR often achieved higher accuracy than "Fine-tuning All" layers, suggesting that freezing parts of the pre-trained model acts as a beneficial regularizer.
  • Zero Overhead: While methods like SpotTune and Adapters increase inference time by 3% to 79%, SWR maintains a 1x multiplier for computations.
  • Scalability: The method successfully scaled up to a ResNet-50 backbone on the ImageNet-to-Sketch benchmark, achieving the second-best overall accuracy while using significantly fewer parameters than the top performer.

Limitations and Future Work

  • Initialization Sensitivity: In the second stage, the authors initialize task-specific weights to zero. While this ensures a fair comparison, they noted that using super-net weights as initialization didn't always guarantee better performance, suggesting room for improvement in how task-specific weights are started.
  • Domain Scope: The paper focuses on audio (KWS) and vision (ImageNet). While the principles of weight reparametrization are general, the effectiveness of this specific policy-based approach in Large Language Models (LLMs) or Transformers remains an open question for future research.

Summary updated

BibTeX
@inproceedings{kim2023scalable,
  author = {Byeonggeun Kim and Jun-Tae Lee and Seunghan yang and Simyung Chang},
  title = {{Scalable Weight Reparametrization for Efficient Transfer Learning}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2023},
  url = {https://openreview.net/forum?id=_fSUUhS6H6t},
}
Figure