Neural Timescale Analysis · iSTTC Method · good_isttc

Intrinsic timescales
across brain regions

Spontaneous spiking activity from 154 sessions. Autocorrelation decay fitted with 1–4 exponential components via iSTTC (Pochinok et al., 2025) + BIC model selection (Shi et al., 2025). All units passed quality filter.

r² ≥ 0.5 CI excludes zero ACF decline 50–200 ms ≥ 100 spikes
23,660
Total units
4.3 Hz
Median firing rate
300 ms
Median τ effective
199
Unique brain regions
01
Timescale × Brain Region
Distribution of τ_eff for the 15 most-sampled regions. Box = IQR, whiskers = 5th–95th percentile. Sorted by median (descending).
⚠ Box plot data derived from log-normal fit to population distributions per region. Within-region spread is substantial — note overlap between many adjacent regions.
Median τ > 500 ms 200–500 ms Median τ < 200 ms
Main takeaway
Within-region spread rivals between-region differences for most pairs. Brainstem regions (PRNr, MRN) have medians ~10× higher than hippocampal regions (CA1, CA3), but their IQRs overlap substantially with mid-hierarchy areas like LP or PO. The ordering is robust at the extremes — brainstem vs. hippocampus is a clear, real gradient — but adjacent ranks in the middle should not be over-interpreted as distinct timescale "classes."
02
Timescale × Major Brain Division
Distribution of τ_eff across grouped forebrain, midbrain, and hindbrain. Box = IQR; whiskers = 5th–95th percentile. Key question: do these divisions actually separate in τ space?
⚠ Approximate distributions. Forebrain pool contains many heterogeneous regions (Ctx, Hippo, BG, Thal) — its wide spread reflects this pooling, not noise.
Forebrain Midbrain Hindbrain
Hierarchy validated
Aligning with Shi et al. (2025), there is a real ~8× jump in median τ from forebrain (110 ms) to midbrain (868 ms). Critically, the forebrain IQR (≈28–320 ms) barely overlaps with the midbrain IQR (≈320–1,700 ms), indicating this is a genuine population-level difference, not an artefact of medians. The forebrain's own wide spread (~5–2,000 ms whiskers) underscores that it encompasses a diverse hierarchy within itself — from 50 ms PAR to 700 ms SSs.
03
Timescale × Firing Rate
Distribution of τ_eff per firing rate bin. Firing rate and timescale are often assumed to be inversely linked — this plot tests that assumption.
⚠ Approximate quartile distributions per FR bin derived from within-bin log-normal fits.
τ distribution per FR bin IQR
Sanity check — weak and non-monotonic
There is no simple inverse relationship between firing rate and timescale. The 2–5 Hz bin has the highest median τ (~365 ms) and the widest spread, driven by bursty low-rate neurons in deeper structures. The 20–50 Hz bin shows a secondary peak (~432 ms median) — unexpectedly long — which likely reflects fast-firing neurons in brainstem regions. Within each FR bin, τ distributions overlap almost completely. Firing rate alone is a poor predictor of a neuron's timescale; brain region explains far more variance.
04
Timescale × Local Variance (Lv)
Lv measures ISI regularity. Lv ≈ 1 = Poisson; Lv < 1 = regular; Lv > 1 = bursty. Distribution of τ per Lv bin.
⚠ Approximate quartile distributions per Lv bin.
τ distribution per Lv bin
Key finding — burstiness ≠ long timescale
Bursty neurons (Lv > 1) have dramatically shorter effective timescales. The median τ drops from ~844 ms at Lv < 0.5 (regular firing) to just ~9 ms at Lv > 2 (highly bursty). Regular-firing neurons — typical of deep cortical layers and thalamus — integrate information over long windows. Bursty neocortical neurons have short autocorrelation despite high instantaneous rates within bursts, because the long inter-burst silences break the temporal continuity measured by the ACF. This also explains why iSTTC outperforms PearsonR: it is specifically designed for the Lv > 1 regime where binned ACF estimates are most biased.
05 — 06
τ Population Distribution & N Components
Left: marginal distribution of τ_eff across all 23,660 units. Right: fraction of neurons best described by 1–4 exponential components.
Unit count per τ bin
Distribution shape
Heavily right-skewed with a mode near 100 ms. The majority of neurons (n ≈ 9,800 in the first bin) have short timescales, consistent with hippocampal and cortical units dominating the dataset. The long right tail (τ > 1,000 ms) is populated by brainstem and deep-thalamus units. The log-scale structure suggests a roughly log-normal population — no single "characteristic" timescale for the brain as a whole.
n_timescales distribution
Multi-timescale prevalence
72% of neurons require ≥ 2 timescale components. A single exponential is insufficient for most cells, consistent with Shi et al. (2025) who report 51% two-component in primates. The 59% two-component rate here, with an additional 13% needing three, confirms that single-τ summaries discard real structure. This justifies the BIC-based multi-exponential fitting approach used throughout.
07
Timescale Components — τ₁ through τ₄
Distribution of each fitted timescale component across all neurons that have that component. Do the components occupy distinct timescale bands?
τ₁ — fast
52 ms
median · n = 23,660
τ₂ — slow
1,034 ms
median · n = 17,203
τ₃ — very slow
2,929 ms
median · n = 3,151
τ₄ — ultra
4,489 ms
median · n = 22
Median τ₁ and τ₂ per brain region — components occupy distinct timescale bands
τ₁ (fast) τ₂ (slow)
Two-band structure
τ₁ and τ₂ occupy clearly separate timescale bands (~10–280 ms vs ~330–2,600 ms) with no overlap in region-level medians. The gap is approximately one order of magnitude. τ₁ is tightly linked to local circuit properties (see Section 08), while τ₂ appears to reflect a network-level slow fluctuation that is more uniformly distributed. The ~20× range in τ₁ across regions (15 ms in DG → 263 ms in PRNr) is the primary driver of effective timescale differences reported in Section 01.
08
Multiscale Architecture: τ₁ vs τ₂
Do regions with long fast components also have long slow components? Testing for coupled vs. independent multiscale dynamics.
Top 15 Regions (Log-Log Scale)
Coupled multiscale architecture
τ₁ and τ₂ are positively correlated across regions (log-log), ruling out the "universal slow baseline" hypothesis. If τ₂ were a region-independent network state (e.g. global up/down oscillations), we'd expect a flat horizontal scatter. Instead, regions with long τ₁ (PRNr, SPVI, V) consistently show long τ₂ too. This means both fast and slow temporal structure are shaped by local circuit properties — the brain doesn't simply impose one slow timescale on top of region-specific fast dynamics. The exception is CA1, which has short τ₁ (~19 ms) but disproportionately long τ₂ (~586 ms), consistent with hippocampal-specific theta/sharp-wave ripple dynamics.
09
τ₂ Power-Law Distribution
Log-log histogram of τ₂ across the population. Scale-free ("critical") dynamics would predict a straight-line descent with exponent ≈ −2.
τ₂ Unit Count
Against strict neural criticality
The τ₂ distribution shows a broad plateau from ~1,000–3,500 ms rather than the monotonic decay predicted by a power-law. A pure power-law (scale-free dynamics at a critical point) would appear as a straight descending line on these log-linear axes. Instead, the flat plateau suggests that slow timescales cluster preferentially in a "slow-state band" that may reflect shared network-level oscillatory dynamics (e.g., infraslow fluctuations, sleep-wake cycling in the passive recording window). This is a falsification of the strong form of neural criticality for τ₂, though it doesn't rule out criticality as a contributing factor.
10
Fit Reliability & Amplitude Metrics
QC check: are model fits trustworthy? R² by region (left), c₁ vs τ₁ amplitude tradeoff (right), CI width growth with τ (bottom).
Median R² per Region (Top 15)
R² ≥ 0.85 R² < 0.85
Fits are uniformly acceptable (R² 0.73–0.90) but not uniformly excellent. Hippocampal regions (SUB, CA1) have lower R² — likely because their complex θ-modulated autocorrelations are not well captured by sum-of-exponentials. Brainstem regions (V, PRNr) fit best, consistent with their smoother, slowly-decaying ACF profiles.
Amplitude (c₁) vs τ₁ (Top 30 regions)
Median region data
Strong inverse tradeoff: short-τ₁ regions show large initial ACF amplitude (c₁ ≈ 0.20–0.30) while long-τ₁ brainstem regions are attenuated (c₁ ≈ 0.06–0.09). This makes sense: fast-decaying regions have high initial correlation that drops quickly; slow-decaying regions have smaller but more persistent correlation. This tradeoff is intrinsic to the exponential model, not a fitting artefact.
95% Confidence Interval Width vs Estimated τ_eff
Estimation uncertainty scales with τ: long-timescale estimates (τ > 2,000 ms) have CIs exceeding 300 ms. This is an intrinsic limitation — you need many data points to accurately estimate a slow decay. This means Section 01 differences between neighboring mid-hierarchy regions should be interpreted cautiously: the overlap in CI is comparable to the difference in medians for e.g. LP (212 ms) vs. PO (368 ms). The brainstem–hippocampus split is robust to this uncertainty; fine-grained rank ordering within the middle of the hierarchy is not.

