Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
c3e4f65
docs(CGC-02): preregister trained shared recurrent protected task spe…
patrickdugan Nov 18, 2026
90c347c
feat(CGC-02): train weight-tied teacher, fit BPD physical factors and…
patrickdugan Nov 18, 2026
707142a
test(CGC-02): check exact full softmax preservation, real recurrent J…
patrickdugan Nov 18, 2026
2df346a
test(CGC-02): verify nine shared native BPD mask invocations and full…
patrickdugan Nov 18, 2026
81b4372
docs(CGC-02): describe protected normalized readout, BPD native parit…
patrickdugan Nov 18, 2026
218a209
chore(CGC-02): register recurrent protected task-subspace experiment
patrickdugan Nov 18, 2026
fb94b25
chore(CGC-02): freeze trained teacher, BPD source, protected observer…
patrickdugan Nov 18, 2026
2be1837
ci(CGC-02): source-lock and run excluded trained roots with real pinn…
patrickdugan Nov 18, 2026
afc4935
fix(CGC-02): reverse clipped donor write at boundary to guarantee cha…
patrickdugan Nov 18, 2026
14bd732
chore(CGC-02): amend pre-fresh source hash for deterministic clipped-…
patrickdugan Nov 18, 2026
d351381
docs(CGC-02): preserve initial unit-test donor boundary failure and p…
patrickdugan Nov 18, 2026
b708971
ci(CGC-02): isolate CGC-01 numpy-only theorem tests from newly added …
patrickdugan Nov 18, 2026
c3686fb
docs(CGC-02): document pre-fresh CGC-01 recursive test discovery isol…
patrickdugan Nov 18, 2026
78203c6
ci(CGC-02): launch first SHA-locked four fresh teachers with heldout …
patrickdugan Nov 18, 2026
923c4ee
results(CGC-02): publish first four-root depth-eight portability and …
patrickdugan Nov 18, 2026
cf8dd50
ci(CGC-02): archive byte-verified first-run four-root raw JSON into t…
patrickdugan Nov 18, 2026
5240ec3
results(CGC-02): archive byte-verified four-root first-run full raw s…
github-actions[bot] Nov 18, 2026
4f7275c
docs(CGC-02): surface trained four-root depth portability failure fro…
patrickdugan Nov 18, 2026
3f77c1d
docs(CGC-02): link raw first-run protected task transport evidence in…
patrickdugan Nov 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cgc01-source-math.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Install source-only numerical dependency
run: python -m pip install "numpy>=1.26,<3"
- name: Eighteen independent analytic and exact-rational checks
run: python -m unittest discover -s research/causal_gauge_compactification -p 'test_*.py' -v
run: python -m unittest discover -s research/causal_gauge_compactification -p 'test_finite_audit.py' -v
- name: Reproduce pinned toy quotient and protected causal spectrum
run: python research/causal_gauge_compactification/finite_audit.py
- name: Verify source-only receipt by recomputation
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/cgc02-archive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: CGC-02 archive first registered full raw four-root receipt

on:
push:
branches:
- "research/cgc02-protected-recurrent-depth-20261118"
paths:
- ".github/workflows/cgc02-archive.yml"
workflow_dispatch:

permissions:
contents: write
actions: read

