Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DP Sensitivity Calculation #1586

Open
eardic opened this issue Nov 8, 2023 · 1 comment
Open

DP Sensitivity Calculation #1586

eardic opened this issue Nov 8, 2023 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@eardic
Copy link

eardic commented Nov 8, 2023

Hi,

I don't understand how to set the sensitivity of DP to determine the noise level for the model weights. For example for a local dp process, can you recommend a way to compute sensitivity for this code block? In literature, it is said that sensitivity is computed by measuring the change in the output of the model by removing or changing an input.

class Laplace:

def __init__(self, *, epsilon, delta=0.0, sensitivity):
    self.scale = float(sensitivity) / (float(epsilon) - np.log(1 - float(delta)))

def compute_noise(self, size):
    return torch.tensor(np.random.laplace(loc=0.0, scale=self.scale, size=size))
@fedml-dimitris fedml-dimitris added the question Further information is requested label Nov 8, 2023
@han-shanshan
Copy link
Collaborator

Hi, it depends on the application and the privacy-accuracy trade-off. We will also release a new api that allows to define the laplace mechanism using the scale parameter soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants