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
133 changes: 133 additions & 0 deletions .github/workflows/nor25-robust-witness-audits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
name: NOR-25 preregistered robust uniform-reserve coefficient audits

on:
push:
paths:
- 'research/nor25_robust_audits/**'
- '.github/workflows/nor25-robust-witness-audits.yml'
pull_request:
paths:
- 'research/nor25_robust_audits/**'
- '.github/workflows/nor25-robust-witness-audits.yml'
workflow_dispatch:

permissions:
contents: read

jobs:
frozen-registration-and-finite-controls:
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Verify preregistration is ancestral to implementation
run: |
git merge-base --is-ancestor da075255e2d5e188d5a84f3febbcc7b162d08b79 HEAD
test -s research/nor25_robust_audits/REGISTRATION.md
- name: Compile source and independently enumerate small-universe audit subsets
run: |
python -m compileall -q research/nor25_robust_audits
python -m unittest research.nor25_robust_audits.test_experiment -v

first-heldout-12-source-audit:
needs: frozen-registration-and-finite-controls
runs-on: ubuntu-24.04
timeout-minutes: 45
env:
PYTHONHASHSEED: '0'
OMP_NUM_THREADS: '1'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Materialize new public-only source fixture
run: |
python research/nor25_robust_audits/experiment.py \
--make-fixture /tmp/nor25_fixture.json
- name: Freeze and audit public-only source fixture before any attack outcomes
run: |
python - <<'PY'
from pathlib import Path
from hashlib import sha256
import json
raw=Path('/tmp/nor25_fixture.json').read_bytes()
z=json.loads(raw)
assert z["schema"]=="nor25.source_only_12_fresh_test.v1"
assert z["source_offset"]==99325000
assert z["replicates"]==[4,5]
assert z["source_only"] and z["private_truth_absent"] and z["attack_sets_absent"]
assert len(z["cases"])==12
assert len({r["full_public_input_sha256"] for r in z["cases"]})==12
assert all(not any(k in r for k in ("future","program","attack","witness"))
for r in z["cases"])
print("NOR25 FIRST PUBLIC FIXTURE BYTES",len(raw),"SHA256",sha256(raw).hexdigest())
PY
- name: Execute predeclared blind and informed adversary tests
run: |
python research/nor25_robust_audits/experiment.py \
--fixture /tmp/nor25_fixture.json --out /tmp/nor25_full.json
- name: Record raw full receipt and all source scores even if registered FAIL
run: |
python - <<'PY'
from pathlib import Path
from hashlib import sha256
import json
a=Path('/tmp/nor25_fixture.json').read_bytes()
b=Path('/tmp/nor25_full.json').read_bytes()
z=json.loads(b)
assert z["fixture_sha256"]==sha256(a).hexdigest()
assert len(z["source_records"])==12
assert all(len(r["observations"])==360 for r in z["source_records"])
assert all(c["detected"]+c["missed"]==1024
for r in z["source_records"] for c in r["observations"])
assert all(r["valid_target_failures"]==0 and
r["informed_attack_detected"]==0 and
r["delta_invariance_failures"]==0
for r in z["source_records"])
print("NOR25 ORIGINAL FIXTURE BYTES SHA256",len(a),sha256(a).hexdigest())
print("NOR25 ORIGINAL RESULT BYTES SHA256",len(b),sha256(b).hexdigest())
print("NOR25 REGISTERED PASS",z["registered_primary_pass"])
PY
- name: Compare original full hosted bytes to immutable first-run SHA256 receipt
run: |
python research/nor25_robust_audits/original_lock_audit.py \
--fixture /tmp/nor25_fixture.json --full /tmp/nor25_full.json
- uses: actions/upload-artifact@v4
if: always()
with:
name: nor25-original-fresh-source-only-and-robust-audit-results
path: |
/tmp/nor25_fixture.json
/tmp/nor25_full.json
if-no-files-found: warn
retention-days: 90

