Synthetic Tabular Data Based on Generative Adversarial Networks in Health Care: Generation and Validation Using the Divide-and-Conquer Strategy

Background: Synthetic data generation (SDG) based on generative adversarial networks (GANs) is used in health care, but research on preserving data with logical relationships with synthetic tabular data (STD) remains challenging. Filtering methods for SDG can lead to the loss of important information. Objective: This study proposed a divide-and-conquer (DC) method to generate STD based on the GAN algorithm, while preserving data with logical relationships. Methods: The proposed method was evaluated on data from the Korea Association for Lung Cancer Registry (KALC-R) and 2 benchmark data sets (breast cancer and diabetes). The DC-based SDG strategy comprises 3 steps: (1) We used 2 different partitioning methods (the class-specific criterion distinguished between survival and death groups, while the Cramer V criterion identified the highest correlation between columns in the original


Introduction
Machine learning (ML) techniques have been applied in health care with remarkable success over the past decade.ML has the potential to improve tasks in various fields in the medical industry [1].Analysis of clinical data to predict risk factors and degrees of association between diseases [2] is one of the major advancements achieved using ML.However, the application of ML in real-world clinical environments remains difficult owing to clinical limitations, such as data scarcity, data privacy, and data imbalance [3].In this context, generative adversarial networks (GANs) [4] have emerged as one of the most important types of ML-based generative models in health care [5].
GAN algorithms generate large amounts of synthetic patient data, which can serve as an appropriate alternative to real data [6][7][8].A GAN comprises 2 models trained using an adversarial process, in which one model-the "generator"-generates synthetic data, while the other-the "discriminator"-distinguishes between real and synthetic data.Conventional GAN algorithms have been enhanced and repurposed for clinical tabular data [9][10][11].In addition, GANs alleviate clinical limitations and facilitate the application of ML in health care [3,12].Beaulieu-Jones et al [13] used the auxiliary classifier generative adversarial network (ACGAN) to generate synthetic SPRINT (Systolic Blood Pressure Intervention Trial) data for privacy-preserving data sharing.Baowaly et al [14] generated synthetic electronic health record data using the medical generative adversarial network (MedBGAN) to resolve the data-sharing problem.Izonin et al [15] created an enlarged data set based on a GAN to improve the accuracy of diagnostics tasks.Wang et al [16] developed a framework to generate and evaluate synthetic data, while simultaneously preserving the complexities of real data and ensuring privacy.
Nevertheless, the application of existing models and algorithms, which are not tailor-made for tabular health care data, to synthetic data generation (SDG) in this field remains unsuitable.Some do not consider the characteristics of health care tabular data [17].To generate synthetic tabular data (STD), while preserving data with logical relationships, the relationships between columns in the original data (OD) must be considered.The OD have a logical relationship between each column: For example, measurement of the drinking attribute is performed using the binary classification "yes" or "no."If the value of this attribute is "no" in some records, the corresponding value of the subattribute "How much do you drink per week?" must be 0.However, poorly designed GANs may generate synthetic data containing impossible values, for example, a record indicating "drinking: no" and "How much do you drink per week?: 10."This can potentially affect the quality of the generated synthetic data and make them unreliable for certain analyses.To prevent this, filtering methods in GANs have been developed.Both the conditional tabular generative adversarial network (CTGAN) [18] and the copula generative adversarial network (CopulaGAN) [19] use conditional sampling (CS) as a filtering method to forcibly express logical relationships.CS is a method used in the CTGAN and CopulaGAN.CS works through a process of rejection sampling, in which multiple iterations of row sampling occur until a satisfactory row that meets the established conditions is obtained.The performance is also compared on balanced and imbalanced synthetic data sets.However, filtering methods exclude record data based on predefined condition columns after STD generation, ignoring meaningful information contained in the excluded records.To mitigate this risk, it is important to carefully consider the specified conditions and to ensure that they are representative of the broader population.
In addition, although it is generally accepted that balanced data perform better in classification, there has been little research based on experiments that clearly demonstrate how much class-balanced tabular synthetic data are required to improve model performance.Therefore, our experiments suggest that when creating a reference table, we should consider how much data to create so that the classes are balanced when generating synthetic data.
In this study, we proposed an SDG framework to overcome the aforementioned challenges in clinical data generation.The remainder of the paper is organized as follows.The Methods section describes the basic characteristics of the study population and the divide-and-conquer (DC)-based SDG strategy, defines the division criteria, presents the problem statement for a filtering method, and presents the SDG process and verification methods.The Results section compares the prediction performances of the proposed approach and CS.Moreover, the quality of the generated STD is estimated.Finally, the Discussion section elaborates further on the experimental design, results, limitations, and conclusions.

Ethical Considerations
The study design was approved by the Ethics Review Board of the National Cancer Center Institutional Review Board (IRB no: NCC2022-0281).

Research Framework
The DC-based research framework, as depicted in Figure 1, generates STD, while preserving data with logical relationships to enable comparison in terms of data reliability and investigation of the factors affecting ML model performance.In the division step, the entire data set was divided into several subsets based on the division criteria.In the conquer step, different subsets generated via the GAN were combined into 1.Following STD generation, model performances achieved using classification algorithms, such as the decision tree (DT), the random forest (RF), Extreme Gradient Boosting (XGBoost), and the light gradient-boosting machine (LGBM), in both DCand CS-based approaches of the CTGAN and CopulaGAN were compared.Moreover, ML model performance on balanced synthetic data and imbalanced synthetic data was also compared.

Definition of the Cramer V and Class-Specific Division Criteria
In this study, the division criteria involved 2 main components, class-specific and the Cramer V criteria.The class-specific criterion enabled the selection of different feature subsets for all classes, allowing for subsamples that were tailored to the unique characteristics and behavior of each class.Meanwhile, the high correlation-based criterion identified variables with high correlation scores by computing the Cramer V correlation matrix.The reason for using the Cramer V criterion as the second division criterion was to preserve the logical relationships in the OD in the synthetic data.These variables were then used as the basis for defining logical relationships of data that would guide the division of the data set into subsamples.These 2 criteria provided a robust and effective approach to analyzing the data and identifying meaningful patterns and relationships within them.

Class-Specific Criterion
We used a class-specific division criterion [20], which enabled the selection of different feature subsets for all classes.This yielded a comprehensive list of data set allocation attributes and values by deconstructing the OD set into smaller, more refined subsets.These subsets were subsequently classified based on the dependent classes between different classes, which in turn represented unique sets of class-based criteria.This enabled the selection of a different feature subset for each class.This approach is particularly useful when dealing with data sets comprising classes with unique characteristics and behaviors.The class-specific criterion enables the creation of subsamples tailored to each class, in turn leading to more accurate predictions and better insights.

Cramer V Criterion
We used the Cramer V correlation to identify high correlation patterns in the data set.The Cramer V criterion is a measure of substantive importance used to measure how strongly 2 categorical fields are related to each other.Its value ranges from 0 to 1, where 0 represents no association between the categorical variables and 1 represents complete association in the contingency table.The Cramer V correlation coefficient can be calculated using the formula provided in Equation 1: where V denotes the Cramer V correlation coefficient, χ 2 denotes the chi-square statistic of the contingency table, N denotes the total number of observations in the contingency table, r denotes the number of rows in the contingency table, and c denotes the number of columns in the contingency table.
The steps in calculating the Cramer V correlation coefficient are as follows: • Step 1: Calculate χ 2 , which is a measure of the association or independence between 2 categorical variables represented in a contingency table and quantifies how much the observed frequencies would deviate from the expected frequencies if the variables were independent.A higher χ 2 value suggests a stronger association between the variables.

•
Step 2: Determine the scaling factor, which is necessary to normalize the Cramer V correlation coefficient.The scaling factor is calculated as min(r -1, c -1), where (r -1) and (c -1) represent the degrees of freedom associated with the rows and columns in the contingency table, respectively.By taking the minimum of (r -1, c -1), the formula scales XSL • FO RenderX χ 2 appropriately, avoiding overestimation of the association in situations in which one variable has more categories than the other.The purpose of this scaling factor is 2-fold: (1) It ensures that the Cramer V correlation coefficient, which is the final result, falls within the range of 0-1.This range makes the coefficient interpretable and suitable for comparison across different data sets.(2) It normalizes χ 2 by considering the dimensions of the contingency table (number of rows and columns) and the degrees of freedom.This normalization avoids overestimating the strength of the association in situations in which one variable has more categories than the other.

•
Step 3: Calculate the Cramer V correlation coefficient.The final result is a value that ranges from 0 to 1, where 0 indicates no association (variables are independent) and 1 represents a perfect association in the contingency table.This coefficient helps interpret and compare the degree of association across different data sets and contingency tables.
We computed the Cramer V correlation matrix for all pairs of categorical variables in the data set.If the variables had a score of 1, it meant that these variables were representative of the characteristic of the OD.These highly related variables should certainly be represented in the synthetic data for fidelity, which is a statistical measure of similarity.In other words, a Crammer V score of 1 was the threshold and variables scoring 1 were used as the division criteria.

Logical STD in Health Care
National clinical databases differ based on the organization, but clinical data sets are valuable resources [17] that provide insights into improving patient care and organizational efficiency.However, the quality and quantity of clinical data can be limited, especially in cases where data privacy concerns restrict access to real-world data sets.SDG has emerged as a promising solution to this problem, enabling organizations to create new data sets that capture the characteristics of real-world data accurately.However, illogical STDs are frequently generated when simply designed GAN models are used, which induces learning of irregular relationships between the main attribute and its subattributes.

Divide-and-Conquer Approach for Logical STD
As mentioned in the previous section, CS can be a useful approach for generating synthetic data.However, it suffers from the risk of information loss owing to the dependence on condition columns.This is particularly pertinent in cases involving a tabular health care data set, because each of its columns contains significant information [21].To address these issues, we proposed a DC-based alternative approach.
DC is an easily implementable computing approach [22].It divides an original problem into several subproblems, analyzes them separately, and then combines the results to obtain the overall solution [23].DC can be used to generate high-quality synthetic data by dividing the OD set into smaller subsets based on a set of predefined division criteria.This facilitates the specification of complex or multidimensional conditions, while simultaneously reducing the risk of information loss.We followed these steps in the DC approach to generate high-quality synthetic data:

•
Step 1: To define the division criteria, we used a methodology involving a class-specific criterion and the Cramer V correlation coefficient.This approach enabled the selection of a different feature subset for each class and consideration of the relationships between different variables to determine the degrees of association.

•
Step 2: Based on the defined division criteria, we divided the OD into subsets containing each criterion separately as a specific pattern or relationship.Subsequently, these subsets were used to train GANs on specific patterns and relationships.As a result, the generated STD preserved the patterns and relationships of each subset.

•
Step 3 (conquer): The synthetic data corresponding to the different subsets were combined.The generated STD preserved the underlying patterns and relationships within each subset of the OD.This DC-based approach enabled STD that reflected the underlying patterns and relationships within each subset of the OD accurately.

Generative Adversarial Networks
In this study, we used 2 generative models, the CTGAN and CopulaGAN, to generate synthetic data:

•
The CTGAN is specifically designed for generating synthetic data from tabular data.The CTGAN exhibits several unique features, including the ability to handle discrete and continuous features, the use of conditional generators, and sampling-specific training to avoid mode collapse and data imbalance problems.

•
CopulaGAN uses copulas to model the joint distribution of input features.Copulas are statistical models that describe the dependence structures between random variables, and they have been demonstrated to be effective in modeling complex dependencies between features in real-world data sets.

Prediction Methods
In this study, we validated mortality prediction performance using 4 different classifiers: DT, RF, XGBoost, and LGBM.We used these classifiers to train the ML models and evaluated their performances in predicting mortality in our data set.A sufficiently large training data set was generated in the experiment, and the 4 ML algorithms were used to generate mortality prediction models for patients with non-small cell lung cancer (NSCLC).

•
The DT [24] is a commonly used tool.Essentially, a DT is a supervised model that classifies or performs predictions on data sets based on rules in the data.To reach a decision, a DT learns by posing binary questions, which can be represented using a tree structure.The data set is divided hierarchically to contain the greatest amount of information, while branching from the root node.The data are split repeatedly until each segmented region contains a single target value.

•
The RF [25] was developed by Leo Breiman and Adele Cutler.It is an extension of the bagging method, which combines the output of multiple DTs to yield a single result.In other words, DTs consider all possible feature splits, while RFs only select a subset of these features.Each tree in an RF ensemble consists of a training set with bootstrap samples.One-third of it is set aside as testing data, known as the out-of-bag (OOB) sample.For a regression task, individual DTs are averaged, and for a classification task, a majority vote is used to obtain the predicted class.Finally, the OOB sample is used for cross-validation.
• XGBoost [26], a scalable tree-boosting system, is used to solve both classification and regression problems and is a popular algorithm because of its good performance and resource efficiency.XGBoost was developed to handle sparse data.It is an innovative tree learning algorithm that handles instance weights in inexact tree learning, which is a justified weighted quantile sketch procedure.XGBoost enables parallel and distributed computing, which accelerates both learning and model exploration.It exploits out-of-core computation, which enables the construction of an end-to-end system.

•
The LGBM [27] is a tree-based learning algorithm with a gradient-boosting framework.In an LGBM, the tree expands vertically compared to other algorithms, in which it expands horizontally.In other words, an LGBM uses a leaf-wise structure, while other algorithms use level-wise structures.An LGBM chooses a leaf with the maximum delta loss to expand, enabling the leaf-wise algorithm to reduce greater loss than its level-wise counterparts.

Study Population
The Korea Association for Lung Cancer Registry (KALC-R) was developed in cooperation with the Korean Central Cancer Registry and the Lung Cancer Registration Committee.Approximately 10% of NSCLC cases listed in this registry were surveyed in this study.The survey population comprised 13 regional cancer centers and 39 hospitals with numerous registrations [28,29].Our study used a nonduplicate sample comprising data of 5281 subjects obtained from the KALC-R 2014 and 2015 data sets.Entries with missing and unknown values for weight, height, forced vital capacity (FVC), diffusing capacity of the lungs for carbon monoxide (DLCO), the chemotherapy tumor, extent of spread to lymph nodes, and presence of metastasis (TNM) stage (n=1773, 33.6%), and NSCLC (n=1204, 22.8%) were excluded.This study population (N=2304) was then divided into a development group (n=1616, 70.1%) and a validation group (n=688, 29.9%) via stratified random sampling.The development group used GAN learning for STD and model training for short-term prediction models.The validation group evaluated model performance in terms of ML models in accordance with the quality of prediction.The primary endpoint was defined to be 1 year after the diagnosis of NSCLC for all causes of death.Moreover, we selected 2 well-known publicly available data sets: the breast cancer data set from the University of California, Irvine (UCI) Machine Learning Repository [30] and the diabetes data set [31].The breast cancer data set comprises real patient data obtained from the Institute of Oncology, Ljubljana, in 1988, aimed at predicting the recurrence of breast cancer.The diabetes data set describes the clinical care at 130 US hospitals and integrated delivery networks from 1999 to 2008.The classification task predicts whether a patient will be readmitted within 30 days.

Comparison of Basic Characteristics
We analyzed the fundamental characteristics of the data sets of patients of NSCLC, breast cancer, and diabetes and further compared the following basic characteristics of different groups for NSCLC survival, breast cancer recurrence, and diabetes readmission in the development data: • NSCLC: The NSCLC data set exhibited similar distributions across various variables, including age, height, weight, FVC, forced expiratory volume in 1 second (FEV1), DLCO, smoking history (pack-years), gender, Eastern Cooperative Oncology Group (ECOG) performance status, pathological type, epidermal growth factor receptor (EGFR) mutation status, anaplastic lymphoma kinase immunohistochemistry (ALK IHC), anaplastic lymphoma kinase fluorescence in situ hybridization (ALK FISH), cancer stage, curative operations, radiotherapy (RT), chemotherapy, and cause of death.The survival group exhibited lower values for age, height, smoking history (past and current), ECOG performance status, specific cancer types (squamous cell carcinoma, large-cell carcinoma), cancer stage, and palliative chemotherapy compared to the death group.Conversely, the survival group had higher values for weight, FVC, FEV1, DLCO, DLCO percentage, nonsmoking status, adenocarcinoma, positive EGFR mutation, positive ALK IHC, positive ALK FISH, curative operations, RT, and curative chemotherapy.
• Breast cancer: The breast cancer data set also showed comparable distributions for variables, such as age, menopausal status, tumor size, invasive/involved (inv) nodes, node caps, malignancy degree, breast location, breast quadrant, irradiation, and recurrence events.The recurrence group had lower values for age, early menopause (at or before age 40 years), tumor size, inv nodes, node caps, lower malignancy degrees (1 and 2), right breast, breast quadrant, and irradiation compared to the nonrecurrence group.In contrast, the recurrence group had higher values for premenopausal status, malignancy degree (3), and left breast.
• Diabetes: In the diabetes data set, basic characteristics revealed similar distributions for variables, such as hospital stay duration, laboratory procedures, medications, outpatient visits, emergency visits, inpatient stays, diagnoses, race, gender, age, medical specialty, glycated hemoglobin (A1C) results, diabetes medications, and readmission events.The readmitted group displayed lower values for the number of procedures, certain demographics (African American and other races, males), age, medical specialty (except others), A1C result (except none), insulin usage, changes in treatment, and certain diagnoses compared to the nonreadmitted group.Conversely, the readmitted group XSL • FO RenderX showed higher values for time spent in the hospital, number of lab procedures, number of medications, number of outpatient visits, number of emergency visits, number of inpatient stays, number of diagnoses, Caucasian race, females, other medical specialties, no A1C result, and diabetes medication (metformin, glipizide, glyburide) usage.
A detailed comparison of the characteristics of different data sets is presented in Multimedia Appendix 1.

Division Criteria Analysis
First, we used class-specific division on the "adverse event" feature, which represents dependent classes, and divided the data into death and survival groups.Next, the Cramer V correlation coefficient was applied after converting all variables into the categorical format.The highest correlation score (V=1, highlighted in red in Figure 2) in NSCLC data was observed between smoking status and pack-years of smoking.This indicates a strong association between these 2 variables, suggesting that individuals who smoke more frequently are more likely to be current or former smokers.Therefore, the "smoker" feature was identified as a key division criterion in our data set.Following the definition, we created a subsample consisting of only those patients in the data set who were smokers and had a pack-year of more than 0. In conclusion, the data were divided into distinct smoker and nonsmoker groups.In other data sets, we did not find a high correlation score, as seen in Multimedia Appendix 2.
By applying the aforementioned division criteria, we obtained 4 small samples from the data set: death-smoker, death-nonsmoker, survival-smoker, and survival-nonsmoker.These samples were used for further performance validation and fidelity tests.Finally, our data set was successfully partitioned for the purposes of our study.

Metrics Performance Evaluation Metrics
The ability of the synthetic data to achieve good predictive performance in downstream modeling tasks was evaluated using metrics, such as the area under the curve (AUC) and the F 1 -score.This is important as the generated synthetic data must be useful for predictive modeling for it to lead to actionable insights.
The AUC is a performance metric that measures the ability of a binary classifier to distinguish between positive and negative classes.It is calculated as the area under the receiver operating characteristic (ROC) [32] curve.ROC curves are graphical representations of the relationship between the false-positive rate (FPR) and the true-positive rate (TPR), plotted along the x and y axes, respectively.The AUC ranges from 0 to 1, where 1 represents perfect classification performance and 0.5 indicates perfectly random performance.The formula for the AUC is given by Equation 2: The F 1 -score is a measure of the balance between precision and recall, where precision is defined as the fraction of true positives among all predicted positives and recall is defined as the fraction of true positives among all actual positives.The F 1 -score ranges from 0 to 1, where 1 represents perfect precision and recall and 0 represents the worst-possible scores.The formula for the F1-score is given by Equation 3:

Quality Evaluation Metrics
Shape and pair trend metrics [33] are commonly used to evaluate the fidelity of STD, that is, their similarity to the distribution of real-world data.Shape refers to the overall distributional shape of a data set, including factors such as the degree of skewness or kurtosis.Pair trend, in contrast, refers to the relationship between pairs of features in the data set.Although shape analysis focuses on individual features of a data set, pair trend analysis provides information about the overall structure and relationships between features.To evaluate the distribution shapes of numerical columns, we used the Kolmogorov-Smirnov statistic (KSS), which is defined as the maximum difference between the cumulative distribution functions (CDFs).CDFs determine the probability that a random observation taken from the population will be less than or equal to a certain value.Conversely, for categorical columns, we used the total variation distance (TVD).The formulas for KSS and TVD scores are given by Equations 4 and 5, respectively, where x represents a single column.Similarly, pair trend metrics were considered to consist of 2 measures, correlation similarity and contingency similarity, for numerical and categorical columns, respectively.Equations 6 and 7 present the formulas for correlation and contingency similarity scores, respectively, where x and y together denote a pair of columns.
By computing separate scores for each column and pair of columns, an individual score was obtained for every column.The final score (value between 0 and 1, with a higher score representing higher quality) was obtained by averaging individual scores.These statistical metrics assessed the similarity or dissimilarity between the distributions of samples in the OD and STD.They provided quantitative measures for evaluating how closely the data sets matched in terms of distribution shapes, relationships between variables, and contingency structures.The final aggregated score represented the overall quality or fidelity of the OD compared to the STD.All 4 measures used for evaluating the fidelity of the OD compared to the STD are summarized in Table 1.A score of 0 implies identical distributions, while higher scores indicate increasing dissimilarity.

Quantifies the difference between probability distributions of categorical data in OD and STD TVD e
A score of 0 indicates perfect similarity in relationships, while higher scores suggest weaker similarity or even dissimilarity.

Numerical
Evaluates the similarity or dissimilarity of relationships between pairs of numerical variables between OD and STD Correlation A score of 0 signifies perfect similarity in contingency structures, while higher scores indicate less similarity.

Generation and Validation of STD
To generate logical STD, we trained the CTGAN and CopulaGAN using existing CS filtering.Next, we used the proposed DC-based method before training the CTGAN and CopulaGAN without CS filtering.The volume of the generated data set was set to 5000.Moreover, we generated 2 types of STDs, a balanced data set with equal class distributions between samples in a 50:50 ratio and an imbalanced data set with a 1:100 class distribution ratio between samples (ie, each dependent variable occurred 100 times less frequently than its counterpart).
To verify the superiority of the proposed DC-based method in the generation of logical STD, we evaluated each STD item using 4 different ML models (DT, RF, XGBoost, and LGBM).Table 2 presents the validation results of the DT classifier.The

XSL • FO
RenderX AUC and F 1 -score values of the NSCLC, breast cancer, and diabetes OD were 66.06% and 66.11%, 61.14% and 49.64%, and 65.58% and 47.82%, respectively.The highest AUC of 74.87% was achieved by generating synthetic data using the DC strategy with the CopulaGAN, while the highest F 1 -score of 71.99% was achieved using the DC strategy with the CTGAN for NSCLC data.The highest AUC of 73.31% was achieved by generating synthetic data using the DC strategy with the CTGAN, while the highest F 1 -score of 68.92% was achieved using the DC strategy with the CopulaGAN for breast cancer data.The highest AUC of 61.57% was achieved by generating synthetic data using the DC strategy with the CTGAN, while the highest F 1 -score of 53.8% was achieved using the DC strategy with the CopulaGAN for diabetes data.
The validation results obtained using the RF classifier are presented in Table 3.The AUC and F 1 -score values of the NSCLC, breast cancer, and diabetes OD were 84.81% and 72.74%, 69.37% and 60.01%, and 62.13% and 47.73%, respectively.The highest AUC and F 1 -score of 85.61% and 75.09%, respectively, were achieved by generating synthetic data using the DC strategy with the CTGAN for NSCLC data.The highest AUC and F 1 -score of 78.05% and 71.03%, respectively, were achieved by generating synthetic data using the DC strategy with the CTGAN for breast cancer data.The highest AUC and F 1 -score of 59.98% and 53.47%, respectively, were achieved by generating synthetic data using the DC strategy with the CTGAN for diabetes data.Table 4 presents the validation results obtained using the XGBoost classifier.The AUC and F 1 -score values of the NSCLC, breast cancer, and diabetes OD were 83.07%and 71.14%, 71.21% and 62.89%, and 67.02% and 48.91%, respectively.The highest AUC and F 1 -score of 85.20% and 74.78%, respectively, were achieved by generating synthetic data using the DC strategy with the CTGAN for NSCLC data.The highest AUC and F 1 -score of 77.86% and 70.58%, respectively, were achieved by generating synthetic data using the DC strategy with the CTGAN for breast cancer data.The highest AUC and F 1 -score of 60.18% and 53.93%, respectively, were achieved by generating synthetic data using the DC strategy with the CTGAN for diabetes data.
Finally, Table 5 presents the validation results obtained using the LGBM classifier.The AUC and F 1 -score values of the NSCLC, breast cancer, and diabetes OD were 84.09% and 71.30%, 75.84% and 62.07%, and 67.88% and 47.89%, respectively.The highest AUC and F 1 -score of 85.14% and 74.40%, respectively, were achieved by generating synthetic data using the DC strategy with the CTGAN for NSCLC data.The highest AUC and F 1 -score of 77.86% and 70.58%, respectively, were achieved by generating synthetic data using the DC strategy with the CTGAN for breast cancer data.The highest AUC and F 1 -score of 60.18% and 53.93%, respectively, were achieved by generating synthetic data using the DC strategy with the CTGAN for diabetes data.
In general, the results demonstrate that STD generated using the DC approach had the best quality in terms of the AUC and F 1 -score.Moreover, higher performance was observed when STD were generated solely using the DC approach compared to STD obtained using the original training data.Moreover, balanced data sets consistently exhibited better performance than imbalanced ones.
In addition, we assessed the quality of the generated STD by evaluating their fidelity with respect to shape and pair trend metrics.The results are presented in Tables 6-8.The DC strategy with the CTGAN achieved the highest mean shape score of 90.49 (SD 0.07), 91.71 (SD 0.12), and 98.60 (SD 0.13), the highest mean pair trend score of 83.92 (SD 0.10), 82.72 (SD 0.13), and 96.70 (SD 0.26), and the highest mean overall score of 87.20 (SD 0.08), 87.21 (SD 0.09), and 97.65 (SD 0.27) on the NSCLC, breast cancer, and diabetes data sets, respectively.These findings suggest that the DC strategy with the CTGAN could be a promising approach for generating synthetic data with high fidelity.Moreover, we carried out a number of visualization experiments comparing the OD and the STD, as shown in Multimedia Appendix 3.

Principal Findings
Preserving data with logical relationships while generating STD using GANs has not been sufficiently researched.Some GANs, such as the CTGAN and CopulaGAN, use CS filtering to determine the exclusion of record data based on predefined condition columns after generating STD.However, this is highly dependent on condition columns, which may lead to meaningful information in the excluded records being ignored.To resolve this problem, we proposed a DC-based approach in this paper, as shown in Multimedia Appendix 4.
The proposed DC-based approach was verified to produce STD involving logical relationships between columns.As the division strategy, we used class-specific and the Cramer V criteria sequentially.First, we used a class-specific criterion to classify dependent classes between survival and death groups.Subsequently, we measured the relative degrees of association among pairs of variables based on the Cramer V correlation coefficient in order to identify strong evidence for meaningful correlations between columns.In terms of a high Cramer V correlation coefficient (=1), smoker and nonsmoker groups were selected as division criteria.Using this, the OD was divided into smaller data sets comprising hierarchical group data that considered class-specific aspects of learning.Further, the division criteria of the DC strategy avoided the problem of ignoring some records owing to overreliance on condition columns.
To compare the logical STD generation approaches, we trained the CTGAN and CopulaGAN with CS filtering and compared their performances with those of ML models trained using a DC approach without CS filtering.The results demonstrated that the epochs hyperparameter was sensitive, with a significant impact on the quality of synthetic data generated using the CTGAN and CopulaGAN.Specifically, the results depended considerably on the value of the epochs hyperparameter, ranging from 100 to 500.We used a grid search algorithm to identify an optimal value for the epochs hyperparameter, as shown in Multimedia Appendix 5. Regularization hyperparameters, such as grid search, are essential to the generalization of ML models [34].They work well with low-dimensional hyperparameter spaces and ample computational resources [35].A grid search involves testing a range of hyperparameter values and evaluating the performance of the model corresponding to each value.In our case, we tested epoch values of 100, 200, 300, 400, and 500 and evaluated the resulting synthetic data using a variety of metrics, including distributional similarity, feature correlation, and downstream performance in predictive models.Our findings highlight the importance of carefully selecting hyperparameters during GAN training to generate synthetic data from clinical data sets.The sensitivity of the epochs hyperparameter underscores the necessity of systematic approaches, such as grid search, to identify optimal values.Generally, ML training on imbalanced data sets leads to failure to properly learn the distributive characteristics of the data and, consequently, unfavorable accuracies across the data classes [36].We generated balanced and imbalanced STD by regulating the volumes of the dependence variables for comparison.These data were used to develop ML models (DT, RF, XGBoost, and LGBM), and their AUC and F 1 -score were measured on the verification data set.The hyperparameter of each model was tuned via a grid search for the number of epochs.All balanced synthetic data exhibited higher performance on the prediction models (DT, RF, XGBoost, and LGBM) compared to imbalanced synthetic data.Therefore, we recommend that the volume of balanced dependence variables be considered during SDG using GANs.
Finally, the DC-based approach was observed to exhibit several potential advantages over CS.First, deconstruction of the division criteria into simpler subrules enables the specification of complex or multidimensional conditions.Second, training the GAN on each subrule independently reduces the risk of information loss by CS, as the GAN can focus on generating synthetic data that accurately reflect the distribution of the data for each subrule.Finally, combining the results of the subrules enables the generation of synthetic data that satisfy all the original logical rules, without requiring complex and potentially overspecified conditions.Thus, the main contribution of this paper is to demonstrate the viability of the proposed STD generation method to serve as a revolutionary new alternative to existing counterparts in the development of ML-based prediction models.

Limitations
Our study is limited in terms of the low dimensionality and count of data collected from a single country.In practical health care, low-dimensional and sparse data are often derived from strict data preprocessing, a detailed design for the target population, or exact primary endpoints.In this paper, data containing essential variables were collected from 13 regional cancer centers and 39 hospitals via sampling.However, patients with NSCLC from only a single country were considered, potentially introducing racial bias.We intend to overcome this limitation in future works by applying the proposed framework to data collected from other countries.
The DC-based STD learning strategy may be difficult to apply in the case of sparse data and multiple division criteria.Indiscriminate use of the strategy, even in the presence of a large amount of data, can be problematic because the use of multiple division strategies induces a lack of learning data, which motivates the generation of inappropriate synthetic data.Therefore, it is important to establish appropriate criteria for the division strategy (eg, the class-specific and Cramer V criteria proposed in our study).We recommend that the class-specific criterion be used as an essential strategy in the first division criteria.The Cramer V criterion should be used to calculate correlations between variables, enabling sufficient discussion about the group of candidates for division and helping decide the need for division.
One potential challenge with the DC approach is that the subrules and the combinations of results require careful consideration.If the subrules are not well defined or the combinations of results are not appropriate, the resulting synthetic data may not accurately reflect the characteristics of real-world data.Additionally, if data with logical relationships are highly interdependent, it may be challenging to break them down into independent subrules.Despite these potential challenges, the DC approach exhibited great promise in generating synthetic data from data with logical relationships on clinical data sets.

Conclusion
Our study demonstrated problems of CS-based STD generation techniques and the feasibility of DC-based STD generation to address those problems.Further, the effectiveness of the generated STD to enable the application of ML models was verified, revealing that they improve prediction performance.

Table 1 .
Comparison of measures for evaluating fidelity between the OD a and the STD b .indicates greater dissimilarity in distribution shapes, with 0 representing identical distributions.Calculates the maximum difference between the CDFs d of OD and STD Numerical Measures the similarity and dissimilarity of distribution shapes between OD and STD KSS c Assesses the similarity of relationships between pairs of categorical variables in OD and STD Contingency a OD: original data.b STD: synthetic tabular data.c KSS: Kolmogorov-Smirnov statistic.

d
CDF: cumulative distribution function.

e
TVD: total variation distance.
b GAN: generative adversarial network.cNSCLC: non-small cell lung cancer.d AUC: area under the curve.e OD: original data.f STD: synthetic tabular data.g CTGAN: conditional tabular generative adversarial network.h CS: conditional sampling.i DC: divide and conquer.j The best results.k CopulaGAN: copula generative adversarial network.

Table 2 .
Validation results obtained using the DT a classifier: mean (SD) values of 5 experiments.

Table 3 .
Validation results obtained using the RF a classifier: mean (SD) values of 5 experiments.
a RF: random forest.

Table 4 .
Validation results obtained using the XGBoost a classifier: mean (SD) values of 5 experiments.CopulaGAN: copula generative adversarial network.

Table 5 .
Validation results obtained using the LGBM a classifier: mean (SD) values of 5 experiments.CopulaGAN: copula generative adversarial network.

Table 6 .
Summary of quality tests for the NSCLC a data set: mean (SD) values of 5 experiments.CTGAN: conditional tabular generative adversarial network.
d e CopulaGAN: copula generative adversarial network.f DC: divide and conquer.g The best results.

Table 7 .
Summary of quality tests for the breast cancer data set: mean (SD) values of 5 experiments.
a GAN: generative adversarial network.b CS: conditional sampling.c CTGAN: conditional tabular generative adversarial network.d CopulaGAN: copula generative adversarial network.e DC: divide and conquer.f The best results.

Table 8 .
Summary of quality tests for the diabetes data set: mean (SD) values of 5 experiments.CTGAN: conditional tabular generative adversarial network.
b CS: conditional sampling.c d CopulaGAN: copula generative adversarial network.e DC: divide and conquer.f The best results.