jobs:
immutable-raw-receipt:
runs-on: ubuntu-latest
timeout-minutes: 8
steps:
- uses: actions/checkout@v4
with:
persist-credentials: true
- name: Fetch original registered first-run Actions artifact
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: |
mkdir -p "$RUNNER_TEMP/cgc02receipt"
gh run download 44239969004 \
--repo MoralityLabAI/Compactification-Theory \
--name cgc02-fresh-four-root-protected-depth-eight-receipt \
--dir "$RUNNER_TEMP/cgc02receipt"
- name: Verify source gate, root roster and byte-for-byte artifact hash
shell: bash
run: |
python - <<'PY'
import json,hashlib,os
from pathlib import Path
root=Path("research/causal_gauge_compactification/cgc02")
path=Path(os.environ["RUNNER_TEMP"])/"cgc02receipt"/"cgc02_fresh_4root.json"
raw=path.read_bytes()
sha=hashlib.sha256(raw).hexdigest()
assert sha=="bc309cef503a30d778f992f2e7e4e764b1336dd19636e344d36c5ceb6817f070",(sha,len(raw))
data=json.loads(raw)
assert data["phase"]=="fresh" and data["roots"]==[2601,2607,2617,2621]
assert len(data["rows"])==4
assert data["registered_gates"]["engineering_roots_passed"]==4
assert data["registered_gates"]["exploratory_unseen_depth_portability_roots"]==1
assert data["registered_gates"]["strong_incremental_vs_privileged_tangent_roots"]==0
assert json.loads((root/"LOCK.json").read_text())["fresh_exploratory_roots"]==[2601,2607,2617,2621]
dest=root/"results"/"fresh_4root.json"
dest.parent.mkdir(exist_ok=True,parents=True)
dest.write_bytes(raw)
print("CGC-02 RAW SHA VERIFIED AND STAGED:",sha,"bytes",len(raw))
PY
- name: Commit immutable full JSON science receipt to this PR branch
shell: bash
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add research/causal_gauge_compactification/cgc02/results/fresh_4root.json
if git diff --cached --quiet; then
echo "Receipt already committed"
else
git commit -m "results(CGC-02): archive byte-verified four-root first-run full raw science receipt"
git push origin HEAD:research/cgc02-protected-recurrent-depth-20261118
fi
113 changes: 113 additions & 0 deletions .github/workflows/cgc02-engineering.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: CGC-02 source-locked trained recurrent engineering and native BPD parity

on:
push:
branches:
- "research/cgc02-*"
paths:
- "research/causal_gauge_compactification/cgc02/**"
- ".github/workflows/cgc02-engineering.yml"
pull_request:
paths:
- "research/causal_gauge_compactification/cgc02/**"
- ".github/workflows/cgc02-engineering.yml"
workflow_dispatch:

permissions:
contents: read

