Keywords

1 Introduction

In pharmaceutical research tasks a large number of experiments taking into account several factors and their combinations are required. Special experiment plans can be very useful, which are based on combinatorial configurations. Applying special plans (e.g., using a second-order Latin cube), the problem can be solved using fewer experiments [4, 6]. In this case, the experimental material obtained will meet all requirements. Tasks of this type are typical for a large number of research areas. This is the search for new drugs, fertilizers, feed, construction materials, alloys, lubricating oils, and many other mixtures. Experiment planning and analysis are an important branch of statistical methods, which are designed to detect and verify causal relationships between input variables (factors) and output (responses).

The objective of this work is to offer an approach of application of ML in the problem of design of pharmaceutical technology of tablets, which basically consists of choosing qualitative and quantitative content of the corresponding excipients (auxiliary substances), enabling us necessary values of pharmaceutical and technological characteristics.

“Tablets may be defined as the solid unit dosage form of medicament or medicaments with or without suitable excipients and prepared either by molding or by compression. It includes a mixture of active substances and excipients, usually in powder form, pressed or compacted from a powder into a solid dose. The excipients can include diluents, binders or granulating agents, glidants (flow aids) and lubricants to ensure efficient tableting; disintegrants to promote tablet break-up in the digestive tract; sweeteners or flavors to enhance taste; and pigments to make the tablets visually attractive or aid in visual identification of an unknown tablet” [2].

Currently, there are two main methods of producing tablets. They are the direct compression of substances and granulation.

The method of direct compression has several advantages. It allows you to achieve high productivity, significantly reduce the time of the technological cycle by eliminating a number of operations and stages, eliminate the use of several equipment items, reduce production areas, and reduce energy and labor costs. The direct compression makes it possible to obtain tablets from moisture, thermolabile and incompatible substances. Nowadays, however, less than 20% of tablets are obtained by this method. It follows from the fact that the majority of medicinal substances do not possess the properties providing their direct compression. These properties include the isodiametric shape of crystals, good flowability (fluidity) and compressibility, low adhesiveness to the compression tool of the tablet machine.

Granulation is directed enlargement of particles, i.e. it is the process of turning a powdered material into grains of a certain size. Granulation is necessary to improve the flowability of the tableting mass, which occurs as a result of a significant decrease in the total surface of the particles when they stick together into granules and, therefore, a corresponding reduction in friction that occurs between these particles during movement. The stratification of a multi-component powder mixture usually occurs due to the difference in particle sizes and the specific gravity values of the medicinal and auxiliary components included in its composition. This separation is possible with various kinds of vibrations of the tablet machine or its funnel. The stratification of the tableted mass is a dangerous and unacceptable process, in some cases causing an almost complete separation of the component with the highest specific gravity from the mixture and violation of its dosage. Granulation prevents this danger since particles of various sizes and specific densities stick together in its process. The resulting granulate, subject to the equality of the sizes of the resulting granules, acquires a fairly constant bulk density. The strength of the granules also plays an important role, i.e., strong granules are less prone to abrasion and have better flowability.

The currently existing methods of granulation are divided into the following main types: dry granulation; wet granulation or extrusion granulation; structural granulation.

2 General Scheme of Design of Tablet Technology with the Help of ML

The general scheme of ML is based on the application of neural networks. Namely, if there is only one hidden layer and only one output unit, then the set of all implemented neural networks with N hidden units is

$$ \mathcal {R}_n^{(N)}(\psi )=\left\{ h(x):\mathbb {R}^n\rightarrow \mathbb {R}|h(x)=\sum _{j=1}^N{\beta _j (w_j^\top x- \theta _j)} \right\} , $$

where \(\psi \) is the common activation function of the hidden units and \(^\top \) denotes transpose, output units are always assumed to be linear [7].

Assume we consider some active pharmaceutical ingredient (API or medicament) PFootnote 1.

Stage 1. Choice of Technology and Qualitative Content. In general case, we start tablet design from investigating the possibility of application of the direct compression. For this purpose we consider some excipients (auxiliary substances), including filler A, acidity regulator B, disintegrant C, binder D and stabilizer E. We note that from viewpoint of ML we have the following categorical variables and their values corresponding to certain excipients

