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
29 changes: 29 additions & 0 deletions .github/workflows/coe01-chromatic-observers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: COE-01 chromatic observer exact checks

on:
pull_request:
paths:
- 'research/chromatic_observer_gym_v1/**'
- '.github/workflows/coe01-chromatic-observers.yml'
push:
branches: [main]
paths:
- 'research/chromatic_observer_gym_v1/**'
- '.github/workflows/coe01-chromatic-observers.yml'
workflow_dispatch:

permissions:
contents: read

jobs:
exact-finite:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Check all finite certificates and extension tests
run: python -m unittest discover -s research/chromatic_observer_gym_v1 -p 'test_*.py' -v
- name: Print pinned reference witnesses
run: python research/chromatic_observer_gym_v1/observer_codes.py
31 changes: 31 additions & 0 deletions .github/workflows/coe02-cut-observers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: COE-02 exact cut observer tests

on:
pull_request:
paths:
- 'research/chromatic_observer_gym_v1/**'
- '.github/workflows/coe02-cut-observers.yml'
push:
branches: [main]
paths:
- 'research/chromatic_observer_gym_v1/**'
- '.github/workflows/coe02-cut-observers.yml'
workflow_dispatch:

permissions:
contents: read

jobs:
finite-cut-oracles:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Run cut BFS and independent word exhaustive tests
run: python -m unittest discover -s research/chromatic_observer_gym_v1 -p 'test_*.py' -v
- name: Print frozen exact rational witness
run: python research/chromatic_observer_gym_v1/activation_case.py research/chromatic_observer_gym_v1/frozen_k5_onehot.json
- name: Print sharp code phase points
run: python research/chromatic_observer_gym_v1/l1_cut_codes.py
31 changes: 31 additions & 0 deletions .github/workflows/coe03-soft-observers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: COE-03 soft observer precision and depth checks

on:
pull_request:
paths:
- 'research/chromatic_observer_gym_v1/**'
- '.github/workflows/coe03-soft-observers.yml'
push:
branches: [main]
paths:
- 'research/chromatic_observer_gym_v1/**'
- '.github/workflows/coe03-soft-observers.yml'
workflow_dispatch:

permissions:
contents: read

jobs:
exact-finite-and-training:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: All COE-01/02/03 exact and CPU pilot tests
run: python -m unittest discover -s research/chromatic_observer_gym_v1 -p 'test_*.py' -v
- name: Reproduce 1024-state rational witness
run: python research/chromatic_observer_gym_v1/soft_precision_codes.py
- name: Reproduce ten-seed synthetic linear probe pilot
run: python research/chromatic_observer_gym_v1/train_soft_probe.py
38 changes: 38 additions & 0 deletions .github/workflows/coe04-frozen-loop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: COE-04 frozen tied-loop temporal observer checks

on:
pull_request:
paths:
- 'research/chromatic_observer_gym_v1/**'
- '.github/workflows/coe04-frozen-loop.yml'
push:
branches: [main]
paths:
- 'research/chromatic_observer_gym_v1/**'
- '.github/workflows/coe04-frozen-loop.yml'
workflow_dispatch:

permissions:
contents: read

jobs:
frozen-evaluator-replay:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Verify all chromatic observer and frozen temporal tests
run: python -m unittest discover -s research/chromatic_observer_gym_v1 -p 'test_*.py' -v
- name: Print checkpoint provenance and all three SHA256 checks
run: |
python - <<'PY'
import sys
sys.path.insert(0, 'research/chromatic_observer_gym_v1')
from frozen_loader import verify_frozen
data, hashes = verify_frozen()
assert len(data['items']) == 3
for entry in hashes:
print(entry)
PY
54 changes: 54 additions & 0 deletions .github/workflows/coe05-phase-order.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: COE-05 phase-order and clock-gauge certificates

on:
pull_request:
paths:
- 'research/chromatic_observer_gym_v1/**'
- '.github/workflows/coe05-phase-order.yml'
push:
branches: [main]
paths:
- 'research/chromatic_observer_gym_v1/**'
- '.github/workflows/coe05-phase-order.yml'
workflow_dispatch:

permissions:
contents: read

