隱私預算

Data Privacy and Anonymization in Python

Rebeca Gonzalez

Instructor

差分隱私的定義

  • Cynthia Dwork 以數學定義介紹差分隱私。

示意圖:無論某人是否在原始資料集裡,差分隱私機制的輸出幾乎相同

  • 以 epsilon 與準確度為最重要的量。
Data Privacy and Anonymization in Python

$\epsilon$:隱私參數

  • 隱私損失的度量
  • 數值越小,隱私保護越好
Data Privacy and Anonymization in Python

隱私預算

左側為資料管理者的插畫

Data Privacy and Anonymization in Python

隱私預算

左側為資料管理者,右側有第三方;一個指向資料管理者的箭頭上標示 epsilon 值為 1,代表對資料庫的一次查詢

Data Privacy and Anonymization in Python

隱私預算

左側為資料管理者,右側有第三方;另一個箭頭指向資料管理者,箭頭上標示 epsilon 值為 1,代表對資料庫的第二次查詢 以 $\epsilon$ = 1 進行同一私有查詢兩次,相當於一次隱私 $\epsilon$ = 2 的查詢。

Data Privacy and Anonymization in Python

隱私預算

第三方對先前取得的資料進行運算的插畫 第三方可將多次答案取平均,過濾噪音。

Data Privacy and Anonymization in Python

隱私預算

  • 限制個人或群體可承受的隱私損失上限
  • 追蹤對資料的查詢

團隊對資料庫進行擷取,資料庫在回應前加入噪音的示意圖

Data Privacy and Anonymization in Python

多私有才足夠?

  • 效果取決於查詢與資料本身
  • $\epsilon$ 可取值範圍很廣
Data Privacy and Anonymization in Python

多私有才足夠?

Epsilon $\epsilon$

  • 介於 0 到 1 被視為非常好
  • 高於 10 不理想
  • 介於 1 到 10 為「聊勝於無」

記得 epsilon 以指數方式影響。

  • $\epsilon$ = 1 的系統,比 $\epsilon$ = 10 私有逾 8,000 倍。
Data Privacy and Anonymization in Python

多私有才足夠?

長條圖顯示表情符號使用量,旁有 Apple 標誌

1 Apple 蒐集資料後,統計美式英語使用者最常用的表情符號之截圖。
Data Privacy and Anonymization in Python

隱私預算:如何追蹤

from diffprivlib import BudgetAccountant

acc = BudgetAccountant(epsilon=5) acc
BudgetAccountant(epsilon=5)
Data Privacy and Anonymization in Python

隱私預算:如何追蹤

# Compute a private mean of the salaries using epsilon of 0.5
# Use the Budget Accountant acc and set bounds to be from 0 to 230000
dp_mean = tools.mean(salaries, epsilon=0.5, accountant=acc, bounds=(0, 230000))

# Print the resulting private mean print("Private mean: ", dp_mean)
Private mean: 82524.72611901595
Data Privacy and Anonymization in Python

隱私預算:如何追蹤

# Total privacy spent 
print("Total spent: ", acc.total())

# Privacy budget remaining print("Remaining budget: ", acc.remaining())
# Total number of queries done so far print("Number of queries recorded: ", len(acc))
Total spent: (epsilon=0.5, delta=0.0)

Remaining budget: (epsilon=4.5, delta=1.0)
Number of queries recorded: 1
Data Privacy and Anonymization in Python

隱私預算:如何追蹤

# Privacy budget remaining for 2 queries
print("Remaining budget for 2 queries: ", acc.remaining(2))
Remaining budget for 2 queries: (epsilon=2.25, delta=1.0)
Data Privacy and Anonymization in Python

一起來練習吧!

Data Privacy and Anonymization in Python

Preparing Video For Download...