iSTTC Notebook: Function & Code Documentation

This notebook estimates intrinsic neural timescales (ITs) from single-unit recordings spanning the entire mouse brain. Timescales are defined as the decay time constant of the autocorrelation function of spontaneous neural activity, reflecting how neural circuits integrate information over time.

Two complementary approaches are integrated: (1) the iSTTC method (Pochinok et al., 2025) for unbiased ACF estimation, and (2) multi-exponential BIC model fitting (Shi et al., 2025).

iSTTC Method

Spike Train Tiling Coefficient adapted for ITs. Reduces systematic bias under low firing rates and bursty dynamics.

Multi-Exponential Fitting

ACF modeled as sum of M exponentials (M = 1–4) by BIC. Captures multiple slopes single-exponential models miss.

Dataset

IBL Neuropixels — 115 mice, 223 brain regions. Same dataset as Shi et al. (2025) (IBL, 2023).

Environment

Google Colab. Dependencies: ONE-api, numpy, scipy, numba, joblib.

Setup & Dependencies

The first cell mounts Google Drive and installs all required packages. Dependencies include ONE-api (IBL data access), numpy / scipy (numerical routines), numba (JIT compilation for the iSTTC kernel), joblib (parallelized session processing), and matplotlib (single-neuron visualization).

iSTTC Implementation

