- Rating
- 2
- Confidence
- 2
- Informativeness
- 2
- Presentation
- 2
- Soundness
- 2
Read review
Paper summary
The paper proposes Attention Patching, which basically learns affine corrections to the attention output projections using paired prompts with and without demonstrations. These corrections depend on the current token representations. The corrections are then merged into the model weights, so the model does not need demonstration tokens during inference. The authors test the method on 12 classification benchmarks across different model families and also evaluate it on autoregressive generation. The ablation studies examine different calibration sizes and show that the weight correction is more important than the fixed bias.
Critical strengths
- I think the merge operation in section 3.2 is a practical strength. The learned correction becomes part of an existing projection. This gives a clear explanation for the low online overhead without adding a separate intervention module.
- Table 3 shows the weight correction recovering nearly all the full patch’s average accuracy. The bias correction alone performs worse. I find this comparison useful because it isolates the contribution of input dependent transformations.
- I appreciate that Table 2 extends the evaluation to autoregressive generation. On GSM8K, the patch improves over inference without demonstrations and generally outperforms ICV. This provides evidence that the method remains useful beyond classification with a fixed label set.
Critical weaknesses
- The fitting order in section 3.2 is unclear for me. The description does not specify whether later layers receive activations from previously patched layers. I think pseudocode and a comparison of fitting orders would clarify how calibration produces the deployed model.
- Table 2 evaluates translation only through ROUGE L. Textual overlap does not fully establish whether the meaning is preserved. I think adding a translation quality measure alongside concrete error examples would make the generation claim more convincing.
- I noticed that Figure 2 reports online costs without comparing against reuse of a cached demonstration prefix. Calibration cost is also omitted. I think including cached explicit ICL and preparation costs over repeated queries would clarify the practical efficiency benefit.
Questions for authors
- Could you clarify the calibration procedure in section 3.2? Are later layer activations recomputed after earlier patches are installed, and are their regression targets updated too? I think more clear explanations or pseudocode showing these dependencies would make the method easier to reproduce.
- Could you examine translation examples where the patch and explicit context produce different outputs in Table 2? Comparing whether each output preserves the source meaning would help identify information lost by the patch. I think this would complement the overlap metric.
- When does patching become faster overall than explicit ICL with a cached demonstration prefix? Could you include calibration time in the comparison associated with Figure 2?
5 comments
Thank you for your reply. Most of my concerns have been addressed. I have two remaining questions. How much does sequential fitting contribute to the reported gains compared with fitting each layer independently? I also share the concern about the labeled data budget. How does Attention Patching compare with explicit ICL when both methods have access to the same total number of labeled examples, including those used for calibration?
Thank you for these questions.
1. Sequential vs. Parallel Fitting
We compared AP's sequential fitting procedure with a parallel fitting variant in terms of average classification accuracy. For Llama, there was no difference between the two fitting procedures, while Qwen showed a minor difference. Sequential fitting was slightly more stable, but the performance difference was negligible.
| Method | Llama-3.2-3B-Instruct | Qwen3.5-0.8B |
|---|---|---|
| AP (Sequential) | 80.7 | 70.4 |
| AP (Parallel) | 80.7 | 70.1 |
2. Matched Labeled-Data Budget ICL
We conducted additional explicit ICL experiments on Llama-3.2-3B-Instruct, matching the total number of labeled samples used by AP. We evaluated 10-shot per class (matching AP with 5 calibration samples per class in Appendix D.1, Figure 8) and 30-shot per class (matching AP with 25 calibration samples per class in the main paper). We report average classification accuracy.
| Method | Avg. Accuracy (%) |
|---|---|
| AP (5) | 79.7 |
| ICL (10-shot) | 80.2 |
| AP (25) | 80.7 |
| ICL (30-shot) | 81.2 |
The results show that the performance differences between AP and explicit ICL under matched labeled-data budgets are comparable.
We thank the reviewer for the constructive feedback and for recognizing the practical benefits of weight merging and the value of our ablation studies.
[W1/Q1. Calibration Procedure.]
Thank you for the feedback. AP adopts a sequential fitting procedure. Each fitted patch remains active when fitting subsequent layers. Thus, later layers receive activations that reflect the effects of previously patched layers. We added pseudocode in Appendix A.3 to clarify the layer-wise calibration process and improve reproducibility.
[W2/Q2. Quantitative and Qualitative Evaluation of Translation.]
We added COMET, a neural metric for translation quality, to Table 2 to complement lexical overlap. AP also generally outperforms the baselines on these additional metrics.
We further provide translation examples from the Korean and Spanish subsets of FLORES using Llama-3.2-3B-Instruct, selected based on ROUGE-L F1 scores to illustrate cases where AP outperforms or underperforms many-shot ICL.
Cases where many-shot ICL outperforms AP
Cases where AP outperforms many-shot ICL
[W3/Q3. Efficiency Comparison with Cached Explicit ICL.]
We updated Figure 2 (Section 5.1) to include explicit ICL with reusable prefix KV caches. AP maintains near-zero-shot TTFT across context lengths, whereas cached explicit ICL exhibits increasing TTFT, reaching approximately 5× the zero-shot latency at 16K.
We further conducted a break-even analysis accounting for AP's offline calibration cost (activation collection and ridge regression) and cached ICL's prefix preparation cost.
When activation collection is excluded, the ridge regression step alone incurs negligible cost, making AP advantageous from the first query across all evaluated context budgets. When accounting for the full offline calibration cost, AP becomes faster overall after approximately 25 queries at 8K and 9 queries at 16K.
These results highlight both AP's low parameter-fitting overhead and its amortized efficiency benefits for repeated inference with long demonstration contexts.