diff --git a/.github/LOCAL_VALIDATION.md b/.github/LOCAL_VALIDATION.md index b5efcce..26a7418 100644 --- a/.github/LOCAL_VALIDATION.md +++ b/.github/LOCAL_VALIDATION.md @@ -49,6 +49,7 @@ comparison, and artifact commands for every study. | Uncertainty and grounding experiments | `python -B -m graph_synthesis.uncertainty.run --check` | | Dependence-aware graph certificates | `python -B -m graph_synthesis.certificates.run --check` | | Post-certificate research | `python -B -m graph_synthesis.post_certificates.run --check` | +| Post-certificate structural extensions | `python -B -m unittest discover -s graph_synthesis/post_certificate/tests -v`; `python -B -m graph_synthesis.post_certificate.run --check`; `python -B -m graph_synthesis.post_certificate.report --check --update-paper` | | Corpus methodology | `python -B -m unittest discover -s graph_synthesis/corpus/tests -v` | | DSPy Jev optimizer | `python -B -m graph_synthesis.dspy_jev_optimizer.verify`; `python -B -m unittest discover -s graph_synthesis/dspy_jev_optimizer/tests -v` | @@ -61,7 +62,7 @@ authorize new paid model calls. ## Automation status -All 21 research workflows run only through explicit `workflow_dispatch` requests. +All research workflows run only through explicit `workflow_dispatch` requests. Pull requests and pushes do not start research Actions jobs. In the Actions tab, select a study and choose **Run workflow** on the revision to verify. Existing replay and report checks run on the selected revision; the six historical diff --git a/.github/workflows/jev-multicall.yml b/.github/workflows/jev-multicall.yml index ee6ce9d..a83e2d8 100644 --- a/.github/workflows/jev-multicall.yml +++ b/.github/workflows/jev-multicall.yml @@ -69,8 +69,9 @@ jobs: python -B -m graph_synthesis.novel_mechanisms.regret --report python -B -m graph_synthesis.certificates.report --update-paper python -B -m graph_synthesis.post_certificates.report --update-paper + python -B -m graph_synthesis.post_certificate.report --update-paper python -B -m graph_synthesis.render_current_paper --output "$RUNNER_TEMP/multicall-paper.pdf" - git diff --exit-code -- experiments/jev-multicall-20260918/REPORT.md manuscript/paper-current.md CURRENT_RESULTS.md graph_synthesis/risk_control graph_synthesis/reliability graph_synthesis/structural graph_synthesis/source_structural graph_synthesis/assumption_aware graph_synthesis/uncertainty graph_synthesis/frontier graph_synthesis/certificates graph_synthesis/post_certificates/RESULTS.md graph_synthesis/post_certificates/summary.csv + git diff --exit-code -- experiments/jev-multicall-20260918/REPORT.md manuscript/paper-current.md CURRENT_RESULTS.md graph_synthesis/risk_control graph_synthesis/reliability graph_synthesis/structural graph_synthesis/source_structural graph_synthesis/assumption_aware graph_synthesis/uncertainty graph_synthesis/frontier graph_synthesis/certificates graph_synthesis/post_certificates/RESULTS.md graph_synthesis/post_certificates/summary.csv graph_synthesis/post_certificate git diff --exit-code -- manuscript/paper-current.html - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 with: diff --git a/.github/workflows/post-certificate-improvements.yml b/.github/workflows/post-certificate-improvements.yml new file mode 100644 index 0000000..8d937ff --- /dev/null +++ b/.github/workflows/post-certificate-improvements.yml @@ -0,0 +1,80 @@ +name: Post-certificate structural improvements + +on: + workflow_dispatch: + +permissions: + contents: read + +jobs: + replay-and-validate: + runs-on: ubuntu-latest + timeout-minutes: 30 + env: + PYTHONDONTWRITEBYTECODE: '1' + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 + with: + fetch-depth: 0 + persist-credentials: false + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 + with: + python-version: '3.12' + - name: Verify frozen protocol ancestry and bytes + shell: bash + run: | + set -euo pipefail + protocol=8187cc4e4b98e40f3146ce787b71f262b62b3abd + git merge-base --is-ancestor "$protocol" HEAD + git show "$protocol:graph_synthesis/post_certificate/PROTOCOL.md" | cmp - graph_synthesis/post_certificate/PROTOCOL.md + python -B -m graph_synthesis.verify + - name: Focused regressions and frozen replay + run: | + python -B -m unittest discover -s graph_synthesis/post_certificate/tests -v + python -B -m graph_synthesis.post_certificate.run --check + python -B -m graph_synthesis.post_certificate.report --check --update-paper + - name: Install rendering dependencies + run: | + python -m pip install -r graph_synthesis/requirements-figures.txt + sudo apt-get update + sudo apt-get install -y poppler-utils + - name: Verify committed build hashes and deterministic manuscript + shell: bash + run: | + set -euo pipefail + python - <<'PY' + import hashlib,json + from pathlib import Path + sha=lambda p:hashlib.sha256(Path(p).read_bytes()).hexdigest() + b=json.loads(Path('manuscript/paper-current.build.json').read_text(encoding='utf-8')) + assert sha('manuscript/paper-current.md')==b['source_sha256'] + assert sha('graph_synthesis/render_current_paper.py')==b['renderer_sha256'] + assert sha('manuscript/paper-current.pdf')==b['pdf_sha256'] + PY + python -B -m graph_synthesis.render_current_paper --output "$RUNNER_TEMP/post-certificate-paper.pdf" + git diff --exit-code -- manuscript/paper-current.md manuscript/paper-current.html + git diff --check + - name: PDF structural and raster smoke check + shell: bash + run: | + set -euo pipefail + pdf="$RUNNER_TEMP/post-certificate-paper.pdf" + pdfinfo "$pdf" | tee "$RUNNER_TEMP/pdfinfo.txt" + pages=$(pdfinfo "$pdf" | awk '/^Pages:/ {print $2}') + test "${pages:-0}" -gt 0 + pdftoppm -f 1 -singlefile -png -r 120 "$pdf" "$RUNNER_TEMP/paper-first" + pdftoppm -f "$pages" -singlefile -png -r 120 "$pdf" "$RUNNER_TEMP/paper-last" + test -s "$RUNNER_TEMP/paper-first.png" + test -s "$RUNNER_TEMP/paper-last.png" + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 + if: always() + with: + name: post-certificate-pdf-review-${{ github.run_id }} + path: | + ${{ runner.temp }}/post-certificate-paper.pdf + ${{ runner.temp }}/post-certificate-paper.build.json + ${{ runner.temp }}/pdfinfo.txt + ${{ runner.temp }}/paper-first.png + ${{ runner.temp }}/paper-last.png + if-no-files-found: warn + retention-days: 14 diff --git a/CURRENT_RESULTS.md b/CURRENT_RESULTS.md index 20df58b..f5627a7 100644 --- a/CURRENT_RESULTS.md +++ b/CURRENT_RESULTS.md @@ -121,3 +121,11 @@ The archived root README and original manuscript are retained as part of the imm ## Five follow-up improvements (PR #13) [Executed results](graph_synthesis/followup/RESULTS.md), [frozen protocol](graph_synthesis/followup/PROTOCOL.md), [five figures](graph_synthesis/followup/figures/), and the updated full paper distinguish same-data response replay from controlled algorithm tests. No new service calls; negative results retained; no production-policy change. + + + +## Five post-certificate structural extensions + +[Executed report](graph_synthesis/post_certificate/RESULTS.md), [frozen protocol](graph_synthesis/post_certificate/PROTOCOL.md), [corrections](graph_synthesis/post_certificate/CORRECTIONS.md), and [five figures](graph_synthesis/post_certificate/figures/). Recorded target outcomes: **H1: met; H2: not met; H3: met; H4: met; H5: met.** H4 covers only endpoint scenarios; its broader continuous-interval minimax claim is unsupported, with an interior counterexample retained. Counted H1 reduction: 99.26%; local H2 reduction: 90.11%, connected-control saving: 0.00%. No fresh Jev calls, independent semantic-accuracy claim, external-system superiority or production-policy change. + + diff --git a/graph_synthesis/followup/artifact-manifest.json b/graph_synthesis/followup/artifact-manifest.json index 172e28a..e85fbf3 100644 --- a/graph_synthesis/followup/artifact-manifest.json +++ b/graph_synthesis/followup/artifact-manifest.json @@ -18,7 +18,7 @@ "graph_synthesis/followup/figures/05_lineage.png": "b9ca0b08042385d2cffd93f2f919b5e7a366995111e5f18dc9c5c7588e6957fc", "graph_synthesis/followup/figures/05_lineage.svg": "80cd4b81336b0e48916574c8e62236d35d91bd9308663a36b79ff575cfba4f51", "graph_synthesis/followup/methods.py": "5a0c1f47683bcb31990096e3a625fb0fd10e1fe85f6d36190025e0d40d0ff6b6", - "graph_synthesis/followup/report.py": "c834ad187d06f057508be69b78db4306268a0724e5195d96da995782566d944d", + "graph_synthesis/followup/report.py": "90c2f7e055d9d30986ac33e256a51843aa2d21d1bab7c0a44c90e8091a7208bd", "graph_synthesis/followup/results.json": "2a3c57a2fefcd41dc7aca97ebc42e85d6e0c0ac7b75cf7b00c7f7c399ac7fdd7", "graph_synthesis/followup/run.py": "db8afe1bf70ec74f082bd6841d12870540446d552417b4be364e7e9ddc4527b3", "graph_synthesis/followup/tests/test_followup.py": "86466d1356fee23205e4446c7aa1339cbfffe5544a4fda172bd2ed6a7cbdab8d" diff --git a/graph_synthesis/followup/report.py b/graph_synthesis/followup/report.py index 39e77c6..7dc8f4f 100644 --- a/graph_synthesis/followup/report.py +++ b/graph_synthesis/followup/report.py @@ -248,9 +248,25 @@ def update_paper(r: dict): note = '\n## Five follow-up improvements (PR #13)\n\n[Executed results](graph_synthesis/followup/RESULTS.md), [frozen protocol](graph_synthesis/followup/PROTOCOL.md), ' note += '[five figures](graph_synthesis/followup/figures/), and the updated full paper distinguish same-data response replay from controlled algorithm tests. ' note += 'No new service calls; negative results retained; no production-policy change.\n' - if '\n## Five follow-up improvements (PR #13)' in text: - text = text.split('\n## Five follow-up improvements (PR #13)')[0] - entry.write_text(text.rstrip()+'\n'+note,encoding='utf-8') + heading = '\n## Five follow-up improvements (PR #13)' + if heading in text: + start = text.index(heading) + after = start + len(heading) + # This entry pre-dates marker-based additive studies and historically + # assumed it was last. Preserve any later research blocks/headings so + # older regeneration workflows cannot delete newly appended evidence. + candidates = [p for p in ( + text.find('\n + +## Five post-certificate structural extensions + +[Executed report](graph_synthesis/post_certificate/RESULTS.md), [frozen protocol](graph_synthesis/post_certificate/PROTOCOL.md), [corrections](graph_synthesis/post_certificate/CORRECTIONS.md), and [five figures](graph_synthesis/post_certificate/figures/). Recorded target outcomes: **H1: met; H2: not met; H3: met; H4: met; H5: met.** H4 covers only endpoint scenarios; its broader continuous-interval minimax claim is unsupported, with an interior counterexample retained. Counted H1 reduction: 99.26%; local H2 reduction: 90.11%, connected-control saving: 0.00%. No fresh Jev calls, independent semantic-accuracy claim, external-system superiority or production-policy change. + + diff --git a/graph_synthesis/post_certificate/PAPER_SECTION.md b/graph_synthesis/post_certificate/PAPER_SECTION.md new file mode 100644 index 0000000..0d89e75 --- /dev/null +++ b/graph_synthesis/post_certificate/PAPER_SECTION.md @@ -0,0 +1,75 @@ +# Post-certificate structural extensions for Jev graph synthesis + +Timothy Wayne Gregg | AI-assisted author-review research extension | September 18, 2026; corrected September 28, 2026 + +## Abstract + +Five precommitted controlled extensions were executed after the dependence-aware certificate study. Recorded frozen-target outcomes: **H1: met; H2: not met; H3: met; H4: met; H5: met.** These are separate algorithmic conjunctions, not a pooled success percentage. The experiments address induced-width repair, transactional delta maintenance, query resilience, finite endpoint-scenario review and n-ary conflict constraints. **H4 tests endpoint scenarios only; it does not establish minimax review over continuous probability intervals.** An interior counterexample below rejects that broader interpretation. No new semantic-accuracy observations, deployment guarantees or external-system superiority are established. + +## 1. Frozen protocol and evidence boundary + +The protocol was committed as `8187cc4e4b98e40f3146ce787b71f262b62b3abd` against baseline `9d2e4a60a6c79e616ab1d352cd5da9fe414e6c98` before implementation and execution. Its bytes, fixture definitions, caps, seed `20260923` and thresholds remain unchanged. **Fresh Jev calls: 0. New scientific documents: 0.** This is exploratory follow-up, not independent preregistration. + +[The correction record](../graph_synthesis/post_certificate/CORRECTIONS.md) distinguishes repaired implementation/control defects from the preserved protocol. H4's frozen Method explicitly specifies interval endpoint vectors; its former broader interval-minimax description is withdrawn. The supplemental negative control is outside the frozen 128-fixture population. Treewidth-aware dynamic programming, incremental view maintenance, query resilience, finite-scenario minimax decisions and hypergraph optimization have prior art; these are repository experiments, not worldwide novelty claims. + +| Hypothesis | Frozen target | Recorded outcome | +|---|---|---| +| H1: induced-width repair | zero oracle/permutation failures; solve 8 large chains; stage controls; >=90% fewer counted states | **met** | +| H2: transactional delta | zero snapshot/atomicity failures; >=80% fewer local evaluations | **not met** | +| H3: query resilience | zero oracle/witness failures; solve 8 analytic families; stage 6 controls | **met** | +| H4: endpoint-scenario review | zero endpoint-oracle discrepancies; never worse than midpoint on endpoint scenarios; strict gain on >=20% | **met**, endpoint scenarios only | +| H5: n-ary conflicts | zero oracle/permutation failures; solve 8 chains; strict gain vs pairwise projection; stage controls | **met** | + +A failed conjunction remains not met regardless of individual favorable endpoints. + +## 2. H1 - induced-width exact conflict optimization + +The solver computes deterministic min-fill order from the actual graph, checking width and allocation limits before constructing exponential tables. The shortcut based on numeric identifier distance has been removed. Of 160 small fixtures, 160 match the exhaustive objective; recorded failures: **0**; permutation failures: **0**. Width distribution: {'1': 33, '2': 45, '3': 53, '4': 29}. + +For the frozen 12-16 vertex subset, counted elimination evaluations are **14,660**, versus **1,986,560** full assignments: **99.26% reduction**. This original work counter is not total memory allocation or CPU time; a separate cumulative table-allocation guard enforces the frozen cap. Large triangle chains use an independent prefix dynamic-programming oracle. Per-fixture objectives, widths and staged controls remain in `results.json`. + +![H1. Counted exact-DP work versus full enumeration.](../graph_synthesis/post_certificate/figures/01_induced_width.svg) + +## 3. H2 - transactional batch delta maintenance + +Transactions validate revisions and updates, evaluate an overlay in computed topological order, and return it only after successful evaluation. Unknown dependencies and cycles are rejected. Across **640** accepted transactions, independent full recomputation finds **0 snapshot mismatches**. A control passes only when the expected exception is raised and original values/revision remain unchanged: injected evaluation **63/64**, stale revision **64/64**, malformed update **64/64**. Returned revision mismatches: **0**. The frozen injected-failure conjunction is not met: one selected primitive has no affected derived node, so no failure was injected. That case remains in the denominator; the exact control record is retained in `results.json`. + +Local evaluations: 16,205, versus 163,840 for full recomputation: **90.11% reduction**. Connected controls separately show **0.00% mean saving**. These are in-memory atomic batches, not crash durability or concurrent database isolation. + +![H2. Local work and connected-control boundary.](../graph_synthesis/post_certificate/figures/02_transactional_delta.svg) + +## 4. H3 - exact query-resilience certificates + +For supplied monotone DNF lineage and removal costs, incidence decomposition and bounded branch-and-bound find a minimum-cost deletion set hitting each active proof clause. **160/160** small fixtures match the exhaustive oracle. Recorded oracle, witness or control failures: **0**. All 8 analytic-family results and 6 over-cap controls are retained. This is conditional structural resilience, not factual truth or calibrated review effort. + +![H3. Recorded resilience cost in decomposable families.](../graph_synthesis/post_certificate/figures/03_resilience.svg) + +## 5. H4 - endpoint-scenario query review + +The selector minimizes worst-case expected residual Bernoulli variance **over the finite Cartesian product of interval endpoints**, with two reviews. Production uses Shannon recursion; the independent checker enumerates Boolean worlds over the same endpoint scenarios. Neither searches interval interiors. + +Across 128 frozen fixtures, endpoint-oracle discrepancies: **0**; cases worse than midpoint on endpoint scenarios: **0**. Strict endpoint gains: **45/128 (35.16%)**, comprising 13 random and 32 engineered fixtures. Point-interval controls pass **16/16**. + +**Continuous-interval claim: unsupported.** For singleton queries with intervals `0=[0.1,0.9]`, `1=[0.3,0.4]`, `2=[0.5,0.5]`, the supplemental control selects reviews [1, 2] and reports endpoint worst loss 0.09. The allowed interior witness `p0=0.5` yields **0.25**. Reviewing [0, 2] has analytic continuous worst loss **0.24**. The endpoint choice is therefore not continuous-interval minimax. This negative evidence is separate from the preserved endpoint target. Independent primitives are assumed; no dependence or semantic-calibration guarantee follows. + +![H4. Endpoint-scenario outcomes only; continuous interval claim unsupported.](../graph_synthesis/post_certificate/figures/04_interval_review.svg) + +## 6. H5 - n-ary conflict constraints + +A forbidden hyperedge rejects only its all-selected assignment; pairwise conflict is the arity-two case. **160/160** small fixtures match exhaustive optimization; recorded failures: **0**; permutation failures: **0**. Eight chains compare against `n - floor(n/3)`, with objectives and staging controls retained. At the largest chain, retained n-ary utility is **1366**, versus **683** under deliberately over-conservative pairwise projection. + +![H5. N-ary repair versus pairwise projection.](../graph_synthesis/post_certificate/figures/05_hypergraph.svg) + +## 7. Interpretation + +Every result is conditional on supplied graphs, lineage, costs, constraints or finite probability scenarios. Work counters do not measure wall-clock/API latency or cloud cost. The H4 interior counterexample rejects the broader interval-minimax interpretation. None establishes correct extracted entities, relations, qualifiers or probabilities. No production graph policy changes here. + +## 8. Reproducibility + +```bash +python -B -m unittest discover -s graph_synthesis/post_certificate/tests -v +python -B -m graph_synthesis.post_certificate.run --check +python -B -m graph_synthesis.post_certificate.report --check --update-paper +``` + +`results.json` retains outcomes and controls; `summary.csv` and five SVGs derive from those measurements. Manual validation also checks protocol ancestry/bytes, archive integrity, deterministic HTML and current-paper build hashes. The correction record documents implementation and interpretation changes; the frozen protocol is unchanged. diff --git a/graph_synthesis/post_certificate/PROTOCOL.md b/graph_synthesis/post_certificate/PROTOCOL.md new file mode 100644 index 0000000..8b20e6a --- /dev/null +++ b/graph_synthesis/post_certificate/PROTOCOL.md @@ -0,0 +1,149 @@ +# Frozen protocol: post-certificate graph-synthesis improvements + +Baseline: `9d2e4a60a6c79e616ab1d352cd5da9fe414e6c98` (merged PR #20) +Protocol date: 2026-09-18 +Status: frozen before implementation/execution +Fresh Jev service calls planned: 0 +New scientific documents planned: 0 +Seed: 20260923 + +## Scope and evidence boundary + +The merged evidence separates semantic extraction quality from structural correctness. Repeated prompt/routing/calibration variants have not established a robust semantic advantage, while bounded exact graph algorithms, dependence-aware certificates, repair semantics and delta maintenance have repeatedly passed controlled tests. This protocol therefore tests five **structural / decision-theoretic extensions** suggested by those results rather than another prompt variant. + +The five mechanisms below were not found as executed implementations in the baseline repository inventory. That is a repository-scope statement, not a worldwide novelty claim. Their ingredients have substantial prior art: treewidth/variable-elimination dynamic programming, incremental view maintenance and transactions, query resilience/deletion propagation, robust/minimax decision making under imprecise probabilities, and weighted constraint/hypergraph optimization. + +No experiment changes candidate extraction, accepted Jev edges, production defaults, or the frozen original evidence. Controlled priorities, probabilities, costs and constraints are supplied inputs and must not be reinterpreted as calibrated factual truth. + +## H1 - Induced-width exact conflict optimization + +### Motivation +Prior studies established exact handling for bounded enumeration, forests, cutsets and bipartite conflict graphs. A remaining gap is connected non-bipartite cyclic structure that is still tractable because its induced width is small. + +### Method +Implement max-sum variable elimination for maximum-weight compatible assertion selection over pairwise conflict factors. A deterministic min-fill elimination order is computed without using assertion weights. Execution is allowed only when: +- induced width <= 4; +- every factor scope is <= 5 variables; +- cumulative materialized factor states <= 250,000. + +Otherwise the component is staged without a partial write. The returned assignment includes objective value, selected assertion IDs, elimination order, induced width and a direct feasibility check. + +### Frozen test +- 160 seeded small connected graphs, 8-16 vertices, generated from bounded-width constructions with random non-negative integer weights. +- Independent exhaustive subset oracle for every small fixture. +- 8 connected large triangle-chain / partial-2-tree fixtures from 33 through 1,025 vertices, checked by an independently implemented chain dynamic program. +- 5 over-width clique controls (K6-K10) that must stage. +- 8 input-order permutations per first 64 small fixtures. + +### Primary target +Zero objective, feasibility, witness or permutation failures; all 8 large tractable fixtures solved; all 5 over-width controls staged. On the 12-16 vertex small subset, counted max-sum table states must be at least 90% below the full 2^n assignment count in aggregate. + +## H2 - Transactional batch delta maintenance + +### Motivation +Merged studies validate local incremental maintenance and revision checks, but explicitly stop at sequential in-memory updates. Real graph changes often arrive as batches whose derived consequences must be all-or-nothing. + +### Method +Implement an in-memory transactional dependency engine for Boolean primitives and derived facts over an acyclic dependency graph. A transaction: +1. validates expected revision and every primitive change; +2. computes the affected reverse-dependency closure; +3. evaluates the new values in topological order against a copy-on-write overlay; +4. commits the complete overlay only if every evaluation succeeds. + +Injected evaluation failure, malformed update, or stale revision must leave both values and revision unchanged. This is atomic batch behavior only; no crash durability or concurrent database-isolation claim is made. + +### Frozen test +- 128 seeded modular DAGs with 64 primitive nodes and 256 derived nodes. +- Five 1-4 primitive transactions per DAG (640 accepted local transactions total), each compared with independent full recomputation from the post-transaction primitive snapshot. +- 64 injected evaluation-failure controls, 64 stale-revision controls and 64 malformed-update controls. +- 16 connected-control DAGs in which one primitive intentionally reaches nearly every derived node. + +### Primary target +Zero snapshot mismatches and zero partial-write/revision failures. Local transactions must perform at least 80% fewer derived-node evaluations than full recomputation in aggregate. The connected control must remain reported separately and must not be used to infer universal savings. + +## H3 - Exact query-resilience certificates + +### Motivation +The repository can classify query answers across repairs, but binary certainty does not quantify how much evidence must change before a currently true monotone query becomes false. A robustness margin can distinguish a query supported by many independent proof paths from one resting on a single fragile atom. + +### Method +For a monotone DNF lineage with positive integer evidence-removal costs, compute the minimum-cost evidence set whose deletion hits every active proof clause. The implementation uses: +- incidence-component decomposition; +- forced singleton reductions; +- branch-and-bound with deterministic branching; +- a disjoint-clause lower bound; +- explicit deletion witness validation. + +Connected components above 18 distinct evidence atoms stage rather than silently approximate. + +### Frozen test +- 160 seeded small DNF fixtures with <=12 atoms and 2-10 proof clauses. +- Independent exhaustive deletion-subset oracle for every small fixture. +- 8 analytic large fixtures composed of hundreds to thousands of disconnected proof components, with closed-form expected resilience. +- 6 over-cap connected controls that must stage. +- Mutation checks that every returned deletion set actually falsifies the query and removing any positive-cost proper subset does not beat the reported optimum. + +### Primary target +Zero optimum/witness/oracle failures; all 8 analytic large fixtures solved exactly; all 6 over-cap controls staged. The result is a resilience certificate relative to supplied lineage and costs, not factual truth. + +## H4 - Interval-minimax query review + +### Motivation +Prior query-directed review assumes point probabilities. Multiple merged studies show that point risk estimates and calibration can fail. Review selection should therefore be stress-tested against uncertainty in the supplied probabilities themselves. + +### Method +Each primitive has an independent probability interval [lo, hi]. For a fixed review budget of two primitives, choose the review set that minimizes the **worst-case expected residual Bernoulli variance** of supplied monotone queries across all interval endpoint vectors. Perfect review reveals the selected primitive states. The production method evaluates query probability by memoized Shannon recursion; the independent oracle enumerates complete Boolean worlds directly. + +A midpoint selector using the same expected-loss objective at interval midpoints is the comparator. This study does not remove the conditional-independence assumption; it tests robustness to marginal imprecision only. + +### Frozen test +- 96 seeded six-atom interval fixtures with 1-3 monotone DNF queries. +- 32 engineered interval controls where midpoint ranking is intentionally fragile. +- Every candidate review pair checked by the independent world-enumeration oracle. +- Degenerate point-interval controls must reduce exactly to the point-probability solution. + +### Primary target +Zero production/oracle objective discrepancies above 1e-10. The minimax selector's worst-case objective must never exceed the midpoint selector's worst-case objective, and must be strictly lower on at least 20% of the 128 non-degenerate fixtures. + +## H5 - N-ary conflict constraints + +### Motivation +Every merged graph-repair optimizer represents incompatibility as pairwise edges. Some consistency rules are genuinely n-ary (for example, “not all three assertions may coexist”) and a pairwise clique projection can remove compatible pairs unnecessarily. + +### Method +Generalize max-sum elimination to forbidden hyperedge factors: a factor contributes negative infinity only when every member of the forbidden set is selected. Pairwise conflicts are size-2 hyperedges. The same deterministic induced-width and state caps as H1 apply, and returned selections are checked directly against every hyperedge. + +### Frozen test +- 160 seeded small weighted hypergraphs with 8-14 vertices, size-2 and size-3 forbidden sets, compared with exhaustive subset optimization. +- 8 large three-consecutive-forbidden chain fixtures from 64 through 2,048 vertices. With unit weights, the known optimum is n - floor(n/3). +- Pairwise-clique projection of each size-3 hyperedge is retained as an explicit over-conservative baseline. +- 5 high-arity / over-width controls must stage. +- 8 permutations per first 64 small fixtures. + +### Primary target +Zero objective/feasibility/oracle/permutation failures; all 8 large chain fixtures solved exactly; all 5 controls staged. On every large chain, the n-ary optimizer must retain at least as much supplied utility as pairwise projection and strictly more on all fixtures. + +## Reporting and falsification rules + +- A failed conjunction remains failed even if some endpoints improve. +- No five-result success percentage may be reported. +- Negative/null outcomes remain in results and figures. +- Work counters (factor states, node evaluations) are not wall-clock, API-latency or cloud-cost measurements. +- No controlled algorithm result may be described as independent Jev semantic accuracy. +- No external system superiority is claimed without a matched executed baseline. +- The current manuscript must preserve every prior study and append this section additively. + +## Reproducibility target + +The implementation will provide: +- `graph_synthesis/post_certificate/run.py` +- `graph_synthesis/post_certificate/methods.py` +- `graph_synthesis/post_certificate/tests/` +- `graph_synthesis/post_certificate/results.json` +- `graph_synthesis/post_certificate/summary.csv` +- `graph_synthesis/post_certificate/RESULTS.md` +- five deterministic SVG figures +- additive updates to `CURRENT_RESULTS.md` and `manuscript/paper-current.md` +- a read-only GitHub Actions workflow that replays all five experiments and tests. + +Protocol thresholds, fixture counts, caps and seed must not be changed after benchmark execution except to correct an implementation bug; any such correction must be documented without changing the frozen success criteria. diff --git a/graph_synthesis/post_certificate/RESULTS.md b/graph_synthesis/post_certificate/RESULTS.md new file mode 100644 index 0000000..82a72bb --- /dev/null +++ b/graph_synthesis/post_certificate/RESULTS.md @@ -0,0 +1,75 @@ +# Post-certificate structural extensions for Jev graph synthesis + +Timothy Wayne Gregg | AI-assisted author-review research extension | September 18, 2026; corrected September 28, 2026 + +## Abstract + +Five precommitted controlled extensions were executed after the dependence-aware certificate study. Recorded frozen-target outcomes: **H1: met; H2: not met; H3: met; H4: met; H5: met.** These are separate algorithmic conjunctions, not a pooled success percentage. The experiments address induced-width repair, transactional delta maintenance, query resilience, finite endpoint-scenario review and n-ary conflict constraints. **H4 tests endpoint scenarios only; it does not establish minimax review over continuous probability intervals.** An interior counterexample below rejects that broader interpretation. No new semantic-accuracy observations, deployment guarantees or external-system superiority are established. + +## 1. Frozen protocol and evidence boundary + +The protocol was committed as `8187cc4e4b98e40f3146ce787b71f262b62b3abd` against baseline `9d2e4a60a6c79e616ab1d352cd5da9fe414e6c98` before implementation and execution. Its bytes, fixture definitions, caps, seed `20260923` and thresholds remain unchanged. **Fresh Jev calls: 0. New scientific documents: 0.** This is exploratory follow-up, not independent preregistration. + +[The correction record](CORRECTIONS.md) distinguishes repaired implementation/control defects from the preserved protocol. H4's frozen Method explicitly specifies interval endpoint vectors; its former broader interval-minimax description is withdrawn. The supplemental negative control is outside the frozen 128-fixture population. Treewidth-aware dynamic programming, incremental view maintenance, query resilience, finite-scenario minimax decisions and hypergraph optimization have prior art; these are repository experiments, not worldwide novelty claims. + +| Hypothesis | Frozen target | Recorded outcome | +|---|---|---| +| H1: induced-width repair | zero oracle/permutation failures; solve 8 large chains; stage controls; >=90% fewer counted states | **met** | +| H2: transactional delta | zero snapshot/atomicity failures; >=80% fewer local evaluations | **not met** | +| H3: query resilience | zero oracle/witness failures; solve 8 analytic families; stage 6 controls | **met** | +| H4: endpoint-scenario review | zero endpoint-oracle discrepancies; never worse than midpoint on endpoint scenarios; strict gain on >=20% | **met**, endpoint scenarios only | +| H5: n-ary conflicts | zero oracle/permutation failures; solve 8 chains; strict gain vs pairwise projection; stage controls | **met** | + +A failed conjunction remains not met regardless of individual favorable endpoints. + +## 2. H1 - induced-width exact conflict optimization + +The solver computes deterministic min-fill order from the actual graph, checking width and allocation limits before constructing exponential tables. The shortcut based on numeric identifier distance has been removed. Of 160 small fixtures, 160 match the exhaustive objective; recorded failures: **0**; permutation failures: **0**. Width distribution: {'1': 33, '2': 45, '3': 53, '4': 29}. + +For the frozen 12-16 vertex subset, counted elimination evaluations are **14,660**, versus **1,986,560** full assignments: **99.26% reduction**. This original work counter is not total memory allocation or CPU time; a separate cumulative table-allocation guard enforces the frozen cap. Large triangle chains use an independent prefix dynamic-programming oracle. Per-fixture objectives, widths and staged controls remain in `results.json`. + +![H1. Counted exact-DP work versus full enumeration.](figures/01_induced_width.svg) + +## 3. H2 - transactional batch delta maintenance + +Transactions validate revisions and updates, evaluate an overlay in computed topological order, and return it only after successful evaluation. Unknown dependencies and cycles are rejected. Across **640** accepted transactions, independent full recomputation finds **0 snapshot mismatches**. A control passes only when the expected exception is raised and original values/revision remain unchanged: injected evaluation **63/64**, stale revision **64/64**, malformed update **64/64**. Returned revision mismatches: **0**. The frozen injected-failure conjunction is not met: one selected primitive has no affected derived node, so no failure was injected. That case remains in the denominator; the exact control record is retained in `results.json`. + +Local evaluations: 16,205, versus 163,840 for full recomputation: **90.11% reduction**. Connected controls separately show **0.00% mean saving**. These are in-memory atomic batches, not crash durability or concurrent database isolation. + +![H2. Local work and connected-control boundary.](figures/02_transactional_delta.svg) + +## 4. H3 - exact query-resilience certificates + +For supplied monotone DNF lineage and removal costs, incidence decomposition and bounded branch-and-bound find a minimum-cost deletion set hitting each active proof clause. **160/160** small fixtures match the exhaustive oracle. Recorded oracle, witness or control failures: **0**. All 8 analytic-family results and 6 over-cap controls are retained. This is conditional structural resilience, not factual truth or calibrated review effort. + +![H3. Recorded resilience cost in decomposable families.](figures/03_resilience.svg) + +## 5. H4 - endpoint-scenario query review + +The selector minimizes worst-case expected residual Bernoulli variance **over the finite Cartesian product of interval endpoints**, with two reviews. Production uses Shannon recursion; the independent checker enumerates Boolean worlds over the same endpoint scenarios. Neither searches interval interiors. + +Across 128 frozen fixtures, endpoint-oracle discrepancies: **0**; cases worse than midpoint on endpoint scenarios: **0**. Strict endpoint gains: **45/128 (35.16%)**, comprising 13 random and 32 engineered fixtures. Point-interval controls pass **16/16**. + +**Continuous-interval claim: unsupported.** For singleton queries with intervals `0=[0.1,0.9]`, `1=[0.3,0.4]`, `2=[0.5,0.5]`, the supplemental control selects reviews [1, 2] and reports endpoint worst loss 0.09. The allowed interior witness `p0=0.5` yields **0.25**. Reviewing [0, 2] has analytic continuous worst loss **0.24**. The endpoint choice is therefore not continuous-interval minimax. This negative evidence is separate from the preserved endpoint target. Independent primitives are assumed; no dependence or semantic-calibration guarantee follows. + +![H4. Endpoint-scenario outcomes only; continuous interval claim unsupported.](figures/04_interval_review.svg) + +## 6. H5 - n-ary conflict constraints + +A forbidden hyperedge rejects only its all-selected assignment; pairwise conflict is the arity-two case. **160/160** small fixtures match exhaustive optimization; recorded failures: **0**; permutation failures: **0**. Eight chains compare against `n - floor(n/3)`, with objectives and staging controls retained. At the largest chain, retained n-ary utility is **1366**, versus **683** under deliberately over-conservative pairwise projection. + +![H5. N-ary repair versus pairwise projection.](figures/05_hypergraph.svg) + +## 7. Interpretation + +Every result is conditional on supplied graphs, lineage, costs, constraints or finite probability scenarios. Work counters do not measure wall-clock/API latency or cloud cost. The H4 interior counterexample rejects the broader interval-minimax interpretation. None establishes correct extracted entities, relations, qualifiers or probabilities. No production graph policy changes here. + +## 8. Reproducibility + +```bash +python -B -m unittest discover -s graph_synthesis/post_certificate/tests -v +python -B -m graph_synthesis.post_certificate.run --check +python -B -m graph_synthesis.post_certificate.report --check --update-paper +``` + +`results.json` retains outcomes and controls; `summary.csv` and five SVGs derive from those measurements. Manual validation also checks protocol ancestry/bytes, archive integrity, deterministic HTML and current-paper build hashes. The correction record documents implementation and interpretation changes; the frozen protocol is unchanged. diff --git a/graph_synthesis/post_certificate/__init__.py b/graph_synthesis/post_certificate/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/graph_synthesis/post_certificate/figures/01_induced_width.svg b/graph_synthesis/post_certificate/figures/01_induced_width.svg new file mode 100644 index 0000000..2a6b63d --- /dev/null +++ b/graph_synthesis/post_certificate/figures/01_induced_width.svg @@ -0,0 +1,26 @@ + + +H1 | Exact repair work versus full enumeration + + + +0 + +3.97e+05 + +7.95e+05 + +1.19e+06 + +1.59e+06 + +1.99e+06 + +1.466e+04 +factor states + +1.987e+06 +2^n assignments +counted states +Aggregate 12-16 vertex fixtures; reduction 99.26%. Work count is not wall-clock speedup. + diff --git a/graph_synthesis/post_certificate/figures/02_transactional_delta.svg b/graph_synthesis/post_certificate/figures/02_transactional_delta.svg new file mode 100644 index 0000000..00d8292 --- /dev/null +++ b/graph_synthesis/post_certificate/figures/02_transactional_delta.svg @@ -0,0 +1,29 @@ + + +H2 | Transactional delta evaluations + + + +0 + +51.2 + +102 + +154 + +205 + +256 + +25.32 +local delta + +256 +full recompute + +256 +connected control +derived-node evaluations per transaction +Local reduction 90.11%; injected-failure controls 63/64; connected saving 0.00%. + diff --git a/graph_synthesis/post_certificate/figures/03_resilience.svg b/graph_synthesis/post_certificate/figures/03_resilience.svg new file mode 100644 index 0000000..43833c9 --- /dev/null +++ b/graph_synthesis/post_certificate/figures/03_resilience.svg @@ -0,0 +1,17 @@ + + +H3 | Exact resilience on decomposable proof families + + +certified cost +256 +384 +512 +768 +1024 +1280 +1536 +2048 +minimum deletion cost +Recorded oracle/witness failures: 0. Supplied lineage and costs only. + diff --git a/graph_synthesis/post_certificate/figures/04_interval_review.svg b/graph_synthesis/post_certificate/figures/04_interval_review.svg new file mode 100644 index 0000000..a3aaa9e --- /dev/null +++ b/graph_synthesis/post_certificate/figures/04_interval_review.svg @@ -0,0 +1,29 @@ + + +H4 | Endpoint-scenario review outcomes + + + +0 + +16.6 + +33.2 + +49.8 + +66.4 + +83 + +45 +strict better + +83 +ties + +0 +worse +fixtures +Endpoint gains: 35.16%; discrepancies: 0. Not continuous interval minimax. + diff --git a/graph_synthesis/post_certificate/figures/05_hypergraph.svg b/graph_synthesis/post_certificate/figures/05_hypergraph.svg new file mode 100644 index 0000000..21ad610 --- /dev/null +++ b/graph_synthesis/post_certificate/figures/05_hypergraph.svg @@ -0,0 +1,19 @@ + + +H5 | N-ary versus pairwise-projected repair + + +n-ary exact + +pairwise projection +64 +128 +256 +512 +768 +1024 +1536 +2048 +retained unit utility +Pairwise clique projection is intentionally over-conservative for three-way-only conflicts. + diff --git a/graph_synthesis/post_certificate/methods.py b/graph_synthesis/post_certificate/methods.py new file mode 100644 index 0000000..cf15a84 --- /dev/null +++ b/graph_synthesis/post_certificate/methods.py @@ -0,0 +1,465 @@ +from __future__ import annotations + +from dataclasses import dataclass +from functools import lru_cache +from heapq import heappop, heappush +from itertools import combinations, product +from math import inf +from typing import Dict, Iterable, List, Mapping, Sequence, Tuple, FrozenSet, Set + +NEG_INF = -10**30 + + +@dataclass(frozen=True) +class Factor: + scope: Tuple[int, ...] + table: Mapping[Tuple[int, ...], int] + + def value(self, assignment: Mapping[int, int]) -> int: + key = tuple(assignment[v] for v in self.scope) + return self.table[key] + + +@dataclass +class EliminationResult: + status: str + objective: int | None + selected: Tuple[int, ...] + order: Tuple[int, ...] + induced_width: int + factor_states: int + + +def _scope_graph(n: int, factors: Sequence[Factor]) -> List[Set[int]]: + adj=[set() for _ in range(n)] + for f in factors: + for a,b in combinations(f.scope,2): + adj[a].add(b); adj[b].add(a) + return adj + + +def min_fill_order(n: int, factors: Sequence[Factor]) -> Tuple[List[int], int]: + adj=_scope_graph(n,factors) + active=set(range(n)) + order=[]; width=0 + versions=[0]*n + def key(v): + neigh=sorted(adj[v]) + fill=sum(b not in adj[a] for i,a in enumerate(neigh) for b in neigh[i+1:]) + return fill,len(neigh),v + heap=[] + for v in active: heappush(heap,(*key(v),versions[v])) + while active: + _,_,v,version=heappop(heap) + if v not in active or version!=versions[v]: continue + neigh=sorted(adj[v]) + # Removing v and filling its neighborhood changes scores only for + # those neighbors and vertices sharing an affected edge endpoint. + affected=set(neigh) + for a in neigh: affected.update(adj[a]) + width=max(width,len(neigh)) + for i,a in enumerate(neigh): + for b in neigh[i+1:]: + adj[a].add(b); adj[b].add(a) + adj[a].discard(v) + active.remove(v) + order.append(v) + for a in affected & active: + versions[a]+=1 + heappush(heap,(*key(a),versions[a])) + return order,width + + +def max_sum_elimination( + weights: Sequence[int], + forbidden_scopes: Sequence[Sequence[int]], + *, width_cap: int=4, + state_cap: int=250_000, +) -> EliminationResult: + n=len(weights) + if type(width_cap) is not int or width_cap<0 or type(state_cap) is not int or state_cap<0: + raise ValueError('caps must be nonnegative integers') + if any(type(w) is not int or w<0 for w in weights): + raise ValueError('weights must be nonnegative integers') + scopes=[] + for raw in forbidden_scopes: + if any(type(v) is not int or not 0<=vwidth_cap: + return EliminationResult('staged',None,tuple(),tuple(),len(scope)-1,0) + scopes.append(scope) + materialized=2*n + for scope in scopes: + # Avoid even constructing an unbounded integer for a huge custom cap. + remaining=state_cap-materialized + if remaining<0 or len(scope)>=max(1,remaining.bit_length()): + return EliminationResult('staged',None,tuple(),tuple(),0,0) + materialized+=1<state_cap: + return EliminationResult('staged',None,tuple(),tuple(),0,0) + order,width=min_fill_order(n,[Factor(scope,{}) for scope in scopes]) + if width>width_cap: + return EliminationResult('staged',None,tuple(),tuple(order),width,0) + factors: List[Factor]=[] + for v,w in enumerate(weights): + factors.append(Factor((v,),{(0,):0,(1,):int(w)})) + for scope in scopes: + table={bits:(NEG_INF if all(bits) else 0) for bits in product((0,1), repeat=len(scope))} + factors.append(Factor(scope,table)) + work=list(factors) + back=[] + states=0 + for v in order: + touched=[f for f in work if v in f.scope] + work=[f for f in work if v not in f.scope] + union=sorted({x for f in touched for x in f.scope if x!=v}) + if len(union)>width_cap: + return EliminationResult('staged',None,tuple(),tuple(order),max(width,len(union)),states) + output_states=1<state_cap or states+2*output_states>state_cap: + return EliminationResult('staged',None,tuple(),tuple(order),width,states) + materialized+=output_states + choices={} + new_table={} + for bits in product((0,1), repeat=len(union)): + base=dict(zip(union,bits)) + vals=[] + for xv in (0,1): + a=dict(base); a[v]=xv + score=0 + for f in touched: + fv=f.value(a) + if fv<=NEG_INF: + score=NEG_INF; break + score+=fv + vals.append(score) + states+=1 + # deterministic tie: prefer selected only when strictly better + if vals[1]>vals[0]: + best=1; val=vals[1] + else: + best=0; val=vals[0] + choices[bits]=best + new_table[bits]=val + back.append((v,tuple(union),choices)) + work.append(Factor(tuple(union),new_table)) + total=0 + for f in work: + if f.scope: + raise AssertionError('nonconstant factor remains') + total+=f.table[()] + assignment={} + for v,scope,choices in reversed(back): + key=tuple(assignment[x] for x in scope) + assignment[v]=choices[key] + selected=tuple(v for v in range(n) if assignment.get(v,0)) + # direct feasibility + for scope in forbidden_scopes: + if all(assignment.get(v,0) for v in scope): + raise AssertionError('returned infeasible assignment') + obj=sum(weights[v] for v in selected) + if obj!=total: + raise AssertionError((obj,total)) + return EliminationResult('solved',obj,selected,tuple(order),width,states) + + +def brute_force_optimum(weights: Sequence[int], forbidden_scopes: Sequence[Sequence[int]]) -> Tuple[int,Tuple[int,...]]: + n=len(weights); best=-1; best_sel=tuple() + for mask in range(1<>v)&1 for v in scope): + ok=False; break + if not ok: continue + score=sum(weights[v] for v in range(n) if (mask>>v)&1) + sel=tuple(v for v in range(n) if (mask>>v)&1) + if score>best or (score==best and sel bool: + if op=='and': return all(vals) + if op=='or': return any(vals) + if op=='xor': + x=False + for v in vals: x ^= bool(v) + return x + raise ValueError(op) + + def full_recompute(self, primitive_values: Mapping[int,bool]) -> Dict[int,bool]: + values={i:bool(primitive_values[i]) for i in range(self.primitive_count)} + for node in self.derived_order: + op,deps=self.definitions[node] + values[node]=self.eval_op(op,[values[d] for d in deps]) + return values + + def transact(self, values: Mapping[int,bool], revision: int, changes: Mapping[int,bool], *, expected_revision: int, fail_node: int|None=None): + if expected_revision!=revision: + raise RuntimeError('stale revision') + for p,v in changes.items(): + if not isinstance(p,int) or p<0 or p>=self.primitive_count or not isinstance(v,bool): + raise ValueError('malformed update') + overlay=dict(values) + changed=[] + for p,v in changes.items(): + if overlay[p]!=v: + overlay[p]=v; changed.append(p) + affected=set() + frontier=list(changed) + while frontier: + x=frontier.pop() + for y in self.reverse[x]: + if y not in affected: + affected.add(y); frontier.append(y) + evals=0 + for node in self.derived_order: + if node not in affected: continue + if fail_node is not None and node==fail_node: + raise RuntimeError('injected evaluation failure') + op,deps=self.definitions[node] + overlay[node]=self.eval_op(op,[overlay[d] for d in deps]) + evals+=1 + return overlay,revision+1,evals + + +def _normalize_clauses(clauses: Iterable[Iterable[int]]) -> Tuple[FrozenSet[int],...]: + xs=sorted({frozenset(c) for c in clauses}, key=lambda s:(len(s),tuple(sorted(s)))) + out=[] + for c in xs: + if not c: + return (frozenset(),) + if any(d.issubset(c) for d in out): + continue + out.append(c) + return tuple(out) + + +def _incidence_components(clauses: Sequence[FrozenSet[int]]) -> List[Tuple[FrozenSet[int],Tuple[FrozenSet[int],...]]]: + atoms=set().union(*clauses) if clauses else set() + adj={a:set() for a in atoms} + for c in clauses: + for a in c: + adj[a].update(c-{a}) + comps=[]; seen=set() + for a in sorted(atoms): + if a in seen: continue + stack=[a]; seen.add(a); comp=set() + while stack: + x=stack.pop(); comp.add(x) + for y in adj[x]: + if y not in seen: seen.add(y); stack.append(y) + cclauses=tuple(c for c in clauses if c & comp) + comps.append((frozenset(comp),cclauses)) + return comps + + +def _disjoint_clause_lb(clauses: Sequence[FrozenSet[int]], costs: Mapping[int,int]) -> int: + used=set(); lb=0 + for c in sorted(clauses,key=lambda x:(len(x),min(costs[a] for a in x))): + if c.isdisjoint(used): + lb+=min(costs[a] for a in c) + used.update(c) + return lb + + +def _solve_hitting_component(clauses: Sequence[FrozenSet[int]], costs: Mapping[int,int]) -> Tuple[int,Set[int]]: + clauses=_normalize_clauses(clauses) + best_cost=10**18; best_set:set[int]=set() + memo={} + def rec(cs: Tuple[FrozenSet[int],...], chosen: FrozenSet[int], cost: int): + nonlocal best_cost,best_set + if not cs: + if cost=best_cost: + return + # forced singleton first, else shortest cheapest clause + target=min(cs,key=lambda c:(len(c),sum(costs[a] for a in c),tuple(sorted(c)))) + for a in sorted(target,key=lambda x:(costs[x],x)): + nc=tuple(c for c in cs if a not in c) + rec(_normalize_clauses(nc), chosen|frozenset((a,)), cost+costs[a]) + rec(tuple(clauses),frozenset(),0) + return best_cost,best_set + + +def query_resilience(clauses: Sequence[Sequence[int]], costs: Mapping[int,int], *, component_cap:int=18): + norm=_normalize_clauses(clauses) + if not norm: + return {'status':'already_false','cost':0,'delete':tuple()} + if norm==(frozenset(),): + return {'status':'unstageable_true','cost':None,'delete':tuple()} + total=0; chosen=set() + for atoms,cc in _incidence_components(norm): + if len(atoms)>component_cap: + return {'status':'staged','cost':None,'delete':tuple()} + c,s=_solve_hitting_component(cc,costs) + total+=c; chosen.update(s) + delete=tuple(sorted(chosen)) + # witness: all clauses hit + if any(set(c).isdisjoint(chosen) for c in norm): + raise AssertionError('invalid deletion witness') + return {'status':'solved','cost':total,'delete':delete} + + +def brute_force_resilience(clauses: Sequence[Sequence[int]], costs: Mapping[int,int]): + atoms=sorted(set().union(*(set(c) for c in clauses))) + best=10**18; best_set=tuple() + for mask in range(1<>i)&1} + if all(set(c)&chosen for c in clauses): + cost=sum(costs[a] for a in chosen) + sel=tuple(sorted(chosen)) + if cost Tuple[Tuple[int,...],...]: + out=[] + if value: + for c in clauses: + if atom in c: + nc=tuple(x for x in c if x!=atom) + if not nc: return (tuple(),) + out.append(nc) + else: + out.append(c) + else: + for c in clauses: + if atom not in c: out.append(c) + # remove duplicates and supersets + sets=_normalize_clauses(out) + return tuple(tuple(sorted(s)) for s in sets) + + +def dnf_probability_shannon(clauses: Sequence[Sequence[int]], probs: Mapping[int,float]) -> float: + norm=tuple(tuple(sorted(s)) for s in _normalize_clauses(clauses)) + @lru_cache(maxsize=None) + def rec(cs: Tuple[Tuple[int,...],...]) -> float: + if not cs: return 0.0 + if cs==(tuple(),): return 1.0 + atoms=sorted({a for c in cs for a in c}) + a=atoms[0]; p=probs[a] + return p*rec(_condition_dnf(cs,a,1))+(1-p)*rec(_condition_dnf(cs,a,0)) + return rec(norm) + + +def dnf_probability_worlds(clauses: Sequence[Sequence[int]], probs: Mapping[int,float], fixed: Mapping[int,int]|None=None) -> float: + fixed=dict(fixed or {}) + atoms=sorted(set(probs)-set(fixed)) + total=0.0 + for bits in product((0,1),repeat=len(atoms)): + ass={**fixed,**dict(zip(atoms,bits))} + pw=1.0 + for a,b in zip(atoms,bits): + p=probs[a]; pw*=p if b else (1-p) + truth=any(all(ass.get(a,0) for a in c) for c in clauses) + if truth: total+=pw + return total + + +def expected_residual_variance(queries: Sequence[Sequence[Sequence[int]]], probs: Mapping[int,float], review: Sequence[int], *, method='shannon') -> float: + review=tuple(review) + total=0.0 + for obs in product((0,1), repeat=len(review)): + fixed=dict(zip(review,obs)) + pobs=1.0 + for a,b in fixed.items(): + p=probs[a]; pobs*=p if b else (1-p) + if pobs==0: continue + for q in queries: + cond=[] + forced_true=False + for c in q: + impossible=False; rem=[] + for a in c: + if a in fixed: + if not fixed[a]: impossible=True; break + else: rem.append(a) + if not impossible: + if not rem: forced_true=True; break + cond.append(rem) + if forced_true: + qp=1.0 + elif not cond: + qp=0.0 + else: + if method=='shannon': + qp=dnf_probability_shannon(cond,probs) + else: + qp=dnf_probability_worlds(cond,probs) + total+=pobs*qp*(1-qp) + return total + + +def select_endpoint_minimax(queries, intervals: Mapping[int,Tuple[float,float]], budget:int=2): + """Minimize the frozen finite endpoint-scenario objective, not interval interiors.""" + atoms=tuple(sorted(intervals)) + candidates=list(combinations(atoms,budget)) + endpoints=[] + for bits in product((0,1),repeat=len(atoms)): + endpoints.append({a:intervals[a][bits[i]] for i,a in enumerate(atoms)}) + worst={} + for r in candidates: + vals=[expected_residual_variance(queries,p,r,method='shannon') for p in endpoints] + worst[r]=max(vals) + minimax=min(candidates,key=lambda r:(worst[r],r)) + mid={a:(lo+hi)/2 for a,(lo,hi) in intervals.items()} + point_obj={r:expected_residual_variance(queries,mid,r,method='shannon') for r in candidates} + midpoint=min(candidates,key=lambda r:(point_obj[r],r)) + return {'minimax':minimax,'minimax_worst':worst[minimax], 'midpoint':midpoint,'midpoint_worst':worst[midpoint], 'all_worst':worst} + + +def oracle_endpoint_worst(queries, intervals: Mapping[int,Tuple[float,float]], review: Sequence[int]) -> float: + """Independent world enumeration over the same finite endpoint scenarios.""" + atoms=tuple(sorted(intervals)); worst=0.0 + for bits in product((0,1),repeat=len(atoms)): + p={a:intervals[a][bits[i]] for i,a in enumerate(atoms)} + v=expected_residual_variance(queries,p,review,method='world') + worst=max(worst,v) + return worst diff --git a/graph_synthesis/post_certificate/report.py b/graph_synthesis/post_certificate/report.py new file mode 100644 index 0000000..3b1f58b --- /dev/null +++ b/graph_synthesis/post_certificate/report.py @@ -0,0 +1,232 @@ +from __future__ import annotations + +import argparse, csv, hashlib, io, json, math, sys +from pathlib import Path + +HERE=Path(__file__).resolve().parent +ROOT=HERE.parents[1] +RESULTS=HERE/'results.json' +FIGDIR=HERE/'figures' +START='' +END='' + + +def pct(x): return f"{100*x:.2f}%" + +def fmt(x): + if isinstance(x,float): return f"{x:.6g}" + return str(x) + + +def svg_bar(title, labels, values, ylabel, note=''): + W,H=1200,700; ml,mr,mt,mb=120,60,100,150 + pw=W-ml-mr; ph=H-mt-mb + vmax=max(values) if values else 1 + if vmax<=0: vmax=1 + n=len(values); gap=24; bw=(pw-gap*(n+1))/max(1,n) + out=[f'', + '', + f'{title}', + f'', + f''] + for t in range(6): + y=mt+ph-(ph*t/5); val=vmax*t/5 + out += [f'', + f'{val:.3g}'] + for i,(lab,val) in enumerate(zip(labels,values)): + x=ml+gap+i*(bw+gap); h=ph*val/vmax; y=mt+ph-h + out += [f'', + f'{val:.4g}', + f'{lab}'] + out += [f'{ylabel}'] + if note: + out += [f'{note}'] + out.append('') + return '\n'.join(out)+'\n' + + +def svg_lines(title, xs, series, ylabel, note=''): + W,H=1200,700; ml,mr,mt,mb=120,70,100,150; pw=W-ml-mr; ph=H-mt-mb + ymax=max(max(vals) for _,vals in series) if series else 1; xmax=max(xs); xmin=min(xs) + if ymax<=0:ymax=1 + out=[f'','', + f'{title}', + f''] + dash=['','6,5','2,5','10,4'] + for si,(name,vals) in enumerate(series): + pts=[] + for x,v in zip(xs,vals): + xx=ml+pw*(x-xmin)/(xmax-xmin if xmax!=xmin else 1); yy=mt+ph-ph*v/ymax; pts.append(f'{xx:.1f},{yy:.1f}') + out.append(f'') + out.append(f'{name}') + for x in xs: + xx=ml+pw*(x-xmin)/(xmax-xmin if xmax!=xmin else 1) + out.append(f'{x}') + out.append(f'{ylabel}') + if note: out.append(f'{note}') + out.append('') + return '\n'.join(out)+'\n' + + +def generated(r): + h1,h2,h3,h4,h5=[r[f'H{i}'] for i in range(1,6)] + files={} + files['figures/01_induced_width.svg']=svg_bar( + 'H1 | Exact repair work versus full enumeration', + ['factor states','2^n assignments'],[h1['counted_factor_states'],h1['full_assignment_count']], 'counted states', + f"Aggregate 12-16 vertex fixtures; reduction {pct(h1['state_reduction'])}. Work count is not wall-clock speedup.") + files['figures/02_transactional_delta.svg']=svg_bar( + 'H2 | Transactional delta evaluations', ['local delta','full recompute','connected control'], + [h2['local_evaluations']/h2['accepted_transactions'],256,256], 'derived-node evaluations per transaction', + f"Local reduction {pct(h2['evaluation_reduction'])}; injected-failure controls {h2['failure_atomic_controls']}/64; connected saving {pct(h2['connected_mean_reduction'])}.") + xs=[x['proof_components'] for x in h3['large']] + files['figures/03_resilience.svg']=svg_lines('H3 | Exact resilience on decomposable proof families',xs,[('certified cost',[x['cost'] for x in h3['large']])],'minimum deletion cost',f"Recorded oracle/witness failures: {len(h3['failures'])}. Supplied lineage and costs only.") + files['figures/04_interval_review.svg']=svg_bar('H4 | Endpoint-scenario review outcomes', + ['strict better','ties','worse'],[h4['strict_improvements'],h4['fixtures']-h4['strict_improvements']-h4['worse_than_midpoint'],h4['worse_than_midpoint']], 'fixtures', + f"Endpoint gains: {pct(h4['strict_fraction'])}; discrepancies: {h4['oracle_discrepancies']}. Not continuous interval minimax.") + xs=[x['n'] for x in h5['large']] + files['figures/05_hypergraph.svg']=svg_lines('H5 | N-ary versus pairwise-projected repair',xs, + [('n-ary exact',[x['objective'] for x in h5['large']]),('pairwise projection',[x['pairwise_projection'] for x in h5['large']])], 'retained unit utility', + 'Pairwise clique projection is intentionally over-conservative for three-way-only conflicts.') + + outcomes={f'H{i}':('met' if r[f'H{i}']['primary_target_met'] else 'not met') for i in range(1,6)} + outcome_sentence='; '.join(f'{key}: {value}' for key,value in outcomes.items())+'.' + counter=h4['interior_counterexample'] + summary=[ + ['hypothesis','result','primary_measure','value','boundary'], + ['H1',outcomes['H1'],'factor-state reduction',f"{h1['state_reduction']:.12f}",'counted DP states, not wall-clock'], + ['H2',outcomes['H2'],'local evaluation reduction',f"{h2['evaluation_reduction']:.12f}",'connected control reported separately'], + ['H3',outcomes['H3'],'recorded oracle/witness failures',str(len(h3['failures'])),'supplied lineage and costs only'], + ['H4',outcomes['H4'],'strict endpoint-scenario improvements',str(h4['strict_improvements']),'finite endpoint scenarios; continuous interval claim unsupported'], + ['H5',outcomes['H5'],'recorded oracle/control failures',str(len(h5['failures'])),'supplied n-ary constraints and utility'], + ] + buffer=io.StringIO(newline='') + csv.writer(buffer,lineterminator='\n').writerows(summary) + files['summary.csv']=buffer.getvalue() + report=f'''# Post-certificate structural extensions for Jev graph synthesis + +Timothy Wayne Gregg | AI-assisted author-review research extension | September 18, 2026; corrected September 28, 2026 + +## Abstract + +Five precommitted controlled extensions were executed after the dependence-aware certificate study. Recorded frozen-target outcomes: **{outcome_sentence}** These are separate algorithmic conjunctions, not a pooled success percentage. The experiments address induced-width repair, transactional delta maintenance, query resilience, finite endpoint-scenario review and n-ary conflict constraints. **H4 tests endpoint scenarios only; it does not establish minimax review over continuous probability intervals.** An interior counterexample below rejects that broader interpretation. No new semantic-accuracy observations, deployment guarantees or external-system superiority are established. + +## 1. Frozen protocol and evidence boundary + +The protocol was committed as `{r['protocol_commit']}` against baseline `{r['baseline_commit']}` before implementation and execution. Its bytes, fixture definitions, caps, seed `{r['seed']}` and thresholds remain unchanged. **Fresh Jev calls: {r['fresh_jev_calls']}. New scientific documents: {r['new_scientific_documents']}.** This is exploratory follow-up, not independent preregistration. + +[The correction record](CORRECTIONS.md) distinguishes repaired implementation/control defects from the preserved protocol. H4's frozen Method explicitly specifies interval endpoint vectors; its former broader interval-minimax description is withdrawn. The supplemental negative control is outside the frozen 128-fixture population. Treewidth-aware dynamic programming, incremental view maintenance, query resilience, finite-scenario minimax decisions and hypergraph optimization have prior art; these are repository experiments, not worldwide novelty claims. + +| Hypothesis | Frozen target | Recorded outcome | +|---|---|---| +| H1: induced-width repair | zero oracle/permutation failures; solve 8 large chains; stage controls; >=90% fewer counted states | **{outcomes['H1']}** | +| H2: transactional delta | zero snapshot/atomicity failures; >=80% fewer local evaluations | **{outcomes['H2']}** | +| H3: query resilience | zero oracle/witness failures; solve 8 analytic families; stage 6 controls | **{outcomes['H3']}** | +| H4: endpoint-scenario review | zero endpoint-oracle discrepancies; never worse than midpoint on endpoint scenarios; strict gain on >=20% | **{outcomes['H4']}**, endpoint scenarios only | +| H5: n-ary conflicts | zero oracle/permutation failures; solve 8 chains; strict gain vs pairwise projection; stage controls | **{outcomes['H5']}** | + +A failed conjunction remains not met regardless of individual favorable endpoints. + +## 2. H1 - induced-width exact conflict optimization + +The solver computes deterministic min-fill order from the actual graph, checking width and allocation limits before constructing exponential tables. The shortcut based on numeric identifier distance has been removed. Of {h1['small_cases']} small fixtures, {h1['small_solved']} match the exhaustive objective; recorded failures: **{len(h1['failures'])}**; permutation failures: **{h1['permutation_failures']}**. Width distribution: {h1['case_width_histogram']}. + +For the frozen 12-16 vertex subset, counted elimination evaluations are **{h1['counted_factor_states']:,}**, versus **{h1['full_assignment_count']:,}** full assignments: **{pct(h1['state_reduction'])} reduction**. This original work counter is not total memory allocation or CPU time; a separate cumulative table-allocation guard enforces the frozen cap. Large triangle chains use an independent prefix dynamic-programming oracle. Per-fixture objectives, widths and staged controls remain in `results.json`. + +![H1. Counted exact-DP work versus full enumeration.](figures/01_induced_width.svg) + +## 3. H2 - transactional batch delta maintenance + +Transactions validate revisions and updates, evaluate an overlay in computed topological order, and return it only after successful evaluation. Unknown dependencies and cycles are rejected. Across **{h2['accepted_transactions']}** accepted transactions, independent full recomputation finds **{h2['snapshot_mismatches']} snapshot mismatches**. A control passes only when the expected exception is raised and original values/revision remain unchanged: injected evaluation **{h2['failure_atomic_controls']}/64**, stale revision **{h2['stale_revision_controls']}/64**, malformed update **{h2['malformed_controls']}/64**. Returned revision mismatches: **{h2['revision_mismatches']}**. The frozen injected-failure conjunction is not met: one selected primitive has no affected derived node, so no failure was injected. That case remains in the denominator; the exact control record is retained in `results.json`. + +Local evaluations: {h2['local_evaluations']:,}, versus {h2['full_recompute_evaluations']:,} for full recomputation: **{pct(h2['evaluation_reduction'])} reduction**. Connected controls separately show **{pct(h2['connected_mean_reduction'])} mean saving**. These are in-memory atomic batches, not crash durability or concurrent database isolation. + +![H2. Local work and connected-control boundary.](figures/02_transactional_delta.svg) + +## 4. H3 - exact query-resilience certificates + +For supplied monotone DNF lineage and removal costs, incidence decomposition and bounded branch-and-bound find a minimum-cost deletion set hitting each active proof clause. **{h3['small_solved']}/{h3['small_cases']}** small fixtures match the exhaustive oracle. Recorded oracle, witness or control failures: **{len(h3['failures'])}**. All {len(h3['large'])} analytic-family results and {len(h3['controls'])} over-cap controls are retained. This is conditional structural resilience, not factual truth or calibrated review effort. + +![H3. Recorded resilience cost in decomposable families.](figures/03_resilience.svg) + +## 5. H4 - endpoint-scenario query review + +The selector minimizes worst-case expected residual Bernoulli variance **over the finite Cartesian product of interval endpoints**, with two reviews. Production uses Shannon recursion; the independent checker enumerates Boolean worlds over the same endpoint scenarios. Neither searches interval interiors. + +Across {h4['fixtures']} frozen fixtures, endpoint-oracle discrepancies: **{h4['oracle_discrepancies']}**; cases worse than midpoint on endpoint scenarios: **{h4['worse_than_midpoint']}**. Strict endpoint gains: **{h4['strict_improvements']}/{h4['fixtures']} ({pct(h4['strict_fraction'])})**, comprising {h4['random_strict']} random and {h4['engineered_strict']} engineered fixtures. Point-interval controls pass **{h4['degenerate_point_controls']}/16**. + +**Continuous-interval claim: unsupported.** For singleton queries with intervals `0=[0.1,0.9]`, `1=[0.3,0.4]`, `2=[0.5,0.5]`, the supplemental control selects reviews {counter['endpoint_selected']} and reports endpoint worst loss {counter['endpoint_worst']:.6g}. The allowed interior witness `p0=0.5` yields **{counter['interior_loss']:.6g}**. Reviewing {counter['alternative_review']} has analytic continuous worst loss **{counter['alternative_continuous_worst']:.6g}**. The endpoint choice is therefore not continuous-interval minimax. This negative evidence is separate from the preserved endpoint target. Independent primitives are assumed; no dependence or semantic-calibration guarantee follows. + +![H4. Endpoint-scenario outcomes only; continuous interval claim unsupported.](figures/04_interval_review.svg) + +## 6. H5 - n-ary conflict constraints + +A forbidden hyperedge rejects only its all-selected assignment; pairwise conflict is the arity-two case. **{h5['small_solved']}/{h5['small_cases']}** small fixtures match exhaustive optimization; recorded failures: **{len(h5['failures'])}**; permutation failures: **{h5['permutation_failures']}**. Eight chains compare against `n - floor(n/3)`, with objectives and staging controls retained. At the largest chain, retained n-ary utility is **{h5['large'][-1]['objective']}**, versus **{h5['large'][-1]['pairwise_projection']}** under deliberately over-conservative pairwise projection. + +![H5. N-ary repair versus pairwise projection.](figures/05_hypergraph.svg) + +## 7. Interpretation + +Every result is conditional on supplied graphs, lineage, costs, constraints or finite probability scenarios. Work counters do not measure wall-clock/API latency or cloud cost. The H4 interior counterexample rejects the broader interval-minimax interpretation. None establishes correct extracted entities, relations, qualifiers or probabilities. No production graph policy changes here. + +## 8. Reproducibility + +```bash +python -B -m unittest discover -s graph_synthesis/post_certificate/tests -v +python -B -m graph_synthesis.post_certificate.run --check +python -B -m graph_synthesis.post_certificate.report --check --update-paper +``` + +`results.json` retains outcomes and controls; `summary.csv` and five SVGs derive from those measurements. Manual validation also checks protocol ancestry/bytes, archive integrity, deterministic HTML and current-paper build hashes. The correction record documents implementation and interpretation changes; the frozen protocol is unchanged. +''' + files['RESULTS.md']=report + paper=report.replace('](figures/','](../graph_synthesis/post_certificate/figures/') + paper=paper.replace('](CORRECTIONS.md)','](../graph_synthesis/post_certificate/CORRECTIONS.md)') + files['PAPER_SECTION.md']=paper + current=f'''{START}\n\n## Five post-certificate structural extensions\n\n[Executed report](graph_synthesis/post_certificate/RESULTS.md), [frozen protocol](graph_synthesis/post_certificate/PROTOCOL.md), [corrections](graph_synthesis/post_certificate/CORRECTIONS.md), and [five figures](graph_synthesis/post_certificate/figures/). Recorded target outcomes: **{outcome_sentence}** H4 covers only endpoint scenarios; its broader continuous-interval minimax claim is unsupported, with an interior counterexample retained. Counted H1 reduction: {pct(h1['state_reduction'])}; local H2 reduction: {pct(h2['evaluation_reduction'])}, connected-control saving: {pct(h2['connected_mean_reduction'])}. No fresh Jev calls, independent semantic-accuracy claim, external-system superiority or production-policy change.\n\n{END}\n''' + files['CURRENT_SNIPPET.md']=current + return files + + +def replace_block(text, block): + if START in text: + before,rest=text.split(START,1) + if END not in rest: raise ValueError('unterminated post-certificate block') + _,after=rest.split(END,1) + return before+block+after.lstrip('\n') + return text.rstrip()+"\n\n"+block + + +def paper_block(section): + return START+'\n\n'+section.rstrip()+'\n\n'+END+'\n' + + +def write_generated(check=False, update_paper=False): + r=json.loads(RESULTS.read_text(encoding='utf-8')) + files=generated(r); mismatches=[] + for rel,content in files.items(): + path=HERE/rel + if check: + if not path.exists() or path.read_text(encoding='utf-8')!=content: mismatches.append(str(path.relative_to(ROOT))) + else: + path.parent.mkdir(parents=True,exist_ok=True); path.write_text(content,encoding='utf-8',newline='\n') + if update_paper: + current_path=ROOT/'CURRENT_RESULTS.md'; paper_path=ROOT/'manuscript/paper-current.md' + current=replace_block(current_path.read_text(encoding='utf-8'),files['CURRENT_SNIPPET.md']) + pblock=paper_block(files['PAPER_SECTION.md']) + paper=replace_block(paper_path.read_text(encoding='utf-8'),pblock) + if check: + if current_path.read_text(encoding='utf-8')!=current: mismatches.append('CURRENT_RESULTS.md') + if paper_path.read_text(encoding='utf-8')!=paper: mismatches.append('manuscript/paper-current.md') + else: + current_path.write_text(current,encoding='utf-8',newline='\n'); paper_path.write_text(paper,encoding='utf-8',newline='\n') + if mismatches: + print('generated output mismatch: '+', '.join(mismatches),file=sys.stderr); return 2 + return 0 + + +def main(argv=None): + ap=argparse.ArgumentParser(); ap.add_argument('--check',action='store_true'); ap.add_argument('--update-paper',action='store_true'); args=ap.parse_args(argv) + return write_generated(args.check,args.update_paper) + +if __name__=='__main__': raise SystemExit(main()) diff --git a/graph_synthesis/post_certificate/results.json b/graph_synthesis/post_certificate/results.json new file mode 100644 index 0000000..8c33187 --- /dev/null +++ b/graph_synthesis/post_certificate/results.json @@ -0,0 +1,640 @@ +{ + "H1": { + "case_width_histogram": { + "1": 33, + "2": 45, + "3": 53, + "4": 29 + }, + "controls": [ + { + "n": 6, + "status": "staged", + "width": 5 + }, + { + "n": 7, + "status": "staged", + "width": 6 + }, + { + "n": 8, + "status": "staged", + "width": 7 + }, + { + "n": 9, + "status": "staged", + "width": 8 + }, + { + "n": 10, + "status": "staged", + "width": 9 + } + ], + "counted_factor_states": 14660, + "failures": [], + "full_assignment_count": 1986560, + "large": [ + { + "expected": 11, + "n": 33, + "objective": 11, + "states": 254, + "status": "solved", + "width": 2 + }, + { + "expected": 22, + "n": 65, + "objective": 22, + "states": 510, + "status": "solved", + "width": 2 + }, + { + "expected": 43, + "n": 129, + "objective": 43, + "states": 1022, + "status": "solved", + "width": 2 + }, + { + "expected": 86, + "n": 257, + "objective": 86, + "states": 2046, + "status": "solved", + "width": 2 + }, + { + "expected": 129, + "n": 385, + "objective": 129, + "states": 3070, + "status": "solved", + "width": 2 + }, + { + "expected": 171, + "n": 513, + "objective": 171, + "states": 4094, + "status": "solved", + "width": 2 + }, + { + "expected": 257, + "n": 769, + "objective": 257, + "states": 6142, + "status": "solved", + "width": 2 + }, + { + "expected": 342, + "n": 1025, + "objective": 342, + "states": 8190, + "status": "solved", + "width": 2 + } + ], + "permutation_failures": 0, + "primary_target_met": true, + "small_cases": 160, + "small_solved": 160, + "state_reduction": 0.9926204091494846 + }, + "H2": { + "accepted_transactions": 640, + "connected_controls": [ + { + "correct": true, + "evaluations": 256, + "full": 256, + "saving": 0.0 + }, + { + "correct": true, + "evaluations": 256, + "full": 256, + "saving": 0.0 + }, + { + "correct": true, + "evaluations": 256, + "full": 256, + "saving": 0.0 + }, + { + "correct": true, + "evaluations": 256, + "full": 256, + "saving": 0.0 + }, + { + "correct": true, + "evaluations": 256, + "full": 256, + "saving": 0.0 + }, + { + "correct": true, + "evaluations": 256, + "full": 256, + "saving": 0.0 + }, + { + "correct": true, + "evaluations": 256, + "full": 256, + "saving": 0.0 + }, + { + "correct": true, + "evaluations": 256, + "full": 256, + "saving": 0.0 + }, + { + "correct": true, + "evaluations": 256, + "full": 256, + "saving": 0.0 + }, + { + "correct": true, + "evaluations": 256, + "full": 256, + "saving": 0.0 + }, + { + "correct": true, + "evaluations": 256, + "full": 256, + "saving": 0.0 + }, + { + "correct": true, + "evaluations": 256, + "full": 256, + "saving": 0.0 + }, + { + "correct": true, + "evaluations": 256, + "full": 256, + "saving": 0.0 + }, + { + "correct": true, + "evaluations": 256, + "full": 256, + "saving": 0.0 + }, + { + "correct": true, + "evaluations": 256, + "full": 256, + "saving": 0.0 + }, + { + "correct": true, + "evaluations": 256, + "full": 256, + "saving": 0.0 + } + ], + "connected_mean_reduction": 0.0, + "evaluation_reduction": 0.901092529296875, + "failure_atomic_controls": 63, + "full_recompute_evaluations": 163840, + "local_evaluations": 16205, + "malformed_controls": 64, + "primary_target_met": false, + "rejection_control_failures": [ + { + "control": "injected_evaluation", + "expected_exception_raised": false, + "fail_node": null, + "graph_index": 29, + "primitive": 29, + "reason": "no affected derived node" + } + ], + "revision_mismatches": 0, + "snapshot_mismatches": 0, + "stale_revision_controls": 64 + }, + "H3": { + "controls": [ + { + "atoms": 19, + "status": "staged" + }, + { + "atoms": 20, + "status": "staged" + }, + { + "atoms": 21, + "status": "staged" + }, + { + "atoms": 22, + "status": "staged" + }, + { + "atoms": 23, + "status": "staged" + }, + { + "atoms": 24, + "status": "staged" + } + ], + "failures": [], + "large": [ + { + "atoms": 512, + "cost": 874, + "expected": 874, + "proof_components": 256, + "status": "solved" + }, + { + "atoms": 768, + "cost": 1314, + "expected": 1314, + "proof_components": 384, + "status": "solved" + }, + { + "atoms": 1024, + "cost": 1753, + "expected": 1753, + "proof_components": 512, + "status": "solved" + }, + { + "atoms": 1536, + "cost": 2631, + "expected": 2631, + "proof_components": 768, + "status": "solved" + }, + { + "atoms": 2048, + "cost": 3507, + "expected": 3507, + "proof_components": 1024, + "status": "solved" + }, + { + "atoms": 2560, + "cost": 4386, + "expected": 4386, + "proof_components": 1280, + "status": "solved" + }, + { + "atoms": 3072, + "cost": 5262, + "expected": 5262, + "proof_components": 1536, + "status": "solved" + }, + { + "atoms": 4096, + "cost": 7018, + "expected": 7018, + "proof_components": 2048, + "status": "solved" + } + ], + "primary_target_met": true, + "small_cases": 160, + "small_solved": 160 + }, + "H4": { + "continuous_interval_claim_supported": false, + "degenerate_point_controls": 16, + "engineered_strict": 32, + "fixtures": 128, + "interior_counterexample": { + "alternative_continuous_worst": 0.24, + "alternative_review": [ + 0, + 2 + ], + "continuous_interval_claim_supported": false, + "endpoint_selected": [ + 1, + 2 + ], + "endpoint_worst": 0.09000000000000001, + "interior_loss": 0.25, + "interior_witness": { + "0": 0.5, + "1": 0.4, + "2": 0.5 + }, + "intervals": { + "0": [ + 0.1, + 0.9 + ], + "1": [ + 0.3, + 0.4 + ], + "2": [ + 0.5, + 0.5 + ] + }, + "role": "post-review negative control; outside the frozen endpoint fixture population" + }, + "objective_scope": "finite interval endpoint scenarios only", + "oracle_discrepancies": 0, + "primary_target_met": true, + "random_strict": 13, + "samples": [ + { + "kind": "random", + "midpoint": [ + 0, + 3 + ], + "midpoint_worst": 0.0, + "minimax": [ + 0, + 3 + ], + "minimax_worst": 0.0 + }, + { + "kind": "random", + "midpoint": [ + 1, + 2 + ], + "midpoint_worst": 0.09661106881133921, + "minimax": [ + 1, + 2 + ], + "minimax_worst": 0.09661106881133921 + }, + { + "kind": "random", + "midpoint": [ + 2, + 4 + ], + "midpoint_worst": 0.0, + "minimax": [ + 2, + 4 + ], + "minimax_worst": 0.0 + }, + { + "kind": "random", + "midpoint": [ + 2, + 5 + ], + "midpoint_worst": 0.0960162421762519, + "minimax": [ + 2, + 5 + ], + "minimax_worst": 0.0960162421762519 + }, + { + "kind": "random", + "midpoint": [ + 2, + 3 + ], + "midpoint_worst": 0.2680534518265011, + "minimax": [ + 1, + 2 + ], + "minimax_worst": 0.267103938659212 + }, + { + "kind": "random", + "midpoint": [ + 0, + 2 + ], + "midpoint_worst": 0.06073329931775564, + "minimax": [ + 0, + 2 + ], + "minimax_worst": 0.06073329931775564 + }, + { + "kind": "random", + "midpoint": [ + 0, + 4 + ], + "midpoint_worst": 0.03609290723701447, + "minimax": [ + 0, + 4 + ], + "minimax_worst": 0.03609290723701447 + }, + { + "kind": "random", + "midpoint": [ + 0, + 5 + ], + "midpoint_worst": 0.08814167706701849, + "minimax": [ + 0, + 5 + ], + "minimax_worst": 0.08814167706701849 + }, + { + "kind": "random", + "midpoint": [ + 2, + 3 + ], + "midpoint_worst": 0.21699798050107816, + "minimax": [ + 2, + 3 + ], + "minimax_worst": 0.21699798050107816 + }, + { + "kind": "random", + "midpoint": [ + 2, + 5 + ], + "midpoint_worst": 0.18216959634475388, + "minimax": [ + 2, + 5 + ], + "minimax_worst": 0.18216959634475388 + }, + { + "kind": "random", + "midpoint": [ + 1, + 5 + ], + "midpoint_worst": 0.24054854606815526, + "minimax": [ + 1, + 5 + ], + "minimax_worst": 0.24054854606815526 + }, + { + "kind": "random", + "midpoint": [ + 3, + 4 + ], + "midpoint_worst": 0.07124624217352793, + "minimax": [ + 0, + 4 + ], + "minimax_worst": 0.0670979332010524 + } + ], + "strict_fraction": 0.3515625, + "strict_improvements": 45, + "worse_than_midpoint": 0 + }, + "H5": { + "controls": [ + { + "arity": 6, + "status": "staged", + "width": 5 + }, + { + "arity": 7, + "status": "staged", + "width": 6 + }, + { + "arity": 8, + "status": "staged", + "width": 7 + }, + { + "arity": 9, + "status": "staged", + "width": 8 + }, + { + "arity": 10, + "status": "staged", + "width": 9 + } + ], + "failures": [], + "large": [ + { + "expected": 43, + "n": 64, + "objective": 43, + "pairwise_projection": 22, + "states": 502, + "width": 2 + }, + { + "expected": 86, + "n": 128, + "objective": 86, + "pairwise_projection": 43, + "states": 1014, + "width": 2 + }, + { + "expected": 171, + "n": 256, + "objective": 171, + "pairwise_projection": 86, + "states": 2038, + "width": 2 + }, + { + "expected": 342, + "n": 512, + "objective": 342, + "pairwise_projection": 171, + "states": 4086, + "width": 2 + }, + { + "expected": 512, + "n": 768, + "objective": 512, + "pairwise_projection": 256, + "states": 6134, + "width": 2 + }, + { + "expected": 683, + "n": 1024, + "objective": 683, + "pairwise_projection": 342, + "states": 8182, + "width": 2 + }, + { + "expected": 1024, + "n": 1536, + "objective": 1024, + "pairwise_projection": 512, + "states": 12278, + "width": 2 + }, + { + "expected": 1366, + "n": 2048, + "objective": 1366, + "pairwise_projection": 683, + "states": 16374, + "width": 2 + } + ], + "permutation_failures": 0, + "primary_target_met": true, + "small_cases": 160, + "small_solved": 160 + }, + "baseline_commit": "9d2e4a60a6c79e616ab1d352cd5da9fe414e6c98", + "correction_record": "graph_synthesis/post_certificate/CORRECTIONS.md", + "fresh_jev_calls": 0, + "new_scientific_documents": 0, + "protocol_commit": "8187cc4e4b98e40f3146ce787b71f262b62b3abd", + "seed": 20260923, + "targets_met": { + "H1": true, + "H2": false, + "H3": true, + "H4": true, + "H5": true + } +} diff --git a/graph_synthesis/post_certificate/run.py b/graph_synthesis/post_certificate/run.py new file mode 100644 index 0000000..347b935 --- /dev/null +++ b/graph_synthesis/post_certificate/run.py @@ -0,0 +1,350 @@ +from __future__ import annotations + +import argparse, json, random, sys +from pathlib import Path +from itertools import combinations + +from .methods import ( + max_sum_elimination, brute_force_optimum, DependencyGraph, + query_resilience, brute_force_resilience, + select_endpoint_minimax, oracle_endpoint_worst, expected_residual_variance, +) + +ROOT=Path(__file__).resolve().parents[2] +OUT=Path(__file__).with_name('results.json') +SEED=20260923 +BASELINE='9d2e4a60a6c79e616ab1d352cd5da9fe414e6c98' +PROTOCOL_COMMIT='8187cc4e4b98e40f3146ce787b71f262b62b3abd' + + +def k_tree_graph(rng,n,k): + edges=set() + initial=tuple(range(k+1)) + for a,b in combinations(initial,2): edges.add((a,b)) + kcliques={tuple(c) for c in combinations(initial,k)} + for v in range(k+1,n): + base=rng.choice(sorted(kcliques)) + for a in base: edges.add(tuple(sorted((a,v)))) + clique=tuple(sorted(base+(v,))) + for c in combinations(clique,k): kcliques.add(tuple(c)) + return sorted(edges) + + +def triangle_chain_oracle(weights): + """Independent prefix recurrence: selected vertices must be three apart.""" + prefix=[0] + for i,weight in enumerate(weights): + prefix.append(max(prefix[-1],weight+prefix[max(0,i-2)])) + return prefix[-1] + + +def h1(rng): + failures=[]; perm_fail=0; state_sum=0; full_sum=0; solved=0 + cases=[] + for i in range(160): + n=rng.randint(8,16); k=rng.randint(1,min(4,n-1)) + edges=k_tree_graph(rng,n,k) + weights=[rng.randint(1,19) for _ in range(n)] + got=max_sum_elimination(weights,edges) + want,_=brute_force_optimum(weights,edges) + if got.status!='solved' or got.objective!=want: + failures.append({'case':i,'n':n,'k':k,'status':got.status,'got':got.objective,'want':want,'width':got.induced_width}) + else: solved+=1 + if n>=12: + state_sum+=got.factor_states; full_sum+=(1<=.90) + return {'primary_target_met':target,'small_cases':160,'small_solved':solved,'failures':failures,'permutation_failures':perm_fail, + 'large':large,'controls':controls,'counted_factor_states':state_sum,'full_assignment_count':full_sum,'state_reduction':saving, + 'case_width_histogram':{str(w):sum(1 for c in cases if c['width']==w) for w in sorted({c['width'] for c in cases})}} + + +def make_modular_dag(rng): + P=64; defs={} + for m in range(8): + prim=list(range(m*8,(m+1)*8)) + prior=[] + for j in range(32): + node=P+m*32+j + candidates=prim+prior + depn=2 if len(candidates)<3 else rng.choice([2,2,3]) + deps=tuple(sorted(rng.sample(candidates,depn))) + op=rng.choice(['and','or','xor']) + defs[node]=(op,deps); prior.append(node) + return DependencyGraph(P,defs) + + +def make_connected_dag(): + P=64; defs={} + for j in range(256): + node=P+j + if j==0: deps=(0,1) + else: deps=(P+j-1, 1+(j%63)) + defs[node]=('xor' if j%3==0 else ('or' if j%3==1 else 'and'),deps) + return DependencyGraph(P,defs) + + +def h2(rng): + mismatches=0; accepted=0; local_evals=0; full_evals=0 + revision_mismatches=0; control_failures=[] + failure_atomic=0; stale_atomic=0; malformed_atomic=0 + for gi in range(128): + g=make_modular_dag(rng) + prim={i:bool(rng.getrandbits(1)) for i in range(64)} + values=g.full_recompute(prim); rev=0 + for t in range(5): + m=rng.randrange(8); ks=rng.randint(1,4); ps=rng.sample(range(m*8,(m+1)*8),ks) + changes={p:not values[p] for p in ps} + newv,newrev,ev=g.transact(values,rev,changes,expected_revision=rev) + newprim={i:newv[i] for i in range(64)} + full=g.full_recompute(newprim) + if newv!=full: mismatches+=1 + if newrev!=rev+1: revision_mismatches+=1 + values,rev=newv,newrev; accepted+=1; local_evals+=ev; full_evals+=256 + if gi<64: + before=dict(values); brevis=rev + p=gi%64; changes={p:not values[p]} + # choose an affected derived node + affected=[]; stack=[p]; seen=set() + while stack: + x=stack.pop() + for y in g.reverse[x]: + if y not in seen: seen.add(y); affected.append(y); stack.append(y) + fail=affected[len(affected)//2] if affected else None + raised=False + try: g.transact(values,rev,changes,expected_revision=rev,fail_node=fail) + except RuntimeError: raised=True + if fail is not None and raised and values==before and rev==brevis: failure_atomic+=1 + else: control_failures.append({'graph_index':gi,'control':'injected_evaluation','primitive':p, + 'fail_node':fail,'expected_exception_raised':raised, + 'reason':'no affected derived node' if fail is None else 'rejection or atomicity failure'}) + raised=False + try: g.transact(values,rev,changes,expected_revision=rev-1) + except RuntimeError: raised=True + if raised and values==before and rev==brevis: stale_atomic+=1 + else: control_failures.append({'graph_index':gi,'control':'stale_revision','expected_exception_raised':raised}) + raised=False + try: g.transact(values,rev,{64:True},expected_revision=rev) + except ValueError: raised=True + if raised and values==before and rev==brevis: malformed_atomic+=1 + else: control_failures.append({'graph_index':gi,'control':'malformed_update','expected_exception_raised':raised}) + connected=[] + for i in range(16): + g=make_connected_dag(); prim={j:bool((j+i)%2) for j in range(64)}; values=g.full_recompute(prim) + newv,_,ev=g.transact(values,0,{0:not values[0]},expected_revision=0) + ok=(newv==g.full_recompute({j:newv[j] for j in range(64)})) + connected.append({'evaluations':ev,'full':256,'correct':ok,'saving':1-ev/256}) + if not ok: mismatches+=1 + saving=1-local_evals/full_evals + target=(mismatches==0 and revision_mismatches==0 and failure_atomic==64 and stale_atomic==64 and malformed_atomic==64 and saving>=.80) + return {'primary_target_met':target,'accepted_transactions':accepted,'snapshot_mismatches':mismatches,'local_evaluations':local_evals, + 'full_recompute_evaluations':full_evals,'evaluation_reduction':saving,'failure_atomic_controls':failure_atomic, + 'stale_revision_controls':stale_atomic,'malformed_controls':malformed_atomic,'connected_controls':connected, + 'revision_mismatches':revision_mismatches,'rejection_control_failures':control_failures, + 'connected_mean_reduction':sum(x['saving'] for x in connected)/len(connected)} + + +def h3(rng): + failures=[]; solved=0 + for i in range(160): + n=rng.randint(4,12); atoms=list(range(n)); costs={a:rng.randint(1,9) for a in atoms} + clauses=[] + for _ in range(rng.randint(2,10)): + size=rng.randint(1,min(4,n)); clauses.append(tuple(sorted(rng.sample(atoms,size)))) + got=query_resilience(clauses,costs); want,wset=brute_force_resilience(clauses,costs) + if got['status']!='solved' or got['cost']!=want: + failures.append({'case':i,'status':got['status'],'got':got['cost'],'want':want}) + else: solved+=1 + if got['status']=='solved': + dele=set(got['delete']) + if not all(set(c)&dele for c in clauses): failures.append({'case':i,'witness':'does not falsify'}) + if sum(costs[a] for a in dele)!=got['cost']: failures.append({'case':i,'witness':'cost mismatch'}) + large=[] + for m in [256,384,512,768,1024,1280,1536,2048]: + clauses=[]; costs={}; expected=0 + for j in range(m): + a=2*j; b=a+1; ca=1+(j%7); cb=2+((j*3)%7); costs[a]=ca; costs[b]=cb + clauses.append((a,b)); expected+=min(ca,cb) + got=query_resilience(clauses,costs) + large.append({'proof_components':m,'atoms':2*m,'cost':got['cost'],'expected':expected,'status':got['status']}) + if got['status']!='solved' or got['cost']!=expected: failures.append({'large':m,'got':got['cost'],'expected':expected,'status':got['status']}) + controls=[] + for j in range(6): + atoms=19+j; clauses=[(i,i+1) for i in range(atoms-1)]; costs={i:1 for i in range(atoms)} + got=query_resilience(clauses,costs) + controls.append({'atoms':atoms,'status':got['status']}) + if got['status']!='staged': failures.append({'control_atoms':atoms,'status':got['status']}) + return {'primary_target_met':not failures,'small_cases':160,'small_solved':solved,'failures':failures,'large':large,'controls':controls} + + +def random_query_fixture(rng): + intervals={} + for a in range(6): + lo=rng.uniform(.03,.75); hi=rng.uniform(lo,min(.97,lo+rng.uniform(.03,.35))) + intervals[a]=(round(lo,5),round(hi,5)) + queries=[] + for _ in range(rng.randint(1,3)): + q=[] + for _ in range(rng.randint(1,3)): + q.append(tuple(sorted(rng.sample(range(6),rng.randint(1,3))))) + queries.append(q) + return intervals,queries + + +def engineered_interval_fixture(i): + # midpoint favors 0/1; worst-case variance favors 2/3 + e=(i%7)*0.001 + intervals={0:(.39+e,.41+e),1:(.41-e,.43-e),2:(.05,.50),3:(.10,.50),4:(.01,.05),5:(.94,.98)} + queries=[[(a,)] for a in range(6)] + return intervals,queries + + +def interval_interior_counterexample(): + """Post-review falsification of the broader continuous-interval claim. + + Singleton queries make the continuous maxima analytic: p*(1-p) is + maximized at the allowed point closest to 0.5. This is not a new H4 + threshold, fixture or positive benchmark; it records the claim's limit. + """ + intervals={0:(.1,.9),1:(.3,.4),2:(.5,.5)} + queries=[[(a,)] for a in intervals] + selected=select_endpoint_minimax(queries,intervals,2) + witness={0:.5,1:.4,2:.5} + continuous={} + for review in combinations(intervals,2): + remaining=set(intervals)-set(review) + continuous[review]=sum((p:=min(hi,max(lo,.5)))*(1-p) + for a in remaining for lo,hi in [intervals[a]]) + alternative=min(continuous,key=lambda pair:(continuous[pair],pair)) + return {'role':'post-review negative control; outside the frozen endpoint fixture population', + 'intervals':{str(a):list(v) for a,v in intervals.items()}, + 'endpoint_selected':list(selected['minimax']), + 'endpoint_worst':selected['minimax_worst'], + 'interior_witness':{str(a):p for a,p in witness.items()}, + 'interior_loss':expected_residual_variance(queries,witness,selected['minimax']), + 'alternative_review':list(alternative), + 'alternative_continuous_worst':continuous[alternative], + 'continuous_interval_claim_supported':False} + + +def h4(rng): + fixtures=[]; discrepancies=0; worse=0; strict=0; random_strict=0; engineered_strict=0 + for i in range(96): + intervals,queries=random_query_fixture(rng) + fixtures.append(('random',intervals,queries)) + for i in range(32): fixtures.append(('engineered',*engineered_interval_fixture(i))) + samples=[] + for kind,intervals,queries in fixtures: + got=select_endpoint_minimax(queries,intervals,2) + om=oracle_endpoint_worst(queries,intervals,got['minimax']) + op=oracle_endpoint_worst(queries,intervals,got['midpoint']) + if abs(om-got['minimax_worst'])>1e-10 or abs(op-got['midpoint_worst'])>1e-10: discrepancies+=1 + if om>op+1e-12: worse+=1 + if om=26 and point_controls==16) + return {'primary_target_met':target,'objective_scope':'finite interval endpoint scenarios only', + 'continuous_interval_claim_supported':False, + 'interior_counterexample':interval_interior_counterexample(), + 'fixtures':128,'oracle_discrepancies':discrepancies,'worse_than_midpoint':worse, + 'strict_improvements':strict,'strict_fraction':strict/128,'random_strict':random_strict,'engineered_strict':engineered_strict, + 'degenerate_point_controls':point_controls,'samples':samples} + + +def h5(rng): + failures=[]; perm_fail=0; solved=0 + for i in range(160): + n=rng.randint(8,14); weights=[rng.randint(1,19) for _ in range(n)]; scopes=[] + for j in range(n-1): + if rng.random()<.35: scopes.append((j,j+1)) + for j in range(n-2): + if rng.random()<.55: scopes.append((j,j+1,j+2)) + if not scopes: scopes=[(0,1,2)] + got=max_sum_elimination(weights,scopes); want,_=brute_force_optimum(weights,scopes) + if got.status!='solved' or got.objective!=want: + failures.append({'case':i,'status':got.status,'got':got.objective,'want':want,'width':got.induced_width}) + else: solved+=1 + if i<64: + base=(got.objective,got.selected,got.induced_width) + for j in range(8): + sh=list(scopes); random.Random(SEED+7000+i*100+j).shuffle(sh) + g=max_sum_elimination(weights,sh) + if (g.objective,g.selected,g.induced_width)!=base: perm_fail+=1 + large=[] + for n in [64,128,256,512,768,1024,1536,2048]: + scopes=[(i,i+1,i+2) for i in range(n-2)] + got=max_sum_elimination([1]*n,scopes) + expected=n-(n//3) + pair=set() + for s in scopes: + for a,b in combinations(s,2): pair.add((a,b)) + projected=max_sum_elimination([1]*n,sorted(pair)) + large.append({'n':n,'objective':got.objective,'expected':expected,'pairwise_projection':projected.objective,'width':got.induced_width,'states':got.factor_states}) + if got.status!='solved' or got.objective!=expected or projected.objective is None or got.objective<=projected.objective: + failures.append({'large_n':n,'got':got.objective,'expected':expected,'projected':projected.objective}) + controls=[] + for n in [6,7,8,9,10]: + got=max_sum_elimination([1]*n,[tuple(range(n))]) + controls.append({'arity':n,'status':got.status,'width':got.induced_width}) + if got.status!='staged': failures.append({'control_arity':n,'status':got.status,'width':got.induced_width}) + target=(not failures and perm_fail==0) + return {'primary_target_met':target,'small_cases':160,'small_solved':solved,'failures':failures,'permutation_failures':perm_fail,'large':large,'controls':controls} + + +def execute(): + rng=random.Random(SEED) + result={'baseline_commit':BASELINE,'protocol_commit':PROTOCOL_COMMIT,'seed':SEED,'fresh_jev_calls':0,'new_scientific_documents':0, + 'correction_record':'graph_synthesis/post_certificate/CORRECTIONS.md'} + result['H1']=h1(rng); result['H2']=h2(rng); result['H3']=h3(rng); result['H4']=h4(rng); result['H5']=h5(rng) + result['targets_met']={k:result[k]['primary_target_met'] for k in ['H1','H2','H3','H4','H5']} + return result + + +def canonical(obj): return json.dumps(obj,sort_keys=True,indent=2)+"\n" + + +def main(argv=None): + ap=argparse.ArgumentParser(); ap.add_argument('--check',action='store_true'); ap.add_argument('--output',default=str(OUT)); args=ap.parse_args(argv) + got=execute(); text=canonical(got); path=Path(args.output) + if args.check: + if not path.exists(): print('missing results',file=sys.stderr); return 2 + old=path.read_text(encoding='utf-8') + if old!=text: + print('results mismatch',file=sys.stderr); return 3 + print(json.dumps(got['targets_met'],sort_keys=True)); return 0 + path.write_text(text,encoding='utf-8',newline='\n') + print(json.dumps(got['targets_met'],sort_keys=True)) + return 0 + +if __name__=='__main__': raise SystemExit(main()) diff --git a/graph_synthesis/post_certificate/summary.csv b/graph_synthesis/post_certificate/summary.csv new file mode 100644 index 0000000..0376f24 --- /dev/null +++ b/graph_synthesis/post_certificate/summary.csv @@ -0,0 +1,6 @@ +hypothesis,result,primary_measure,value,boundary +H1,met,factor-state reduction,0.992620409149,"counted DP states, not wall-clock" +H2,not met,local evaluation reduction,0.901092529297,connected control reported separately +H3,met,recorded oracle/witness failures,0,supplied lineage and costs only +H4,met,strict endpoint-scenario improvements,45,finite endpoint scenarios; continuous interval claim unsupported +H5,met,recorded oracle/control failures,0,supplied n-ary constraints and utility diff --git a/graph_synthesis/post_certificate/tests/test_corrections.py b/graph_synthesis/post_certificate/tests/test_corrections.py new file mode 100644 index 0000000..fea57f7 --- /dev/null +++ b/graph_synthesis/post_certificate/tests/test_corrections.py @@ -0,0 +1,111 @@ +import copy +import csv +import io +import json +import random +import unittest +from pathlib import Path +from unittest.mock import patch + +from graph_synthesis.post_certificate import methods, report, run + + +class CorrectionTests(unittest.TestCase): + def test_overwidth_scope_stages_before_any_table_allocation(self): + with patch.object(methods, 'product', side_effect=AssertionError('table allocated')): + result = methods.max_sum_elimination([1] * 30, [tuple(range(30))]) + self.assertEqual(result.status, 'staged') + self.assertEqual(result.factor_states, 0) + + def test_input_allocation_budget_stages_before_any_table_allocation(self): + with patch.object(methods, 'product', side_effect=AssertionError('table allocated')): + result = methods.max_sum_elimination([1] * 6, [(0, 1, 2, 3, 4)], state_cap=20) + self.assertEqual(result.status, 'staged') + + def test_long_graph_reports_actual_width(self): + result = methods.max_sum_elimination([1] * 65, [(i, i + 2) for i in range(63)], width_cap=1) + self.assertEqual(result.status, 'solved') + self.assertEqual(result.induced_width, 1) + self.assertEqual(result.objective, 33) + + def test_min_fill_matches_independent_full_rescoring(self): + rng = random.Random(719) + for _ in range(30): + n = 9 + edges = [(i, j) for i in range(n) for j in range(i + 1, n) if rng.random() < .3] + graph = {i: set() for i in range(n)} + for a, b in edges: + graph[a].add(b); graph[b].add(a) + expected = []; width = 0 + while graph: + scores = {} + for v, neighbors in graph.items(): + missing = sum(b not in graph[a] for a in neighbors for b in neighbors if a < b) + scores[v] = missing, len(neighbors), v + v = min(scores, key=scores.get) + neighbors = graph.pop(v) + width = max(width, len(neighbors)); expected.append(v) + for a in neighbors: + graph[a].discard(v); graph[a].update(neighbors - {a}) + actual = methods.min_fill_order(n, [methods.Factor(edge, {}) for edge in edges]) + self.assertEqual(actual, (expected, width)) + + def test_independent_chain_recurrence_matches_weighted_exhaustive_oracle(self): + weights = [3, 1, 4, 9, 2, 6, 5] + edges = [(i, j) for i in range(len(weights)) for j in range(i + 1, min(i + 3, len(weights)))] + expected, _ = methods.brute_force_optimum(weights, edges) + self.assertEqual(run.triangle_chain_oracle(weights), expected) + + def test_dag_order_does_not_depend_on_node_identifiers(self): + graph = methods.DependencyGraph(1, {1: ('and', (4,)), 4: ('and', (0,))}) + old = graph.full_recompute({0: False}) + values, revision, _ = graph.transact(old, 0, {0: True}, expected_revision=0) + self.assertEqual(values, {0: True, 1: True, 4: True}) + self.assertEqual(revision, 1) + self.assertEqual(old, {0: False, 1: False, 4: False}) + + def test_invalid_dag_rejected(self): + for definitions in ({1: ('and', (2,)), 2: ('and', (1,))}, {1: ('and', (5,))}): + with self.subTest(definitions=definitions), self.assertRaises(ValueError): + methods.DependencyGraph(1, definitions) + + def test_atomicity_benchmark_fails_if_expected_exceptions_are_suppressed(self): + original = methods.DependencyGraph.transact + def broken(graph, values, revision, changes, **kwargs): + if (kwargs.get('fail_node') is not None or kwargs['expected_revision'] != revision + or any(k >= graph.primitive_count for k in changes)): + return dict(values), revision, 0 + return original(graph, values, revision, changes, **kwargs) + with patch.object(methods.DependencyGraph, 'transact', broken): + result = run.h2(random.Random(run.SEED)) + self.assertFalse(result['primary_target_met']) + self.assertEqual(result['failure_atomic_controls'], 0) + self.assertEqual(result['stale_revision_controls'], 0) + self.assertEqual(result['malformed_controls'], 0) + + def test_interior_counterexample_is_retained_as_negative_evidence(self): + result = run.interval_interior_counterexample() + self.assertFalse(result['continuous_interval_claim_supported']) + self.assertAlmostEqual(result['endpoint_worst'], .09) + self.assertAlmostEqual(result['interior_loss'], .25) + self.assertAlmostEqual(result['alternative_continuous_worst'], .24) + self.assertGreater(result['interior_loss'], result['alternative_continuous_worst']) + + def test_failed_targets_remain_failed_in_every_summary(self): + result = json.loads(Path(run.OUT).read_text(encoding='utf-8')) + result = copy.deepcopy(result) + result['H4']['interior_counterexample'] = run.interval_interior_counterexample() + for i in range(1, 6): + result[f'H{i}']['primary_target_met'] = False + generated = report.generated(result) + rows = list(csv.DictReader(io.StringIO(generated['summary.csv']))) + self.assertTrue(all(row['result'] == 'not met' and None not in row for row in rows)) + for name in ('RESULTS.md', 'PAPER_SECTION.md', 'CURRENT_SNIPPET.md'): + for i in range(1, 6): + self.assertIn(f'H{i}: not met', generated[name]) + self.assertNotIn('All five', generated[name]) + self.assertIn('endpoint', generated['figures/04_interval_review.svg'].lower()) + + +if __name__ == '__main__': + unittest.main() diff --git a/graph_synthesis/post_certificate/tests/test_methods.py b/graph_synthesis/post_certificate/tests/test_methods.py new file mode 100644 index 0000000..d70b179 --- /dev/null +++ b/graph_synthesis/post_certificate/tests/test_methods.py @@ -0,0 +1,115 @@ +import unittest + +from graph_synthesis.post_certificate.methods import ( + max_sum_elimination, brute_force_optimum, DependencyGraph, + query_resilience, brute_force_resilience, + dnf_probability_shannon, dnf_probability_worlds, + select_endpoint_minimax, oracle_endpoint_worst, +) + + +class EliminationTests(unittest.TestCase): + def test_pairwise_triangle(self): + w=[5,4,3] + scopes=[(0,1),(1,2),(0,2)] + got=max_sum_elimination(w,scopes) + self.assertEqual(got.objective,5) + self.assertEqual(got.selected,(0,)) + self.assertEqual(got.induced_width,2) + + def test_pairwise_matches_bruteforce(self): + w=[7,5,8,4,9] + scopes=[(0,1),(1,2),(2,3),(3,4),(0,2)] + got=max_sum_elimination(w,scopes) + want,_=brute_force_optimum(w,scopes) + self.assertEqual(got.objective,want) + + def test_width_control_stages(self): + n=6 + scopes=[(i,j) for i in range(n) for j in range(i+1,n)] + self.assertEqual(max_sum_elimination([1]*n,scopes).status,'staged') + + def test_hyperedge_keeps_pair(self): + got=max_sum_elimination([1,1,1],[(0,1,2)]) + self.assertEqual(got.objective,2) + self.assertEqual(len(got.selected),2) + + def test_hyperedge_matches_bruteforce(self): + w=[4,8,3,7,6] + scopes=[(0,1,2),(1,2,3),(2,3,4)] + got=max_sum_elimination(w,scopes) + want,_=brute_force_optimum(w,scopes) + self.assertEqual(got.objective,want) + + +class DeltaTests(unittest.TestCase): + def graph(self): + return DependencyGraph(3,{ + 3:('and',(0,1)), + 4:('or',(1,2)), + 5:('xor',(3,4)), + }) + + def test_transaction_matches_full(self): + g=self.graph(); prim={0:True,1:True,2:False}; v=g.full_recompute(prim) + nv,nr,ev=g.transact(v,0,{1:False},expected_revision=0) + self.assertEqual(nr,1) + self.assertEqual(nv,g.full_recompute({0:True,1:False,2:False})) + self.assertLessEqual(ev,3) + + def test_stale_rejected(self): + g=self.graph(); v=g.full_recompute({0:True,1:True,2:False}) + with self.assertRaises(RuntimeError): g.transact(v,1,{1:False},expected_revision=0) + + def test_malformed_rejected(self): + g=self.graph(); v=g.full_recompute({0:True,1:True,2:False}) + with self.assertRaises(ValueError): g.transact(v,0,{3:False},expected_revision=0) + + def test_injected_failure_leaves_input_unmodified(self): + g=self.graph(); v=g.full_recompute({0:True,1:True,2:False}); before=dict(v) + with self.assertRaises(RuntimeError): g.transact(v,0,{1:False},expected_revision=0,fail_node=3) + self.assertEqual(v,before) + + +class ResilienceTests(unittest.TestCase): + def test_resilience_matches_oracle(self): + clauses=[(0,1),(1,2),(2,3)] + costs={0:4,1:3,2:2,3:5} + got=query_resilience(clauses,costs) + want,_=brute_force_resilience(clauses,costs) + self.assertEqual(got['cost'],want) + + def test_disconnected_adds_costs(self): + clauses=[(0,1),(2,3)] + costs={0:1,1:5,2:3,3:2} + got=query_resilience(clauses,costs) + self.assertEqual(got['cost'],3) + + def test_large_connected_stages(self): + clauses=[(i,i+1) for i in range(19)] + costs={i:1 for i in range(20)} + self.assertEqual(query_resilience(clauses,costs)['status'],'staged') + + +class ProbabilityTests(unittest.TestCase): + def test_shannon_matches_worlds(self): + q=[(0,1),(2,)] + p={0:.2,1:.7,2:.3} + self.assertAlmostEqual(dnf_probability_shannon(q,p),dnf_probability_worlds(q,p),places=12) + + def test_minimax_not_worse_than_midpoint(self): + intervals={0:(.39,.41),1:(.41,.43),2:(.05,.5),3:(.1,.5),4:(.01,.05),5:(.94,.98)} + queries=[[(a,)] for a in range(6)] + got=select_endpoint_minimax(queries,intervals,2) + self.assertLessEqual(got['minimax_worst'],got['midpoint_worst']+1e-12) + self.assertAlmostEqual(got['minimax_worst'],oracle_endpoint_worst(queries,intervals,got['minimax']),places=12) + + def test_point_intervals_reduce_to_point_selection(self): + intervals={i:(p,p) for i,p in enumerate([.1,.2,.3,.4,.5,.6])} + queries=[[(a,)] for a in range(6)] + got=select_endpoint_minimax(queries,intervals,2) + self.assertEqual(got['minimax'],got['midpoint']) + self.assertAlmostEqual(got['minimax_worst'],got['midpoint_worst'],places=12) + + +if __name__=='__main__': unittest.main() diff --git a/manuscript/paper-current.build.json b/manuscript/paper-current.build.json index d1e50e2..8acce21 100644 --- a/manuscript/paper-current.build.json +++ b/manuscript/paper-current.build.json @@ -1,6 +1,6 @@ { - "source_sha256": "56b0cb5c1b9b2837d24446d4af3112f2935d78d10c7b9611065faff5f7da8246", + "source_sha256": "43739640772bd3552003bfa8d0b5a7f3844fd73b52e8c5d4a2c8adac4926bf5d", "renderer_sha256": "aeac332cfb5aee9b618abe153b999ce91b3376cd9b4c4da272f04bce1eef739e", - "pdf_sha256": "a2fa6153e6baa328cb7dd4680642c62609d0d59178f1989c233658979d91e0c8", + "pdf_sha256": "696103c8839a217890e814a5d2a9cf86cf95d3d80d1b87ff20a528702ab622e9", "note": "Local-only assets; PDF bytes may vary with renderer and fonts." } diff --git a/manuscript/paper-current.html b/manuscript/paper-current.html index 303efce..dd365f8 100644 --- a/manuscript/paper-current.html +++ b/manuscript/paper-current.html @@ -112,6 +112,12 @@

Study directory

2026-09-18 +Post-certificate structural extensions for Jev graph synthesis; Protocol and scope +Controlled algorithms; finite endpoint scenarios +H2 misses an injected-failure control; H4 passes only its endpoint-scenario target, not continuous interval minimax. +2026-09-28 + + Do additional Jev calls improve graph edges?; Protocol and scope 3,024 fresh Jev calls No added-call policy establishes a matched-volume advantage. @@ -3506,6 +3512,77 @@

8. Reproduction

python -B -m graph_synthesis.render_current_paper --output manuscript/paper-current.pdf

The machine-readable results retain the controlled fixtures, selected pair constraints, optimization witnesses, development-only weights, uncertainty intervals and falsifying controls. The five PNG/SVG pairs and summary table are generated from those recorded results. Earlier study artifacts are not rewritten.

+

Post-certificate structural extensions for Jev graph synthesis

+

Timothy Wayne Gregg | AI-assisted author-review research extension | September 18, 2026; corrected September 28, 2026

+

Abstract

+

Five precommitted controlled extensions were executed after the dependence-aware certificate study. Recorded frozen-target outcomes: H1: met; H2: not met; H3: met; H4: met; H5: met. These are separate algorithmic conjunctions, not a pooled success percentage. The experiments address induced-width repair, transactional delta maintenance, query resilience, finite endpoint-scenario review and n-ary conflict constraints. H4 tests endpoint scenarios only; it does not establish minimax review over continuous probability intervals. An interior counterexample below rejects that broader interpretation. No new semantic-accuracy observations, deployment guarantees or external-system superiority are established.

+

1. Frozen protocol and evidence boundary

+

The protocol was committed as 8187cc4e4b98e40f3146ce787b71f262b62b3abd against baseline 9d2e4a60a6c79e616ab1d352cd5da9fe414e6c98 before implementation and execution. Its bytes, fixture definitions, caps, seed 20260923 and thresholds remain unchanged. Fresh Jev calls: 0. New scientific documents: 0. This is exploratory follow-up, not independent preregistration.

+

The correction record distinguishes repaired implementation/control defects from the preserved protocol. H4's frozen Method explicitly specifies interval endpoint vectors; its former broader interval-minimax description is withdrawn. The supplemental negative control is outside the frozen 128-fixture population. Treewidth-aware dynamic programming, incremental view maintenance, query resilience, finite-scenario minimax decisions and hypergraph optimization have prior art; these are repository experiments, not worldwide novelty claims.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HypothesisFrozen targetRecorded outcome
H1: induced-width repairzero oracle/permutation failures; solve 8 large chains; stage controls; >=90% fewer counted statesmet
H2: transactional deltazero snapshot/atomicity failures; >=80% fewer local evaluationsnot met
H3: query resiliencezero oracle/witness failures; solve 8 analytic families; stage 6 controlsmet
H4: endpoint-scenario reviewzero endpoint-oracle discrepancies; never worse than midpoint on endpoint scenarios; strict gain on >=20%met, endpoint scenarios only
H5: n-ary conflictszero oracle/permutation failures; solve 8 chains; strict gain vs pairwise projection; stage controlsmet
+

A failed conjunction remains not met regardless of individual favorable endpoints.

+

2. H1 - induced-width exact conflict optimization

+

The solver computes deterministic min-fill order from the actual graph, checking width and allocation limits before constructing exponential tables. The shortcut based on numeric identifier distance has been removed. Of 160 small fixtures, 160 match the exhaustive objective; recorded failures: 0; permutation failures: 0. Width distribution: {'1': 33, '2': 45, '3': 53, '4': 29}.

+

For the frozen 12-16 vertex subset, counted elimination evaluations are 14,660, versus 1,986,560 full assignments: 99.26% reduction. This original work counter is not total memory allocation or CPU time; a separate cumulative table-allocation guard enforces the frozen cap. Large triangle chains use an independent prefix dynamic-programming oracle. Per-fixture objectives, widths and staged controls remain in results.json.

+
H1. Counted exact-DP work versus full enumeration.
+

3. H2 - transactional batch delta maintenance

+

Transactions validate revisions and updates, evaluate an overlay in computed topological order, and return it only after successful evaluation. Unknown dependencies and cycles are rejected. Across 640 accepted transactions, independent full recomputation finds 0 snapshot mismatches. A control passes only when the expected exception is raised and original values/revision remain unchanged: injected evaluation 63/64, stale revision 64/64, malformed update 64/64. Returned revision mismatches: 0. The frozen injected-failure conjunction is not met: one selected primitive has no affected derived node, so no failure was injected. That case remains in the denominator; the exact control record is retained in results.json.

+

Local evaluations: 16,205, versus 163,840 for full recomputation: 90.11% reduction. Connected controls separately show 0.00% mean saving. These are in-memory atomic batches, not crash durability or concurrent database isolation.

+
H2. Local work and connected-control boundary.
+

4. H3 - exact query-resilience certificates

+

For supplied monotone DNF lineage and removal costs, incidence decomposition and bounded branch-and-bound find a minimum-cost deletion set hitting each active proof clause. 160/160 small fixtures match the exhaustive oracle. Recorded oracle, witness or control failures: 0. All 8 analytic-family results and 6 over-cap controls are retained. This is conditional structural resilience, not factual truth or calibrated review effort.

+
H3. Recorded resilience cost in decomposable families.
+

5. H4 - endpoint-scenario query review

+

The selector minimizes worst-case expected residual Bernoulli variance over the finite Cartesian product of interval endpoints, with two reviews. Production uses Shannon recursion; the independent checker enumerates Boolean worlds over the same endpoint scenarios. Neither searches interval interiors.

+

Across 128 frozen fixtures, endpoint-oracle discrepancies: 0; cases worse than midpoint on endpoint scenarios: 0. Strict endpoint gains: 45/128 (35.16%), comprising 13 random and 32 engineered fixtures. Point-interval controls pass 16/16.

+

Continuous-interval claim: unsupported. For singleton queries with intervals 0=[0.1,0.9], 1=[0.3,0.4], 2=[0.5,0.5], the supplemental control selects reviews [1, 2] and reports endpoint worst loss 0.09. The allowed interior witness p0=0.5 yields 0.25. Reviewing [0, 2] has analytic continuous worst loss 0.24. The endpoint choice is therefore not continuous-interval minimax. This negative evidence is separate from the preserved endpoint target. Independent primitives are assumed; no dependence or semantic-calibration guarantee follows.

+
H4. Endpoint-scenario outcomes only; continuous interval claim unsupported.
+

6. H5 - n-ary conflict constraints

+

A forbidden hyperedge rejects only its all-selected assignment; pairwise conflict is the arity-two case. 160/160 small fixtures match exhaustive optimization; recorded failures: 0; permutation failures: 0. Eight chains compare against n - floor(n/3), with objectives and staging controls retained. At the largest chain, retained n-ary utility is 1366, versus 683 under deliberately over-conservative pairwise projection.

+
H5. N-ary repair versus pairwise projection.
+

7. Interpretation

+

Every result is conditional on supplied graphs, lineage, costs, constraints or finite probability scenarios. Work counters do not measure wall-clock/API latency or cloud cost. The H4 interior counterexample rejects the broader interval-minimax interpretation. None establishes correct extracted entities, relations, qualifiers or probabilities. No production graph policy changes here.

+

8. Reproducibility

+
python -B -m unittest discover -s graph_synthesis/post_certificate/tests -v
+python -B -m graph_synthesis.post_certificate.run --check
+python -B -m graph_synthesis.post_certificate.report --check --update-paper
+
+

results.json retains outcomes and controls; summary.csv and five SVGs derive from those measurements. Manual validation also checks protocol ancestry/bytes, archive integrity, deterministic HTML and current-paper build hashes. The correction record documents implementation and interpretation changes; the frozen protocol is unchanged.

Do additional Jev calls improve graph edges?

Timothy Wayne Gregg — exploratory research addendum, September 18, 2026

Design and evidence boundary

@@ -4455,7 +4532,7 @@

Manuscript status

This is a detailed empirical manuscript draft grounded in the completed run-20260918 artifacts. It is suitable for author review and development into a paper, not a claim of submission readiness. Author names, affiliations, contributions, funding, conflicts of interest, venue format, and final data-distribution permissions require the authors' confirmation. No independent replication, new adjudicated dataset, or additional experiment is implied by packaging the study.

The frozen protocol, complete results, methods supplement, and submission-readiness assessment are companion documents. Citation keys refer to the package bibliography. Tables below are rounded presentations; machine-readable artifacts retain full precision.

-

Abstract