The iSTTC computes the ACF directly on spike times, avoiding binning. All inner functions are JIT-compiled via Numba's @njit.

1_tiling_proportion_nbComputing T_A

Computes T_A: the fraction of total recording duration within Δt of any spike.

T_A = (duration within Δt of any spike) / (total duration)
Eq. 5 — Pochinok et al. (2025)

Operates directly on spike times without binning — a key distinction from conventional ACF.

2_spikes_in_tiling_nbComputing P_A|B

Computes P_A|B: fraction of spikes in train A within Δt of any spike in train B. Uses binary search for efficient neighborhood queries. Yields substantially lower REE than binned ACF, especially under low firing rate and high Lv.

3_isttc_nbiSTTC Lag Loop

Core computation. For each lag k, the spike train is split into two segments (A: shifted; B: unshifted). STTC formula applied at each lag:

iSTTC_k = ½ · ( (P_k:T − T_1:T-k)/(1 − P_k:T·T_1:T-k) + (P_1:T-k − T_k:T)/(1 − P_1:T-k·T_k:T) )
Eq. 6 — Pochinok et al. (2025)

Zero-padded intervals are excluded from T computation, enabling unbiased application to epoched data — overcoming a key PearsonR limitation.

4calculate_isttcMain Wrapper

User-facing interface. Sorts spike times, casts to np.float64. Defaults: Δt = 5 ms, n_lags = 1200, lag_shift = 5 ms (Pochinok et al., 2025, §7.4).

Multi-Exponential Model Fitting

5_multi_expMulti-Component Exponential Model
AC(t) = Σᵢ cᵢ · exp(−t / τᵢ), i = 1…M
Eq. 2 — Shi et al. (2025)

Captures multiple linear slopes in log-ACF that single-exponential models fail to describe.

6fit_multi_exponentialBIC-Based Model Selection

Fits M = 1, 2, 3, 4 component models via scipy.optimize.curve_fit. Initial params on log scale; lower bound = 5 ms, upper = max lag.

BIC

BIC = n · ln(SS_res / n) + k · ln(n)

Constraint: each component must contribute ≥ 1% of total autocorrelation (cᵢ ≥ 0.01 · Σⱼ cⱼ).

Effective Timescale

τ_eff = (Σᵢ cᵢ · τᵢ) / (Σᵢ cᵢ)
Eq. 3 — Shi et al. (2025) · amplitude-weighted mean

Confidence Interval

95% CI via error propagation through the covariance matrix; Student's t distribution for small samples.

Local Variance (Lv)

7compute_local_varianceBurstiness Proxy
Lv = (3 / (n−1)) · Σᵢ [ (Iᵢ − Iᵢ₊₁) / (Iᵢ + Iᵢ₊₁) ]²
Shinomoto et al. (2009)

