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
37 changes: 37 additions & 0 deletions .github/workflows/cgc01-source-math.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CGC-01 protected causal compactification source mathematics

on:
pull_request:
paths:
- "research/causal_gauge_compactification/**"
- ".github/workflows/cgc01-source-math.yml"
push:
branches:
- "research/cgc01-*"
paths:
- "research/causal_gauge_compactification/**"
- ".github/workflows/cgc01-source-math.yml"
workflow_dispatch:

permissions:
contents: read

jobs:
source-only-causal-compactification:
runs-on: ubuntu-latest
timeout-minutes: 6
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- 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
- 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
run: python research/causal_gauge_compactification/source_only_receipt_audit.py
- name: Check source syntax
run: python -m compileall -q research/causal_gauge_compactification
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
**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.

**NOR-10:** [Constructive one-bit terminal metric for two source-certified GRU attractors](research/nor01_numerical_orbit_sketch/NOR10.md) uses a single shared rational inter-center distance and one runtime basin-label bit to represent all late 24-step states of the signed and squared source streams. Exact integer-square-root quantization and source-locked nonlinear contraction yield an all-pair late-tail error <=1.096e-11 after 64 retained blocks, while a zero-bit shared code must incur >5.0209 cross-basin error. This one-dimensional terminal representation requires the two previously certified source labels and is separate from unseen-input basin classification and native task performance. [NOR-10 CI](https://github.com/MoralityLabAI/Compactification-Theory/actions/runs/43704307173) passed.
Expand Down
36 changes: 36 additions & 0 deletions research/causal_gauge_compactification/PROTOCOL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# CGC-01 source-only mathematical audit and future physical-block study

**18 November 2026.** This protocol accompanies [THEORY.md](THEORY.md). The initial code tests are source-only checks of explicitly specified finite matrices and exact rational witnesses. They are **not** a prospective neural-model experiment and have no newly scored scientific roots. Future neural tests require a new source/observer lock before model captures.

## Stage 0: executable mathematical checks (included)

From repository root, with `numpy` installed:

```bash
python -m unittest discover -s research/causal_gauge_compactification -p 'test_*.py' -v
python research/causal_gauge_compactification/finite_audit.py
```

The finite tests cover these mathematical claims under explicit contracts: a protected current/future readout Jacobian generates a physical orthonormal null basis; the task-conditioned truncated SVD minimizes worst-case and Frobenius first-order error; a high-magnitude physical weight singular direction can be task irrelevant; BPD component-gauge shears preserve the complete physical operator and its SVD intervention; Euclidean singular values depend on the physical state metric; a full-row-rank multioutput public Jacobian admits the advertised minimum-norm protected correction; a nonlinear tangent-safe edit can still change finite public outputs; the correction's exact quadratic residual fits a Hessian bound; the real-linear affine row-space quotient is closed under all supplied actions; the toy rational Krylov rank matches the independent floating quotient rank; full-action observability may require more state dimensions than a passive single-action probe; observability Gramian rank cannot decrease with horizon; nonnormal recurrences have early gain despite small eigenvalues; separated futures incur a quantized-code bit lower bound. All data are generated from short, fixed matrices contained in source.

**Exactness:** `Fraction`-based Gaussian elimination gives an exact rank certificate for the integer examples. NumPy SVD/projectors and floating normative tests are numerical checks against analytical formulae at small scale, **not** formal verification of arbitrary real matrices. The analytic theorems have handwritten proofs, not Lean certificates. Record Python/NumPy versions in CI output.

## Stage 1: prospective physical-model campaign (not executed)

**Hypothesis:** A development-selected rank-`r` *physical* BPD block built from the protected task Gramian transports a task-specific causal variable across previously unseen recurrent passes and source/program families, beyond equal-norm, matched-future-Jacobian and matched-task-sensitivity shams, while respecting a complete protected observable channel.

Choose one frozen model family and named recurrent state bus. Candidate first pair: a small trained TRM (source-generated Sudoku/task-variable interventions) and a compact looped transformer (source-generated Horn-graph/equation tasks); the second model should constitute independent replication, not a substitute for root replication within the first. Before any checkpoint outcome, freeze:

- The *full* readout definition, including normalization/head, all token sites needed for the behavioral target, exact protected output conditioning and input context. Preserve true full recurrent state, caches and forcing.
- Output metric/whitening, physical hidden metric, selected development visit/horizon, radius ladder, and the rank/soft-rank tolerance; the public protected Jacobian and future task Jacobian must come from the true frozen target model on development samples.
- The physical BPD reconstruction fit (including residual weights, active masks, dictionary training phases), independent dictionary initializations, GL factor gauge checks, physical output-SVD and task-optimal SVD, independent SAE decoder frames, and full native BPD replay. Avoid selecting a rank from heldout task scores.
- Admissible donor pairs, independent task-variable label oracle, current true normalized-logit match, protected future output tolerance, whether any finite public-level-set corrector uses privileged future gradients, source family hashes, and count of *attempted* donors. Exact LayerNorm shift gauges may be treated separately from merely Jacobian-null directions.
- Minimality and utility criteria: heldout native task correctness, effect on an independent target variable, recurrent depth extrapolation, finite-radius protection of all monitored outputs, total forward/fit/scheduling costs, and model-root-level uncertainty.

**Controls:** full native state transplant, no edit, full physical `VU` reconstruction, output-SVD of `VU`, task-conditioned Gramian block of the *teacher physical transition*, randomized protected dark subspaces at matched norm, equal signed target-gradient responses, task-sensitivity-matched negative block, best-rank `W` SVD baseline, fixed cross-root gauge alignment and phase-disjoint learned-dictionary training. A compact factor claim must beat relevant controls and not merely reproduce the whole physical matrix.

**Causal ranking:** let `R_B` be independent task-variable donor recovery after the selected block edit, and `R_0..R_63` the same eligible-pair recovery under 64 development-calibrated shams per independent teacher root. Report total task effect, first-order future-response prediction, residual nonlinear effect and the physical/gauge stability of the selected subspace. Use root as inferential unit, not token/pair/sham. A preregistered strong effect must clear an independent-root null tolerance rather than a conveniently chosen single random direction. A 59-root maximum of identically distributed sham-derived root statistics supplies a one-sided 95th-percentile bound with ~95% confidence under the stated iid root law, and must be fixed before a separate >=32-root confirmation cohort. Source-family-disjoint tasks and effective sample counts are required for any behavioral transfer claim.

**Falsifiers:** dominant task eigenvectors collapse to matched target-gradient controls; equally good BPD fits yield inconsistent physical subspaces without a prescribed alignment; top physical-weight SVD suffices; best causal block merely preserves a local tangent and breaks finite public protection; the observed low-dimensional map fails semiconjugacy under additional passes; a small decoder hides task labels in a schedule/external memory; global separated-basin counts defeat the local rank frontier; or eligible natural interventions are too rare to support a robust claim. A negative is recorded without redefining the metric or moving the rank threshold.

**Protected exclusions:** no existing NOR, SMC, SCM, LSV, BPD SF03/04/05 or other source-locked receipts are revised; do not access ARG-03-N's sealed 168-case set. Stage 0 passing is proof-oracle hygiene only. The exact finite results must never be reported as evidence that a trained TRM has learned this quotient.
30 changes: 30 additions & 0 deletions research/causal_gauge_compactification/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# CGC-01: protected causal compactification

[Mathematical theory](THEORY.md) · [Source-only audit and future protocol](PROTOCOL.md) · [Executable finite reference](finite_audit.py)

The **CGC-01** bridge takes BPD's negative controls on recurrent secret/source transport and turns them into a task-specific dimension question for compact recurrent models: *How few physically meaningful directions can explain future task behavior while respecting a precisely defined protected observer?*

For a complete recurrent state `h`, a differentiable protected output `P`, a task-output stack `T` and physical Euclidean metric, form the protected kernel `K=ker DP(h)` and stack future task Jacobians on that kernel. The singular spectrum of `DT(h)|_K` gives an **optimal local linear rank/error frontier**. A uniform task Hessian bound gives an explicit finite-radius extension. A separately derived minimum-norm correction addresses multichannel finite public-output residuals **only when** its restricted Jacobian has adequate row rank; current-readout finite equality needs an exact affine/architectural gauge.

For an exact real-affine recurrence, iterative row-span closure recovers the smallest linear state quotient preserving all declared future observations/actions. This distinguishes a locally task-informative subspace from an autonomously recurrent macrostate. Global separated-future codes impose a separate precision-bit lower bound, and nonnormal early amplification matters even when the recurrence ultimately contracts.

## Run source-only checks

```bash
python -m pip install numpy
python -m unittest discover -s research/causal_gauge_compactification -p 'test_*.py' -v
python research/causal_gauge_compactification/finite_audit.py
```

All numerical witnesses use static synthetic matrices; one independent exact rational row-rank oracle is included. **No trained BPD success, SAE discovery, model compression gain, neuron interpretation or actual secret protection is claimed.** Theoretical identities concern explicitly stated physical metrics, output weightings, protected channels and task horizons.

## Crosswalk

- [BPD source/intervention experiments](https://github.com/MoralityLabAI/BPD): SF03's signed-gradient null, SF04 source-binding failure, SF05 finite versus tangent public repair, SF05B source-closure training tradeoff. The full physical BPD matrix and gauge-invariant blocks are the candidate units, subject to heldout causal validation.
- [RC-01](../recurrent_circuits_v1/THEORY.md): resource-bounded compactness and exact affine `F_2` quotient. CGC-01 adds a real-linear controlled version and protected task-conditioned tangent analysis.
- [LSV-15](../levin_sieve_v1/pretrained_trm/GAUGE_QUOTIENT.md) / [LSV-18](../levin_sieve_v1/pretrained_trm/LSV18_SEMICONJUGACY.md): exact LayerNorm symmetry and future-closed latent state criteria.
- [NOR-04/10](../nor01_numerical_orbit_sketch/NOR04.md): source-locked block contraction and the two-basin terminal-bit obstruction. Local tangent rank and global basin-label bits are different.
- [SMC-15](../real_recurrence_sae_v1/SMC15_RESULTS.md) / [SCM-15](../dimensional_atlas/SCM15_THEORY.md): output-near-null SAE coalitions, tangent atlas and physical frame comparisons.
- [Precision frontier](../precision_entropy_frontier/README.md): task-separated futures and quantized code/parameter cost.

A future neural experiment should be registered as a separate CGC/BPD-GM follow-up with new source-family and independent model-root evaluation. CGC-01 remains a **source-only mathematical addition**.
15 changes: 15 additions & 0 deletions research/causal_gauge_compactification/SOURCE_ONLY_RECEIPT.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"full_real_affine_quotient_rank": 2,
"integer_rational_krylov_rank": 2,
"physical_weight_top_singular_output": [
10.0,
0.0
],
"protected_kernel_dimension": 2,
"protected_task_one_rank_operator_tail": 0.0,
"protected_task_rank": 1,
"real_model_privacy_evidence": false,
"source_only": true,
"task_gradient_orthogonal_to_top_weight_output": true,
"trained_BPD_evidence": false
}
Loading
Loading