CAMINOS Cell Reports replication - figure suite

One figure per panel of the CAMINOS Cell Reports 2025 replication (figures 1-6, S1, S3). Swept-input and colour-map panels read the run receipts under WAREHOUSE (default F:/warehouse/caminos, override with the CAMINOS_WAREHOUSE environment variable); raster panels read the trace .npz files of run_cellrep_rasters.py and skip with a note until those files exist. Verdicts are copied from RESULT_FIGURES.md in the paper folder beside this notebook. Every figure states its data file and the seed statistic in a small grey footnote. The colour maps draw one equal-height row per fraction on a 0-100 Hz axis, colour = log10 |X| (seed mean) on one colour scale shared by all four maps (the last cell of the map block applies it; cells beyond the stored band stay blank).

import os
import sys
from pathlib import Path
for cand in (Path.cwd(), Path.cwd() / 'artifacts' / 'etudes' / 'papers' / 'caminos' / 'suite'):
    if (cand / 'cellrep_suite.py').exists():
        sys.path.insert(0, str(cand))
        break
import cellrep_suite as cs
WAREHOUSE = Path(os.environ.get('CAMINOS_WAREHOUSE', 'F:/warehouse/caminos'))

Built with jaxfne

The Cell Reports network written in the jaxfne grammar: Configuration → construct → Model.simulate, with the per-type AdEx values of the Cell Reports set (caminos_api.py). This is the core route, run_cell(route="core"). The figures below come from the oracle runs (caminos_jax.py, the authors' model transcribed to JAX). The core route is not yet equivalent to them: E1 at n 12 found 20 of 24 cells equivalent within ±5% (RESULT_FIGURES.md). These cells show jaxfne usage; they are not the source of the figures. They run 1 s of network time live.

sys.path.insert(0, str(Path(cs.__file__).resolve().parents[1]))   # caminos/
import caminos_api as ca      # the Cell Reports constants; puts the checkout's jaxfne first
import jaxfne as jtfne

p, seed = ca.CELLREP_P, 1     # p 0.017 (E -> PV at twice p), seed
n_e, n_pv, n_som = ca.CELLREP_NE, ca.CELLREP_NPV, ca.CELLREP_NSOM
n = n_e + n_pv + n_som

Populations (8000 E, 800 PV, 600 SOM), the AdEx emitter, one AMPA receptor per target type, GABA, and the per-type AdEx values.

cfg = (jtfne.Configuration()
       .network(name="cellrep", n=n, cell_types={"E": n_e / n, "PV": n_pv / n, "SOM": n_som / n})
       .emitter(family="adex", adex_decay="euler", adex_step_order="default"))
for name, tau_ms in (("ampa_e", ca.CELLREP_TAU_E_E_MS), ("ampa_pv", ca.CELLREP_TAU_E_PV_MS),
                     ("ampa_som", ca.CELLREP_TAU_E_SOM_MS)):
    cfg = cfg.mechanisms(name=name, kind="receptor", params={"tau_ms": tau_ms, "reversal_mV": ca.CELLREP_REV_E_MV})
cfg = cfg.mechanisms(name="gaba", kind="receptor", params={"tau_ms": ca.CELLREP_TAU_I_MS, "reversal_mV": ca.CELLREP_REV_I_MV})
cfg = (cfg.cell_params({"cell_type": "E"}, {"EL_mV": -60.0, "b_pA": 130.0})
          .cell_params({"cell_type": "PV"}, {"EL_mV": -60.0})
          .cell_params({"cell_type": "SOM"}, {"Delta_mV": 1.5, "b_pA": 25.0}))

Seven Bernoulli connection rules (no PV→SOM, no SOM→SOM; E→PV at twice p) with a one-step delay, then the check that this network equals the core route's.

for name, pre, post, weight_nS, receptor, mult in ca.CELLREP_RULES:
    cfg = cfg.connections(name=name, source={"cell_type": pre}, target={"cell_type": post},
                          probability=p * mult, weight=weight_nS, mechanism=receptor,
                          delay_ms=ca.DT_MS, sampling="bernoulli")
cfg = cfg.connectivity(edge_seed=seed)
assert cfg == ca.build_cellrep_spec(p=p, seed=seed), "the network must equal the core route's"

Construct the model and simulate 1 s with the Poisson drive (136 sources at 4 Hz onto E and PV).

model = jtfne.construct(cfg)
drive = ca.cellrep_drive_entries(p, n_e, seed)
signals = model.simulate(jtfne.Simulation(duration_ms=1000.0, dt_ms=ca.DT_MS, poisson_drive=drive))
_ = cs.core_run_figure(signals.spikes, (n_e, n_pv, n_som),
                       "jaxfne core run: seed 1 (last 0.5 s of 1 s)", source="live run in this notebook")
No description has been provided for this image

Not run in the replication (stated in RESULT_FIGURES.md:200-201, no panel, no code): 1A and 6B top (schematics), 1D (mouse data), 6A top (literature densities), 2A bottom and 2B bottom (transient values unstated); S3 beyond the 5.9-6.2 s window (RESULT_FIGURES.md:206-209).

Fig 1B - baseline example raster

Paper claim: the intact network shows a low-gamma rhythm at about 35 Hz. Replication: 1B rests on the cellrep baseline, f_pk 33.7 Hz, delay 6.8 ms against the text's 6-7 ms (mmc2 804) - credit pass (RESULT_FIGURES.md:201).

trace = cs.load_trace_or_none(WAREHOUSE / 'cellrep_rasters' / 'seed1' / 'baseline.npz')
if trace is None:
    print('pending: run_cellrep_rasters.py')
else:
    cs.fig1b_raster(trace, source='cellrep_rasters/seed1/baseline.npz')
No description has been provided for this image

Fig 1C - spike-LFP phase locking

Paper claim: PPC orders PV > SOM > E, with SOM firing about 7 ms after PV (mmc2 250-262). Replication: PPC PV 0.035, 0.080, 0.055 is highest in every seed; SOM above E in seed 2 only; SOM-minus-PV phase 5.0, 6.9, 5.3 ms. Verdict: partial - PV > SOM > E in 1 of 3 seeds (RESULT_FIGURES.md:54).

rows = cs.load_rows(WAREHOUSE / 'figC_out' / 'c1' / 'fig1c.json')
_ = cs.fig1c(rows, source='figC_out/c1/fig1c.json')
No description has been provided for this image

Fig 1C - raster part

The raster part of the same control run. Verdict as for Fig 1B: baseline f_pk 33.7 Hz, delay 6.8 ms (RESULT_FIGURES.md:201).

trace = cs.load_trace_or_none(WAREHOUSE / 'cellrep_rasters' / 'seed1' / 'baseline.npz')
if trace is None:
    print('pending: run_cellrep_rasters.py')
else:
    cs.fig1c_raster(trace, source='cellrep_rasters/seed1/baseline.npz')
No description has been provided for this image

Fig 2A top - feedforward drive

Paper claim: f_pk rises monotonically, about 7 to 80 Hz, over feedforward 0-10 Hz (mmc2 286-288), and the PV-to-SOM delay falls from about 10 to 4 ms (293-295). Replication: silent at 0-1 Hz; 13.6 to 63.4 Hz over 2-10 Hz; delay 9.8 to 3.9 ms, monotonic. Verdict: pass for the trend, range 14-63 Hz, not 7-80; delay pass (RESULT_FIGURES.md:48-49). Frequency (Hz) and delay (ms) sit on separate y axes; drives without oscillation (band power NaN or E rate 0) are masked out of the f_pk curve and drawn as open markers at the axis floor (stated in the footnote).

rows = cs.load_rows(WAREHOUSE / 'figB_out' / 'fig2a.json')
_ = cs.fig2a_top(rows, source='figB_out/fig2a.json')
No description has been provided for this image

Fig 2B top - top-down drive to SOM

Paper claim: amplitude rises, frequency falls, E rate falls, and the SOM lag persists (mmc2 314-321). Replication: f_pk 33.7 to 23.9 Hz; peak |X| 1.0 to 3.7x; E 2.58 to 1.86 Hz; delay 6.8 to 3.7 ms, positive throughout. Verdict: pass (band power falls once f_pk leaves 25-45 Hz) (RESULT_FIGURES.md:50).

rows = cs.load_rows(WAREHOUSE / 'figB_out' / 'fig2b.json')
_ = cs.fig2b_top(rows, source='figB_out/fig2b.json')
No description has been provided for this image

Fig 3A - SOM silencing colour map

Paper claim: silencing SOM reduces gamma amplitude gradually, with no substantial frequency change (mmc2 439-445). Replication: band power 81%, 67%, 51%, 38% of baseline at 0.25, 0.5, 0.75, 1.0; f_pk +1% to +11% up to 75%. Verdicts: pass (gradual), fail (abolished at most suppression: 38% at 100%), partial (frequency at 100%) (RESULT_FIGURES.md:27-29).

rows = cs.load_rows(WAREHOUSE / 'figC_out' / 'c3a' / 'silence_som.json')
_ = cs.fig3a(rows, source='figC_out/c3a/silence_som.json')
No description has been provided for this image

Fig 3B - PV silencing colour map

Paper claim: minor change at 20-50% silencing, a transition to periodic 10-15 Hz synchrony near 60%, and seizure-like activity beyond 80% (mmc2 361-386). Replication: f_pk 31.6 Hz at 40%; 30.9 Hz at 55%, 23.5 Hz at 60%, 15.5 Hz at 65%, 14.5 Hz at 70%; max E 309-328 Hz at 100% with the ~150 Hz component. Verdicts: pass, pass (transition between 55% and 65%), pass at 100% (RESULT_FIGURES.md:30-32, 70-72).

rows = cs.load_rows(WAREHOUSE / 'figC_out' / 'c3b' / 'silence_pv.json')
_ = cs.fig3b(rows, source='figC_out/c3b/silence_pv.json')
No description has been provided for this image

Fig 3C - maximum E rate, top SOM silencing, bottom PV silencing

Paper claim: silencing SOM leaves the E rate near baseline; silencing PV drives the E rate up through the same fractions. Replication: max E 4.2-4.6 Hz under SOM silencing (baseline 4.7) against 328 Hz at 100% PV silencing. Verdict: pass on both panels at the scored fractions (RESULT_FIGURES.md:27-32).

som = cs.load_rows(WAREHOUSE / 'figC_out' / 'c3a' / 'silence_som.json')
pv = cs.load_rows(WAREHOUSE / 'figC_out' / 'c3b' / 'silence_pv.json')
_ = cs.fig3c(som, pv, source='figC_out/c3a|c3b')
No description has been provided for this image

Fig 4A - SOM replacement colour map

Paper claim: replacing SOM spikes with Poisson trains lowers the amplitude gradually, with no frequency or stability change (mmc2 437-445, 500-504). Replication: band power -15%, -30%, -41%, -58%; max E 4.2-4.6 Hz. Verdict: pass to 75%; at 100% f_pk 23.8 Hz (RESULT_FIGURES.md:33, 73).

rows = cs.load_rows(WAREHOUSE / 'figC_out' / 'c4a' / 'replace_som.json')
_ = cs.fig4a(rows, source='figC_out/c4a/replace_som.json')
No description has been provided for this image

Fig 4B - PV replacement colour map

Paper claim: replacing PV spikes lowers the frequency about 35 to 10 Hz gradually, the amplitude increases, and the state is seizure-like beyond 80% (mmc2 420-435). Replication: f_pk 28.1, 20.8, 12.2, 5.3 Hz; band power falls on the paper metric while peak |X| passes at 75% only; max E 327 Hz at 100%. Verdict: pass for the frequency trend, amplitude open (RESULT_FIGURES.md:34-36, 74, 208-210).

rows = cs.load_rows(WAREHOUSE / 'figC_out' / 'c4b' / 'replace_pv.json')
_ = cs.fig4b(rows, source='figC_out/c4b/replace_pv.json')
No description has been provided for this image

Shared colour limits for the four maps

The maps of Figures 3A, 3B, 4A and 4B share one log10 |X| colour scale so their amplitudes can be compared directly; the colour bar of each map states the metric (log10 |X|, seed mean).

cs.share_map_colours()

Fig 5A - PV-to-SOM coupling

Paper claim: added PV-to-SOM coupling abolishes gamma (mmc2 474-478). Replication: band power 0.65, 0.50, 0.45, 0.43, 0.40 of baseline at 2-10 nS. Verdict: partial - reduced 60%, not abolished (RESULT_FIGURES.md:51).

rows = cs.load_rows(WAREHOUSE / 'figB_out' / 'fig5a.json')
_ = cs.fig5a(rows, source='figB_out/fig5a.json')
No description has been provided for this image

Fig 5B - SOM-to-SOM coupling

Paper claim: added SOM-to-SOM coupling gives a relatively minor reduction (mmc2 479-481). Replication: band power 0.72 of baseline at 10 nS; f_pk within 10%. Verdict: partial - smaller than 5A, but past the 20% tolerance (RESULT_FIGURES.md:52).

rows = cs.load_rows(WAREHOUSE / 'figB_out' / 'fig5b.json')
_ = cs.fig5b(rows, source='figB_out/fig5b.json')
No description has been provided for this image

Fig 5C - swap raster

Paper claim: with the swapped densities, SOM-parameter cells lead PV and lock more strongly than control (mmc2 490-496). Replication: SOM-parameter cells (PV slot) at 0.28 rad, PV-parameter cells at 0.68-0.78 rad, PPC 0.30-0.75 per type. Verdict: pass (RESULT_FIGURES.md:53). The swap condition is not yet among the raster conditions, so this panel renders the closest available trace (replace_pv_0.5) until run_cellrep_rasters.py gains the swap condition.

trace = cs.load_trace_or_none(WAREHOUSE / 'cellrep_rasters' / 'seed1' / 'replace_pv_0.5.npz')
if trace is None:
    print('pending: run_cellrep_rasters.py')
else:
    cs.fig5c(trace, source='cellrep_rasters/seed1/replace_pv_0.5.npz')
No description has been provided for this image

Fig 6A bottom - SOM/PV density ratio

Paper claim: a higher SOM/PV ratio slows the rhythm from about 40 to 15 Hz while the amplitude rises (mmc2 549-552). Replication: f_pk 38.2 to 18.0 Hz over ratio 0.3-4; peak |X| 1.0 to 4.4x. Verdict: pass (RESULT_FIGURES.md:56).

rows = cs.load_rows(WAREHOUSE / 'figB_out' / 'fig6a.json')
_ = cs.fig6a_bottom(rows, source='figB_out/fig6a.json')
No description has been provided for this image

Fig S1 - connection probability

Paper claims: frequency rises with p; seizure-like activity above 25%; in the realistic 1-15% range the frequency stays in the gamma range and the delay is maintained. Replication: f_pk 41.7 to 53.7 Hz over p = 0.04-0.20, 12.2 Hz at p = 0.01; every seed at or above 50 Hz max E from p = 0.16. Verdicts: S1-F pass, S1-S partial (onset two grid steps early), S1-G fail (12.2 Hz at p = 0.01), S1-D pass (RESULT_FIGURES.md:107-110).

rows = cs.load_rows(WAREHOUSE / 's1_95d2161b' / 's1.json')
_ = cs.fig_s1(rows, source='s1_95d2161b/s1.json')
No description has been provided for this image

Notes

  • The score over the 14 result panels is 10/14 = 71/100 (RESULT_FIGURES.md:200).
  • Open: which metric settles Fig 4B amplitude (paper metric falls in our runs; RESULT_FIGURES.md:206-207), and S3 beyond 6.2 s needs a longer window.
  • Each panel cell displays its figure exactly once: the panel call's return value is suppressed (_ = ... or a call inside if/else), so the inline backend's end-of-cell figure flush renders it and no second execute-result copy appears.
  • The dispatcher executes this notebook against the real warehouse data; it is stored without outputs.