Nearest neighbor (NN) is the sample in the training dataset that has the shortest distance to the sample of interest. Synthetic data needs to be as close as possible to the original data but not too close. To explore the closeness, for each synthetic data sample, the nearest neighbor sample in the original data can be found and the distribution of those distances can be used for testing the privacy of the generated synthetic data.