Reliability of Supervised Machine Learning Using Synthetic Data in Health Care: Model to Preserve Privacy for Data Sharing

Background: The exploitation of synthetic data in health care is at an early stage. Synthetic data could unlock the potential within health care datasets that are too sensitive for release. Several synthetic data generators have been developed to date; however, studies evaluating their efficacy and generalizability are scarce. Objective: This work sets out to understand the difference in performance of supervised machine learning models trained on synthetic data compared with those trained on real data. Methods: A total of 19 open health datasets were selected for experimental work. Synthetic data were generated using three synthetic data generators that apply classification and regression trees, parametric, and Bayesian network approaches. Real and synthetic data were used (separately) to train five supervised machine learning models: stochastic gradient descent, decision tree, k-nearest neighbors, random forest, and support vector machine. Models were tested only on real data to determine whether a model developed by training on synthetic data can used to accurately classify new, real examples. The impact of statistical disclosure control on model performance was also assessed. Results: A total of 92% of models trained on synthetic data have lower accuracy than those trained on real data. Tree-based models trained on synthetic data have deviations in accuracy from models trained on real data of 0.177 (18%) to 0.193 (19%), while other models have


Background
National health care departments hold volumes of data on patients and the population, and this information is not being used to its full potential due to valid privacy concerns.Machine learning has the potential to improve decisions and outcomes in health care, but these improvements have yet to be fully realized.The reasons may be related to issues facing many data scientists and researchers in this area: the limited availability of or access to data or the readiness of health care institutions to share data.Privacy concerns over personal data, and in particular health care data, means that although the data exist, they are deemed too sensitive for public release [1], even for research purposes.
One way to overcome the issue of data availability is to use fully synthetic data as an alternative to real data.The exploitation of synthetic data in health care is at an early stage and gaining attention.Synthetic data are simulated from real data by using the underlying statistical properties of the real data to produce synthetic datasets that exhibit these same statistical properties.Synthetic data can represent the population in the original data while avoiding any divulgence of real personal, potentially confidential, and sensitive data.In the case of health-related data, this would ensure that actual patient records are not disclosed thus avoiding governance and confidentiality issues.There are three types of synthetic data: fully synthetic, partially synthetic, and hybrid synthetic.This work considers fully synthetic data that does not contain original data.
Synthetic data can be used in two ways: to augment an existing dataset thus increasing its size, for times when a dataset is unbalanced due to the limited occurrence of an event or when more examples are required [2,3] and to generate a fully synthetic dataset that is representative of the original dataset, for times when data are not available due to their sensitive nature [4].The latter is considered in this work as a key requirement for health care data sharing.
Traditionally, data perturbation techniques such as data swapping, data masking, cell suppression, and adding noise have been applied to real data to modify and thus protect the data from disclosure prior to releasing it.However, such methods do not eliminate disclosure risk and can impact the utility of the data, particularly if multivariate relationships are not considered [5].Synthetic data was first proposed by Rubin [6] and Little [7].Raghunathan et al [8] implemented and extended upon this, pioneering the multiple imputation approach to synthetic data generation, exemplified in a range of studies [9][10][11][12][13][14]. Reiter [15] then introduced an alternative method of synthesizing data through a nonparametric tree-based technique that uses classification and regression trees (CART).A more recent technique proposes a Bayesian network approach for synthetic data generation [16].Synthetic data is considered a secure approach for enabling public release of sensitive data as it goes beyond traditional deidentification methods by generating a fake dataset that does not contain any of the original, identifiable information from which it was generated, while retaining the valid statistical properties of the real data.Therefore, the risk of reverse engineering or disclosure of a real person is considered to be unlikely [17].
While a number of synthetic data generators have been developed, empirical evidence of their efficacy has not been fully explored.This work extends a preliminary study [18] and investigates whether fully synthetic data can preserve the hidden complex patterns supervised machine learning can uncover from real data and therefore whether it can be used as a valid alternative to real data when developing eHealth apps and health care policy making solutions.This will be achieved by experimenting with a range of open health care datasets.Synthetic data will be generated using three well-known synthetic data generation techniques.Supervised machine learning algorithms will be used to validate the performance of the synthetic datasets.Statistical disclosure control (SDC) methods that can further decrease the disclosure risk associated with synthetic data will also be considered.

