tensorflow / tensorflow/privacy

A Question about Research mi_lira_2021: Why is logpdf used instead of logcdf?

Open
#598 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2k
Forks
477
Avg merge
22h 12m
Merged PRs (30d)
1

Description

Hi,
I have a question regarding how the score for the offline attack is calculated in the Research mi_lira_2021 code.

In the code the score is calculated using logpdf

score = scipy.stats.norm.logpdf(sc, mean_out, std_out+1e-30)

but if I understand correctly this does not match equation 4 in the paper that describes how the score should be calculated. The equation looks like this $\Lambda = 1- Pr[Z > \phi (f(x)_{y} ) ]$, where $Z \sim \mathcal{N} (\mu_o, \sigma^2_o)$ which should mean that cdf should be used and not pdf. Is there any particular reason for why the pdfis used in the implementation over cdf?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Research mi_lira_2021 implementation and reviewing the score calculation using scipy.stats.norm.logpdf. Compare that calculation with equation 4 in the cited paper and determine whether the implementation is intentional or should use the corresponding cumulative probability; done means resolving the discrepancy with a documented explanation or confirmed correction.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.