Lune

ICML2024Top-tier venue

Prompting a Pretrained Transformer Can Be a Universal Approximator

Aleksandar Petrov, Philip Torr, Adel Bibi

Abstract

Despite the widespread adoption of prompting, prompt tuning and prefix-tuning of transformer models, our theoretical understanding of these fine-tuning methods remains limited. A key question is whether one can arbitrarily modify the behavior of pretrained model by prompting or prefix-tuning it. Formally, whether prompting and prefix-tuning a pretrained model can universally approximate sequence-to-sequence functions. This paper answers in the affirmative and demonstrates that much smaller pretrained models than previously thought can be universal approximators when prefixed. In fact, the attention mechanism is uniquely suited for universal approximation with prefix-tuning a single attention head being sufficient to approximate any continuous function. Moreover, any sequence-to-sequence function can be approximated by prefixing a transformer with depth linear in the sequence length. Beyond these density-type results, we also offer Jackson-type bounds on the length of the prefix needed to approximate a function to a desired precision.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

12 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • LoRA: Low-Rank Adaptation of Large Language Models cites Language Models are Few-Shot Learners
  • When Do Prompting and Prefix-Tuning Work? A Theory of Capabilities and Limitations cites LoRA: Low-Rank Adaptation of Large Language Models
  • When Do Prompting and Prefix-Tuning Work? A Theory of Capabilities and Limitations cites Large Language Models are Zero-Shot Reasoners
  • When Do Prompting and Prefix-Tuning Work? A Theory of Capabilities and Limitations cites AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts
  • When Do Prompting and Prefix-Tuning Work? A Theory of Capabilities and Limitations cites Language Models are Few-Shot Learners
  • When Do Prompting and Prefix-Tuning Work? A Theory of Capabilities and Limitations cites Finetuned Language Models are Zero-Shot Learners
  • Sample Complexity and Representation Ability of Test-time Scaling Paradigms cites Language Models are Few-Shot Learners
  • Large Language Models are Zero-Shot Reasoners cites AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts
  • Large Language Models are Zero-Shot Reasoners cites Language Models are Few-Shot Learners
  • AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts cites Language Models are Few-Shot Learners
  • Universal Approximation with Softmax Attention cites Language Models are Few-Shot Learners
  • Finetuned Language Models are Zero-Shot Learners cites Language Models are Few-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers12

  1. Secret Collusion among AI Agents: Multi-Agent Deception via SteganographySumeet Ramesh Motwani, Mikhail Baranchuk, Martin Strohmeier, Vijay Bolina et al.NeurIPS 2024 · 140 citations
  2. When Do Prompting and Prefix-Tuning Work? A Theory of Capabilities and LimitationsAleksandar Petrov, Philip Torr, Adel BibiICLR 2024 · 44 citations
  3. Sample Complexity and Representation Ability of Test-time Scaling ParadigmsBaihe Huang, Shanda Li, Tianhao Wu, Yiming Yang et al.ICLR 2026 · 11 citations
  4. Universal Approximation with Softmax AttentionJerry Yao-Chieh Hu, Hude Liu, Hong-Yu Chen, Weimin Wu et al.ICML 2026 · 9 citations
  5. Approximation Bounds for Transformer Networks with Application to RegressionYuling Jiao, Yanming Lai, Defeng Sun, Yang Wang et al.ICML 2026 · 6 citations

Builds on20

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
  3. Large Language Models are Zero-Shot ReasonersTakeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo et al.NeurIPS 2022 · 8,168 citations
  4. Finetuned Language Models are Zero-Shot LearnersJason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu et al.ICLR 2022 · 4,966 citations
  5. AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated PromptsTaylor Shin, Yasaman Razeghi, Robert L. Logan IV, Eric Wallace et al.EMNLP 2020 · 1,162 citations

Related papers

  1. Universality and Limitations of Prompt TuningYihan Wang, Jatin Chauhan, Wei Wang, Cho-Jui HsiehNeurIPS 2023 · 48 citations
  2. Prompt Tuning Transformers for Data MemorizationHaiyu Wang, Yuanyuan LinNeurIPS 2025 · 4 citations
  3. Fundamental Limits of Prompt Tuning Transformers: Universality, Capacity and EfficiencyJerry Yao-Chieh Hu, Wei-Po Wang, Ammar Gilani, Chenyang Li et al.ICLR 2025
  4. Understanding Prompt Tuning and In-Context Learning via Meta-LearningTim Genewein, Kevin Li, Jordi Grau-Moya, Anian Ruoss et al.NeurIPS 2025 · 10 citations
  5. Are Transformers universal approximators of sequence-to-sequence functions?Chulhee Yun, Srinadh Bhojanapalli, Ankit Singh Rawat, Sashank J. Reddi et al.ICLR 2020 · 481 citations
Dusk over the sea between two cliffs drawn in fine vertical lines