Menu Close

Algorithmic approach

A predictive approach complementary to USP recommendations

The United States Pharmacopeia (USP) provides a pharmaceutical framework for assigning beyond-use dates (BUDs). When preparation-specific stability data are unavailable, conventional limits apply according to the preparation and storage conditions.

These limits are not individualized predictions of the stability of each API–excipient–packaging–storage combination.

Smart Formulation complements this framework by predicting BUDs from:

  • molecular and physicochemical properties of APIs
  • formulation characteristics and excipient composition
  • storage conditions, particularly temperature
  • pharmaceutical packaging
  • published experimental stability data, including sources such as Stabilis

The models are developed in KNIME using supervised learning, notably Tree Ensemble Regression, to capture nonlinear relationships between molecular, formulation and environmental variables.

Objective: provide individualized BUD estimates and support formulation comparison while accounting for safety, compatibility and regulatory requirements.

Predicted BUDs are decision-support outputs. They do not supersede applicable regulatory limits or experimental stability confirmation.

The science behind Smart Formulation

Smart Formulation uses KNIME-based artificial intelligence models to predict BUDs for hospital-compounded and extemporaneous pharmaceutical preparations.

The approach combines API molecular descriptors, excipient characteristics, formulation parameters, packaging and storage conditions. It was developed for solid oral dosage forms (Module I) and subsequently for liquid oral dosage forms (Module II).

Module I – Solid oral dosage forms

Module I predicts BUDs for compounded solid oral dosage forms using an ensemble tree regression algorithm integrating molecular descriptors, formulation composition and storage conditions.

KNIME Machine Learning Workflow Module I
Machine learning workflow – Smart Formulation Module I. The workflow uses Tree Ensemble Regression to predict BUDs of compounded solid oral dosage forms from API molecular descriptors, excipient composition, packaging and storage conditions. Supervised learning captures nonlinear relationships between these variables and experimentally documented stability periods. Adapted from Grigoryan et al., Pharmaceuticals. 2025;18(8):1240.

Module II – Liquid oral dosage forms

Module II extends prediction to oral solutions and suspensions, incorporating API molecular and physicochemical properties, vehicles, excipients, packaging and storage temperature.

The model was developed using the Advanced Molecular Formulation Database (AMF-DB), comprising 536 formulation–condition records for 137 APIs from 180 documentary sources.

Tree Ensemble Regression was implemented in KNIME. Stability information used to construct the target variable was excluded from predictive features to reduce data leakage.

Model evaluation and validation

Predictive performance is evaluated through internal validation and comparison against independent stability data.

Module I – Solid oral dosage forms

Module I: BUD prediction for solid oral dosage forms based on molecular properties, excipients and storage conditions.

Module II – Liquid oral dosage forms

Module II: external evaluation on 230 records representing 101 APIs, including API–vehicle combinations absent from the training data.

Model evaluation and validation

Module II generalization: additional evaluation on 74 records representing 26 APIs absent from training.

For Module II, the overall external evaluation, comprising 230 observations covering 101 active pharmaceutical ingredients (APIs), yielded R² = 0.56, RMSE = 20.1 days and MAE = 13.4 days. In a subgroup of 104 observations involving vehicles more densely represented in the training data, performance reached R² = 0.75, RMSE = 11.29 days and MAE = 7.53 days.

This complementary subgroup analysis highlights the influence of formulation representativeness and training-data density on predictive accuracy; it does not constitute a second independent external validation. Results should be interpreted within the model’s applicability domain, also considering that experimental stability endpoints may be right-censored.

The 26 previously unseen APIs were also used to investigate chemical generalization using molecular fingerprints and Tanimoto similarity.

From prediction to pharmaceutical optimization

Module II goes beyond estimating a BUD: it explores and ranks pharmaceutical vehicles by predicted BUD.

The interactive application ranks 18 multicomponent vehicles and flags factors relevant to patient suitability, including excipients of known effect and osmolality.

This approach allows predicted stability to be considered alongside pharmaceutical constraints and patient characteristics.

Integrated literature search – PubMed

Module II integrates a PubMed literature search linked to the API and selected formulation parameters.

It helps identify relevant publications on formulation, excipients and stability to support interpretation of model predictions.

The pharmacist must assess the relevance and applicability of the retrieved references.

Pharmaceutical PDF report generation

The application generates a downloadable personalized PDF report containing:

  • selected formulation parameters
  • API molecular characteristics
  • predicted BUD and standard deviation
  • pharmaceutical warnings
  • comparative ranking of multicomponent vehicles
  • PubMed bibliographic references

The report facilitates documentation and assessment of formulation simulations during pharmaceutical development.

The Prediction–Optimization–Production (POP) concept

Module II follows the Prediction–Optimization–Production (POP) conceptual framework, connecting stability prediction, formulation optimization and hospital pharmaceutical preparation.

PREDICTION

AI-based BUD estimation

OPTIMIZATION

Formulation comparison and vehicle selection

PRODUCTION

Controlled pharmaceutical development and production

Reference scientific publications

Modules I and II have been described in peer-reviewed scientific publications.

Module I – Solid oral dosage forms

Smart Formulation: AI-Driven Web Platform for Optimization and Stability Prediction of Compounded Pharmaceuticals Using KNIME

Grigoryan A, Helfrich S, Lequeux V, Lapras B, Marchand C, Merienne C, Bruno F, Mazet R, Pirot F.
Pharmaceuticals (Basel). 2025;18(8):1240.
DOI: 10.3390/ph18081240
PMID: 40872628 | PMCID: PMC12389346

Module II – Liquid oral dosage forms

Smart formulation: extending AI-based stability prediction to compounded liquid dosage forms using KNIME

El Mrini L, Lapras B, Lahlou M, Lequeux V, Mallet H, Huet A, Merienne C, Marchand C, Mazet R, Pirot F.
International Journal of Pharmaceutics. 2026 Oct 1; article 127464.
DOI: 10.1016/j.ijpharm.2026.127464
PMID: 42822707

Scientific perspectives

Smart Formulation is an evolving pharmaceutical modeling platform supporting the design and optimization of hospital and extemporaneous preparations.

Modules I and II demonstrate how experimental stability data, machine learning and interactive digital tools can support pharmaceutical decision-making.

Predictions must be interpreted within their applicability domain and experimentally confirmed when necessary.

Access Smart Formulation modules

Note: Smart Formulation interactive modules are experimental pharmaceutical research and decision-support tools. Predictions do not replace stability studies, regulatory requirements or pharmaceutical validation.