Skip to content

Commit 3d2d040

Browse files
committed
docs(pr-x12): mirror 4 CodeRabbit-fix files from PR #197 branch
Brings claude/continue-ndarray-x0Oaw in sync with the PR branch (claude/pr-x12-canon-resolutions-MAOO0, commit 21b61eb) for the four docs that exist on both branches: - pr-x12-anti-neural-lookup-inversion.md (enhancement-flag bit reassignment from leaf bit 14 to frame-header reserved area) - pr-x12-cam-pq-sigker-dn-tree-substrate-bindings.md (path corrections + Hambly-Lyons arXiv:math/0507536) - pr-x12-substrate-merged-canon.md (M:E-J §3 R-2 alignment: bit 15 universal / bit 14 consumer-typed; leaf_size lives in Ctu<const N> not header bits) - pr-x12-x266-3dgs-spacetime-upscaling.md (R-2 header layout + HEVC 4K/60 bandwidth math: 4 res × 2 fps × 6.25 = 50 MB) pr-x12-substrate-canon-resolutions.md is NOT brought across — that file exists only on the PR branch and arrives via the PR #197 → master merge. https://claude.ai/code/session_01HbqooFZHAjaUtFEzhA1R2u
1 parent 6872c97 commit 3d2d040

4 files changed

Lines changed: 40 additions & 21 deletions

.claude/knowledge/pr-x12-anti-neural-lookup-inversion.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ For these use cases, the right architecture is a **layered codec**:
234234
1. **Base layer:** PR-X12 frozen-lookup codec for the bits-actually-transmitted
235235
2. **Enhancement layer:** NN generative refinement at the decoder (optional, off by default)
236236

237-
The base layer guarantees fidelity bounded by Shannon. The enhancement layer provides perceptual hallucination when the user opts in. PR-X12's wire format reserves a single bit (M:E-J bit 14 currently used for leaf_size; one of the reserved bits in future revisions) for the "enhancement layer available" flag.
237+
The base layer guarantees fidelity bounded by Shannon. The enhancement layer provides perceptual hallucination when the user opts in. PR-X12's wire format reserves a single bit in the **frame header** (alongside `ConsumerProfile` and `FlushUnit` per R-2 / R-12) for the "enhancement layer available" flag — not in the per-leaf 16-bit header, whose bit 14 is already claimed by R-2's consumer-typed demux and whose bit 15 is the universal inter-tier reference.
238238

239239
This is also the right architecture for high-stakes content (legal, medical, scientific): always run the base layer, never run the enhancement layer. Determinism preserved.
240240

.claude/knowledge/pr-x12-cam-pq-sigker-dn-tree-substrate-bindings.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
### 1.1 What it is
1919

20-
**Location:** `/home/user/ndarray/src/hpc/cam_pq.rs`
20+
**Location:** `src/hpc/cam_pq.rs` (this repo)
2121

2222
**Algorithm:** Content-Addressable Memory (CAM) + Product Quantization (PQ). Unifies FAISS PQ6×8 (48-bit fingerprints, 6 subspaces × 256 centroids each) with CLAM 48-bit archetypes into a single codec.
2323

@@ -108,7 +108,7 @@ The codebook implementation is `cam_pq::CamCodebook`. The four policy variants c
108108

109109
### 2.1 What it is
110110

111-
**Location:** `/home/user/lance-graph/crates/sigker/`
111+
**Location:** `crates/sigker/` in the external `adaworldapi/lance-graph` repo (not in this `ndarray` repo)
112112

113113
**Algorithm:** Path-signature representations for sequential / path-structured data. Implements Chen-Lyons signatures S(X) = (1, ∫dX, ∫∫dX⊗dX, …) up to depth N, with shuffle-product algebra and proven uniqueness.
114114

@@ -134,7 +134,7 @@ pub struct CodecRouteSigker { /* lance-graph codec routing integration */ }
134134
|---|---|---|
135135
| Chen, "Iterated integrals and exponential homomorphisms" | 1957 | Original signature construction |
136136
| Lyons, "Differential equations driven by rough signals" | 1998 | Rough path theory, signature universal approximator |
137-
| Hambly-Lyons, "Uniqueness for the signature of a path of bounded variation" | 2010 | **Theorem 4: signatures uniquely determine paths up to tree-like equivalence** |
137+
| Hambly-Lyons, "Uniqueness for the signature of a path of bounded variation" (**arXiv:math/0507536**, Annals of Mathematics 171(1):109–167) | 2010 | **Theorem 4: signatures uniquely determine paths up to tree-like equivalence** |
138138
| Salvi-Cass-Foster-Lyons-Lemercier | 2020 | **arXiv:2006.14794** — Goursat-PDE solver for signature kernel, O(T₁·T₂·d), no signature materialization |
139139
| Cuchiero-Schmocker-Teichmann | 2021 | **Randomized signature universality**: any continuous path-functional ≈ linear combo of randomized-signature coordinates |
140140

