release 6e71f00 · 8 sessions · DANDI:000021

cortexflow

one-step benchmark

Predict every unit’s spike count in the next 50 ms bin from the previous two seconds, on a block recorded tens of minutes after training. 8 sessions; neural models averaged over seeds.

skill on the future block

  • Trivial baseline
  • Classical
  • Neural
0.0000.0500.1000.1500.200AR (per unit)AR (per unit)Smoothed persistenceSmoothed persistenceVAR (ridge)VAR (ridge)GRUGRUTransformerTransformerTCNTCNLSTMLSTMRNNRNNPCA + VARPCA + VARLDS (Kalman)LDS (Kalman)Mean rateMean rateone-step R² vs training-mean rate
R² against each unit’s training-period mean rate, averaged over units. Faint dots are sessions; the bar is a 95% interval from resampling whole sessions. Zero is the mean-rate predictor. Persistence is omitted from the plot (mean −0.472) because it would compress the axis; it is in the table.
Table view
ModelFamilyR² mean95% CIMedian unit R²Rate-weighted R²Corr.Poisson dev.Seed SDParamsFit (s)
AR (per unit)classical0.187[+0.172, +0.201]0.1690.2270.3720.7333,96029
Smoothed persistencetrivial0.160[+0.144, +0.175]0.1420.1960.3430.81810
VAR (ridge)classical0.144[+0.123, +0.166]0.1350.1830.3410.95557,7208
GRUneural0.142[+0.124, +0.163]0.1310.1790.3400.8990.0011715,89662
Transformerneural0.138[+0.120, +0.158]0.1220.1770.3330.9400.00301,247,60866
TCNneural0.130[+0.115, +0.146]0.1170.1650.3230.9560.00201,534,32855
LSTMneural0.123[+0.106, +0.141]0.1090.1550.3160.9400.0025944,24835
RNNneural0.123[+0.108, +0.138]0.1100.1580.3140.9660.0026259,19267
PCA + VARclassical0.103[+0.088, +0.119]0.0990.1310.3000.96812,1841
LDS (Kalman)classical0.086[+0.079, +0.094]0.0680.1180.2520.94016,95214
Mean ratetrivial0.000[0.000, +0.000]0.0000.0000.0000.9821200
Persistencetrivial−0.472[−0.505, −0.440]−0.492−0.3900.2256.75200

cost against skill

  • Classical
  • Neural
0.0000.0500.1000.1505.0K20K100K500K2.0MAR (per unit)VAR (ridge)GRUTCNRNNPCA + VARLDS (Kalman)parameters (log scale)one-step R²
0.0000.0500.1000.150125102050100AR (per unit)VAR (ridge)GRUTCNPCA + VARLDS (Kalman)fit time in seconds (log scale)one-step R²
Mean one-step R² against parameter count and wall-clock fit time (neural models on Apple-silicon GPU, classical on CPU; fit time includes each model’s own validation search). Trivial baselines are omitted because they have no fitted parameters or fit time to place on a log axis.
Table view
ModelParamsFit (s)R² mean
AR (per unit)3,96028.90.187
VAR (ridge)57,7208.30.144
GRU715,89662.40.142
Transformer1,247,60866.40.138
TCN1,534,32854.80.130
LSTM944,24834.80.123
RNN259,19267.00.123
PCA + VAR12,1841.40.103
LDS (Kalman)16,95214.30.086

does the ranking survive

Four sensitivity arms: how much training data each model needs, whether a wider network helps, whether the temporal resolution changes the ordering, and whether the unit-selection rules do. Sections still computing are simply absent.

training data

  • Classical
  • Neural
0.000.050.100.150.100.200.501.00AR (per unit)VAR (ridge)fraction of the training periodone-step R²
Each model refitted on the most recent contiguous fraction of the training period; validation and test unchanged. Gap between the best neural and best classical model at the smallest fraction: −0.091; the gap narrows monotonically with data (Spearman 1.00).

capacity · GRU

