# Generative Neural Networks for Addressing the Bioequivalence of Highly Variable Drugs
## 2 Materials and Methods
### Monte Carlo Simulations
The WGAN model comprises the generator and the critic, each one of those with their own layers and activation functions. Next, for each executed scenario, there was the definition of the parameters, such as CVw, N, sample size, T/R ratios and augmentation scale. To begin with, Monte Carlo simulations were performed for the generation of original data and the random sampling, which served as an input of the generator of WGANs. Then, the WGANs were trained based on the samples and generated data according to the augmentation scale. Finally, for all three distributions (original, sample and generated) an ANOVA analysis was performed to evaluate the percentage of BE acceptance and to compare the results. Figure 14 depicts parts of the code created for the implementation of WGANs in BE studies to give a better understanding of the methodology that was followed from creating the original distributions to generating the synthetic data. The selection of appropriate WGAN hyperparameters was crucial for our research. Table 1 shows all hyperparameter values evaluated during the study fine-tuning phase. We investigated various activation functions, latent dimensions, and epochs, along with different numbers of neurons in both the generator and critic components of the WGANs. WGANs are sensitive to hyperparameter changes based on the type of input data. To evaluate the best combination of hyperparameters that suits our study, a variety of different values were examined. A change in the hyperparameters can result in a dysfunctional model, which is why the optimal hyperparameter combination is important to ensure the consistency of our results and the robustness. The specific hyperparameter ranges were selected through empirical tuning based on a trial-and-error approach. The latent dimension range of 60-120 was examined to ensure sufficient capacity for generating diverse samples without overfitting. Smaller dimensions produced oversimplified output, whereas larger ones added unnecessary complexity and noise. The final choice of 60 for the latent dimension provided a better model performance. The number of neurons (4-10) showcase the balance of the model expressiveness and training efficiency. Fewer neurons conclude to underfitting the data, while larger numbers increase training time and lead to overfitting. On the other hand, the number of epochs (500-5000) was examined on the convergence based on our specific research study. The goal was for the WGANs architecture to provide consistent results and not result in mode collapse. The final choice of the hyperparametersacross all scenarios, following an exhaustive search through all combinations of settings and scenarios. These hyperparameters remained constant throughout all scenario executions. Figure 2: Methodology flowchart. Table 2 summarizes the scenarios investigated in this study. To evaluate the method's performance across various conditions, we tested CVw values ranging from low (15%) to high variability (50%). For challenging algorithm evaluation, we set the T/R ratio at 1.1. Input population sizes varied from 18 to 60 values per group, with different sampling percentages. The generated population size was set at two or three times the original size. For the 30% and 50% variability levels, the EMA and FDA-scaled limits were applied to the original and sample datasets, whereas the classic 80-125% limits were always used for the WGAN-generated data. We assessed all parameter combinations to understand WGAN performance under extreme conditions for high-variable drugs, resembling real-world scenarios. The analysis relied on two key parameters: the BE acceptance percentage for each distribution and the similarity percentage, both based on regulatory bodies' scaled limits. The similarity parameter is a percentage that denotes the simultaneous acceptance of BE by the two distributions under comparison.