$$ A\in \{a_1, a_2,\dots ,a_{n_A} \}, \quad B\in \{b_1, b_2,\dots ,b_{n_B} \},\quad C\in \{c_1, c_2,\dots ,c_{n_C} \}, $$
$$ D\in \{d_1, d_2,\dots ,d_{n_D} \},\quad E\in \{e_1, e_2,\dots ,e_{n_B}\}. $$

Here \(n_A\), \(n_B\), \(n_C\), \(n_D\), \(n_E\in \mathbb {N}\) are the quantities of different fillers, acidity regulators, disintegrants, binders and stabilizers, respectively, which are considered in the tablet design.

When developing ML model we consider the tuples of input variables in the following binary form

$$ \{a_1, a_2,\dots ,a_{n_A}, b_1, b_2,\dots ,b_{n_B}, c_1, c_2,\dots ,c_{n_C}, d_1, d_2,\dots ,d_{n_D}, e_1, e_2,\dots ,e_{n_B}\}\in \mathbb {B}^n, $$

where \(n=n_A+n_B+n_C+n_D+n_E\), \(\mathbb {B}^n=\left\{ (b_1,b_2,\dots ,b_n)|b_i\in \{ 0,1 \}, i=\overline{1,n} \right\} \). Each tuple of input variables \(\mathcal {E}_i\), \(i=\overline{1,p}\) (\(p\in \mathbb {N}\) is the number of experiments) corresponds to the certain experiment implying the application of corresponding excipients.

As a rule after mixing active ingredient with excipients, we get a powder with some properties with respect to compression. If the powder (as a tablet mass) can be compressed we produce tablets through direct compression, otherwise, we apply granulation at first.

In any case we should investigate the pharmaceutical and technological indices of granules (in case of granulation) \(y_i\in \mathbb {R}\), \(i=\overline{1,6}\) (see Table 1), tablet mass \(y_i\in \mathbb {R}\), \(i=\overline{7,12}\) (see Table 2) and tablets \(y_i\in \mathbb {R}\), \(i=\overline{13,15}\) (see Table 3), which are considered as output variables in ML algorithms.

For example, in case of compressible tablet mass we consider \(y_i\), \(i=\overline{7,12}\) as outputs, in case of preliminary application of granulation we need \(y_i\), \(i=\overline{1,6}\) and then we observe \(y_i\), \(i=\overline{7,12}\). Finally, we get tablets, which are characterised by the variables \(y_i\in \mathbb {R}\), \(i=\overline{13,15}\).

After fulfilling p experiments, which are described by the binary matrix of input variables \(\mathcal {E}\in \mathbb {B}^{p\times n}\) and real-valued matrix of output variables \(Y=(y_i^j)\in \mathbb {R}^{p\times 15}\), we construct 15 neural networks \(h_i\in \mathcal {R}_n^{(N)}\), \(i=\overline{1,16}\) corresponding pharmaceutical and technological indices \(y_i\), \(i=\overline{1,15}\).

Table 1. Output variables for granulate
Table 2. Output variables for tablet mass
Table 3. Output variables for tablets

Stage 2. Quantitative Optimization. After selecting excipients ensuring some acceptable values of output variables for tablets \(y_i\), \(i=\overline{13,15}\) there appears the problem of optimization of some objective variable \(y_{i^*}\), \(i^*\in \overline{13,15}\). Namely, let us assume we have selected some values \(a_{i^*}\), \(b_{j^*}\), \(c_{k^*}\), \(d_{l^*}\), \(e_{m^*}\), \(i^*\in \overline{1,n_A}\), \(j^*\in \overline{1,n_B}\), \(k^*\in \overline{1,n_C}\), \(l^*\in \overline{1,n_D}\), \(m^*\in \overline{1,n_E}\), characterizing excipients. The goal is to search the quantities of excipients enabling us the optimalFootnote 2 value of an index \(y_r\), \(r\in \overline{13,15}\).

We offer the following approach. We consider five levels for each of the excipients \(a_{i^*}\), \(b_{j^*}\), \(c_{k^*}\), \(d_{l^*}\), \(e_{m^*}\), determining the corresponding concentrations. We denote them as