jobs:
excluded-engineering:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: Checkout immutable native BPD physical implementation
uses: actions/checkout@v4
with:
repository: MoralityLabAI/BPD
ref: f22a883144ee7d2caa2bd5d9936dd9e083c7f139
path: _vendor/bpd
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install CPU scientific dependencies
run: python -m pip install "torch==2.5.1" "numpy>=1.26"
- name: Verify frozen prospective source and BPD pin
shell: bash
run: |
python - <<'PY'
import json,subprocess
from pathlib import Path
root=Path("research/causal_gauge_compactification/cgc02")
lock=json.loads((root/"LOCK.json").read_text())
assert lock["status"]=="FROZEN_BEFORE_FRESH_FOUR_ROOT_TEACHER_TRAINING"
assert lock["fresh_exploratory_roots"]==[2601,2607,2617,2621]
assert lock["excluded_design_roots"]==[901,902]
for p,sha in lock["source_blobs"].items():
got=subprocess.check_output(["git","hash-object",str(root/p)],text=True).strip()
assert got==sha,(p,got,sha)
for p,sha in lock["cgc01_source_blobs"].items():
got=subprocess.check_output(["git","hash-object",p],text=True).strip()
assert got==sha,(p,got,sha)
native=subprocess.check_output(["git","-C","_vendor/bpd","rev-parse","HEAD"],text=True).strip()
assert native==lock["native_bpd_pin"],(native,lock["native_bpd_pin"])
print("CGC-02 native BPD and new-root source registration SHA LOCK PASS")
PY
- name: Twelve CGC-02 source and geometric engineering unit tests
run: python -m unittest discover -s research/causal_gauge_compactification/cgc02 -p 'test_*.py' -v
- name: Real pinned BPDModel TiedComponentLinear native nine-pass parity
shell: bash
run: |
export PYTHONPATH="$GITHUB_WORKSPACE/_vendor/bpd:$GITHUB_WORKSPACE"
python -m research.causal_gauge_compactification.cgc02.native_bpd_parity \
--seed 901 --out /tmp/cgc02_native.json
- name: Run ONLY previously used engineering roots 901 and 902
run: |
python -m research.causal_gauge_compactification.cgc02.experiment \
--phase excluded --teacher-steps 650 --factor-steps 360 \
--pairs 512 --random-nulls 32 --tangent-nulls 16 \
--out /tmp/cgc02_excluded.json > /tmp/cgc02_excluded_stdout.json
- name: Check excluded receipts, record every failure and null denominator
shell: bash
run: |
python - <<'PY'
import json,math
r=json.load(open("/tmp/cgc02_excluded.json"))
assert r["phase"]=="excluded" and r["roots"]==[901,902]
assert len(r["rows"])==2
for row in r["rows"]:
assert row["generated_pairs"]==512
assert 0<=row["eligibility"]["eligible"]<=512
assert len(row["factor_physical_mse_by_restart"])==2
for depth in ("2","4","6","8"):
assert set(row["causal_by_depth"][depth])=={
"zero_edit","physical_BPD_full","physical_teacher_full",
"exact_dark_donor","task_joint","task_depth4",
"bpd_weight_svd","teacher_weight_svd","random_protected_basis"
}
for score in row["causal_by_depth"][depth].values():
assert score["immediate_normalized_readout_max_error"]<=1e-6
for k in ("4","8"):
null=row["privileged_signed_full_task_jacobian_controls"][k]
assert null["arms"]==16
assert null["max_signed_task_derivative_error"]<=1e-4
assert null["max_physical_norm_error"]<=1e-4
print(json.dumps({
"seed":row["seed"],"eligible":row["eligibility"]["eligible"],
"clean_k4_mae":row["clean_by_depth"]["4"]["recipient_task_mae_vs_oracle"],
"clean_k8_mae":row["clean_by_depth"]["8"]["recipient_task_mae_vs_oracle"],
"task_joint_k8_recovery":row["causal_by_depth"]["8"]["task_joint"]["donor_recovery_eligible"],
"physical_svd_k8_recovery":row["causal_by_depth"]["8"]["bpd_weight_svd"]["donor_recovery_eligible"],
"signed_tangent_k8_mean":row["privileged_signed_full_task_jacobian_controls"]["8"]["mean_recovery_eligible"],
}))
print("CGC-02 engineering complete on excluded seeds ONLY")
PY
- uses: actions/upload-artifact@v4
if: always()
with:
name: cgc02-excluded-root-native-and-geometry
path: |
/tmp/cgc02_native.json
/tmp/cgc02_excluded.json
107 changes: 107 additions & 0 deletions .github/workflows/cgc02-fresh.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: CGC-02 registered four fresh recurrent-root depth-8 causal audit

on:
push:
branches:
- "research/cgc02-*"
paths:
- ".github/workflows/cgc02-fresh.yml"
workflow_dispatch:

permissions:
contents: read

