# Felisyn protocol 018: shared spontaneous fluctuations of the full model against cat area 17 multiunit recordings

Declared 23 October 2026 (Europe/Vienna), before any of the measures below was computed on either side.

What had been seen beforehand:

- **The model:** run 011's firing rates, ISI CV and spike-count correlations ([note 15](https://www.felisyn.com/journal/the-full-model-run)), and its membrane-potential synchrony and time scales ([note 17](https://www.felisyn.com/journal/first-test-against-cat-recordings)).
- **The data:** only format and structure checks. These cover spike counts, site rates, state durations and when each site is active (`work/open-data-016`, `test_readers.py`).

The comparison is descriptive. It has fixed readings and no pass or fail.

## Question

Note 17 found that the model's spontaneous membrane potential fluctuates on a faster time scale than in anaesthetized cats, and that nearby neurons are less synchronized. Here we ask the same kind of question with spikes. How strongly do separate groups of neurons in the full model fluctuate together in their spontaneous firing, within a second? We compare this with spontaneous multiunit activity in cat area 17, in its desynchronized and its synchronized states.

## Why these data

Hahn et al. (2017) is the only open cat V1 dataset with long spontaneous spike recordings that we found without accounts, forms or requests (`work/open-data-016/datasets.md`).

- **License and size:** it is published under CC BY 4.0 as the paper's S5 Dataset (2.6 MB).
- **Independence:** the model paper does not cite it. It shares two authors with it (Monier and Frégnac), so it is an independent publication but not an independent laboratory.

## Data targets

Hahn G, Ponce-Alvarez A, Monier C, Benvenuti G, Kumar A, Chavane F, Deco G, Frégnac Y (2017). Spontaneous cortical activity is transiently poised close to criticality. *PLoS Comput Biol* 13: e1005543. doi:10.1371/journal.pcbi.1005543. The S5 Dataset ZIP is SHA-256 `a412865ca9f70be9a2b3dacf0280b94d85b2d186f98a792b97fdde27a7088c6a`, included here unchanged as `data/pcbi.1005543.s005.zip`.

- **Preparation.** Four cats, "anesthetized (isoflurane) and paralyzed", isoflurane "~0.8%". "All recordings were performed in the dark".
- **Recording.** "32 channel silicon-based micro-electrode arrays (four shanks with eight electrode contacts each, distance between electrode contacts: 400 μm, ..., shank length: 3mm ...)" in area 17, one array per cat.
  - Contacts on one shank are therefore 400 µm apart and span up to 2.8 mm of depth. The spacing between shanks is not stated.
  - Which contact is at which depth is not given in the data.
- **Spikes.**
  - Detection: "Spikes were detected by manually setting a one-sided threshold that would result in a signal to noise ratio larger than ~2."
  - Sorting, paraphrased: action potential waveforms were then separated from remaining noise by clustering and manual cutting, but "no attention was paid to extract single units".
  - The files give each spike's time (0.1 ms), electrode index and state label.
- **States.**
  - LFP spectra of non-overlapping 1 s segments were clustered (PCA, then k-means) into five cat states: 1 desynchronized I, 2 desynchronized II, 3 synchronized fast, 4 synchronized slow I and 5 synchronized slow II.
  - The labels are constant within aligned 1 s windows, apart from 1-2 boundary windows per cat.
  - Seconds without any spike carry no label.
  - The paper notes that synchronization under isoflurane "can vary at very slow time scales".
- **Sites and lengths.**
  - Recording lengths: 3,900, 6,000, 6,000 and 6,000 s.
  - Sites: 27, 26, 22 and 12.
  - Not every site is active throughout. In cat 2 one set of sites is active only before and another only after about 3,000 s. In cat 1 one site is active only until 1,790 s.

## Model data

**Run 011** (full model, 40.32 s of spontaneous activity on a grey screen):

- Spike export: `../run-011/analysis/exported-spikes.json.gz`, SHA-256 in `contract.json`. It covers 12,128 L4E, 3,467 L4I, 12,176 L2/3E and 3,487 L2/3I neurons.
- Positions: from `export_spike_positions.py` (read-only, geometry only, 23 Oct; log and output in `receipts/`). The neurons cover the central 3 × 3 mm of the sheet.
- The 40 aligned 1 s windows from 0 to 40 s are used; the last 0.32 s is not.

## Measures (`fluctuations.py`)

**Why these measures.** Absolute multiunit rates and site correlations depend on the detection threshold and on how many neurons each contact picks up, and neither is known here.

For two spike counts, the covariance normalised by the product of their means, Cov/(mean₁·mean₂), is unchanged when spikes of either count are deleted independently at random, even with different probabilities. It measures how strongly the underlying firing rates of two groups fluctuate together, not how many spikes were detected.

**Primary measure: within-segment shared fluctuation at 100 ms** (`within_segment_pairwise`).

