AI-Based Pharmaceutical Demand Forecasting for Sustainable Production: A Hybrid BiLSTM–Transformer Approach to Prevent Overproduction
Mares-Carreño Jesús, Arce-Gil Diego-Iván, López-Grijalba Yunuén, Cruz-Castro Juan, Abarca-Jiménez Griselda Stephany, Vega-Blanco Manuel Vladimir, Francisco Gutiérrez-Galicia
Key points
From the paper's conclusion- The findings suggest that hybrid AI-based forecasting may support production planning and inventory management decisions, provided that model selection accounts for product-specific characteristics and forecasting horizons.
Abstract
Accurate pharmaceutical demand forecasting is essential to align production with actual market needs, reduce overproduction, prevent stockouts, and improve resource efficiency. This study develops a hybrid bidirectional long short-term memory (BiLSTM)–Transformer model to support sustainable pharmaceutical production through data-driven demand forecasting. We trained the model on real monthly sales and inventory data from a nationwide pharmaceutical company in Mexico, along with epidemiological, climatic, demographic, and economic variables. The study analyzed thirteen sodium naproxen and oseltamivir phosphate pharmaceutical products over forecasting horizons of 3, 6, and 12 months. We evaluated robust scaling and logarithmic transformation during preprocessing and compared the Adam, RMSprop, Nadam, and SGD optimizers. Nadam generally produced the lowest forecasting errors, especially at short- and medium-term horizons. Six of the thirteen evaluated pharmaceutical products achieved cumulative percentage errors below 10% at the three-month forecasting horizon. Compared with the Seasonal Naïve baseline, the proposed model achieved lower cumulative forecasting errors for 11 of 13 products at the 3-month horizon and 9 of 13 products at both the 6- and 12-month horizons, although the baseline performed better for certain products. Performance became more heterogeneous over longer horizons and for products with irregular or highly volatile demand, revealing important limitations for operational use. The findings suggest that hybrid AI-based forecasting may support production planning and inventory management decisions, provided that model selection accounts for product-specific characteristics and forecasting horizons. However, potential benefits related to reduced overproduction, excess inventory, product expiration, and environmental impacts remain prospective applications rather than outcomes directly demonstrated in this study.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Smarter Chains, Safer Medicines: From Predictive Failures to Algorithmic Fixes in Global Pharmaceutical LogisticsForecasting · 2025
- Adaptive forecasting of antiretroviral therapy demand using machine learning in India's national HIV programmemedRxiv · 2026
- An analytics-driven hybrid method for multi-item demand forecasting in supply chainsSupply Chain Analytics · 2026
- AdaptLSTM: Efficient Adaptive Online Learning for Cloud Workload Forecasting under Distribution DriftarXiv · 2026
- Forecasting laboratory measurements from longitudinal electronic health recordsmedRxiv · 2026
- Exformer: A Transformer-Based Forecasting Framework with Temporal Knowledge Assistance for Multistep Multivariate Influent Prediction in Wastewater Treatment PlantsACS ES&T Water · 2026