Infomaxformer: Maximum Entropy Transformer for Long Time-Series Forecasting Problem

Peiwang Tang, Xianchao Zhang · DOI

TL;DR

Infomaxformer is a novel Transformer variant designed to solve the "quadratic bottleneck" in long-term time-series forecasting. By leveraging the Maximum Entropy Principle to select the most informative attention pairs and a "distilling" method to reduce feature redundancy, it achieves linear time and memory complexity ($O(L)$) while outperforming current state-of-the-art models like Autoformer and Informer.

What Problem Does This Paper Address?

Predicting the future over long horizons (Long Time-Series Forecasting or LTFP) is critical for everything from power grid management to financial planning. While the Transformer architecture is the gold standard for capturing long-range dependencies, it has a fatal flaw for long sequences: quadratic complexity.

As the input sequence length ($L$) grows, the time and memory required to calculate the self-attention matrix grow by $L^2$. For a sequence of several thousand steps, a standard Transformer will quickly run out of GPU memory. Previous attempts to fix this, such as Informer’s "ProbSparse" attention, often rely on random sampling to reduce calculations, which can accidentally discard critical data points. Furthermore, time-series data often contains "entangled" patterns—where seasonal cycles and long-term trends are mashed together—making it difficult for a vanilla Transformer to extract clean signals.

Methods

The authors introduce three primary innovations to transform the vanilla architecture into the Infomaxformer:

  1. Maximum Entropy Self-attention (MEA): Instead of calculating every possible relationship between time steps or picking them at random, the authors turn to information theory. Based on the Maximum Entropy Principle, they argue that the most "informative" queries in the attention mechanism are those with the highest entropy (uncertainty). They use a simple variance-based approximation to identify these "Top-u" queries, focusing the model's computational budget only on the most critical temporal relationships.
  2. Keys/Values Distilling: Time-series data is often locally redundant (neighboring points are very similar). The authors propose a three-step process using 2D convolutions and max-pooling to "distill" the Key ($K$) and Value ($V$) matrices. This sharply trims the time dimension of the feature map, significantly reducing the number of dot-product operations needed without losing the "dominant" features of the sequence.
  3. Integrated Seasonal-Trend Decomposition: Building on concepts from models like Autoformer, Infomaxformer explicitly separates the input into "Trend" and "Seasonal" components using moving averages. The encoder focuses on the seasonal parts, while the decoder reconstructs the final prediction by combining the predicted seasonal signal with an approximated trend.
  4. Stacking Embeddings: Rather than simply adding scalar values, positions, and timestamps together (the standard approach), they stack these features and use a 2D convolution to fuse them, which the authors claim captures more nuanced feature interactions.

Datasets

The model was evaluated on five large-scale, real-world benchmarks commonly used in the field:

  • ETT (Electricity Transformer Temperature): Three subsets (ETTh1, ETTh2, ETTm1) reflecting two years of power grid data.
  • ECL (Electricity Consuming Load): Hourly consumption data for 321 customers.
  • Weather: Local climatological data from nearly 1,600 locations across the U.S.

Key Insights and Ideas

  • Entropy as a Filter: The "aha moment" here is that the attention matrix in a trained Transformer is naturally sparse. By using entropy (via variance) as a selection metric, the model can mathematically justify which parts of the sequence to ignore, rather than guessing.
  • Linear Scaling: By combining MEA with the Distilling operation, the authors successfully brought the complexity down to $O(L)$. This allows the model to accept much longer input windows than previous models without hitting memory limits.
  • Redundancy is an Opportunity: The paper highlights that the high redundancy in time-series data isn't just a nuisance—it’s a property that can be exploited via pooling/distilling to make the model more efficient.

Key Results

  • Superior Accuracy: Infomaxformer consistently achieved lower Mean Square Error (MSE) and Mean Absolute Error (MAE) across all five datasets compared to Informer, Autoformer, and Reformer.
  • Memory Efficiency: In head-to-head tests, Infomaxformer could handle larger batch sizes and longer sequences where other models (like Autoformer) suffered from Out-of-Memory (OOM) errors.
  • Robustness to Input Length: Unlike some models that degrade when given too much historical data (due to noise), Infomaxformer showed stable or improving performance as the input window increased from 336 to 1440 steps.

