- Rating
- 4
- Clarity
- 3
- Confidence
- 4
- Originality
- 4
- Quality
- 3
- Significance
- 3
Read review
Summary
The paper studies when fine-tuning enables a transformer to extract factual knowledge learned during pre-training. In a simplified one-layer transformer, the authors show that fine-tuning can generalize to unseen Q&A facts when the fine-tuning data covers enough relation-template directions learned during pre-training. The theory predicts better extraction with more pre-training multiplicity and fine-tuning data, but worse extraction as the relation-template universe grows. The paper also extends the analysis to low-rank fine-tuning and supports the predictions with synthetic and PopQA-based experiments using GPT-2 and Llama-3.2.
Strengths and weaknesses
Strengths. The paper is well motivated, and the main story is clear. Sufficient coverage of relation templates across pre-training and fine-tuning can allow the model to learn a unified representation of the relation, which in turn enables generalization to facts not revisited during fine-tuning. I also find the joint analysis of pre-training and fine-tuning dynamics to be a novel and interesting contribution. It provides a meaningful extension of prior theoretical studies on transformers, which often focus on only one training phase or one architectural component.
Weaknesses. The paper’s setup is somewhat complicated, and the presentation would benefit from a clearer visual illustration of the data-generation process and the pre-training/fine-tuning pipeline.
My main concern is with the relation-covering claim. As I understand the setup, the task is essentially single-topic factual recall, where different “relations” correspond to different phrasings of the same relation, such as “was born in,” “comes from,” and “is a native of.” In this setting, there appears to be a clear shortcut: the model could solve the task by simply memorizing the subject-to-answer mapping in the MLP layer. Although the authors mention that their next-token prediction construction is designed to avoid direct memorization, I did not find a theoretical or empirical argument showing that the model is not using this shortcut. For example, the claim that knowledge extraction becomes easier when more relation templates are seen during pre-training could alternatively be explained by the fact that larger simply provides more training examples for learning .
A useful diagnostic would be to evaluate whether the model can predict from after pre-training, or to consider a genuinely multi-relation setup where the same subject has different answers under different relations, e.g., , , and . In such a setting, the subject alone would be insufficient, making it easier to distinguish relation-based extraction from subject-answer memorization.
A related issue concerns Table 1, where the authors argue that extraction improves when relevant facts are better represented during pre-training. However, this comparison appears to conflate relation diversity with the number of training examples: frequent facts are seen with multiple relation templates, while rare facts are seen only once. A fairer comparison would control for the number of pre-training examples, for instance by comparing diverse relation templates against repetitions of the same relation template for rare facts. This experiment would help clarify whether the improvement comes from relation coverage rather than simply from seeing more examples.
Questions
-
Could the authors provide more evidence that the model is not simply memorizing the mapping ? For example, after pre-training, can the model predict from without the relation token? It would also be helpful to test a multi-relation setting where the same subject has different answers for different relations, such as and .
-
Could the authors separate the effect of relation diversity from the number of training examples? In the current setup, frequent facts have both more relation templates and more pre-training examples. A useful control would compare different relation templates with repetitions of the same relation template.
-
Could the authors also discuss related theoretical work on out-of-context reasoning in transformers, such as [1]? This work also studies the training dynamics of transformers on a factual recall task.
[1] Huang et al. Generalization or hallucination? Understanding out-of-context reasoning in transformers. Advances in Neural Information Processing Systems, 38:139807–139855, 2026.
Limitations
Yes
Paper formatting concerns
N/A
Final justification
My concerns have been resolved by the authors' new experiments.
Thank you for the valuable comments. We address each point below and will revise the manuscript accordingly.
Comment 1: Value projection in Equation (2) and Fixed second MLP layer
Response. Thank you for raising these questions. The assumptions WV=I and fixed block-diagonal W2 serve the same analytical purpose: They make the training-dynamics analysis tractable while preserving the knowledge-extraction behavior observed in standard Transformers.
Consistent qualitative trend. We train a standard one-layer Transformer end to end, with a learned value projection and a learned dense MLP second-layer projection. We fix K=3, N=100, and vary the relation-template universe size ∣R∣. The results are shown below.
Despite finite-sample fluctuations, the standard one-layer Transformer exhibits the same overall qualitative dependence predicted by the theory: held-out extraction becomes more difficult as ∣R∣ increases. Meanwhile, the pre-training loss remains in a similar range across the settings, suggesting that the decline in extraction accuracy is not simply caused by failure to fit the pre-training data.
These results indicate that the observed relation-coverage trend persists after replacing both the identity value map and the fixed block-diagonal second MLP layer with learned dense projections.
Analytical tractability. Specifically, if W2 is learned, the MLP becomes the nonlinear two-factor model $\mathbf{W}_2 \sigma\left(\mathbf{W}_1\mathbf{x}_a\right).$
If WV is learned, even with fixed W2, the model contains the coupled parameterization $\mathbf{W}_2 \sigma\left( \mathbf{W}_1 \left( \mathbf{W}_V\mathbf{X}\boldsymbol{\alpha} + \mathbf{X}[-1] \right) \right),$ where the dynamics of W1 and WV interact through the ReLU gates. Relaxing either assumption therefore introduces a nonlinear two-factor subproblem, while relaxing both introduces an even more strongly coupled system.
Even substantially simpler two-factor matrix-factorization models generally require specialized objectives, initialization conditions, and structural assumptions for trajectory-level analyses. Fully characterizing the polynomial-horizon gradient-descent dynamics in our setting, which additionally contains attention, residual connections, ReLU activation, and cross-entropy loss, is beyond the scope of the current proof. We will make this analytical motivation and limitation explicit.
We will add this experiment and clarify that the architectural restrictions are required for the current proof, rather than for the empirical phenomenon itself.
Comment 2: Residual connection
Response. Thank you for pointing this out. The term X[−1] models the standard residual connection around the self-attention module and keeps our simplified architecture closer to a standard Transformer.
This residual term is not essential to the qualitative mechanism. Without it, the final token still reaches the MLP through attention with a weight bounded away from zero, as suggested by our balanced-attention results. We will clarify its role and impact on the analysis in the revised manuscript.
Comment 3: Positional encoding
Response. Thanks for the comment. Although we omit positional encodings, the model remains autoregressive because training uses a causal mask, and each prediction is computed only from the current and preceding tokens. We deliberately omit positional encodings to isolate the content-based mechanism. Because the synthetic sequences use a fixed format, absolute positional features could provide a shortcut for identifying token roles.. This setting therefore tests whether generalization follows from learned subject and relation features rather than absolute position.
Comment 4: The mutual orthogonality assumption
Response. We thank the reviewer for raising this point. In our theoretical model, the token embeddings are fixed, non-trainable vectors chosen to satisfy the stated orthogonality condition. Training updates only the attention parameter Z and the MLP parameter W, so the embedding geometry remains unchanged throughout optimization. Thus, orthogonality is part of the theoretical problem setup and is not enforced dynamically during training. Orthogonality is a widely adopted analytical idealization that separates the roles of the context, subject, relation, and answer features and removes cross-feature terms from the training-dynamics analysis.
Our experiments relax this condition: the additional synthetic experiment uses independently sampled Gaussian embeddings, while the GPT-2 and Llama experiments use standard learned representations and exhibit the same qualitative trends. The current theorem relies on exact orthogonality, and extending it to approximately orthogonal or incoherent embeddings is a natural future direction. We will clarify these points in the revised paper.
Comment 5: Instruction and safety fine-tuning
Response. We thank the reviewer for these suggestions. Our Q&A fine-tuning setting may be viewed as a stylized abstraction of one limited aspect of instruction fine-tuning, with the shared token p representing a downstream instruction or response format. We do not intend the current model to capture instruction tuning in its full generality. Our analysis only studies how a single new format interacts with factual features acquired during pre-training. We will clarify this limited connection and discuss the additional ingredients needed to extend the framework to heterogeneous instructions and multi-task settings.
The relation-covering perspective suggests a natural hypothesis for safety fine-tuning: suppressing an undesirable pre-trained behavior may require the safety data to cover the prompt or feature directions through which that behavior is expressed. Insufficient coverage may leave the behavior accessible under unseen formulations. A formal treatment would require modeling refusal targets, competing safe and harmful outputs, and capability trade-offs, which are outside the current factual-extraction setting. We will add this connection as a clearly scoped direction for future work.