Power-Aware Inference for State-Dependent Brain Stimulation in Micro-Cohorts

Whether an electrical pulse to the cortex changes anything depends on the brain's internal state at that instant — its ongoing oscillations, the position of its population activity on a low-dimensional trajectory, the subject's fatigue. This state dependence is now established across scales: 10 Hz direct cortical stimulation enhances alpha oscillations only when endogenous alpha is weak (Modulation of Cortical Oscillations by Low-Frequency Direct Cortical Stimulation Is State-Dependent), and phase-shifted tACS shifts visual sensitivity only in low-fatigue sessions (State-Dependent tACS Effects Reveal the Potential Causal Role of Prestimulus Alpha Traveling Waves in Visual Contrast Detection). But the field that discovered this runs on cohorts of one to three subjects, and it demonstrates state dependence with the one statistical move guaranteed to make small cohorts worse: splitting the sample into state subgroups and testing each separately. The statistics literature is unambiguous that partitioning a small sample strips degrees of freedom and inflates variance — Yang et al. found that a multi-gene interaction detectable in a full cohort ($H=5.99, P=0.015$) lost all power when pushed into a depression subgroup of roughly 12 patients (Correlation of 5-HTT, BDNF and NPSR1 gene polymorphisms with anxiety and depression in asthmatic patients).

The result is a field-wide ambiguity that nobody has resolved. When Wei et al. report that tACS had no significant effect in high-fatigue sessions of an $N=33$ cohort, that null could be a genuine biological gate — or a Type II error manufactured by the subgroup split. The same shadow hangs over the $N=3$ ECoG findings of Alagapan et al., which carry no power analysis at all. This proposal builds the missing statistics: a continuous-state, borrow-aware treatment-effect estimator for brain stimulation, plus a retrospective audit that adjudicates whether published state gates are biology or artifacts of low power.

Core Claim

State dependence should be modeled as a continuous covariate in a semiparametric treatment-effect estimator, not as a discrete subgroup label. Concretely: for each trial, let $X$ be the pre-stimulation neural state — a short latent trajectory extracted from population recordings or EEG — let $Z$ indicate stimulation versus sham, and let $Y$ be the post-stimulation outcome (latent shift or behavioral threshold). We estimate the stimulation effect as a function over the state manifold,

$$\hat\tau(x) = \hat\mu(x, 1) - \hat\mu(x, 0),$$

where $\hat\mu(x, z)$ is a flexible regression of outcome on state and treatment, fitted on the trial's own data plus borrowed trials selected by influence score. No degrees of freedom are spent on partitioning, every trial contributes to every state-region estimate through smoothing, and the gate question becomes a targeted question about $\tau(x)$ on a state region — testable with honest confidence intervals.

The second ingredient extends Adaptive Data-Borrowing for Improving Treatment Effect Estimation using External Controls from static tabular covariates to dynamical neural data. That paper scores every external control by its influence — how much including it perturbs the fitted outcome model — and analytically picks the borrowing size $K$ that minimizes mean squared error, combining data with an augmented inverse-probability-weighting estimator. It was built and validated only on static datasets (the NSW/PSID earnings benchmarks). We apply the same influence machinery to trials and sessions from external neural corpora, with the pre-stimulation latent state $X$ as the covariate vector on which exchangeability is judged. This matters because micro-cohort stimulation studies are structurally capped: invasive work cannot recruit past $N=3$ patients (Alagapan et al.) or $N=1$ animals (OMiSO: Adaptive optimization of state-dependent brain stimulation to shape neural population states), and power there is governed by the accumulation of state-receptive trials, not total headcount — exactly the rare-event logic that gutted the FLUVACS correlate analysis when a mild season left few infections to analyze (HAI and NAI titer correlates of inactivated and live attenuated influenza vaccine efficacy).

Research Program

