AI forecasting can cut blind spots in medicine supply chains


COE-EDP, VisionRICOE-EDP, VisionRI | Updated: 21-05-2026 14:10 IST | Created: 21-05-2026 14:10 IST
AI forecasting can cut blind spots in medicine supply chains
Representative image. Credit: ChatGPT
  • Country:
  • Turkey

Researchers have developed a hybrid machine learning model that they claim can improve pharmaceutical demand forecasting in markets where regulation, seasonal illness, procurement delays and sudden health events make medicine demand difficult to predict.

The research tested a combined Support Vector Regression and Deep Neural Network model on real ERP-based demand data from a national pharmaceutical distributor in Türkiye, covering 10 critical medicines over a 24-month period. The authors argue that pharmaceutical forecasting needs models that can separate regular demand from irregular disruption. Their answer is a two-stage residual learning framework that uses one model to estimate the baseline and another to correct what the first model misses.

The study, titled Hybrid machine learning forecasting for resilient and sustainable pharmaceutical supply chains under regulatory and seasonal disruption, was published in Frontiers in Artificial Intelligence.

Hybrid model separates baseline demand from disruption shocks

The proposed model combines Support Vector Regression, or SVR, with a Deep Neural Network, or DNN. Instead of simply blending two models, the framework assigns each model a specific role.

The SVR component estimates the main demand pattern. It is used to capture the relatively stable baseline of medicine demand across time. After that, the DNN component is trained on the residual errors, meaning the remaining variation left unexplained by the SVR forecast. This second stage is designed to learn nonlinear demand movements linked to disruptions, such as flu waves, holiday effects and policy-sensitive changes.

Pharmaceutical demand contains both predictable and unstable elements. A chronic medicine may show steady use, while an over-the-counter flu medicine may spike in winter. A procurement cycle can create bulk orders. A public health warning can trigger sudden regional demand. A pricing or reimbursement decision can alter ordering behavior. Treating all of these movements as one signal can weaken forecasting accuracy.

The study used monthly demand data from January 2022 to December 2023 for 10 high-turnover pharmaceutical products, including antibiotics, painkillers, antihistamines and cold or flu medicines. After filtering and lag construction, the final supervised learning dataset included 210 usable observations. The model used lagged demand values from one to three months, along with calendar month, public holiday and flu-season indicators.

The researchers tested the model through a strict temporal holdout design. Data from January 2022 to July 2023 were used for training, while August to December 2023 formed the out-of-sample test period. This design avoided future data leakage and reflected real forecasting conditions, where planners must predict demand using only information available at the time.

The hybrid model was compared not only with standalone SVR and DNN models, but also with ARIMA, Prophet, Random Forest, XGBoost and LSTM. That broader benchmark was important because these models represent major forecasting families, including statistical, additive time-series, tree-based and deep learning approaches.

The hybrid model delivered the strongest performance across the benchmark group. It recorded the lowest forecasting errors and the highest explanatory performance. Its mean absolute error reached 23.8, its mean squared error reached 972.4, its mean absolute percentage error was 7.8 percent, and its R² value was 0.935. The DNN was the closest competitor, followed by LSTM and XGBoost, while ARIMA and SVR performed much worse under disrupted demand conditions.

Compared with standalone SVR, the hybrid model reduced mean squared error by 77.6 percent and mean absolute error by 53.5 percent. Compared with standalone DNN, it reduced mean squared error by 14.5 percent and mean absolute error by 13.1 percent. The researchers also used paired t-tests and Diebold-Mariano tests to support the finding that the hybrid model’s gains were statistically meaningful rather than random.

Explainable AI gives planners clearer reasons behind forecasts

The study also uses SHAP analysis, an explainable AI method, to show which factors contributed most to demand variation. This matters in pharmaceutical logistics because planners, inventory managers, hospital administrators and regulators often need to understand why a model is forecasting higher or lower demand.

The SHAP analysis identified lagged demand, flu-season indicators, public holidays and calendar month as major predictors. Demand from the previous month was especially important, while flu-season effects were influential for products such as antipyretics and antibiotics. Public holidays and seasonal variables also helped explain short-term demand movements.