1. Each unit's spikes are counted in the ten 100 ms bins of every 1 s segment. Data units are recording sites; model units are pools (below).
2. Deviations from each unit's own segment mean are multiplied across pairs of different units and summed.
3. The sum is normalised by the matching products of segment means:
   [Σ_j Σ_b Σ_(i≠k) dev_ijb·dev_kjb] / [Σ_j (B − 1)·Σ_(i≠k) n̄_ij·n̄_kj], with B = 10.

The result is approximately the pooled normalised covariance of the latent rates. Strictly, it is the covariance around each segment's mean relative to the segment mean squared. For a shared factor with latent CV² it estimates about CV²/(1 + CV²/B). The estimand is the same on both sides.

**Why it is built this way:**

- **Only pairs of different units enter.** A single unit's own variability (bursting, private rate wander, Poisson noise) does not count, and the value does not depend on the number of units. A pooled count's variance would also contain each unit's own variance with a weight of about 1/N. That weight is large for a dozen multiunit sites and negligible for thousands of model neurons, so it would bias the comparison. The pooled measure is kept as a secondary measure only.
- **Fluctuations are measured around each segment's own mean.** So two things do not count as shared fluctuation: slow drift, and sites switching on or off between segments.
- **What is assumed.** It holds as far as detection acts like random deletion. A threshold also favours large spikes from nearby neurons. Two kinds of false events act in opposite directions:
  - Independent noise crossings scale the measure down by (1 − f)², where f is the false fraction.
  - Common-mode events cross the threshold on several contacts at once, for example common-reference noise or electrical artifacts. They add shared fluctuation and push the data up.
- **Artifact check, data only.** Two diagnostics are reported per cat, in integer ticks of the data's 0.1 ms resolution:
  - the density per tick of cross-site spike pairs at lags of at most 2 ticks (0.2 ms) relative to their density at 10 to 50 ticks (1 to 5 ms). Rate fluctuations on a 100 ms scale are flat at a few milliseconds, so values well above 1 point to near-simultaneous events;
  - the fraction of spikes in events where three or more sites fire within 2 ticks of one spike (all copies of an event marked), overall and per state group. Real spikes at contacts 400 µm or more apart almost never do, and chance triple coincidences are rare at the data's rates.

  The primary measure is also computed on data with those events removed. This gives a robustness reading.

  The check cannot be applied to the model pools, which fire at about 150 Hz each: chance would flag about a quarter of their spikes. Removal also takes out real chance coincidences and any genuinely precise synchrony, so it can only lower the data's value, even without artifacts. The robustness reading can therefore only move toward "within" or "above" for the model.

**Units.**

- **Data:** every site, with no exclusion. A site that is silent in a segment contributes nothing to that segment.
- **Model, primary:** 18 pools, one per layer (L4 and L2/3) at each point of a 3 × 3 grid 400 µm apart, centred on the sheet. Each pool holds all four populations within 100 µm of its point: 45 to 72 neurons, 967 in all.
  - A pair of pools is either at the same point in different layers, like contacts on one shank, or at least 400 µm apart horizontally.
  - The data's contacts are at least 400 µm apart along a shank. The spacing between shanks is unknown.
- **Model variants**, reported with their own readings:
  - pools of excitatory neurons only;
  - pools of inhibitory neurons only;
  - pools 800 µm apart;
  - single neurons within 500 µm of the centre, all pairs (2,699 neurons, mostly closer together than contacts on one shank);
  - the primary pools with the first 2 s dropped, in case the start of the recording carries an onset transient.

**Uncertainty.**

- **Bootstrap:** every estimate gets a 95 % interval from 2000 resamples of its segments with replacement.
- **Counting-noise null:** each unit's spikes are redistributed uniformly within each segment, 200 times. This removes all within-segment fluctuation and shows how far from 0 counting noise alone moves the estimate.
- **Seed:** 18.

**State groups:**

- desynchronized (1-2), the primary reference, because the model runs in an asynchronous state;
- each state separately;
- synchronized (3-5).

**Secondary measures, reported only:**

- the primary measure at 10, 50 and 250 ms (time-scale curve);
- the pooled within-segment excess variance at 100 ms, (Var − mean)/mean² of the summed count, which includes each unit's own variance;
- the whole-session pooled excess variance at 100 ms and 1 s over all bins of a group. It uses only "stable" sites, whose first and last spikes span at least 90 % of the recording, and it is sensitive to slow drift;
- the primary measure on 2000 random sets of 40 segments of a group, drawn from anywhere ("global") or as the 40 segments nearest a random time ("local"), with the model's percentile in the pooled global draws. At the data's rates of about 1 Hz per site, the spread of these draws is dominated by counting noise, which is why the primary reading does not use them.

## Declared readings

For each state group, the reference is the range spanned by the four cats' 95 % intervals. The model's 95 % interval is compared with it:

