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.
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:
- 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.
- 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.
- 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