From 84313fbea329831e48a26d7b05885121134f157b Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Fri, 13 Nov 2026 19:03:16 +0800 Subject: [PATCH 01/23] DMB-01: exact deletion laws, bounded-state monitor and Gaussian cap/erasure reference --- .../deletion_memory_barrier_v1/reference.py | 294 ++++++++++++++++++ 1 file changed, 294 insertions(+) create mode 100644 research/deletion_memory_barrier_v1/reference.py diff --git a/research/deletion_memory_barrier_v1/reference.py b/research/deletion_memory_barrier_v1/reference.py new file mode 100644 index 000000000..2eb567a53 --- /dev/null +++ b/research/deletion_memory_barrier_v1/reference.py @@ -0,0 +1,294 @@ +"""DMB-01: exact finite deletion channel and streaming monitor oracle. + +Pure standard library (Fraction). No claim to reproduce OpenAI Math #122 +superpolynomial hard pairs or #140 high-dimensional Gaussian bounds. + +Definitions count *ordinary deletion traces*: retained bits are in their +original order, positions/masks are not revealed, and output lengths +are observed. The monitor output uses only its final B-bit state. +""" +from __future__ import annotations + +import argparse +import hashlib +import itertools +import json +from collections import Counter, defaultdict +from fractions import Fraction +from math import comb, ceil, pi +from pathlib import Path + + +def words(n: int) -> tuple[str, ...]: + if type(n) is not int or not 1 <= n <= 10: + raise ValueError("word length must be 1..10") + return tuple("".join(bits) for bits in itertools.product("01", repeat=n)) + + +def rate(value) -> Fraction: + q = Fraction(value) + if not 0 <= q <= 1: + raise ValueError("channel probability must lie in [0,1]") + return q + + +def deletion_law(word: str, deletion: Fraction) -> dict[str, Fraction]: + """Exact law of the trace after iid deletions of each input bit.""" + if not word or any(c not in "01" for c in word): + raise ValueError("nonempty binary source word required") + q = rate(deletion) + p = 1 - q + n = len(word) + law = defaultdict(Fraction) + for mask in range(1 << n): + trace = "".join(word[i] for i in range(n) if mask & (1 << i)) + k = mask.bit_count() + law[trace] += p ** k * q ** (n-k) + if sum(law.values()) != 1: + raise AssertionError("deletion trace law did not normalize") + return dict(law) + + +def deletion_deck(word: str, length: int) -> Counter: + """Occurrences of each length-k subsequence, counted with multiplicity.""" + n = len(word) + if not 0 <= length <= n: + raise ValueError("invalid deck length") + return Counter("".join(word[i] for i in index) + for index in itertools.combinations(range(n), length)) + + +def deck_equal_through(x: str, y: str, degree: int) -> bool: + if len(x) != len(y) or degree < 0: + raise ValueError("words must be same length and degree nonnegative") + return all(deletion_deck(x, k) == deletion_deck(y, k) + for k in range(min(degree, len(x)) + 1)) + + +def total_variation(a: dict, b: dict) -> Fraction: + if sum(a.values()) != 1 or sum(b.values()) != 1: + raise ValueError("inputs must be probability distributions") + return sum((abs(a.get(t, 0)-b.get(t, 0)) + for t in set(a) | set(b)), Fraction()) / 2 + + +def retained_length_tail(n: int, deletion: Fraction, degree: int) -> Fraction: + q = rate(deletion) + p = 1 - q + if not 0 <= degree <= n: + raise ValueError("degree outside length") + return sum((Fraction(comb(n,k)) * p**k * q**(n-k) + for k in range(degree+1, n+1)), Fraction()) + + +def product_law(law: dict[str,Fraction], count: int) -> dict[tuple[str,...],Fraction]: + if not 0 <= count <= 4: + raise ValueError("tensor count restricted to 0..4") + output={():Fraction(1)} + for _ in range(count): + next_distribution=defaultdict(Fraction) + for prev,mp in output.items(): + for trace,prob in law.items(): + next_distribution[prev+(trace,)]+=mp*prob + output=dict(next_distribution) + return output + + +def hard_pair(n: int, deletion: Fraction) -> dict: + law={w:deletion_law(w,deletion) for w in words(n)} + pair=None + best=Fraction(2) + for x,y in itertools.combinations(law,2): + tv=total_variation(law[x],law[y]) + if tv int: + # Prefix-free *integer representation* of a binary word including length. + return (1 << len(trace)) + (int(trace, 2) if trace else 0) + + +def update_state(state: int, trace: str, bits: int) -> int: + if type(bits) is not int or bits < 1: + raise ValueError("bits must be positive") + return (3*state + trace_code(trace) + 1) % (1 << bits) + + +def streaming_state_laws(n: int, deletion: Fraction, count: int, + memory_bits: int) -> dict[str,dict[int,Fraction]]: + """Exact distribution of a B-bit deterministic update-state monitor.""" + if type(count) is not int or count < 0 or count > 8: + raise ValueError("count must be 0..8") + if type(memory_bits) is not int or not 1 <= memory_bits <= 12: + raise ValueError("memory bits must be 1..12") + out={} + for x in words(n): + law=deletion_law(x,deletion) + state_probs={0:Fraction(1)} + for _ in range(count): + updated=defaultdict(Fraction) + for s,mass in state_probs.items(): + for trace,prob in law.items(): + updated[update_state(s,trace,memory_bits)]+=mass*prob + state_probs=dict(updated) + if sum(state_probs.values())!=1 or any( + not 0<=s<(1< Fraction: + """MAP success for uniform input X from ONLY the final state.""" + if not laws: + raise ValueError("missing source words") + states=set().union(*(set(v) for v in laws.values())) + return sum((max(probs.get(s,Fraction(0)) for probs in laws.values()) + for s in states), Fraction()) / len(laws) + + +def optimal_full_trace_success(n: int, deletion: Fraction, + count: int) -> Fraction: + """Bayes exact reconstruction using all complete deletion traces.""" + if not 0<=count<=3 or n>5: + raise ValueError("full exact decoder restricted to n<=5, m<=3") + laws={x:product_law(deletion_law(x,deletion),count) for x in words(n)} + observations=set().union(*(set(v) for v in laws.values())) + return sum((max(p.get(obs,Fraction(0)) for p in laws.values()) + for obs in observations),Fraction()) / (1< Fraction: + """Universal exact-success ceiling, with optional public stop index.""" + if n<1 or B<0 or m<0 or any(type(v) is not int for v in (n,B,m)): + raise ValueError("n positive, B and m nonnegative integers") + alphabet=(1< Fraction: + delta=rate(tv_single) + if type(count) is not int or count<0: + raise ValueError("nonnegative trace count") + # Coupling of m iid trace pairs yields tensor TV <= 1-(1-tv)^m. + return (2-(1-delta)**count)/2 + + +def universal_information_ceiling(n: int, retained: Fraction, m: int, + B: int, clock: bool=False) -> dict: + """Fano/data-processing necessary info lower bound for uniform X. + + I(X;terminal) <= min(B+log2(m+1), m*n*retained) for a + variable stop index, or <=min(B,m*n*retained) otherwise. + This returns the exact *retained-bit volume* term, and + its finite alphabet cap, omitting transcendental logarithms. + """ + r=rate(retained) + if any(type(v) is not int for v in (n,m,B)) or n<1 or m<0 or B<0: + raise ValueError("invalid n,m,B") + return {"expected_retained_trace_bits":str(m*n*r), + "terminal_alphabet":(1< float: + """Surface cap measure <=2/pi * epsilon^(d-1), epsilon in (0,pi/2].""" + if type(d) is not int or d<2 or not 0=2, angle eps in (0,pi/2]") + return (2/pi)*epsilon**(d-1) + + +def gaussian_terminal_ceiling(d: int, epsilon: float, + B: int, m: int=0, clock: bool=False)->float: + """Prior-uniform sphere angular recovery ceiling for B terminal bits.""" + if type(B) is not int or B<0 or type(m) is not int or m<0: + raise ValueError("invalid state bits or index count") + return min(1.0, (1<Fraction: + """Exact Pr[Binomial(m,retention)>k].""" + r=rate(retention) + if type(m) is not int or type(k) is not int or m<0 or k<0: + raise ValueError("nonnegative m,k required") + return sum((Fraction(comb(m,j))*r**j*(1-r)**(m-j) + for j in range(k+1,m+1)), Fraction()) + + +def thinning_markov_cap(m: int, retention: Fraction) -> int: + """K=ceil(6*m*r) suffices for probability of erasure overrun <=1/6.""" + r=rate(retention) + if type(m) is not int or m<0: + raise ValueError("m nonnegative") + count=6*m*r + return (count.numerator+count.denominator-1)//count.denominator + + +def control_report() -> dict: + n=4 + q=Fraction(4,5) + x,y="0110","1001" + assert deck_equal_through(x,y,2) + lx,ly=deletion_law(x,q),deletion_law(y,q) + tv=total_variation(lx,ly) + tail=retained_length_tail(n,q,2) + assert tv<=tail and tv>0 + source_laws={str(B):{} for B in (1,2,3,4,5)} + for B in (1,2,3,4,5): + for m in (0,1,2,3): + prob=optimal_terminal_success(streaming_state_laws(n,q,m,B)) + assert prob<=terminal_state_ceiling(n,B,m) + source_laws[str(B)][str(m)]=str(prob) + pair_tvs=[] + for m in (1,2,3): + observed=total_variation(product_law(lx,m),product_law(ly,m)) + assert observed<=1-(1-tv)**m + pair_tvs.append({"m":m,"tv":str(observed), + "coupling_upper":str(1-(1-tv)**m), + "pair_success_ceiling":str(hard_pair_success_ceiling(tv,m))}) + full=[{"m":m,"optimal_full_trace_success": + str(optimal_full_trace_success(n,q,m))} for m in (0,1,2)] + thinnings=[] + for offered in (1,5,10,25,50): + k=thinning_markov_cap(offered,Fraction(1,5)) + p=binomial_tail(offered,Fraction(1,5),k) + assert p<=Fraction(1,6) + thinnings.append({"offered":offered,"retained_budget":k, + "overrun_probability":str(p)}) + return { + "status":"EXACT_FINITE_CONTROL", + "source_sha256":hashlib.sha256(Path(__file__).read_bytes()).hexdigest(), + "word_length":n, + "deletion_probability":str(q), + "deck_witness":{"x":x,"y":y,"equal_through":2, + "single_trace_tv":str(tv),"length_tail":str(tail)}, + "hard_pair_over_sample_count":pair_tvs, + "best_unbounded_terminal_from_full_traces":full, + "actual_bounded_state_success":source_laws, + "thinning_overruns":thinnings, + "source_122_superpolynomial_hard_pair_reproduced":False, + "source_140_gaussian_lower_bound_reproduced":False, + "trained_neural_checkpoint_evaluated":False, + } + + +def main(argv=None)->int: + ap=argparse.ArgumentParser(description=__doc__) + ap.add_argument("--check",action="store_true") + ap.add_argument("--out",type=Path) + a=ap.parse_args(argv) + result=control_report() + if a.out: + a.out.parent.mkdir(parents=True,exist_ok=True) + a.out.write_text(json.dumps(result,sort_keys=True,indent=2)+"\n") + print(json.dumps(result,indent=2,sort_keys=True)) + return 0 + + +if __name__=="__main__": + raise SystemExit(main()) From 831724ddf61e44f1ea9b8237252e6ad1ae0bcae7 Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Fri, 13 Nov 2026 19:04:08 +0800 Subject: [PATCH 02/23] DMB-01: exhaustive exact deletion deck, state-memory and spherical cap tests --- .../test_reference.py | 133 ++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 research/deletion_memory_barrier_v1/test_reference.py diff --git a/research/deletion_memory_barrier_v1/test_reference.py b/research/deletion_memory_barrier_v1/test_reference.py new file mode 100644 index 000000000..76746dce1 --- /dev/null +++ b/research/deletion_memory_barrier_v1/test_reference.py @@ -0,0 +1,133 @@ +"""DMB-01 exact-rational regression suite; Python standard library only.""" +from __future__ import annotations +import itertools +import math +import unittest +from fractions import Fraction as Q +from reference import ( + words, deletion_law, deletion_deck, deck_equal_through, + total_variation, retained_length_tail, product_law, hard_pair, + optimal_terminal_success, streaming_state_laws, + optimal_full_trace_success, terminal_state_ceiling, + hard_pair_success_ceiling, universal_information_ceiling, + gaussian_cap_upper, gaussian_terminal_ceiling, + binomial_tail, thinning_markov_cap, control_report, +) + + +class DeletionReferenceTests(unittest.TestCase): + def test_laws_normalize_for_all_binary_words(self): + for n in range(1,6): + for x in words(n): + for q in (Q(0),Q(1,3),Q(1,2),Q(4,5),Q(1)): + law=deletion_law(x,q) + self.assertEqual(sum(law.values()),1) + self.assertEqual(sum((p for t,p in law.items() + if len(t)==0),Q()),q**n) + self.assertTrue(all(len(t)<=n and p>=0 + for t,p in law.items())) + + def test_decks_equal_up_to_two_and_not_three(self): + a,b="0110","1001" + self.assertTrue(deck_equal_through(a,b,2)) + self.assertNotEqual(deletion_deck(a,3),deletion_deck(b,3)) + self.assertFalse(deck_equal_through(a,b,3)) + + def test_deck_tail_bound_on_all_small_collisions(self): + for n in (2,3,4,5): + for x,y in itertools.combinations(words(n),2): + for k in range(n): + if deck_equal_through(x,y,k): + q=Q(4,5) + tv=total_variation(deletion_law(x,q),deletion_law(y,q)) + self.assertLessEqual(tv,retained_length_tail(n,q,k)) + + def test_single_and_product_trace_tv_coupling(self): + a,b="0110","1001" + for q in (Q(1,3),Q(1,2),Q(4,5)): + law_a,law_b=deletion_law(a,q),deletion_law(b,q) + delta=total_variation(law_a,law_b) + self.assertGreater(delta,0) + for m in range(4): + observed=total_variation(product_law(law_a,m), + product_law(law_b,m)) + self.assertLessEqual(observed,1-(1-delta)**m) + self.assertLessEqual((1+observed)/2, + hard_pair_success_ceiling(delta,m)) + + def test_hardest_pair_search_agrees_exhaustive(self): + n,q=4,Q(1,2) + found=hard_pair(n,q) + delta=Q(found["one_trace_tv"]) + brute=min(total_variation(deletion_law(x,q),deletion_law(y,q)) + for x,y in itertools.combinations(words(n),2)) + self.assertEqual(delta,brute) + + def test_all_terminal_finite_state_success_ceiling(self): + for n in (2,3,4): + for q in (Q(1,2),Q(4,5)): + for B in (1,2,3,4): + for m in (0,1,2,3): + laws=streaming_state_laws(n,q,m,B) + success=optimal_terminal_success(laws) + self.assertLessEqual(success, + terminal_state_ceiling(n,B,m)) + self.assertGreaterEqual(success,Q(1,1< Date: Fri, 13 Nov 2026 19:05:29 +0800 Subject: [PATCH 03/23] DMB-01: add compressible structured-source countercontrol to uniform entropy floor --- research/deletion_memory_barrier_v1/reference.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/research/deletion_memory_barrier_v1/reference.py b/research/deletion_memory_barrier_v1/reference.py index 2eb567a53..dbf647a50 100644 --- a/research/deletion_memory_barrier_v1/reference.py +++ b/research/deletion_memory_barrier_v1/reference.py @@ -229,6 +229,21 @@ def thinning_markov_cap(m: int, retention: Fraction) -> int: return (count.numerator+count.denominator-1)//count.denominator + + +def structured_two_word_success(n: int, m: int, deletion: Fraction) -> Fraction: + """Constructive 1-bit monitor on prior {0^n,1^n}, each prob 1/2. + + A retained 1 immediately sets terminal bit to 1; absent evidence + outputs 0. All-zero source is always correct. All-one source fails + precisely when every bit across m traces is deleted. + """ + q=rate(deletion) + if type(n) is not int or n<1 or type(m) is not int or m<0: + raise ValueError("positive n, nonnegative trace count") + return 1-Fraction(1,2)*q**(n*m) + + def control_report() -> dict: n=4 q=Fraction(4,5) @@ -271,6 +286,7 @@ def control_report() -> dict: "best_unbounded_terminal_from_full_traces":full, "actual_bounded_state_success":source_laws, "thinning_overruns":thinnings, + "structured_prior_one_bit_example_n8_m1":str(structured_two_word_success(8,1,q)), "source_122_superpolynomial_hard_pair_reproduced":False, "source_140_gaussian_lower_bound_reproduced":False, "trained_neural_checkpoint_evaluated":False, From 929eeec8dab1f57a00ae0326cedbea7fd157687d Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Fri, 13 Nov 2026 19:05:44 +0800 Subject: [PATCH 04/23] DMB-01: verify one-bit structured trace monitor avoids uniform-source bound --- research/deletion_memory_barrier_v1/test_reference.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/research/deletion_memory_barrier_v1/test_reference.py b/research/deletion_memory_barrier_v1/test_reference.py index 76746dce1..54309c256 100644 --- a/research/deletion_memory_barrier_v1/test_reference.py +++ b/research/deletion_memory_barrier_v1/test_reference.py @@ -11,7 +11,7 @@ optimal_full_trace_success, terminal_state_ceiling, hard_pair_success_ceiling, universal_information_ceiling, gaussian_cap_upper, gaussian_terminal_ceiling, - binomial_tail, thinning_markov_cap, control_report, + binomial_tail, thinning_markov_cap, structured_two_word_success, control_report, ) @@ -119,6 +119,14 @@ def test_invalid_parameters(self): with self.assertRaises(ValueError): binomial_tail(1,Q(2),0) with self.assertRaises(ValueError): retained_length_tail(4,Q(1,2),5) + def test_one_bit_monitor_recovers_compressible_prior(self): + self.assertEqual(structured_two_word_success(8,0,Q(4,5)),Q(1,2)) + self.assertEqual(structured_two_word_success(8,1,Q(4,5)), + 1-Q(1,2)*Q(4,5)**8) + self.assertGreater(structured_two_word_success(8,1,Q(4,5)),Q(9,10)) + self.assertGreater(structured_two_word_success(8,3,Q(4,5)), + structured_two_word_success(8,1,Q(4,5))) + def test_complete_fixed_receipt(self): r=control_report() self.assertEqual(r["status"],"EXACT_FINITE_CONTROL") From fcd3852a2e6aff10d190bcabbbd7141be210832a Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Fri, 13 Nov 2026 19:07:45 +0800 Subject: [PATCH 05/23] DMB-01: prove deletion-memory wedge, hard-pair trace bound and Gaussian erasure transfer --- research/deletion_memory_barrier_v1/THEORY.md | 367 ++++++++++++++++++ 1 file changed, 367 insertions(+) create mode 100644 research/deletion_memory_barrier_v1/THEORY.md diff --git a/research/deletion_memory_barrier_v1/THEORY.md b/research/deletion_memory_barrier_v1/THEORY.md new file mode 100644 index 000000000..421abb051 --- /dev/null +++ b/research/deletion_memory_barrier_v1/THEORY.md @@ -0,0 +1,367 @@ +# DMB-01: deletion channels, finite monitor memory, and precision + +Date: 2026-11-13. +Evidence: self-contained finite mathematical derivations, exact Fraction checks, +and conditional consequences of two OpenAI mathematics release statements. +No kernel proof of the external theorems or trained model evaluation is claimed. + +## 0. Source pair and status + +**#122, Quantitative trace-reconstruction bounds with a uniform decoder** +(September 24 / October 5, 2026). The source's Lean scope reports +superpolynomial lower bounds on the number of independent ordinary deletion +traces needed for exact worst-case reconstruction of a binary word at every +fixed deletion probability in (0,1), even with unrestricted computation. +It also reports single-trace hard-pair TV tending to zero faster than +every fixed inverse polynomial. Scope: +https://github.com/openai/math/blob/main/lean/docs/122.md + +**#140, Memory-sample lower bounds for noiseless Gaussian regression** +(September 27, 2026). Under a uniform unit-sphere prior and exact Gaussian +inner-product observations, a one-pass learner with at most Ad^2 persistent +bits needs c_A d log(1/epsilon) observations for 2/3 angular-recovery +success in sufficiently large d, for epsilon in (0,1/10]. Scope: +https://github.com/openai/math/blob/main/lean/docs/140.md + +The model may have unrestricted computation, but only its terminal +finite state, stopping index and independent randomness are available +at output. The statements are claims of a developing mathematics +release subject to independent review. The comparator challenge +declarations alone contain admitted theorem bodies and do not serve +as standalone proof certificates. + +Our finite experimental controls are independent of those source +claims. The new results below are small deductions or conditional +consequences, with their hypotheses written explicitly. + +## 1. Monitoring contract + +An unknown length-n binary source X produces independent ordinary +deletion traces T_1,...,T_m. Each input position is independently +deleted with probability q; retained bits are emitted in their +original order. The monitor sees complete trace words including +their lengths, and only stores a mutable B-bit state M. + +The final decoder receives M and a random seed R independent of X. +An explicitly optional stopping index tau in {0,...,m} may also +be supplied; it has a separate log2(m+1)-bit information capacity. +It receives no earlier raw trace, deletion mask, position alignment, +unmetered cache, prompt-conditioned program, or raw observation at +decoding time. If these resources exist, add them to the ledger. + +The unknown-word prior is uniform when claiming average-success +bounds. Worst-case distinguishing bounds are stated separately for +particular source words. + +## 2. DMB-1: universal terminal-state success ceiling + +For X uniform on the 2^n binary words, with any possibly randomized +streaming processing and final decoder, + +\[ +\boxed{ +P(\widehat X=X)\le \min(1,2^{B-n}). +}\tag{DMB-1a} +\] + +If the terminal decoder may also access the stop index tau, then + +\[ +\boxed{ +P(\widehat X=X)\le +\min(1,(m+1)\,2^{B-n}). +}\tag{DMB-1b} +\] + +**Proof.** Condition on all independent random coins R. For a +deterministic encoder/decoder with at most K terminal outcomes, +at most one source word per terminal outcome can be exactly decoded. +The number of correctly decoded words is at most K. Uniform X +therefore gives success at most K/2^n, and averaging over +independent coins preserves the inequality. For randomized decoder +outputs, use convexity or condition on its coins. K=2^B without +tau, or K≤(m+1)2^B with tau. QED. + +This is an information-theoretic ceiling for a uniformly random +full trace. A structured low-entropy source can be reconstructed +with far fewer bits; see the explicit repetition control below. + +## 3. DMB-2: length-deck collision and deletion TV + +For a word x and length k, let Deck_k(x)(t) count occurrences of t +as a subsequence of x, with distinct retained index sets counted +separately. At deletion probability q, the probability of complete +trace t of length k is exactly + +\[ +\boxed{ +P_q(t\mid x)=\mathrm{Deck}_k(x)(t)\, +(1-q)^k q^{n-k}.}\tag{DMB-2a} +\] + +Suppose two distinct words x,y have identical decks at every +length ≤L. Their deletion trace distributions are equal on all +outputs of length at most L. Thus + +\[ +\boxed{ +\mathrm{TV}(P_x,P_y) +\le \Pr[\mathrm{Bin}(n,1-q)>L]. +}\tag{DMB-2b} +\] + +**Proof.** Partition the trace output space by output length. +The total probability on length > L is the same for both sources, +since the retained count is Bin(n,1-q), independently of the word. +The short-length distributions cancel pointwise; TV of the two +remaining subprobability measures is at most their shared mass. +QED. + +### Exact witness + +For x=0110 and y=1001, the decks of lengths 0,1,2 agree. +Their length-3 subsequences are disjoint: + +- x yields {110, 010, 010, 011}. +- y yields {001, 101, 101, 100}. + +Their length-4 traces are also distinct. Therefore equality +holds in DMB-2b when L=2. At q=4/5 and retention 1/5, + +\[ +\boxed{\delta=\mathrm{TV}(P_x,P_y) +=\Pr[\mathrm{Bin}(4,1/5)\ge3] +=\frac{17}{625}=0.0272.}\tag{DMB-2c} +\] + +The exact-rational reference evaluates all deletion masks and +checks the equality and the underlying deck counts. + +## 4. DMB-3: hard-pair monitorability from m deleted traces + +Let x≠y be two fixed words and δ=TV(P_x,P_y). For m independent +traces, coupling each observation pair optimally and independently +gives + +\[ +\mathrm{TV}(P_x^{\otimes m},P_y^{\otimes m}) +\le 1-(1-\delta)^m.\tag{DMB-3a} +\] + +If a monitor successfully reconstructs each of x and y with +probability at least s>1/2, its output distinguishes the two +hypotheses with average probability at least s. Le Cam's +two-point testing inequality and data processing imply + +\[ +2s-1 +\le\mathrm{TV}(P_x^{\otimes m},P_y^{\otimes m}) +\le 1-(1-\delta)^m.\tag{DMB-3b} +\] + +For 0<δ<1, necessarily + +\[ +\boxed{ +m\ge +\frac{\ln(2(1-s))}{\ln(1-\delta)}. +}\tag{DMB-3c} +\] + +If δ=0, no finite number of samples achieves s>1/2 on both +words. The ceiling concerns even unrestricted storage/computation +and therefore also any finite-state monitor. + +At q=4/5, x=0110 and y=1001 have δ=17/625. For s=2/3, +\((608/625)^{14}>2/3\), so the necessary number of independent +traces is at least 15. This is a *necessary* budget for this +finite pair, not a decoder construction achieving that success. + +The #122 paper claims existence of much harder length-n pairs. +If its reported δ_n is superpolynomially small, DMB-3b directly +implies a superpolynomial necessary trace count. We do not +reproduce those asymptotic pairs in our finite tests. + +## 5. DMB-4: simultaneous observation and memory bottlenecks + +Let X be a uniform n-bit word. Write p=1-q for the retention +probability, and let all m traces be independently generated +conditional on X. The length L of a trace is independent of X +and has expectation np. Consequently + +\[ +I(X;T_j)\le I(X;T_j,L_j)\le H(T_j\mid L_j) +\le\mathbb E[L_j]=np. +\] + +Conditional independence of the traces given X and the chain +rule imply + +\[ +I(X;T_1,\ldots,T_m)\le mnp. +\] + +Data processing through a monitor with B-bit state and an +optional stop index tau gives the new two-resource bound + +\[ +\boxed{ +I(X;M,\tau\mid R)\le +\min\{B+\log_2(m+1),\ mn(1-q)\}. +}\tag{DMB-4} +\] + +Without a stop index, replace the first term with B. R denotes +public/decoder randomness independent of X; all source-dependent +communication must already be included in M,tau. + +If exact recovery succeeds with probability at least 1-e for +e in [0,1-2^{-n}], finite-alphabet Fano also requires + +\[ +\boxed{ +n-h_2(e)-e\log_2(2^n-1) +\le \min\{B+\log_2(m+1),mn(1-q)\}. +}\tag{DMB-4F} +\] + +The uniform exact-success ceiling DMB-1 is tighter for small +terminal alphabets. DMB-4F is convenient when the source is only +partially reconstructed. + +## 6. DMB-5: continuous spherical precision floor + +Consider a separate problem, Gaussian regression: an unknown +uniform unit vector θ in S^{d-1} is estimated from observations, +but only a B-bit terminal state and optional stop index are +available to the final decoder. Let epsilon be angular accuracy +in radians, 0k)≤1/6. Simulate the erased stream +using at most k genuine full Gaussian samples. Pre-generate +independent erasure flags, feed the next fresh Gaussian sample +whenever a retained opportunity occurs, and abort if >k samples +are needed. The emulator's success probability is at least +\(5/6-1/6=2/3\). + +The simulator must account for the original B-bit state and +its clock/sample counters, say \(B'=B+2\lceil\log_2(m+1)\rceil+3\) +bits. Under #140's hypotheses, if B'≤Ad², d sufficiently large, +epsilon≤1/10, and the source lower bound has constant c_A, +then its required number of Gaussian samples is at least +\(c_A d\ln(1/\epsilon)\). Therefore + +\[ +\boxed{ +m\ge\frac{c_A d\ln(1/\epsilon)-1}{6r}. +}\tag{DMB-6} +\] + +This is a **conditional corollary of #140**, with a deliberately +simple constant factor from Markov's inequality, and it remains +valid for dimension-dependent retention r under the hypotheses +above. No numerical c_A has been inferred from the paper. + +There is no assumption that deleted string traces equal erased +Gaussian rows. They are separate observation models sharing +the same finite-state resource accounting. + +## 8. Structured-source control and applications + +Uniform n-bit strings contain n independent source bits. A +highly structured source need not. If X is equally likely to +be 0^n or 1^n, a one-bit streaming monitor can set its bit +when it sees any retained 1, and otherwise output 0. Its exact +success is + +\[ +\boxed{1-\tfrac12 q^{nm}.}\tag{DMB-7} +\] + +At n=8, q=4/5, m=1, it already exceeds 0.9. This does not +contradict DMB-1 because the source is supported on two words. + +Applications: +- **Compactification Theory RC-01:** charge monitor state, + stopping-index disclosure, prompt-conditioned lookup tables + and decoder parameters, rather than comparing raw model sizes. +- **LoopedTransformers / SEM-ECHO:** apply controlled deletion + to *observable* semantic event streams. If the source is a + structured trajectory rather than uniform words, estimate its + actual prior and avoid assigning uniform-source theorems. +- **RefutationBench:** compare certificate fragments under + deletion and a fixed evidence-memory budget. Exact replay + of the original source/verification oracle is necessary. +- **StegoBench / Shaft:** bound high-entropy hidden-payload + recovery from a bounded terminal state. Distributed storage, + common model weights and generated structure count as + independent side resources and can change the bound. + +The code implements exact deletion laws, short-deck checks, +full-transcript MAP for small n, bounded-state MAP with a +deterministic transition, trace-product TV, and the elementary +Gaussian cap/erasure checks. It neither reproduces #122's +asymptotic hard-pair construction nor simulates high-dimensional +Gaussian regression training. + +An experimental prediction to test: under the same storage +budget, the fixed-state monitor's exact uniform-word success +plateaus as extra deletion traces arrive, while a decoder +retaining full traces continues improving. Deletion-deck +collisions identify cases where even unlimited memory requires +many observations. From 04532b4a16f836a301bb2f66b923f833c119e622 Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Fri, 13 Nov 2026 19:08:37 +0800 Subject: [PATCH 06/23] DMB-01: document mathematical campaign and future semantic-monitor experiment --- research/deletion_memory_barrier_v1/README.md | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 research/deletion_memory_barrier_v1/README.md diff --git a/research/deletion_memory_barrier_v1/README.md b/research/deletion_memory_barrier_v1/README.md new file mode 100644 index 000000000..e2dc1d1bd --- /dev/null +++ b/research/deletion_memory_barrier_v1/README.md @@ -0,0 +1,30 @@ +# DMB-01: deletion–memory barrier + +Research campaign launched November 13, 2026. + +Source results: [OpenAI Math #122](https://github.com/openai/math/blob/main/lean/docs/122.md), worst-case deletion trace reconstruction lower bounds, and [OpenAI Math #140](https://github.com/openai/math/blob/main/lean/docs/140.md), streaming Gaussian memory–precision lower bounds. + +[Mathematical proofs](THEORY.md) | [Exact reference](reference.py) | [Tests](test_reference.py) | [Experimental protocol](PROTOCOL.md) + +## New deductions + +DMB-1: a B-bit terminal monitor without leaked time index cannot exactly recover a uniform n-bit source with average success exceeding 2^(B-n), irrespective of trace count. + +DMB-2/DMB-3: matching short-deletion decks bound one-trace total variation and hence bound exact recovery from m iid traces, even with unrestricted memory. Witness: 0110 versus 1001, identical subsequence decks through length 2, one-trace TV=17/625 under deletion q=4/5, which forces at least 15 traces for success >=2/3 on both words. + +DMB-4: a two-resource information ceiling I(X;state,stop index|independent randomness) <= min(B+log2(m+1), m*n*(1-q)). Finite-alphabet Fano supplies the approximate-recovery corollary. + +DMB-5/DMB-6: an elementary spherical-cap precision floor and a conditional extension of source #140 to independently erased Gaussian observation opportunities. The sample bound requires at least 5/6 success before truncation and charges additional counters. Its numerical constant is inherited symbolically from #140. + +DMB-7: a two-word structured prior can be recovered by a one-bit monitor, demonstrating why prior entropy must be declared. + +## Reproduce + +From repository root, with Python 3.10+ and only the standard library: + + python -m unittest discover -s research/deletion_memory_barrier_v1 -p 'test_*.py' -v + python research/deletion_memory_barrier_v1/reference.py --check --out /tmp/dmb01.json + +All tests are exact finite controls and elementary analytic checks. No trained neural checkpoint is run; no asymptotic hard pairs or original OpenAI source proofs are reproduced. + +The research owner is Compactification Theory, with applications to RC-01, LoopedTransformers, RefutationBench and StegoBench. The source #122/#140 manuscripts are research claims under community review. From 0627881087d2f8e19f69ac59fedc0b4ecb2c831d Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Fri, 13 Nov 2026 19:08:40 +0800 Subject: [PATCH 07/23] DMB-01: document mathematical campaign and future semantic-monitor experiment --- .../deletion_memory_barrier_v1/PROTOCOL.md | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 research/deletion_memory_barrier_v1/PROTOCOL.md diff --git a/research/deletion_memory_barrier_v1/PROTOCOL.md b/research/deletion_memory_barrier_v1/PROTOCOL.md new file mode 100644 index 000000000..21e52c6d0 --- /dev/null +++ b/research/deletion_memory_barrier_v1/PROTOCOL.md @@ -0,0 +1,29 @@ +# DMB-01: prospective semantic trace monitor protocol + +The executable mathematical phase uses an explicitly uniform n-bit source and iid independent deletion traces. This protocol governs later neural and proof-trace experiments. + +## Inputs and observability contract + +Freeze each source identifier, generator revision, original event encoding, deletion probability q, retention mask distribution, and the exact output alignment metadata exposed to the monitor. The default deletion observer sees trace words and their lengths, with retained positions hidden. + +Track the monitor's B persistent bits, public clock, stopping time, cached raw traces, metadata from tools, static model/code parameters and any prompt-specific decoder lookup tables. A terminal decoder may read only the resources registered in the run. A model that can reread old prompts or inspect a complete server transcript has a broader interface. + +## Benchmark axes + +Use n={8,16,32,64} for controlled synthetic words, q={0.2,0.5,0.8}, m={1,2,4,8,16,32}, B={1,2,4,8,16,32,64} where each budget is feasible. For proof-event streams retain the native source distribution; estimate its support entropy and word correlations separately. Include uniform independent words, short-deck collision pairs, parity-constrained words, repeated words, and real source traces. + +Use the full-trace MAP estimator only on small n/m where exact enumeration is possible, with a fixed approximation budget if generalized. Compare finite-state rolling hashes, source-trained classifiers with charged code/weights, terminal recurrent memory and a full raw-trace observer. Equalize compute and total stored bits separately. Record every decodable source and every indistinguishable hard pair. + +## Falsification and statistics + +For a fixed uniform source and declared terminal state, average recovery above the DMB-1 cardinality ceiling is a bookkeeping or implementation error. For a declared worst-case hard pair, success on both sources must respect the TV coupling ceiling. If a model appears to exceed either, audit raw-trace access, stopping time and model-side caches. + +Only finite certified state spaces and exhaustively enumerated trace laws support exact claims. Sampled recovery rates require confidence intervals clustered by independent source word, with held-out generator families. Success of a structured source does not test the uniform-source ceiling. + +Neural experiments should preserve original checkpoints and frozen source hashes. Real proof traces may contain structured redundancy; uniform-source conclusions require independent justification. Side channels, oracle verification, retrieval, and dynamic querying each need separate resource entries. + +## Future trained model target + +LoopedTransformers SEM-ECHO and compactification circuit oracles can emit per-loop symbolic labels. Freeze a semantic event alphabet and sample fresh problems. Apply deletion after event extraction while preserving the original input and checkpoint, then score exact trace reconstruction and continuation decisions. Report the ability to predict the right answer without reconstructing the deleted trace as a separate endpoint. + +No trained model results are claimed by the initial DMB-01 branch. From 85b4abb599d0d90d7e2d3a6c3ce9933d378e509b Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Fri, 13 Nov 2026 19:08:56 +0800 Subject: [PATCH 08/23] DMB-01: run exact finite deletion-and-memory tests with saved receipts --- .github/workflows/dmb-01.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/dmb-01.yml diff --git a/.github/workflows/dmb-01.yml b/.github/workflows/dmb-01.yml new file mode 100644 index 000000000..ea0a117bc --- /dev/null +++ b/.github/workflows/dmb-01.yml @@ -0,0 +1,31 @@ +name: DMB-01 finite deletion and memory barrier audit +permissions: + contents: read +on: + push: + paths: + - 'research/deletion_memory_barrier_v1/**' + - '.github/workflows/dmb-01.yml' + pull_request: + paths: + - 'research/deletion_memory_barrier_v1/**' + - '.github/workflows/dmb-01.yml' + workflow_dispatch: +jobs: + exact-finite-channel: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + - name: Exact masks, deck equivalence, streaming state, cap and thinning tests + run: python -m unittest discover -s research/deletion_memory_barrier_v1 -p 'test_*.py' -v + - name: Issue complete exact finite receipt + run: python research/deletion_memory_barrier_v1/reference.py --check --out /tmp/dmb01_exact.json + - name: Upload independent finite receipt + uses: actions/upload-artifact@v4 + with: + name: dmb01-exact-control + path: /tmp/dmb01_exact.json From 36a32ab92831caeff7544dcf16a21e3d783b3bd7 Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Fri, 13 Nov 2026 19:13:44 +0800 Subject: [PATCH 09/23] DMB-01: generalize terminal memory ceiling to empirical finite source priors --- .../deletion_memory_barrier_v1/reference.py | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/research/deletion_memory_barrier_v1/reference.py b/research/deletion_memory_barrier_v1/reference.py index dbf647a50..0ef02a299 100644 --- a/research/deletion_memory_barrier_v1/reference.py +++ b/research/deletion_memory_barrier_v1/reference.py @@ -231,6 +231,35 @@ def thinning_markov_cap(m: int, retention: Fraction) -> int: + + +def finite_prior_ceiling(prior: dict[str, Fraction], B: int, + m: int=0, clock: bool=False) -> Fraction: + """Largest K=2^B (possibly indexed) prior atoms bound exact decoding.""" + if (not prior or type(B) is not int or B<0 or + type(m) is not int or m<0 or + any(Fraction(v)<0 for v in prior.values())): + raise ValueError("normalized nonnegative source prior and valid bits") + weights=[Fraction(v) for v in prior.values()] + if sum(weights)!=1: + raise ValueError("prior must sum to one") + slots=(1< Fraction: + """Exact Bayes success for any declared discrete prior and final states.""" + if not laws or set(laws)!=set(prior): + raise ValueError("states/prior supports differ") + weights={x:Fraction(v) for x,v in prior.items()} + if sum(weights.values())!=1 or any(v<0 for v in weights.values()): + raise ValueError("prior must be normalized") + states=set().union(*(set(v) for v in laws.values())) + return sum((max(weights[x]*laws[x].get(s,Fraction()) + for x in laws) for s in states),Fraction()) + + def structured_two_word_success(n: int, m: int, deletion: Fraction) -> Fraction: """Constructive 1-bit monitor on prior {0^n,1^n}, each prob 1/2. From cc9bacacfb448ab1e2be2348f8c591b626875d21 Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Fri, 13 Nov 2026 19:15:04 +0800 Subject: [PATCH 10/23] DMB-01: add exact bounded monitor over declared structured binary source supports --- .../deletion_memory_barrier_v1/reference.py | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/research/deletion_memory_barrier_v1/reference.py b/research/deletion_memory_barrier_v1/reference.py index 0ef02a299..cf14eedbc 100644 --- a/research/deletion_memory_barrier_v1/reference.py +++ b/research/deletion_memory_barrier_v1/reference.py @@ -143,6 +143,40 @@ def streaming_state_laws(n: int, deletion: Fraction, count: int, return out + + +def streaming_laws_for_words(source_words, deletion: Fraction, count: int, + memory_bits: int) -> dict[str,dict[int,Fraction]]: + """B-bit monitoring only over a declared empirical source support. + + The source support is explicitly a separate experimental input. + """ + group=list(dict.fromkeys(source_words)) + if not group or any(not isinstance(x,str) or not x or + any(c not in "01" for c in x) for x in group): + raise ValueError("nonempty finite binary source support required") + if len(set(map(len,group)))!=1 or len(group[0])>12: + raise ValueError("fixed word size <=12") + if type(count) is not int or not 0<=count<=8: + raise ValueError("count=0..8 required") + if type(memory_bits) is not int or not 1<=memory_bits<=12: + raise ValueError("memory_bits=1..12 required") + out={} + for x in group: + channel=deletion_law(x,deletion) + states={0:Fraction(1)} + for _ in range(count): + next_states=defaultdict(Fraction) + for s,weight in states.items(): + for trace,prob in channel.items(): + next_states[update_state(s,trace,memory_bits)] += weight*prob + states=dict(next_states) + if sum(states.values())!=1: + raise AssertionError("lost probability in empirical monitor") + out[x]=states + return out + + def optimal_terminal_success(laws: dict[str,dict[int,Fraction]]) -> Fraction: """MAP success for uniform input X from ONLY the final state.""" if not laws: From fa9fd38a76eb5ad00063f4adccccba1179c81641 Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Fri, 13 Nov 2026 19:15:28 +0800 Subject: [PATCH 11/23] DMB-01: prove sharp finite-prior monitor memory capacity ceiling --- research/deletion_memory_barrier_v1/THEORY.md | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/research/deletion_memory_barrier_v1/THEORY.md b/research/deletion_memory_barrier_v1/THEORY.md index 421abb051..2a35820e9 100644 --- a/research/deletion_memory_barrier_v1/THEORY.md +++ b/research/deletion_memory_barrier_v1/THEORY.md @@ -365,3 +365,47 @@ plateaus as extra deletion traces arrive, while a decoder retaining full traces continues improving. Deletion-deck collisions identify cases where even unlimited memory requires many observations. + + +## 9. DMB-8: optimal terminal-cardinality bound for structured priors + +Let X range over a finite source support +\(\{x_1,\ldots,x_K\}\) with probabilities +\(\pi_1\ge\pi_2\ge\cdots\ge\pi_K>0\). +The decoder is permitted a terminal alphabet of at most S values, +and independent public randomness. Then + +\[ +\boxed{ +P(\widehat X=X)\le +\sum_{j=1}^{\min(S,K)}\pi_j. +}\tag{DMB-8} +\] + +**Proof.** Condition on all independent decoder randomness so +the final decoder is a function from the S terminal messages +to source words. Its range contains at most S distinct words. +On any word outside that range, exact recovery is impossible. +For words inside, each conditional correct-reconstruction +probability is at most one. Their total prior probability is +at most the sum of the S largest atoms. Average over decoder +randomness. A randomized monitor changes the conditional +success probabilities but cannot enlarge the decoder's range. +QED. + +This recovers DMB-1 when the support has K=2^n equal atoms. +For an empirical prior with repeated structured traces, +DMB-8 is the appropriate ceiling; its effective ceiling +depends on the *largest source probabilities*, not on the +literal length of the binary trace. + +The finite empirical study in DMB-01B uses ranked candidate +symbols from an existing source-locked 1,000-parameter RRC-25 +GRU. Each symbol is a four-bit candidate ID; two top-ranked +candidates yield an eight-bit monitoring word. The source +distribution is the empirical distribution of the source-generated +words across a frozen set of held-out RRC-25 cases. This is +an *output-ranking diagnostic* from a learned model and not +a measurement of its hidden chain of thought. Exact deletion +laws and bounded-state reconstruction are compared to the +prior-mass ceiling on that finite dataset. From 67f6e8cb1f7a7d95363d71afdafb50491cc67643 Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Fri, 13 Nov 2026 19:16:21 +0800 Subject: [PATCH 12/23] DMB-01B: preregister trained RRC25 ranked-output deletion channel and B-bit monitor --- .../PROTOCOL_RRC25.md | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 research/deletion_memory_barrier_v1/PROTOCOL_RRC25.md diff --git a/research/deletion_memory_barrier_v1/PROTOCOL_RRC25.md b/research/deletion_memory_barrier_v1/PROTOCOL_RRC25.md new file mode 100644 index 000000000..b059121d7 --- /dev/null +++ b/research/deletion_memory_barrier_v1/PROTOCOL_RRC25.md @@ -0,0 +1,74 @@ +# DMB-01B: frozen trained RRC-25 ranking-trace monitor + +**Registration date:** 2026-11-13, before the DMB-01B model run. +**Status:** retrospective diagnostic on existing weights and constructed +deletion observations; no new model training. + +## Model and source + +Source code and committed JSON checkpoint from +research/rrc_compactification: +RRC-25's 1,000-parameter recurrent GRU template ranker. +Use the original bench25.checkpoints() validation of source SHA256, +training-step count, model type, shape and weight-file digest. + +Generate the original deterministic RRC-25 source roster with +train_per=1, dev_per=1 and test_per=6. Restrict the study to the +six original test families (signed, sparse, product, rational, +squared, late_source). At inference scan public candidate headers +using compound25.possible_headers. Choose the first valid header +deterministically, independent of true hidden program suffix. + +For each case compute model25.logits(case,header,checkpoint), sort +sixteen logits descending (tie-break by class ID), and take the two +top-ranked 4-bit class IDs. Concatenate these IDs into one 8-bit +word. The word encodes a **trained model's ranker output**, not +its neural hidden state or a claimed chain-of-thought transcript. + +The study treats the resulting multiset of 36 output words as a +finite empirical prior. Repeated words carry their multiplicity. +No source ground-truth future enters the ranker input; mutation +of case.future must leave the ranking unchanged. + +## Monitoring intervention + +For each word, independently delete each bit with q=1/2 or q=4/5. +The monitor sees only retained word bits in their original order +with the resulting output length. Position masks remain hidden. +Run m in {0,1,2,3} independent deletion traces. + +Compare fixed deterministic monitor updates with B in {2,4,6} +bits, using the exact transition modulo 2^B defined in +reference.update_state. The monitor is not trained; the ideal +terminal decoder is a Bayes MAP lookup derived from the declared +finite prior. Charge its static lookup separately from the B +mutable bits. + +Primary analytic control: DMB-8 top-2^B prior mass ceiling. +Secondary oracle: unrestricted full one-trace Bayes success from +the exact deletion laws. Also record the prior's Shannon entropy, +distinct word count, weighted source label counts, and all +exact rational finite-state reconstruction probabilities. + +The original checkpoint has weights learned on other cases. +The prior and decoder table are defined retrospectively by +the selected source-generated ranker outputs. This is a finite +in-sample population diagnostic with no claim about deployment +generalization. + +## Reproducibility + +Run the trained checkpoint gate and exact monitor calculations: + + python research/deletion_memory_barrier_v1/bench_rrc25_deletion.py --out /tmp/dmb01b_ranker.json + +No CUDA, torch, network requests or optimizer required. The +portable RRC-25 inference uses the source's existing Python model +and original JSON checkpoint. The report includes all original +case identifiers, class-pair words, source hashes and monitor +success fractions. + +Interpretation distinguishes source support entropy from the +eight-bit literal word length. No claim about the source #122 +asymptotic pair or the #140 Gaussian observation experiment +follows from this small trained-ranker diagnostic. From 36e030c63c61a5b49bc0ceca4cc5c2b44ccab6af Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Fri, 13 Nov 2026 19:17:25 +0800 Subject: [PATCH 13/23] DMB-01B: source-lock RRC25 trained rankings and measure exact deletion memory frontier --- .../bench_rrc25_deletion.py | 186 ++++++++++++++++++ 1 file changed, 186 insertions(+) create mode 100644 research/deletion_memory_barrier_v1/bench_rrc25_deletion.py diff --git a/research/deletion_memory_barrier_v1/bench_rrc25_deletion.py b/research/deletion_memory_barrier_v1/bench_rrc25_deletion.py new file mode 100644 index 000000000..75f85fa8e --- /dev/null +++ b/research/deletion_memory_barrier_v1/bench_rrc25_deletion.py @@ -0,0 +1,186 @@ +"""DMB-01B: exact deletion monitor for RRC25's source-locked trained ranker. + +Each generated case maps to its two top-ranked candidate class IDs (8 bits). +A B-bit deterministic streaming monitor observes iid deletion traces of +that word. The best *terminal decoder for the finite empirical prior* is +computed exactly using Fraction. Original RRC25 model weights are fixed. + +The 8-bit diagnostic is a ranking output, NOT hidden chain of thought. +""" +from __future__ import annotations + +import argparse +import hashlib +import json +import math +import sys +from collections import Counter +from fractions import Fraction +from pathlib import Path + +ROOT=Path(__file__).resolve().parents[2] +if str(ROOT) not in sys.path: + sys.path.insert(0,str(ROOT)) + +from research.rrc_compactification import bench25 as source_gate +from research.rrc_compactification import compound25 as task +from research.rrc_compactification import model25 as model +from research.deletion_memory_barrier_v1.reference import ( + deletion_law, finite_prior_ceiling, optimal_terminal_success_weighted, + streaming_laws_for_words, +) + +STATUS="FROZEN_TRAINED_RRC25_RANKING_DELETION_DIAGNOSTIC" +SCHEMA="dmb01b.rrc25_ranker_deletion.v1" +DELETIONS=(Fraction(1,2),Fraction(4,5)) +COUNTS=(0,1,2,3) +BITS=(2,4,6) + + +def ranked_word(case, checkpoint:dict)->dict: + heads=task.possible_headers(case) + if not heads: + raise RuntimeError("public header scan has no candidates") + selected=heads[0] + scores=model.logits(case,selected,checkpoint) + if len(scores)!=16 or not all(math.isfinite(x) for x in scores): + raise RuntimeError("native RRC25 head invalid") + ranked=sorted(range(16),key=lambda j:(-scores[j],j)) + classes=ranked[:2] + word="".join(f"{v:04b}" for v in classes) + if len(word)!=8: + raise AssertionError("two source classes must encode exactly eight bits") + return {"case_id":case.identifier,"family":case.family, + "public_candidate_headers":len(heads), + "ranked_class_ids":classes,"ranked_trace_word":word} + + +def empirical_prior(records:list[dict])->dict[str,Fraction]: + if not records: + raise ValueError("empty source roster") + counts=Counter(x["ranked_trace_word"] for x in records) + return {w:Fraction(count,len(records)) for w,count in sorted(counts.items())} + + +def full_one_trace_success(prior:dict[str,Fraction],q:Fraction)->Fraction: + laws={word:deletion_law(word,q) for word in prior} + observations=set().union(*(set(d) for d in laws.values())) + return sum((max(prior[x]*laws[x].get(t,Fraction()) + for x in prior) for t in observations),Fraction()) + + +def one_prior_report(prior:dict[str,Fraction],q:Fraction, + counts=COUNTS,bits=BITS)->dict: + if not counts or not bits or any(m<0 for m in counts) or any(b<1 for b in bits): + raise ValueError("invalid monitoring grid") + rows=[] + base=max(prior.values()) + for m in counts: + for B in bits: + laws=streaming_laws_for_words(prior,q,m,B) + value=optimal_terminal_success_weighted(laws,prior) + limit=finite_prior_ceiling(prior,B) + if not base<=value<=limit: + raise AssertionError("monitor prior ceiling violated") + rows.append({"m":m,"B":B,"success":str(value), + "success_float":float(value), + "prior_topK_ceiling":str(limit), + "prior_topK_ceiling_float":float(limit), + "terminal_state_alphabet":1< float(unrestricted)+1e-12 + for row in rows if row["m"]==1): + raise AssertionError("B-bit state beats full one-trace observation") + return {"deletion_q":str(q),"full_one_trace_MAP_success":str(unrestricted), + "one_trace_MAP_float":float(unrestricted),"monitor_grid":rows} + + +def run(test_per:int=6,deletions=DELETIONS,counts=COUNTS,bits=BITS)->dict: + if type(test_per) is not int or not 1<=test_per<=16: + raise ValueError("test_per must be 1..16") + if len(set(deletions))!=len(deletions): + raise ValueError("duplicate deletion rate") + trained,digests=source_gate.checkpoints() + checkpoint=trained["recurrent"] + if checkpoint["kind"]!="recurrent" or checkpoint["parameters"]!=1000: + raise AssertionError("source recurrent checkpoint contract changed") + roster=task.roster(include_test=True,train_per=1,dev_per=1,test_per=test_per) + cases=[x for fam in task.TEST_FAMILIES for x in roster[fam]] + if len(cases)!=len(task.TEST_FAMILIES)*test_per: + raise AssertionError("unexpected original source cohort size") + records=[ranked_word(case,checkpoint) for case in cases] + prior=empirical_prior(records) + if sum(prior.values())!=1: + raise AssertionError("empirical prior normalization failed") + entropy=-sum(float(v)*math.log2(float(v)) for v in prior.values()) + metrics=[one_prior_report(prior,Fraction(q),counts,bits) for q in deletions] + return { + "status":STATUS, + "schema":SCHEMA, + "original_model":"RRC25 trained recurrent GRU template ranker", + "checkpoint_sha256":digests["recurrent"], + "source_model_hashes":checkpoint["source_sha256"], + "model_parameters":checkpoint["parameters"], + "source_roster_sha256":task.fingerprint(cases), + "source_script_sha256":hashlib.sha256(Path(__file__).read_bytes()).hexdigest(), + "test_per_family":test_per, + "source_cases":len(records), + "observed_symbol_count":2, + "native_ranked_candidate_bits":8, + "source_prior_support":len(prior), + "source_prior_shannon_entropy_bits":entropy, + "ranked_source_word_probabilities":{w:str(p) for w,p in prior.items()}, + "source_case_records":records, + "native_model_rankings_not_hidden_cot":True, + "ranker_trained_on_dmb01_data":False, + "posterior_table_from_same_finite_prior":True, + "dmb01_monitor_codebook_description_bits_nominal": + len(prior)*8, + "counts":list(counts), + "memory_bit_budgets":list(bits), + "results":metrics, + "deletion_mask_positions_revealed":False, + "trained_weights_updated":False, + "external_theorem_122_140_reproduced":False, + } + + +def main(argv=None)->int: + p=argparse.ArgumentParser(description=__doc__) + p.add_argument("--test-per",type=int,default=6) + p.add_argument("--deletions",type=Fraction,nargs="+", + default=list(DELETIONS)) + p.add_argument("--counts",type=int,nargs="+",default=list(COUNTS)) + p.add_argument("--bits",type=int,nargs="+",default=list(BITS)) + p.add_argument("--out",type=Path) + args=p.parse_args(argv) + result=run(args.test_per,tuple(args.deletions), + tuple(args.counts),tuple(args.bits)) + if args.out: + args.out.parent.mkdir(parents=True,exist_ok=True) + args.out.write_text(json.dumps(result,sort_keys=True,indent=2, + allow_nan=False)+"\n") + compact=[] + for q in result["results"]: + compact.append({ + "q":q["deletion_q"], + "full_one_trace_MAP":q["one_trace_MAP_float"], + "monitor":[{"m":x["m"],"B":x["B"], + "success":round(x["success_float"],6), + "upper":round(x["prior_topK_ceiling_float"],6)} + for x in q["monitor_grid"] if + x["m"] in (0,1,3) and x["B"] in (2,4,6)] + }) + print(json.dumps({ + "status":result["status"], + "checkpoint_sha256":result["checkpoint_sha256"], + "cases":result["source_cases"], + "distinct_source_words":result["source_prior_support"], + "prior_entropy_bits":result["source_prior_shannon_entropy_bits"], + "results":compact},indent=2)) + return 0 + + +if __name__=="__main__": + raise SystemExit(main()) From 1bdc8e57ce2f1de454e27153da88bc014c945433 Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Fri, 13 Nov 2026 19:18:07 +0800 Subject: [PATCH 14/23] DMB-01B: verify trained ranker provenance, future-label isolation and prior bounds --- .../test_rrc25_deletion.py | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 research/deletion_memory_barrier_v1/test_rrc25_deletion.py diff --git a/research/deletion_memory_barrier_v1/test_rrc25_deletion.py b/research/deletion_memory_barrier_v1/test_rrc25_deletion.py new file mode 100644 index 000000000..0d7134630 --- /dev/null +++ b/research/deletion_memory_barrier_v1/test_rrc25_deletion.py @@ -0,0 +1,97 @@ +"""DMB-01B source-locked learned ranker diagnostic tests.""" +from __future__ import annotations +import math +import random +import unittest +from dataclasses import replace +from fractions import Fraction as Q + +from bench_rrc25_deletion import ( + STATUS, empirical_prior, full_one_trace_success, + one_prior_report, ranked_word, run, +) +from reference import ( + finite_prior_ceiling, optimal_terminal_success_weighted, + streaming_laws_for_words, words, +) +from research.rrc_compactification import bench25, compound25 + + +class StructuredSourceBounds(unittest.TestCase): + def test_nonuniform_terminal_prior_topK_bound(self): + prior={"0000":Q(3,5),"1111":Q(1,5), + "1100":Q(1,10),"0011":Q(1,10)} + self.assertEqual(finite_prior_ceiling(prior,0),Q(3,5)) + self.assertEqual(finite_prior_ceiling(prior,1),Q(4,5)) + self.assertEqual(finite_prior_ceiling(prior,2),Q(1)) + self.assertEqual(finite_prior_ceiling(prior,0,1,clock=True),Q(4,5)) + with self.assertRaises(ValueError): + finite_prior_ceiling({"0":Q(1,3)},1) + + def test_weighted_bayes_terminal_state_respects_prior(self): + prior={"00":Q(3,5),"11":Q(1,4),"01":Q(3,20)} + for q in (Q(1,2),Q(4,5)): + for m in range(4): + for B in (1,2): + laws=streaming_laws_for_words(prior,q,m,B) + success=optimal_terminal_success_weighted(laws,prior) + self.assertGreaterEqual(success,Q(3,5)) + self.assertLessEqual(success,finite_prior_ceiling(prior,B)) + self.assertEqual(full_one_trace_success(prior,Q(1)),Q(3,5)) + + def test_empirical_multiplicities_preserved(self): + records=[{"ranked_trace_word":"10101010"}]*3 + [ + {"ranked_trace_word":"00001111"}] + prior=empirical_prior(records) + self.assertEqual(prior,{"00001111":Q(1,4),"10101010":Q(3,4)}) + self.assertEqual(finite_prior_ceiling(prior,0),Q(3,4)) + + +class TrainedRankerSourceAudit(unittest.TestCase): + @classmethod + def setUpClass(cls): + checkpoints,hashes=bench25.checkpoints() + cls.checkpoint=checkpoints["recurrent"] + cls.hash=hashes["recurrent"] + cls.case=compound25.make_case(random.Random(940200),"signed", + "dmb01b-source-lock") + + def test_original_checkpoint_source_hashes(self): + self.assertEqual(self.checkpoint["kind"],"recurrent") + self.assertEqual(self.checkpoint["parameters"],1000) + self.assertEqual(len(self.hash),64) + + def test_ranker_output_independent_of_hidden_future(self): + original=ranked_word(self.case,self.checkpoint) + mutated=replace(self.case,future=tuple( + ((i%3)-1)*10**8 for i in range(len(self.case.future)))) + altered=ranked_word(mutated,self.checkpoint) + self.assertEqual(original,altered) + self.assertEqual(len(original["ranked_trace_word"]),8) + self.assertEqual(len(set(original["ranked_class_ids"])),2) + + def test_small_source_locked_monitor_run(self): + report=run(test_per=1,deletions=(Q(1,2),), + counts=(0,1,2),bits=(2,4)) + self.assertEqual(report["status"],STATUS) + self.assertEqual(report["checkpoint_sha256"],self.hash) + self.assertEqual(report["model_parameters"],1000) + self.assertEqual(report["source_cases"],6) + self.assertLessEqual(report["source_prior_support"],6) + self.assertTrue(report["native_model_rankings_not_hidden_cot"]) + self.assertTrue(report["posterior_table_from_same_finite_prior"]) + self.assertFalse(report["external_theorem_122_140_reproduced"]) + for row in report["results"][0]["monitor_grid"]: + self.assertLessEqual(Q(row["success"]), + Q(row["prior_topK_ceiling"])) + self.assertTrue(math.isfinite(report["source_prior_shannon_entropy_bits"])) + + def test_reject_invalid_case_grid(self): + with self.assertRaises(ValueError): + run(test_per=0) + with self.assertRaises(ValueError): + one_prior_report({"00":Q(1)},Q(1,2),counts=(-1,),bits=(1,)) + + +if __name__=="__main__": + unittest.main() From 0018c436c63f7ac06575e91ab068994a1e60e455 Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Fri, 13 Nov 2026 19:18:30 +0800 Subject: [PATCH 15/23] DMB-01B: add independent trained RRC25 ranking-monitor CI job and receipt --- .github/workflows/dmb-01.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dmb-01.yml b/.github/workflows/dmb-01.yml index ea0a117bc..357e19614 100644 --- a/.github/workflows/dmb-01.yml +++ b/.github/workflows/dmb-01.yml @@ -21,7 +21,7 @@ jobs: with: python-version: '3.12' - name: Exact masks, deck equivalence, streaming state, cap and thinning tests - run: python -m unittest discover -s research/deletion_memory_barrier_v1 -p 'test_*.py' -v + run: python -m unittest discover -s research/deletion_memory_barrier_v1 -p 'test_reference.py' -v - name: Issue complete exact finite receipt run: python research/deletion_memory_barrier_v1/reference.py --check --out /tmp/dmb01_exact.json - name: Upload independent finite receipt @@ -29,3 +29,20 @@ jobs: with: name: dmb01-exact-control path: /tmp/dmb01_exact.json + trained-rrc25-trace-monitor: + runs-on: ubuntu-latest + timeout-minutes: 25 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + - name: Verify frozen RRC25 ranking-source and structured finite prior + run: python -m unittest discover -s research/deletion_memory_barrier_v1 -p 'test_rrc25_deletion.py' -v + - name: Execute source-locked exact deletion-memory frontier + run: python research/deletion_memory_barrier_v1/bench_rrc25_deletion.py --test-per 6 --deletions 1/2 4/5 --counts 0 1 2 3 --bits 2 4 6 --out /tmp/dmb01b_rrc25_monitor.json + - name: Upload trained ranker diagnostic + uses: actions/upload-artifact@v4 + with: + name: dmb01b-rrc25-ranking-monitor + path: /tmp/dmb01b_rrc25_monitor.json From d917148cf9fe4337a115ef92a68f0d73db8d200c Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Fri, 13 Nov 2026 19:20:19 +0800 Subject: [PATCH 16/23] DMB-01: add protected-first-evidence finite-state monitor with exact law --- .../deletion_memory_barrier_v1/reference.py | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/research/deletion_memory_barrier_v1/reference.py b/research/deletion_memory_barrier_v1/reference.py index cf14eedbc..3a8ec3837 100644 --- a/research/deletion_memory_barrier_v1/reference.py +++ b/research/deletion_memory_barrier_v1/reference.py @@ -267,6 +267,48 @@ def thinning_markov_cap(m: int, retention: Fraction) -> int: + + +def guarded_first_nonempty_laws(source_words, deletion: Fraction, count: int, + memory_bits: int) -> dict[str,dict[int,Fraction]]: + """Protect first nonempty trace in state 1..2^B-1, with 0=unknown. + + State 0 persists across empty traces. Once nonzero, no more + observations can overwrite the captured evidence. + """ + group=list(dict.fromkeys(source_words)) + if not group or len(set(map(len,group)))!=1 or any( + not isinstance(x,str) or not x or any(c not in "01" for c in x) + for x in group): + raise ValueError("uniform-length binary source words required") + q=rate(deletion) + if type(memory_bits) is not int or not 1<=memory_bits<=12: + raise ValueError("1..12 memory bits required") + if type(count) is not int or not 0<=count<=100000: + raise ValueError("invalid trace count") + length=len(group[0]) + empty_one=q**length + unknown_probability=empty_one**count + out={} + for word in group: + single=deletion_law(word,q) + accum=defaultdict(Fraction) + if empty_one!=1: + for trace,prob in single.items(): + if trace: + state=1+(trace_code(trace)%(2**memory_bits-1)) + accum[state]+=prob/(1-empty_one) + if sum(accum.values())!=1: + raise AssertionError("conditional nonempty trace law invalid") + law={0:unknown_probability} + for state,p in accum.items(): + law[state]=(1-unknown_probability)*p + if sum(law.values())!=1: + raise AssertionError("guarded monitor law did not normalize") + out[word]=law + return out + + def finite_prior_ceiling(prior: dict[str, Fraction], B: int, m: int=0, clock: bool=False) -> Fraction: """Largest K=2^B (possibly indexed) prior atoms bound exact decoding.""" From 609a58a8a46a21911973624246208f2e06250f6d Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Fri, 13 Nov 2026 19:20:54 +0800 Subject: [PATCH 17/23] DMB-01: certify guarded monitor exact law and monotone information retention --- .../test_reference.py | 41 ++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/research/deletion_memory_barrier_v1/test_reference.py b/research/deletion_memory_barrier_v1/test_reference.py index 54309c256..c936779d3 100644 --- a/research/deletion_memory_barrier_v1/test_reference.py +++ b/research/deletion_memory_barrier_v1/test_reference.py @@ -11,7 +11,9 @@ optimal_full_trace_success, terminal_state_ceiling, hard_pair_success_ceiling, universal_information_ceiling, gaussian_cap_upper, gaussian_terminal_ceiling, - binomial_tail, thinning_markov_cap, structured_two_word_success, control_report, + binomial_tail, thinning_markov_cap, structured_two_word_success, + guarded_first_nonempty_laws, finite_prior_ceiling, + optimal_terminal_success_weighted, trace_code, control_report, ) @@ -127,6 +129,43 @@ def test_one_bit_monitor_recovers_compressible_prior(self): self.assertGreater(structured_two_word_success(8,3,Q(4,5)), structured_two_word_success(8,1,Q(4,5))) + def test_guarded_first_nonempty_monitor_law_exact(self): + from collections import defaultdict + x="0110" + B=3 + for q in (Q(0),Q(1,2),Q(4,5),Q(1)): + trace_law=deletion_law(x,q) + state={0:Q(1)} + for m in range(4): + closed=guarded_first_nonempty_laws([x],q,m,B)[x] + self.assertEqual(closed,state) + updated=defaultdict(Q) + for s,sp in state.items(): + for trace,p in trace_law.items(): + dest=(1+(trace_code(trace)%(2**B-1)) + if s==0 and trace else s) + updated[dest]+=sp*p + state=dict(updated) + + def test_guarded_success_monotone_with_exponential_plateau(self): + prior={"0110":Q(1,2),"1001":Q(1,4), + "0000":Q(1,8),"1111":Q(1,8)} + for q in (Q(1,2),Q(4,5)): + for B in (2,3,4): + values=[] + for m in range(7): + laws=guarded_first_nonempty_laws(prior,q,m,B) + value=optimal_terminal_success_weighted(laws,prior) + self.assertLessEqual(value,finite_prior_ceiling(prior,B)) + values.append(value) + self.assertEqual(values[0],max(prior.values())) + self.assertTrue(all(a<=b for a,b in zip(values,values[1:]))) + e=q**4 + if e<1: + plateau=(values[1]-e*values[0])/(1-e) + for m,val in enumerate(values): + self.assertEqual(val,e**m*values[0]+(1-e**m)*plateau) + def test_complete_fixed_receipt(self): r=control_report() self.assertEqual(r["status"],"EXACT_FINITE_CONTROL") From ec73a1c0808057bb6104f202adde37619563bd7c Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Fri, 13 Nov 2026 19:21:25 +0800 Subject: [PATCH 18/23] DMB-01B: compare rolling and protected-evidence monitors on trained RRC25 rankings --- .../bench_rrc25_deletion.py | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/research/deletion_memory_barrier_v1/bench_rrc25_deletion.py b/research/deletion_memory_barrier_v1/bench_rrc25_deletion.py index 75f85fa8e..6c3a219ab 100644 --- a/research/deletion_memory_barrier_v1/bench_rrc25_deletion.py +++ b/research/deletion_memory_barrier_v1/bench_rrc25_deletion.py @@ -27,7 +27,7 @@ from research.rrc_compactification import model25 as model from research.deletion_memory_barrier_v1.reference import ( deletion_law, finite_prior_ceiling, optimal_terminal_success_weighted, - streaming_laws_for_words, + streaming_laws_for_words, guarded_first_nonempty_laws, ) STATUS="FROZEN_TRAINED_RRC25_RANKING_DELETION_DIAGNOSTIC" @@ -77,17 +77,22 @@ def one_prior_report(prior:dict[str,Fraction],q:Fraction, base=max(prior.values()) for m in counts: for B in bits: - laws=streaming_laws_for_words(prior,q,m,B) - value=optimal_terminal_success_weighted(laws,prior) limit=finite_prior_ceiling(prior,B) - if not base<=value<=limit: - raise AssertionError("monitor prior ceiling violated") - rows.append({"m":m,"B":B,"success":str(value), - "success_float":float(value), - "prior_topK_ceiling":str(limit), - "prior_topK_ceiling_float":float(limit), - "terminal_state_alphabet":1< float(unrestricted)+1e-12 for row in rows if row["m"]==1): @@ -166,7 +171,7 @@ def main(argv=None)->int: compact.append({ "q":q["deletion_q"], "full_one_trace_MAP":q["one_trace_MAP_float"], - "monitor":[{"m":x["m"],"B":x["B"], + "monitor":[{"m":x["m"],"B":x["B"],"method":x["method"], "success":round(x["success_float"],6), "upper":round(x["prior_topK_ceiling_float"],6)} for x in q["monitor_grid"] if From f27b98611964c9d7af2eff04171d77900a481ef4 Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Fri, 13 Nov 2026 19:21:51 +0800 Subject: [PATCH 19/23] DMB-01: derive protected-evidence monitor monotonicity and exact recovery plateau --- research/deletion_memory_barrier_v1/THEORY.md | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/research/deletion_memory_barrier_v1/THEORY.md b/research/deletion_memory_barrier_v1/THEORY.md index 2a35820e9..8a542c88b 100644 --- a/research/deletion_memory_barrier_v1/THEORY.md +++ b/research/deletion_memory_barrier_v1/THEORY.md @@ -409,3 +409,61 @@ an *output-ranking diagnostic* from a learned model and not a measurement of its hidden chain of thought. Exact deletion laws and bounded-state reconstruction are compared to the prior-mass ceiling on that finite dataset. + + +## 10. DMB-9: Protected first evidence has monotone recovery + +A common finite-state implementation risk is overwriting useful +evidence with later low-information observations. The deterministic +rolling monitor in the reference uses the update +\(s\mapsto (3s+\mathrm{code}(t)+1)\bmod2^B\). +Its Bayes-recovery accuracy need not be monotone in the number +of traces because the terminal state can forget earlier evidence. + +Define a guarded monitor with states \(\{0,\ldots,2^B-1\}\). +State zero means no nonempty trace has yet been seen. On the +first nonempty deletion trace t, map it through any fixed +hash \(g(t)\in\{1,\ldots,2^B-1\}\); keep that nonzero state +unchanged thereafter. A static MAP decoder uses a declared +prior over the source words. The hash, decoder table and +their description lengths are charged outside mutable state. + +Let \(e=q^n\), the probability that a single trace is empty. +This is independent of the source word, for all length-n +source words. Let \(\pi_\star=\max_x\pi(x)\), and define \(A_g\) +as the optimal MAP success from the protected hash of a +single trace conditioned on that trace being nonempty. + +For m independent deletion traces, + +\[ +\boxed{ +P_{\mathrm{guarded}}(m) +=e^m\pi_\star+(1-e^m)A_g. +}\tag{DMB-9} +\] + +**Proof.** The event that all m traces are empty has probability +\(e^m\) for every source. In that event, the terminal state is +zero and the best decoder succeeds with prior mass \(\pi_\star\). +Otherwise, the first nonempty trace has precisely the +single-trace distribution conditional on nonemptiness, because +the independent geometric waiting time factors out. The +terminal nonzero state thus yields MAP success \(A_g\), +independent of m. Multiply by the two event probabilities. +Since the decoder could ignore the hash and always guess +the most likely word, \(A_g\ge\pi_\star\). Consequently +\(P_{\mathrm{guarded}}(m)\) is nondecreasing in m and converges +to \(A_g\). QED. + +At q=1 all traces are empty and success stays at +\(\pi_\star\). With q<1, the gap to the plateau decays +exactly as \(q^{nm}\). The finite Fraction implementation +checks the explicit streaming-state Markov chain against this +formula and compares it to the overwriting rolling hash. + +This theorem provides a concrete experiment for a monitor +that protects earlier evidence. It proves monotonicity for +this particular update grammar and fixed source prior. +A stateful neural monitor or another hash transition can +have different behavior and must be evaluated independently. From 0e859cc600904b87117cd996c6ae579e87e9cfe0 Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Fri, 13 Nov 2026 19:22:11 +0800 Subject: [PATCH 20/23] DMB-01: index trained RRC25 structured-prior monitor pilot and guarded theorem --- research/deletion_memory_barrier_v1/README.md | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/research/deletion_memory_barrier_v1/README.md b/research/deletion_memory_barrier_v1/README.md index e2dc1d1bd..abf1b2d90 100644 --- a/research/deletion_memory_barrier_v1/README.md +++ b/research/deletion_memory_barrier_v1/README.md @@ -28,3 +28,30 @@ From repository root, with Python 3.10+ and only the standard library: All tests are exact finite controls and elementary analytic checks. No trained neural checkpoint is run; no asymptotic hard pairs or original OpenAI source proofs are reproduced. The research owner is Compactification Theory, with applications to RC-01, LoopedTransformers, RefutationBench and StegoBench. The source #122/#140 manuscripts are research claims under community review. + + +## Executed learned-ranker diagnostic + +[Registered RRC-25 study](PROTOCOL_RRC25.md) | +[Executable source-locked analysis](bench_rrc25_deletion.py) + +The existing trained RRC-25 GRU supplies an eight-bit diagnostic +stream from its two top-ranked candidate IDs. The test distribution +has 36 source-generator cases across six families; the original +checkpoint and training source hashes are verified before any +output is computed. This is an observed ranker-output code, +not recovered hidden chain of thought. + +The finite prior over output words is used explicitly in DMB-8's +top-K prior-mass ceiling. Exact Fraction deletion laws and terminal +MAP decoding compare a 2/4/6-bit rolling-hash monitor with a +protected-first-nonempty-evidence monitor under deletion rates +1/2 and 4/5 and independent trace counts 0..3. + +DMB-9 proves that the protected monitor's success is +\(q^{nm}\pi_\star+(1-q^{nm})A_g\), hence nondecreasing +with more traces. The rolling monitor may forget earlier +information. All decoding tables and their nominal +description size remain separate from mutable monitor bits. +The study is a retrospective finite-prior diagnostic and does +not estimate reconstruction of natural-language reasoning. From 36a736a358cb7c7a0772cbac996ba220a4dd58bc Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Fri, 13 Nov 2026 19:22:59 +0800 Subject: [PATCH 21/23] DMB-01: omit zero-mass monitor states for guarded-control exact chain parity --- research/deletion_memory_barrier_v1/reference.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/research/deletion_memory_barrier_v1/reference.py b/research/deletion_memory_barrier_v1/reference.py index 3a8ec3837..71d2664de 100644 --- a/research/deletion_memory_barrier_v1/reference.py +++ b/research/deletion_memory_barrier_v1/reference.py @@ -300,9 +300,11 @@ def guarded_first_nonempty_laws(source_words, deletion: Fraction, count: int, accum[state]+=prob/(1-empty_one) if sum(accum.values())!=1: raise AssertionError("conditional nonempty trace law invalid") - law={0:unknown_probability} + law=({0:unknown_probability} if unknown_probability else {}) for state,p in accum.items(): - law[state]=(1-unknown_probability)*p + weight=(1-unknown_probability)*p + if weight: + law[state]=weight if sum(law.values())!=1: raise AssertionError("guarded monitor law did not normalize") out[word]=law From 665e652bd14f1e8fa9ab5592804aaa0de5890e90 Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Fri, 13 Nov 2026 19:24:02 +0800 Subject: [PATCH 22/23] DMB-01: canonicalize explicit guarded-control Markov chain by positive-probability support --- research/deletion_memory_barrier_v1/test_reference.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/research/deletion_memory_barrier_v1/test_reference.py b/research/deletion_memory_barrier_v1/test_reference.py index c936779d3..61a0c1918 100644 --- a/research/deletion_memory_barrier_v1/test_reference.py +++ b/research/deletion_memory_barrier_v1/test_reference.py @@ -138,14 +138,16 @@ def test_guarded_first_nonempty_monitor_law_exact(self): state={0:Q(1)} for m in range(4): closed=guarded_first_nonempty_laws([x],q,m,B)[x] - self.assertEqual(closed,state) + self.assertEqual(closed,{s:p for s,p in state.items() if p}) updated=defaultdict(Q) for s,sp in state.items(): for trace,p in trace_law.items(): + if not sp or not p: + continue dest=(1+(trace_code(trace)%(2**B-1)) if s==0 and trace else s) updated[dest]+=sp*p - state=dict(updated) + state={s:p for s,p in updated.items() if p} def test_guarded_success_monotone_with_exponential_plateau(self): prior={"0110":Q(1,2),"1001":Q(1,4), From 81b49a25596603d57ac1f08fbc0ba511550547e4 Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Fri, 13 Nov 2026 19:25:35 +0800 Subject: [PATCH 23/23] DMB-01: record trained ranker deletion frontier and exact finite source priors --- .../deletion_memory_barrier_v1/RESULTS.md | 116 ++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 research/deletion_memory_barrier_v1/RESULTS.md diff --git a/research/deletion_memory_barrier_v1/RESULTS.md b/research/deletion_memory_barrier_v1/RESULTS.md new file mode 100644 index 000000000..016b501b3 --- /dev/null +++ b/research/deletion_memory_barrier_v1/RESULTS.md @@ -0,0 +1,116 @@ +# DMB-01 results: deletion channels and protected monitorability + +Date: 2026-11-13. Distinct evidence stages: +- **Exact finite mathematical controls:** standard-library Fraction tests. +- **Trained-model output diagnostic:** original source-locked RRC-25 GRU + produces ranked candidate IDs; the monitor is a deterministic + finite-state rule with an optimal terminal MAP decoder for the + selected empirical source prior. +- **Source-level open research:** OpenAI Math #122 and #140 claims are + imported by their stated scopes, without reproducing their proofs. + +## Source pair + +OpenAI [#122](https://github.com/openai/math/blob/main/lean/docs/122.md) +supplies a claimed worst-case deletion-trace sample lower bound. +OpenAI [#140](https://github.com/openai/math/blob/main/lean/docs/140.md) +supplies a claimed Gaussian streaming memory–precision lower bound. + +The new theory note proves elementary consequences for terminal-state +capacity, finite deletion-deck pairs, data processing, spherical +precision and erasure-transferred Gaussian sampling. Its use of the +asymptotic #122 and #140 results is explicitly conditional. + +## Exact deletion-deck witness + +The strings 0110 and 1001 have the same subsequence multiset for +lengths 0,1,2. Their length-3 multisets are disjoint, and their +length-4 full traces differ. At deletion q=4/5, + + TV(P_0110, P_1001) = 17/625 = 0.0272. + +An estimator attaining two-thirds exact recovery on *each* source +requires at least 15 independent traces by the m-fold coupling +bound. This is a necessary condition, not a decoder achieving it. + +MathCan [PR #32](https://github.com/patrickdugan/MathCan/pull/32) +has Lean 4 / Init checks for the exact short-deck equality, +length-three disjointness and terminal decoder collision. + +## Source-locked trained RRC-25 diagnostic + +Use the existing original recurrent RRC-25 checkpoint with SHA-256 + + 54f225f2a61c52fee5a740576eaab3bcbc5280a595fc1ac1ac115ec8ac26c41b + +The source's bench25.checkpoints gate verifies original training +hashes, model shape, and 1,000 trained parameters. Its public +feature/header pipeline supplies two top-ranked suffix class IDs, +encoded as eight bits. The original suffix truth and future labels +are never used to construct the ranked outputs. + +The selected finite cohort contains 36 source-generated test cases +from six families. It has 19 distinct ranker-output words, Shannon +entropy 3.647462909576375 bits, and maximum prior source probability +11/36 (30.56%). Each source word has literal length eight. +Thus the uniform eight-bit source ceiling is inapplicable to this +structured empirical distribution. + +At any number of trace observations, the DMB-8 state-count +ceiling is 20/36 (55.56%) for B=2, 33/36 (91.67%) +for B=4, and 100% for B=6. These are upper bounds over +*all* monitors with the stated mutable bit capacity for the +empirical source prior, given no external source-dependent side +channel. The demonstrated monitor falls below these bounds. + +### Empirical exact-rational recovery rates + +The monitor sees iid deletion traces of the fixed eight-bit ranking +word and stores only its B-bit state. The ideal final MAP decoder +is evaluated by exact Fraction arithmetic over the finite prior. +Its source-dependent lookup table is a separately charged +static decoder resource. + +| Deletion q | 6-bit monitor | m=0 | m=1 | m=3 | +|---|---|---:|---:|---:| +| 1/2 | Overwriting rolling hash | 30.56% | 38.29% | 30.56% | +| 1/2 | Protected first nonempty trace | 30.56% | 36.18% | 36.20% | +| 4/5 | Overwriting rolling hash | 30.56% | 31.36% | 30.56% | +| 4/5 | Protected first nonempty trace | 30.56% | 31.32% | 31.47% | + +The unlimited-message decoder using one complete deletion trace +achieves 42.55% at q=1/2 and 31.39% at q=4/5, evaluated exactly. +The protected monitor's three-trace score at q=4/5 can exceed +the full one-trace decoder score because it uses three independent +attempts to collect nonempty evidence. + +DMB-9 supplies the formula + + P_guarded(m) = q^(n*m) * pi_max + (1-q^(n*m)) * A_g + +under a fixed source prior, with A_g the Bayes success from +a nonempty retained trace's protected hash. It is monotone +and converges to A_g, while the rolling hash is permitted to +overwrite useful earlier information. Exact Markov-chain +enumeration and an independent closed-form implementation are +compared in the finite tests. + +## Run instructions and provenance + +From the root of Compactification Theory: + + python -m unittest discover -s research/deletion_memory_barrier_v1 -p 'test_reference.py' -v + python research/deletion_memory_barrier_v1/reference.py --check --out /tmp/dmb01_control.json + python -m unittest discover -s research/deletion_memory_barrier_v1 -p 'test_rrc25_deletion.py' -v + python research/deletion_memory_barrier_v1/bench_rrc25_deletion.py --test-per 6 --deletions 1/2 4/5 --counts 0 1 2 3 --bits 2 4 6 --out /tmp/dmb01b_ranker.json + +The dedicated workflow stores a finite source-hash receipt and a +trained ranker diagnostic JSON artifact. The source generator and +checkpoint remain unchanged. No network call or CUDA resource is used. + +The trained RRC-25 word is an encoded pair of *ranked candidate IDs*. +It is neither a natural-language transcript nor an observation of +internal neural hidden-state computations. No claim about general +monitorability or reconstructing arbitrary proof traces follows +without a frozen, separately defined source distribution and +native hidden-state observations.