NAP-Tuning

March 7, 2026 ยท View on GitHub

This is the official implementation of the paper "NAP-Tuning: Neural Augmented Prompt Tuning for Adversarially Robust Vision-Language Models" (IEEE TPAMI, 2026).

Installation

  1. Install the Dassl toolbox.

  2. Install dependencies:

pip install -r requirements.txt
  1. Prepare datasets following docs/DATASETS.md.

Training

Modify DATA in scripts/main.sh to your dataset root, then run:

bash scripts/main.sh

Evaluation

Modify DATA and DIR in scripts/eval.sh, then run:

bash scripts/eval.sh

Acknowledgements

This codebase is built upon MaPLe and Dassl.

Citation

@article{zhang2026nap,
  title={NAP-Tuning: Neural Augmented Prompt Tuning for Adversarially Robust Vision-Language Models},
  author={Zhang, Jiaming and Wang, Xin and Ma, Xingjun and Qiu, Lingyu and Jiang, Yu-Gang and Sang, Jitao},
  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
  year={2026},
  publisher={IEEE}
}