Lv correlates with excitation strength of the Hawkes process. iSTTC advantage over ACF is most pronounced under Lv > 1 — the bursty, low-rate regime characteristic of neocortex. See Dashboard §04 for how Lv relates to measured timescales.

Lv = 1

Poisson firing dynamics

Lv < 1

Regular, oscillatory firing

Lv > 1

Bursty firing — clusters + long silences

Key

iSTTC advantage maximal at Lv > 1 (bursty neocortical regime)

Quality Control Criteria

8check_quality_criteriaFour Inclusion Criteria
ACF Decline

Monotonic decline 50–200 ms. Coef = −0.946, p < 10⁻¹⁶ (Pochinok et al., 2025).

Confidence Interval

95% CI of τ_eff excludes zero. Coef = −1.325, p < 10⁻¹⁶.

R² Threshold

Model fit R² ≥ 0.5 (Shi et al., 2025; Cavanagh et al., 2016).

Spike Count

≥ 100 spikes. Guards against brief-firing unreliable estimates.

iSTTC increases neurons meeting all criteria by ~7–8% vs. PearsonR (Pochinok et al., 2025, Figure 5E).

Spontaneous Activity Window

9get_spontaneous_windowIBL Passive Period

Extracts the 10-minute passive period at the end of each session: head-fixed mice, dark environment, no stimuli or reward. Used as proxy for spontaneous activity following Shi et al. (2025).

Single Neuron & Session Analysis

10analyze_single_neuronEnd-to-End Single Unit

Sequentially: (1) compute iSTTC ACF, (2) fit multi-exponential with BIC, (3) evaluate QC criteria, (4) compute FR and Lv. Output: τ_eff, τᵢ, cᵢ, fit quality, raw ACF + fitted curve.

11_process_clusterParallel Worker

Unit of work per neuron cluster. Validates IBL QC labels (≥ 2), checks spike count, calls analyze_single_neuron, merges with session metadata.

12analyze_sessionFull IBL Session

Downloads data via ONE API, identifies spontaneous window, runs _process_cluster in parallel via joblib.Parallel.

Visualization

13plot_single_neuronTwo-Panel Output
  • Left: raw iSTTC points (blue) + multi-exponential fit (red), fit info, 50–200 ms QC window.
  • Right: neuron summary — FR, Lv, spike count, τᵢ, cᵢ, CIs, QC outcomes.

Batch Processing Infrastructure

14get_next_pids · mark_isttc_done · run_batchDistributed Coordination
  • get_next_pids — retrieves unprocessed PIDs per team member from CSV registry.
  • mark_isttc_done — updates registry on completion.
  • run_batch — connects ONE API, processes sessions sequentially, saves incrementally (minimizes data loss).

Parameter Summary

ParameterValueSource
Δt (iSTTC window)25 msPochinok et al. (2025), §7.4
lag_shift5–10 msPochinok et al. (2025)
n_lags600–1200This notebook
Maximum components4Shi et al. (2025)
Min. component contribution1%Shi et al. (2025)
R² threshold≥ 0.5Pochinok et al. (2025); Shi et al. (2025)
Min. spike count100This notebook
Spontaneous activity duration~10 minShi et al. (2025)

Methodological Rationale

iSTTC reduces systematic ACF estimation bias by ~8% REE vs. PearsonR, with ~10× lower REE vs. epoched data — justifying continuous spontaneous recording. The multi-timescale model captures multiple log-ACF slopes that single-exponential fails to describe; 51% of neurons in Shi et al. (2025) required ≥ 2 components, consistent with 72% observed here.

References

  • Cavanagh SE et al. (2016). Autocorrelation structure at rest predicts value correlates. eLife 5:e18937.
  • International Brain Laboratory (2023). Brain-wide map of neural activity. bioRxiv.
  • Murray JD et al. (2014). A hierarchy of intrinsic timescales. Nature Neuroscience 17:1661.
  • Pochinok I et al. (2025). iSTTC: robust method for intrinsic timescale estimation. bioRxiv. doi.org/10.1101/2025.08.01.668071
  • Shi Y-L et al. (2025). Brain-wide organization of intrinsic timescales. bioRxiv. doi.org/10.1101/2025.08.30.673281
  • Shinomoto S et al. (2009). Relating neuronal firing patterns to cortical differentiation. PLoS Comp Biol 5:e1000433.
  • Wasmuht DF et al. (2018). Intrinsic neuronal dynamics predict functional roles during working memory. Nat Commun 9:3499.