Choosing Label Alignment and Lookback Inside the Same Causal Split

When a person labels a signal, the label usually lags what it describes. A muscle fires before the joint moves. An annotator presses a key after hearing the onset. A listener reports an emotion seconds after the music shifts. Practitioners handle this in three separate places. They realign labels to the signal offline, they tune how much history the model sees (its "lookback window"), and they choose how to split data into train and test. This proposal argues that these three choices are one coupled decision. If the label lag is $\delta$, a causal decoder must look back at least $\delta$ further to find the evidence for its target. The best window length therefore moves with the lag. And if labels are realigned using the same signal the decoder reads, then scoring the decoder against those realigned labels is partly circular.

We will build and test a single evaluation protocol. Alignment, lookback length, and model selection are all chosen inside one forward-in-time ("walk-forward") validation loop. Performance is scored against a timing reference that is independent of the decoder's input. On the surface-electromyography (sEMG) datasets, that reference is glove-measured joint kinematics. On the event-detection tasks, it is synthetic jitter applied to clean labels. Using this protocol, we ask two questions that existing work cannot answer. Does label lag shift the optimal lookback in the predicted way? And how much of the reported benefit of dynamic, per-trial realignment survives once a jointly tuned constant shift is the comparison and the score no longer depends on the signal itself?

Core Claim

We make two falsifiable predictions.

The first concerns window length. Scaling Law for Time Series Forecasting shows that loss as a function of lookback is U-shaped. Longer history reduces irreducible uncertainty but increases estimation error, and this holds across linear, MLP, convolutional and Transformer forecasters. Its analysis assumes perfectly aligned targets. Suppose instead that a label at time $t$ reflects the signal around $t-\delta$, with a per-trial jitter of standard deviation $\sigma$ around that lag. Then the informative part of a causal window sits $\delta$ steps in the past. This gives a simple prediction:

$$ L^*(\delta,\sigma) \approx L^*_0 + \delta + c\,\sigma, $$

The terms are defined as follows:

  • $L^*_0$ is the optimal lookback with aligned labels.
  • $c$ is a dataset-dependent constant.
  • The $\delta$ term comes from the window needing to reach the delayed evidence.
  • The $\sigma$ term comes from needing extra margin to cover lag variability.

Because each extra step adds input dimension, the minimum loss at $L^*$ should also rise with $\delta$. A model that "absorbs" the lag by looking further back pays an estimation-error cost, and it becomes sluggish. That sluggishness is the failure mode Wearable high-density EMG sleeve for complex hand gesture classification and continuous joint angle estimation reports for decoders trained on unaligned cues.

The second concerns realignment. Dynamic realignment methods search the signal near each label to find the "true" onset. Examples are the minimum-residuals cue sweep of that paper, the likelihood-ratio relabeling in Electromyography data for non-invasive naturally-controlled robotic hand prostheses, and the bidirectional pseudo-apex search in Gaussian-Based Instance-Adaptive Intensity Modeling for Point-Supervised Facial Expression Spotting. Applied to training data alone, this search is legitimate offline preprocessing.

Two misuses can inflate results:

  • Signal-derived test labels. If the same procedure also produces the test labels, then latency and accuracy are measured against targets derived from the decoder's own input.
  • Leaky alignment settings. If the search radius or shift is tuned on a random split, it can encode session-level information that a deployed system would not have.

We predict that the gap between dynamic realignment and a constant shift tuned jointly with $L$ shrinks under the protocol. We do not claim the gap will vanish, and either outcome is informative.

The novelty lies in the coupling. Existing work optimizes lookback with clean labels Scaling Law for Time Series Forecasting, or corrects misalignment without a chronological or leakage-controlled evaluation Learning Precise Temporal Point Event Detection with Misaligned Labels. The work that does take delay seriously studies whole-sample label delays of days, or of discrete steps, in tabular and image streams. That is the scope of On the Impact of Industrial Delays when Mitigating Distribution Drifts: An Empirical Study on Real-World Financial Systems and Label Delay in Online Continual Learning. That delay is about when a label arrives, not where inside a continuous signal it points. Neither line varies lookback length.

