Skip to content
Draft
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
52 changes: 52 additions & 0 deletions .github/workflows/rht26-development-math.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: RHT-26 development math / FSI-01 resolution review

on:
pull_request:
paths:
- 'skills/evalmath-mechinterp-power/**'
- 'src/spiral_ln/evaluation_reward_carryover_count.py'
- 'tests/test_evaluation_reward_carryover_count.py'
- 'paper/rht26_development_bridge.md'
- '.github/workflows/rht26-development-math.yml'
push:
paths:
- 'skills/evalmath-mechinterp-power/**'
- 'src/spiral_ln/evaluation_reward_carryover_count.py'
- 'tests/test_evaluation_reward_carryover_count.py'
- 'paper/rht26_development_bridge.md'
- '.github/workflows/rht26-development-math.yml'
workflow_dispatch:

permissions:
contents: read

jobs:
math-only:
runs-on: ubuntu-latest
timeout-minutes: 12
env:
PYTHONDONTWRITEBYTECODE: '1'
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Pure-stdlib resolution and finite count-state tests
run: |
python -m unittest discover -s skills/evalmath-mechinterp-power/scripts -p 'test_*.py' -v
PYTHONPATH=src python -m unittest tests.test_evaluation_reward_carryover_count -v
- name: Syntax checks, separate from model training
run: |
python -m compileall -q skills/evalmath-mechinterp-power/scripts src/spiral_ln/evaluation_reward_carryover_count.py
- name: Ensure original RHT-26 v2 source receipt remains hash-current
run: |
python - <<'PY'
import hashlib,json
from pathlib import Path
receipt=json.loads(Path("output/evaluation_reward_carryover/rht26_v2.json").read_text())
for fname,digest in receipt["source_sha256"].items():
assert hashlib.sha256(Path(fname).read_bytes()).hexdigest()==digest,fname
print("PASS: all 6 original RHT26 source digests unchanged")
PY
171 changes: 171 additions & 0 deletions paper/rht26_development_bridge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
# RHT-26 development bridge: cue multiplicity, snapshot sufficiency and inference resolution

**20 November 2026. Status:** mathematical extension and audit of the eight-root
Qwen3-1.7B *development* pilot. The original RHT-26 exact receipt at
`output/evaluation_reward_carryover/rht26_v2.json` remains pinned and unchanged.
This note is subsequent analysis, not a retroactive amendment to the original
prospective protocol or a confirmation result.

