Title: Prompt Tuning Transformers for Data Memorization
Venue: NeurIPS 2025
Accepted: yes
Keywords: Transformers

Data Memorization

Prompt Tuning
Abstract: Prompt tuning has emerged as a powerful parameter-efficient fine-tuning technique, allowing large pretrained Transformers to adapt to downstream tasks by optimizing a small set of prompt embeddings. Despite its empirical success, the extent to which prompt tuning can memorize data remains poorly understood. In this paper, we provide both theoretical and empirical analyses of data memorization ability of prompt-tuned Transformers. Building on recent theoretical frameworks, we derive an upper bound on the required prompt length for exact memorization of finite datasets and establish a trade-off between prompt length and the number of autoregressive generation steps. Specifically, we show that a constant-size Transformer can memorize $n$ input-output pairs with prompts of length $\tilde{O}(\sqrt{nN})$, where $N$ denotes the sequence length. Empirical results further demonstrate that prompt-tuned, randomly initialized Transformers are able to effectively memorize finite datasets. These models also capture the intrinsic low-rank structure of the data, leading to a reduction in the required prompt length. Finally, we analyze how the initialization of the Transformer backbone affects the performance of prompt tuning. Our findings provide new insights into the expressivity, efficiency, and underlying mechanisms of prompt tuning, bridging theoretical memorization limits with observed empirical behaviors.


Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper studies the role that prompts (and prompt tuning) plays in the expressive capacity of transformers. The main paper is fully theoretical with results that outline how to simulate ReLU networks with transformers. They use this framework to show that a constant size transformer can memorize any N sequential data points of length n with prompts whose lengths are $O(sqrt(nN))$ in additional to other theoretical points.\n\nSTRENGTHS AND WEAKNESSES:\n**Quality:**\n\n- I notice that one of the main claims in the abstract is line 11: \"Our findings, supported by experiments,...\", but no where in the main paper are experiments. The experiments are included in the appendix, but I find it challenging to know which experiments are mean to support which theoretical results in the main paper.\n- I notice in the experimental description in Appendix H.1 line 956: \"Our experiments do not follow Proposition 3.1 exactly in several aspects. First, we discard the Autoregressive algorithm 1 because we find it does not improve performance too much.\". Then why include algorithm 1? And why not modify Proposition 3.1 to exactly match your supporting experiments?\n\n**Clarity:**\n\n- I found the organization of this paper a little tricky to follow since it claims to contain both theoretical and experimental results in the abstract, but the experimental results are not logically organized following the respective theoretical result section in the main text but rather sequestered to the appendix.\n- I did not fully understand what the concrete relationship between section 3 and section 4 is. I understand that transformers can simulate ReLU networks. I also understand that prompts can be structured in such a way that the input output pair exhibits a loss of 0 (memorization), but if/why is this specific to simulating ReLU networks?\n\n**Significance:**\n\n- The motivation for this line of work is: better understanding the role that model context (prompts) play for improving the expressive power of transformers. This style of inquiry helps shape the understanding of transformer failure modes and limits.\n\n**Originality:**\n\n- The scope of this paper is out of my main area of expertise, therefore after reviewing the related work, it seems the authors have built on existing frameworks to simulate ReLU networks using transformers but have introduced new theorems and lemmas.\n\nQUESTIONS:\n- In line 373 you write the prompt length is $O(nN)$ but in theorem 4.1 you claim it is $O(sqrt(nN))$. Is this a typo?\n- Please see additional questions in the \"Strengths and Weaknesses\" section under \"Quality\" and \"Clarity\" for additional questions.\n\nLIMITATIONS:\nConcisely compiling the limitations in a single subsection in the conclusion would be helpful for the reader.", "TITLE": "Official Review", "RECOMMENDATION": 3, "REVIEWER_CONFIDENCE": 2, "CLARITY": 1, "IMPACT": 3, "ORIGINALITY": 3, "DATE": "2025-06-03"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper studies the memorization capacity of transformers using prompts. It shows that a constant-size transformer with ReLU attention can memorize $N$ token-wise separable sequences of length $n$, using prompts of length $\\tilde{O}(\\sqrt{nN})$.\n\nSTRENGTHS AND WEAKNESSES:\nStrengths:\n- The paper provides a theoretical analysis of the memorization capabilities of transformers with prompt tuning.  It shows that a constant-size transformer with ReLU attention can memorize any amount of data, as long as the prompt length grows in the order of $\\tilde O(\\sqrt {nN})$. The observation that the required prompt length can potentially be reduced in the presence of low-rank structure is also interesting.\n\nWeaknesses:\n\n- The proof technique primarily builds on two existing results: (1) the simulation of ReLU neural networks via prompt-tuning transformers [Nakada et al., 2025], and (2) the use of $\\tilde{O}(\\sqrt{nN})$-size deep ReLU networks to memorize $N$ labels [Kajitsuka and Sato, 2024]. As a result, the technical originality appears somewhat limited. It would be helpful if the authors could more clearly explain the core novelty of their contribution.\n- Using prompt tuning as a means to memorize arbitrary data seems somewhat unnatural. It would strengthen the paper to include a discussion of real-world scenarios where such a setup is relevant, to better motivate the problem.\n- The results are derived specifically for transformers with ReLU attention, rather than the more commonly used softmax attention. This limits the applicability of the findings to standard transformer architectures.\n\nQUESTIONS:\nQuestion:\n\n- Regarding the statement *\"if the target ReLU neural network presents the low-rank structure, the required prompt length is sharply reduced\"*:\n  - Is this an empirical observation without a formal proof?\n  - Since the ReLU network is constructed from the data, what does the assumption of a \"low-rank structure\" imply about the underlying data to be memorized?\n- It would be helpful to include a brief proof sketch in the main text to aid understanding.\n\n- minor comments:\n  - The term *Autoregressive Generalization* is somewhat unclear to me, as it is not obvious what is being generalized in this context.\n  - In the abstract, it is claimed that *“a constant-size Transformer with prompts ... can memorize any $N$ input sequences of length $n$.”* However, as stated in the main text, this requires Assumption 4.1 (token-wise separability). I suggest clarifying this condition in the abstract to avoid overstatement.\n\nPlease also refer to the weaknesses. I am happy to revise my score based on the authors’ rebuttal and the discussion with other reviewers.\n\nLIMITATIONS:\nyes", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 4, "CLARITY": 3, "IMPACT": 3, "ORIGINALITY": 2, "DATE": "2025-06-29"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper investigates how much data a constant-size Transformer can memorize when it is adapted only through prompt tuning. Building on and generalizing earlier work, the authors prove that prompts of length $\\tilde{O}(\\sqrt{nN})$ are sufficient for a Transformer to memorize $N$ sequences of length $n$, even when the simulated ReLU network has only constant width. They also provide a theoretical trade-off between prompt length and the number of autoregressive steps required, and they offer appendix-level experiments suggesting that low-rank structure in the target network can further shorten prompts.\n\nSTRENGTHS AND WEAKNESSES:\n**Strengths**\n\n1. The paper improves on prior work by providing the first explicit upper bound on prompt length for sequence-to-sequence memorization and by establishing a clear trade-off between prompt length and efficiency. These contributions extend Nakada et al. (2025) to constant-width networks and move beyond earlier works that offered only exponential lower bounds or relied on wide feed-forward layers.\n\n2. Rigorous and well-documented analysis.\nFormal definitions, lemmas, and proofs are presented with care, and the architecture of the prompt construction is spelled out in detail. A thorough Related-Work section situates the contribution within both theoretical and empirical literature, helping readers see exactly how this work fits into the evolving prompt-tuning landscape.\n\n3. By showing when large embedding dimensions are unavoidable and how low-rank structure can shrink prompt length, the paper offers concrete guidance for designing prompt-tuning strategies. The results also strengthen the argument that fixed, pretrained Transformers can solve new tasks through prompts alone, a point of practical relevance for resource-constrained adaptation.\n\n**Weaknesses**\n\n1. All substantive experiments are relegated to the appendix; the body contains no figures, tables, or quantitative results. This omission makes it hard for readers to gauge how well the theory matches practice and does not meet common expectations for reproducibility.\n\n2. Theoretical guarantees hinge on strong assumptions such as token-wise separateness and consistent labeling, yet the manuscript offers no empirical check on how often these assumptions hold or how performance degrades when they do not. Consequently, the practical impact of the results remains unclear.\n\n3. Dense notation, many nested definitions, and the absence of illustrative diagrams or worked examples make the paper hard to follow for non-experts. Moreover, the intricate prompt design is not accompanied by a step-by-step example, which would help readers replicate the construction.\n\nQUESTIONS:\n1. A compact table showing memorization accuracy versus prompt length—and a simple plot of the length–efficiency trade-off—would greatly strengthen the empirical link to your theory.\n\n2. Could you discuss concrete datasets or tasks where token-wise separateness and consistent labeling approximately hold, and comment on what happens when they fail?\n\n3. A small table contrasting your new upper bounds with those of Kajitsuka & Sato (2024), Hu et al. (2024), and Nakada et al. (2025) would help readers quantify the improvement across different regimes.\n\n4. Why does accuracy peak at prompt length 50 but drop at 60 as observed in Table 8? Please clarify why a longer prompt does not monotonically improve accuracy. A short analysis or ablation would make the empirical trend more convincing.\n\n5. On lines 208–209 the displayed equation should end with a comma, and the following where should start with a lowercase “w” because it continues the same sentence.\n\nLIMITATIONS:\nYes.", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 2, "CLARITY": 2, "IMPACT": 2, "ORIGINALITY": 2, "DATE": "2025-07-03"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis theory paper studies the data memorization capabilities of the prompt tuning technique on Transformers. It builds on prior work which, under some conditions, emulates ReLU nets using transformers to finite precision. The authors extend on this work by providing novel theoretical results to narrower ReLU nets, an upper bound on the prompt length for which a constant-size transformer can memorize data, and empirical evidence that the theoretical results work in practice. They further elucidate that this prompt length can be shortened if the ReLU weights are low rank.\n\nSTRENGTHS AND WEAKNESSES:\nStrengths:\n- the paper marks a notable and novel advancement over prior work\n- there is experimentation provided to support the theoretical results\n- the authors propose an upper bound which, to my knowledge, has not been proposed before in this line of work\n- the authors investigate additional cases of low-rank ReLU nets which has not been studied before in this line of work\n\nWeaknesses:\n- This introduction of this paper is written as if the reader is already familiar with prior work. This can be quite confusing and additional context should be given to motivate the work. Furthermore, a significant portion of contributions are in the appendix which should have otherwise been in the main body.\n- It is unclear what, if any, practical takeaway there is here for those who are still using prompt tuning today.\n- this paper makes assumptions (such as in 4.1). The extent to which these assumptions further deviate the practicality of this work is unclear and should be discussed.\n\nWhile I am not an expert here, this paper reads rigorous and clearly marks an advance over prior theory, hence my tepid accept. I would strongly recommend that the authors make a case for why this work is relevant and practical outside of theory.\n\nQUESTIONS:\n- What practical insights can we take away from the theoretical findings here that would be useful to the average prompt tuning user?\n- Can the authors elaborate more on the practical implications of the assumptions?\n\nLIMITATIONS:\nyes", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 2, "CLARITY": 2, "IMPACT": 4, "ORIGINALITY": 4, "DATE": "2025-07-03"}