Overview
To inform the viability of the use of synthetic data as a valid and reliable alternative to real data in the health care domain, we will answer the following research questions: • What is the differential in performance when using synthetic data versus real data for training and testing supervised machine learning models?
• What is the variance of absolute difference of accuracies between machine learning models training on real and synthetic datasets?
• How often does the winning machine learning technique change when training using real data to training using synthetic data?
• What is the impact of SDC (ie, privacy protection) measures on the utility of synthetic data (ie, similarity to real data)?
To answer these questions, 19 open health care datasets containing both categorical and numerical data were selected for experimentation [19].Synthetic datasets were generated for each dataset using three popular synthetic data generators that apply CART [15,17], parametric [8,17], and Bayesian network [16] approaches to enable a robust comparison of the three synthetic data generation techniques across a broad range of data.
Initially, we analyzed whether the multivariate relationships that exist in the real data were preserved in the synthetic versions of the data for data generated using each of the three synthetic data generation techniques by computing pairwise mutual information scores for each variable pair combination in each dataset [16].It is important that such relationships are retained when data are synthesized.
To evaluate the utility of synthetic data for machine learning, we then investigated the performance of supervised machine learning models trained on synthetic data and tested on real data compared with models trained on real data and also tested on the real data.This allowed us to determine if a model developed using synthetic data can classify real data examples as accurately and reliably as a model developed using real data.We considered five supervised machine learning models to compare performance and determine if there were differences in robustness across the models.Standard evaluation metrics were computed for models trained on real and synthetic data, for each machine learning model, and for each dataset [20].The differences in accuracy for models trained on synthetic data versus models trained on real data were computed to analyze the extent to which synthetic data causes a degradation in model performance, if any.
It is pertinent that the optimal machine learning model built using synthetic data matches the optimal machine learning model that would be selected if real data were used in the model training process.This would provide stakeholders in health care with confidence in the use of synthetic data for model development.Thus, we considered how often the best machine learning classifier built using synthetic data matches the best machine learning model built using real data.
Finally, the impact of a number of SDC methods on model performance was assessed.SDC methods seek to further enhance data privacy; however, this can lead to a loss in usefulness of the data [21], and we considered the extent to which performance degradation occurs as a result of SDC.This large-scale assessment of the reliability of synthetic data when used for supervised machine learning using 19 health care datasets and 3 synthetic data generation techniques provides an important contribution in relation to the trust and confidence that stakeholders in health care can have in synthetic data.We also propose a pipeline to illustrate how synthetic data can potentially fit within the health care provider context.This work demonstrates the promising performance of synthetic data while highlighting its limitations and future work directions to overcome them.

Synthetic Data: Present and Future Use
The validity and disclosure risk associated with synthetic data has been under investigation by the US Census Bureau since 2003 for the purpose of creating public use data from a combination of sensitive data from the Census Bureau's Survey of Income and Program Participation, the Internal Revenue Service's individual lifetime earnings data, and the Social Security Administration's individual benefit data [22,23].The goal was to enable the release of synthesized person-level records containing personal and financial characteristics from confidential datasets while preserving privacy.Successful results have led to the release of public use synthetic data files.Researchers can have their work validated against the gold standard (real) data by the Census Bureau, thus enabling them to determine the impact of synthetic data on their exploratory analyses and model development and have confidence in their results while also allowing the Census Bureau to continuously improve their synthesis techniques.The public release of this data has provided significant benefit to the research community and general population, enabling more extensive economic policy research to be performed by groups who could not previously access useful data [24][25][26][27][28][29].This work led to the release of further synthetic datasets by the Census Bureau.The Synthetic Longitudinal Business Database comprises data from an annual economic census of establishments in the United States [30].This dataset provides broad access to rich data that supports the research and policy-making communities in business-and employment-related topics.OnTheMap is a tool using synthetic data to provide information on US citizens such as workforce-related maps, demographic profiles, and reports on analyses of information including the location and characteristics of workers living or working in selected areas, the distance and direction totals between residence and employment locations for workers in selected areas, and disaster event information and the impact of such events on workers and employers [31].Similarly, synthetic data has also been under investigation in the United Kingdom as a means to provide public access to rich data from UK longitudinal studies [32][33][34] that contain highly sensitive data linking national census data to administrative data for individuals and their families.
These datasets enable researchers to explore data and develop and test code and models outside the secure environment where real data reside with no restrictions while the data owners provide a mechanism where results, code, and models can be validated on behalf of researchers on the real data within the secure environment and feedback provided.This process increases research productivity while ensuring the development of robust and valid models [35].
While synthetic data have been used to accelerate and democratize business and economic policy research [22][23][24][25][26][27][28][29][30][31][32][33][34][35], the process is not currently in use for health care research, an area that could benefit enormously.With advancements in technology, particularly machine learning and artificial intelligence (AI), the potential to develop diagnostic tools for clinicians and data driven decision-making platforms for health policy-makers is ever increasing [36,37].Such tools require access to health care data, for example, to train AI algorithms and produce models that can identify health conditions and health-related patterns across the population.Currently, it can take a lengthy period of time for researchers to gain access to health care data, a rich and underused resource, due to privacy concerns [38][39][40][41][42].For example, in the case of the 40-month Meaningful Integration of Data, Analytics, and Services (MIDAS) Project [36,43] developing a data-driven decision-making tool for health care policy makers, it took more than 20 months to obtain access to the required data due to legal and ethical constraints.In addition, a number of important data variables could not made available, which restricted the utility of the platform under development.With the help of synthetic data, such data, with more or all variables included, could have been made available in a matter of weeks, thus providing more time for development and evaluation of the platform.The platform could then have been installed in health care sites more quickly and connected to real data for validation and comparison of performance for synthetic versus real data, enabling performance tweaks to mitigate bias introduced by synthetic XSL • FO RenderX data, if any.Synthetic data could also enable cross-site analytics in various health regions that would enable policy makers to connect their health spaces and potentially provide significant enhancements to cross-national health policy.
The ultimate goal of this work was to further assess the validity and disclosure risk of synthetic data under the stringent conditions associated with health care data with the view to successfully developing a pipeline for use in health care that enables synthetic datasets to be released publicly to researchers, who would otherwise not be able to access the data or access it in a timely fashion, in order to accelerate research by enabling the wider research community to use the data for analysis and model development.The results of such analyses and the models and code developed can then be given to health care departments for validation on the real data and, if effective, put into use by clinicians and health policy-makers.