jobs:
finite-and-frozen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Exact finite math and frozen-head evidence (no model downloads)
run: python -m unittest discover -s research/chromatic_observer_gym_v1 -p 'test_phase_order.py' -v
- name: Replay new model cohort without torch
run: |
python research/chromatic_observer_gym_v1/phase_order_replay.py \
--activation research/chromatic_observer_gym_v1/replication_activations.json.gz \
--receipt research/chromatic_observer_gym_v1/new_fit_phase_receipt.json
- name: Recompute exhaustive fit-only search with NumPy
run: |
python -m pip install 'numpy==2.3.5'
python research/chromatic_observer_gym_v1/phase_order_search.py \
--input research/chromatic_observer_gym_v1/replication_activations.json.gz \
--out /tmp/coe05_recomputed.json
python - <<'PY'
import json
root='research/chromatic_observer_gym_v1/'
a=json.load(open(root+'new_fit_phase_receipt.json'))
b=json.load(open('/tmp/coe05_recomputed.json'))
for x,y in zip(a['records'],b['records']):
assert x['model_seed']==y['model_seed']
assert x['candidate_count']==y['candidate_count']
for key in ('primary_stable_order_head','comparative_best_total_head'):
for field in ('candidate_index','fit_stable_novel_edges',
'fit_order_only_hits','fit_total_edge_hits',
'heldout_order_only_hits','heldout_total_edge_hits',
'heldout_count_only_hits','heldout_order_only_by_context'):
assert x[key][field]==y[key][field], (x['model_seed'],key,field)
print('Fit-only selection exactly recovered across independent CI runtime')
PY
42 changes: 42 additions & 0 deletions .github/workflows/coe06-phase-blind.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: COE-06 phase-invariant quantized observer and frozen replay

on:
pull_request:
paths:
- 'research/chromatic_observer_gym_v1/**'
- '.github/workflows/coe06-phase-blind.yml'
push:
branches: [main]
paths:
- 'research/chromatic_observer_gym_v1/**'
- '.github/workflows/coe06-phase-blind.yml'
workflow_dispatch:

permissions:
contents: read

jobs:
orbit-and-frozen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Replay exact cyclic code, resource bounds, and frozen heads
run: python -m unittest discover -s research/chromatic_observer_gym_v1 -p test_phase_blind.py -v
- name: Print exact finite phase-blind witness
run: python research/chromatic_observer_gym_v1/gauge_orbit_codes.py
- name: Confirm golden committed ledger from exhaustive integer enumeration
run: |
python research/chromatic_observer_gym_v1/resource_bound.py > /tmp/coe06-resource-preview.txt
python research/chromatic_observer_gym_v1/phase_gauge_replay.py \
--activation research/chromatic_observer_gym_v1/replication_activations.json.gz \
--receipt research/chromatic_observer_gym_v1/new_fit_phase_receipt.json \
--out /tmp/coe06-gauge-replay.json
python - <<'PY'
import json
src='research/chromatic_observer_gym_v1/'
assert json.load(open('/tmp/coe06-gauge-replay.json')) == json.load(open(src+'COE06_GAUGE_REPLAY.json'))
print('Post-hoc frozen replay matches checked-in receipt')
PY
56 changes: 56 additions & 0 deletions research/chromatic_observer_gym_v1/COE02.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
## COE-02: exact ℓ1 cut-capacity and quantization gap

**November 15, 2026.** This extends COE-01 on the existing draft research branch.

