I'm learning about differential privacy. I understand the concept behind differential privacy, that you can add a small noise to the query to mask the true value using transformations like Laplace or exponential. I'm not able to grasp how can I use it to generate a synthetic dataset from real data for data analysis or machine learning.

Also, It will very helpful if someone can guide me towards papers or materials related to this.

  • $\begingroup$ Were you able to apply differential privacy to your dataset. In my case i also need that help and somehow the dataset is not the one to be represented in histogram or so. It is more likely dataset containing various information about clients. Name, sex, age, phone number, area, salary etc .. I want to make use of differential privacy and create another dataset so that i can publish it for use. Can you help me with steps to do so? thanks $\endgroup$ May 25, 2020 at 11:38
  • $\begingroup$ Did it, though results for my dataset were not good. $\endgroup$
    – pauli
    May 25, 2020 at 18:19
  • $\begingroup$ @pauli how did you verify the epsilon. e.g., you created the dataset with some e, and now you want to verify if the sanitized dataset is atleast e diff private. $\endgroup$
    – s510
    Mar 10, 2022 at 12:18

1 Answer 1


It depends on what your data looks like.

If you can see your data as a histogram (a list of tuples (data_point,frequency)), and you're mostly interested in high frequencies, the easiest is probably to use a technique like this one to get a $(\varepsilon,\delta)$-differentially private version of your data. Note that if each user can contribute several data points, you have to limit the contribution of a single user (drop all records except the first $k$), and scale the noise by $k$. If you're unhappy with a $\delta>0$, and you can describe the space of possible data points (which might be large but bounded), you can use the method described in this paper.

If your data doesn't look like a histogram, you might want to use a first step of generalization. For example, if each data point is a precise GPS location, each is likely to be unique, but you can replace them by bounding boxes instead. If you want some kind of adaptive generalization, to return bounding boxes of different sizes depending on how many people are in it, this paper proposes different techniques.

Finally, there are also techniques for special kinds of data where you can use domain-specific knowledge to get more realistic and useful synthetic data. One example is location traces, with algorithms such as this one or this one.

If your use case doesn't fit any of the cases above, I'd encourage you to give a more detailed explanation of what kind of data you want to generate.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.