The program has three parts. First, the state representation: we extract $X$ with nonlinear latent-variable models rather than linear ones, because the Neural Latents Benchmark showed that deep recurrent models nearly double the linear GPFA baseline on motor-cortex dynamics (AutoLFADS at 0.346 bits per spike versus GPFA at 0.187 on MC_Maze co-smoothing) (Neural Latents Benchmark '21: Evaluating latent variable models of neural population activity), and because spike generation itself is a nonlinear threshold that amplifies subthreshold fluctuations into response variance (Amplification of Trial-to-Trial Response Variability by Neurons in Visual Cortex). Second, the estimator: a state-conditioned forward model $\hat\mu$ (in the spirit of OMiSO's LSTM that consumes 250 ms of pre-stimulation trajectory, which significantly outperformed stim-only models, $p<0.05$) embedded in the influence-weighted, MSE-optimized borrowing scheme of Adaptive Data-Borrowing for Improving Treatment Effect Estimation using External Controls Adaptive Data-Borrowing for Improving Treatment Effect Estimation using External Controls. Third, the audit: a public tool that, given a published design and observed effect, returns the power curve — which true effect sizes in each state region the original subgroup tests could and could not have detected.

The proposal differs from each closest neighbor in a specific way. OMiSO supplies the state-conditioned model but treats variance purely as an optimization problem, with no power calculations, no confidence intervals, and an on-policy PPO loop the authors themselves flag as data-hungry (Minai et al.); we keep their state conditioning but replace online reinforcement learning with offline semiparametric estimation, and we add the formal statistics they lack. The data-borrowing paper supplies the estimator but has never touched a time series, a latent manifold, or a closed-loop physiological regime; we port its influence-function machinery to exactly the dynamical setting it ignores. Wei et al. and Alagapan et al. motivate the whole question and supply the gating phenomena, but both discretize state (fatigue self-report; eyes-open/closed/task bins) and neither can say whether their nulls are gates or false negatives; we re-derive their gating questions as continuous, powered tests. Kang et al. showed in a different disease domain that forcing a continuous biological spectrum into binary labels causes within-class heterogeneity and measurable losses (their soft continuous scores reached $r=0.7375$ with clinical MMSE on ADReSS) (On the Within-class Variation Issue in Alzheimer's Disease Detection); we apply the same lesson to neural state instead of disease labels.

Baselines

The naive reference point is the pooled, state-blind analysis: average the sham-subtracted effect over all trials, ignoring $X$ entirely. This is the "do nothing" default of classical stimulation studies, and the literature gives strong reason to expect it to fail here — OMiSO showed that prediction models omitting pre-stimulation state were significantly worse than state-conditioned models ($p<0.05$), though no absolute tracking-error value is reported for either (Minai et al.), and no reported result found on Lacuna for a pooled-analysis error rate on any stimulation corpus. It matters as the floor: if a state-dependent effect inverts or extinguishes across states — as atomoxetine does along an inverted-U in baseline arousal (Warren et al.) — pooling can yield a near-zero average that no sample size fixes.

The strongest existing competitor is the field-standard method itself: post-hoc binned stratification, as run in Wei et al. (fatigue split of $N=33$) and Alagapan et al. (three behavioral bins in $N=3$). It owns the question because every published state-gating claim was made this way. We run it on identical trials, identical latent extraction, and an identical tuning budget (median splits and quartile splits), with the same injected ground truth. Beating it means two things jointly: higher detection power for known state-dependent effects at matched trial counts, and nominal-or-better 95% confidence-interval coverage where binned analysis is anti-conservative.

The strongest methodological competitor is influence-based adaptive borrowing applied naively: the estimator of Adaptive Data-Borrowing run on static summary covariates (session-mean firing rates, band powers) with the trajectory structure discarded. We run it with the same candidate pools, the same nested-subset search over $K$, and the same compute. Beating it means lower MSE and honest coverage when the true effect depends on trajectory features the static summaries miss — and its authors already showed it dominates adaptive-lasso borrowing, so it, not the lasso, is the bar. The key ablation is our full estimator with $X$ replaced by a single scalar (or hard-binned) state: it isolates the continuous-state ingredient and directly measures how much of the gain comes from the manifold representation versus from borrowing alone.

Why not just…?

Why not just pool more trials and average the state noise away? The evidence against this is convergent and within the file: Alagapan et al. found stimulation effects go from negligible to robust depending on endogenous alpha power, and Wei et al. found the same tACS protocol significant in one fatigue state and absent in another. Warren et al. showed neuromodulatory interventions follow an inverted-U in baseline state, so pooling across states can cancel true effects rather than reveal them. And the pooling escape hatch is closed: invasive cohorts are capped at $N=3$ and $N=1$ by recruitment reality, not budget. Pooling is run as our floor baseline, and the semi-synthetic experiments will quantify exactly how much effect it destroys.

Why not just run a linear regression adjusting for baseline state (ANCOVA on band power or firing rate)? This is the most serious alternative, and we treat it as a genuine threat rather than arguing it away. What the file says against it: linear latent models badly underfit neural dynamics (GPFA 0.187 bps versus AutoLFADS 0.346 bps on MC_Maze; NLB '21), the spike threshold is an expansive nonlinearity that linear adjustment cannot absorb (Carandini), and linear borrowing fails under nonlinear covariate–outcome relations (Adaptive Data-Borrowing for Improving Treatment Effect Estimation using External Controls Adaptive Data-Borrowing for Improving Treatment Effect Estimation using External Controls). But none of that proves a well-chosen two- or three-covariate ANCOVA fails on these effects. So we run it head-to-head with the same data and tuning budget, and we commit in advance: if ANCOVA matches our estimator's power and coverage on the injected ceiling-effect and inverted-U ground truths, the honest deliverable is the simpler recipe plus the audit tool — still a contribution, but a different paper.

Why not just borrow everything available with an adaptive lasso? The borrowing paper itself ran this comparison and found lasso-style selection misses individual outliers with low average group bias, importing them and inflating MSE; the influence-based estimator consistently achieved lower MSE in both linear and nonlinear simulations. Beyond selection error, borrowing everything is dangerous in a non-stationary brain: electrode drift and state shifts make old sessions progressively less exchangeable, which is exactly why MSE-optimized selection exists. Our experiments include the all-borrow and none-borrow extremes precisely to show where that trade-off bites.

Why not just use a univariate closed-loop threshold (gate stimulation on band power)? Existing clinical devices do this, but the file's evidence says state receptivity is not univariate: Wei et al. showed visual sensitivity tracks the direction of alpha traveling waves, not stationary power, so a power threshold misses the phase-gradient dynamics that determine the effect; and OMiSO achieved significantly lower target error by tracking latent trajectories rather than scalar metrics. Kang et al.'s result is the general warning: hard binary state labels cost measurable performance versus continuous soft scores. The univariate-threshold ablation (our estimator with $X$ reduced to one scalar) is this alternative run fairly.

Proposed Experiments

The main empirical platform is semi-synthetic: real neural dynamics from the Neural Latents Benchmark '21 suite — MC_Maze, MC_RTT, Area2_Bump, and DMFC_RSG (NLB '21) — with synthetic stimulation effects of known ground truth injected as state-dependent perturbations: a ceiling-effect gain that shrinks with endogenous oscillation power (calibrated qualitatively to Alagapan et al.) and an inverted-U gate (calibrated to Warren et al.). We vary cohort size over $N \in \{3, 10, 33\}$ sessions to span the field's real range, and measure MSE of $\hat\tau$, empirical 95% coverage, power to detect a known gate, and the false-gate rate. The decisive check is sharp: at matched trial counts, binned stratification must misclassify true weak gates as nulls at a rate the continuous estimator avoids, with coverage quantified — otherwise the core claim fails.

Second, borrowing: MC_Maze ships in Small, Medium, and Large versions, a ready-made hierarchy. We treat the Small version as the "trial," the larger versions as the external pool, and test whether influence-based borrowing with trajectory covariates recovers injected effects that the Small trial alone cannot power — against the static-covariate borrowing baseline, adaptive-lasso-style selection, and no borrowing. Third, the retrospective audit of the fatigue gate: because no reported effect sizes exist for Wei's high-fatigue subgroup on Lacuna (the paper reports directions and significance, not magnitudes), the audit is a design-level simulation matched to the published design ($N=33$, within-subject sham crossover, low-fatigue effect present) that computes, for a grid of true high-fatigue effect sizes, the power the original subgroup test had to detect them. The output is a public power curve stating which gating conclusions that design could and could not support — the first quantitative answer to a question currently settled by narrative.

The honest limitations are two. Influence scores condition only on observed covariates, so unmeasured differences between borrowed and internal sessions leak bias unchecked — the open problem flagged in the borrowing paper itself — and we will report sensitivity analyses over borrowing size rather than a single $K$. And the audit cannot recover unreported effect sizes; it bounds what the design could have detected, which is a power statement, not a replication. Both are stated up front, because the ambition here is precisely to make such statements routine in a field that has never made them.