Research Program

The program has four parts.

The protocol. The outer loop is a walk-forward split over the natural order of recordings. For the EMG data, this means repetitions within a session and then sessions within a subject, so late-session fatigue lands in test. At each train/test boundary, we drop a guard band at least as wide as the realignment search radius. This mirrors the ten-year buffer that Temporal Convolutional Networks for the Advance Prediction of ENSO uses against oceanic memory, here sized to the alignment procedure's look-ahead.

Inside each training fold, a nested walk-forward split selects three things jointly:

  • the lookback $L$;
  • the alignment method and its parameters (constant shift value, or dynamic search radius);
  • the model's ordinary hyperparameters.

All normalization statistics are computed per fold from training data only. This follows the warning in Set Functions for Time Series that global scaling leaks future statistics. Decoders are strictly causal.

Independent scoring. On Ninapro and the HD-EMG sleeve data, timing is scored against movement onset detected from the synchronized CyberGlove joint angles. That signal is physically measured and is never an input to the EMG decoder, so it is independent of realignment applied to EMG. Continuous joint-angle regression has no human reaction delay in its target, so it serves as a clean comparison condition. On smoking-puff and piano-onset detection Learning Precise Temporal Point Event Detection with Misaligned Labels, we take the provided labels as reference. We inject controlled lag $\delta$ and jitter $\sigma$ into training labels only. Test labels stay at the reference.

The lag-versus-window study. Across the grid of injected $(\delta,\sigma)$ values and the native EMG cue lag, we trace loss against $L$. The test is whether the minimum shifts as the equation predicts and whether the minimum loss rises with $\delta$. To check that this is not specific to one architecture, we use the same four architecture families as the scaling-law study.

The accounting study. We score each alignment method four ways:

  • under random trial splits, scored against signal-derived labels (the conventional setup);
  • under the protocol, still scored against signal-derived labels;
  • under random trial splits, scored against the independent reference;
  • under the full protocol, scored against the independent reference.

This factorial isolates how much of a reported gain comes from the split and how much from circular scoring.

Baselines

Naive reference. The do-nothing baseline trains on raw prompt-cue labels, with a fixed default window and no alignment. It is evaluated under the full protocol. It anchors how much any intervention helps in honest conditions.

Jointly tuned constant shift. This applies one global offset, selected together with $L$ in the nested walk-forward loop. It is the approach Learning Adaptive Game Soundtrack Control uses when it advances features by 250 to 500 ms. It is the strongest cheap competitor because the window-shift prediction above implies that a single offset plus the right $L$ captures the mean lag exactly. Only lag variability is left for dynamic methods to exploit.

Dynamic realignment. This is the strongest existing method on the EMG question: the minimum-residuals cue sweep of Wearable high-density EMG sleeve for complex hand gesture classification and continuous joint angle estimation. That paper reports decoder latency of about 61 ms with dynamic cue shifting versus over 120 ms with static cues, 97.3% accuracy on 37 sequential gestures, and joint-angle $R^2$ of 0.884. The GLR relabeling in Electromyography data for non-invasive naturally-controlled robotic hand prostheses is a second dynamic method. On Ninapro, it is associated with 75.32% intact-subject and about 46% amputee classification accuracy.

These reported numbers come from their own evaluation setups, which are not our protocol. We therefore re-run both dynamic methods ourselves. They get the same data, causal decoder, compute, and the same number of nested-validation trials as the constant-shift baseline.

Misalignment-robust loss. For point events, the strongest competitor is $L_{SoftLoc}$ from Learning Precise Temporal Point Event Detection with Misaligned Labels. It smooths both labels and predictions and adds an event-counting constraint. It reports F1 79.0 versus 25.8 for cross-entropy on smoking puffs at jitter $\sigma=4$. For noisy state labels, the strongest competitor is the forward temporal loss of Learning under Temporal Label Noise. It reports 4.2% test error on moving under mixed noise, versus 14.9% for static noise-robust baselines and 29.4% when ignoring noise.

