A Multitask Learning framework for E‐commerce time series analytics: Operational risk, demand forecasting, and anomaly detection - Junzhong He; Xiaorui An (PLoS ONE, 2026)
The study presents MT-PyraRisk, a multi-task learning framework that integrates pyramidal attention mechanisms for cross-border e-commerce risk prediction. The model processes multimodal time-series data through a shared feature extraction layer and task-specific prediction modules, supporting both regression tasks, such as operational risk and demand forecasting, and classification tasks, such as anomaly detection. Experiments were conducted on the Global E-commerce Dataset and the Kaggle Network Traffic Dataset using a sliding-window time-series setting, with the data divided into training, validation, and testing sets at a ratio of 70%, 15%, and 15%, respectively. The model was evaluated using MSE and MAE for regression tasks and Precision, Recall, and F1-score for classification and anomaly detection tasks. Compared with the strong baseline Timesformer, MT-PyraRisk reduced MSE by approximately 4.3% and improved F1-score and Recall by approximately 1.1% and 2.3%, respectively, on the Global E-commerce Dataset. On the Kaggle Network Traffic Dataset, MT-PyraRisk reduced MSE by approximately 5.1% and improved F1-score, Precision, and Recall by approximately 3.3%, 2.2%, and 4.5%, respectively. Ablation results further demonstrate the contribution of the pyramidal attention mechanism, task-specific prediction layers, and joint optimization module, as removing these components led to clear performance degradation. These results indicate that MT-PyraRisk can provide an effective multi-task modeling solution for operational risk forecasting, demand prediction, and anomaly detection in cross-border e-commerce risk management.