Synthetic Data Pipeline for Health Care
To understand how health care departments can benefit from synthetic data, we propose the pipeline shown in Figure 1.This is a proposed synthetic data-sharing pipeline provided as an illustration of how synthetic data can potentially work within a real health care setting to expedite data analytics.In future work, we plan to test this pipeline in a real setting.In this pipeline, real data reside within the national health care department infrastructure.The data cannot be shared externally due to the sensitive and private nature.Health care departments may only have a small number of data science staff with the expertise necessary to apply machine learning techniques to many of their datasets, so they cannot maximize the use of their data or discover the potential use of the data due to lack of resources.By applying a synthetic data generation technique to the real data along with SDC measures, a synthetic dataset can be produced and made available to the external research community in place of the real data.External researchers, in large numbers and with wide-ranging expertise, can potentially develop optimal machine learning models trained on the synthetic data and share the performance of the machine learning model, the model itself, and the model specification with the national health care department.The health care department can then test the machine learning model on real data, or in-house technical staff can rebuild the model according to the specification provided by researchers including the program code written by researchers, details of the machine learning algorithm to use (eg, decision tree [DT], support vector machine [SVM]), and the optimal hyperparameter settings determined during development.Using these settings, the model can be rebuilt, this time by training on the real data instead of synthetic data, to which in-house staff have access.

Dataset Selection
For experimentation, 19 open health care datasets have been selected from the University of California Irvine Machine Learning Repository [19].Missing values have been removed from the datasets either by removing features with a high number of missing values or removing observations where a feature contains a missing value.The experimental datasets and their properties are summarized in Table 1.These datasets were selected to enable an analysis of synthetic data performance when applied to datasets of differing volume and data types (categorical and numerical).a Each dataset has been encoded with a letter (column 1) and will be referenced using this letter for the remainder of the paper.

Generating Synthetic Data
In this work, we analyzed and assessed the performance of three publicly available synthetic data generation techniques that are based on well known, seminal work in the area [6][7][8][9][10]15,16]: a parametric data synthesis technique, a nonparametric tree-based synthesis technique that uses CART [15], and a synthesis technique that uses Bayesian networks [16].While other approaches exist, some are developed for specific datasets and problems (eg, SimPop simulates population survey data [44], and Synthea simulates patient population and electronic health record data [45]), whereas these techniques are considered to be more general.The R package Synthpop, developed by Nowak et al [17], provides a publicly available implementation of the parametric-and CART-based synthetic data generators.The DataSynthesizer python implementation, developed by Ping et al [16], provides a publicly available implementation of the Bayesian network-based synthetic data generator.These implementations have been used in this experimental work.
Attributes were synthesized sequentially in both the parametric and CART methods.The synthetic values for the first attribute were synthesized using a random sample from the original observed data since it has no predictors from previously synthesized attributes in the dataset.When synthesizing attributes, both categorical and numerical, with the nonparametric method, the CART method was applied.CART was applied to all variables that had predictors (ie, attributes prior to them in the sequence) and drew from the conditional distributions fitted to the original data using CART models.The parametric method synthesizes attributes based on data type.Numerical attributes were synthesized using normal linear regression.Categorical attributes were synthesized using polytomous logistic regression where the attribute had more than two levels, and logistic regression was applied to synthesize binary categorical variables [17].The Bayesian network method of synthesizing data learned a differentially private Bayesian network that captured correlation structure between attributes in the real data and drew samples from this model to produce synthetic data [16].

