Beyond Isolation: Neighbor-Consistent Data Pruning for Multivariate Time Series Forecasting

Zi Yang, Jona Otholt, Weixing Wang, Haojin Yang, Guillermo GallegoNeurIPS 2026

TL;DR

Data pruning speeds up deep learning by tossing out unhelpful training samples, and most algorithms decide what to toss by looking at each sample's training loss in isolation. That works fine for independent images, but in time-series forecasting—where consecutive sliding-window samples share over 99% of their data—clean neighbors naturally move in lockstep during training. By comparing each sample’s loss trajectory to its neighbors' instead of judging it alone, TWIN spots genuinely corrupted data, cutting retraining time nearly in half while actually improving forecasting accuracy.

What Problem Does This Paper Address?

If you want to train a deep learning model faster without sacrificing performance, data pruning is a great tool: score your training samples, drop the bad or redundant ones, and train on the rest. However, almost all popular pruning scores (like EL2N or forgetting events) were born in computer vision, where every image is assumed to be independent and identically distributed (i.i.d.). They judge each sample completely on its own.

Multivariate time-series forecasting (MTSF) breaks that i.i.d. assumption wide open. Standard MTSF training slices a long time series into overlapping windows using a stride of 1 time step. If your look-back window and prediction horizon each span 96 steps (total size 192), then Sample $i$ and Sample $i+1$ share 191 out of 192 data points.

When you judge time-series samples in isolation, a clean sample riding a complex, hard-to-predict wave will have a high loss and get wrongfully pruned. Meanwhile, a sample sitting on an easy, flat trend that happens to contain a single corrupted sensor spike might still have a relatively low overall loss and sneak through. Standard pruners miss the most obvious clue in the room: how a sample behaves relative to the overlapping neighbors right next to it.

Figure 1: An example showcasing the limitations of pruning decisions based only on per-sample loss trajectories. The first row shows the time-series samples themselves: one is clean but follows a complex pattern, whereas the other follows a simple pattern but contains a contaminated point. Judging the two loss curves in isolation against a loss threshold results in wrongfully pruning the clean sample and keeping the contaminated one (middle row). However, by taking into account the loss trajectories of nearby samples (bottom row), we see that the second sample stands out from its neighbors, and the first one does not, allowing TWIN to make correct pruning decisions.

Methods

The authors introduce TWIN (Trajectory-Wise Inconsistency with Neighbors), the first sample-level pruner built specifically around sliding-window overlap. Here is how it works:

  1. Record & Sort Trajectories: As a forecaster trains across epochs, TWIN records the loss of every sample at each epoch. Instead of comparing raw epoch-by-epoch curves (which can jitter due to random mini-batch ordering or warm-up schedules), TWIN sorts each sample's loss history from lowest to highest. Measuring the Euclidean distance between these sorted vectors gives the exact 1D Wasserstein-2 ($\mathcal{W}_2$) distance between their empirical loss distributions.
  2. Multi-Scale Neighbor Comparison: A single corrupted spike in a time series doesn't just ruin one sample; it sits inside $W+H$ consecutive sliding windows, creating a wide "contamination plateau" of inflated losses. Comparing immediate neighbors (offset $d=1$) catches the sudden cliff at the edges of this plateau, where one window has the spike and the next doesn't. To catch samples stuck in the middle of the plateau (which look consistent with their equally corrupted immediate neighbors), TWIN also compares against wider offsets—up to $d = W+H$, guaranteeing a clean neighbor outside the plateau.
  3. Rank and Prune: TWIN sums these step-normalized discrepancies across four offsets ($1, \frac{W+H}{4}, \frac{W+H}{2}, W+H$). You then drop the highest-scoring outliers—either via a fixed budget (e.g., top 20%) or automatically using Tukey’s interquartile-range (IQR) fences—and retrain from scratch on the clean remainder. Because neighboring windows still hold 191 of the 192 time steps, tossing a corrupted window removes the poison while losing almost none of the underlying signal.

Datasets

The authors evaluate TWIN across two settings:

  • Standard Real-World Benchmarks (8 datasets): Weather, Electricity, Solar, Exchange, and the four ETT datasets (ETTh1, ETTh2, ETTm1, ETTm2), tested across four prediction horizons ($96, 192, 336, 720$).
  • Synthetic Audit Grid: A newly constructed 7-channel sinusoidal benchmark with known ground-truth anomalies (Bernoulli spikes, block drops, amplitude bursts, and Gaussian noise blocks across 20 severity levels), used to train 16,200 models to verify TWIN's theoretical math.

