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
22 changes: 17 additions & 5 deletions .claude/probes/source-behavior-v1/SOFTMAX65.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The gate no longer trusts that the supplied table belongs to the claimed calibra
- On any difference it refuses with `table_identity_mismatch`.
- The Python driver keeps its own independent table check as a second line.

Controls in `softcert65_run.json`:
Controls in the run record (see "Run record" below):

| control | result |
|---|---|
Expand All @@ -37,7 +37,7 @@ Controls in `softcert65_run.json`:
| calibration 1's table under calibration 2's identity (`table_identity_controls`) | accepted, same decision, **equal numeric key, different receipt** |
| calibration 3's table under calibration 2's identity | `REFUSE_UNKNOWN table_identity_mismatch` |

## Results (`softcert65_run.json`)
## Results (run record)

Every decision is validated without the gate's code. The table is recomputed, the candidate set is
compared with the exhaustive superset reference, every witness row is rebuilt and run through the real
Expand Down Expand Up @@ -105,13 +105,25 @@ Then run from this directory:
```sh
./softcert65 global 5f64e4ad $(cat $TFLM_DIR/tensorflow/lite/micro/kernels/internal/{common.h,fixedpoint.h,reference/softmax.h} | sha256sum | cut -c1-64)
uv run heldout65.py ./recipall63 ./trace63 recipall65_heldout.json 3
TFLM_DIR=... uv run softcert65.py ./softcert65 ./trace63 ./softmax_oracle softcert65_run.json --mutations # ~50 s
uv run fixtures65.py softcert65_run.json ./trace63 ./softmax_oracle fixtures65 # byte-identical today
TFLM_DIR=... uv run softcert65.py ./softcert65 ./trace63 ./softmax_oracle /tmp/run.json --mutations # ~50 s
uv run fixtures65.py /tmp/run.json ./trace63 ./softmax_oracle fixtures65 # byte-identical today
./perf65 > perf65.txt
```

The fixtures are replayed without TFLM by `../pal256-admission-v1/replay`.

## Run record (not committed)

The gate's full validation record (every candidate, witness, mutation and timing; about 290 KB) is an
output, not an input: neither the replay nor any script reads it. It is therefore not kept on `main`.
Regenerate it with the `softcert65.py` command above. The copy produced while landing is
`git show 26666aa0f:.claude/probes/source-behavior-v1/softcert65_run.json` (#1800). A re-run gives
identical decisions, witnesses, unreachable pairs and mutation verdicts; only timings differ.

JSON data files (`recipall63.json`, `recipall65_heldout.json`, `fixtures65/softmax_tables65.json`) are
written compactly, one line each; their generators write the same form, so regeneration stays
byte-identical.

## What this does not establish

- It covers one source revision, one compiler and x86-64. Another revision needs a new certificate,
Expand All @@ -135,4 +147,4 @@ Changes made while landing:
- table-identity verification in the gate, with `N`/`U` outputs and the `skip_table_identity` switch;
- `TFLM_DIR` instead of a hard-coded path;
- the identity controls;
- `softcert65_run.json` regenerated with them. Decisions, witnesses and unreachable pairs are identical to the research run.
- the run record regenerated with them. Decisions, witnesses and unreachable pairs are identical to the research run.
2 changes: 1 addition & 1 deletion .claude/probes/source-behavior-v1/fixtures65.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def pick(x, why): red.setdefault(x["id"], dict(x)).setdefault("why", []).append(
s, z, b = r["cal"]; key = f"{f32bits(s)}:{f32bits(b)}"
unr.append(dict(cal_index=r["index"], table=key, table_sha256=tdig[key], S=u["S"], d=u["d"], status=u["status"]))

files = {"softmax_tables65.json": json.dumps(dict(tables=tables, sha256=tdig), indent=1) + "\n",
files = {"softmax_tables65.json": json.dumps(dict(tables=tables, sha256=tdig), separators=(",", ":")) + "\n",
"witness65_full.jsonl": "".join(canon(x) + "\n" for x in full),
"witness65_reduced.jsonl": "".join(canon(x) + "\n" for x in reduced),
"equivalence65.jsonl": "".join(canon(x) + "\n" for x in eqv),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"tables": 14
},
"sha256": {
"softmax_tables65.json": "f401c65e7d7e1cc3fb6111e840a716253ea933c600a18795c2cea33f61290b4e",
"softmax_tables65.json": "4af5b9c780af92bd7f0708aa81b8f58d5de0ae4d27d5762c055c2168fd2fa99a",
"witness65_full.jsonl": "c05e68f2c03edf521ca8839bad36787bc8f9195640b6e3225f9cbc347db4e7b4",
"witness65_reduced.jsonl": "9b1b06a3a41086e2bee82f8800f48ad82a47fdb615c8a80be56243fd433f3890",
"equivalence65.jsonl": "2cf24afb34151bce45f2810e4cc768ae4d7eeb330143d669d9e92febfef7ab87",
Expand Down
Loading