Supervised Machine Learning With Real and Synthetic Data
A key measure of data utility of a synthetic dataset for the purpose of machine learning is to determine how well a supervised machine learning model trained on synthetic data performs when tasked with classifying real data.This determines whether supervised machine learning models will be robust enough to classify real data examples if only synthetic data are provided for the training of these models.
To evaluate whether synthetic datasets could be used as a valid alternative to real datasets in machine learning, for each of the Initially, the models were trained and tested on the real data to obtain a performance benchmark.Subsequently, a classifier was trained on each of the synthetic datasets, generated using parametric, CART and Bayesian network techniques, and then tested with the real data.Models were tested on real data only to determine whether a model developed by training on synthetic data can be put into use by health care departments and used to accurately classify new, real examples.
The range of models applied to each dataset were stochastic gradient descent DT, k-nearest neighbors (KNN), random forest (RF), and SVM.This selection of algorithms was applied to determine how well each performed when trained with the real data compared with the synthetic data, with both tested on real data.
The classifiers were implemented using Python's Scikit-Learn 0.21.3 machine learning library and are as follows: • Stochastic gradient descent classification was implemented using SGDClassifier, a simple linear classifier, with loss="hinge," random_state=0 and all other parameters set to their defaults • DT classification was implemented using DecisionTreeClassifier, an optimized version of CART, with criterion="gini," max_depth=10, and random_state=0 and all other parameters set to their defaults • K-nearest neighbors classification was implemented using KNeighborsClassifier with n_neighbors=10, weights="uniform," leaf_size=30, p=2, metric="minkowski," n_jobs=2 and all other parameters set to their defaults • RF classification was implemented using RandomForestClassifier with criterion="gini," max_depth=10, min_samples_split=2, n_estimators=10, random_state=1 and all other parameters set to their defaults • SVM classification was implemented using SVC with C=1.0, degree=3, kernel="rbf," probability=True, random_state=None and all other parameters set to their defaults For training and testing, Python's Scikit-Learn 0.21.3ShuffleSplit random permutation cross-validator was used with 10 splitting iterations and a train/test split of 75/25.Categorical attributes were transformed into indicator attributes using one-hot encoding.

Statistical Disclosure Control
Synthetic data are considered not to contain real units and therefore the risk of disclosure of a real person is considered to be unlikely [46].While unlikely, the scenario where some of the generated synthetic data are very similar to the real data resulting in potential disclosure risk must be considered, and where additional protections can be applied to synthetic data, it is recommended to do so.Additional SDC measures beyond data synthesis can be applied as a precautionary measure to add further protections to synthetic data by reducing the risk of reproducing real-person records and replicating outlier data, thus further minimizing the risk of disclosure.There are two broad categories of SDC; rules-based SDC consists of a set of fixed rules governing what data can or cannot be released (eg, a rule setting a specific minimum frequency threshold on a dataset in order for it to be released) and principles-based SDC consists of a broader assessment of risk for a dataset to determine whether it is safe for release (eg, in the case where a specific rule on thresholds may not be applicable because the data cannot be linked back to individuals or in cases where thresholds are not enough to protect individuals from reidentification [47]).SDC measures can be applied, evaluated, and reparameterized as part of the penetration and reidentification testing that health care providers would apply before releasing a synthesized dataset.
The following SDC methods, appropriate for rules-based SDC, have been considered and applied in experimental work to determine their effect on data utility: • Minimum leaf size (CART method specific): for the CART method, a minimum final leaf node size can be set to avoid the risk of final nodes containing small numbers of records, thus increasing the risk of producing real records (and thus real-person data) in the synthesized data.In SDC experiments, this is set to 10.

Smoothing:
smoothing can be applied to continuous/numerical fields in the synthesized data to reduce the risk of releasing unusual/outlier data.In SDC experiments, gaussian kernel density smoothing is applied to numerical attributes only.
• Unique removal: unique records with variable sequences that are identical to records in the real dataset can be removed.In SDC experiments, this has been applied to synthetic data.
Each of these SDC techniques have been applied to the datasets generated using the CART technique, and the smoothing and unique removal techniques have been applied to datasets generated using the parametric technique.SDC methods have not been applied to data synthesized using the Bayesian network technique.

