Introduction
Predicting retail sales is a cornerstone of effective supply chain management. However, the COVID-19 pandemic introduced unprecedented volatility that rendered traditional forecasting models, such as ARIMA and even standard Transformer architectures, largely ineffective. These models typically rely on temporal consistency, which is disrupted during lockdowns and sudden shifts in consumer behavior. This paper introduces the Pandemic-Compatible Attentive Network (PCAN), a deep learning framework specifically engineered to handle the extreme fluctuations and complex covariates characteristic of global crises.
Methodology
PCAN utilizes a multi-stage architecture designed to "rectify" forecasts based on environmental severity. The architecture addresses two primary challenges: irregular fluctuations caused by external shocks and the entanglement of disparate data types (e.g., infection rates vs. business promotions).
Core Components
- Group Embedding & Series Augmentation: To handle heterogeneous data, the model uses a Group Embedding layer for product attributes and store locations. Input series are augmented with rolling averages and lag values to provide richer temporal context.
- Fluctuation Attention Module (FAM): This module identifies anomalies by calculating the Association Discrepancy (KL divergence) between expected local patterns and actual global series behavior. This allows the model to detect "black swan" events rather than treating them as noise.
- Parallel Attention Streams: To prevent feature entanglement, PCAN decouples data into two streams: the Pandemic Attention Stream (PAS), which focuses on infection metrics, and the Business Attention Stream (BAS), which handles traditional factors like holidays and promotions.
- Rectification Decoder: The final forecast is adjusted by learned "rectification coefficients" ($R_{coef}$) derived from the FAM. These act as scaling factors that dampen or amplify predictions based on the detected level of environmental chaos.
Experimental Evaluation
The model was evaluated using real-world retail data from 898 offline stores in Shanghai, provided by the SF Express international supply chain system. The dataset spans from September 2019 to May 2022 and includes diverse product categories: Coffee Beans (raw materials), Croissants (perishables), and Hot/Cold Cups (consumables).
PCAN was benchmarked against a wide array of baselines, including statistical models (Prophet), RNNs (MQ-RNN), and state-of-the-art Transformers (FEDformer, Informer, InParformer).
Results and Discussion
As shown in the performance comparison below, PCAN consistently achieved the highest accuracy and lowest error rates across all tested product categories.
Key findings include:
- Superior Accuracy: PCAN demonstrated an improvement of over 2% in Accuracy (ACC) and a reduction of over 9% in Root Mean Square Error (RMSE) compared to the best-performing baselines.
- Resilience to Extreme Events: During the April 2022 Shanghai lockdown, PCAN maintained an accuracy of over 80% for consumables, while traditional online learning models like LightGBM struggled to reach 70% and often predicted trends inverse to reality.
- Practical Utility: The model has been successfully deployed within the SF Express system to serve a world-leading food retailer, proving its viability for real-world industrial applications.
Conclusion
PCAN demonstrates that treating anomalies as informative features rather than noise is critical for forecasting in volatile environments. By decoupling pandemic and business features into parallel streams and applying a learned rectification factor, the model achieves superior resilience. Future research will focus on the model's generalizability to non-essential luxury goods and its application to other systemic shocks, such as natural disasters or economic crashes.
Summary updated