TL;DR
When forecasting multivariate time series with Transformers, standard Softmax attention suffers from a quiet bias: some variables hog all the attention while others are largely ignored, and the attention sharpness stays rigid even when the underlying data turns volatile. OTformer swaps Softmax for an Optimal Transport (OT) routing mechanism that dynamically smooths or sharpens attention based on how chaotic (non-stationary) each input sample is. The result is fairer information sharing across variables, stronger forecasting accuracy, and zero need to manually tune routing hyperparameters for every new dataset.
What Problem Does This Paper Address?
Recent time series Transformers (like iTransformer) flipped the classic script: instead of turning time steps into tokens, they treat each variable (e.g., an individual weather sensor or power client) as a single token containing its entire look-back history. Self-attention then figures out how variables influence one another.
However, relying on standard Softmax dot-product attention here creates two subtle headaches:
- Column-sum imbalance: Softmax forces every row of an attention matrix to sum to 1 (every query distributes 100% of its attention), but leaves the columns completely unconstrained. In practice, a few dominant variables become attention "hubs" while quieter, complementary channels get starved of routing mass.
- Rigid sharpness: Real-world time series experience regime shifts and volatility spikes—known as non-stationarity. Stable inputs benefit from sharp, selective matching between variables, whereas volatile inputs need smoother, hedged routing so the model doesn't over-commit to noisy correlations. Softmax uses a fixed sharpness for everything.
Methods
OTformer builds on the standard variate-tokenization backbone (along with optional Reversible Instance Normalization, or RevIN) and introduces three key upgrades:
- Adaptive Sinkhorn Attention (New): Instead of dot-product Softmax, OTformer frames attention as an Optimal Transport problem. It measures the squared Euclidean distance between queries and keys as a transport "cost," then runs $K=3$ fast Sinkhorn iterations to find an optimal transport plan. Because Sinkhorn balances both rows and columns toward 1, no variable gets ignored.
- NonStationarityScorer (New): Because standard instance normalization erases clues about distribution shifts, OTformer inspects the raw, pre-normalized input first. It chops the window into four segments, calculates three lightweight statistics (mean drift, variance drift, and lag-1 autocorrelation decay), and passes them through a tiny MLP to output a sample-wise non-stationarity score $s_b \in (0, 1)$. This score dynamically adjusts the Sinkhorn entropy regularization $\varepsilon_b$: chaotic samples get a larger $\varepsilon_b$ (smoother, safer routing), while stable samples get a smaller $\varepsilon_b$ (sharper routing).
- Shared Phase Embedding & MLP Head (Refinement): Before entering the encoder, tokens receive a shared embedding indicating where the sample sits in a recurring cycle (like hour-of-day), followed by a 3-layer residual MLP projection head for final predictions.
Datasets
No new datasets are introduced. The authors evaluate OTformer across eight standard multivariate benchmarks:
- ETT (ETTh1, ETTh2, ETTm1, ETTm2): Electricity transformer temperatures at hourly and 15-minute intervals.
- Weather: 21 meteorological indicators logged every 10 minutes.
- ECL (Electricity): Power consumption across 321 clients.
- Traffic: Road occupancy rates from 862 San Francisco sensors.
- Solar-Energy: Solar power output from 137 plants in Alabama.
All experiments use a look-back window of 96 steps to predict four horizons: 96, 192, 336, and 720 steps.
Key Insights and Ideas
- Near-balance beats perfection: Through strictly matched control experiments, the authors show that simply forcing column normalization on standard Softmax already captures most of the accuracy gains! The magic isn't in achieving mathematically exact "double stochasticity" via Optimal Transport—it's simply about curing column-sum starvation so all variables participate.
- Adaptation is a tuning-killer, not a ceiling-raiser: Surprisingly, sample-wise adaptive $\varepsilon$ performs almost identically (within 0.08% MSE on ECL) to a fixed $\varepsilon$ carefully tuned on validation data. The "aha" here is practical: adaptive scoring saves engineers from running expensive per-dataset hyperparameter searches while automatically landing on the sweet spot. (And the score truly matters—deliberately flipping the score-to-$\varepsilon$ mapping spikes ECL error by 10.4%.)
- Topology dictates utility: When transplanted onto another popular backbone (PatchTST), adaptive OT routing slashes MSE by 8.79% on 321-variable ECL, but does nothing on 7-variable ETTh1. Similarly, gains narrow on Traffic, where sparse physical road topology matters more than dense, balanced variable mixing.
Key Results
Across 32 forecasting settings (8 datasets $\times$ 4 horizons), OTformer outperforms its direct iTransformer backbone on the vast majority of metrics and ranks first on 11 out of 16 dataset-metric pairs against recent baselines like DUET, Leddam, and SOFTS.
- Big wins on volatile data: OTformer reduces average MSE over iTransformer by 4.4% on ECL (0.178 $\rightarrow$ 0.171) and 12.5% on Solar-Energy (0.236 $\rightarrow$ 0.207).
- Noise resilience: Under synthetic Gaussian input noise on ETTh1, OTformer's error degrades noticeably slower than iTransformer's, suggesting balanced routing prevents brittle over-reliance on a few noisy channels.
- Computational trade-offs: Training time per batch (15.99 ms vs. 15.69 ms) and GPU memory (145.4 MB vs. 151.4 MB) match iTransformer, though the Sinkhorn loop roughly doubles inference latency (3.17 ms vs. 1.47 ms on ETTh1).
Limitations and Future Work
- Hand-crafted statistics: The NonStationarityScorer relies on three simple, manually chosen metrics; learning richer end-to-end distributional descriptors could capture subtler regime shifts.
- Inference latency: Sinkhorn iterations add moderate inference overhead, which may matter in ultra-low-latency deployments.
- Not a universal silver bullet: Transport routing helps most when cross-variate competition is high (like ECL), offering diminishing returns on low-dimensional data or sparse sensor networks (like Traffic).
- Scope of testing: Evaluations used a fixed look-back length ($L=96$), and noise robustness was only tested on a single dataset under Gaussian noise, leaving longer contexts and wilder distribution shifts for future exploration.
Summary updated