Skip to main content
QUICK REVIEW

[Paper Review] From Known to Unknown: Knowledge-guided Transformer for Time-Series Sales Forecasting in Alibaba

Xinyuan Qi, Kai Hou|arXiv (Cornell University)|Sep 17, 2021
Time Series Analysis and ForecastingComputer Science23 references7 citations
TL;DR

This paper proposes Aliformer, a knowledge-guided Transformer model that enhances time-series sales forecasting in e-commerce by integrating known future information—such as upcoming promotions—into the prediction process. By using a bidirectional attention mechanism with a knowledge-guided branch and future-emphasized training, Aliformer outperforms state-of-the-art methods on public and industrial datasets, achieving significant accuracy gains in forecasting sales during promotional events.

ABSTRACT

Time series forecasting (TSF) is fundamentally required in many real-world applications, such as electricity consumption planning and sales forecasting. In e-commerce, accurate time-series sales forecasting (TSSF) can significantly increase economic benefits. TSSF in e-commerce aims to predict future sales of millions of products. The trend and seasonality of products vary a lot, and the promotion activity heavily influences sales. Besides the above difficulties, we can know some future knowledge in advance except for the historical statistics. Such future knowledge may reflect the influence of the future promotion activity on current sales and help achieve better accuracy. However, most existing TSF methods only predict the future based on historical information. In this work, we make up for the omissions of future knowledge. Except for introducing future knowledge for prediction, we propose Aliformer based on the bidirectional Transformer, which can utilize the historical information, current factor, and future knowledge to predict future sales. Specifically, we design a knowledge-guided self-attention layer that uses known knowledge's consistency to guide the transmission of timing information. And the future-emphasized training strategy is proposed to make the model focus more on the utilization of future knowledge. Extensive experiments on four public benchmark datasets and one proposed large-scale industrial dataset from Tmall demonstrate that Aliformer can perform much better than state-of-the-art TSF methods. Aliformer has been deployed for goods selection on Tmall Industry Tablework, and the dataset will be released upon approval.

Motivation & Objective

  • To address the limitation of existing time-series forecasting models that ignore known future information, such as planned promotions, which heavily influence sales patterns.
  • To develop a forecasting model that leverages both historical data and future knowledge to improve prediction accuracy in e-commerce sales forecasting.
  • To design a self-attention mechanism that guides temporal information flow using the consistency of known future knowledge, reducing noise from masked future tokens.
  • To validate the model's effectiveness on both public benchmarks and a large-scale industrial dataset from Tmall, demonstrating real-world deployment potential.

Proposed method

  • Introduces Aliformer, a bidirectional Transformer-based model that incorporates known future knowledge into the encoder input, breaking the strict causality constraint of traditional models.
  • Designs a knowledge-guided self-attention layer that uses known future information to guide attention computation, minimizing the impact of noise from masked future tokens.
  • Employs a trainable masked token embedding to represent unknown future values, which is jointly optimized with knowledge embeddings to preserve sequence integrity.
  • Applies a future-emphasized training strategy that increases the model's focus on utilizing future knowledge during optimization, improving generalization to future-dependent patterns.
  • Uses a multi-modal input representation combining sparse (product and platform features) and dense (statistical and performance metrics) features to enrich input context.
  • Implements a two-branch attention mechanism: one standard self-attention and one knowledge-guided branch that refines attention maps using known future consistency.

Experimental results

Research questions

  • RQ1Can integrating known future information such as planned promotions improve time-series sales forecasting accuracy in e-commerce?
  • RQ2How can a Transformer-based model effectively utilize future knowledge without violating the fundamental principles of sequence modeling?
  • RQ3What architectural modifications are necessary to guide attention mechanisms using known future knowledge while minimizing noise from masked future tokens?
  • RQ4Does a future-emphasized training strategy enhance the model’s ability to leverage future knowledge in long-term forecasting?
  • RQ5How does Aliformer compare to state-of-the-art models in handling sudden sales spikes during promotional events?

Key findings

  • Aliformer achieves state-of-the-art performance on four public benchmark datasets and a large-scale industrial dataset from Tmall, significantly outperforming existing methods in forecasting accuracy.
  • On the Tmall Sales (TMS) dataset, Aliformer reduces the Mean Absolute Percentage Error (sMAPE) by up to 15% compared to the best baseline, demonstrating superior generalization on real-world sales patterns.
  • The model effectively captures sudden sales bursts during promotional events, such as price drops or live-stream campaigns, which traditional models fail to predict due to their reliance on historical-only data.
  • The knowledge-guided self-attention mechanism reduces attention map noise from masked future tokens, improving the model’s robustness and predictive fidelity.
  • The future-emphasized training strategy leads to better utilization of future knowledge, particularly in long-horizon forecasting, where error accumulation is common in autoregressive models.
  • Aliformer has been successfully deployed in Tmall’s Industry Tablework for goods selection, confirming its industrial viability and scalability.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.