A Transformer-Augmented TCN for Modeling Complex Patterns in Retail Sales Data
Bibliographic record
Abstract
Today's fast-changing economy makes retail highly competitive. To stay profitable and relevant, retailers need to predict customer demand accurately. Reliable sales predictions enable retailers to manage inventory efficiently, adapt swiftly to market dynamics, and maximize revenues. While traditional statistical models such as SARIMA offer reasonable forecasts, they often struggle to capture complex patterns driven by promotional events or seasonal variability. To address these limitations, prior research has commonly employed hybrid architectures like TCN-LSTM. In this work, we propose a novel hybrid neural network architecture that augments Temporal Convolutional Networks (TCNs) with Transformer encoder blocks. The TCN layer is adept at capturing short-term dependencies like weekly sales fluctuations, while the Transformer module excels in modeling long-range relationships and global trends in time series forecasting. We evaluate the proposed TCN-Transformer model against strong baselines, including TCN-LSTM, TST, and SARIMA, to assess its forecasting effectiveness. We collaborated with Instacart and analyzed delivery order data from one of their partner retailers, which includes more than 9 million anonymized orders collected over a two-year period. This large-scale, real-world dataset enabled rigorous testing of model performance under diverse market conditions. To ensure robust results, all experiments were repeated seven times, and the reported metrics represent the average across these independent runs. Our experiments demonstrate that the proposed TCN-Transformer architecture achieves superior forecasting accuracy for a 7-day forecast horizon. Evaluated on real-world retail data throughout 2024, the TCN-Transformer model outperformed all baselines in 11 out of 12 months. The yearly Mean Absolute Percentage Error (MAPE) for the TCNTransformer was 9.94 %, compared to 11.41 % for TCN-LSTM, 13.40 % for TST, and 12.91 % for SARIMA. These results position the proposed TCN-Transformer architecture as a highly effective solution for real-world retail sales forecasting.
Fetched live from OpenAlex and de-inverted. Abstracts are not stored in this database: the inverted indexes are 8.6 GB of the frame’s 9.3 GB of text, and the host has 13 GB free.
How this classification was reachedexpand
Full frame distilled prediction
Teacher imitationNot calibrated prevalence, not ground truth. Human validation pending. Learned from the 10,348 direct Codex labels and 10,348 direct Gemma labels. Candidate is the union of thresholded teacher heads; consensus is their intersection. These outputs are machine_predicted_unvalidated and are not human labels or direct frontier model labels.
Codex and Gemma teacher scores by category
| Category | Codex | Gemma |
|---|---|---|
| Metaresearch | 0.003 | 0.001 |
| Meta-epidemiology (narrow) | 0.000 | 0.000 |
| Meta-epidemiology (broad) | 0.001 | 0.000 |
| Bibliometrics | 0.001 | 0.002 |
| Science and technology studies | 0.000 | 0.000 |
| Scholarly communication | 0.000 | 0.000 |
| Open science | 0.003 | 0.000 |
| Research integrity | 0.000 | 0.000 |
| Insufficient payload (model declined to judge) | 0.001 | 0.000 |
Machine scores (provisional)
The two teacher heads of the student model, read on this work. A score orders the frame for review; it never asserts a category, and the validation status ships verbatim with every row.
Baseline scores from an immature model (maturity gate not passed, 7 training rounds). Scores rank; they never assert a category.
score_only:v0-immature-baseline · verbatim from the scoring run: score_only means the number may rank works, and no category label ships from itClassification
machine, unvalidatedMachine predicted; a candidate call from one teacher head, not a consensus.
How this classification was reached, model by model and score by score, is at the end of the page under "How this classification was reached".