What does Mid-Context Forgetting and Relay Thresholds conclude, in numbers, about “The Key-Fact Restatement Slot: Zero Loss Comes Only from Template Copying and Checksums”?

Answer: Chapter 6 shows that zero loss can come only from a key-fact restatement slot copied by template and verified by checksum, which lifts key-fact survival from 0.601 to above nine in ten but holds only about seven lines.

Scope of the numbers: Tasks, material and parameters are illustrative and the model constants come from one 2023 model; all calculations are generated by the book's programs, which call no model. It is not individual business advice and neither rates nor recommends any model or service.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 0.601

no slot: key fact survives (q c(4))^4 = 0.601
lineshead: worstmeansplit: worstmean
50.9240.9400.8600.913
100.8780.9100.8350.884
200.8100.8600.7950.848
400.7320.7890.7350.794
800.6630.7110.6650.726
1600.6080.6440.6080.657
largest slot with every line read at 0.9 or better, head: 7
largest slot with every line read at 0.9 or better, split: 1
Show the full program
# Chapter 6. p61: a key-fact slot carried by the template, not the model.
# Relay of D = 256 units with segment s = 4 (L = 4 layers), per-call
# rewriting fidelity q = 0.97, reader from the p32 joint fit (rounded).
# Without a slot a key fact must survive every rewrite: (q c(4))^4.
# With a slot, the orchestration code copies k key-fact lines verbatim
# into every call (checked by checksum, see p63), so the carry itself
# loses nothing; the only loss left is the final read of the slot. A
# line is 0.1 unit (about 10 tokens); positions are continuous. The
# slot sits at the head, or is split between head and tail.
import math

TAU, M0, K, A, B = 2.4, 0.752, 0.0505, 0.251, 0.128
S, L, Q, W = 4, 4, 0.97, 0.1


def rho(x, n):
    v = (M0 - K * math.log(n) + A * math.exp(-(x - 1) / TAU)
         + B * math.exp(-(n - x) / TAU))
    return min(1.0, v)


def slot_read(k, split):
    n = S + k * W
    head = (k + 1) // 2 if split else k
    xs = [1 + j * W for j in range(head)]
    xs += [n - j * W for j in range(k - head)]
    vals = [rho(x, n) for x in xs]
    return min(vals), math.fsum(vals) / k


cap4 = math.fsum(rho(i, S) for i in range(1, S + 1)) / S
print("no slot: key fact survives (q c(4))^4 = %.3f" % ((Q * cap4) ** L))
print(" lines  head: worst   mean    split: worst   mean")
for k in (5, 10, 20, 40, 80, 160):
    hw, hm = slot_read(k, False)
    sw, sm = slot_read(k, True)
    print("%6d  %11.3f  %6.3f   %12.3f  %6.3f" % (k, hw, hm, sw, sm))
for split in (False, True):
    kmax = max(k for k in range(1, 400) if slot_read(k, split)[0] >= 0.9)
    print("largest slot with every line read at 0.9 or better, %s: %d"
          % ("split" if split else "head", kmax))

Single source and citation

Fan, Y. (2026). Mid-Context Forgetting in Long-Context Attention: Positional Bias and the Threshold for Lossless Segment-Summary Relays (Version 1.0.0), Chapter 6: The Key-Fact Restatement Slot: Zero Loss Comes Only from Template Copying and Checksums. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 5DL-B-255 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026255,
  author    = {Fan, Yafu},
  title     = {Mid-Context Forgetting in Long-Context Attention: Positional Bias and the Threshold for Lossless Segment-Summary Relays},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book