Key Insights and Ideas

  • An Asymptotic Mathematical Gap: The authors prove two neat bounds: clean neighboring windows have a trajectory discrepancy bounded by $\mathcal{O}(\delta)$ (where $\delta$ is the natural step-to-step smoothness of the clean series), whereas a sample carrying a spike of size $\Delta$ diverges from a clean reference by at least $\Omega(\Delta^2)$. Whenever spikes are much larger than normal step changes ($\Delta \gg \delta$), corrupted samples blow up quadratically, separating themselves cleanly without needing any manual threshold tuning.
  • Sorting Absorbs Training Noise: Ablation studies show that swapping unsorted $L_2$ distance for Wasserstein-2 distance (which simply sorts the loss trajectories first) yields a statistically significant accuracy boost. Sorting strips away benign phase shifts caused by mini-batch shuffling while preserving structural anomalies.
  • Cheap Proxy Models Do the Heavy Lifting: You don't need a massive Transformer to find bad data. TWIN scores computed using a tiny linear model (DLinear) trained for just 20% of its normal epochs transfer seamlessly to heavy backbones like iTransformer and PatchTST.

Key Results

  • Theory Confirmed: Across 16,000 synthetic models, clean pairs violated the theoretical upper bound 0% of the time, contaminated pairs scaled with an average log-log slope of 1.99 (matching the predicted $\Delta^2$ order of 2), and the median separation between clean and contaminated scores was 44.23$\times$.
  • Better Accuracy, Less Time: Evaluated on iTransformer against nine baselines across eight benchmarks, TWIN achieved the best MSE and fastest retraining at every pruning rate. Under automatic IQR self-calibration, TWIN reduced average Relative MSE by 1.46% below the unpruned baseline while cutting retraining time down to 58.41%.
  • Backbone Generalization: TWIN consistently beat top baselines across diverse architectures—including PatchTST, DLinear, and MambaTS—and transferred scores from a 20%-epoch DLinear run to iTransformer and PatchTST within 0.13% Relative MSE of native full-model scoring.

Limitations and Future Work

  • Pre-Memorization Requirement: TWIN’s math relies on the model not memorizing the corrupted spikes. If an over-parameterized network trains long enough to fit anomalies to zero loss, the discrepancy vanishes. Fortunately, standard regularization (dropout, early stopping) and short 20%-epoch proxy runs naturally keep models in this pre-memorization sweet spot.
  • Offline Only: TWIN currently requires an initial pass over a static dataset to build the loss matrix before pruning. Adapting the multi-scale Wasserstein score to update incrementally in streaming or continual-learning pipelines is left for future work.

Summary updated

Abstract

Data pruning for multivariate time-series forecasting (MTSF) is an emerging topic that poses unique challenges due to the intricate temporal dependencies within and between training samples. The dominant data pruning scores have been designed for i.i.d. image classification tasks and rate each data sample using its own training trajectory in isolation. However, this misses a structural property of MTSF training: samples (obtained by windowing time series) can easily overlap, especially if strides down to 1 time step are used, thus breaking the standard training i.i.d. assumption. Indeed, our key observation is that this overlap drives neighbors' loss trajectories into lockstep across training. The few samples whose trajectories deviate from this lockstep are inconsistent with their overlapping neighbors, typically because they contain contaminated points, and are the ones worth pruning away. Hence, we propose TWIN (Trajectory-Wise Inconsistency with Neighbors), a multi-scale Wasserstein-2 score and pruning algorithm that is, to our knowledge, the first to compare each sample's sorted training-loss trajectory against those of its sliding-window neighbors. Specifically, our design is motivated by two complementary bounds: the pairwise discrepancy between neighboring loss trajectories is at most $\mathcal{O}(\delta)$ when both samples are clean, where $\delta$ bounds the one-step change of the clean series (Theorem 1), but at least $\Omega(\Delta^2)$ once one carries a contamination spike of magnitude $\Delta$ (Theorem 2). Whenever $\Delta \gg \delta$, these scaling orders separate, exposing an asymptotic scaling-order gap that TWIN's rank-based rule reads. A synthetic audit of $16{,}000$ trained models empirically confirms this gap, with a median $44.23\times$ separation between clean and contaminated populations. We further evaluate TWIN's effectiveness on eight MTSF benchmarks, four horizons, and five seeds against nine baseline methods, showing that it shortens the average retraining time to about $58\%$ of the unpruned baseline and reduces the average Relative MSE by up to $1.46\%$ under IQR self-calibration, the best results among all evaluated methods. Moreover, the score transfers across backbones: computed from a short run of a lightweight linear model, it also applies to heavier backbones.
BibTeX
@inproceedings{yang2026beyond,
  author = {Zi Yang and Jona Otholt and Weixing Wang and Haojin Yang and Guillermo Gallego},
  title = {{Beyond Isolation: Neighbor-Consistent Data Pruning for Multivariate Time Series Forecasting}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=B5ACjqvQ2x},
}
Figure