Periodic Weak Spots Persist Despite Readable Caches—and Follow Checkpoint-Specific Circuits
Abstract
Chunked KV compression cuts Transformer memory yet causes periodic retrieval weak spots at stride W.
On 552.47M-parameter ResCSA C0 (W = 8), clean accuracy falls to 3.00% at boundary phase 7 despite 95.0%–100.0% linear probe readability (97.1%–100.0% pre-norm) and read-path bottlenecks with interfering heads.
A fixed edit (C13) passes 10/10 gates on two dev-seen checkpoints but fails 5/10 (0/5 retrieval) on unseen 1.75B tokens, seed 42, revealing checkpoint-specific circuits.
Diagnosing 1.75B tokens, seed 42, we build a closed-form 9-tensor edit—RoPE-band key rescaling, rank-2 L17 attenuation (I − 0.60U2U2⊤), and ridge-filtered WO balancing—using FineWeb-Edu covariances (fwCalOnly, primary; withProt side-by-side).
“Zero-gradient” refers strictly to executing the locked static edit without backpropagation; prior diagnosis/discovery used labeled FIT/DEV feedback (1.51 h; 24.01 s rebuild).
On post-freeze holdout_v3, fwCalOnly lifts worst-phase accuracy on all five suites by +6.07–+20.00 pp, narrowing range on 3/5 and widening on 2/5; list-supervised LoRA yields a smaller best-to-worst phase gap than fwCalOnly on all five suites.
On xtask_fw_natural_repeat (94–389 tok), fwCalOnly gains +1.51 pp (+4.20 pp Ph7), narrowing 56.5% (70.0%) of the Clean–FullAttn gap, vs. +0.13–+0.19 pp for list LoRA/SFT and −0.26 pp for post-hoc matched-corpus 9-tensor SFT (fwCalOnly leads +1.78 pp [+1.36, +2.21]).
Counterfactual substitution confirms stronger intact-context dependence (DiDacc = +2.05 pp), with 0/45 alerts and +0.74% FineWeb PPL.
Readable KV, Starved Readout
Across dedicated compressed layers, keys and values remain 95.0%–100.0% linearly readable (including Ph7 shifted locally into chunk j*+1), while causal tests isolate QK starvation, RoPE Band-0 drag, a rank-2 L17 common-mode floor, and five interfering saboteur heads.
General C13 Fails 5/10 Unseen
Fixed automated PhaseWSP v1.1.1 (C13) passes 10/10 confirmatory gates on dev-seen 3.5B s42 (+14.53 pp) and 1.75B s43 (+10.27 pp), but passes 0/5 retrieval gates (5/10 gates overall) on unseen 1.75B tokens, seed 42, motivating checkpoint-specific 9-tensor editing.
Natural Text vs. Synthetic Lists
List-supervised LoRA dominates synthetic holdout_v3 (smaller phase gaps 0.00–28.80 pp on 5/5 suites), whereas fwCalOnly leads compressed models on natural-text FW-Repeat (+1.51 pp, Ph7 +4.20 pp) and beats post-hoc matched-corpus 9-tensor SFT (+1.78 pp).
ResCSA C0 (1.75B tokens, seed 42; 552.47M unique params).
(a) Top: phase-resolved holdout_pws_prefix curves showing Clean C0 collapsing to 3.00% at boundary Ph7 and fwCalOnly lifting weak phases {1, 2, 7}. Bottom: all-5 holdout_v3 summary—fwCalOnly lifts worst-phase accuracy on 5/5 suites (+6.07 to +20.00 pp), narrows range on 3/5, and widens range on InSeq and OOD-L650, while list-supervised NIAH-LoRA flattens all 5/5 suites.
(b) Post-freeze xtask_fw_natural_repeat (94–389 tokens): fwCalOnly gains +1.51 pp overall (+4.20 pp Ph7) over Clean and leads post-hoc matched-corpus FW-CE SFT by +1.78 pp (+4.70 pp Ph7), narrowing 56.5% / 70.0% of the observed Clean–FullAttn gap.
ResCSA C0 (1.75B tokens, seed 42; 552.47M Unique Params)C0 Clean) across in-family synthetic holdout_v3, post-freeze out-of-family xtask_v1, and token-weighted fw_holdout_v3 Full PPL (128 docs, 262,016 tokens).
| Model (1.75B tok, s42) | Regime | Prefix (%) | OOD-L650 (%) | FW-Rep (%) | Ph7 (%) | Gold NLL | Prose (%) | Code (%) | FW ΔPPL |
|---|---|---|---|---|---|---|---|---|---|
| C0 Clean | Base | 37.12 | 47.76 | 82.49 | 79.60 | 0.8356 | 7.06 | 1.38 | 15.72 |
fwCalOnly (primary) |
0-grad / FW | 47.79 (+10.67) | 57.65 (+9.89) | 84.00 (+1.51) | 83.80 (+4.20) | 0.7582 | 10.06 (+3.00) | 3.16 (+1.79) | +0.74% |
withProt (26/26 pass*) |
0-grad / +Prot | 48.68 (+11.55) | 57.15 (+9.39) | 84.00 (+1.51) | 83.80 (+4.20) | 0.7586 | 9.88 (+2.81) | 3.21 (+1.84) | +0.74% |
C13 (v1.1.1 general) |
0-grad / Gen. | 33.88 (−3.24) | 44.24 (−3.53) | 82.59 (+0.10) | 80.50 | 0.8276 | 7.46 (+0.40) | 1.40 (+0.02) | +0.14% |
LoRA r8-read (Best) |
Grad / NIAH | 100.00 (+62.88) | 92.31 (+44.55) | 82.61 (+0.13) | 80.20 | 0.8231 | 7.91 (+0.85) | 3.60 (+2.23) | +0.16% |
LoRA r8-attn |
Grad / NIAH | 100.00 (+62.88) | 93.18 (+45.41) | 82.63 (+0.14) | 79.80 | 0.8217 | 8.50 (+1.44) | 5.09 (+3.71) | +0.17% |
SFT-9 bespoke |
Grad / NIAH | 99.71 (+62.59) | 78.76 (+31.00) | 82.66 (+0.18) | 80.00 | 0.8220 | 8.41 (+1.35) | 2.46 (+1.09) | +0.05% |
sft_same9_fwcal_ce† |
Grad / FW | — | — | 82.23 (−0.26) | 79.10 | 0.8400 | — | — | −0.01% |
| FullAttn (Ref., 544.67M) | No comp. | 64.26 | 56.25 | 85.16 | 85.60 | 0.7020 | 3.39 | 14.24 | 15.58 |
withProt is the originally frozen artifact formally passing 26/26 Phase 4 holdout_v3 criteria; selecting fwCalOnly as primary display variant was a paper-writing decision (not pre-registered).
†sft_same9_fwcal_ce is a post-hoc matched-corpus control (same base checkpoint, exact 9 tensor names, 128 fw_cal document source; “—” = not evaluated on untested suites); fwCalOnly leads it by +1.78 pp [+1.36, +2.21] overall, +4.70 pp [+3.40, +6.00] on Ph7, and −0.0818 Gold NLL (fwCalOnly vs. Clean NLL: −0.0774; sft_same9_fwcal_ce vs. Clean: +0.0045).
All four list-supervised LoRAs have FW-Repeat overall 95% CIs crossing zero (+0.13 to +0.19 pp).
Three Closed-Form Operators Across 9 Attention Tensors
Causal diagnosis on ResCSA C0 (1.75B tokens, seed 42) links weak phases {1, 2, 7} (layers L13, L21, L17) to three read-path bottlenecks:
(i) boundary QK starvation at L17, where the FineWeb-Edu pre-k_norm second moment puts 41.44% trace in top-1 and 45.08% in top-2 (vs. 25.24% at L13 and 30.65% at L21);
(ii) split-half RoPE aliasing, where high-frequency Band 0 adds negative margin drag while Bands 2–3 carry positive QK separation; and
(iii) carrier-vs-saboteur head interference, where naive 2× WO scaling harms protected phases (ProtMin −4.6 to −13.5 pp) by amplifying five saboteur heads (L13 H3/H12, L21 H5/H7, L17 H5).
Every calibration matrix is an uncentered float64 second moment Σ = (1/N)∑xnxn⊤ collected under torch.inference_mode() on FineWeb-Edu (128 × 2048 tokens), trace-normalized as Σ = Σ / max(tr(Σ)/d, 10−8). All edits apply statically to 9 / 479 existing self_attn.* tensors in float64 before casting to bf16, leaving 470 tensors and all 56/56 q_norm/k_norm weights strictly bit-exact (max|Δ| = 0.0) with zero runtime hooks.
Rank-2 L17 Common-Mode Attenuation
W'c_k(17) = bf16(Dc_k(17) P Wc_k(17))
W'Q,h(17) = bf16(P WQ,h(17)), h∈{0,1,2,4,14}
From Pass-1 fw_cal pre-k_norm L17 compressed keys (128 docs, 32,768 chunks), top-2 orthonormal eigenvectors U2 define P, scaling span(U2) by 0.40—retaining 40% amplitude (16% squared norm)—and acting as identity on span(U2)⊥. Composed non-commutatively (Dc_kP ≠ PDc_k) with Dc_k(17) = D(0.20, 0.40, 1.0, 1.0); 11 other L17 heads stay untouched.
RoPE-Band Compressed-Key Rescaling
Fh(ℓ) = (I1024 + 2.0 Σh,fw(ℓ))−1
W'c_k(ℓ) = bf16(Wc_k(ℓ) + (Dband−I) Wc_k(ℓ) Fh(ℓ))
For ℓ ∈ {13, 21}, split-half RoPE pairs (p, p+64) form four 16-pair frequency bands. High-frequency drag (Bands 0–1) is damped while low-frequency margin (Bands 2–3) is boosted through the Pass-1 FineWeb-Edu pre-attention ridge filter Fh(ℓ). Edits compressed c_k exclusively, never local k_proj.
Ridge-Filtered WO Balancing
+ λprotΣz,prot,h(ℓ))−1
W'O,h(ℓ) = bf16(WO,h(ℓ) + αh WO,h(ℓ) FO,h(ℓ))
Applied across L17, L13, L21, L24, L20 o_proj with positive gains αh > 0 on carriers and negative damping on the 5 saboteurs. L17 uses sequential Pass-2 post-QK covariances on the first 64 FineWeb-Edu docs (131,072 tokens); other layers use Pass-1 128-doc moments. Primary fwCalOnly sets λprot = 0 everywhere; withProt adds carrier-only λprot ∈ {0.2, 0.3, 0.5}.
ResCSA C0.
(a) Disjoint linear probes (1.75B tokens, seed 42) read compressed v/k at 95.0%–100.0% (97.1%–100.0% pre-norm; Ph7 at j*+1) despite collapsed retrieval.
(b) Read-path interventions with KV caches untouched: forcing j*+1 routing lifts Ph7 (4.0% → 25.0% at L17, 43.1% 3-layer), whereas naive 2× WO scaling harms protected phases (ProtMin −4.6 to −13.5 pp).
(c) Head direct logit attribution isolates five saboteur heads (L13 H3/H12, L21 H5/H7, L17 H5) alongside on-phase carriers.
(d) L17 FineWeb-Edu pre-k_norm spectrum (top-2 45.08% vs. 25.24% L13 / 30.65% L21) drops to 11.61% after P = I − 0.60 U2U2⊤ (40% amplitude / 16% squared norm on U2).
Zero-gradient scope: Throughout this work, “zero-gradient” refers strictly to executing the locked static 9-tensor prescription without backpropagation, optimizer states, or runtime hooks. Prior mechanistic diagnosis and structural prescription discovery on 1.75B tokens, seed 42 used labeled FIT/DEV retrieval feedback via a multi-role AI-assisted workflow.
- Axis (b) — Locked Single-Run Rebuild (RTX 5080):
fwCalOnlyrebuilds in 24.01 s GPU solve time (34.76 s cold-start end-to-end excluding probe verification; 1.53 GiB peaktorch.cuda.max_memory_allocated()vs. 4.49 GiB alloc. / 4.81 GiB res. forsft_same9_fwcal_ceand 4.69 GiB alloc. forlora_r8_read). - Axis (a) — Prior Structural Discovery Cost: The locked recipe inherits 1.51 h of GPU discovery across 88 DEV configurations (plus unpriced cloud AI assistance), compared alongside 1.56 h for all four LoRA grids combined and 148.8 s for the post-hoc CE grid. Axis (b) rebuild speedups must never be extrapolated to Axis (a) discovery cost.
- Inference Parity: Merged LoRA/SFT baselines also execute with 0 runtime hooks; without wall-clock latency benchmarks, we report strictly architectural and theoretical forward-FLOPs parity.
Natural-Text Transfer, Counterfactual Evidence Dependence & Downstream Safety
Natural-Text Repeat Transfer +1.51 pp / Ph7 +4.20 pp
On post-freeze xtask_fw_natural_repeat (N = 8,000, 1,000 clusters, filtered FineWeb-Edu passages of 94–389 tokens, mean 180.7, open-vocab, ΔKV = 1), fwCalOnly reaches 84.00% vs. Clean 82.49% (+1.51 pp [+1.11, +1.91]; Ph7 83.80% vs. 79.60%, +4.20 pp [+2.90, +5.50]; Gold NLL −0.0774), narrowing 56.5% overall (70.0% Ph7) of the observed Clean–FullAttn gap. Side-by-side withProt matches (84.00%, Ph7 +4.20 pp).
List-supervised LoRA/SFT achieve smaller transfer gains (not zero): all 4 LoRA overall 95% CIs cross zero (+0.13 to +0.19 pp), sft_bespoke_9tensor yields +0.18 pp [+0.01, +0.34], and single-draw sft_random_9tensor (seed=20270601) yields +0.13 pp [−0.05, +0.31]. Post-hoc matched-corpus sft_same9_fwcal_ce scores 82.23% (−0.26 pp [−0.41, −0.12]; Ph7 79.10%), leaving fwCalOnly ahead by +1.78 pp [+1.36, +2.21] (Ph7 +4.70 pp [+3.40, +6.00]). On Prose (ΔKV = 4), fwCalOnly leads compressed models (+3.00 pp); on Code (ΔKV = 3), list LoRA leads (lora_r8_attn +3.71 pp vs. fwCalOnly +1.79 pp).
Synthetic holdout_v3 Trade-Offs
5/5 Worst-Ph ↑ · 3/5 Narrow
Across all five post-freeze holdout_v3 suites (zero overlap with 211,200 historical prompts), fwCalOnly lifts worst-phase accuracy by +6.07 to +20.00 pp (withProt: +6.23 to +20.50 pp) and suite-mean accuracy by +6.43 to +12.99 pp (withProt: +6.97 to +13.96 pp).
However, periodicity is mitigated rather than eliminated: both bespoke variants narrow full best-to-worst phase range on 3/5 suites (Prefix, Local-Long, OOD-L300) while widening range on 2/5 (InSeq: 23.47 → 33.27 / 34.17 pp; OOD-L650: 57.10 → 61.30 / 61.70 pp). Transparently, all four list-supervised LoRAs attain smaller phase gaps than fwCalOnly across all 5/5 suites (0.00–28.80 pp, mean 91.53%–100.00%; lora_r8_read: 0.00–21.00 pp, mean 92.31%–100.00%), whereas sft_bespoke_9tensor (78.76%–99.71% mean) is smaller on 3/5, tied on OOD-L300 (51.50 pp), and slightly wider on OOD-L650 (61.90 pp).
xtask_v1) and FineWeb-Edu perplexity trade-off on 1.75B tokens, seed 42.
(a) Paired accuracy gains (Δ pp vs. Clean, pointwise 95% cluster-bootstrap CIs; because xtask_v1 jointly varies retrieval distance ΔKV ∈ {1, 3, 4}, length, and answer space, shifts are not attributed solely to text format). Post-hoc FW-CE SFT is marked Not eval. on untested suites.
(b) Token-weighted fw_holdout_v3 PPL (128 docs, 262,016 Full / 65,408 Suffix tokens): fwCalOnly and withProt incur +0.74% Full PPL (Suffix +0.74% / +0.75%) while retaining 99.18% / 99.71% (fwCalOnly) and 99.14% / 99.63% (withProt) remote-context gain, vs. −0.01% for FW-CE SFT.
Task C: Counterfactual Evidence Dependence DiD +2.05 pp / Ph7 +4.50 pp
Replacing the prior repeated bigram (A, B) in xtask_fw_natural_repeat with a four-way-distinct donor bigram (A', B') (621 donors, 8,000/8,000 checks) measures Prior-Evidence Effect PEacc = Accintact − AccCF and synchronized Difference-in-Differences DiD = PE(M) − PE(Clean).
fwCalOnly lifts PEacc from 28.18 pp (Clean) to 30.22 pp, yielding DiDacc = +2.05 pp [+1.55, +2.56] (Ph7 +4.50 pp [+3.00, +6.00]; DiDNLL = +0.103, Ph7 +0.249), confirming stronger reliance on intact prior context rather than surface continuation shortcuts.
Non-equivalence caveat: wide CIs vs. FullAttn (fwCalOnly − FullAttn = −0.49 pp [−2.34, +1.41]) preclude claiming equivalence to FullAttn, and bigram replacement tests intervention sensitivity without isolating single-layer compressed KV pathways.
Task B: Downstream Capability Shifts & Alerts 0 / 45 Pre-Reg. Alerts
Public Downstream Capability Shifts and Pre-Registered Degradation Alerts.
Across five zero-shot public benchmarks (LAMBADA-OpenAI, HellaSwag, PIQA, ARC-Easy, SciQ) and five modified 1.75B tokens, seed 42 models, checking 25 acc + 20 acc_norm = 45 pre-registered metrics (alert rule: Δ < −1.5 pp, CIhi < 0, exact two-sided McNemar p < 0.05) triggers 0 / 45 alerts and 0 report-defined significant drops (Holm-25 minimum adjusted p = 0.4970; exploratory post-hoc LAMBADA shifts do not survive Holm-25 correction and are not claimed as downstream gains).
Language-modeling & multi-checkpoint context: On fw_holdout_v3, fwCalOnly incurs +0.74% Full PPL (15.83 vs. Clean 15.72). In zero-retrain Task A multi-checkpoint xtask_v1, Bespoke WSP ran exclusively on 1.75B tokens, seed 42, while 3.5B s42 and 1.75B s43 ran earlier general C13 (coupling operator family, training seed, and token budget).
FW-Repeat (N = 8,000, 1,000 Clusters)C0 Clean.
| Model (1.75B tokens, seed 42) | Intact / CF (%) | PEacc (pp) | DiDacc vs. Clean | Ph7 DiDacc | DiDNLL |
|---|---|---|---|---|---|
| C0 Clean | 82.49 / 54.31 | 28.18 | 0.00 | 0.00 | 0.000 |
fwCalOnly (primary) |
84.00 / 53.78 | 30.22 | +2.05 [+1.55, +2.56] | +4.50 [+3.00, +6.00] | +0.103 |
withProt (side-by-side) |
84.00 / 53.86 | 30.14 | +1.96 [+1.46, +2.45] | +4.60 [+3.10, +6.20] | +0.102 |
LoRA r8-read (Best list LoRA) |
82.61 / 54.28 | 28.34 | +0.16 | +0.60 | +0.016 |
SFT-9 bespoke (sft_bespoke) |
82.66 / 54.28 | 28.39 | +0.21 | +0.40 | +0.015 |
| FullAttn (Indep. Ref.)† | 85.16 / 54.45 | 30.71 | +2.54 | +6.10 | +0.106 |
fwCalOnly − FullAttn (−0.49 [−2.34, +1.41] pp) and withProt − FullAttn (−0.57 [−2.43, +1.29] pp) preclude equivalence claims to FullAttn.
xtask_v1 (Task A), Public Downstream Capability Shifts and Pre-Registered Degradation Alerts (Task B), and counterfactual evidence dependence (Task C).
(a) Task A across checkpoints: Bespoke WSP ran exclusively on 1.75B tokens, seed 42; 1.75B s43 and 3.5B s42 ran earlier general C13.
(b) Task B paired accuracy shifts across five public benchmarks on 1.75B tokens, seed 42 (0/45 pre-registered alerts; exploratory LAMBADA shifts are non-significant after Holm-25 correction).
(c) Task C intact-to-counterfactual PEacc and synchronized DiDacc on FW-Repeat (wide FullAttn CI precludes equivalence).
Honest Scope Boundaries, Bit-Exact Verification & Citation
Six explicit boundaries scope every claim in this preprint:
fwCalOnly and withProt were discovered and evaluated strictly on ResCSA C0 (1.75B tokens, seed 42). Fixed general C13 fails 5/10 on this unseen checkpoint, Task A couples operator/seed/token budget, and automated cross-checkpoint generalization remains open.
sft_same9_fwcal_ce).
holdout_v3 suites, periodicity persists and range widens on 2/5 (InSeq, OOD-L650). List-supervised LoRA achieves higher in-domain mean accuracy (91.53%–100.00%) and smaller phase gaps (0.00–28.80 pp) across all 5/5 suites.
fwCalOnly − FullAttn CIs ([−2.34, +1.41] pp) preclude claiming equivalence to FullAttn. Target-slot probes do not establish general unknown-address binding, and bigram substitution does not isolate single-layer compressed KV pathways.
sft_random_9tensor is a single draw, seed=20270601).
xtask_fw_natural_repeat tests filtered passages of 94–389 tokens (mean 180.7), not 10k-token or random text; escaping T = 16 does not exclude multi-layer local propagation across 28 layers, and base-pretraining overlap is unverified on disk.
git clone https://github.com/xuyao-zhang/periodic-weak-spots-wsp && cd periodic-weak-spots-wsp
pip install -r requirements.txt # fetch seed-42.pt (wsedoc/phase-sensitive-kv) & .safetensors patch
python src/wsp/apply_patch.py \
--base-ckpt ./seed-42.pt \
--expected-base-sha256 a1b6c19884e8ccd3570bff48b748a85920aed00083470dc591b51f8e0153b543 \
--patch-path ./patches/c0_bespoke_fwCalOnly_9tensor.safetensors \
--expected-sha256 9522d30b531e45cf865e72fa72f4aaa9fb525f33c3b1f7cd899386f1e5bec34e \
--verify-only
@misc{zhang2026mitigating,
title = {Mitigating Periodic Retrieval Weak Spots in Chunked KV Compression via Zero-Gradient Weight Editing},
author = {Xuyao Zhang},
year = {2026},
howpublished = {Preprint (2026)},
url = {https://doi.org/10.5281/zenodo.24652968},
note = {Code: https://github.com/xuyao-zhang/periodic-weak-spots-wsp}
}
Transparent AI Assistance Disclosure
AI coding and reasoning agents were used extensively throughout this research project, including in experimental design iteration, mechanistic diagnosis, mathematical formulation, implementation of calibration and evaluation scripts, data analysis, figure generation, independently implemented computational verification (AI-agent audits of frozen manifests, zero-hook integrity, and recomputed statistics—not third-party human audits), and manuscript drafting and editing.
Multi-role agent coordination logs record internal workflow roles (@coordinator, @diagnostician, @wsp_author, @eval_runner, @holdout_runner, @verifier) without recording interactive LLM model or sub-version identifiers; accordingly, unlogged version strings are not fabricated.
In addition, the human author used interactive large language models (including the Gemini and GPT families) to assist with ideation, experimental discussion, mechanistic analysis, and pre-release review and verification.
Every quantitative claim, table, and equation is directly grounded in executed code and saved experimental artifacts, and the human author has reviewed all core scientific claims, numerical summaries, figures, limitations, and disclosures and takes full academic and ethical responsibility for the work.