Many brain-network biomarkers for epilepsy, depression, or schizophrenia are measured in patients who are taking medication. Sedatives and anti-seizure drugs slow and dampen neural activity across the whole brain, so a "longer path" or "weaker synchrony" in a patient's network could reflect the disease, the drug, or both. We propose borrowing a specific idea from wireless network routing. There, the delay a packet experiences is split into time spent inside a relay node (waiting in a queue, contending for the channel) and time spent crossing a link. Applied to the brain, this split gives a way to separate the two causes. Our hypothesis is that diffusely acting drugs mostly add delay at nodes: every signal arriving at a sedated region is processed more slowly, whatever its source. Disease-related changes in specific connections should instead show up as edge-specific residual delays.
Concretely, we estimate directed time lags between EEG regions and fit a model in which each lag is the sum of three parts. The first is a time-varying receiving-node delay, tracked over the session the way routing protocols track queue load. The second is a sending-node delay. The third is a constant per-connection delay. We then ask whether the per-connection delays behave as medication-invariant disease markers while the node delays track drug exposure. If this holds, the node/edge split becomes a structural handle on pharmacological confounding. It works without a medication-naïve baseline, which is often unethical to obtain.
Core Claim
Directed lags between brain regions contain two kinds of variation that standard connectivity summaries mix together. Some variation is shared by all edges touching a node and varies within a session as drug levels change. Some is specific to an edge and stable over the session. The claim is that, under diffusely acting medication, the first kind absorbs most of the pharmacological variance. The second kind then carries disease information that transfers between medicated and unmedicated patients.
Two identifying levers make the split possible. The first is structural: a delay added at a node appears on every edge involving that node. The second is temporal: pharmacokinetics change node delays over minutes to hours, while a connection's conduction properties do not change within a recording. Neither lever alone is new statistics. The combination, applied to directed lag matrices rather than to undirected synchrony, has not been tried in the material we found.
Where the Idea Comes From
The networking side supplies the decomposition principle. The Expected Forwarding Delay metric in High throughput path selection for IEEE 802.11s based wireless mesh networks splits a relay's contribution into medium-access delay, transmission time, and an exponentially smoothed queueing term. The paper shows that link-only metrics such as hop count or link quality miss bottlenecks that live inside nodes. It also damps route changes with a 20% improvement threshold so that metric jitter does not cause flapping. RTGOR similarly builds an expected transmission delay from per-hop queueing and handshake costs. That paper reports that adding these terms kept average delay near 218 s, where a baseline exceeded 507 s, in sparse topologies.
We reuse two of these techniques. The first is the node-versus-link split. The second is exponentially weighted tracking of the node term, here applied to lags estimated in sliding windows. We do not claim brains route packets. We claim that the same algebraic structure, shared node delay plus link-specific delay, matches how a diffusely acting drug should distort measured lags.
The clinical side motivates the problem. In Heart Rate Variability as an Indicator of Autonomic Nervous System Disturbance in Tetanus, sedation suppresses heart-rate variability across time and frequency measures, but not uniformly: RMSSD differences were non-significant (P = 0.09) while SDNN and spectral power fell. A single scalar dose covariate is therefore unlikely to suffice. EPIStress reports that anti-seizure medications alter EEG spectral power and arousal baselines, producing strong between-subject heterogeneity. The systematic review on schizophrenia, Aberrant cortical–subcortical-cerebellar connectivity in resting-state fMRI, attributes much of the inconsistency in prefrontal findings to unmodeled antipsychotic regimens.
The BECTS study, Electroencephalographic Resting-State Functional Connectivity of Benign Epilepsy with Centrotemporal Spikes, is the closest positive anchor. It used medication-naïve children and found lower lower-alpha weighted phase lag index (0.241 vs 0.276, p = 0.024) and longer characteristic path length (4.379 vs 3.904, p = 0.04), with no power-spectrum differences. That gives us a reference for what unconfounded network abnormality looks like. Its metrics are undirected and discard lag magnitude, which is exactly the information our model needs.
The deconfounding methods constrain the design. DecoR removes an unobserved temporal confounder by treating it as sparse outliers in a frequency-domain regression. Broadband sedative suppression violates that sparsity assumption, so we do not build on DecoR's mechanism; we use it as a competitor. The Adversarial deconfounding autoencoder learns embeddings from which an adversary cannot predict the confounder. It works on static expression vectors and gives no interpretable account of where the confounding enters. Our model is not a learned embedding. It is a low-parameter structural decomposition, which matters given the small cohorts typical here.
The section of the research file connecting the two fields found no prior work linking forwarding-delay models to pharmacological confounding. The nearest suggestion in that file is to add network-delay terms to DecoR's frequency-domain regression. We deliberately do something different: we decompose lags in node/edge space and in session time, not in frequency.
Research Program
The first step is lag estimation. From multichannel resting EEG we estimate, per frequency band and per sliding window $t$, a directed lag $\tau_{ij}(t)$ from region $i$ to region $j$. We compute it as the group delay: the slope of the cross-spectral phase across frequencies within the band. This choice is deliberate. Instantaneous volume conduction produces zero phase slope, so it does not masquerade as delay. Phase slope index serves as a robustness check.
The second step fits the decomposition model
$$\tau_{ij}(t) = r_j(t) + s_i(t) + e_{ij} + \varepsilon_{ij}(t),$$
where $r_j(t)$ is the receiving-node delay of region $j$ in window $t$, $s_i(t)$ is the sending-node delay of region $i$, $e_{ij}$ is the session-constant edge delay, and $\varepsilon_{ij}(t)$ is noise. Node terms are smoothed over windows with an exponentially weighted penalty, the analogue of the routing metric's moving average. Edge terms are shrunk toward zero with an L1 penalty, so that only connections with genuine excess delay remain nonzero. With $n$ regions there are $n(n-1)$ directed edges per window but only $2n$ node terms. Repeated windows then pin down the node terms, and the constant edge terms are identified up to the usual sum-to-zero constraints.
The third step tests the two predicted roles. Node terms, averaged over each session, should correlate with measured drug exposure, using dose and time since last dose where available. Edge terms should discriminate patients from controls equally well in medicated and unmedicated patients.
The fourth step builds a simulation benchmark with ground truth. We use delay-coupled phase oscillators on realistic EEG source networks. A "drug" multiplies all node time constants by a smooth pharmacokinetic curve and suppresses broadband gain. A "disease" adds conduction delay to a sparse set of edges. A deliberately adversarial variant makes the drug act region-selectively, so that it partly mimics edge effects. This variant locates the boundary where the method should fail.
Baselines
The naive reference is no deconfounding at all. We feed raw weighted phase lag index, characteristic path length, and raw directed lags to the same classifier, regularized logistic regression with leave-one-subject-out cross-validation. This tells us how much medication actually hurts transfer. It also sets the gap that any method must close.
The standard clinical practice is linear covariate regression: regress dose equivalents out of each connectivity feature by ordinary least squares before classification. It is the method a clinical reviewer will expect. It is fair to run it on exactly the same lag features, and our method must beat it on cross-medication transfer. DecoR reports that ordinary least squares has higher estimation error than its robust method under temporal confounding, but gives no number for that comparison (no reported result found on Lacuna for a numeric value).
The strongest learned competitor is the adversarial deconfounding autoencoder, applied to vectorized lag matrices with medication status as the adversary's target. We give it the same input features and a matched hyperparameter search of 50 configurations per method, selected on inner folds. There is no reported result found on Lacuna for this method on EEG or any physiological time series; its paper reports gene-expression gains only visually. DecoR, applied per edge with band-limited lag time series as the outcome, is the strongest time-series competitor (no reported result found on Lacuna on clinical data). For a whole-pipeline reference, the only reported accuracy in this file on a medication-confounded classification task is 0.87 for fused fMRI and genetics in schizophrenia, from A Hybrid Machine Learning Method for Fusing fMRI and Genetic Data. That number is from a different modality and cohort, so it is context, not a target.
Two ablations isolate the key ingredient. The static ablation drops the time-varying node terms and fits a single node delay per session. It tests whether the pharmacokinetic lever matters. The undirected ablation applies the same decomposition to weighted phase lag index instead of lags. It tests whether lag magnitude carries the separable information.
Beating a baseline means two things together. First, the edge-delay features must show a smaller drop in patient-versus-control area under the ROC curve when moving from unmedicated to medicated test patients. Second, they must have lower decodability of medication status, with neither result inside bootstrap confidence intervals of the competitor. Lower medication decodability alone is not enough, because it can be bought by deleting signal.
Why not just…?
Why not just regress dose out of each connectivity feature? The tetanus data show that sedation shifts different measures by different amounts, so a single dose slope per feature cannot also capture a dose-by-time trajectory. Nonetheless, linear covariate regression is cheap, and in a cohort where dose is well recorded and stable it may perform nearly as well as our model. The static ablation and the covariate baseline settle this directly. If neither loses to the full model on the cross-medication transfer test, the time-varying node term is not earning its place, and we would report that.
Why not just use an adversarial autoencoder to strip medication information? It can remove medication decodability. However, with tens of subjects and hundreds of edge features, it risks overfitting and removing disease signal that correlates with treatment. In epilepsy, sicker patients receive more drug, so the two are entangled. It also says nothing about where the drug acts. Our comparison reports both medication decodability and preserved disease accuracy. On the simulation, it also reports recovery of the true diseased edges, which the autoencoder cannot provide.
Why not just fit a two-way additive node model to the lag matrix, without any networking analogy? This is the real threat, and in fact our model is a structured additive model. The networking work contributes the reason to expect drug effects to load on nodes, plus the moving-average tracking and the damping logic; it is not a separate algorithm. We therefore treat the plain static two-way model as the main ablation. The claim stands only if the time-varying node term clearly adds transfer performance on data with within-session drug variation. If it does not, the honest conclusion is that a simple node-plus-edge model suffices, which is itself a useful and testable finding.
Why not just study medication-naïve patients, as the BECTS study did? Where possible, one should, and we use such data as the reference. But withholding treatment is unethical in severe psychiatric illness and active epilepsy. Medication-naïve cohorts also tend to be milder, so their markers may not generalize to the patients who most need them.
Decisive Checks
The first check is on simulation. Across 100 simulated cohorts at clinical sample sizes of 20 to 60 subjects, the edge terms should recover the true diseased edges with higher precision-recall area than every baseline. The node terms should recover the simulated drug curve. Performance should degrade gracefully as the drug becomes region-selective, and the degradation point marks the method's scope.
The second check uses EPIStress, which has public data for 20 medicated epilepsy patients. With only four EEG channels, it supports just 12 directed edges against 8 node terms per window, so it is a stress test of identifiability rather than a discovery cohort. There we test whether session-averaged node delays covary with recorded anti-seizure regimen and recording time of day. If the medication-naïve BECTS recordings can be obtained through the original group, the third and central test becomes possible. Edge delays learned from medicated epilepsy patients plus controls should classify medication-naïve BECTS patients without losing accuracy. Their lower-alpha edge pattern should also align with the longer path length that study reported.
The idea is falsified if node terms show no relation to drug exposure, or if the edge terms transfer no better than raw lags. Either outcome would mean drug effects in these data are not predominantly node-local.
References
- High throughput path selection for IEEE 802.11s based wireless mesh networks
- RTGOR: Reliability and Timeliness Guaranteed Opportunistic Routing in wireless sensor networks
- Heart Rate Variability as an Indicator of Autonomic Nervous System Disturbance in Tetanus
- EPIStress: A multimodal dataset of Physiological signals to measure cognitive stress in epilepsy patients
- Aberrant cortical–subcortical-cerebellar connectivity in resting-state fMRI as an imaging marker of schizophrenia and psychosis: a systematic review of data-driven whole-brain functional connectivity analyses
- Electroencephalographic Resting-State Functional Connectivity of Benign Epilepsy with Centrotemporal Spikes
- <tt>DecoR</tt> : deconfounding time series with robust regression
- Adversarial deconfounding autoencoder for learning robust gene expression embeddings
- A Hybrid Machine Learning Method for Fusing fMRI and Genetic Data: Combining both Improves Classification of Schizophrenia