@@ -206,7 +206,7 @@ This unlocks: **path-structured codec lanes** in Plan G (audio waveforms, time-s
206206

207207
### 3.1 dn_tree — quaternary plastic memory
208208

209-
**Location:** `/home/user/ndarray/src/hpc/dn_tree.rs`
209+
**Location:** `src/hpc/dn_tree.rs` (this repo)
210210

211211
**Algorithm:** Quaternary hierarchical bitmap summary tree for plastic graph traversal. Adapted from "On Demand Memory Specialization for Distributed Graph Processing" (2013). Properties:
212212

@@ -222,7 +222,7 @@ This unlocks: **path-structured codec lanes** in Plan G (audio waveforms, time-s
222222

223223
### 3.2 merkle_tree — integrity proof for CogRecord regions
224224

225-
**Location:** `/home/user/ndarray/src/hpc/merkle_tree.rs`
225+
**Location:** `src/hpc/merkle_tree.rs` (this repo)
226226

227227
**Algorithm:** 8-Kbit Merkle tree built from CogRecord regions as a compressed searchable proxy. Properties:
228228

@@ -376,15 +376,16 @@ This doc (#4) and the bgz/jc doc (#3) are the ones that ground PR-X12 in working
376376
- **GGUF lens (activation-aware RDO claim):** `pr-x12-gguf-llm-weights-encoding.md` §5 — supported by G-1 closure
377377
- **Anti-neural lens (lookup-table cost analysis):** `pr-x12-anti-neural-lookup-inversion.md` §3 — supported by G-4 + G-5 closure
378378
- **Multi-arch lens (determinism + integrity):** `pr-x12-woa-multiarch-orchestration.md` §6 — supported by G-4 + G-7 closure
379-
- **Source code references:**
380-
- `/home/user/ndarray/src/hpc/cam_pq.rs` — the codebook trainer
381-
- `/home/user/ndarray/src/hpc/dn_tree.rs` — quaternary plastic memory
382-
- `/home/user/ndarray/src/hpc/merkle_tree.rs` — Blake3-48-bit Merkle
383-
- `/home/user/lance-graph/crates/sigker/` — Chen-Lyons signatures
384-
- `/home/user/lance-graph/crates/sigker/src/``signature_kernel_pde`, `RandomizedSignature`, `CodecRouteSigker`
385-
- `/home/user/lance-graph/crates/jc/src/hambly_lyons.rs` — Pillar 11 (active under `--features hambly-lyons`; DEFERRED only in default zero-dep build)
386-
- `/home/user/lance-graph/crates/jc/src/pflug.rs` — Pillar 10 (nested-distance Lipschitz on Sigma DN-trees, certifies CAM-PQ)
387-
- `/home/user/lance-graph/crates/bgz-tensor/src/adaptive_codec.rs` — cam_pq imports
379+
- **Source code references (in this repo `adaworldapi/ndarray`):**
380+
- `src/hpc/cam_pq.rs` — the codebook trainer
381+
- `src/hpc/dn_tree.rs` — quaternary plastic memory
382+
- `src/hpc/merkle_tree.rs` — Blake3-48-bit Merkle
383+
- **Source code references (external repo `adaworldapi/lance-graph`):**
384+
- `crates/sigker/` — Chen-Lyons signatures
385+
- `crates/sigker/src/``signature_kernel_pde`, `RandomizedSignature`, `CodecRouteSigker`
386+
- `crates/jc/src/hambly_lyons.rs` — Pillar 11 (active under `--features hambly-lyons`; DEFERRED only in default zero-dep build)
387+
- `crates/jc/src/pflug.rs` — Pillar 10 (nested-distance Lipschitz on Sigma DN-trees, certifies CAM-PQ)
388+
- `crates/bgz-tensor/src/adaptive_codec.rs` — cam_pq imports
388389
- **arXiv anchors for sigker:**
389390
- **2006.14794** (Salvi-Cass-Foster-Lyons-Lemercier 2020) — Goursat PDE for signature kernel
390391
- Hambly-Lyons 2010 — signature uniqueness theorem

.claude/knowledge/pr-x12-substrate-merged-canon.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,18 @@ pub trait PredictiveSignal {
278278

279279
### M:E-J — The reserved header bits 14-15 carry causal-edge metadata for free
280280

281-
> [Formalised post-merge as **R-2**: 16-bit header bit layout pinned — bits 0-1 = `header_kind`, bits 2-13 = `basin_index`, bits 14-15 = `leaf_size ∈ {8,16,32,64}` (which subsumes M:E-G's `Ctu<const N>`). The causal-tier reading below remains valid but is now the *interpretation*, not the on-wire layout — see R-2 and R-8.]
281+
> [Formalised post-merge as **R-2**: 16-bit header bit layout pinned —
282+
> bits 0-1 = `header_kind`, bits 2-13 = `basin_index`,
283+
> **bit 15 = UNIVERSAL "has inter-tier reference"** (identical across
284+
> all four consumers; A3-inter cross-tier link),
285+
> **bit 14 = CONSUMER-TYPED via the frame header's `ConsumerProfile`
286+
> tag** (cognitive: Pearl-rung high bit; video: reserved=0;
287+
> splat: LOD-cascade-source flag; gradient: worker-shard parity).
288+
> Leaf size (8/16/32/64) is encoded structurally via M:E-G's
289+
> `Ctu<const N>` at the type level, NOT in header bits 14-15. The
290+
> causal-tier reading below is the historical motivation for bit 14;
291+
> R-2 generalises it to the four-consumer demux. See
292+
> `pr-x12-substrate-canon-resolutions.md` §R-2.]
282293
283294
A's E-15 (reserved bits 14-15 are inter-tier link) + A's T-22 (causal-edge v2 mantissa: Intervention=+6, Counterfactual=-6):
284295

.claude/knowledge/pr-x12-x266-3dgs-spacetime-upscaling.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,13 @@ Building on M:E-J's 16-bit header layout (header_kind ∈ {Skip, Merge, Delta, E
163163
HEVC-compatible PR-X12 header (16 bits, R-2):
164164
bits 0-1: header_kind {Skip, Merge, Delta, Escape}
165165
bits 2-13: basin_index (12 bits, M:E-J)
166-
bits 14-15: leaf_size ∈ {8, 16, 32, 64}
166+
bit 14: CONSUMER-TYPED (semantic per frame-header `ConsumerProfile`;
167+
cognitive: Pearl-rung high bit; video: reserved=0;
168+
splat: LOD-cascade-source flag; gradient: worker-shard parity)
169+
bit 15: UNIVERSAL "has inter-tier reference" (A3-inter); identical
170+
across all four consumers
171+
NOTE: leaf-size (8/16/32/64) is encoded structurally via `Ctu<const N>`
172+
(M:E-G) at the type level, not via header bits.
167173
168174
x266 extension (NOT in PR-X12 scope, future):
169175
bits 0-1: header_kind, now 4 variants
@@ -214,16 +220,17 @@ PR-X12 + 3DGS anchor (single anchor for the clip):
214220
→ HEVC wins by ~25% for native (1080p, 30 fps) playback.
215221
216222
BUT for 4K @ 60 fps playback:
217-
HEVC: re-encode at 4K/60fps target = 4 × 4 × 6.25 = 100 MB
218-
(or super-res upscaling at decode = 6.25 MB + neural inference)
223+
HEVC: re-encode at 4K/60fps target = 4 (res) × 2 (fps) × 6.25 = 50 MB
224+
(4× pixel scaling × 2× framerate scaling × 6.25 MB native bitrate;
225+
or super-res upscaling at decode = 6.25 MB + neural inference)
219226
PR-X12 + 3DGS: same 8.3 MB
220227
decoder rasterizes at (4K, 60 fps); the math is in the scene
221228
222-
→ PR-X12 wins by 12× for high-resolution playback,
229+
→ PR-X12 wins by ~6× for high-resolution playback,
223230
AND playback is deterministic (no neural model versioning).
224231
```
225232

226-
**Where the crossover sits:** PR-X12 + 3DGS becomes a win when the playback target (W × H × fps) exceeds the encode target by ~3×. At 1× (native), HEVC is a hair cheaper. At 12× (4K@60 from 1080p@24), PR-X12 dominates.
233+
**Where the crossover sits:** PR-X12 + 3DGS becomes a win when the playback target (W × H × fps) exceeds the encode target by ~1.3× (the point at which HEVC's re-encoded size crosses the fixed 8.3 MB PR-X12 budget). At 1× (native), HEVC is a hair cheaper. At 8× pixel-bandwidth (4K@60 from 1080p@30), PR-X12 dominates by ~.
227234

228235
This matches the intuition that **3DGS is a scene model**, not a frame model — its compression ratio improves with resolution, while HEVC's degrades.
229236

0 commit comments

Comments
 (0)