Neural Prompt Search

Yuanhan Zhang, Kaiyang Zhou, Ziwei Liu · DOI

Abstract

Neural prOmpt seArcH (NOAH) introduces a novel framework using Neural Architecture Search (NAS) to automate the design of parameter-efficient tuning modules for large-scale vision models. By treating tuning methods like LoRA, Adapters, and Visual Prompt Tuning (VPT) as searchable components within a frozen backbone, NOAH identifies optimal configurations tailored to specific downstream tasks. Experimental results across 20+ datasets demonstrate that NOAH consistently outperforms hand-crafted designs and full fine-tuning, achieving state-of-the-art performance on the VTAB-1k benchmark while maintaining high parameter efficiency.

1. Introduction

The scaling of Vision Transformers (ViTs) to billions of parameters has rendered traditional full fine-tuning increasingly impractical due to high computational costs, storage requirements, and the risk of overfitting on small datasets. Parameter-efficient tuning methods—such as Adapters, Low-Rank Adaptation (LoRA), and Visual Prompt Tuning (VPT)—offer an alternative by training only a small fraction of parameters while keeping the backbone frozen. However, selecting the optimal combination of these modules for a given task remains a significant challenge, often requiring extensive manual experimentation.

2. Methodology

NOAH addresses the selection challenge by automating the search for the "just right" tuning configuration.

2.1 Search Space and Architecture

The framework integrates three representative tuning modules—Adapter, LoRA, and VPT—into every block of a ViT. The search space encompasses the depth (which layers to apply a module) and the dimension (bottleneck size or token length) for each module type.

Figure 1: (a) Integration of Adapter, LoRA, and VPT modules into the ViT architecture. (b) Performance comparison of NOAH against individual tuning methods across various datasets.

To avoid the prohibitive cost of training thousands of individual models, NOAH employs a one-shot NAS approach using a "supernet" with weight entanglement. After training the supernet, an evolutionary algorithm is used to identify the best-performing "subnet" for a specific task and parameter budget. This process involves crossover and mutation operations to explore the architectural search space efficiently.

Figure 2: Illustration of the Crossover and Mutation processes used in the evolutionary search to optimize prompt module configurations.

3. Experimental Evaluation

NOAH was evaluated on a massive scale using the VTAB-1k benchmark (19 tasks), few-shot learning datasets (5 datasets), and domain generalization tasks (ImageNet variants). These benchmarks cover a wide range of visual domains, from natural objects to specialized medical and satellite imagery.

4. Results and Insights

4.1 Performance and Robustness

NOAH achieved a state-of-the-art average score of 75.5% on VTAB-1k, significantly outperforming full fine-tuning (68.9%) and individual modules like LoRA (74.5%). It also demonstrated superior robustness, with up to a 6.8% improvement on ImageNet-V2 compared to baselines, proving that optimizing prompt structure enhances generalization.

4.2 Complementarity of Tuning Modules

A key insight from the search results is that different tuning methods are complementary. NOAH typically places Adapters and LoRA in deeper layers, while VPT is favored in shallower layers. This synergy allows NOAH to adapt to diverse data distributions more effectively than any single hand-engineered method. For instance, while VPT performance can "plunge" on specific tasks like Clevr/count, NOAH automatically pivots to more effective module combinations.

4.3 Efficiency

The discovered subnets are highly efficient, typically utilizing only 0.4M to 0.6M trainable parameters—less than 1% of the total model size. This makes NOAH particularly suitable for deployment in resource-constrained environments.

5. Conclusion

Neural Prompt Search proves that optimizing the structure of prompt modules is a powerful alternative to backbone fine-tuning. By treating parameter-efficient tuning as an architecture search problem, NOAH finds the "Goldilocks" zone for model adaptation. Future work will explore the application of these principles to Large Language Models (LLMs).

Summary updated

BibTeX
@article{zhang2022neural,
  author = {Yuanhan Zhang and Kaiyang Zhou and Ziwei Liu},
  title = {{Neural Prompt Search}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2022},
  doi = {10.1109/tpami.2024.3435939},
}
Figure