Comparison of Variable Relationships
Within a dataset, relationships can exist between variables.When data are synthesized, we wish to determine whether these relationships are preserved and where they are not preserved, whether this relates to the synthesis technique or structure of the dataset.An analysis of these linear relationships was performed by computing the normalized pairwise mutual information score between each pair of attributes.This is a measure of association or similarity where a higher score indicates a greater association between two attributes.Figure 2 provides a visual representation of the normalized pairwise mutual information scores in adjacency heatmaps for each of the 19 datasets (listed in column 1) and enables visual determination of whether the associations found in the real datasets (column 2) are similar to the associations in the synthetic datasets (columns 3-5) for each of the three synthetic data generators.The relationships between variables changed slightly in synthetic data generated using the CART and parametric techniques for datasets C-G, I-K, and S, with decreased correlations observed between attribute pairs.These datasets contain mainly and in some cases only numerical attributes.The relationships were largely preserved for the other datasets, which contain mainly and in some cases only categorical attributes, with the exception of dataset A, which contains only numerical attributes.
The relationships between variables also changed slightly in a number of datasets synthesized using the Bayesian network technique (eg, E-G, I-L, N, P-S), with increased correlations observed between attribute pairs.The relationships were largely preserved in datasets B-D, M, and O, while a slight decrease in correlations between attribute pairs was observed for datasets A and H.In this case, the changes cannot be attributed to a particular data type.

Performance Comparison
To compare the performance of each model when trained on the synthetic data and tested with the real data, a variety of evaluation metrics were used.The accuracy, precision, recall, and F1 score were computed to determine performance.
The accuracy scores for five machine learning models are shown in Table 2 for datasets A through S. Accuracy scores for models trained on the real data and synthetic data are shown where synthetic data is generated using CART, parametric, and Bayesian network techniques, respectively.The accuracy of the models when trained on synthetic data is lower than the accuracy when trained on real data in 92% (263/285) of cases (ie, machine learning results are less accurate for synthetic data in 92% of cases; Table 3).
Although the accuracy decreases in most cases when using synthetic models, this reduction in accuracy is small.The mean absolute difference in accuracy in models trained with synthetic data across all three synthesizing techniques is lowest for SVM, SGD, and KNN models at 0.058 (6%), 0.064 (6%), and 0.072 (7%), respectively.RF and DT models have larger deviations in accuracy at 0.177 (18%) and 0.193 (19%), respectively (Table 4).This pattern is also consistent when considering results for each of the three synthetic data generators separately.These results are illustrated in the boxplots in Figure 3.The mean absolute difference may provide a reliable indicator of the expected decrease in accuracy in supervised machine learning models when developed using synthetic data.A small yet consistent difference in accuracy is expected and manageable between real and synthetic data.
In addition to accuracy scores, we consider changes to precision, recall, and F1 scores.Precision, recall, and F1 scores decrease in almost all models and for data generated with each synthetic data technique across all 19 datasets (Figure 4).These decreases indicate that the models generated with synthetic data have a higher rate of false-positive and false-negative predictions than models trained with real data.Decreases in precision, recall, and F1 are larger in DT and RF models, consistent with changes in accuracy scores; however, the changes are larger than changes in accuracy for these models.The variance in precision, recall, and F1 differences are also more notable in models trained with synthetic data generated using the Bayesian network approach with less problematic decreases observed in models trained with synthetic data generated using the CART and parametric approaches.recall (d-f), and F1 (g-i) scores for each machine learning model when trained on synthetic data (from 19 datasets) generated using classification and regression tree (a, d, g), parametric (b, e, h) and Bayesian network (c, f, i) approaches, compared with models trained using real data.

Winning Classifier
In the pipeline described previously, health care departments may wish to release synthetic versions of data to the wider research community for the development of an optimal machine learning model-for example, they may wish to determine the best classifier to use on their real data by making use of the wider range of expertise and scale the external research community can provide.The researchers would be expected to train and test various models and hyperparameters to find the best solution.The researchers would then return a model and/or model specification to the health departments, enabling them to test the model on real data and/or enabling a health department's technical staff to recreate a version of the model, this time trained on the real data to which in-house staff have access.Health departments would have the expectation that this would be the same model determined if real data had been used to develop the best model (ie, it would have been the "winning" model when trained on either synthetic or real data).
We compared the winning classifier when trained and tested on real data with the winning classifier when trained on synthetic data and tested on real data.Table 2 lists the winning classifier (marked as W on each row) for each dataset when trained with real and synthetic data and when tested on the real data.
The winning classifier when trained on real data matches the winning classifier when trained on synthetic data in only 26% (5/19) of cases for synthetic data generated using the CART and parametric methods, and in just 21% (4/19) of cases on data synthesized using the Bayesian network technique (Table 5).The DT classifier is most often the winning classifier, in 14/19 datasets, when real data are used to train and test the model, but DT is not the best classifier on synthetic data, winning in only 11/57 cases (Table 2).Tree-based methods (DT and RF) are the winning classifier on real data in 18/19 cases (95%).If we remove DTs from this analysis, the cases where the winning classifier when trained on synthetic data matches the winning classifier when trained on real data almost doubles, increasing to 53% (10/19) of cases for synthetic data generated using each of the three synthesizing techniques (Table 5).

