0
$\begingroup$

I think I am getting confused about the difference to just add noise, and differential privacy.

I am trying to implement differential privacy according to this research paper: https://ieeexplore.ieee.org/document/6544872 Unfortunately I cannot share the paper because it is licensed. For the purpose of this post, it is sufficient to say that the geospatial area is divided into even grids (lets say 10x10), and noise is added to the count of people located in each grid - giving a noisy count in each grid.

There is further work for a level 2 grid, but I will ignore that in this question.

If I understand differential privacy correctly, it should only ever add 1 or 0 people to a grid. But when I calculate the noise I am getting some very large numbers sometimes.

I wrote a little test to visualise the spread of noise for 1000 numbers, and as you can see the distribution is wide.

I have a similar problem if I want to add noise to a GPS co-ordinate to cloak the location. I really only want the noise to be in a 5km radius - so how to I bound that? Or to put it electronics speak, how do I limit the amplitude of the noise? Am I even thinking about this the correct way?

import numpy as np
import matplotlib.pyplot as plt
from diffprivlib.mechanisms import Laplace

# sensitivity is 1 because changing any one of the entries in the "database" causes the 
# output of the function to change by either zero or one. E.g. Change a checked-in person to not checked in.
lp = Laplace(epsilon=0.5, sensitivity=1, delta = 0)

# This is what I think I need to do to generate a single noisy number around the number 5.
# Is this the correct way? If so, how do you limit the amplitude of the noise
print(f"Add noise to the number 5: {lp.randomise(5)}" )

tst_array1 = np.array([])
for i in range(100):
    tst_array1  = np.append(tst_array1,[lp.randomise(0)])
#print(tst_array)
print(f"Max: {np.amax(tst_array1)}")
print(f"Min: {np.amin(tst_array1)}")
count, bins, ignored = plt.hist(tst_array1, bins=30, density=False)
plt.show()
$\endgroup$
1
  • $\begingroup$ A small update to the question. It appears delta achieves what I am looking for. E.g. lp = Laplace(epsilon=0.5, sensitivity=1, delta = 0.9999999999) But I cannot correlate the value of delta to the spread of the noise distribution. $\endgroup$
    – Bryon
    May 30 '21 at 5:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.