0.000.050.100.1550100200500Validation (same block)Test (later block)hidden widthone-step R²
A wider network on the same data: validation is the near future of the same block, test is a block recorded tens of minutes later. A rise in validation without a rise in test is interpolation bought at no benefit to extrapolation.

capacity · Transformer

0.000.050.100.1550100200500Validation (same block)Test (later block)hidden widthone-step R²
A wider network on the same data: validation is the near future of the same block, test is a block recorded tens of minutes later. A rise in validation without a rise in test is interpolation bought at no benefit to extrapolation.

temporal resolution

  • Trivial baseline
  • Classical
  • Neural
0.000.050.100.150.200.252050100AR (per unit)Smoothed persistenceGRUMean ratebin width (ms)one-step R²
Context and horizon held fixed in seconds while the bin width changes. Skill rises with coarser bins for every model, because averaging removes Poisson noise; the question is whether the ordering moves.

unit selection

One-step R² under relaxed and strict quality criteria and a smaller unit cap
VariantUnits (mean)AR (per unit)GRUMean rateVAR (ridge)
cap60600.2270.1930.0000.203
relaxed1200.1960.1490.0000.150
strict790.2010.1750.0000.179
default0.1960.1570.0000.161

paired comparisons

Differences are computed within each session, then summarised. “A better in” is the share of sessions (or units) where A scores higher. The unit-level rows resample units within resampled sessions, so their intervals honour the session structure.

Session-level paired differences (A − B)
ComparisonMean ΔR²95% CId_zA better inn
Best neural vs best classical (chosen on validation)−0.0328[−0.0529, −0.0127]−1.0213%8
RNN vs AR (per unit)−0.0646[−0.0774, −0.0541]−3.480%8
RNN vs VAR (ridge)−0.0214[−0.0275, −0.0153]−2.200%8
RNN vs Smoothed persistence−0.0378[−0.0549, −0.0239]−1.520%8
GRU vs AR (per unit)−0.0448[−0.0590, −0.0325]−2.150%8
GRU vs VAR (ridge)−0.0016[−0.0060, +0.0034]−0.2138%8
GRU vs Smoothed persistence−0.0180[−0.0361, −0.0022]−0.6738%8
LSTM vs AR (per unit)−0.0644[−0.0784, −0.0524]−3.180%8
LSTM vs VAR (ridge)−0.0212[−0.0268, −0.0154]−2.320%8
LSTM vs Smoothed persistence−0.0377[−0.0560, −0.0220]−1.420%8
TCN vs AR (per unit)−0.0574[−0.0692, −0.0467]−3.290%8
TCN vs VAR (ridge)−0.0141[−0.0210, −0.0066]−1.2313%8
TCN vs Smoothed persistence−0.0306[−0.0465, −0.0165]−1.290%8
Transformer vs AR (per unit)−0.0495[−0.0614, −0.0382]−2.780%8
Transformer vs VAR (ridge)−0.0063[−0.0114, −0.0001]−0.6913%8
Transformer vs Smoothed persistence−0.0227[−0.0387, −0.0087]−0.9613%8
Unit-level paired differences (A − B), sessions as blocks
ComparisonMean ΔR²95% CIA better inunits
RNN vs AR (per unit)−0.0644[−0.0774, −0.0539]7%936
RNN vs VAR (ridge)−0.0214[−0.0277, −0.0151]21%936
GRU vs AR (per unit)−0.0444[−0.0591, −0.0321]17%936
GRU vs VAR (ridge)−0.0014[−0.0059, +0.0035]48%936
LSTM vs AR (per unit)−0.0641[−0.0783, −0.0520]8%936
LSTM vs VAR (ridge)−0.0210[−0.0268, −0.0152]26%936
TCN vs AR (per unit)−0.0571[−0.0693, −0.0463]11%936
TCN vs VAR (ridge)−0.0141[−0.0211, −0.0066]29%936
Transformer vs AR (per unit)−0.0492[−0.0613, −0.0381]14%936
Transformer vs VAR (ridge)−0.0062[−0.0114, +0.0001]36%936