RenderX
With DTs removed, RF models are now the most frequent winners (18/19) when real data are used to train and test the model.In this case, RF models produce the winning classifier in 32/57 cases (Table 2).If we further remove RFs from this analysis and do not consider tree-based classifiers, cases where the winning classifier when trained on synthetic data matches the winning classifier when trained on real data increases from 53% to 74% (14/19) and 68% (13/19) for data synthesized using CART and Bayesian network techniques, respectively, and remains unchanged for data generated using the parametric technique (Table 5).
A chi-square test is applied with the following null and alternative hypotheses: • H0: the number of winning classifier matches is equal across all sets of classifiers.
• H1: the number of winning classifier matches increases when DT and RF classifiers are removed.
The level of significance adopted for hypothesis testing is .05for all tests performed.The null hypothesis is rejected when the tree-based models (DTs and RFs) are removed (ie, from 5 to 3 classifiers) for data synthesized using the CART and Bayesian network methods (Table 6).Therefore, a significant difference in the matching winning classifiers is observed when tree-based classifiers are removed for these two synthesizing techniques.The null hypothesis could not be rejected in all other cases.Table 6.Results of chi-square analysis of the difference in matching winning classifiers for models trained on real versus synthetic data.

Impact of Statistical Disclosure Control
The impact of SDC methods on data utility is considered across all datasets.Table 7 illustrates the effect on model accuracy of applying smoothing (numeric attributes only), removal of unique records, and limiting the minimum leaf size (CART models only) to all synthetic datasets where each method is applicable.

Smoothing (n=150)
to parametric and CART methods only.Smoothing applied to datasets with numeric attributes only.Minimum leaf size for CART is applicable to CART only.b SGD: stochastic gradient descent.In most cases, the machine learning model accuracy decreases when SDC measures are applied to the synthetic data used to train the models.Decreases in accuracy are observed in all DT and RF models and in 83% (72/87), 92% (80/87), and 84% (73/87) of SGD, KNN, and SVM models, respectively.In a small number of cases across SGD, KNN, and SVM models trained on synthetic data with SDC measures applied, no change or a slight increase in accuracy compared with models trained on real data with no SDC measures applied was observed.
The mean absolute difference in accuracy when SDC measures are applied to the training data (compared with machine learning models trained on real data) is small across all machine learning models and for all SDC techniques (Table 8).DT and RF models have the largest difference in accuracy, consistent with earlier results of these models trained on synthetic data with no SDC measures applied.The accuracy decreases are consistent across each SDC measure with no SDC measure affecting data utility more notably than any other.These results are also illustrated in the boxplots in Figure 5. Precision, recall, and F1 scores are also consistent with earlier results when no SDC measures are applied.We therefore consider that the SDC techniques investigated do not have a notable impact on data utility beyond what the standard synthesizers have.We also compare the winning classifier when trained on real data with the winning classifier when trained on synthetic data with SDC applied (Table 9).The winning classifier when trained on synthetic data with SDC applied matches the winning classifier when trained on synthetic data in only 25% (22/87) of cases, consistent with earlier results when SDC measures are not applied.Similar results are observed when each SDC measure is considered individually with the winning classifier matching in models trained with real data compared with models trained using synthetic data with SDC measures of smoothing, unique removal, and minimum leaf size in 27% (8/30), 24% (9/38), and 26% (5/19) of cases, respectively.
Consistent with results in the previous section where SDC measures were not applied, removing tree-based classifiers (DT and RF) from the analysis increases the matches in winning classifiers trained on real compared with synthetic data by 13.3, 36.8, and 36.9 percentage points for each of the SDC measures of smoothing, unique removal, and minimum leaf size, respectively.Overall, an increase of 28.7 percentage points is observed for all SDC measures when tree-based classifiers are removed.A chi-square test is applied with the following null and alternative hypotheses: • H0: the number of winning classifier matches is equal across all sets of classifiers where SDC measures are applied.
• H1: the number of winning classifier matches increases when DT and RF classifiers are removed where SDC measures are applied.
The level of significance adopted for hypothesis testing is .05for all tests performed (α=.05).
The null hypothesis is rejected when the tree-based models (DTs and RFs) are removed (ie, from 5 to 3 classifiers) for data synthesized with the SDC measure of unique removal applied (Table 10).Therefore, a significant difference in the matching winning classifiers is observed when tree-based classifiers are removed for this SDC measure.The null hypothesis could not be rejected in all other cases.