This interpretability is important for regulated pharmaceutical supply chains. A model that produces accurate but unexplained forecasts may be difficult to trust in operational settings. Decision-makers may need to justify procurement changes, safety stock levels or emergency ordering. In public health contexts, opaque model outputs can be hard to defend.

The authors frame SHAP as a way to connect forecast results with operational reasoning. If the model predicts a spike in demand, planners can see whether the signal is being driven by recent demand, seasonal illness, holidays or other contextual features. This can help supply teams distinguish between routine demand increases and potential warning signs.

The research also evaluated uncertainty. The hybrid model produced the narrowest residual-based 95 percent prediction interval among the main models, indicating lower forecast uncertainty. This is important because pharmaceutical inventory decisions depend not only on the expected demand number, but also on the risk around it. Narrower uncertainty bands can support better safety stock planning and reduce the risk of overstocking or shortages.

The model also performed well across different product types. It was tested in detail on seasonal, chronic and promotion-sensitive medicines. For seasonal products, it tracked peaks better than SVR. For chronic medicines, it maintained stable forecasts. For products affected by promotional or allergy-driven volatility, it handled sudden changes better than standalone models.

Additional sensitivity tests found that a three-month lag structure gave the best performance, while deeper lag structures risked overfitting. Robustness testing with artificial noise showed that the DNN and hybrid models were more resilient than SVR when input data became imperfect. This is relevant because real pharmaceutical data can contain reporting delays, manual errors, missing updates and irregular pharmacy records.

A compact walk-forward validation check was also conducted on two representative products. The results remained close to the original holdout performance, suggesting that the hybrid model’s gains were not dependent on a single train-test split.

Better forecasts could reduce stockouts, waste and emergency procurement

Pharmaceutical distributors in regulated markets must balance service continuity, inventory cost, product shelf life and compliance. Forecasting errors can force emergency procurement, increase storage costs, waste medicines through expiry or leave patients without timely access.

The hybrid SVR-DNN model could help planners detect upcoming demand shifts earlier and adjust procurement schedules before shortages develop. By incorporating flu-season and holiday indicators, the model can better anticipate demand changes around predictable public health and calendar events. By learning residual disruption patterns, it can also respond to irregular changes that a baseline model would miss.

For Türkiye, pharmaceutical distribution is shaped by centralized bureaucracy, fixed pricing policies, reimbursement controls and region-specific procurement behavior. These factors can create local imbalances and delayed responses. A more accurate forecasting system could help distributors align inventory with actual regional consumption patterns.

The research also connects forecasting accuracy with sustainability. Better demand prediction can reduce unnecessary overproduction, excess storage and medicine waste. In healthcare supply chains, sustainability is not only environmental. It also includes resilience, access and the ability to maintain service during disruption.

The model could also support ERP dashboards and supply chain management systems. Since the study used ERP-based demand data, the framework is positioned as a tool that can be integrated into operational planning rather than remaining a laboratory model. Its explainability may also make it more acceptable to audit teams and regulatory stakeholders.

The findings come with important limits including that the dataset covers only 24 months and 10 products from one national distributor in Türkiye, making the findings highly relevant to the tested context, but not automatically generalizable to other markets, distributors or regulatory environments. The authors also note that longer datasets would be needed to study concept drift, including changes in policy, macroeconomic conditions, prescribing behavior or disease patterns.

The study also did not conduct full cross-SKU validation across all products. Its walk-forward robustness check was limited to two representative products. Broader testing across more medicines, longer time horizons, hospital systems, pharmacy networks and public procurement organizations would be needed before the model could be treated as widely validated.

Future research could test more advanced architectures, including LSTM, GRU and transformer-based models, especially for longer forecast horizons. Additional work could also integrate real-time inventory levels, shipping data, e-prescription information and regional epidemiological signals. Such data could help models adapt faster as demand conditions change.

  • FIRST PUBLISHED IN:
  • Devdiscourse
Give Feedback