Differential privacy
The objective of differential privacy is to ensure that the removal or addition of individual data points does not affect the outcome of the modeling. For example, by adding random noise to a normal distribution, it tries to make the features of individual data points obscure. The effect of noise in learning could be eliminated based on the law of large numbers (Dekking et al., 2005) if a large number of data points is accessible. To better understand this concept, we want to generate a random list of numbers and add noise to them from a normal distribution to help you better understand why this technique works. In this process, we will also define some widely used technical terminology.
We first define a function called gaussian_add_noise()
to add Gaussian noise to a query list of values:
def gaussian_add_noise(query_result: float, sensitivity: float, epsilon: float): std_dev = sensitivity...