independent-separate-process-replay:
needs: first-heldout-12-source-audit
runs-on: ubuntu-24.04
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- uses: actions/download-artifact@v4
with:
name: nor25-original-fresh-source-only-and-robust-audit-results
path: /tmp/nor25
- name: Independently reconstruct every source, schedule and detection decision
run: |
python research/nor25_robust_audits/receipt_audit.py \
--fixture /tmp/nor25/nor25_fixture.json \
--full /tmp/nor25/nor25_full.json
- name: Independently check the frozen first original file hashes
run: |
python research/nor25_robust_audits/original_lock_audit.py \
--fixture /tmp/nor25/nor25_fixture.json \
--full /tmp/nor25/nor25_full.json
54 changes: 54 additions & 0 deletions research/nor25_robust_audits/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# NOR-25: a uniform reserve for source-risk coordinate audits

**Registered prior to data:** [REGISTRATION.md](REGISTRATION.md), frozen in the first commit of the branch. Continues the exact finite RRC25 verifier and NOR-24 source-conditional audit study ([merged PR #192](https://github.com/MoralityLabAI/Compactification-Theory/pull/192)).

## Scientific question

NOR-24's trained static risk ranking and sequential Bayesian auditor differed by approximately **0.10 percentage points** on the in-template primary readout. Both detected **0%** of its deliberately off-template attacks with 16 inspections. The core question for NOR-25 is whether allocating eight of sixteen authenticated coefficient probes to uniformly randomized unseen coordinates can achieve nonzero worst-case blind-attack coverage while retaining useful template localization.

The prospective primary policy, **hybrid_50**, selects the first eight coordinates of NOR-24's public trained-risk ordering, then samples eight positions uniformly without replacement from the complement of those selected eight. Risk ordering uses NOR-24's **TRAIN-only** prior 295:246:153:78 over four disclosed attack templates. No NOR-25 labels update that prior.

The alternate allocation policies hybrid_25 and hybrid_75 reserve respectively four and twelve of sixteen probes for uniform exploration. Controls preserve NOR-24's source-only uniform, static-risk, shuffled-prior, posterior and privileged true-support oracle policies. An informed adversary seeing the realized schedule is scored as a separate zero-detection control.

## Exact finite blind-attack guarantee

Write m for the number of coefficient positions, k for total probes, u for uniform reserve, t=k-u for the public-risk fixed prefix, and r for the size of the fixed blind attack set. Conditional on the attack set avoiding the prefix, the number of exploration subsets missing every altered coordinate is

C(m-t-r,u)

out of the total

C(m-t,u).

If the attack intersects the targeted prefix, detection is certain. Therefore for any blind radius-r attack selected before audit randomization, its chance of detection is at least

1 - C(m-t-r,u)/C(m-t,u).

The minimum is attained by attack sets disjoint from the targeted prefix, assuming r<=m-t. This is an exact combinatorial floor, not a confidence interval. The implementation stores it as exact reduced integer numerator/denominator per source, radius, budget and hybrid policy. All feasible small universes are exhaustively tested.

The probability model assumes independent idealized secret audit randomness and an attack fixed before sampling. The reproducible SHA256-based test stream is a controlled scientific experiment, not a claimed production secrecy mechanism. An adversary selecting altered coordinates *after* seeing the realized probes avoids all inspected positions whenever r unchecked positions exist.

## Prospective protocol

Twelve new source-distinct RRC25 public inputs (replicates 4 and 5; degrees 512 and 1024; each of the three NOR-21 source families), frozen observed demos, public query, header and native acceptance mask. Source generation attempts are deterministic under the new NOR-25 source offset 99325000. Each public source has m=769 or 1537 true query coefficients.

The blind attack sets are held fixed per source, attack kind, and radius before generating any challenge schedule. 1024 random challenge ordinals per source, budgets 4/16/64, altered-coordinate radii 1/4/16, both exact nonzero shift magnitudes. Independent runs compare all policies on the same attack sets, while random audit schedules are separately salted. Budget levels for hybrid policies are sampled separately to maintain the exact two-stage uniform-reserve rule, rather than artificially imposing a nested schedule.

**Predeclared primary criterion, k=16, r=4:** hybrid_50 must beat uniform in at least nine of twelve source pairs and yield at least +0.10 absolute source-mean in-template weighted detection gain. It must also detect more off-template attacks than static ranking on at least ten of twelve sources, and reach at least 2% source-mean off-template detection. We will retain and report a FAIL outcome if any threshold is missed. In-template mixture weights are tail .4, magnitude .3, lag .2, background .1, preserving NOR-24's prior test mixture.

## Reproduce

From repo root on Python 3.12 (no third-party packages):

python -m unittest research.nor25_robust_audits.test_experiment -v
python research/nor25_robust_audits/experiment.py --make-fixture /tmp/nor25_fixture.json
python research/nor25_robust_audits/experiment.py --fixture /tmp/nor25_fixture.json --out /tmp/nor25_full.json
python research/nor25_robust_audits/receipt_audit.py --fixture /tmp/nor25_fixture.json --full /tmp/nor25_full.json

The first CI job verifies source-only isolation and exhaustive finite combinatorics. A second job generates the 12 new source identities and freezes the public-only JSON bytes before any attack or audit grading. An independent third job restores the CI artifacts and separately reconstructs every source, blind attack, hybrid schedule, observation count, theoretical floor and primary pass/fail computation, without importing NOR-25's evaluator.

## Scope and receipt status

The NOR-25 registration and source preceded all held-out outcomes. The [first prospective held-out experiment](RESULTS.md) PASSED all four registered primary gates in [GitHub Actions #43885131079](https://github.com/MoralityLabAI/Compactification-Theory/actions/runs/43885131079). An independent replay reproduced 4,423,680 audited decisions. The [immutable first-run receipt](results/nor25_original_first_receipt.json) pins the original fixture and full result byte hashes. The [original_lock_audit.py](original_lock_audit.py) independently checks the exact original bytes, and can deterministically regenerate them after the Actions artifact retention period.

The honest coefficient witness remains an external target-dependent oracle. The evaluation is restricted to finite synthetic algebraic programs, declared attack families, reproducible blind challenges and the stated support-shift stressor. It does not establish an unconditional full-output verifier or robustness to an attacker with schedule visibility.
40 changes: 40 additions & 0 deletions research/nor25_robust_audits/REGISTRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# NOR-25 prospective registration: uniform-reserve robust coefficient auditing

**Registered 2026-11-16, before generating any NOR-25 source fixture, challenge schedules, attack positions, or outcomes.** Base: merged NOR-24 PR #192 at `f28edf3b65fb4b834b661ead28d23b290e6f88e3`. This is a new source experiment and preserves the NOR-24 archive and registered result. If a correction is needed, append a dated amendment; preserve the first registration commit.

## Fixed hypothesis and threat model

NOR-24's sequential posterior achieved 34.9699% primary weighted detection against 34.8674% for static prior and 6.1458% for uniform, but its off-template 16-query detection was zero. NOR-25 tests whether **eight learned-risk inspections followed by eight uniform inspections over the remaining coordinates** retain a positive source-level template advantage while recovering an explicit worst-case blind-attack detection floor.

The adversary fixes a set of exactly r altered coefficients BEFORE the audit samples its secret random schedule. Alterations use an honest exogenous exact target witness, integer deltas 1 and 4294049777, and are judged by intersection between the inspected positions and changed set. For an informed adversary that sees the realized schedule and can choose alterations afterward, the fixed-blind lower bound DOES NOT APPLY: all partial audits can be evaded when r unchecked coordinates exist. This negative control is mandatory.

## Pinned priors, new sources, and isolation

- Reuse the original RRC25 exact sixteen-template family, NOR-21 streamed public verifier, and NOR-24 public-only proposal interface without modifying their source code.
- Source generation: independently seeded **12 new held-out source identities**, replicates **4 and 5**, degrees **512 and 1024**, all three original NOR-21 families at each degree. Local source seed `corpus.SEED + 99325000 + 1000003*replicate + 100009*degree_index + 10007*family_index`; accept first attempt among 100 with unique public digest, unique public header, nonzero native mask and unanimous full-output prediction. Output lengths m=769 or 1537. These sources were absent from NOR-24 training and evaluation. No model training occurs in NOR-25.
- Source-only fixture holds two observed degree-D examples, the public query input, original native public acceptance mask, inferred header, seed, replicate, and public SHA; it excludes the planted program, true future, witness values, and attack positions. Save its bytes and SHA-256 BEFORE evaluating attack labels.
- Freeze the NOR-24 TRAIN-only fitted prior as exact fractions: tail 295/772, magnitude 246/772, lag 153/772, full-uniform background 78/772. Do not refit on NOR-25 test identities or outcomes. The 96-element tail, highest-absolute-coefficient, and delay+spacing supports remain public and predeclared. The off-template stress support is the complement of the union of those three structural regions.

## Policies, randomization, and primary decision

- Audit budgets k=(4,16,64), changed-coordinate radii r=(1,4,16), two exact nonzero deltas, 1024 independently salted trial ordinals per held-out public source and policy. Test kinds: tail, magnitude, lag, uniform background, and separate off_template. Each source/kind/r attack set is sampled ONCE, from public-only support with SHA-256 seed stream **202611250072**, before generating audit schedules; it is held fixed across all challenge ordinals, policies and deltas.
- Seven nonprivileged policies: uniform random without replacement; frozen static trained-prior rank; original clean-path sequential posterior; shuffled-prior ranking; hybrid_25 (25% exploration), **hybrid_50 (primary, 50% exploration)**, hybrid_75 (75% exploration). Include a privileged known-support oracle separately, never in the primary comparison.
- For each hybrid policy and budget k, first choose the top `t=k-u` ranked static-prior coordinates, then draw exactly `u=floor(f*k)` unseen positions uniformly without replacement from their complement using a distinct SHA-256 audit stream **202611250073**, source digest, policy, k, and trial. At k=4/16/64 the reserve sizes are (1,4,16), (2,8,32), (3,12,48). Schedules for different k are separately salted, and need NOT be nested. Baseline static and sequential policies retain their original top-k prefix. No audit selector reads private truth, blind altered positions, attack kind, or test results.
- Primary grid k=16, r=4, delta=1. Source-weighted in-template mixture fixed at (tail .4, magnitude .3, lag .2, uniform background .1), as in NOR-24. **PASS** iff hybrid_50 beats uniform on at least 9/12 independent sources, yields mean in-template detection gain >= +0.10 absolute vs uniform, exceeds static ranking on the off-template fixed attack on at least 10/12 independent sources, AND attains >= 0.02 source-mean off-template detection. Record failure without adapting the protocol. Additional static-retention ratio, source-specific changes against posterior, and alternative reserve allocations are descriptive only; no second primary gate is picked after data.
- Verify exact magnitude invariance, legitimate-target full acceptance, and informed-adversary evasion in every source/attack/policy/budget cell. Report individual source differences and pooled numbers; challenge replicas share 12 source units.

## Mathematical guarantee, independent of source distribution

Let U be the m possible output coordinates, let T be any fixed size-t set of risk-ranked coordinates, let A be any **fixed** size-r attack subset selected before the exploration randomness, and let R be a uniform size-u subset of U\\T, independent of A. The exact blind detection probability is 1 if A meets T; otherwise it is

1 - C(m-t-r,u)/C(m-t,u).

Thus the minimum over all fixed size-r attacked sets (where m-t>=r and m-t>=u) equals this same hypergeometric value. For u=0 and a feasible disjoint attack the worst-case detection is zero. The finite combinatorial formula gives no computational randomness-security guarantee: a pseudorandom SHA256 seed in public CI is a reproducibility device rather than hidden production entropy.

## Receipt and review gates

- Commit this registration before producing any fixture or experimental result.
- Independent fixture generator parity checks versus the original RRC25 native 16-template public mask; reconstruct sealed true targets only AFTER freezing public proposals and policy schedules.
- Exhaustive small-m combinatorial oracle for hybrid blind detection probability and adversary-first/eavesdropping counterexample. Per-source SHA256 summaries of attack positions, schedule sampling and observation rows; independent second-process replay on the committed source-only fixture.
- GitHub Actions Python 3.12 CPU; tests and heldout run are separate jobs. Commit source only in first pass; attach unaltered fixture and complete outcome as CI artifact. If and only if the first run succeeds, preserve exact original bytes in a committed immutable archive and audit their SHA256 hashes.
- Interpretation is conditional on a synthetic finite attack model, authentic external target values, fixed blind attacks, disclosed support templates and the independent audit-randomness assumption. No complete-target soundness or live-verifier security claim is implied.
Loading
Loading