| Model interval | Reading |
| --- | --- |
| entirely below the reference range | "less shared fluctuation than [group] cat cortex" |
| overlapping it | "within the range of [group] cat cortex" |
| entirely above it | "more shared fluctuation than [group] cat cortex" |

- **The primary reading** is the one for the desynchronized group with the primary pools. If an interval is not finite, the reading is "undefined".
- **Model variants:** each gets the same reading, and the result records whether every defined variant agrees with the primary. If they disagree, the reading is reported as depending on the choice of model units.
- **Artifact check:** the primary pools are also read against the data with multi-site events removed. If that changes the reading, it is reported as depending on possible common-mode artifacts.
- **Everything else** (the other groups, per-cat values, nulls and secondary measures) is reported with the primary reading and does not change it.

**Interpretation, fixed in advance:**

- **Below the desynchronized range:** this would agree with note 17. It is not by itself a model failure. Anaesthesia, darkness and the multiunit sampling all differ from the model's condition, and these data cannot separate them.
- **Within it:** the model's shared fluctuations would be at the level of the cat's least synchronized states.
- **Above it:** the model would fluctuate together more strongly than desynchronized cat cortex.

## What this cannot show

- **One model run in one state:** 40 s of a grey screen, against hours of anaesthetized cat cortex in darkness. The cats' states come from their LFP, which the model's state is not defined by.
- **Not validation:** agreement would show consistency on this measure only.
- **Detection:** it is only approximately random deletion, as explained above. Noise crossings would push the data down, and common-mode events up.
- **The reference is selected.** The desynchronized seconds were chosen by the authors' LFP clustering for low synchronization, which goes with low shared spiking fluctuation. That reference therefore sits low by construction, and the model's 40 s were not selected that way.
- **Geometry:** the depth of each contact and the spacing of shanks are unknown, so the model units are declared choices, with variants.
- **Unlabelled seconds:** seconds without any spike cannot be labelled and are excluded. This can only lower the whole-session secondary measure. The within-segment measures are unaffected, because a silent segment adds nothing to them.

## Order of work

1. The open-data search and format checks (23 Oct).
2. The position export (geometry only).
3. This declaration, `contract.json`, pre-freeze reviews and the freeze, with SHA-256 recorded in the project handoff.
4. Only then `compare.py` on both sides. The results go into a separate package that records this protocol's hash.

## Changes from the spec, made before freezing

- **After the first pre-freeze review:**
  - **Primary measure:** the pairwise within-segment measure replaces the pooled excess variance, which counted each unit's own variance with a weight depending on the number of units and so would have biased the model downward.
  - **Reference:** each cat's full-state estimate with its bootstrap interval replaces the 40-segment draws, whose spread is mostly counting noise at the data's rates.
  - **Model units:** layer pools at least 400 µm apart replace the 1 mm disk, so pairs are at least as far apart as the data's contacts along a shank.
  - **Smaller additions:**
    - the counting-noise null;
    - the variant without the first 2 s;
    - local draws;
    - readings computed for every variant;
    - corrected statements on the probe geometry and the sorting quote.
- **After the second pre-freeze review:**
  - the artifact check (pair density at ±0.2 ms against 1 to 5 ms, and multi-site events) with a reading on cleaned data;
  - an "undefined" reading instead of a silent "within" when an interval is not finite;
  - the estimand described as approximate;
  - the selection caveat for the desynchronized reference;
  - two geometry phrasings tightened.
- **After the third pre-freeze check:**
  - the artifact check works in integer 0.1 ms ticks;
  - it marks all copies of an event and reports the flagged fraction per state group;
  - the README states that it applies to the data only and can only lower the data;
  - a cat with a non-finite interval makes the reading "undefined".

## Files

- `README.md` and `contract.json`.
- `fluctuations.py`: the measures. `test_fluctuations.py` covers them with synthetic tests:
  - known shared variance with and without private variability;
  - thinning invariance;
  - drift and site changes;
  - the bootstrap, the null and the draws;
  - the artifact check with and without injected common-mode events.
- `hahn_data.py` and `model_data.py`: the readers, with `test_readers.py` (structure checks that reproduce the format checks exactly).
- `compare.py`: the analysis, with `test_compare.py` (an end-to-end run on synthetic inputs with known values).
- `data/pcbi.1005543.s005.zip`: Hahn et al.'s S5 Dataset, CC BY 4.0, unchanged.
- `data/format-checks.json`: the format checks used by `test_readers.py`.
- `export_spike_positions.py` and `receipts/`: the position export, its log, a failed first attempt's log, and the output (`spike-positions.json`).
- `make_contract.py`, `manifest.json` and `protocol-evidence.zip`.

## Attribution

**Data.** Hahn et al. (2017), *PLoS Computational Biology*, S5 Dataset, CC BY 4.0. Short quotations are for scholarly comparison.

**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](https://doi.org/10.1371/journal.pcbi.1012342), published under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). LSV1M v1.0 is under its MIT license.

**Model data.** Our run 011.
