# Felisyn probe 021: protocol 021 stopped at its own timing check

Protocol 021 was designed to ask whether the cat circuit's own connections change how recent inputs enter the population code its decisions are read from. Before its main runs, its probe phase set the remaining values by rules fixed in advance. Those rules also included two stop checks. Both checks stopped the design at the planned step length, 70 ms. The declared fallback, 105 ms steps, failed the timing check as well. **So the design ended before any main run, as its own rules require, and its question is still open.** This package holds the probe phase in full. Simulation only: no token, wallet, exchange, key or real order is involved.

## What was fixed in advance

- **The design:** the spec in `spec/` (revision 3, SHA-256 `c3af90d8…`). Its first version and three revisions were recorded with their SHA-256 in the project handoff on 23 and 24 October, before the probe ran and before protocol 017's results were known.
- **The question:** steps of 70 ms follow each other without a gap, so recent inputs overlap inside the circuit. Is the share of the previous input in the layer 4 population code (ρ₁) different with and without the connections inside the cortex?
  - The comparison is between intact networks and a matched lesion: every connection inside the cortex at zero weight, with the input weight scaled by k so that layer 4 fires at the intact rate.
- **The probe phase**, on its own 120-step sequence (seed 212):
  - an identity check of an input cache;
  - three probe conditions: intact, the plain lesion (connections off, input unchanged) and the matched lesion;
  - two calibration runs that set k.
  - From these, rules fixed in advance set the decoding windows, k and the number of main steps N.
- **Two stop checks**, quoted from the spec:
  - **Timing:** "if either probe condition fails the decoding gate, or more than 10 % of its decoded steps are clipped or wrapped […], steps of 15 frames (105 ms) are used and the probe is repeated. If that also fails, the design is revised and reported as a failure of this timing." The two probe conditions are intact and the plain lesion.
  - **Precision:** "N is the smallest multiple of 100, at least 300, whose projected half-width of Δρ₁ is at most 0.05. The cap is 900. If the half-width at the cap exceeds 0.07, the design is revised before freezing."

## What happened

| | intact | plain lesion | matched lesion |
| --- | --- | --- | --- |
| **70 ms steps** (24 Oct) | | | |
| decoded steps clipped or wrapped | 2.5 % | **29.2 %** | 16.7 % |
| layer 4 excitatory rate | 6.78 Hz | 47.7 Hz | 5.45 Hz |
| decoding window | 40 to 110 ms | 30 to 100 ms | 30 to 100 ms |
| **105 ms steps** (24 to 25 Oct) | | | |
| decoded steps clipped or wrapped | 4.2 % | **11.7 %** | 26.1 % |
| layer 4 excitatory rate | 7.32 Hz | 48.0 Hz | 5.35 Hz |
| decoding window | 40 to 145 ms | 100 to 205 ms | 150 to 255 ms |

**At 70 ms both stop checks fired.**
- **Timing:** the plain lesion clipped or wrapped 29.2 % of its decoded steps.
- **Precision:** the projected 95 % half-width of Δρ₁ at 900 steps was 0.108, above the 0.07 limit. The main reason: at a matched rate, the matched lesion's population code is about four times weaker than intact (its regression gain |β| was 215 against 890), so its estimates are noisy.
- k came out at 0.51. The confirmation found the matched lesion at 0.804 of the intact rate over steps 5 to 119 of the probe, inside the declared ±20 % by 0.004.

**The declared fallback, 105 ms steps, failed the timing check again.** The plain lesion clipped or wrapped 11.7 % of its steps. By the rule quoted above, the design ended there.
- The calibration and the matched-lesion probe at 105 ms still ran, as pilot data for a revised design:
  - **k:** the first step gave 0.53, and the matched-lesion probe ran at that k.
  - **Rate:** the matched lesion fired at 0.73 of the intact rate over steps 5 to 119, outside the declared ±20 %. The rule's second step therefore gave the final k = 0.54, with the mismatch reported. That k was not run.
  - **Precision:** the projected half-width at 900 steps was 0.067, formally within the limit.
  - **Why that precision means little:** the latency rule put the matched lesion's window at 150 to 255 ms, mostly inside the next step (lead share 0.85, against a lead gate of 0.05). 26.1 % of its steps were clipped or wrapped.
- No rule was changed, and no main run was made.

