Skip to content

Gaussian cache reuse for cross-frame ADDs and paid history (no new κ) - #5283

Merged
Mister-Meeseeks merged 4 commits into
CrocSwap:mainfrom
zxv:codex/gaussian-cache-reuse
Oct 23, 2026
Merged

Mister-Meeseeks merged 4 commits into
CrocSwap:mainfrom
zxv:codex/gaussian-cache-reuse

Conversation

@zxv

@zxv zxv commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Change and mathematical scope

Several cross-frame reads of the same logical snapshot can share a transformed owned copy. This package constructs and exactly checks a module replacing 2 H2 by 3 H1, saving about 0.991635 moment units at the selected exponent. It records the extra owned field, three extra ordinary passes and retained normalizers; one additional H1 repair job loses the gain. An already-paid observation variant has an explicit caller precondition and unchanged return.

The written intersection-loss bound also extends Matarener's PR #5060 from nested paths to arbitrary Clifford intermediate charts and typed-copy trees under the same common-contact constraints. All 16 selected #4470 center block-orientations retain a sharp rank-mass floor of eight. Changed contacts, helper boundaries, observations and general payload recombination remain outside that bound.

The frozen forecast includes the proposed word skeleton and predates exact Clifford realization/all-column checking. It tests a local cost prediction, not blind structural discovery. No new κ, installed supplier or selected-frontier change is claimed. The open handoffs target actual repeated source rows in #5125 and caller-bound paid-history observations in #4930, rather than duplicating those active construction campaigns.

The geometric law

Directions no longer common to all required representations must be paid for somewhere. Shared prefixes can be paid for once.

Represent a Clifford frame A by its n-dimensional inverse-image Lagrangian chart $\Lambda_A=A^{-1}L_0$. The actual Fourier rank of a frame change is its intersection deficit:

$$r(A,B)=n-\dim(\Lambda_A\cap\Lambda_B).$$

For a tree T that distributes one specified snapshot through owned copies, the recursive moment and the unavoidable rank mass satisfy

$$\boxed{M_s(T)=\sum_{e\in T}r_e^s,\qquad \sum_{e\in T}r_e\ge n-\dim\!\left(\bigcap_{v\in T}\Lambda_v\right), \qquad s=1-\kappa.}$$

The proof is short: when a child chart is added, the running intersection loses at most the rank of its incoming edge. Sum those losses. This extends the predecessor's intersection argument to branching and arbitrary Clifford intermediate charts. It is classical geometry applied to this ownership contract; phases, normalizers, storage and ordinary passes still require implementation and payment.

A small example where the best network changes

Start at frame 0 and deliver the same snapshot to the planes $\langle e_1,e_2\rangle$ and $\langle e_1,e_3\rangle$. Two separate transfers cost $2,2^s$. Retaining the shared line $\langle e_1\rangle$ makes a three-edge tree, each edge rank one, costing 3:

flowchart LR
  S["Source frame 0"] -->|"rank 1"| M["Retained shared line"]
  M -->|"rank 1"| A["First target plane"]
  M -->|"rank 1"| B["Second target plane"]
Loading

The exact minimum recursive moment over typed-copy trees for these terminals, including arbitrary intermediate Clifford charts, is

$$\boxed{M_s^{\min}=\min\left(2\cdot 2^s,\;3\right)}\qquad 0<s\leq1.$$

The preferred network switches at $s=\log_2(3/2)$. At $s=1/2$, separate transfers win; at the selected $s=1-0.00302015$, sharing wins by about 0.991635. The same endpoint geometry therefore chooses a different transfer tree as the recursive exponent changes. The written proof gives the optimum, rather than relying on the finite search alone. This optimum concerns recursive moment; a complete caller must also pay the ordinary costs listed above.

Practical implications for other researchers

Research situation Concrete next experiment or stopping rule
Several cross-frame ADDs read one expression Group reads by their exact logical operator row, then search for a shared transfer tree. Prove the snapshot survives intervening writes; matching owner names or frame tags is insufficient.
A paid helper or center observation already exists Try using that observation as the tree root. In this fixture, a supplied line observation reduces the marginal bill to 2 H1. First prove the required row relation and unchanged return; its creation, retention and cleanup remain caller costs.
Another center-only retiming search under #4470's original common-contact constraints The joint-intersection loss is eight in every checked block, and the existing H8 attains the bound. Non-nested transports and typed-copy branching cannot reduce that center charge. Reopen with changed contact constraints, helper boundaries or payloads, then derive the replacement bound.
A promising cache tree has a tiny repair allowance Screen the full incremental bill before native synthesis. Here one extra H1 makes the saving $4(2^{-\kappa}-1)&lt;0$ for every $\kappa&gt;0$. A geometrically attractive tree can lose after repair.

A retained cache has zero new productive-output credit. Any proposed new Gaussian job still needs the complete arbitrary-input endpoint and independence relations; recovering one desired coefficient does not remove coupling to other inputs. The immediate opportunity is a source-bound repeated-snapshot witness in the active split-contact or paid-history work, followed by an exact caller and cost check.

Task and overlap

Publication base: canonical main ff3cc58e370d0f678e529246f8c73e8094e18fcf. Live inputs are pinned at canonical ec2780e8aeb1c88acaf5e9e470ef8c68e7fbbb6c; the later active-feedback context is provenance pinned at ff3cc58. Exact blobs and SHA256 values are in research/gaussian-cache-reuse/SOURCES.json.

Scope is changed from catalogue task centre-path-sharing: this is a reusable local contract and a fixed-contact bound, rather than cross-call supplier savings or a historical packing-ceiling claim. It follows zxv's explicit geometric/predictive research assignment. PR #5060 leaves the non-nested-center question open; this package extends its argument. PR #4534 supplies the retiming contract. Separate split-contact lowering is existing work in Discussion #5125; the added construction shares a prefix across repeated reads. Paid-history work in Discussion #4930 remains a distinct active campaign. Bounded overlap coverage and structured scope are recorded in TASK.json.

Validation

  • Python 3.12, standard library only: registered normal and optimized replays pass, with fresh bytecode-cache namespaces.
  • Exact checks cover 256 frame pairs, 40 arbitrary input columns per orientation, wrong phase/dual/stale-snapshot controls, 6,750 chart paths/trees, all 16 selected center blocks, and outward rational price signs.
  • Export inventory/hash checks and Git-free normal/optimized replay pass; committed-byte and metadata checks pass.
  • The optional full-history preflight is unavailable in the local shallow checkout; this limitation is recorded. No full native/Lean/Docker/compiler/precision/tape or multiplication-theorem replay is claimed.

Reproduce:

python3.12 -B scripts/research_package.py --package research/gaussian-cache-reuse

Credit

Prepared by zxv with substantial OpenAI Codex assistance. The package credit section links each predecessor contribution to its PR and preserves the native, Clifford, compiler and copied-center attribution. Frozen source archives and scientific receipts are unchanged.

Open next questions

The smallest next test is one actual source row and its first two cross-frame reads: prove the row match and lifetime, freeze a shared tree and its complete incremental bill, then lower it exactly. A retained paid observation needs an exact caller relation and unchanged return. Changed contacts/helper boundaries need new intersection constraints. README and TASK.json give the relevance, first steps and blockers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants