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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
135 changes: 135 additions & 0 deletions .github/workflows/nor23-coordinate-audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
name: NOR-23 preregistered randomized trusted coordinate audit frontier

on:
push:
paths:
- 'research/nor23_coordinate_audit/**'
- '.github/workflows/nor23-coordinate-audit.yml'
pull_request:
paths:
- 'research/nor23_coordinate_audit/**'
- '.github/workflows/nor23-coordinate-audit.yml'
workflow_dispatch:

permissions:
contents: read

jobs:
independently-audit-original-frozen-first-run:
runs-on: ubuntu-24.04
timeout-minutes: 25
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: SHA-check and independently reconstruct the archived first hosted public fixture and result
run: |
python research/nor23_coordinate_audit/receipt_audit.py --check \
--archive research/nor23_coordinate_audit/results/nor23_original_hosted.zip

exhaustive-small-audit-and-source-isolation:
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Verify small exact combinatorial coverage, independent challenges and original public program
run: python -m unittest research.nor23_coordinate_audit.test_experiment -v

first-prospective-twelve-source-audit:
needs: exhaustive-small-audit-and-source-isolation
runs-on: ubuntu-24.04
timeout-minutes: 40
env:
PYTHONHASHSEED: '0'
OMP_NUM_THREADS: '1'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Generate exactly twelve new distinct public sources without target answers
run: |
python research/nor23_coordinate_audit/experiment.py \
--make-fixture /tmp/nor23_fixture.json
- name: Check source-only fixture and freeze byte identity
run: |
python - <<'PY'
from pathlib import Path
from hashlib import sha256
from collections import Counter
import json
raw=Path('/tmp/nor23_fixture.json').read_bytes()
x=json.loads(raw)
assert x['schema']=='nor23.fresh_public_source_only.v1'
assert x['registered_source_offset']==94323000
assert x['public_only'] and x['hidden_true_future_and_program_absent']
assert x['trusted_witness_values_absent']
assert x['registered_budgets']==[0,1,4,16,64]
assert x['registered_radii']==[1,4,16]
assert x['registered_magnitudes']==[1,4294049777]
assert x['registered_trials']==4096
assert len(x['cases'])==12
assert len({r['full_public_input_sha256'] for r in x['cases']})==12
assert Counter(r['observation_degree'] for r in x['cases'])=={512:6,1024:6}
assert all(not any(s in r for s in ('program','future','hidden_target'))
for r in x['cases'])
print('NOR23 FROZEN FIRST PUBLIC SOURCE FIXTURE', len(raw), sha256(raw).hexdigest())
PY
- name: Run exact trusted-witness coordinate audits on sealed postchoice worlds
run: |
python research/nor23_coordinate_audit/experiment.py \
--check --fixture /tmp/nor23_fixture.json --out /tmp/nor23_full.json
- name: Recompute all 60 degree-budget-radius-delta cells and source proofs independently
run: |
python research/nor23_coordinate_audit/receipt_audit.py \
--check --fixture /tmp/nor23_fixture.json --full /tmp/nor23_full.json
- name: Preserve original first-run bytes and selected numeric findings
run: |
python - <<'PY'
from pathlib import Path
from hashlib import sha256
import json
a=Path('/tmp/nor23_fixture.json').read_bytes()
b=Path('/tmp/nor23_full.json').read_bytes()
r=json.loads(b)
assert r['registered_criteria_pass']
assert len(r['degree_cells'])==60
assert r['distinct_public_source_count']==12
assert all(z['blind_false_accept']+z['blind_detection']==z['trials']
for z in r['degree_cells'])
assert all(z['adaptive_false_accept']==z['trials'] for z in r['degree_cells'])
assert all(z['valid_reject']==0 for z in r['degree_cells'])
print('NOR23 FIRST PUBLIC FIXTURE BYTES SHA256',len(a),sha256(a).hexdigest())
print('NOR23 FIRST RESULTS BYTES SHA256',len(b),sha256(b).hexdigest())
PY
- uses: actions/upload-artifact@v4
with:
name: nor23_original_twelve_sources_4096_challenges_per_budget
path: |
/tmp/nor23_fixture.json
/tmp/nor23_full.json
if-no-files-found: error
retention-days: 90

