Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion certificates/disjoint-tensor-compression.json
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@
"scripts/audit_disjoint_tensor.py": "477db540e972b82751fac6a3a6d6e38fb4141e967261b1f9c260e2c686479a78",
"scripts/binary_phase_frames.py": "4148cfa313cf050ed25296e8db36d35871520b8318fd086c7d1facf0c6af67d7",
"scripts/complex_compression.py": "9b6f758a5985ba5d9fdd726fe6556b3d3b4bd9d98aaf8ba06a7bb58093c4c504",
"scripts/exclusion_circuit.py": "f9fbcd6e85e442cbd0926ac0887414e20735b2dc923d2d5822c803ceb46726d3",
"scripts/exclusion_circuit.py": "f066ce9f88f0d8c0b82d7cb3a8d267249e12386e9d1ab65820a3bed54ff0ff78",
"scripts/experiments/disjoint_tensor.py": "085600fc922ae167b5981505e1a5caba4d1c1df15482f61d83d2c086fa89eac1"
},
"status": "IMPROVED FINITE COMPLEX NETWORK; NO NEW MULTIPLICATION KAPPA",
Expand Down
2 changes: 1 addition & 1 deletion certificates/dyadic-central-factor.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"scripts/audit_complex_centers.py": "166b18f560cd0d520d23fa29ee8147e0ea056358c4268a466ec458195a97a960",
"scripts/binary_phase_frames.py": "4148cfa313cf050ed25296e8db36d35871520b8318fd086c7d1facf0c6af67d7",
"scripts/complex_compression.py": "9b6f758a5985ba5d9fdd726fe6556b3d3b4bd9d98aaf8ba06a7bb58093c4c504",
"scripts/exclusion_circuit.py": "f9fbcd6e85e442cbd0926ac0887414e20735b2dc923d2d5822c803ceb46726d3",
"scripts/exclusion_circuit.py": "f066ce9f88f0d8c0b82d7cb3a8d267249e12386e9d1ab65820a3bed54ff0ff78",
"scripts/experiments/complex_centers.py": "3744396587d729253d80980f6310b56e7bf0ea21b165bd178d0d6d4c49faf2e2",
"scripts/experiments/disjoint_tensor.py": "085600fc922ae167b5981505e1a5caba4d1c1df15482f61d83d2c086fa89eac1",
"scripts/general_network_guard.py": "790a2064449afdbffd6dbd4adbcf4a28eaf41931ce7134e4a4e8766f3764270c"
Expand Down
2 changes: 1 addition & 1 deletion certificates/positive-side-core.json
Original file line number Diff line number Diff line change
Expand Up @@ -23101,7 +23101,7 @@
"source_sha256": {
"docs/research/positive-side-core.md": "fab9ff0ed8de56cb9c4c1587b65f956f706ab8f3b8afcb9212366218e227f49d",
"scripts/audit_positive_side.py": "b021aad944d8a6c023e57b1b48937854803bbb370240c93e0fe359d831c838c9",
"scripts/exclusion_circuit.py": "f9fbcd6e85e442cbd0926ac0887414e20735b2dc923d2d5822c803ceb46726d3",
"scripts/exclusion_circuit.py": "f066ce9f88f0d8c0b82d7cb3a8d267249e12386e9d1ab65820a3bed54ff0ff78",
"scripts/experiments/positive_side_core.py": "0d453ab7e869d2cf6a43d6865de82583edb390d3c75038271f0fc09e0f3828ba",
"scripts/experiments/rank_product_core.py": "7a91c1188c5d42e864a5d2e42397b09c435b526ae4f4210c44bf615de488708e",
"scripts/experiments/shared_core.py": "d3c59b61229956cb54ae1ef9145ed213abdf1ae743929de145a77c43656f01a8",
Expand Down
2 changes: 1 addition & 1 deletion certificates/ternary-side.json
Original file line number Diff line number Diff line change
Expand Up @@ -1563,7 +1563,7 @@
"notes/ternary-five-subsets.tex": "f8553a7ad7da9fcd85def67360f7c070ec6c15911c3310fca360d821e1ed1ccd",
"scripts/audit_ternary_side.py": "5e86566eee32031e1829d26ea17a7372e4802e2f7d76a2caa3ae16de3ab072c1",
"scripts/certify.py": "2348d95008276c5d5764f7e028c3918e484582cd589bd4d9b82919161745e53e",
"scripts/exclusion_circuit.py": "f9fbcd6e85e442cbd0926ac0887414e20735b2dc923d2d5822c803ceb46726d3",
"scripts/exclusion_circuit.py": "f066ce9f88f0d8c0b82d7cb3a8d267249e12386e9d1ab65820a3bed54ff0ff78",
"scripts/experiments/disjoint_tensor.py": "085600fc922ae167b5981505e1a5caba4d1c1df15482f61d83d2c086fa89eac1",
"scripts/experiments/prime_core.py": "080a89a2c91505b509068698542843c9d7af3cdec01b5c88972107dc9c688c62",
"scripts/experiments/rank_product_core.py": "7a91c1188c5d42e864a5d2e42397b09c435b526ae4f4210c44bf615de488708e",
Expand Down
13 changes: 13 additions & 0 deletions research/exclusion-embedding-compile/NOTICE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Notice — exclusion embedding compile

Douglas R. Colkitt authored the ExclusionCircuit / SharedPoint / positive-side
screens, the reversible embedding compiler, and the original
`verify_embedding` nesting checks consumed by this tooling package.

Merged [CrocSwap/integer-mult-bounds#2001](https://github.com/CrocSwap/integer-mult-bounds/pull/2001)
already replaced the reverse-frame expected-support genexpr with a closed-form
mask. This package accelerates the residual `compile` / nesting path inside
`verify_embedding` with identical compile maps and embedding receipts, and
updates source pins only.

Prepared by Wentao Li with substantial AI assistance, under Apache-2.0.
123 changes: 123 additions & 0 deletions research/exclusion-embedding-compile/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Faster ExclusionCircuit.verify_embedding compile with identical receipts

**Tooling improvement; no new kappa.** At base
`0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2`, merged
[CrocSwap/integer-mult-bounds#2001](https://github.com/CrocSwap/integer-mult-bounds/pull/2001)
replaced the reverse-frame expected-support genexpr inside
`ExclusionCircuit.verify_embedding` with a closed-form mask. Profiling on the
historical full-size circuit (`n=45`, 12556 reversible roles) shows the residual
wall time is dominated by `compile`'s `edge[node,pos]` tuple-key maps and by
per-gate `set(ins+outs)` nesting loops.

This change keeps every compile map field and every `verify_embedding` receipt
identical while:

1. walking `sorted(self.active)` once and wiring slots through parallel
`edge0` / `edge1` maps;
2. updating forward/reverse frames with pivot-first `ins[1:]` / `outs[1:]`
iteration (historically `set(ins) & set(outs) == {pivot}`);
3. propagating descendants on a dense array instead of a per-active dict.

`ExclusionCircuit.verify`, `circuit_sha256`, and both closed-form leave-two /
reverse masks are unchanged. Only the source pin for
`scripts/exclusion_circuit.py` changes inside the four certificates that bind
that file.

## Reproduce

Python **3.12**, standard library only, from the repository root:

```sh
python3.12 -I -B research/exclusion-embedding-compile/verify.py
python3.12 -I -O -B research/exclusion-embedding-compile/verify.py
python3.12 -B scripts/research_package.py --package research/exclusion-embedding-compile
python3.12 -I -B research/exclusion-embedding-compile/benchmark.py --rounds 5
```

Expected:

```text
PASS_EXCLUSION_EMBEDDING_COMPILE cases=8 certs=4 no_new_kappa
PASS_REGISTERED_RESEARCH_PACKAGE research/exclusion-embedding-compile outcome=completed
PASS_IDENTICAL_EXCLUSION_EMBEDDING_COMPILE_RECEIPTS
```

Default verify is read-only. Full `make verify`, selected cold replay, Lean, and
multiplication-theorem obligations were not rerun for this isolated
historical-checker change.

## Result

On Linux / CPython 3.12.3 (Linux-6.12.94+-x86_64-with-glibc2.39), five
alternating fresh-process pairs timing only
`ExclusionCircuit(45).verify_embedding` (construction excluded) gave median wall
time **0.056 → 0.033 seconds (1.71×)**.
Timing is host-descriptive and is not a correctness gate; all samples and
environment pins are in [RESULT.json](RESULT.json). Every compile map and
embedding receipt matches the baseline checker fieldwise.

## Equivalence

- **Compile:** same `roles`, `gates`, `sources`, and `outputs`. Parallel
`edge0[node]` / `edge1[node]` store the same slots as the historical
`edge[node,0]` / `edge[node,1]` tuple keys. Binary-gate uniqueness
`ins[0] != ins[1]` plus fresh `outs[1:]` ids preserve
`set(ins) & set(outs) == {pivot}`.
- **Nesting:** for every historical gate, `set(ins+outs)` equals
`{pivot} ∪ set(ins[1:]) ∪ set(outs[1:])` with those three parts pairwise
disjoint except the shared pivot, so pivot-first updates match the set loop.
- **Descendants:** inactive nodes stay at bit-zero on the dense array and are
skipped; active reverse propagation matches `sorted(self.active, reverse=True)`.

A compile-map mutant that swaps two output slots is rejected by both baseline
and optimized `verify_embedding` under non-`-O` runs. Temp-copy digest
corruption of production bytes is rejected by the package digest gate.

## Open next questions

1. **Question:** Should `research/bit-compression-provenance` and other packages
that pin live `scripts/exclusion_circuit.py` bytes refresh those SHA-256
entries after this equivalence-preserving rewrite?
**Why it matters:** Those provenance packages bind working-tree bytes; leaving
the old pin keeps this tooling PR focused.
**First step:** Dedicated provenance follow-up that only rewrites those
`SOURCES` / `SOURCE-PINS` entries after confirming embedding receipts stay
identical.
**Blocked by:** Pin repair outside the four binding certificates is outside
this tooling change.

2. **Question:** Is `ExclusionCircuit.compile` alone worth a soft CI regression
timer, or should `RESULT.json` stay descriptive only?
**Why it matters:** Host-descriptive medians already gate nothing; a soft
timer could catch accidental compile regressions without claiming a kappa
effect.
**First step:** Propose a non-blocking timer on `ExclusionCircuit(45).compile`
in the existing research-packages workflow after this PR lands.
**Blocked by:** Maintainer CI policy; out of this session’s stop rule.

## Overlap and credit

Closest priors (different objects or delivery):
[CrocSwap/integer-mult-bounds#756](https://github.com/CrocSwap/integer-mult-bounds/pull/756),
[CrocSwap/integer-mult-bounds#1793](https://github.com/CrocSwap/integer-mult-bounds/pull/1793),
[CrocSwap/integer-mult-bounds#1861](https://github.com/CrocSwap/integer-mult-bounds/pull/1861)
(open; primary pin `binary_phase_frames.py`),
[CrocSwap/integer-mult-bounds#1922](https://github.com/CrocSwap/integer-mult-bounds/pull/1922),
[CrocSwap/integer-mult-bounds#1984](https://github.com/CrocSwap/integer-mult-bounds/pull/1984),
[CrocSwap/integer-mult-bounds#1994](https://github.com/CrocSwap/integer-mult-bounds/pull/1994),
[CrocSwap/integer-mult-bounds#2001](https://github.com/CrocSwap/integer-mult-bounds/pull/2001)
(leave-two / reverse masks; this package answers the residual compile/nesting
object after those masks),
[CrocSwap/integer-mult-bounds#2100](https://github.com/CrocSwap/integer-mult-bounds/pull/2100)
(open; same `ternary-side.json` file, different pin key `ternary_side.py`),
[CrocSwap/integer-mult-bounds#2117](https://github.com/CrocSwap/integer-mult-bounds/pull/2117)
(open; same shared JSON files, different pin key `disjoint_tensor.py`),
[CrocSwap/integer-mult-bounds#2150](https://github.com/CrocSwap/integer-mult-bounds/pull/2150)
(open; mixed-point `Circuit.verify`; different file). No competing open PR on
`ExclusionCircuit.compile` / residual `verify_embedding` nesting at refresh.

Douglas R. Colkitt authored the exclusion / shared-point / positive-side checkers.
Prepared by Wentao Li
([VictorLiwentao](https://github.com/VictorLiwentao),
[@Is__Victor](https://x.com/Is__Victor)) with substantial AI assistance, under
Apache-2.0.
50 changes: 50 additions & 0 deletions research/exclusion-embedding-compile/RESULT.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"environment": {
"executable": "/usr/bin/python3.12",
"platform": "Linux-6.12.94+-x86_64-with-glibc2.39",
"python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]"
},
"fixture": "ExclusionCircuit(45).verify_embedding only (construction excluded)",
"median_baseline_seconds": 0.055854782999972485,
"median_optimized_seconds": 0.032741775999966194,
"median_ratio": 1.7059179379893796,
"no_new_kappa": true,
"rounds": 5,
"samples": [
{
"baseline_seconds": 0.06154403099992578,
"optimized_seconds": 0.0328517960000454,
"ratio": 1.8733840609457313,
"round": 0
},
{
"baseline_seconds": 0.04964154799995413,
"optimized_seconds": 0.032741775999966194,
"ratio": 1.5161531860704618,
"round": 1
},
{
"baseline_seconds": 0.059639259000050515,
"optimized_seconds": 0.032688727000049767,
"ratio": 1.8244595147421836,
"round": 2
},
{
"baseline_seconds": 0.04883048300007431,
"optimized_seconds": 0.03363378599999578,
"ratio": 1.4518283193001358,
"round": 3
},
{
"baseline_seconds": 0.055854782999972485,
"optimized_seconds": 0.032030366999947546,
"ratio": 1.743807150260375,
"round": 4
}
],
"source_sha256": {
"baseline": "f9fbcd6e85e442cbd0926ac0887414e20735b2dc923d2d5822c803ceb46726d3",
"production": "f066ce9f88f0d8c0b82d7cb3a8d267249e12386e9d1ab65820a3bed54ff0ff78"
},
"status": "PASS_IDENTICAL_EXCLUSION_EMBEDDING_COMPILE_RECEIPTS"
}
66 changes: 66 additions & 0 deletions research/exclusion-embedding-compile/SOURCES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"schema_version": 1,
"base_commit": "0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2",
"files": [
{
"path": "docs/research/agent-task-catalog.json",
"usage": "provenance",
"git_blob": "e8870e5917057d59b730eb14721a778639eca050",
"sha256": "d46eb6d5b3e279428753d770653663fbdf1063e55c255ea073d768f344927ef7"
},
{
"path": "certificates/selected-result.json",
"usage": "provenance",
"git_blob": "ae6a99f28aa468649eb66a361e764d769363bf11",
"sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32"
},
{
"path": "scripts/exclusion_circuit.py",
"usage": "provenance",
"git_blob": "b0e2f3e03d7de791ca936dfd92cee2134c7dd4f5",
"sha256": "f9fbcd6e85e442cbd0926ac0887414e20735b2dc923d2d5822c803ceb46726d3"
},
{
"path": "certificates/positive-side-core.json",
"usage": "provenance",
"git_blob": "843dd248eb3f3dc02bb0508130e2ab824ce9ceb6",
"sha256": "35b922c868fac01ed67229196748a956542169934b0ae2093da706eddbf6d264"
},
{
"path": "certificates/dyadic-central-factor.json",
"usage": "provenance",
"git_blob": "5bd4e583cd61b0e5183d74799e886afb57690960",
"sha256": "3f46000e645c338a583e0f2ab669a7c681980743d03335548eeb838072f1d458"
},
{
"path": "certificates/ternary-side.json",
"usage": "provenance",
"git_blob": "b2c1b793e7cb7e4d358b66bfd021d01c85371e19",
"sha256": "2ec667c52babb2a25820e8305538ef16399ab2ea12441d2e8130cc8e3fa13614"
},
{
"path": "certificates/disjoint-tensor-compression.json",
"usage": "provenance",
"git_blob": "a24b0c9af473414fa87efa5a8d2b643d93e6fd01",
"sha256": "899950c322069ebf5a561a321c987906f8c11a592ca229143840901e4e370dd6"
},
{
"path": "tests/test_exclusion_embedding_masks.py",
"usage": "provenance",
"git_blob": "59e09effd881e7dac408bd389c8d5b2f9790ab3d",
"sha256": "22404fd3e1ca4a616b3f1fe72dd97488514c26fcfb4890bab2c45e6ecf612482"
},
{
"path": "tests/test_positive_side_core.py",
"usage": "provenance",
"git_blob": "643a3020b9b6dbdf2230be7b9bb6c5a3ce2e637d",
"sha256": "46bd4173c6a3fd9295fc2682bf7f572161e95abc6c61e0859bb2f8eee7fb6319"
},
{
"path": "research/exclusion-embedding-masks/README.md",
"usage": "provenance",
"git_blob": "d076387569144e5c66e5342b646dd20b136076b4",
"sha256": "313dbae5b0f0e918e9117f16d87807e02bbb027b60591ca4841ff34b01b384e5"
}
]
}
70 changes: 70 additions & 0 deletions research/exclusion-embedding-compile/TASK.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"schema_version": 1,
"task_id": "replay-runtime",
"priority_revision": 4,
"base_commit": "0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2",
"chooser_seed": "a85f20f2e9b661a9314bb2e14f07eb84",
"original_card": {
"id": "replay-runtime",
"question": "Can one measured replay bottleneck be sped up without dropping coverage?",
"starting_points": [
"scripts/run_isolated_tests.py",
"scripts/verify_replay_coverage.py",
"certificates/selected-result.json"
],
"methods": [
"Profile one isolated replay and optimize the measured bottleneck.",
"Design source-bound reuse with explicit dependency invalidation and negative controls."
],
"acceptance_gate": "Report before/after wall time on the same fixture, retained checks and invalidation behavior.",
"first_step": {
"command": [
"python3",
"-B",
"scripts/research_baseline.py"
],
"expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY",
"inspect": "Read the selected reproduction command and choose a single replay stage for profiling.",
"scope": "Positive control / source-bound orientation only; this is not a new construction or full cold replay."
},
"first_experiment": "Measure one unchanged fixture, preserve check coverage, and test one optimization with invalidation controls.",
"bottleneck_link": "Faster trustworthy replays increase review throughput and let mechanism candidates be checked sooner.",
"allowed_variations": [
"Profile one stage or design one source-bound cache boundary."
],
"scope_change_triggers": [
"Skipping coverage or comparing different fixtures to claim speedup."
],
"overlap_terms": [
"replay runtime",
"cache invalidation",
"isolated tests"
]
},
"scope_status": "refined",
"actual_scope": "Can scripts/exclusion_circuit.py:ExclusionCircuit.compile / verify_embedding accelerate the post-#2001 residual (parallel edge0/edge1 slot maps; pivot-first nesting without set(ins+outs); dense descendant array) so compile maps and verify_embedding receipts stay fieldwise identical on the historical n=45 circuit, without changing ExclusionCircuit.verify or the closed-form reverse/leave-two masks?",
"scope_change_reason": "The catalogue card asks for one measured replay bottleneck with before/after wall time and retained checks. Expertise override selected verifier-engineering (seed a85f20f2e9b661a9314bb2e14f07eb84) after leave-alone overlap ruled out mixed-point Circuit.verify (#2150), DisjointTensor.frame_data (#2117), ternary frames (#2100), SharedPoint init (#2054), and joint-frames (#1922). Profiling named ExclusionCircuit(45).verify_embedding's compile + nesting residual after the merged #2001 reverse-frame masks.",
"bottleneck_link": "Side result on review throughput: ExclusionCircuit embedding checks feed positive-side, dyadic-central, ternary-side and disjoint-tensor certificates inside verify-certificates. A faster identical embedding path does not change kappa or the binding complex supplier.",
"budget_minutes": 60,
"stop_rule": "Ship an equivalence-preserving compile/verify_embedding residual rewrite with frozen baseline, identical compile maps and embedding receipts, registered replay and a measured before/after median at or above the ~1.5× tooling bar. Do not reopen leave-alone PRs, invent kappa, or run the selected cold frontier replay.",
"outcome": "completed",
"evidence": "PASS_EXCLUSION_EMBEDDING_COMPILE via research/exclusion-embedding-compile/verify.py (also under -O); PASS_IDENTICAL_EXCLUSION_EMBEDDING_COMPILE_RECEIPTS via benchmark.py; four certificates differ from base only in the scripts/exclusion_circuit.py source pin.",
"author": "Wentao Li",
"github": "VictorLiwentao",
"email": "wentaol4@illinois.edu",
"ai_assistance": "Substantial AI assistance for orientation, overlap search, profiling, implementation, packaging, benchmarking and writing. Not independent human peer review.",
"open_questions": [
{
"question": "Should research/bit-compression-provenance and other packages that pin live scripts/exclusion_circuit.py bytes refresh those SHA-256 entries after this equivalence-preserving rewrite?",
"why_it_matters": "Those provenance packages bind working-tree bytes; leaving the old pin keeps this tooling PR focused.",
"first_step": "Open a dedicated provenance follow-up that only rewrites the exclusion_circuit.py entry in those SOURCES/SOURCE-PINS files after confirming embedding receipts stay identical.",
"blocked_by": "Pin repair outside the four binding certificates is outside this tooling change."
},
{
"question": "Is ExclusionCircuit.compile alone worth a soft CI regression timer, or should RESULT.json stay descriptive only?",
"why_it_matters": "Host-descriptive medians already gate nothing; a soft timer could catch accidental compile regressions without claiming a kappa effect.",
"first_step": "Propose a non-blocking timer on ExclusionCircuit(45).compile in the existing research-packages workflow after this PR lands.",
"blocked_by": "Maintainer CI policy; out of this session's stop rule."
}
]
}
Loading
Loading