PEANuT: Parameter-Efficient Adaptation with Weight-aware Neural Tweakers

Yibo Zhong, Haoxiang Jiang, Lincan Li, Ryumei Nakada, Tianci Liu, Linjun Zhang, Huaxiu Yao, Haoyu WangarXiv 2024

TL;DR

PEANuT (Parameter-Efficient Adaptation with Weight-aware Neural Tweakers) is a novel parameter-efficient fine-tuning (PEFT) framework that generates task-specific weight updates by passing frozen pre-trained weights through a lightweight, non-linear neural network. By moving beyond the weight-agnostic linear constraints of methods like LoRA, PEANuT achieves superior expressivity and performance across more than twenty NLP and vision datasets while maintaining zero additional inference overhead.

What Problem Does This Paper Address?

When adapting large foundation models to downstream tasks, full fine-tuning is often prohibitively expensive. Parameter-efficient fine-tuning (PEFT) methods, most notably Low-Rank Adaptation (LoRA), solve this by keeping the base model frozen and training a tiny fraction of additional parameters.

However, LoRA has a fundamental limitation: it approximates weight updates ($\Delta W$) linearly using the product of two low-rank matrices ($A \times B$) learned completely from scratch. This approach is entirely weight-agnostic, meaning it ignores the rich prior knowledge embedded within the pre-trained weights ($W^0$). To capture complex adaptation patterns, linear methods like LoRA often have to scale up their rank, which directly undermines their parameter efficiency.

Methods

The authors introduce PEANuT, which replaces the standard low-rank matrix multiplication with a weight-aware neural tweaker. Instead of learning updates independently of the base model, PEANuT treats the cumulative weight update as an explicit, non-linear function of the original pre-trained weights.

The modified forward pass for a layer is formulated as: $$y = (W^0 + f(W^0; \theta))x$$

Where $f(W^0; \theta)$ is a lightweight neural network with bottleneck layers parameterized by learnable parameters $\theta$. In its simplest form (a single hidden layer), the neural tweaker is defined as: $$f(W^0; \theta) = \sigma(W^0\Theta_1)\Theta_2$$

Here, $\sigma$ represents a non-linear activation function like ReLU, and $\heta_1, \Theta_2$ are low-dimensional bottleneck matrices. The framework can also scale to deeper architectures by stacking multiple intermediate layers with residual connections to ensure stable optimization.

Figure 1: Framework of proposed PEANuT.

Crucially, because $f(W^0; \theta)$ produces a static weight matrix after training is complete, the learned updates can be directly merged back into the original pre-trained weights ($W^0$). This ensures that PEANuT introduces absolutely zero additional computational overhead during deployment and inference.

Datasets

The authors evaluated PEANuT across four extensive benchmarks comprising over twenty distinct datasets:

  1. Commonsense Reasoning: Evaluated on 8 datasets (BoolQ, PIQA, SIQA, HellaSwag, WinoGrande, ARC-e, ARC-c, OBQA) using the Commonsense170K training mixture.
  2. Arithmetic Understanding: Evaluated on GSM8K and MATH datasets using the MetaMath training set.
  3. Natural Language Understanding (NLU): Evaluated on the GLUE benchmark (MNLI, SST-2, MRPC, CoLA, QNLI, QQP, RTE, STS-B).
  4. Image Classification: Evaluated on 8 vision datasets (Oxford-Pets, StanfordCars, CIFAR10, DTD, EuroSAT, FGVC, RESISC45, CIFAR100) using a ViT-base backbone.

Key Insights and Ideas

  • Weight-Awareness is Key: During full fine-tuning, weight updates are implicitly driven by gradients that depend on the current weight states. By explicitly conditioning the PEFT update module on $W^0$, PEANuT leverages the base model's pre-existing structural knowledge to navigate the optimization landscape more effectively.
  • Non-Linearity Drives Parameter Efficiency: The authors mathematically prove that PEANuT can match or exceed the expressivity of LoRA while using fewer parameters. Introducing non-linear activations ($\sigma$) allows a smaller bottleneck dimension to capture intricate adaptation patterns that would require a much higher rank in a purely linear setup.
  • Robustness to Depth: Increasing the depth of the neural tweaker (up to 6 layers) consistently improves downstream accuracy without significantly expanding the parameter footprint, demonstrating that deeper non-linear transformations yield more expressive updates.

Key Results

PEANuT consistently outperformed LoRA and other strong PEFT baselines across all evaluated domains:

  • Commonsense Reasoning: Using LLaMA2-7B, PEANuT outperformed LoRA, PiSSA, and MiLoRA by 4.6%, 10.0%, and 2.5% in average accuracy, respectively. Similar substantial gains were observed on LLaMA3-8B and Qwen3-8B backbones.
  • Arithmetic Reasoning: On the Qwen3-8B backbone, PEANuT achieved an average accuracy of 81.69%, significantly beating LoRA (76.24%) and MiLoRA (78.80%).
  • GLUE Benchmark: A larger variant, PEANuT-L, achieved an average score of 86.6%, outperforming LoRA (84.7%) and even surpassing Full Fine-Tuning (85.6%) while updating only a fraction of the parameters.
  • Image Classification: On ViT-base, PEANuT achieved an average accuracy of 86.34%, yielding an 11.05% absolute improvement over standard LoRA (77.58%) and nearly matching Full Fine-Tuning (86.49%) using just 0.3% of the parameters.

Limitations and Future Work

While PEANuT demonstrates excellent efficiency and performance, the authors note a few practical boundaries:

  • Diminishing Returns with Extreme Depth: Pushing the neural tweaker's depth too far (e.g., to 10 layers) can lead to slight performance degradation. This is likely caused by optimization difficulties like vanishing or exploding gradients within the sub-network, indicating that very deep configurations require more fine-grained hyperparameter tuning.
  • Activation Memory: During the training phase, the non-linear activations within the neural tweakers incur a slightly higher activation memory footprint during backpropagation compared to purely linear methods, though the authors demonstrate this overhead remains minimal in practice.

Summary updated

BibTeX
@misc{zhong2024peanut,
  author = {Yibo Zhong and Haoxiang Jiang and Lincan Li and Ryumei Nakada and Tianci Liu and Linjun Zhang and Huaxiu Yao and Haoyu Wang},
  title = {{PEANuT: Parameter-Efficient Adaptation with Weight-aware Neural Tweakers}},
  year = {2024},
  eprint = {2410.01870},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.01870},
}
Figure