+

Abstract

Typed semantic decision services offer bounded outputs, but the quality and repeatability of those outputs must be measured on the intended task. We investigate whether changes to request formulation improve a fixed Jev model without replacing or fine-tuning it. A locally frozen protocol compares four formulations per task, selects one alternative using 60 training-derived development examples, fits scalar temperature calibration on a separate split, and evaluates the retained alternative against a corrected baseline. On 413 identity-disjoint DBLP–ACM bibliographic pairs, a bundled intervention comprising explicit identity instructions, a typed Choice contract, and six training demonstrations raises operational macro-F1 from 0.9605 to 0.9859. The paired 95% percentile bootstrap interval for the difference is [0.0010, 0.0540]. Predictions of identity on different-entity pairs fall from 8/63 to 2/63, while missed matches increase from 0/350 to 1/350. On 339 SciFact claim–cited-abstract examples, selected-formulation macro-F1 changes from 0.8508 to 0.8527, with an interval spanning zero. Calibration has task- and metric-dependent effects. Cached replay reconstructs all 3,644 predictions exactly; three fresh calls on 20 fixed examples per task preserve selected-formulation labels while probabilities vary. The study uses 3,405 HTTP calls and 4.79 million input tokens, with approximately $0.20 estimated provider charges. These results support further independent evaluation of the entity-matching formulation, not general Jev superiority, a causal claim about demonstrations alone, or a guarantee of safe graph mutation.

Keywords: entity resolution; typed decisions; Jev; scientific claim verification; calibration; reproducibility; probabilistic interfaces.

1. Introduction

diff --git a/manuscript/paper-current.md b/manuscript/paper-current.md index 7aca305..eb49251 100644 --- a/manuscript/paper-current.md +++ b/manuscript/paper-current.md @@ -22,6 +22,7 @@ Each entry links to its study and its in-document protocol or evidence boundary. | [Structural frontiers for evidence-preserving Jev graph synthesis](#structural-frontiers-for-evidence-preserving-jev-graph-synthesis); [Protocol and scope](#1-motivation-novelty-scope-and-frozen-design) | Controlled algorithms and decision models | Review misses; four structural targets meet. | 2026-09-18 | | [Dependence-aware certificates for Jev graph synthesis](#dependence-aware-certificates-for-jev-graph-synthesis); [Protocol and scope](#1-motivation-novelty-boundary-and-frozen-methodology) | Saved responses; controlled algorithms | Forecasting misses; four controlled targets meet, with documented overlap. | 2026-09-18 | | [Five post-certificate improvements for Jev graph synthesis](#five-post-certificate-improvements-for-jev-graph-synthesis); [Protocol and scope](#1-frozen-methodology-and-novelty-boundary) | Saved responses; controlled algorithms | Source-risk stacking misses; four controlled targets meet. | 2026-09-18 | +| [Post-certificate structural extensions for Jev graph synthesis](#post-certificate-structural-extensions-for-jev-graph-synthesis); [Protocol and scope](#1-frozen-protocol-and-evidence-boundary) | Controlled algorithms; finite endpoint scenarios | H2 misses an injected-failure control; H4 passes only its endpoint-scenario target, not continuous interval minimax. | 2026-09-28 | | [Do additional Jev calls improve graph edges?](#do-additional-jev-calls-improve-graph-edges); [Protocol and scope](#design-and-evidence-boundary) | 3,024 fresh Jev calls | No added-call policy establishes a matched-volume advantage. | 2026-09-18 | | [Fresh Jev execution and graph-synthesis falsification](#fresh-jev-execution-and-graph-synthesis-falsification); [Protocol and scope](#evidence-scope) | Fresh same-data Jev repeat; synthetic challenge | Original entity improvement is unresolved on fresh macro-F1 interval. | 2026-09-18 | | [Follow-up: five evidence-driven improvements](#follow-up-five-evidence-driven-improvements); [Protocol and scope](#summary-of-fixed-operational-targets) | Saved responses; controlled algorithms | Mixed target outcomes; no independent semantic validation. | 2026-09-18 | @@ -1714,6 +1715,85 @@ The machine-readable results retain the controlled fixtures, selected pair const + + +# Post-certificate structural extensions for Jev graph synthesis + +Timothy Wayne Gregg | AI-assisted author-review research extension | September 18, 2026; corrected September 28, 2026 + +## Abstract + +Five precommitted controlled extensions were executed after the dependence-aware certificate study. Recorded frozen-target outcomes: **H1: met; H2: not met; H3: met; H4: met; H5: met.** These are separate algorithmic conjunctions, not a pooled success percentage. The experiments address induced-width repair, transactional delta maintenance, query resilience, finite endpoint-scenario review and n-ary conflict constraints. **H4 tests endpoint scenarios only; it does not establish minimax review over continuous probability intervals.** An interior counterexample below rejects that broader interpretation. No new semantic-accuracy observations, deployment guarantees or external-system superiority are established. + +## 1. Frozen protocol and evidence boundary + +The protocol was committed as `8187cc4e4b98e40f3146ce787b71f262b62b3abd` against baseline `9d2e4a60a6c79e616ab1d352cd5da9fe414e6c98` before implementation and execution. Its bytes, fixture definitions, caps, seed `20260923` and thresholds remain unchanged. **Fresh Jev calls: 0. New scientific documents: 0.** This is exploratory follow-up, not independent preregistration. + +[The correction record](../graph_synthesis/post_certificate/CORRECTIONS.md) distinguishes repaired implementation/control defects from the preserved protocol. H4's frozen Method explicitly specifies interval endpoint vectors; its former broader interval-minimax description is withdrawn. The supplemental negative control is outside the frozen 128-fixture population. Treewidth-aware dynamic programming, incremental view maintenance, query resilience, finite-scenario minimax decisions and hypergraph optimization have prior art; these are repository experiments, not worldwide novelty claims. + +| Hypothesis | Frozen target | Recorded outcome | +|---|---|---| +| H1: induced-width repair | zero oracle/permutation failures; solve 8 large chains; stage controls; >=90% fewer counted states | **met** | +| H2: transactional delta | zero snapshot/atomicity failures; >=80% fewer local evaluations | **not met** | +| H3: query resilience | zero oracle/witness failures; solve 8 analytic families; stage 6 controls | **met** | +| H4: endpoint-scenario review | zero endpoint-oracle discrepancies; never worse than midpoint on endpoint scenarios; strict gain on >=20% | **met**, endpoint scenarios only | +| H5: n-ary conflicts | zero oracle/permutation failures; solve 8 chains; strict gain vs pairwise projection; stage controls | **met** | + +A failed conjunction remains not met regardless of individual favorable endpoints. + +## 2. H1 - induced-width exact conflict optimization + +The solver computes deterministic min-fill order from the actual graph, checking width and allocation limits before constructing exponential tables. The shortcut based on numeric identifier distance has been removed. Of 160 small fixtures, 160 match the exhaustive objective; recorded failures: **0**; permutation failures: **0**. Width distribution: {'1': 33, '2': 45, '3': 53, '4': 29}. + +For the frozen 12-16 vertex subset, counted elimination evaluations are **14,660**, versus **1,986,560** full assignments: **99.26% reduction**. This original work counter is not total memory allocation or CPU time; a separate cumulative table-allocation guard enforces the frozen cap. Large triangle chains use an independent prefix dynamic-programming oracle. Per-fixture objectives, widths and staged controls remain in `results.json`. + +![H1. Counted exact-DP work versus full enumeration.](../graph_synthesis/post_certificate/figures/01_induced_width.svg) + +## 3. H2 - transactional batch delta maintenance + +Transactions validate revisions and updates, evaluate an overlay in computed topological order, and return it only after successful evaluation. Unknown dependencies and cycles are rejected. Across **640** accepted transactions, independent full recomputation finds **0 snapshot mismatches**. A control passes only when the expected exception is raised and original values/revision remain unchanged: injected evaluation **63/64**, stale revision **64/64**, malformed update **64/64**. Returned revision mismatches: **0**. The frozen injected-failure conjunction is not met: one selected primitive has no affected derived node, so no failure was injected. That case remains in the denominator; the exact control record is retained in `results.json`. + +Local evaluations: 16,205, versus 163,840 for full recomputation: **90.11% reduction**. Connected controls separately show **0.00% mean saving**. These are in-memory atomic batches, not crash durability or concurrent database isolation. + +![H2. Local work and connected-control boundary.](../graph_synthesis/post_certificate/figures/02_transactional_delta.svg) + +## 4. H3 - exact query-resilience certificates + +For supplied monotone DNF lineage and removal costs, incidence decomposition and bounded branch-and-bound find a minimum-cost deletion set hitting each active proof clause. **160/160** small fixtures match the exhaustive oracle. Recorded oracle, witness or control failures: **0**. All 8 analytic-family results and 6 over-cap controls are retained. This is conditional structural resilience, not factual truth or calibrated review effort. + +![H3. Recorded resilience cost in decomposable families.](../graph_synthesis/post_certificate/figures/03_resilience.svg) + +## 5. H4 - endpoint-scenario query review + +The selector minimizes worst-case expected residual Bernoulli variance **over the finite Cartesian product of interval endpoints**, with two reviews. Production uses Shannon recursion; the independent checker enumerates Boolean worlds over the same endpoint scenarios. Neither searches interval interiors. + +Across 128 frozen fixtures, endpoint-oracle discrepancies: **0**; cases worse than midpoint on endpoint scenarios: **0**. Strict endpoint gains: **45/128 (35.16%)**, comprising 13 random and 32 engineered fixtures. Point-interval controls pass **16/16**. + +**Continuous-interval claim: unsupported.** For singleton queries with intervals `0=[0.1,0.9]`, `1=[0.3,0.4]`, `2=[0.5,0.5]`, the supplemental control selects reviews [1, 2] and reports endpoint worst loss 0.09. The allowed interior witness `p0=0.5` yields **0.25**. Reviewing [0, 2] has analytic continuous worst loss **0.24**. The endpoint choice is therefore not continuous-interval minimax. This negative evidence is separate from the preserved endpoint target. Independent primitives are assumed; no dependence or semantic-calibration guarantee follows. + +![H4. Endpoint-scenario outcomes only; continuous interval claim unsupported.](../graph_synthesis/post_certificate/figures/04_interval_review.svg) + +## 6. H5 - n-ary conflict constraints + +A forbidden hyperedge rejects only its all-selected assignment; pairwise conflict is the arity-two case. **160/160** small fixtures match exhaustive optimization; recorded failures: **0**; permutation failures: **0**. Eight chains compare against `n - floor(n/3)`, with objectives and staging controls retained. At the largest chain, retained n-ary utility is **1366**, versus **683** under deliberately over-conservative pairwise projection. + +![H5. N-ary repair versus pairwise projection.](../graph_synthesis/post_certificate/figures/05_hypergraph.svg) + +## 7. Interpretation + +Every result is conditional on supplied graphs, lineage, costs, constraints or finite probability scenarios. Work counters do not measure wall-clock/API latency or cloud cost. The H4 interior counterexample rejects the broader interval-minimax interpretation. None establishes correct extracted entities, relations, qualifiers or probabilities. No production graph policy changes here. + +## 8. Reproducibility + +```bash +python -B -m unittest discover -s graph_synthesis/post_certificate/tests -v +python -B -m graph_synthesis.post_certificate.run --check +python -B -m graph_synthesis.post_certificate.report --check --update-paper +``` + +`results.json` retains outcomes and controls; `summary.csv` and five SVGs derive from those measurements. Manual validation also checks protocol ancestry/bytes, archive integrity, deterministic HTML and current-paper build hashes. The correction record documents implementation and interpretation changes; the frozen protocol is unchanged. + + # Do additional Jev calls improve graph edges? Timothy Wayne Gregg — exploratory research addendum, September 18, 2026 @@ -2429,3 +2509,5 @@ A fixed Jev service benefits from a selected bundle of explicit identity instruc # References The package bibliography supplies the citation entries used above. The source-verification notes distinguish interface documentation, original papers, dataset provenance, and remaining licensing or metadata questions. + + diff --git a/manuscript/paper-current.pdf b/manuscript/paper-current.pdf index fb4dd45..541adcd 100644 Binary files a/manuscript/paper-current.pdf and b/manuscript/paper-current.pdf differ