PAS: A Novel Attention-Enhanced Particle Swarm Optimization Model for Demand Forecasting in Cross-Border E-Commerce
Demand forecasting is crucial for optimizing cross-border e-commerce operations, yet traditional methods often struggle to capture complex input–output relationships and nonlinear patterns. This paper proposes an enhanced model, Particle Swarm Optimization with Attention and Strategy (PAS), to address the low search accuracy and slow convergence of conventional PSO. An optimal-point set strategy is introduced to improve population initialization and global search efficiency, enabling more effective global and local exploration. Moreover, an improved Transformer model is adapted for demand forecasting by separately modeling input and output features and fusing them through the decoder, allowing the model to better capture complex relationships between e-commerce variables. A multi-stage search and learning mechanism is further designed, in which PSO first explores the global demand space, followed by localized learning using attention mechanisms. This staged process accelerates convergence and reduces the risk of falling into local optima. Furthermore, we also conducted comparative experiments on the proposed PSO algorithm with two classical optimization algorithms, including the genetic algorithm (GA) and simulated annealing (SA), to demonstrate the rationality of the proposed method. Evaluation on real-world datasets shows that the proposed model markedly surpasses conventional approaches, achieving an average MAPE of 8.7%, which is 23% lower than the Transformer model and 30% lower than the LSTM model. This has certain significance for the reliability and stability of demand forecasting in e-commerce.
Authors
- Chenke Xu (ORCID: https://orcid.org/0000-0003-2676-0430)
- Jinshun Cai
Institutions
- Zhejiang International Studies University (CN)
- Zhejiang Sci-Tech University (CN)
- Hangzhou Wanxiang Polytechnic (CN)
Publication Details
- Journal
- Applied Sciences
- Published
- 2026-03-31
- DOI
- https://doi.org/10.3390/app16073386
- Primary Topic
- E-commerce and Technology Innovations
- Type
- article
- Field-Weighted Citation Impact
- 0.00