$$ l_1^{a_{i^*}},l_2^{a_{i^*}},\dots , l_5^{a_{i^*}}, l_1^{b_{i^*}},l_2^{b_{i^*}},\dots , l_5^{b_{i^*}}, l_1^{c_{i^*}},l_2^{c_{i^*}},\dots , l_5^{c_{i^*}}, $$
$$ l_1^{d_{i^*}},l_2^{d_{i^*}},\dots , l_5^{d_{i^*}}, l_1^{e_{i^*}},l_2^{e_{i^*}},\dots , l_5^{e_{i^*}}, $$

The choice of values for levels of concentrations depends on concrete substances and is a sort of art.

When developing ML model we consider the tuples of input variables in the following binary form

$$ \{ l_1^{a_{i^*}},l_2^{a_{i^*}},\dots , l_5^{a_{i^*}}, l_1^{b_{i^*}},l_2^{b_{i^*}},\dots , l_5^{b_{i^*}}, l_1^{c_{i^*}},l_2^{c_{i^*}},\dots , l_5^{c_{i^*}}, $$
$$ l_1^{d_{i^*}},l_2^{d_{i^*}},\dots , l_5^{d_{i^*}}, l_1^{e_{i^*}},l_2^{e_{i^*}},\dots , l_5^{e_{i^*}}\} \in \mathbb {B}^{25} $$