jobs:
registered-four-roots:
runs-on: ubuntu-latest
timeout-minutes: 18
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install pinned CPU Torch
run: python -m pip install "torch==2.5.1" "numpy>=1.26,<3"
- name: Verify frozen pre-data protocol and pre-fresh engineering repair
shell: bash
run: |
python - <<'PY'
import json,subprocess
from pathlib import Path
root=Path("research/causal_gauge_compactification/cgc02")
lock=json.loads((root/"LOCK.json").read_text())
assert lock["status"]=="FROZEN_BEFORE_FRESH_FOUR_ROOT_TEACHER_TRAINING"
assert lock["fresh_exploratory_roots"]==[2601,2607,2617,2621]
assert lock["excluded_design_roots"]==[901,902]
assert lock["pre_fresh_engineering_amendments"][0]["fresh_roots_examined"]==0
assert lock["native_bpd_pin"]=="f22a883144ee7d2caa2bd5d9936dd9e083c7f139"
for path,expected in lock["source_blobs"].items():
actual=subprocess.check_output(["git","hash-object",str(root/path)],text=True).strip()
assert actual==expected,(path,actual,expected)
for path,expected in lock["cgc01_source_blobs"].items():
actual=subprocess.check_output(["git","hash-object",path],text=True).strip()
assert actual==expected,(path,actual,expected)
print("CGC-02 FRESH source SHA LOCK VERIFIED; 901/902 excluded")
PY
- name: Recheck the registered task Jacobian and protected softmax geometry
run: |
python -m unittest discover \
-s research/causal_gauge_compactification/cgc02 -p 'test_*.py' -v
- name: Train four new teachers and perform first registered depth-eight replay
shell: bash
run: |
python -m research.causal_gauge_compactification.cgc02.experiment \
--phase fresh --teacher-steps 650 --factor-steps 360 \
--pairs 512 --random-nulls 32 --tangent-nulls 16 \
--out /tmp/cgc02_fresh_4root.json > /tmp/cgc02_stdout.json
- name: Independently print registered engineering and science gate ledger
shell: bash
run: |
python - <<'PY'
import json,math
from pathlib import Path
x=json.loads(Path("/tmp/cgc02_fresh_4root.json").read_text())
assert x["roots"]==[2601,2607,2617,2621], x["roots"]
assert x["phase"]=="fresh" and len(x["rows"])==4
assert x["config"]["depths"]==[2,4,6,8] and x["config"]["rank"]==2
gates=x["registered_gates"]
for row in x["rows"]:
assert row["generated_pairs"]==512
n=row["eligibility"]["eligible"]
assert 0<=n<=512
assert len(row["factor_physical_mse_by_restart"])==2
for depth in ("2","4","6","8"):
for name,score in row["causal_by_depth"][depth].items():
assert score["immediate_normalized_readout_max_error"]<=1e-6,(row["seed"],name,depth)
assert math.isfinite(score["donor_mse_all"])
for depth in ("4","8"):
matched=row["privileged_signed_full_task_jacobian_controls"][depth]
assert matched["arms"]==16
assert matched["max_signed_task_derivative_error"]<=1e-4
assert matched["max_physical_norm_error"]<=1e-4
task=row["causal_by_depth"]["8"]["task_joint"]
weight=row["causal_by_depth"]["8"]["bpd_weight_svd"]
random=row["same_dose_random_K_controls_depth8"]["task_joint"]
tangent=row["privileged_signed_full_task_jacobian_controls"]["8"]
print("CGC02_ROOT="+json.dumps({
"seed":row["seed"],"eligible":n,
"clean_k4_mae":row["clean_by_depth"]["4"]["recipient_task_mae_vs_oracle"],
"clean_k8_mae":row["clean_by_depth"]["8"]["recipient_task_mae_vs_oracle"],
"task_joint_k8_mse":task["donor_mse_eligible"],
"weight_svd_k8_mse":weight["donor_mse_eligible"],
"task_joint_k8_recovery":task["donor_recovery_eligible"],
"weight_svd_k8_recovery":weight["donor_recovery_eligible"],
"random_sham_k8_recovery":random["mean_donor_recovery_eligible"],
"signed_jacobian_sham_k8_recovery":tangent["mean_recovery_eligible"],
"one_step_task_quotient_defect":row["reduced_zero_fill_one_step_closure_defects"]["task_joint"],
}))
print("CGC02_GATES="+json.dumps(gates,sort_keys=True))
print("CGC-02 source-registered 4-root replay finished; science failure does not suppress receipt")
PY
- uses: actions/upload-artifact@v4
if: always()
with:
name: cgc02-fresh-four-root-protected-depth-eight-receipt
path: |
/tmp/cgc02_fresh_4root.json
/tmp/cgc02_stdout.json
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
**CGC-02 depth-generalization test (Nov 18, 2026):** [Trained recurrent protected causal subspace results](research/causal_gauge_compactification/cgc02/RESULTS.md) from [PR #247](https://github.com/MoralityLabAI/Compactification-Theory/pull/247): registered engineering 4/4 pass, rank-two task portability at unseen depth 8 FAIL 1/4, incremental mechanism beyond full signed task-Jacobian null FAIL 0/4. [Full first-run raw data](research/causal_gauge_compactification/cgc02/results/fresh_4root.json). Source-locked synthetic teacher with native BPD physical checks; no real TRM or privacy claim.

**CGC-01 protected causal compactification (November 18, 2026):** [Task-conditioned safe causal dimension, finite-radius nonlinear bounds, exact recurrent quotient and precision-bit obstructions](research/causal_gauge_compactification/README.md). [Mathematical derivations](research/causal_gauge_compactification/THEORY.md) and 18 deterministic numerical/exact-rational tests connect BPD's source-binding controls with the NOR, LSV, SMC, SCM and recurrent-circuit compactification tracks. Source-only theory; no newly trained model result.

**NOR-12:** [Task-supervised basin-conditioned residual readout](research/nor12_task_readout/README.md) fits four 16×14 matched residual rankers over the frozen 1,000-parameter RRC-25 GRU using only exact degree-192 public demo verification labels. The first heldout run yielded 44/72 future-correct for the basin residual vs. 42/72 original, with both gains arising from a single aliased late-source feature tensor. Four independent seed-separated 72-case confirmations yielded 167/288 vs. 160/288, matched by the random-feature control, with unadjusted case-level paired p≈0.21. An ablation of the basin feature left the first split's 44/72 result unchanged. [NOR-12B hosted independent results](https://github.com/MoralityLabAI/Compactification-Theory/actions/runs/43709095616) passed, and [NOR-12C frozen receipt audit](https://github.com/MoralityLabAI/Compactification-Theory/actions/runs/43709504979) is green. The original GRU is unchanged, and basin-specific task gains remain unestablished.
Expand Down
2 changes: 2 additions & 0 deletions research/causal_gauge_compactification/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
**CGC-02 first trained recurrent test (2026-11-18):** [Registered 4-root result](cgc02/RESULTS.md), [byte-verified raw source-locked JSON](cgc02/results/fresh_4root.json), and [trained teacher/native BPD experiment](cgc02/README.md). Full three-class normalized current readout and BPD physical factors pass engineering 4/4 roots. Task-selected protected rank-two blocks achieve 100% heldout donor retrieval at trained depth 4 but only 14.9% root-mean at unseen depth 8; a physical BPD weight-SVD rank-two baseline achieves 48.6%. Registered portability FAIL 1/4 and incremental-vs-signed-full-task-Jacobian FAIL 0/4. This is exploratory same-family toy-model evidence, leaving CGC-01 mathematical claims intact.

# CGC-01: protected causal compactification

[Mathematical theory](THEORY.md) · [Source-only audit and future protocol](PROTOCOL.md) · [Executable finite reference](finite_audit.py)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# CGC-02 engineering amendment 01: clipped donor source at exact boundary

**2026-11-18, before any fresh root was trained or scored.** The original source lock Git blob is `14e42ea5925f3d5d0f914b3505e85057739830b1`. The initial [excluded-root hosted engineering run #44239296050](https://github.com/MoralityLabAI/Compactification-Theory/actions/runs/44239296050) verified the BPD/source lock and passed 11 of 12 geometry/source unit tests. The remaining test generated one exact negative-boundary input (`a=-0.8`) with an outward negative donor displacement, and clamping produced an unchanged event. The intended donor-pair invariant correctly rejected this no-change case. This is a generator defect, detected **before native execution, excluded trained-root scoring, and any fresh 2601/2607/2617/2621 scientific model outcomes**.

The single source change computes the clamped donor write and, if it equals the original private value, reverses the sampled signed displacement before re-clamping. The magnitude range, independent donor RNG, source family, exact source-oracle definition and all evaluation filters remain unchanged. The original `experiment.py` Git blob is `efae0143b4de870ff4338012b5c9551748a99495`; the amended source blob is `085e5329a393cb47e43559dc34dedeb9bf74a089`.

[LOCK.json](LOCK.json) records both source hashes, this failed run and the unchanged science contract. **No new-root data have been examined at amendment time.** If any later engineering failure requires a repair after scientific scoring, it must be reported as post-data and the original outcomes retained.
Loading
Loading