Ablations. The ablation that isolates our key ingredient keeps every method fixed and changes only one thing: whether $L$ is tuned jointly with alignment or held at the default.

What counts as success. The protocol succeeds if two conditions hold. The joint selection must change method rankings relative to conventional evaluation. And its chosen configuration must beat each re-run baseline on independent-reference onset latency and F1 by more than the fold-to-fold spread.

Why not just…?

Why not just shift labels by a constant offset and tune the window? This is the most serious threat. Our own window-shift prediction says it should recover most of the benefit when the lag is stable. Rather than argue around it, we make it the central baseline. The evidence for dynamic methods is the gap from over 120 ms to about 61 ms in Wearable high-density EMG sleeve for complex hand gesture classification and continuous joint angle estimation. But that comparison used static cues with a fixed 100 ms bin, not a shift tuned jointly with $L$. It is also not described as scored against an independent kinematic reference. If the jointly tuned constant shift matches dynamic realignment under the full protocol, that is a headline result, not a failure. If dynamic realignment still wins, the win should concentrate in late, fatigued repetitions, where lag drifts.

Why not just use a robust loss and skip alignment? $L_{SoftLoc}$ already tolerates heavy jitter. However, its smoothing kernel width effectively plays the same role as a window, and it was evaluated on static splits. We include it in the same nested loop, crossed with $L$ and with or without constant shift. If it alone matches the best configuration at every $(\delta,\sigma)$, we conclude that robust losses make explicit alignment unnecessary. A large mean lag $\delta$ is where we expect it to fall short: symmetric smoothing tolerates spread, but it cannot by itself move evidence that sits outside the window.

Why not just make the window as long as memory allows? A long window would reach the delayed evidence automatically. Scaling Law for Time Series Forecasting shows that estimation error grows with length, and that the optimal window shrinks for wider models. Context Saturation in Zero-Shot Time-Series Foundation Models reports degradation at maximum context. Our lag-versus-window curves test this directly: the long-window arm should show higher minimum loss and longer onset latency than shifted short windows.

Why not just use random trial splits, since alignment leakage at one boundary is tiny? That leakage may indeed be small, because a search radius of a few hundred milliseconds is small compared with a fold. The factorial accounting study measures it rather than assuming it. Random splits are known to inflate results elsewhere: Aeolus: A Multi-structural Flight Delay Dataset reports an average AUC inflation of 0.057. Our concern, though, is less the boundary than the circular scoring and the tuning of alignment parameters across sessions. If both effects come out negligible, we will report that the conventional EMG evaluation is sound.

Proposed Experiments

The EMG experiments use Ninapro DB1 to DB3, with DB3 amputees evaluated on kinematic reference only where glove data exist. They also use the HD-EMG sleeve data if it is released; we cannot confirm its availability from the material we have.

Primary metrics:

  • onset latency and onset-timing error against glove-derived onsets;
  • gesture accuracy;
  • joint-angle $R^2$ and median absolute error, reported per walk-forward fold to expose drift.

Point-event experiments. These use smoking-puff and piano-onset detection with injected training-label lag $\delta$ and jitter $\sigma$, scored by tolerance-window F1. On moving from Learning under Temporal Label Noise, we inject lag to test whether the window effect extends to state labels.

Out of scope. Shi et al. report no per-dataset loss values on Lacuna, so we do not compare to their numbers. We only replicate the U-shape on ETTh1 with aligned targets, as a sanity anchor for our training code.

Decisive checks. Three outcomes would decide the questions:

  1. Whether the empirical $L^*$ tracks $L^*_0+\delta$ across the injected-lag grid, which supports or refutes the window-shift prediction.
  2. Whether, under the full protocol, dynamic realignment beats the jointly tuned constant shift on kinematic-reference latency by more than the fold spread. This tells us whether per-trial alignment earns its complexity.
  3. How large the inflation from circular scoring is compared with the inflation from random splitting in the factorial study. This tells us where evaluation effort in this field should go.