When Can Prefixes Compile LoRA? Exact Resource-Capped Tests for Frozen Attention
Organizations: Department of Computer and Information Sciences, University of Delaware, USA · Department of Computer Science, Iowa State University, USA
Abstract
Can a fixed continuous prefix replace a given low-rank adapter while the attention head stays frozen? In this research, we show that the answer depends on the adapter's target through three conditions. First, observability: at one causal readout, every independent key--value prefix sees the content only through the query, attention partition, and value numerator, so a target that differs on two inputs with equal summaries incurs an error floor at every prefix length; norm caps extend this floor to nearly equal summaries. Second, realizability: at a common query, any prefix reduces exactly to two aggregate variables, and the norm-capped optimum is an attained second-order-cone program, also after a fixed output projection; it places two equal-norm rank-one value updates on opposite sides of compilability. Third, implementation: under affine query exposure, signed slots approximate a rank- value update, but their values grow as , and the construction passes all 400 tolerance checks in float64 yet only 38 in bfloat16. A first-layer GPT-2 readout with fixed token and position meets the common-query condition without clamping activations; at three such heads, the capped optimum leaves 18.4% to 74.2% of the projected adapter effect uncompiled, with a head-dependent value--query ordering. All claims concern local approximation at one head, not whole-network equivalence.
Figures & tables
| Tolerance | Float64 error | Float32 error | Bfloat16 error | Value norm |
|---|---|---|---|---|
| Query perturbation | Proved lower bound | Best attained error | Mean attained error |
|---|---|---|---|
| 0 | |||
| 0.001 | |||
| 0.01 | |||
| 0.1 |
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Symbol | Meaning |
|---|---|
| Attention interface | |
| input, key, value, and output dimensions | |
| frozen query, key, value, and output-projection weights | |
| content states up to the readout position | |
| readout query, content keys and values, scaled logits | |
| partition function, value numerator, frozen head output | |
| Rank | Float64 | Float32 | Bfloat16 |
|---|---|---|---|
| 1 | |||
| 2 | |||
| 4 | |||
| 8 |
| Slots | Contracting target | Amplifying target |
|---|---|---|
| 1 | ||
| 4 | ||
| 16 | ||
| 64 |
| Head | Fit | Evaluation | |||||
|---|---|---|---|---|---|---|---|
| 0 | 64 | 768 | 128 | 128 | 4 | 8.40 | 6.10 |
| 4 | 64 | 768 | 128 | 128 | 4 | 10.20 | 7.30 |
| 8 | 64 | 768 | 128 | 128 | 4 | 9.10 | 6.70 |
| Head | Target | Learned best | |||||
|---|---|---|---|---|---|---|---|
| 0 | Value | 1 | 0.0826 | 0.015198 | 0.015198 | 0.017263 | 0.184 |
| 0 | Value | 4 | 0.1462 | 0.059503 | 0.059503 | 0.063889 | 0.407 |
| 0 | Query | 1 | 0.0918 | 0.057925 | 0.057926 | 0.061139 | 0.631 |
| 0 | Query | 4 | 0.1584 | 0.085852 | 0.085853 | 0.092189 | 0.542 |
| 4 | Value | 1 | 0.0735 | 0.050200 | 0.050201 | 0.052038 | 0.683 |
| 4 | Value | 4 | 0.1327 | 0.098463 | 0.098463 | 0.102444 | 0.742 |
| Head | Target | Conic upper | Learned best | Learned median | Relative gap | |
|---|---|---|---|---|---|---|
| 0 | Value | 1 | 0.015198 | 0.017263 | 0.020485 | 0.025 |
| 0 | Value | 4 | 0.059503 | 0.063889 | 0.069737 | 0.030 |
| 0 | Query | 1 | 0.057926 | 0.061139 | 0.064903 | 0.035 |
| 0 | Query | 4 | 0.085853 | 0.092189 | 0.095990 | 0.040 |
| 4 | Value | 1 | 0.050201 | 0.052038 | 0.055346 | 0.025 |
| 4 | Value | 4 | 0.098463 | 0.102444 | 0.108549 | 0.030 |
| Head | Target | Evaluation oracle | Conic transfer | Learned transfer | |
|---|---|---|---|---|---|
| 0 | Value | 1 | 0.209 | 0.274 | 0.321 |
| 0 | Value | 4 | 0.435 | 0.501 | 0.550 |
| 0 | Query | 1 | 0.662 | 0.729 | 0.780 |
| 0 | Query | 4 | 0.567 | 0.632 | 0.679 |
| 4 | Value | 1 | 0.711 | 0.777 | 0.826 |
| 4 | Value | 4 | 0.773 | 0.840 | 0.891 |
| Head | Target | Scale | Exact-count | Learned | At most | |||
|---|---|---|---|---|---|---|---|---|
| 0 | Value | 0.5 | 1 | 4.20 | 3.05 | 0.624 | 0.653 | 0.624 |
| 0 | Value | 0.5 | 4 | 4.20 | 3.05 | 0.624 | 0.658 | 0.624 |
| 0 | Value | 0.5 | 16 | 4.20 | 3.05 | 0.670 | 0.728 | 0.624 |
| 0 | Value | 1.0 | 1 | 8.40 | 6.10 | 0.407 | 0.436 | 0.407 |
| 0 | Value | 1.0 | 4 | 8.40 | 6.10 | 0.407 | 0.441 | 0.407 |
| 0 | Value | 1.0 | 16 | 8.40 | 6.10 | 0.407 | 0.465 | 0.407 |