Principal Findings
The need for synthetic data, particularly in the health care domain, is gaining increasing attention as privacy protection mechanisms are increasingly failing to protect modern data.Due to valid privacy concerns, it is often difficult or impossible to release real health care data thus impeding critical machine learning research that can make use of this data to drive improved patient outcomes and health policy decision-making.Synthetic data has the potential to overcome data availability issues, providing a valid alternative to real data.A small number of synthetic data generators have been proposed in the literature; however, evidence of their efficacy across a large number of datasets and for use in machine learning is thin on the ground.This work has explored the use of fully synthetic data across 19 health care datasets.Three well-known synthetic data generators have been considered where data is generated using CART, parametric, and Bayesian network techniques.A number of research questions have been answered.

What Is the Differential in Performance When Using Synthetic Data Versus Real Data for Training and Testing Supervised Machine Learning Models?
Compared with models trained and tested on real data, almost all machine learning models have a slightly lower accuracy when trained on synthetic data and tested on real data across all synthesizers and for all machine learning models analyzed; however, the average decrease in accuracy was small in all cases.Although still small, DT and RF models had a larger decrease and variance in accuracy than SGD, KNN, and SVM models.In addition to accuracy, an analysis of precision, recall, and F1 scores also showed decreases in scores in models trained with synthetic data, with Bayesian network-generated data resulting in more variance than data generated using CART and parametric techniques.

What Is the Variance of Absolute Difference of Accuracies Between Machine Learning Models Training on Real and Synthetic Datasets?
The mean absolute difference was consistently small across all models and synthetic datasets suggesting that these values could provide a reliable indicator of the expected decrease in accuracy in supervised machine learning models when developed using synthetic data.Health care departments could expect a manageable small yet consistent decrease in accuracy between real and synthetic data.

How Often Does the Winning Machine Learning Technique Change When Training Using Real Data to Training Using Synthetic Data?
The winning classifier when trained on synthetic data matched the winning classifier when trained on synthetic data in only 26% of cases for synthetic data generated using the CART and parametric methods and in just 21% of cases on data synthesized using the Bayesian network technique across the five machine learning models considered (SGD, DT, KNN, RF, and SVM).Tree-based methods were typically the winning classifier for models trained on real data; however, this was often not the case for models trained on synthetic data.When tree-based models were not considered, the winning classifier when trained on real data matched the winning classifier when trained on synthetic data in 74%, 53%, and 68% of cases for synthetic data generated using the CART, parametric, and Bayesian network approaches, respectively.It would appear that tree-based classifiers have some sensitivity to synthetic data, and the underlying cause requires further investigation.

What Is the Impact of Statistical Disclosure Control (ie, Privacy Protection) Measures on the Utility of Synthetic Data (ie, Similarity to Real Data)?
The average change in accuracy when SDC measures are applied to the training data was small across all machine learning models and for all SDC techniques.Again, tree-based models produced the largest decrease in accuracy across all SDC techniques.This is attributed to the synthetic data generation method and not the SDC measures, in line with previous results where SDC measures were not applied.We therefore conclude that the SDC techniques considered do not have a notable impact on data utility beyond what the synthetic data generation methods alone produce.

Limitations
This work has considered the impact of synthetic data on data utility when the data are used to train supervised machine learning algorithms.Further investigation with a broader range of machine learning algorithms, supervised and unsupervised, and including hyperparameter optimization is required.Such studies should cover an even larger range of datasets including, if possible, real health care department case studies.
Disclosure risk must also be explored in more detail.The impact of SDC measures on data utility has been considered in this work.Disclosure risk must also be measured across synthetic datasets, and a comparison of the data utility and disclosure risk trade-off should be performed.

Policy and Practice Implications
A wealth of rich health care data exists with the potential to provide new insights for the prevention of diseases, development of personalized medicine, and support of healthy life across the population.These data are held by health care data gatekeepers (eg, national health care departments) and are generally prevented from release, even for research purposes, due to justifiable privacy concerns around the protection of personal data, ethics, and in guaranteeing citizens' fundamental rights and freedoms.
Data sharing and data use demand careful governance, with legislation such as General Data Protection Regulation and the EU-US Privacy Shield placing increasingly stringent guidelines on data management.Data gatekeepers must manage myriad issues in relation to the nature of the data (eg, categories of sensitive data) and descriptions of the technical characteristics of processed data, as well as sharing and management of the data (eg, fair acquisition, data processing and data retention policies, legal basis for information processing, appropriate security measures) and the configuration of information systems that store and process the data.
From a health care perspective, a range of technical solutions using state-of-the-art machine learning could be developed using health care data with the potential to derive knowledge that can inform and enhance health care policy decision making and risk stratification [36,48].Such tools can have a positive impact on health policy and practice, meeting the aims of national health departments, for example, as stated by the Department of Health Permanent Secretary in Northern Ireland, Richard Pengelly, in support of the MIDAS project, "the Department seeks to improve the health and social wellbeing of the people of NI, reduce health inequalities, and to assure the provision of appropriate health and social care services in clinical settings and in the community." Accessing health care data to develop such tools is complex, involving a lengthy legal and ethical process, and in some cases access is impossible.Synthetic data can potentially overcome the barriers to accessing data and the need for compliance with data protection legislation as they infringe no privacy or confidentiality while remaining durable, reusable, shareable, clean, and potentially reliable as highlighted by Floridi [49], thus accelerating the development of machine learning to inform health care policy.Synthetic data also provide the opportunity to democratize the application of machine learning to health data for the benefit of patients and citizens enabling a larger community to leverage the power of machine learning in health care.
There is an increasing need for the development and evaluation of a robust and trustworthy synthetic data generator.Policy makers and clinicians who base decisions on models developed with synthetic datasets must be able to do so with the assurance that any knowledge elicited is very likely to be reflected in the real data.Using synthetic datasets to facilitate machine learning without disclosing sensitive data has the potential to revolutionize health care research and policy making in an impactful way by unlocking key research data in a secure way XSL • FO RenderX that could drive improvements in population health and well-being much more quickly than is currently observed.