separate-process-independent-replay:
needs: first-prospective-twelve-source-audit
runs-on: ubuntu-24.04
timeout-minutes: 25
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- uses: actions/download-artifact@v4
with:
name: nor23_original_twelve_sources_4096_challenges_per_budget
path: /tmp/nor23-original
- name: Independently reconstruct all source programs, attack streams, challenge draws and hidden grades
run: |
python research/nor23_coordinate_audit/receipt_audit.py --check \
--fixture /tmp/nor23-original/nor23_fixture.json \
--full /tmp/nor23-original/nor23_full.json
54 changes: 54 additions & 0 deletions research/nor23_coordinate_audit/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# NOR-23: exact coordinate audit frontier

**Prospective registration:** [REGISTRATION.md](REGISTRATION.md), committed as ed760cf before any NOR-23 source generation, challenge sampling or sealed grading. This follows [NOR-21](https://github.com/MoralityLabAI/Compactification-Theory/pull/185) (conditional exact public verification) and [NOR-22](https://github.com/MoralityLabAI/Compactification-Theory/pull/187) (target-dependent modular fingerprints and colliding hidden futures). Companion [MathCan NOR-23](https://github.com/patrickdugan/MathCan/pull/112) proves the exact finite-sample counting and adaptive blind-spot results in Lean 4.35.

## Research question

Given a correct, frozen public-only candidate prediction from the original sixteen-program RRC25 grammar, what happens if an **assumed honest external witness** reveals exactly k true target-output coefficients? Target witness data are new information; an audit pass on k<m coordinates does not prove full future correctness. The original public-only indistinguishability boundary continues to hold without such additional information.

The experiment uses 12 genuinely distinct source observations (2 independent replicate seeds × degrees 512/1024 × three NOR-21 source families) and four independent, frozen input-generating programs per family/degree grouping. Each source gets the same public prediction across all attacks and audit budgets. Two nonzero shift magnitudes, +1 and +4,294,049,777 (the NOR-22 product-modulus collision), change r=1/4/16 output positions. Target words are sealed until after the public proposal is fixed.

For each distinct source, each k∈{0,1,4,16,64} has **4,096** independent deterministic challenge draws uniformly sampling k distinct output indices without replacement. The blind adversary has committed to r changed indices before challenge sampling; the adaptive attacker sees which positions will be checked and alters only unchecked indices. The latter threat deliberately violates the blind attack's independence premise.

## First prospective hosted outcome

[First original green Ubuntu 24.04 CPython 3.12 CI run #43828806440](https://github.com/MoralityLabAI/Compactification-Theory/actions/runs/43828806440). All three jobs passed, including exhaustive small-population Python controls, exact source-locked first execution, and a **separate-process independent replay of the original artifacts**.

- First public-only source fixture: 2,364,428 bytes; SHA-256 **f8b293966a7332d5f0ddb572aab57eababe35a1afba08718bb488ab9a071094b**.
- Original full per-source/budget grade: 153,608 bytes; SHA-256 **ede96e99f3eba9d168020e4080f1db304770c600f17ba897ef8eda7cf19f6ba0**.
- [Preserved original ZIP](results/nor23_original_hosted.zip), with those exact two files, and [frozen first-run receipt](results/nor23_first_frozen_receipt.json). The permanent independent auditor checks each archive member's SHA against the receipt before rederiving results.

All **60** degree × k × r × magnitude cells passed the registered five-standard-error-plus-0.015 check against the exact hypergeometric detection probability, \`1 - C(m-r,k)/C(m,k)\`, conditional on an independent uniform k-subset challenge. At each degree and each (k,r,magnitude), the aggregate comprises six distinct sources × 4,096 challenge draws = **24,576 paired audit draws**. These are repeated challenges on the same source cohort, rather than 24,576 independent source inputs.

### Representative blind detection counts, unit shift

| Observed public degree | Future output length m | Audit k | Altered r | Detected / 24,576 | Observed | Exact expectation |
| --- | ---: | ---: | ---: | ---: | ---: | ---: |
| 512 | 769 | 16 | 1 | 456 | 1.855% | 2.081% |
| 512 | 769 | 16 | 16 | 7,072 | 28.776% | 28.807% |
| 512 | 769 | 64 | 1 | 1,984 | 8.073% | 8.322% |
| 512 | 769 | 64 | 4 | 7,240 | 29.460% | 29.410% |
| 512 | 769 | 64 | 16 | 18,608 | 75.716% | 75.455% |
| 1024 | 1537 | 16 | 1 | 291 | 1.184% | 1.041% |
| 1024 | 1537 | 16 | 16 | 3,671 | 14.937% | 15.486% |
| 1024 | 1537 | 64 | 1 | 979 | 3.984% | 4.164% |
| 1024 | 1537 | 64 | 4 | 3,886 | 15.812% | 15.658% |
| 1024 | 1537 | 64 | 16 | 12,170 | 49.520% | 49.536% |

The full per-source results include k=0/1/4 and all radii. Changing the shift from +1 to +4,294,049,777 gives the **same detection counts**, as predicted for exact integer coefficient witnesses; unlike the fixed small modular fingerprints in NOR-22, coordinate checks depend on attack location rather than residue magnitude. Valid targets passed every challenge. For the **adaptive attacker**, every altered world passed every k≤64 challenge because at least r uninspected indices remained.

### CPU cost

The experiment charges exact challenge generation and comparison separately on Ubuntu 24.04 CPython 3.12. Median per-draw challenge generation times across the six degree-512 sources were approximately **8.8 μs** for k=0, **17.0 μs** for k=16, and **39.3 μs** for k=64. Across degree-1024 sources the corresponding medians were approximately **8.8, 17.0, and 38.9 μs**. These measurements include SHA-256-seeded Python PRNG initialization and sampling; they should not be interpreted as hardware-efficient cryptographic verification costs.

The native witness comparison covers a fixed thirteen-case batch per draw: one valid and twelve altered-world/radius/magnitude/threat checks. Median comparison CPU per one of those checks grows from approximately 0.6 μs at k=0 to 6.3–6.7 μs at k=64 in this synthetic Python implementation. Times are descriptive; the preregistration imposed no CPU success threshold.

## Reproduce and audit

python -m unittest research.nor23_coordinate_audit.test_experiment -v
python research/nor23_coordinate_audit/experiment.py --make-fixture /tmp/nor23_fixture.json
python research/nor23_coordinate_audit/experiment.py --check --fixture /tmp/nor23_fixture.json --out /tmp/nor23_full.json
python research/nor23_coordinate_audit/receipt_audit.py --check --fixture /tmp/nor23_fixture.json --full /tmp/nor23_full.json
python research/nor23_coordinate_audit/receipt_audit.py --check --archive research/nor23_coordinate_audit/results/nor23_original_hosted.zip

The independent auditor reconstructs the planted programs from the preregistered fresh generator stream, computes exact native 16-template public masks, checks full future predictions against the independently reconstructed truth, and replays **245,760 challenge sets and 2,949,120 paired altered-world audit decisions**. The first frozen source fixture contains neither private planted programs nor future targets. The evidence supports this finite synthetic attack/witness model under the explicitly assumed honest publisher, with no cryptographic unpredictability or external theorem-proving guarantee.
39 changes: 39 additions & 0 deletions research/nor23_coordinate_audit/REGISTRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# NOR-23 registered protocol: randomized exact coordinate audits

**Registered 2026-11-16 before generation of fresh NOR-23 public sources, hidden target alterations, randomized coordinate challenges or outcome data.** Continuation of merged [NOR-21 #185](https://github.com/MoralityLabAI/Compactification-Theory/pull/185) and [NOR-22 #187](https://github.com/MoralityLabAI/Compactification-Theory/pull/187). Companion formal work will be in MathCan.

## Claim and scope

NOR-21 demonstrates public-only indistinguishability of two target futures, and NOR-22 tests target-dependent modular fingerprints from a trusted publisher (including explicit p and p*q collisions). NOR-23 gives a trusted external witness permission to reveal **exactly k target OUTPUT coefficients** after a public-only candidate future has been frozen, so as to test the coordinate-information budget. These values are an **additional trusted information channel**. An audit pass at k<m means compatibility on sampled positions, **not** complete future correctness, cryptographic authentication, or unrestricted theorem-prover soundness.

This is a controlled synthetic CPU study with a fixed 16-program RRC25 grammar and independently generated public input/output examples. No neural training. Preserve NOR-21's streamed exact public checker and original interpreter semantics without modification.

## New public sources and sealed worlds

* **12 fresh distinct complete-public sources**: two replicate cohorts 0,1 × observation degrees D∈{512,1024} × original NOR-21 families {wide_dense_small,wide_sparse_small,wide_rational_short}. Query input/output degree Q=3D/2, with m=Q+1 coefficients. Two full D-degree demonstrations per source.
* New generator seed: original RRC25 SEED + **94323000** + 1000003*rep + 100009*degree_index + 10007*family_index. Sample the first case (up to 100 attempts) with a uniquely inferred public header, a nonempty exact 16-bit program mask, and a **single shared hypothetical full query output** among accepted programs. Require 12 different full public digests. Source selection may use public compatibility and hypothetical candidate predictions only.
* Public fixture records demo coefficients, query input, header, source attempt, exact public mask and public-input digest. **No private planted program or true target output**, no altered target coordinates, and no witness answers appear in the public source fixture.
* Freeze a full public-only candidate prediction per source using NOR-21 stream16. The sealed native generator reconstructs the planted program and exact true target **only after the public proposal has been fixed**. The valid world and perturbed worlds share the same public observation and same candidate prediction.
* Precommitted, **blind** attack coordinates for each source and r use a distinct PRNG stream seeded by SHA-256 of registered ATTACK_SEED=202611230071, public digest, r. They are drawn independently of the later audit challenge. Attack radii r∈{1,4,16} and shift magnitudes δ∈{1, 4294049777} (NOR-22 p*q), with shifts applied to r distinct true-future output positions.
* Challenge budgets **k∈{0,1,4,16,64}**. Generate **4096** uniformly sampled k-subsets (without replacement) independently per distinct source and k, using SHA-256-derived deterministic CHALLENGE_SEED=202611230072 and trial ordinal. Reuse identical challenges across r and δ for paired comparisons. These seeds make CI replay deterministic; the *blind* threat model requires attack positions fixed before challenge sampling. Known code or seeds do not constitute cryptographic secrecy.
* The **adaptive informed adversary** instead sees each challenge set and then selects the first r unchecked coordinates, which exists because k+r≤80<m. It alters the actual hidden target only after seeing the audit set. This is a separate control with a stronger adversary, not a simulation of an unknowable future.
* Trusted witness: on the selected k indices, return the **actual hidden target's exact integer coefficients** to the verifier. Compare them to the frozen candidate at each sampled position. Reject/abstain on any mismatch. k=0 returns the unchanged public-only answer. All targets outside NOR-21's planted program family are labeled accordingly.
* Authentic witness availability, correctness and timing are **explicit assumptions**. If the witness is forged, arbitrary answers can make any audit pass; we do not claim to establish witness trust.

There are 12 independent source identities, 3 blind radii, 2 shift magnitudes, 5 budgets and 4096 deterministic challenge draws per source/budget, with both threat models. Do not report the many paired challenge/world decisions as independent source samples.

## Frozen mathematical expectation and checks

Let m=Q+1, r changed output coordinates, and k sampled distinct indices.

* Under independent uniform k-subset sampling **after** a fixed r-subset alteration, exact miss probability is C(m-r,k)/C(m,k) (zero if k>m-r); detect probability is one minus this ratio. The formula is independent of the nonzero integer shift magnitude.
* With known challenge positions and r≤m-k, an adaptive attacker can choose only unchecked positions: zero detections and 100% false acceptances on altered worlds.
* Valid futures must pass 100% of audits. Public-only candidate and mask must stay identical across target worlds and audit budgets.
* k=m would detect every nonzero alteration and establish equality of the entire target sequence under an honest witness. It is a mathematical boundary, not measured by the registered k≤64 experiment.
* For each (degree,k,r,δ), calculate per-source successes, degree-pooled detection rate over 6×4096 challenges, exact hypergeometric prediction, and raw counts. A 5-standard-error tolerance plus 0.015 absolute allowance is used as a deterministic sanity check for the blind Monte Carlo; record all misses and any failure. Adaptive false acceptance must be exact. No significance tests treat challenge draws as independent source examples.
* Measure per-source cumulative challenge+comparison CPU nanoseconds using CPython 3.12 in GitHub Actions, report paired k-to-k differences and amortized cost per audit. Python time is an observed engineering metric without a preregistered speed threshold.
* All decisions are source-locked with SHA-256 of the public fixture and result; a separately implemented replay auditor must rederive candidate choices, attacks, sampling and truth checks from the original RRC25 interpreter (and public source generator).

## CI and outcome discipline

Unit tests must cover all k-subsets exhaustively on small finite m, adversary timing, unseen-coordinate evasion, valid-witness pass, δ-independence, public/hidden isolation and full-source candidate parity. CI must run the full 12-source experiment under a **40-minute** budget and an independent replay audit; archive the original outputs before writing interpretations. If a run exceeds the budget or a source fails to generate, record the failure instead of lowering sample counts or changing seeds. Any change to this frozen protocol requires a dated amendment committed before new held-out data.
Loading
Loading