PRISM-: Differential Subspace Steering for Prompt Highlighting in Large Language Models
Organizations: ♣Institute of Computing Technology, Chinese Academy of Sciences · △University of California, Merced
Abstract
Prompt highlighting steers a large language model to prioritize user-specified text spans during generation. A key challenge of existing Key-editing approaches is extracting steering directions that capture the difference between relevant and irrelevant contexts, rather than shared structural patterns common to both. We propose PRISM- (Projection-based Relevance-Informed Steering Method), which decomposes the difference between positive and negative cross-covariance matrices to maximize discriminative energy while eliminating shared directions. Each attention head receives a continuous softplus importance weight, letting weak-but-useful heads contribute at reduced strength. The framework extends naturally to Value representations, capturing content-channel signal that Key-only methods leave unused. Across four benchmarks and five models, our methods match or exceed the best existing method on 19 of 20 configurations, with relative gains up to +13.0%, while halving the fluency cost of steering. Our methods also scale to long-context retrieval, outperforming the best existing method by up to +5.1% relative gain. PRISM- is compatible with FlashAttention and adds negligible memory overhead.
Figures & tables
| Method | Steering target | Projection | Head selection | FlashAttn |
|---|---|---|---|---|
| Prefix-Tuning | Key + Value (prefix) | Gradient | None | ✓ |
| PASTA | Attn. matrix | None | Profiling | ✗ |
| SPA | Logit distribution | None | None | ✓ |
| Spotlight | Attn. logits (bias) | Analytic | None | ✗ |
| REAL | Head activation | Codebook | Scoring top- | ✓ |
| SEKA | Key | Indep. SVD | Hard threshold | ✓ |
| Model | Metric | Baselines | Ours | |||||
|---|---|---|---|---|---|---|---|---|
| Vanilla | **-marked | PASTA | SPA | SEKA | Prism- | Prism- V | ||
| BiasBios | ||||||||
| Qwen3-4B | Accuracy | 79.80 | 82.94 ▲3.14 | 89.58 ▲9.78 | 68.00 ▼11.80 | 90.92 ▲11.12 | 92.38 ▲12.58 | 92.36 ▲12.56 |
| Qwen3-8B | 76.22 | 80.60 ▲4.38 | 86.32 ▲10.10 | 37.02 ▼39.20 | 88.74 ▲12.52 | 89.62 ▲13.40 | 89.12 ▲12.90 | |
| Qwen3-14B | 85.10 | 90.94 ▲5.84 | 88.46 ▲3.36 | 57.86 ▼27.24 | 90.28 ▲5.18 | 91.68 ▲6.58 | 91.20 ▲6.10 | |
| Gemma3-4B | 89.90 | 91.00 ▲1.10 | 82.58 ▼7.32 | 48.02 ▼41.88 | 92.42 ▲2.52 | 92.90 ▲3.00 | 91.64 ▲1.74 | |
| Configuration | Projection | Weighting | Channels | Qwen3-4B | Qwen3-8B | ||
|---|---|---|---|---|---|---|---|
| Acc | Acc | ||||||
| Prism- V | Diff. | Softplus | K+V | 92.36 | +15.7 | 89.12 | +16.9 |
| Prism- ( V) | Diff. | Softplus | K only | 92.38 | +15.8 | 89.62 | +17.6 |
| Prism- -V ( K) | Diff. | Softplus | V only | 82.44 | +3.3 | 79.16 | +3.9 |
| Differential | Independent | Softplus | K only | 91.52 | +14.7 | 88.90 | +16.6 |
| Softplus | Differential | Uniform | K only | 91.42 | +14.6 | 88.22 | +15.7 |
| Model | Vanilla | SEKA | Prism- | Prism- V |
|---|---|---|---|---|
| Qwen3-4B | 45.47 | 49.14 ▲3.67 | 51.43 ▲5.96 | 50.57 ▲5.10 |
| Qwen3-8B | 46.69 | 50.29 ▲3.60 | 52.71 ▲6.02 | 51.86 ▲5.17 |
| Qwen3-14B | 57.13 | 60.86 ▲3.73 | 62.57 ▲5.44 | 62.00 ▲4.87 |
| Gemma3-4B | 44.36 | 47.71 ▲3.35 | 49.29 ▲4.93 | 50.14 ▲5.78 |
| Gemma3-12B | 51.64 | 55.57 ▲3.93 | 54.43 ▲2.79 | 55.57 ▲3.93 |
| Method | Avg. Latency (s) | Relative | Peak Mem (GB) | FlashAttn |
|---|---|---|---|---|
| Vanilla | 1.180 | 1.0 | 26.39 | ✓ |
| SEKA | 1.194 (+0.01) | 1.0 | 26.43 (+0.04) | ✓ |
| Prism- | 1.481 (+0.30) | 1.26 | 26.41 (+0.02) | ✓ |
| Prism- V | 1.502 (+0.32) | 1.27 | 26.43 (+0.04) | ✓ |
| Configuration | Top-1 Acc (%) | Fluency ( ) | Consistency ( ) | Fluency Cost ( ) |
|---|---|---|---|---|
| Vanilla | 79.80 | 4.638 | 0.116 | 0.000 |
| SEKA | 90.92 ▲11.12 | 3.681 | 0.112 | 0.957 |
| Prism- | 92.38 ▲12.58 | 4.134 | 0.127 | 0.504 |
| Prism- -V | 82.44 ▲2.64 | 4.666 | 0.121 | 0.028 |
| Prism- V ( ) | 92.36 ▲12.56 | 4.116 | 0.125 | 0.522 |
Appendix figures & tables19 assets
Supplementary material from the paper’s appendix.
Appendix
| Symbol | Definition | Description |
| Model architecture | ||
| Number of layers | Total Transformer layers in the model | |
| Number of heads | KV heads per layer | |
| Head dimension | Dimensionality of each head’s Key/Value space | |
| Layer-head index | Identifies a specific attention head | |
| Token embedding | Input representation of token | |
| Benchmark | Model | SEKA | Prism- | Prism- V | AdaSEKA | ||
|---|---|---|---|---|---|---|---|
| BiasBios | Qwen3-4B | 90.92 | 92.38 | 92.36 | 91.86 | +0.52 | |
| Qwen3-8B | 88.74 | 89.62 | 89.12 | 88.50 | +1.12 | ||
| Qwen3-14B | 90.28 | 91.68 | 91.20 | 91.22 | +0.46 | ||
| Gemma3-4B | 92.42 | 92.90 | 91.64 | 92.92 | 0.02 | ||
| Gemma3-12B | 93.04 | 92.22 | 91.94 | 91.14 | +1.90 | ||
| CounterFact | Qwen3-4B | 99.02 | 99.14 | 98.08 | 98.90 | +0.24 |
| Model | Benchmark | |||
|---|---|---|---|---|
| Qwen3-4B | BiasBios | 0.998 | 0.08 | 0.40 |
| Qwen3-8B | 0.998 | 0.08 | 0.40 | |
| Qwen3-14B | 0.998 | 0.08 | 0.40 | |
| Gemma3-4B | 0.850 | 0.08 | 0.50 | |
| Gemma3-12B | 0.980 | 0.00 | 0.40 | |
| Qwen3-4B | CounterFact | 0.998 | 0.13 | 1.90 |
| Model | Benchmark | ||||
|---|---|---|---|---|---|
| Qwen3-4B | BiasBios | 0.998 | 0.08 | 0.40 | 0.10 |
| Qwen3-8B | 0.998 | 0.08 | 0.40 | 0.10 | |
| Qwen3-14B | 0.998 | 0.08 | 0.40 | 0.10 | |
| Gemma3-4B | 0.800 | 0.12 | 0.30 | 0.10 | |
| Gemma3-12B | 0.994 | 0.00 | 0.40 | 0.10 | |
| Qwen3-4B | CounterFact | 0.998 | 0.13 | 1.90 | 0.02 |
| Model | Benchmark | Metric | Vanilla | SEKA | Prism- | Prism- V |
|---|---|---|---|---|---|---|
| Qwen3-4B-Instruct | BiasBios | Accuracy | 82.14 | 91.56 | 93.10 | 92.84 |
| Qwen3-4B-Instruct | CounterFact | Efficacy | 58.42 | 99.18 | 99.32 | 99.16 |
| Qwen3-4B-Instruct | Pronoun Change | P. Score | 96.52 | 97.24 | 97.86 | 97.94 |
| Qwen3-8B | BiasBios | Accuracy | 83.46 | 91.28 | 92.54 | 92.58 |
| Qwen3-8B | CounterFact | Efficacy | 54.76 | 99.22 | 99.38 | 99.12 |
| Qwen3-8B | Pronoun Change | P. Score | 98.86 | 99.12 | 99.54 | 99.62 |
| Benchmark | Selector | Recall | Vanilla | Prism- | Gain |
|---|---|---|---|---|---|
| BiasBios | BM25 | 0.58 | 79.80 | 86.42 | +6.62 |
| Contriever | 0.68 | 79.80 | 89.14 | +9.34 | |
| BGE-M3 | 0.76 | 79.80 | 90.86 | +11.06 | |
| Oracle span | 1.00 | 79.80 | 92.38 | +12.58 | |
| Lost-in-the-Middle | BM25 | 0.48 | 45.47 | 47.86 | +2.39 |
| Contriever | 0.62 | 45.47 | 49.42 | +3.95 |
| BiasBios / Qwen3-4B | Pronoun Change / Gemma3-4B | |||
|---|---|---|---|---|
| Method | Factuality | Coherence | Factuality | Coherence |
| Vanilla | 3.12 | 4.28 | 2.45 | 4.15 |
| SEKA | 3.68 | 3.15 | 3.82 | 3.22 |
| Prism- | 3.82 | 3.78 | 4.25 | 3.68 |
| Prism- V | 3.81 | 4.05 | 4.32 | 3.85 |
| Model | Task | Metric | Vanilla | SEKA | Prism- | Prism- -V | Prism- V |
|---|---|---|---|---|---|---|---|
| Qwen3-4B | BiasBios | Accuracy | 79.800 | 90.920 | 92.380 | 82.440 | 92.360 |
| Fluency | 4.638 | 3.681 | 4.134 | 4.666 | 4.116 | ||
| Fluency cost | 0.000 | 0.957 | 0.504 | 0.028 | 0.522 | ||
| Gemma3-4B | BiasBios | Accuracy | 89.900 | 92.420 | 92.900 | 90.120 | 91.640 |
| Fluency | 4.850 | 3.920 | 4.410 | 4.902 | 4.398 | ||
| Fluency cost | 0.000 | 0.930 | 0.440 | 0.052 | 0.452 |
| Model | Target | Vanilla | Task-specific | Transfer | Degradation |
|---|---|---|---|---|---|
| Qwen3-4B | CounterFact | 45.00 | 99.14 | 94.86 | 4.28 |
| BiasBios | 79.80 | 92.38 | 87.42 | 4.96 | |
| Gemma3-4B | CounterFact | 55.04 | 98.10 | 91.24 | 6.86 |
| BiasBios | 89.90 | 92.90 | 91.08 | 1.82 |
| Model | BiasBios CounterFact | CounterFact BiasBios | Average |
|---|---|---|---|
| Qwen3-4B | 0.64 | 0.60 | 0.62 |
| Gemma3-4B | 0.64 | 0.78 | 0.71 |
| Noise ratio | Accuracy | |
|---|---|---|
| 0% | 92.38 | 0.00 |
| 5% | 91.95 | 0.43 |
| 10% | 91.42 | 0.96 |
| 15% | 90.68 | 1.70 |
| 20% | 89.75 | 2.63 |
| Model | Layers | Heads | K mean | V mean | K/V ratio |
|---|---|---|---|---|---|
| Qwen3-4B | 36 | 8 | 0.137 | 0.135 | 1.02 |
| Qwen3-8B | 36 | 8 | 0.129 | 0.174 | 0.74 |
| Qwen3-14B | 40 | 8 | 0.138 | 0.237 | 0.58 |
| Gemma3-4B | 34 | 4 | 0.451 | 0.338 | 1.33 |
| Gemma3-12B | 48 | 8 | 0.509 | 0.420 | 1.21 |
| Seed | Qwen3-4B | Qwen3-8B |
|---|---|---|
| 1 | 92.22 | 89.08 |
| 2 | 92.12 | 89.34 |
| 3 | 92.08 | 88.98 |
| 4 | 92.14 | 89.30 |
| 5 | 92.12 | 89.34 |
| Mean Std | 92.14 0.05 | 89.21 0.15 |
| Configuration | Projection | Weighting | Efficacy (%) |
|---|---|---|---|
| Prism- | Differential | Softplus | 99.14 |
| Indep. + softplus | Independent | Softplus | 98.84 |
| Diff. + uniform | Differential | Uniform | 98.62 |
| Synthetic samples | Top-1 Accuracy (%) |
|---|---|
| 50 | 91.92 |
| 100 (default) | 92.38 |
| 200 | 92.40 |
| (independent) | (differential) | Random baseline | |
|---|---|---|---|
| Cross-head similarity (mean) | 0.254 | 0.068 | 0.071 |
| Cross-head similarity (early layers) | 0.353 | 0.053 | 0.071 |
Language Model Steering
Language model steering controls a model’s behavior at inference time by intervening in its representations, components, or decoding process.
See all 278 papers