Conclusions
This work considers the efficacy of synthetic data for training supervised machine learning models for use by health care departments.The results are promising with small decreases in accuracy observed in models trained with synthetic data compared with those trained using real data.This work will be further extended to assist in the development of standard baselines for health care departments when using synthetic data (eg, an expected and acceptable decrease in accuracy) and synthetic data generators that can be trusted to produce the same winning model as that which would be produced by real data.

Figure 1 .
Figure 1.Proposed synthetic data sharing pipeline illustrates how synthetic data could be implemented to expedite health care data analytics.

Figure 2 .
Figure2.Pairwise mutual information for the real and synthetic datasets.These adjacency heat maps provide an efficient approach to visually determine whether the associations in the real datasets are similar to the associations in the corresponding synthetic datasets.Column 1 indicates the dataset, columns 2 indicates the pairwise mutual information for the real data, and columns 3-5 indicate the pairwise mutual information for synthetic datasets generated using CART, parametric and Bayesian network approaches, respectively.
b DT: decision tree.c KNN: k-nearest neighbors.d RF: random forest.e SVM: support vector machine.f CART: classification and regression trees.

Figure 3 .
Figure 3. Overall change in accuracy for each machine learning model when trained on synthetic data across 19 datasets and 3 synthetic data approaches where classification and regression tree (a), parametric (b), Bayesian network (c), and all approaches combined (d), compared with models trained using real data.

Figure 4 .
Figure 4.Overall change in precision (a-c), recall (d-f), and F1 (g-i) scores for each machine learning model when trained on synthetic data (from 19 datasets) generated using classification and regression tree (a, d, g), parametric (b, e, h) and Bayesian network (c, f, i) approaches, compared with models trained using real data.
decision tree.b RF: random forest.c CART: classification ans regression trees.
c DT: decision tree.d KNN: k-nearest neighbors.e RF: random forest.f SVM: support vector machine.
b SGD: stochastic gradient descent.c DT: decision tree.d KNN: k-nearest neighbors.e RF: random forest.f SVM: support vector machine.

Figure 5 .
Figure 5. Overall change in accuracy for each machine learning model when trained on synthetic data across 19 datasets and 2 synthetic data approaches (classification and regression tree [CART] and parametric) and with statistical disclosure control measures applied where smoothing (a; numeric attributes only), unique removal (b), minimum leaf size constrained (c; for CART synthesizer only), and all approaches combined (d), compared with models trained using real data.

Table 1 .
Summary of experimental datasets.

Table 2 .
Comparison of accuracy scores of five supervised machine learning models trained on real data and synthetic data across 19 datasets.Increase or decrease in accuracy compared with the model trained on real data shown in parentheses.

Table 4 .
Mean absolute difference in accuracy for each machine learning model and synthetic data type.
a SGD: stochastic gradient descent.

Table 5 .
Number of instances where the winning classifier trained on synthetic data matches the winning classifier trained on real data across 19 datasets.
b RF: random forest.cCART: classification and regression trees.

Table 7 .
Changes in accuracy for each machine learning model and with statistical disclosure control applied.

Table 8 .
Mean absolute difference in accuracy for each machine learning model and statistical disclosure control type.

Table 9 .
Number of instances where the winning classifier trained on synthetic data with statistical disclosure control applied matches the winning classifier trained on real data across 19 datasets.
b RF: random forest.

Table 10 .
Results of chi-square analysis of the difference in matching winning classifiers for models trained on real versus synthetic data with statistical disclosure control applied.
a DT: decision tree.bRF: random forest.