Each tuple of input variables \(\mathcal {E}'_i,i=\overline{1,p'}\) (\(p'\in \mathbb {N}\) is the number of experiments) corresponds to the certain experiment implying application of excipients \(a_{i^*}\), \(b_{j^*}\), \(c_{k^*}\), \(d_{l^*}\), \(e_{m^*}\) at given levels of concentrations. \(y_r\) is considered as output variable in ML algorithm.

After fulfilling \(p_r\) experiments, which are described by the binary matrix of input variables \(\mathcal {E}_r \in \mathbb {B}^{p_r\times 25}\) and vector of output variables \(Y_r= (y_{jr})\in \mathbb {R}^{p_r}\), we construct neural network \(h_r\in \mathcal {R}_{25}^{(N)}\), corresponding pharmaceutical (or technological) index \(y_r\).

At last, we apply the optimization algorithm (e.g., genetic algorithm) for the objective function given by neural network \(h_r\). As a result we get some optimal solution

$$ \{ l_{j^*}^{a_{i^*}}, l_{j^*}^{b_{i^*}}, l_{j^*}^{c_{i^*}}, l_{j^*}^{d_{i^*}}, l_{j^*}^{e_{i^*}}\} \in \mathbb {B}^{5} $$

resulting to the optimal value of \(y_r\)Footnote 3.

3 Application for Tablets of Acetyl Salicylic Acid with Atorvastatin

In the following example, we demonstrate the application of the general scheme presented above for the design of tablets based on atorvastatin.

The release of active ingredient and poor flowability of the tablet mass requires optimization. Therefore, the decision is made to combine atorvastatin with poor flowability with a solution in granules, which improves flowability.

In the literature, atorvastatin calcium is described as an unstable substance and many approaches are proposed for obtaining a stable pharmaceutical form of atorvastatin. If necessary, the problem can be solved by obtaining atorvastatin calcium only in crystalline form (see WO 97/3958 and WO 97/3959) [3] and only in amorphous form (see WO 97/3960, WO 01/42209 and P-9900271) [8, 10], respectively, before entering it into a formulation requiring an additional operation in which 5–10% of the substance is lost. Therefore, 10.36 mg of atorvastatin calcium powder per tablet should be used for the obtaining of 10 mg of atorvastatin to the dosage form.

The solubility of various forms of atorvastatin calcium and, accordingly, its solubility can also be solved at the drug level by adding to the formulation a basic or buffering agent (see WO 00/35425 (D2), WO 94/16693 (D1 (WL8))) [9], which increases the bioavailability of atorvastatin by increasing its solubility and dissolution rate in aqueous solutions. To obtain a stabilized amorphous substance, a combination of methods described in WO 01/42209, P-9900271 and WO 01/42209 can be used. An additional argument in favor of this solution is the fact that atorvastatin calcium is an expensive substance.

The researchers found that the solubility of atorvastatin calcium in aqueous solutions is significantly improved with pH values equal to pKa+1 or higher. At the same time, the difference between the solubility of atorvastatin calcium in the crystalline and amorphous form becomes insignificant. The value of pKa of the final carboxyl group of atorvastatin is 4.5. To increase the pH of the aqueous solution to the desired range of values, the pharmaceutical formulation may contain a substance B adjusting the pH of 0.2–2.0 mmol, preferably 0.4–1.2 mmol. Accordingly, the best adjusting substances are metal oxides, inorganic or organic bases, salts of organic or inorganic acids and alkaline earth metals, in particular, magnesium oxide, alkaline phosphate buffers, in particular, sodium phosphate and hydrophosphate, and organic amines, in particular, tris (hydroxymethyl) methylamine.

Mills and co-authors of U.S. Patent No. 5686104 state that the pharmaceutical composition may contain an inorganic base of calcium, magnesium, aluminum, or lithium salt. Examples of such salts include calcium carbonate, calcium hydroxide, magnesium carbonate, magnesium hydroxide, magnesium silicate, magnesium aluminate, aluminum hydroxide or lithium hydroxide [N 5686104]. In addition, U.S. Patent No. US20040247673 states that since adding alkaline earth metal salts can affect the bioavailability of atorvastatin, this is necessary to ensure that it is added to atorvastatin when wet granulation of the composition (see US20040247673). Among buffering agents, WO 00/35425 describes sodium or potassium citrate, sodium phosphate, sodium sulfate, sodium carbonate or magnesium, sodium ascorbinate, sodium benzoate, sodium carbonate or potassium bicarbonate, lauryl sulfate, or a mixture of such buffers (see WO 00/35425).

To enhance the disintegration of granules you can add a leavening agent C. US20040247673 states that some disintegrators may be harmful to atorvastatin stability, for example, croscarmellose sodium (see US20040247673).

WOO 1/76566 describes a stabilized pharmaceutical composition of atorvastatin calcium and an effective stabilizing amount of an amido group or an amino group comprising a polymeric compound from the group consisting of polyvinylpyrrolidone, crosslinked polyvinylpyrrolidone, copolymers of vinylpyrrolidone and vinyl acetate and polynocycline (see WOO 1/76566).

The binders D may be selected from the group consisting of starch, gelatin, dextrin, maltodextrin, natural and synthetic gums such as Arabic gum, alginic acid, sodium alginate, guar gum, Irish moss extract, ghatti gum, husks mucus, carboxymethyl cellulose, methyl cellulose, hydroxyethyl cellulose, hydroxypropyl cellulose, hydroxypropylmethylcellulose, polyvinylpyrrolidone, wigum, arabogalactans and the like and their mixture. Typically, the number of binders may vary from about 0.5% to about 10% by weight of the composition.

Increased stability can be achieved by introducing an additional stabilizer of E. An additional stabilizer includes antioxidants selected from the group consisting of butylated hydroxyanisole, butylated hydroxytoluene, DL-alpha-tocopherol, propyl ghalate, octyl gallate, ethylenediaminetetraacetate, ascorbil palmitate, acetylcysteine, ascorbic acid, sodium ascorbate, fumaric acid, lecithin, and the like, and their mixtures. The number of antioxidants can vary from about 0.001% to about 0.01% by weight, preferably 0.009%.

In most of the cases, the stabilizer includes tromethamine, antioxidants, and sodium lauryl sulfate. Sodium levels of lauryl sulfate may range from 1% to 2% by weight of the composition.

Given the fact that atorvastatin is characterized by high lyophilicity, this requires the addition of surfactants. A classic example is a polysorbate (Twin 80), but it is incompatible with phenol, salicylates. Therefore, poloxamer 338 was investigated as a stabilizer.

Fillers A that can be used include micro-cellulose, mannitol, dextritis, dextrin, dextrose, fructose, lactose, lactitol, maltitol, maltodextrin, maltose, and the like. Mostly the filler is the micro-cellulose. For wet granulation commercially available is micro-cellulose 101.

For the reasonings given above, the studied excipients were grouped by functional purpose (see Table 4).

Table 4. Excipients to be considered in tablets of acetyl salicylic acid with atorvastatin design

When receiving the granules, 10.36 g of the atorvastatin calcium was mixed with 18.55 g of MCC 101 and there were added 22 g of the substance from the group A, 33 g from B and 7.5 g from C. The substances D and E were added to 27.76 g of purified water. The powder mixture was moistened with the resulting solution, passed through a sieve with a hole diameter of 2 mm and dried at 85 \(^\circ \)C. The dried granules were calibrated through a sieve with a diameter of holes of 1 mm and tested twice with respect to the pharmaceutical and technological parameters. 92 g of granulate was added with 75 g of acetyl salicylic acid and the following excipients: 1 g of citric acid, 21 g of MCC 102, 10 g of starch of corn. 1 g of calcium stearate was used for flushing. Each series of tablet mass was tested twice in all metrics according to pharmacopoeial requirements. Biconvex tablets with a diameter of 8 mm and an average weight of 0.2 g were pressed.

3.1 Implementation of the Neural Network Modeling in R

Calculations were implemented in RStudio (version 1.1.456). Nowadays it one of the most effective ways to apply ML algorithms for practical tasks [5].

“Binarization” of input data, which were primarily stored in data frame df, was implemented with help of R codeFootnote 4

figure a

In case of atorvastatin tablets we have n = 27 binary input variables corresponding to different excipients. We consider the results of p = 270 experiments.

Hence, names of all binarized input variables in the form of string, which can be used in ML formula, are obtained in the following way

figure b

Neural network construction is implemented within package neuralnet with help of the following function

figure c

Here we construct neural network for the output variable \(y_{15}\) on the basis of 27 binary input variable. We consider one hidden layer containing 18 neuronsFootnote 5 The neural network obtained is presented on Fig. 1.

Fig. 1.
figure 1

Neural network for predicting variable \(y_{15}\) on the basis of excipients for design of tablets containing atorvastatin. The black lines show the connections between each layer and the weights on each connection while the blue lines show the bias term added in each step (Color figure online)

We applied cross-validation for building the predictive model. It implies repeating K times of the following process [1]: 1. The train-test splitting in the ratio of 90% of training tuples. 2. Fitting the model to the train set. 3. Testing the model on the test set. 4. Calculating the prediction error.

When we let \(K=30\) for the amount of cross validation steps then we get the mean value of MSE equal to 3.65e-05 (see Fig. 2).

Fig. 2.
figure 2

MSE as a result of procedure of cross validation for design of atorvastatin tablets

4 Conclusions

The best values of characteristics of the granulate, tablet mass and tablets are provided by the following excipients: \(a_2\) (sorbitol (Parteck SI 150)), \(b_2\) (calcium carbonate), \(c_1\) (corn starch), \(d_6\) (hypromellose E 5) and \(e_5\) (starch potatoes). The combination of these substances was simultaneously investigated in the 5th series. According to the results of the analysis, all of the studied parameters met the pharmacopoeial requirements, but the decomposition (on average 11 min) should be reduced.

In the second stage of the general scheme, in order to reduce the time of disintegration of tablets it is reasonable to increase the amount of disintegrating substance of corn starch (\(c_1\)). When preparing the solution for moisture, it is necessary to reduce the concentration of hypromellose E 5 (\(d_6\)) and increase the content of potato starch (\(e_5\)). The quantities of these substances were studied at 5 levels (see Table 5).

Table 5. The levels of excipients (mg) for quantitative optimization
Fig. 3.
figure 3

Visual comparison to the performance of the network and the linear model on the test set

As a result of application of genetic algorithm we obtained the minimal value of \(y_{15}\) at the levels \(l_4^{c_1}\), \(l_1^{d_6}\) and \(l_5^{e_5}\) respectively. Such quantitative content of excipients in tablets corresponds to experiments entirely [11, 12].

We compared the application of neural network with a linear model. By visually inspecting the plot (see Fig. 3) we can see that the predictions made by the neural network are (in general) more concentrated around the line (a perfect alignment with the line would indicate an MSE of 0 and thus an ideal perfect prediction) than those made by the linear model (LM).