mlsanityData to 14 Oct 2026

Context-aware Prompt Tuning: Advancing In-Context Learning with Adversarial Methods

arXiv 2410.17222 ↗First posted 22 Oct 2024cs.CLcited by 4

Not on the map. Why?

Abstract (arXiv)

Fine-tuning Large Language Models (LLMs) typically involves updating at least a few billions of parameters. A more parameter-efficient approach is Prompt Tuning (PT), which updates only a few learnable tokens, and differently, In-Context Learning (ICL) adapts the model to a new task by simply including examples in the input without any training. When applying optimization-based methods, such as fine-tuning and PT for few-shot learning, the model is specifically adapted to the small set of training examples, whereas ICL leaves the model unchanged. This distinction makes traditional learning methods more prone to overfitting; in contrast, ICL is less sensitive to the few-shot scenario. While ICL is not prone to overfitting, it does not fully extract the information that exists in the training examples. This work introduces Context-aware Prompt Tuning (CPT), a method inspired by ICL, PT, and adversarial attacks. We build on the ICL strategy of concatenating examples before the input, but we extend this by PT-like learning, refining the context embedding through iterative optimization to extract deeper insights from the training examples. We carefully modify specific context tokens, considering the unique structure of input and output formats. Inspired by adversarial attacks, we adjust the input based on the labels present in the context, focusing on minimizing, rather than maximizing, the loss. Moreover, we apply a projected gradient descent algorithm to keep token embeddings close to their original values, under the assumption that the user-provided data is inherently valuable. Our method has been shown to achieve superior accuracy across multiple classification tasks using various LLM models.

Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 39 of its 48 references that are in the map. First posted on arXiv 22 Oct 2024.

Builds on

39 of 48 references.

References · 39

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
  3. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
  4. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
  5. 2014Explaining and Harnessing Adversarial Examplescited by 7,364
  6. 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,415
  7. 2019Parameter-Efficient Transfer Learning for NLPcited by 4,236
  8. 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,915
  9. 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,795
  10. 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,512
  11. 2019ALBERT: A Lite BERT for Self-supervised Learning of Language Representationscited by 2,790
  12. 2015Character-level Convolutional Networks for Text Classificationcited by 2,330
27 more
  1. 2022BLOOM: A 176B-Parameter Open-Access Multilingual Language Modelcited by 1,984
  2. 2022Large Language Models Encode Clinical Knowledgecited by 1,830
  3. 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,392
  4. 2021BitFit: Simple Parameter-efficient Fine-tuning for Transformer-based Masked Language-modelscited by 1,245
  5. 2016Adversarial Machine Learning at Scalecited by 936
  6. 2022Few-Shot Parameter-Efficient Fine-Tuning is Better and Cheaper than In-Context Learningcited by 896
  7. 2014Deep Neural Networks are Easily Fooled: High Confidence Predictions for Unrecognizable Imagescited by 776
  8. 2017Evasion Attacks against Machine Learning at Test Timecited by 689
  9. 2017Adversarial Examples Are Not Easily Detected: Bypassing Ten Detection Methodscited by 546
  10. 2021Compacter: Efficient Low-Rank Hypercomplex Adapter Layerscited by 460
  11. 2019How to Fine-Tune BERT for Text Classification?cited by 411
  12. 2022RLPrompt: Optimizing Discrete Text Prompts with Reinforcement Learningcited by 366
  13. 2021True Few-Shot Learning with Language Modelscited by 344
  14. 2020Uncovering the Limits of Adversarial Training against Norm-Bounded Adversarial Examplescited by 278
  15. 2021PTR: Prompt Tuning with Rules for Text Classificationcited by 238
  16. 2021PPT: Pre-trained Prompt Tuning for Few-shot Learningcited by 232
  17. 2021Fixing Data Augmentation to Improve Adversarial Robustnesscited by 204
  18. 2022Delta Tuning: A Comprehensive Study of Parameter Efficient Methods for Pre-trained Language Modelscited by 180
  19. 2023Multitask Prompt Tuning Enables Parameter-Efficient Transfer Learningcited by 115
  20. 2024Mind Your Format: Towards Consistent Evaluation of In-Context Learning Improvementscited by 83
  21. 2024LoRA-Pro: Are Low-Rank Adapters Properly Optimized?cited by 77
  22. 2021Prompt Waywardness: The Curious Case of Discretized Interpretation of Continuous Promptscited by 64
  23. 2023When does In-context Learning Fall Short and Why? A Study on Specification-Heavy Taskscited by 37
  24. 2022Threat Model-Agnostic Adversarial Defense using Diffusion Modelscited by 24
  25. 2023How Does In-Context Learning Help Prompt Tuning?cited by 11
  26. 2023Class-Conditioned Transformation for Enhanced Robust Image Classificationcited by 5
  27. 2024IntCoOp: Interpretability-Aware Vision-Language Prompt Tuningcited by 5

Built on by

Cited by year

Citing papers per year: 2025: 4.

4 papers.