# Generative Neural Networks for Addressing the Bioequivalence of Highly Variable Drugs
## 2 Materials and Methods
### Monte Carlo Simulations  
The primary objective of pharmacokinetics is to characterize the central tendency of pharmacokinetic parameters and to identify the sources contributing to their variability within a population. A comprehensive modeling approach allows the evaluation of different forms of variability, including between-subject, within-subject, and residual (unexplained) variability. In the context of a standard \(2\times 2\) crossover bioequivalence study, each subject receives both the test and reference treatments in different periods, enabling direct within-subject comparisons. The main sources of variability in such designs include sequence effects (differences due to the order of treatments), period effects (differences between study periods), treatment effects (true differences between formulations), and, most critically, residual variability. Residual variability captures the random fluctuations in pharmacokinetic responses within the same individual that are not explained by other model components. It plays a central role in bioequivalence assessment, as it directly influences the width of the confidence intervals used to determine equivalence. Higher residual variability increases uncertainty, making it more difficult to demonstrate bioequivalence, and often requires larger sample sizes or the application of alternative statistical methods for highly variable drugs. To simulate the BE environment, we created Monte Carlo simulations of a \(2\times 2\) crossover study. In our simulations, we generated random distributions as input for WGANs. We randomly generated two different normal distributions to create the initial T and R groups. These distributions had a mean endpoint of 100, with standard deviations varying according to each executed scenario. The original distributions were generated by generating random normal distributions using the mathematical equation \(X~{}\sim~{}N\big{(}\mu,\sigma^{2}\big{)}\), where \(\mu=100\) represents the mean pharmacokinetic endpoint (e.g., Cmax or AUC) and \(\sigma\) is determined based on the coefficient of variation (CV) through the relationship \(\sigma=\mu\times CV\) (CV remained constant at 10% throughout the whole study). The mean of 100 was chosen to standardize the simulated datasets and simplify interpretation, ensuring consistency across the different executed scenarios. This choice does not affect generalizability, as the BE analysis depends on the relative T/R ratios and variability rather than the absolute values of the endpoints. This approach is designed to replicate data from real BE studies, where samples are randomly selected. In pharmacokinetics, variability is typically quantified using the CV, which expresses the extent of variability relative to the mean. In our study, we specifically refer to CVw, which measures the residual variability of pharmacokinetic parameters (AUC, Cmax). In BE studies, the CVw plays a critical role in determining sample size requirements and influences whether scaled BE approaches (such as those used for HVDs) are needed. To ensure robust results, we repeated the process of generating random distributions for WGAN input thousands of times. We conducted simulations across 36 unique scenarios, structured through a full factorial design to thoroughly assess our proposed approach. This design varied four key factors: sample size (three levels), data variability (three levels), regulatory context (two frameworks, such as FDA and EMA), and the size of the synthetic datasets used for augmentation (two levels). By exploring all possible combinations of these factors (\(3\times 3\times 2\times 2\)), we ensured a comprehensive evaluation of the method's performance under a broad spectrum of conditions. For each scenario, a number of 1000 Monte Carlo trials have been simulated. In the methodology flowchart (Figure 2) below you can see the exact steps of the implementation of WGANs in BE studies. First of all, it is important to create a WGAN architecture based on the data type of our research.