Evaluating Trajectory Features for Routing Final-Layer Attention
Abstract
Attention routing requires a signal that predicts the value of attention on the current prefix. We evaluate whether hidden-state extrapolation error, curvature and error change improve this prediction beyond uncertainty, one-step displacement, position and state projections. Paired executions of the final attention layer supply signed next-token loss differences in frozen SmolLM3-3B-Base and Qwen3.5-4B-Base checkpoints. Utility-supervised routers are tested on 100 held-out PG-19 books at an identical causal 20 percent invocation quota. None of six prespecified comparisons shows a positive gain after familywise correction. In Qwen3.5, a parameter-matched fixed-projection control lowers NLL by 0.00356 nats/token relative to the trajectory router (95 percent interval 0.00218 to 0.00487). Secondary results depend on the operation removed, feature location and scoring horizon; frozen thresholds also drift substantially at longer horizons. Actual selected-query execution yields small long-sequence latency reductions with increased NLL, while learned routers remain slower during cached continuation. The study identifies limits on the incremental value of these trajectory summaries and separates allocation quality from measured inference benefit.
Figures & tables
| Router | Inputs | Head | Projection |
|---|---|---|---|
| C48 | 289 | 0 | |
| J32 | 289 | 0 | |
| C_RP3 | and three fixed state projections | 289 | 0 |
| S32 | and learned rank-32 state projection | 1,331 | |
| S32_T | and learned rank-32 state projection | 1,313 |
| Checkpoint | Candidate–control | Gain | 95% interval | |
|---|---|---|---|---|
| SmolLM3 | J32–C48 | 0.437 | 0.602 | |
| J32–C_RP3 | 0.843 | |||
| S32_T–S32 | 0.843 | |||
| Qwen3.5 | J32–C48 | 0.856 | 0.282 | |
| J32–C_RP3 | 0.00060 | |||
| S32_T–S32 | 0.426 | 0.843 |
Appendix figures & tables36 assets
Supplementary material from the paper’s appendix.
Appendix
| Checkpoint | Contrast | Gain [95% interval] | Adjusted |
|---|---|---|---|
| SmolLM3 | J32–C48 | 0.437 [-0.138, 1.046] | 0.6019 |
| SmolLM3 | J32–C_RP3 | -0.277 [-0.997, 0.428] | 0.8426 |
| SmolLM3 | S32_T–S32 | -0.335 [-0.968, 0.295] | 0.8426 |
| Qwen3.5 | J32–C48 | 0.856 [-0.020, 1.736] | 0.2820 |
| Qwen3.5 | J32–C_RP3 | -3.557 [-4.874, -2.182] | 0.0006 |
| Qwen3.5 | S32_T–S32 | 0.426 [-0.347, 1.221] | 0.8426 |
| Target | Router | NLL | Rate | Selected harm |
|---|---|---|---|---|
| bypass | C48 | 2.5649 | 0.2000 | -0.0069 |
| bypass | C_RP3 | 2.5642 | 0.2000 | -0.0069 |
| bypass | I_S35 | 2.5512 | 0.2000 | -0.0090 |
| bypass | I_ST32 | 2.5516 | 0.2000 | -0.0088 |
| bypass | I_T32 | 2.5677 | 0.2000 | -0.0065 |
| bypass | J32 | 2.5645 | 0.2000 | -0.0069 |
| Target | Contrast | Gain [95% interval] |
|---|---|---|
| bypass | J32–C48 | 0.437 [-0.138, 1.046] |
| bypass | J32–C_RP3 | -0.277 [-0.997, 0.428] |
| bypass | S32_T–S32 | -0.335 [-0.968, 0.295] |
| bypass | J32–S32 | -13.268 [-14.735, -11.872] |
| bypass | I_ST32–I_S35 | -0.447 [-0.901, 0.027] |
| bypass | J32–J_sign | 4.075 [3.148, 5.009] |
| Target | Router | NLL | Rate | Selected harm |
|---|---|---|---|---|
| bypass | C48 | 2.1966 | 0.2000 | -0.0068 |
| bypass | C_RP3 | 2.1950 | 0.2000 | -0.0067 |
| bypass | I_S35 | 2.1922 | 0.2000 | -0.0055 |
| bypass | I_ST32 | 2.1916 | 0.2000 | -0.0056 |
| bypass | I_T32 | 2.1973 | 0.2000 | -0.0053 |
| bypass | J32 | 2.1968 | 0.2000 | -0.0065 |
| Target | Contrast | Gain [95% interval] |
|---|---|---|
| bypass | J32–C48 | -0.340 [-0.992, 0.280] |
| bypass | J32–C_RP3 | -1.544 [-2.448, -0.639] |
| bypass | S32_T–S32 | -0.149 [-0.555, 0.248] |
| bypass | J32–S32 | -3.978 [-5.177, -2.866] |
| bypass | I_ST32–I_S35 | 0.469 [0.029, 0.911] |
| bypass | J32–J_sign | 0.503 [-0.226, 1.239] |
| Target | Router | NLL | Rate | Selected harm |
|---|---|---|---|---|
| bypass | C48 | 2.3921 | 0.2000 | -0.0063 |
| bypass | C_RP3 | 2.3920 | 0.2000 | -0.0062 |
| bypass | I_S35 | 2.3787 | 0.2000 | -0.0084 |
| bypass | I_ST32 | 2.3781 | 0.2000 | -0.0085 |
| bypass | I_T32 | 2.3929 | 0.2000 | -0.0061 |
| bypass | J32 | 2.3922 | 0.2000 | -0.0063 |
| Target | Contrast | Gain [95% interval] |
|---|---|---|
| bypass | J32–C48 | -0.067 [-0.199, 0.065] |
| bypass | J32–C_RP3 | -0.201 [-0.370, -0.036] |
| bypass | S32_T–S32 | -1.274 [-1.768, -0.847] |
| bypass | J32–S32 | -11.151 [-12.275, -10.100] |
| bypass | I_ST32–I_S35 | 0.566 [0.308, 0.833] |
| bypass | J32–J_sign | 0.132 [-0.374, 0.617] |
| Target | Router | NLL | Rate | Selected harm |
|---|---|---|---|---|
| bypass | C48 | 2.6922 | 0.2000 | -0.0281 |
| bypass | C_RP3 | 2.6878 | 0.2000 | -0.0272 |
| bypass | I_S35 | 2.6834 | 0.2000 | -0.0269 |
| bypass | I_ST32 | 2.6833 | 0.2000 | -0.0266 |
| bypass | I_T32 | 2.6989 | 0.2000 | -0.0243 |
| bypass | J32 | 2.6914 | 0.2000 | -0.0279 |
| Target | Contrast | Gain [95% interval] |
|---|---|---|
| bypass | J32–C48 | 0.856 [-0.020, 1.736] |
| bypass | J32–C_RP3 | -3.557 [-4.874, -2.182] |
| bypass | S32_T–S32 | 0.426 [-0.347, 1.221] |
| bypass | J32–S32 | -10.676 [-12.569, -8.871] |
| bypass | I_ST32–I_S35 | 0.087 [-0.649, 0.838] |
| bypass | J32–J_sign | 28.125 [26.114, 30.133] |
| Target | Router | NLL | Rate | Selected harm |
|---|---|---|---|---|
| bypass | C48 | 2.3575 | 0.2000 | -0.0279 |
| bypass | C_RP3 | 2.3513 | 0.2000 | -0.0294 |
| bypass | I_S35 | 2.3216 | 0.2000 | -0.0309 |
| bypass | I_ST32 | 2.3221 | 0.2000 | -0.0304 |
| bypass | I_T32 | 2.3735 | 0.2000 | -0.0233 |
| bypass | J32 | 2.3568 | 0.2000 | -0.0285 |
| Target | Contrast | Gain [95% interval] |
|---|---|---|
| bypass | J32–C48 | 1.561 [-0.364, 3.533] |
| bypass | J32–C_RP3 | -6.080 [-9.989, -2.365] |
| bypass | S32_T–S32 | 0.773 [-0.844, 2.213] |
| bypass | J32–S32 | -36.719 [-42.281, -31.328] |
| bypass | I_ST32–I_S35 | -0.470 [-1.959, 1.045] |
| bypass | J32–J_sign | 56.417 [52.383, 60.394] |
| Target | Router | NLL | Rate | Selected harm |
|---|---|---|---|---|
| bypass | C48 | 2.5045 | 0.2000 | -0.0261 |
| bypass | C_RP3 | 2.5009 | 0.2000 | -0.0263 |
| bypass | I_S35 | 2.4975 | 0.2000 | -0.0258 |
| bypass | I_ST32 | 2.4952 | 0.2000 | -0.0258 |
| bypass | I_T32 | 2.5111 | 0.2000 | -0.0228 |
| bypass | J32 | 2.5027 | 0.2000 | -0.0263 |
| Target | Contrast | Gain [95% interval] |
|---|---|---|
| bypass | J32–C48 | 1.738 [1.356, 2.110] |
| bypass | J32–C_RP3 | -1.794 [-2.342, -1.263] |
| bypass | S32_T–S32 | -2.925 [-3.376, -2.490] |
| bypass | J32–S32 | -9.207 [-10.166, -8.250] |
| bypass | I_ST32–I_S35 | 2.306 [1.715, 2.939] |
| bypass | J32–J_sign | 14.397 [13.473, 15.336] |
| Length | Retention policy | Accuracy (%) | NLL |
|---|---|---|---|
| 256 | full | 100.00 | 0.0026 |
| 256 | recent16 | 11.52 | 2.2821 |
| 256 | recent_extended_B16 | 10.74 | 2.3735 |
| 256 | random_B16 | 17.25 | 2.6083 |
| 256 | error_B16 | 100.00 | 0.0026 |
| 256 | displacement_B16 | 95.90 | 0.2079 |
| Length | Retention policy | Accuracy (%) | NLL |
|---|---|---|---|
| 384 | full | 99.09 | 0.1443 |
| 384 | recent16 | 12.70 | 2.1798 |
| 384 | recent_extended_B16 | 10.74 | 2.2812 |
| 384 | random_B16 | 17.25 | 2.3107 |
| 384 | error_B16 | 99.09 | 0.1443 |
| 384 | displacement_B16 | 93.62 | 0.4022 |
| Contrast | Endpoint | Gain [95% interval] | Adjusted |
|---|---|---|---|
| L256 random | Accuracy | 11.133 [7.552, 14.844] | 0.0016 |
| L256 random | NLL | -0.272 [-0.410, -0.139] | 0.0016 |
| L256 error | Accuracy | 87.370 [85.156, 89.518] | 0.0016 |
| L256 error | NLL | 2.422 [2.368, 2.479] | 0.0016 |
| L256 displacement | Accuracy | 87.370 [85.156, 89.518] | 0.0016 |
| L256 displacement | NLL | 2.422 [2.368, 2.479] | 0.0016 |
| Model | Unit | Joint uncertainty | Both control and position |
|---|---|---|---|
| 3.48M | byte | 0.528 [0.271, 0.782] | 0.049 [-0.217, 0.310] |
| 20.08M | byte | 0.537 [-0.165, 1.229] | 0.234 [-0.244, 0.789] |
| 3.48M, balanced | byte | 0.161 [0.057, 0.265] | 0.097 [-0.038, 0.227] |
| GPT-2 124M | BPE token | 20.574 [16.974, 24.215] | 7.987 [4.944, 10.846] |
| Configuration | Seed | Paired gain | 95% article interval |
|---|---|---|---|
| 3.48M | 11 | 0.738 | [0.301, 1.211] |
| 3.48M | 23 | 0.518 | [0.197, 0.859] |
| 3.48M | 37 | 0.418 | [0.023, 0.846] |
| 20.08M | 11 | 1.859 | [0.956, 2.758] |
| 20.08M | 23 | 1.562 | [0.527, 2.644] |
| 20.08M | 37 | 0.830 | [-0.187, 1.977] |
| Configuration | Fast | Full correction | Threshold joint | Dense reference |
|---|---|---|---|---|
| Original 3.48M | 1.997 0.009 | 1.976 0.008 | 1.981 0.008 | 2.201 0.051 |
| 20.08M | 1.877 0.009 | 1.834 0.010 | 1.854 0.009 | 1.949 0.006 |
| Balanced 3.48M | 1.921 0.001 | 1.910 0.002 | 1.912 0.002 | 1.911 0.004 |
| Configuration | ||||
|---|---|---|---|---|
| Original 3.48M | 10.891 0.323 | 10.891 0.061 | 10.662 0.199 | 10.843 0.367 |
| 20.08M | 16.445 0.643 | 15.962 0.418 | 16.299 0.149 | 16.696 0.388 |
| Balanced 3.48M | 6.226 0.469 | 6.262 0.441 | 6.136 0.528 | 6.239 0.530 |
| Configuration | Length | Fast query accuracy % | Full query accuracy % |
|---|---|---|---|
| 1k pilot | 256 | 12.16 1.02 | 11.95 1.36 |
| 1k pilot | 384 | 8.79 0.74 | 8.20 0.74 |
| 6k revision | 256 | 13.51 0.45 | 13.46 0.57 |
| 6k revision | 384 | 12.73 1.80 | 12.70 1.76 |
| Support configuration | 256 | 12.74 0.59 | 100.00 0.00 |
| Support configuration | 384 | 11.85 0.31 | 99.25 0.46 |
| Policy | Median | p95 | Executed NLL | Native speed ratio [95%] |
|---|---|---|---|---|
| native_auto_full | 1478.9 | 1515.9 | 2.5589 | 1.000 [1.000, 1.000] |
| matched_math_full | 1462.0 | 1524.8 | 2.5589 | 1.012 [0.987, 1.021] |
| true_bypass | 1475.5 | 1563.2 | 2.7064 | 1.002 [0.976, 1.017] |
| random_quota | 1473.8 | 1572.2 | 2.6808 | 1.003 [0.986, 1.013] |
| I_T32 | 1514.2 | 1571.8 | 2.6759 | 0.977 [0.951, 0.987] |
| I_S35 | 1516.3 | 1556.8 | 2.6648 | 0.975 [0.958, 0.989] |
| Policy | Median | p95 | Executed NLL | Native speed ratio [95%] |
|---|---|---|---|---|
| native_auto_full | 1475.9 | 1547.0 | 2.5242 | 1.000 [1.000, 1.000] |
| matched_math_full | 1454.5 | 1503.2 | 2.5242 | 1.015 [0.999, 1.025] |
| true_bypass | 1470.4 | 1547.1 | 2.6980 | 1.004 [0.988, 1.024] |
| random_quota | 1452.7 | 1536.3 | 2.6592 | 1.016 [1.003, 1.024] |
| I_T32 | 1497.9 | 1556.9 | 2.6605 | 0.985 [0.967, 0.995] |
| I_S35 | 1503.3 | 1592.0 | 2.6471 | 0.982 [0.966, 0.997] |
| Policy | Median | p95 | Executed NLL | Native speed ratio [95%] |
|---|---|---|---|---|
| native_auto_full | 192.4 | 210.5 | 2.4973 | 1.000 [1.000, 1.000] |
| matched_math_full | 193.2 | 207.0 | 2.4973 | 0.996 [0.988, 1.006] |
| true_bypass | 190.4 | 206.9 | 2.6602 | 1.010 [1.001, 1.019] |
| random_quota | 191.0 | 217.2 | 2.6288 | 1.007 [0.999, 1.014] |
| I_T32 | 193.9 | 209.2 | 2.6248 | 0.992 [0.989, 1.000] |
| I_S35 | 191.2 | 211.2 | 2.6064 | 1.006 [0.994, 1.012] |
| Policy | Median | p95 | Executed NLL | Native speed ratio [95%] |
|---|---|---|---|---|
| native_auto_full | 975.8 | 1066.9 | 2.3863 | 1.000 [1.000, 1.000] |
| matched_math_full | 996.2 | 1056.3 | 2.3863 | 0.980 [0.953, 1.017] |
| true_bypass | 938.2 | 1016.7 | 2.5443 | 1.040 [1.035, 1.062] |
| random_quota | 949.1 | 1038.9 | 2.5127 | 1.028 [0.988, 1.049] |
| I_T32 | 949.8 | 1074.7 | 2.5113 | 1.027 [1.020, 1.048] |
| I_S35 | 947.9 | 1002.1 | 2.4965 | 1.029 [1.024, 1.050] |
| Policy | Median | p95 | Executed NLL | Native speed ratio [95%] |
|---|---|---|---|---|
| native_auto_full | 96.2 | 105.1 | 2.5703 | 1.000 [1.000, 1.000] |
| matched_math_full | 96.1 | 105.5 | 2.5703 | 1.001 [0.989, 1.017] |
| true_bypass | 95.1 | 102.6 | 2.7364 | 1.012 [0.998, 1.028] |
| random_quota | 95.9 | 105.2 | 2.7024 | 1.003 [0.986, 1.018] |
| I_T32 | 96.3 | 102.7 | 2.6991 | 1.000 [0.994, 1.014] |
| I_S35 | 96.4 | 104.9 | 2.6840 | 0.998 [0.992, 1.014] |
| Policy | Median | p95 | Executed NLL | Native speed ratio [95%] |
|---|---|---|---|---|
| native_auto_full | 1060.0 | 1100.4 | 2.5742 | 1.000 [1.000, 1.000] |
| matched_math_full | 1060.8 | 1114.2 | 2.5742 | 0.999 [0.983, 1.014] |
| true_bypass | 1072.2 | 1153.5 | 2.6103 | 0.989 [0.970, 1.002] |
| random_quota | 1077.5 | 1159.3 | 2.6043 | 0.984 [0.969, 0.999] |
| I_T32 | 1114.6 | 1156.2 | 2.6080 | 0.951 [0.934, 0.965] |
| I_S35 | 1110.5 | 1147.4 | 2.5893 | 0.955 [0.937, 0.974] |
| Policy | Median | p95 | Executed NLL | Native speed ratio [95%] |
|---|---|---|---|---|
| native_auto_full | 1049.2 | 1136.4 | 2.4609 | 1.000 [1.000, 1.000] |
| matched_math_full | 1047.3 | 1091.0 | 2.4609 | 1.002 [0.982, 1.029] |
| true_bypass | 1066.9 | 1113.6 | 2.4961 | 0.983 [0.975, 1.016] |
| random_quota | 1062.3 | 1114.9 | 2.4878 | 0.988 [0.973, 1.016] |
| I_T32 | 1105.1 | 1153.0 | 2.4884 | 0.949 [0.941, 0.977] |
| I_S35 | 1089.9 | 1138.3 | 2.4675 | 0.963 [0.956, 0.990] |
| Policy | Median | p95 | Executed NLL | Native speed ratio [95%] |
|---|---|---|---|---|
| native_auto_full | 134.6 | 146.2 | 2.4734 | 1.000 [1.000, 1.000] |
| matched_math_full | 134.7 | 142.7 | 2.4734 | 0.999 [0.989, 1.016] |
| true_bypass | 132.9 | 145.2 | 2.5041 | 1.013 [1.006, 1.028] |
| random_quota | 134.2 | 141.2 | 2.4978 | 1.004 [1.000, 1.019] |
| I_T32 | 135.5 | 149.0 | 2.4947 | 0.993 [0.978, 1.010] |
| I_ST32 | 136.0 | 148.5 | 2.4808 | 0.990 [0.978, 1.011] |
| Policy | Median | p95 | Executed NLL | Native speed ratio [95%] |
|---|---|---|---|---|
| native_auto_full | 1162.5 | 1255.6 | 2.3695 | 1.000 [1.000, 1.000] |
| matched_math_full | 1128.4 | 1171.6 | 2.3695 | 1.030 [1.002, 1.047] |
| true_bypass | 1112.4 | 1158.4 | 2.3995 | 1.045 [1.015, 1.063] |
| random_quota | 1120.4 | 1200.4 | 2.3935 | 1.038 [1.001, 1.057] |
| I_T32 | 1118.0 | 1225.2 | 2.3930 | 1.040 [0.984, 1.059] |
| I_S35 | 1114.9 | 1194.8 | 2.3787 | 1.043 [1.013, 1.060] |
| Policy | Median | p95 | Executed NLL | Native speed ratio [95%] |
|---|---|---|---|---|
| native_auto_full | 61.3 | 68.0 | 2.5433 | 1.000 [1.000, 1.000] |
| matched_math_full | 61.4 | 68.7 | 2.5433 | 0.998 [0.961, 1.014] |
| true_bypass | 60.9 | 69.1 | 2.5814 | 1.006 [0.991, 1.031] |
| random_quota | 61.6 | 69.8 | 2.5739 | 0.994 [0.969, 1.006] |
| I_T32 | 62.5 | 70.6 | 2.5678 | 0.980 [0.957, 1.002] |
| I_S35 | 61.9 | 70.1 | 2.5506 | 0.989 [0.964, 1.006] |
| Model | Condition | Valid policies | Blocks | Failed policies |
|---|---|---|---|---|
| SmolLM3 | scoring 512 | 10 | 30 | None |
| SmolLM3 | scoring 1024 | 9 | 30 | I_S35 |
| SmolLM3 | scoring 4096 | 10 | 30 | None |
| SmolLM3 | cached 512 | 10 | 30 | None |
| SmolLM3 | cached 1024 | 10 | 30 | None |
| Qwen3.5 | scoring 512 | 10 | 30 | None |