Limitations and Future Work

  • Short-Sequence Trade-offs: The authors noted that for very short sequence predictions (e.g., a look-ahead of only 96 steps), their decomposition method was slightly inferior to the "Series Decomposition Block" used in Autoformer.
  • Sparsity vs. Global Context: While MEA is efficient, the inherent sparsity of the attention mechanism means it might still struggle with extremely subtle, non-dominant global dependencies that don't manifest as high-variance queries.
  • Future Directions: The authors suggest exploring even longer temporal dependencies and further refining the network components to handle the noise that often accompanies very long input sequences.

Summary updated

Abstract

The Transformer architecture yields state-of-the-art results in many tasks such as natural language processing (NLP) and computer vision (CV), since the ability to efficiently capture the precise long-range dependency coupling between input sequences. With this advanced capability, however, the quadratic time complexity and high memory usage prevents the Transformer from dealing with long time-series forecasting problem (LTFP). To address these difficulties: (i) we revisit the learned attention patterns of the vanilla self-attention, redesigned the calculation method of self-attention based the Maximum Entropy Principle. (ii) we propose a new method to sparse the self-attention, which can prevent the loss of more important self-attention scores due to random sampling.(iii) We propose Keys/Values Distilling method motivated that a large amount of feature in the original self-attention map is redundant, which can further reduce the time and spatial complexity and make it possible to input longer time-series. Finally, we propose a method that combines the encoder-decoder architecture with seasonal-trend decomposition, i.e., using the encoder-decoder architecture to capture more specific seasonal parts. A large number of experiments on several large-scale datasets show that our Infomaxformer is obviously superior to the existing methods. We expect this to open up a new solution for Transformer to solve LTFP, and exploring the ability of the Transformer architecture to capture much longer temporal dependencies.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
ETTh1 · ETTh_1InfomaxformerMSE0.544-0.2 vs baselineTime Series Forecasting · input-length=720 · prediction-length=336
Source quote
L242: \multirow{2}{*}{Infomaxformer} │ MSE │ 0.567 │ 0.556 │ 0.544 │ 0.566 │ 0.568 │ 0.624 │ 0.537 │ 0.583 │ 0.597 │ 0.599 │ 0.709
ETTh1 · ETTh_1InfomaxformerMSE0.624-0.12 vs baselineTime Series Forecasting · input-length=1440 · prediction-length=336
Source quote
L242: \multirow{2}{*}{Infomaxformer} │ MSE │ 0.567 │ 0.556 │ 0.544 │ 0.566 │ 0.568 │ 0.624 │ 0.537 │ 0.583 │ 0.597 │ 0.599 │ 0.709
Reported baseline / comparator measurements (2)
BenchmarkMethodMetricScoreProtocol / Evidence
ETTh1 · ETTh_1Autoformer baselineMSE0.748Time Series Forecasting · batch-size=16 · input-length=720 · prediction-length=336
Source quote
L239: \multirow{2}{*}{Autoformer} │ MSE │ 0.581 │ 0.560 │ 0.748 │ \multirow{2}{*}{-} │ \multirow{2}{*}{-} │ \multirow{2}{*}{-} │ 0.573 │ \multirow{2}{*}{-} │ \multirow{2}{*}{-} │ \multirow{2}{*}{-} │ \multirow{2}{*}{-}
ETTh1 · ETTh_1Autoformer baselineMAE0.650Time Series Forecasting · batch-size=16 · input-length=720 · prediction-length=336
Source quote
L240: MAE │ 0.547 │ 0.547 │ 0.650 │ 0.558
BibTeX
@misc{tang2023infomaxformer,
  author = {Peiwang Tang and Xianchao Zhang},
  title = {{Infomaxformer: Maximum Entropy Transformer for Long Time-Series Forecasting Problem}},
  year = {2023},
  eprint = {2301.01772},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2301.01772},
}
Figure