## A bug caught before it mattered

The code that estimates each condition's response kernel placed every step's onset in 10 ms bins by rounding the step length to whole bins. That is exact for 70 ms steps. At 105 ms, every onset would have drifted 5 ms per step, and the latency, and so the decoding window, would have been wrong.
- A test was written first and reproduced the error: a synthetic kernel with a 40 ms latency came out at 90 ms.
- The fix places each onset in the 10 ms bin that contains it.
- Rerun with the fixed code, the 70 ms analysis reproduces `results/70ms/probe-analysis.json` byte for byte. The 105 ms analyses used the fixed code (`code/analyze_probe.py`).
- The fix was made in place, so it overwrote the version that produced the 70 ms result. That version is recovered exactly in `code/analyze_probe-before-onset-fix.py`: reversing the fix gives a file whose SHA-256, `280f119e…`, equals the hash recorded before the fix, and which reproduces the 70 ms result byte for byte. The only difference is that the fixed version adds `onset_bins` in place of `int(round(period / BIN_MS))` multiples.

## The kernels

`figures/probe-kernels.png` shows each condition's response kernel, how the population code answers one step over time, with the window the latency rule gave it.
- **Intact** answers within about 40 ms and holds the answer through the step.
- **Without its intracortical connections,** layer 4 fires about seven times as often.
- **At 105 ms all three kernels peak at about 155 ms,** about 50 ms after the next step begins. The declared latency rule (the first time the response reaches half its peak in the peak's own direction) gave 40 ms for intact, 100 ms for the plain lesion and 150 ms for the matched lesion. So the lesions' windows, 100 to 205 ms and 150 to 255 ms, lie largely in the next step.
- **What the kernels mean is open.** The kernel mixes the input's contrast with its orientation, because the encoder sets the contrast from the signal's size. So the timing differences between the conditions are not interpreted here. A review found this while the next protocol was being designed, and that design separates the two.

## What this cannot show

- **Nothing about the question.** The probe phase sets values and runs checks. Its own estimates of ρ, in `results/`, are pilot values from 120 steps, and they are not a test.
- **One 2 mm reduction**, one network instance in the probes (instance A), one encoder, one decoder and two step lengths. Other timings or decoders were not tried.
- **The timing rule includes the plain lesion**, which the main runs would not have used. The spec included it, and it is reported as declared.

## Next

A revised design will be declared, with its own rules, before any of its runs. It will say what changed and why. Its choices may use what the probe measured about timing and noise, but never the probe's estimates of ρ.

## Files

- `README.md`: this file.
- `spec/2026-10-24-controller-021-temporal.md`: the design as declared.
- `code/`:
  - **on the server**, hash-checked there at launch: `run_controller.py`, `controller_experiments.py`, `lgn_cache.py`, `identity_check.py`, `calibrate_k.py`, `run_queue_021.sh`, `run_queue_021_fallback.sh` and `temporal.py`;
  - **run locally:**
    - the analysis `analyze_probe.py` (after the onset fix) and `analyze_probe-before-onset-fix.py` (the recovered version that produced the 70 ms result);
    - `frozen017.py` (the path to protocol 017's frozen pipeline);
    - `make_sequences.py`, and the tests `test_analyze_probe.py` and `test_temporal.py` (as they stand after the fix).
- `sequences/`: the identity (seed 213), probe (seed 212) and calibration sequences.
- `results/70ms/` and `results/105ms/`: the probe analyses, the identity check (70 ms), the calibration steps and the queue logs.
- `receipts/70ms/` and `receipts/105ms/`:
  - per run, a gzipped log and its start, end and exit receipts;
  - `data-sha256.txt`, the SHA-256 and size of every export. The exports are too large for this site and are kept on the research server and in the private workspace.
- `figures/`: `probe-timing` and `probe-kernels` (PNG and SVG), and `draw_probe.py`, which draws them from the analyses in `results/`.
- `manifest.json` and `probe-evidence.zip`: the SHA-256 of every file, and all files in one archive.

## Attribution

Model: Antolík J, Cagnol R, Rózsa T, Monier C, Frégnac Y, Davison AP (2024), *A comprehensive data-driven model of cat primary visual cortex*, PLOS Computational Biology, CC BY 4.0. LSV1M v1.0 is under its MIT license, and the Mozaik simulation framework under CeCILL.