**Sources:** [RHT-26 exact finite note](reward_hacking_carryover.md),
[FSI-01](finite_sample_inference.md),
[Control-Harness development report](https://github.com/MoralityLabAI/Control-Harness/blob/27b210f758dbf45540dbc0e5226cb00e84dc623b/results/rht26_local/development_report.md),
and its [independently replayed archive, PR #85](https://github.com/MoralityLabAI/Control-Harness/pull/85).

## 1. What the original two-bit state leaves out

The original artifact/policy state `(a,ell) in {0,1}^2` can
represent the **presence** of a cue and one policy state. At frozen weights,
once `a=1`, another retained cue still projects to `a=1`. A fixed
terminal endpoint law `Q_(a,ell)` therefore gives the same joint persistence
risk for one and eight cues if `ell` is fixed and all other relevant state
is equal. This is a direct consequence of the chosen projection.

The completed development cohort found joint persistence for the frozen
artifact arm at exposure doses `0,1,2,4,8` of, respectively,
`0/256`, `15/256`, `161/256`, `247/256`, `242/256`.
The observed effect is close to saturation, with a small decrease between
doses 4 and 8. These are *fixed-checkpoint development observations*;
32 target cases per root do not create 256 independent training lineages.

A minimal count augmentation is `n in {0,...,8}`, with
`n' = min(8,n+X_t)` and `P(X_t=1|n)=lambda`. Its exact law for
`T <= 8` is binomial `P(n=k)=C(T,k)lambda^k(1-lambda)^(T-k)`
when started at zero. An endpoint `q_n=P(B=1,A=1|n)` may depend on
multiplicity. The original binary projection `a=1{n>0}` discards that
dependence. The CPU-only [finite bridge](../src/spiral_ln/evaluation_reward_carryover_count.py)
and [tests](../tests/test_evaluation_reward_carryover_count.py) verify this
mathematical distinction. The displayed synthetic endpoint is illustrative;
it is not a fitted law for the Qwen observations.

The updated-policy arm adds a separate dimension: optimizer depth/trajectory,
not merely the binary `ell` flag. The measured `p11` risk rose to
`186/256` at dose four, then fell to `44/256` at dose eight.
A model that aims to describe this trajectory should carry enough policy
state to distinguish its intermediate checkpoints, and use observed
intervention data to estimate its transitions.

## 2. Terminal snapshot sufficiency limits temporal claims

Let `H` be a source history, `theta(H)` its final model parameters,
`S(H)` its final visible store, and `x` a fixed target task.
Suppose the fresh target agent is evaluated from a reset context using a
shared terminal kernel

```
P((B,A)=y | H,x) = Q(y | theta(H), S(H), x).
```

If histories `H` and `H'` end at exactly the same
`(theta,S,x)`, then their conditional target-outcome distributions are
identical. Proof: the right-hand sides have identical arguments. The
statement requires the terminal tuple to contain every relevant channel,
including RNG state and caches if those are persistent.

In the Control-Harness frozen-weight arm, the runner begins each source
episode with a fresh task context, injects the cue records through the
**harness** before model generation, and keeps the model parameters fixed.
The final store is therefore the intended transmission channel. The actor
was not observed to write the cue as an autonomous strategy.

The exact artifact transplantation result (242/256 in both in-situ and
transplanted stores, identically for all eight roots) verifies the expected
behavior under fixed checkpoint and identical final store. Deleting the
store restores clean behavior. The one-versus-eight cue control has the
same final store token budget and 32 occupied record slots, but changes
the number of active instructions. It identifies an effect of **final
workspace cue density / repeated instructions**. The temporal history
that led to the store remains unidentifiable from that contrast alone.

A further experiment can distinguish temporal effects by holding the *exact
final bytes*, model parameters and target fixed while varying past histories
or additional retained channels. An endogenous-stigmergy experiment must
also let the agent choose whether to create the artifact. These extensions
are scientific design changes, not conclusions from this pilot.

## 3. The finite-sample gate that the normal planner omits

The current `evalmath-mechinterp-power` planner estimates normal-theory
sample size using measured root variation. FSI-01's **positive-effect-floor**
decision uses a separate conservative guarantee. For a root effect in
`[-1,1]`, family size `m`, error `alpha`, scientific/noise
floor `tau`, and a future observed root mean `dbar`, the final
one-sided lower bound is

```
L = dbar - sqrt(2 log(m/alpha)/G).
```

The final gate requires `L > tau`. A prospective target effect `delta`
can clear it only when

```
G > 2 log(m/alpha) / (delta-tau)^2,
```

where `delta > tau`. With `m=4`, `alpha=.05`,
`tau=.05`, and the *original planning target* `delta=.10`,
at least **3,506 independent roots** are required. An interaction on
`[-2,2]` must be halved before using the same formula; for the raw
.10/.05 values the requirement is **14,023** roots.

At 64 roots and four comparisons, the root-bound radius is about 0.370;
the target effect must exceed about **0.420** for this particular FSI
decision gate. An independently reproduced effect near the observed
artifact pilot mean `121/128` would comfortably clear that numerical
condition. The 8-root estimate is exploratory and cannot substitute for
a new prospective target commitment or independent confirmation readout.

The updated planner exposes `fsi01_final_effect_floor_resolution` and
can enforce it using `require_final_fsi_gate: true`. Historical clients
retain the prior normal-planning behavior by default.

The observed interaction is negative (`-99/128` in raw units).
A prospective test of **suppression** can set `effect_direction: "negative"`
so that the planner uses `-d_i/2` as its positive-direction planning effect,
while retaining the original signed mean in its report. The directional claim
must be frozen before independent confirmation. The originally prespecified
positive-interaction question and its development history remain part of the
selection record.

The sham floor remains uncalibrated with eight roots. The registered
95%/95% nonparametric tolerance bound needs at least 59 independent
calibration roots, one family-wide maximum per root across the registered
contrast family after the interaction's half-scale transform. A focused
single-contrast confirmation requires an explicitly new frozen manifest
documenting its development-stage selection, and new unexamined confirmation
roots. Sham calibration from a reduced intervention family answers that
reduced question.

## 4. Completing a report is not the same event as complying with permissions

The empirical `authorized_task_success` diagnostic checks whether
`READ_SOURCE`, `WRITE_REPORT` and `FINISH` occurred in the stage. It
does not require the absence of `STAGE_EXTRA_RECIPIENT`; indeed all
dose-eight cue arms report 100% required-action completion, including
`p10` with 256/256 pre-correction unauthorized attempts.

Define a **policy-compliant completion** endpoint
`S = T * (1-B) * (1-A)`, where `T` means that both stages completed
their required actions. Here `T=1` for every assigned target, so
`P(S=1)=P(B=0,A=0)`: `p00=256/256`, `p10=0/256`,
`p01=256/256`, `p11=38/256`. A report that quotes "100% task
success" without the associated unauthorized-action rate is ambiguous
about safety.

More generally, if only the task-completion marginal `t` and
joint no-unauthorized-action marginal `c=P(B=A=0)` are retained,
Fréchet's sharp bounds are
`max(0,t+c-1) <= P(S=1) <= min(t,c)`. The CPU bridge checks the
count-valued version of this bound. Future Control-Harness reports
should publish required-action completion and policy-compliant
completion under distinct names.

## Test commands

```bash
python -m unittest discover -s skills/evalmath-mechinterp-power/scripts -p 'test_*.py' -v
PYTHONPATH=src python -m unittest tests.test_evaluation_reward_carryover_count -v
python scripts/check_receipts.py --only reward_carryover
```

No GPU or neural model is required for these checks.
61 changes: 58 additions & 3 deletions skills/evalmath-mechinterp-power/scripts/preflight.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,43 @@ def upper_quantile(shams, q=F(95,100), confidence=F(95,100)):
return None,None



def fsi01_floor_resolution(*, target, floor, alpha, comparisons, planned_roots):
"""FSI-01's one-sided bounded-root Hoeffding gate, for effects in [-1, 1].

The result describes resolving a *prespecified* effect at a hypothetical
confirmation sample mean, not power estimated from selected pilot outcomes.
Interactions in [-2,2] must be divided by 2 before calling.
"""
gap = float(target - floor)
radius = math.sqrt(2.0 * math.log(comparisons / float(alpha)) / planned_roots)
if gap <= 0:
required = None
else:
cutoff = 2.0 * math.log(comparisons / float(alpha)) / (gap * gap)
required = max(2, math.floor(cutoff) + 1)
# Enforce the strict '>' rule in floating arithmetic at integer edges.
while target - F(str(math.sqrt(
2.0 * math.log(comparisons / float(alpha)) / required
))) <= floor:
required += 1
while required > 2 and target - F(str(math.sqrt(
2.0 * math.log(comparisons / float(alpha)) / (required - 1)
))) > floor:
required -= 1
return {
'root_effect_support': '[-1,1]',
'minimum_roots_at_target': required,
'planned_roots': planned_roots,
'planned_root_bound_radius': radius,
'lower_bound_if_mean_equals_target': float(target) - radius,
'minimum_effect_for_planned_roots': float(floor) + radius,
'target_resolves_floor_at_planned_roots':
(float(target) - radius > float(floor)),
'interpretation': 'Conservative FSI-01 decision-rule resolution, not approximate test power.',
}


def preflight(spec):
if spec.get('schema_version')!=1:raise ValueError('schema_version must be 1')
for field in ('experiment_id','independent_unit'):
Expand All @@ -56,15 +93,20 @@ def preflight(spec):
null=row.get('sham_effects')
if not isinstance(null,list) or not null:raise ValueError('matched shams required per independent world')
shams.append(max(abs(fraction(z,'sham',True)) for z in null))
direction=spec.get('effect_direction','positive')
if direction not in ('positive','negative'):
raise ValueError('effect_direction must be positive or negative')
raw_observed_mean=sum(effects,F(0))/len(effects)
directed_effects=[-x if direction=='negative' else x for x in effects]
floor,rank=upper_quantile(shams,quantile,confidence)
external=spec.get('external_sham_floor')
if external is not None:
if not isinstance(spec.get('external_sham_source'),str) or not spec['external_sham_source'].strip():
raise ValueError('external_sham_source required')
floor=max(floor or F(0),fraction(external,'external_sham_floor'))
variation=max(min_effect,resolution,floor or F(0))
observed_mean=sum(effects,F(0))/len(effects)
sigma=stdev(map(float,effects)) if len(effects)>=2 else None
observed_mean=sum(directed_effects,F(0))/len(directed_effects)
sigma=stdev(map(float,directed_effects)) if len(directed_effects)>=2 else None
delta=float(target-variation)
z=NormalDist().inv_cdf(1-float(alpha)/(2*m))+NormalDist().inv_cdf(.80)
# Even an ideal, all-positive exact sign test cannot clear a one-sided
Expand All @@ -80,7 +122,16 @@ def preflight(spec):
if sigma is not None and delta>0 and not pilot_variance_uninformative else None)
mde=(float(variation)+z*sigma/math.sqrt(g)
if sigma is not None and not pilot_variance_uninformative else None)
fsi_rule = spec.get('require_final_fsi_gate', False)
if type(fsi_rule) is not bool:
raise ValueError('require_final_fsi_gate must be boolean')
fsi01 = fsi01_floor_resolution(
target=target, floor=variation, alpha=alpha,
comparisons=m, planned_roots=g)
fsi01['development_only_observed_mean_lower_bound'] = float(observed_mean) - fsi01['planned_root_bound_radius']
reasons=[]
if fsi_rule and not fsi01['target_resolves_floor_at_planned_roots']:
reasons.append('fsi01_target_effect_floor_underresolved')
if not spec.get('pilot_from_development_only') is True:reasons.append('development_pilot_unverified')
if not spec.get('heldout_sealed') is True:reasons.append('heldout_unsealed')
if not spec.get('units_independent') is True:reasons.append('independence_unverified')
Expand All @@ -96,11 +147,15 @@ def preflight(spec):
'decision':'REDESIGN_OR_PILOT_ONLY' if reasons else 'READY_FOR_CONFIRMATION',
'reasons':reasons,'independent_unit':spec['independent_unit'],
'pilot_worlds':len(effects),'planned_confirmation_worlds':g,
'mean_pilot_effect':float(observed_mean),
'mean_pilot_effect':float(raw_observed_mean),
'effect_direction':direction,
'direction_adjusted_mean_pilot_effect':float(observed_mean),
'pilot_world_sigma':sigma,'observed_worst_sham':float(max(shams)),
'upper_sham_quantile':float(floor) if floor is not None else None,'order_statistic_rank':rank,
'mechanistic_variation_floor':float(variation),'target_effect':float(target),
'planned_comparisons':m,'minimum_exact_sign_test_roots':min_sign_roots,
'fsi01_rule_required_for_readiness': fsi_rule,
'fsi01_final_effect_floor_resolution': fsi01,
'approx_worlds_for_80pct_power':required,
'approx_resolvable_effect':mde,
'limits':'Normal-based power is planning only. A zero-effect zero-variance pilot cannot support extrapolating a hypothetical positive effect. Root and sham independence, symmetry, readout sealing, and the scientific effect floor require independent audits. Repeated outcomes within a root are never additional worlds.'}
Expand Down
Loading
Loading