Bidirectional sequence models read a recording both forwards and backwards, so each moment is labeled using what came before and what came after. That second pass is why they recognize states defined by what follows them, such as REM sleep, which is clearer once you see the subsequent physiology. It is also why they cannot run live: the backward pass needs data that has not arrived yet. Closed-loop sleep experiments and bedside monitoring need labels within seconds, so practitioners must choose between a causal model that is fast but blind to the future and a bidirectional model that is accurate but delayed.
This note proposes a middle path. Most of the time the future adds nothing, because the forward-only reading and the full bidirectional reading agree. The model should wait for future data only at the few moments where they would disagree. The proposal makes this agreement measurable as a Pearson correlation between the forward-only and the bidirectional stage-probability trajectories. It trains a small causal head to predict that correlation from past data alone, and defers a decision, buffering a few epochs and running a short backward pass, only when predicted agreement is low. The claim is that this yields a better accuracy-versus-latency curve than a fixed lookahead buffer or confidence-based waiting. The gains should come from transitional stages such as N1 and REM onset, where bidirectional context is known to matter.
Core Claim
Pearson correlation is used here as a scale-free, label-free measure of how much the backward pass changes the answer, and it is not part of the model's internals. The forward head and the fused head of a bidirectional network produce probabilities with different calibrations. Correlation ignores those offsets and keeps only whether the two trajectories have the same shape. Because it is continuous and defined at every epoch, it gives dense supervision to the deferral head. The alternative target, whether the two heads' hard labels differ, is binary and rare.
Concretely, let $f_t$ and $g_t$ be the stage-probability vectors at epoch $t$ from a forward-only readout and from the fused bidirectional readout of the same network. Define
$$a_t = \mathrm{PCC}\big(\,[f_{t-W+1},\dots,f_t],\ [g_{t-W+1},\dots,g_t]\,\big),$$
where the brackets concatenate the $K$-class vectors over a window of $W$ epochs, so the correlation is computed over $WK$ entries. A causal head reads the forward state $h_f(t)$ and regresses $a_t$, producing an estimate $\hat a_t$. At inference the system emits the forward label immediately when $\hat a_t > \tau$. Otherwise it waits up to $L$ epochs and runs a backward scan over that bounded buffer before labeling. Sweeping the threshold $\tau$ traces a latency–accuracy curve.
Grounding in Prior Work
Several papers motivate the need for future context. Evaluating the Influence of Temporal Context on Automatic Mouse Sleep Staging shows that a bidirectional recurrent sequence-to-sequence model (L-SeqSleepNet) gains from future context, with REM F1 near 90% at a 28-second context. It also shows that context beyond about 44 seconds plateaus. That plateau is a direct hint that a short bounded lookahead should recover most of the bidirectional benefit, and our maximum buffer $L$ is set from it. FIGI-Net and the view-sequence BiLSTM for 3D shapes make the same point in other domains. In the first, bidirectional passes catch transitional signatures at wave onsets. In the second, removing the backward direction costs 1–2%. Neither study asks where in a sequence the backward pass earns its cost, and this proposal makes that question operational.
Two papers supply technique. PKD shows that matching standardized features is equivalent to maximizing Pearson correlation, and that this removes magnitude mismatch between heterogeneous networks. We borrow that insight to compare a forward head and a fused head whose output scales differ, but we use the correlation as a target to predict rather than a loss to minimize. BLUR gives bidirectional linear recurrent units with parallel scans, which keeps the deferred backward pass over a short buffer cheap. We use it as the second backbone alongside a BiLSTM.
Three other papers occupy the Pearson-plus-sequence intersection, and they differ from this proposal in clear ways. PearNet uses absolute Pearson correlation as graph-attention weights between segments within a 30-second EEG epoch and is evaluated offline. The CEEMDAN-IPCC-BiLSTM PV forecaster uses Pearson correlation offline to group decomposed signal components before a BiLSTM. IPCC-TP predicts correlations between agents' displacements to fill a joint Gaussian covariance. None of them correlates a model's own forward and backward readings, and none addresses streaming. PearNet's persistent N1 weakness (MF1 46.2 on Sleep-EDF-20) constrains the proposal. If transitional stages are the hard case, an adaptive scheme should show its gains there, and we report N1 separately. The perils-of-Pearson study warns that Pearson correlation is sensitive to outliers and skew. We address this by computing $a_t$ over probability vectors, which are bounded, and by testing a rank-correlation variant.
Research Program
We first build a bidirectional sleep stager with two output heads, one reading only the forward state and one reading the fused state, trained jointly with cross-entropy on both. The forward head must be a usable causal classifier on its own. We then compute $a_t$ on training data and train the causal agreement head. Its gradients are stopped into the backbone in the main variant so that classification quality is unaffected, with an unstopped variant as a secondary arm.
The analysis has three parts. Before any streaming experiment, we test whether low $a_t$ actually concentrates at stage transitions and whether it predicts the per-epoch accuracy gain of the fused head over the forward head. If it does not, the premise fails and we stop there. We then evaluate the deferral policy on latency–accuracy curves. Finally, we ablate the choice of agreement signal and the window $W$.
Baselines
The naive reference point is the forward-only head of the same network, which runs with zero latency. Every adaptive method must beat it. The offline full-sequence bidirectional model, trained on identical data, is the accuracy ceiling. For context, L-SeqSleepNet reports 95.3% balanced accuracy on the Kornum mouse cohort and 96.3% on Brown, and PearNet reports 84.9% accuracy and 79.3 macro F1 on Sleep-EDF-20. We found no result on Lacuna for any streaming or bounded-lookahead sleep stager on these benchmarks, so the latency-matched comparisons below are new measurements rather than comparisons against published figures.
The strongest competitor is a fixed-lookahead model that always waits $L$ epochs and runs a bounded backward pass. This is the standard engineering answer, and given the context plateau reported by García Ciudad et al., it may already recover most of the bidirectional gain. It uses the same backbone, trained with the same bounded backward window. A second strong competitor is entropy-based deferral, which waits whenever the forward head's predictive entropy exceeds a threshold. A third baseline isolates our key ingredient: a deferral head with identical architecture trained to predict binary disagreement between forward and fused hard labels, plus a variant trained to regress the divergence (KL) between $f_t$ and $g_t$.
All methods share the backbone checkpoint, the data splits, and the hyperparameter search budget. Each deferral method is tuned on validation data only, and every method uses the same maximum buffer $L$. Beating the competitors means one of two things. Either we achieve higher macro F1 and N1 F1 than fixed lookahead and entropy deferral at matched mean latency, with significance across seeds and subjects. Or we come within one macro-F1 point of the offline ceiling at less than half the mean latency of fixed lookahead.
Why not just…?
Why not just use a short fixed lookahead buffer? This is the most serious threat. If the useful context is only about 28–44 seconds, always waiting one or two epochs may cost little and capture nearly everything. Adaptive deferral is only worth its complexity if most epochs need no future at all, so that it achieves the same accuracy at substantially lower mean latency. The latency–accuracy curves settle this directly. If fixed lookahead dominates or ties at every latency, we will report that the adaptive mechanism is unnecessary for sleep staging.
Why not just defer when the causal model is unsure? Entropy measures the forward head's uncertainty, but a model can be confidently wrong at a transition, for example confidently calling N2 just before REM begins. That error is exactly what the backward pass fixes and what entropy misses. The agreement head is trained on the actual effect of future context. Comparing the two at matched latency, broken down by stage and by distance to the nearest transition, tests whether this distinction matters in practice.
Why not just predict label disagreement directly, or use KL divergence? Hard-label disagreement directly targets what we care about. Its weakness is that it is sparse: forward and fused labels agree on most epochs, so the head sees few positive examples. KL divergence is dense but sensitive to calibration differences between heads. Pearson correlation is dense and ignores those offsets, which is the property PKD exploits. This is a real empirical question rather than a settled one. The ablation with identical heads and three targets decides it, and if label disagreement matches Pearson, the contribution narrows to the deferral scheme itself.
Why not just train a better causal model with more past context? Some stages are defined by what follows them, and past context cannot supply that. The offline-versus-causal gap at matched past context, reported per stage, measures how much of the gap is irreducible without lookahead.
Proposed Experiments
Experiments use Sleep-EDF-20 and Sleep-EDF-78 single-channel Fpz-Cz EEG with subject-wise splits, and the Kornum and Brown mouse EEG/EMG cohorts with cross-cohort transfer as a robustness check, on both a BiLSTM and a bidirectional linear recurrent backbone. Metrics are macro F1, per-stage F1 with emphasis on N1 and REM, balanced accuracy, and mean and 95th-percentile decision latency in epochs. We also report the fraction of epochs deferred, and compute cost per hour of recording.
The first decisive check is diagnostic. On held-out subjects, the true $a_t$ should be lower within two epochs of an annotated stage change than elsewhere, and should correlate negatively with the per-epoch gain of the fused head over the forward head. The second check is the latency-matched comparison against fixed lookahead and entropy deferral described above. The third is the three-target ablation. A secondary sweep over $W$ and $L$ tests whether the optimal buffer matches the 28–44 second plateau seen in mice. If it does, that supports reading the backward pass as a bounded, local correction rather than a need for the whole sequence.
References
- Evaluating the Influence of Temporal Context on Automatic Mouse Sleep Staging through the Application of Human Models
- Fine-grained forecasting of COVID-19 trends at the county level in the United States
- Deeply Exploiting Long-Term View Dependency for 3D Shape Recognition
- PKD: General Distillation Framework for Object Detectors via Pearson Correlation Coefficient
- Bidirectional linear recurrent models for sequence-level multisource fusion
- PearNet: A Pearson Correlation-based Graph Attention Network for Sleep Stage Recognition
- Enhanced Short-Term PV Power Forecasting via a Hybrid Modified CEEMDAN-Jellyfish Search Optimized BiLSTM Model
- IPCC-TP: Utilizing Incremental Pearson Correlation Coefficient for Joint Multi-Agent Trajectory Prediction
- Evaluating the Examiner: The Perils of Pearson Correlation for Validating Text Similarity Metrics