Each binary probe is an oriented cut of a finite sample of latent states. Its
pairwise Hamming contribution is a cut semimetric. The exact minimum binary
width under an `ell_1` Lipschitz constraint is therefore a nonnegative integer
cut-multiplicity covering problem with per-pair capacity constraints. The
companion [MathCan theorem and proof](https://github.com/patrickdugan/MathCan/blob/feat/coe01-chromatic-observer-20261115/research/compactification/CHROMATIC_CUT_CAPACITY.md)
explains the exactness, rational dual lower certificates and the sharp
unbounded gap between fractional cut-mass and physical binary coordinates.

### Reproduce

Run from this repository's root with Python 3.10+ and its standard library:

```bash
python -m unittest discover -s research/chromatic_observer_gym_v1 -p 'test_*.py' -v
python research/chromatic_observer_gym_v1/l1_cut_codes.py
python research/chromatic_observer_gym_v1/activation_case.py research/chromatic_observer_gym_v1/frozen_k5_onehot.json
```

The frozen fixture is a **synthetic**, rational five-state, five-feature
one-hot activation prototype with equilateral `ell_1` metric. It requires all
pairs distinguished. These are mathematical test states, not model activations.
The exact solver and a separate word-level exhaustive oracle agree across all
8 three-state evaluator graphs at `L=0,1,2` with Hamming margins 1 and 2.

| Equilateral K5 evaluator | Minimum bits | Method |
| --- | ---: | --- |
| `ell_infinity`, Lipschitz `L=1` | 3 | COE-01 graph coloring |
| `ell_1`, `L=1` | infeasible | odd-cycle/cube-diameter obstruction |
| `ell_1`, `L=2` | 4 | exact cut BFS, sharp anticode theorem |
| `ell_1`, `L=3` | 3 | exact cut BFS and witness |
| fractional cut LP, `L=2` | 5/3 | balanced rational cut witness and dual |

The integer/fractional ratio is `12/5` for K5 and grows on the order of `n/2`
for equilateral complete evaluators K_n. Fractional cut mass is only a
mathematical relaxation: its value does not measure the number of discrete
feature coordinates a network has learned.

### Real activation adapter

`activation_case.py` accepts a frozen JSON document with `format` set to
`coe02-activation-v1`, a list of states with unique `id` and equal-length
`activation` feature vectors (rational or decimal strings), `evaluator_edges`
of state-ID pairs, `lipschitz` (rational string), and `hamming_margin`.
The adapter computes the *exact rational feature-ell_1 metric* and compares the
COE-01 `ell_infinity` observer with the COE-02 `ell_1` optimum, preserving an
explicit provenance string. For larger datasets, prototype selection and the
evaluator split must be frozen before choosing probes. The exact method is
small-n exponential and raises when a resource guard is hit.

Current evidence is synthetic and combinatorial. Model checkpoint extraction,
trained/held-out SAE probes, intervention response, and empirical mechanism
claims remain future verification gates.
31 changes: 31 additions & 0 deletions research/chromatic_observer_gym_v1/COE03.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# COE-03: precision/time observer capacity and controlled quantization pilot

**Date:** 2026-11-15. Follows COE-01 and COE-02 on the existing draft PR.

A finite equilateral `K_n` evaluator with ℓ1 output margin 1 and total output Lipschitz budget 2 requires `n-1` one-bit features. Its continuous scalar observer needs `Theta(log n)` feature dimensions, with an explicit small-amplitude construction. If those outputs must occupy a uniform `b`-bit grid while retaining `O(log n)` coordinates, the necessary and sufficient order of precision is `Theta(log log n)`. Reusing `w` binary output channels over T observable steps requires `w*T >= n-1` when the **whole transcript's total ℓ1 budget is 2**. Each theorem's hypotheses and proofs appear in [MathCan COE-03](https://github.com/patrickdugan/MathCan/blob/feat/coe01-chromatic-observer-20261115/research/compactification/SOFT_PRECISION_DEPTH.md).

The construction has no dependence on the unverified deep proofs in its source-motivating OpenAI Math families 098 and 332. The finite metric is synthetic. The 10-bit outputs are numeric values, not 10 separate unit-amplitude Boolean probes.

## Repeat all checks

Python 3.10+ standard library suffices, from repository root:

```sh
python -m unittest discover -s research/chromatic_observer_gym_v1 -p 'test_*.py' -v
python research/chromatic_observer_gym_v1/soft_precision_codes.py
python research/chromatic_observer_gym_v1/train_soft_probe.py
```

The cumulative suite has 30 tests, including 9 new COE-03 cases. A `Random(2305)` 1,024-state, 256-head, ten-bit-grid code yields Hamming extrema `91,168` over all 523,776 pairs. The rational amplitude is `12/1023`, so minimum and maximum ℓ1 distances are exactly `364/341` and `672/341`. The deterministic code hash is pinned in the test. The binary equivalent requires 1,023 output channels under the **same** ℓ1 budget/margin conditions. These counts describe observer output dimension, not stored parameter or data bits.

The K5 exact continuous three-feature certificate and all 64 coordinatewise threshold patterns are independently checked, along with a binary four-feature witness. The temporal reference packs an n-state one-hot transcript into `ceil((n-1)/w)` steps of width w, and checks the full transcript budget.

An exploratory standard-library training pilot fits a three-output linear probe on five frozen one-hot states. It uses projected pairwise squared-hinge subgradients, seeds 0 to 9, a fixed learning rate and 4,000-step limit. Across ten runs with all ten edges used in training, 10/10 reach tolerance `1e-3`. Threshold at `0.5` yields zero valid binary K5 codes. An exploratory seven-edge train/three-edge withheld evaluation gives 10/10 train and 2/10 withheld passes. The held-out split was explored before commitment; these proportions are diagnostic, not model generalization statistics. Test replay checks them under Python 3.12 CI.

### Work that remains

- Compare a named frozen looped-transformer or SAE checkpoint after extracting latent activation vectors and independently measured evaluator edges.
- Establish a blinded train/test task split before modeling, with quantized and unquantized head budgets fixed.
- Separate observer width, bit precision, wall time and full-transcript memory during recurrent inference.

Only synthetic finite codes and the specified CPU training pilot have been executed.
Loading
Loading