The Sparse Vector Technique and online query answering - - PowerPoint PPT Presentation

the sparse vector technique and
SMART_READER_LITE
LIVE PREVIEW

The Sparse Vector Technique and online query answering - - PowerPoint PPT Presentation

The Sparse Vector Technique and online query answering CompSci 590.03 Instructor: Ashwin Machanavajjhala Lecture 11: 590.03 Fall 16 1 Offline QA


slide-1
SLIDE 1

The ¡Sparse ¡Vector ¡Technique ¡and ¡ ¡

  • nline ¡query ¡answering ¡

CompSci ¡590.03 ¡ Instructor: ¡Ashwin ¡Machanavajjhala ¡

1 ¡ Lecture ¡11: ¡590.03 ¡Fall ¡16 ¡

slide-2
SLIDE 2

Offline ¡QA ¡

  • Till ¡now: ¡ ¡

¡ Given ¡a ¡workload ¡of ¡queries ¡W, ¡design ¡a ¡differenLally ¡private ¡ algorithm ¡that ¡answers ¡these ¡queries ¡on ¡database ¡x ¡with ¡least ¡

  • error. ¡ ¡

Lecture ¡11: ¡590.03 ¡Fall ¡16 ¡ 2 ¡

slide-3
SLIDE 3

Offline ¡QA ¡

  • Is ¡reasonable ¡in ¡many ¡seRngs ¡
  • Census ¡Data: ¡

– Set ¡of ¡tables ¡that ¡are ¡released ¡are ¡prespecified ¡

  • SpaLal ¡data ¡analysis ¡

– Want ¡counts ¡of ¡people ¡within ¡conLguous ¡regions ¡ – Corresponds ¡to ¡a ¡workload ¡of ¡all ¡range ¡queries ¡

  • DistribuLons ¡of ¡values ¡of ¡an ¡aVribute ¡

– CDF ¡is ¡the ¡prefix ¡workload ¡

Lecture ¡11: ¡590.03 ¡Fall ¡16 ¡ 3 ¡

slide-4
SLIDE 4

Online ¡QA ¡

  • But, ¡oXen ¡one ¡does ¡not ¡know ¡what ¡queries ¡to ¡pose ¡before ¡

looking ¡at ¡the ¡data ¡

  • Online ¡QA: ¡ ¡

– Analyst ¡poses ¡queries ¡one ¡aXer ¡the ¡other ¡ – Next ¡query ¡can ¡be ¡determined ¡based ¡on ¡the ¡answer ¡to ¡the ¡previous ¡query ¡

  • How ¡to ¡do ¡online ¡QA ¡with ¡least ¡error? ¡

Lecture ¡11: ¡590.03 ¡Fall ¡16 ¡ 4 ¡

slide-5
SLIDE 5

SequenLal ¡ComposiLon ¡to ¡the ¡rescue ¡

  • If ¡M1, ¡M2, ¡..., ¡Mk ¡are ¡algorithms ¡that ¡access ¡a ¡private ¡database ¡D ¡

such ¡that ¡each ¡Mi ¡ ¡saLsfies ¡εi ¡-­‑differenLal ¡privacy, ¡ ¡ ¡ then ¡the ¡combinaLon ¡of ¡their ¡outputs ¡saLsfies ¡ ¡ ε-­‑differenLal ¡privacy ¡with ¡ε ¡= ¡ε1+...+εk ¡ ¡

  • Spend ¡ε/|W| ¡budget ¡for ¡each ¡query ¡in ¡workload ¡W. ¡We ¡are ¡

guaranteed ¡ε ¡differenLal ¡privacy ¡aXer ¡answering ¡all ¡the ¡queries ¡in ¡

  • W. ¡ ¡

Lecture ¡11: ¡590.03 ¡Fall ¡16 ¡ 5 ¡

slide-6
SLIDE 6

Two ¡problems ¡

  • Is ¡this ¡the ¡most ¡error ¡efficient ¡strategy? ¡ ¡

– NO: ¡ ¡ – We ¡can ¡use ¡parallel ¡composiLon ¡on ¡queries ¡that ¡look ¡at ¡disjoint ¡parLLons ¡

  • f ¡output ¡

– We ¡can ¡leverage ¡dependencies ¡between ¡queries ¡ – But ¡how? ¡ ¡

  • What ¡happens ¡when ¡you ¡run ¡out ¡of ¡privacy ¡budget? ¡ ¡

– Can ¡we ¡use ¡previously ¡query ¡answers ¡to ¡answer ¡new ¡queries ¡without ¡ looking ¡at ¡the ¡data? ¡ ¡

Lecture ¡11: ¡590.03 ¡Fall ¡16 ¡ 6 ¡

slide-7
SLIDE 7

Cohort ¡Size ¡EsLmaLon ¡Problem ¡

Lecture ¡11: ¡590.03 ¡Fall ¡16 ¡ 7 ¡

PopulaLon ¡of ¡ medical ¡ paLents ¡

Are ¡there ¡at ¡least ¡200 ¡ individuals ¡who ¡are ¡male ¡ cancer ¡survivors, ¡between ¡ 20-­‑30, ¡who ¡were ¡admiVed ¡ for ¡surgery ¡ Are ¡there ¡at ¡least ¡200 ¡male ¡ cancer ¡survivors ¡who ¡are ¡ between ¡ages ¡of ¡20 ¡and ¡30 ¡ Are ¡there ¡at ¡least ¡200 ¡ individuals ¡who ¡are ¡male ¡ cancer ¡survivors ¡and ¡ admiVed ¡for ¡surgery ¡

slide-8
SLIDE 8

Cohort ¡Size ¡EsLmaLon ¡Problem ¡

  • A ¡sequence ¡of ¡queries ¡{Q1, ¡Q2, ¡Q3, ¡…, ¡Qn} ¡
  • Each ¡query ¡Qi ¡: ¡Number ¡of ¡tuples ¡saLsfying ¡property ¡pi ¡> ¡τ ¡? ¡

– If ¡answer ¡is ¡no, ¡then ¡return ¡NO ¡and ¡conLnue. ¡ ¡ – If ¡answer ¡is ¡yes, ¡return ¡YES ¡and ¡STOP ¡a'er ¡c ¡posi/ve ¡answers ¡

¡

  • SensiLvity ¡of ¡each ¡Qi ¡= ¡? ¡
  • How ¡do ¡we ¡answer ¡using ¡differenLal ¡privacy? ¡ ¡

Lecture ¡11: ¡590.03 ¡Fall ¡16 ¡ 8 ¡

= ¡1 ¡

slide-9
SLIDE 9

Accuracy ¡

  • We ¡will ¡say ¡that ¡an ¡algorithm ¡is ¡(α, ¡β)-­‑accurate ¡wrt ¡a ¡threshold ¡T ¡

if ¡for ¡a ¡sequence ¡of ¡answers ¡a1, ¡a2, ¡… ¡in ¡{Y, ¡N} ¡for ¡queries ¡Q1, ¡Q2, ¡ … ¡if ¡ ¡with ¡probability ¡> ¡1-­‑β: ¡ ¡for ¡all ¡ai ¡= ¡Y, ¡Qi(D) ¡>= ¡ ¡T ¡– ¡α ¡ ¡for ¡all ¡ai ¡= ¡N, ¡Qi(D) ¡<= ¡ ¡T ¡+ ¡α ¡ ¡and ¡the ¡algorithm ¡does ¡not ¡halt ¡before ¡outpuRng ¡c ¡YES ¡answers. ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

Lecture ¡11: ¡590.03 ¡Fall ¡16 ¡ 9 ¡

slide-10
SLIDE 10

Cohort ¡Size ¡EsLmaLon ¡Problem ¡

Laplace ¡mechanism: ¡ ¡

  • SensiLvity ¡of ¡all ¡queries ¡is: ¡n ¡
  • For ¡each ¡query: ¡qi’ ¡= ¡Qi(D) ¡+ ¡Lap(n/ε) ¡
  • Return ¡YES ¡if ¡qi’ ¡> ¡τ ¡

Return ¡NO ¡ ¡if ¡qi’ ¡< ¡τ ¡

Lecture ¡11: ¡590.03 ¡Fall ¡16 ¡ 10 ¡

slide-11
SLIDE 11

Accuracy ¡of ¡Laplace ¡Mechanism ¡

Lecture ¡11: ¡590.03 ¡Fall ¡16 ¡ 11 ¡

¡ ¡ ¡ ¡ ¡

Accuracy ¡depends ¡on ¡ number ¡of ¡queries ¡

slide-12
SLIDE 12

Sparse ¡Vector ¡Technique ¡(c=1) ¡

¡

  • Set ¡τ’ ¡= ¡τ ¡+ ¡Lap(2/ε) ¡
  • For ¡each ¡query: ¡qi’ ¡= ¡Qi(D) ¡+ ¡Lap(4/ε) ¡
  • If ¡qi’ ¡< ¡τ’ ¡

¡ ¡Return ¡NO ¡and ¡conLnue ¡ ¡Else ¡// ¡qi’ ¡≥ ¡τ’, ¡ ¡ ¡ ¡ ¡Return ¡YES ¡and ¡STOP ¡ ¡ ¡

Lecture ¡11: ¡590.03 ¡Fall ¡16 ¡ 12 ¡

Instead ¡of ¡Lap(n/ε) ¡ Answer ¡exactly ¡one ¡ query ¡posiLvely ¡ Use ¡a ¡noisy ¡threshold ¡

slide-13
SLIDE 13

Accuracy ¡Analysis ¡

  • Given ¡a ¡sequence ¡of ¡queries ¡Q1, ¡…, ¡Qk ¡and ¡threshold ¡T ¡such ¡that ¡ ¡

¡for ¡all ¡j ¡< ¡n, ¡ ¡Qj(D) ¡< ¡ ¡T ¡– ¡α ¡ ¡ ¡ ¡ ¡the ¡sparse ¡vector ¡technique ¡is ¡(α, ¡β)-­‑accurate ¡for ¡ ¡ ¡ ¡ ¡ ¡ That ¡is, ¡when ¡all ¡but ¡the ¡last ¡query ¡are ¡“far ¡away” ¡from ¡the ¡ threshold, ¡the ¡algorithm ¡will ¡say ¡NO ¡for ¡all ¡but ¡the ¡last ¡query, ¡and ¡ say ¡YES ¡and ¡halt ¡on ¡the ¡last ¡query. ¡ ¡

Lecture ¡11: ¡590.03 ¡Fall ¡16 ¡ 13 ¡

α = 8(log k + log(2/β))

  • .

Accuracy ¡depends ¡on ¡ log ¡of ¡number ¡of ¡ queries! ¡

slide-14
SLIDE 14

Proof ¡

  • All ¡we ¡need ¡to ¡show ¡is ¡with ¡probability ¡1-­‑ ¡β: ¡ ¡

¡for ¡all ¡j, ¡ ¡ ¡ ¡|noisej| ¡+ ¡|τ ¡-­‑ ¡τ’| ¡< ¡α ¡

  • This ¡implies: ¡for ¡ak ¡= ¡YES. ¡ ¡

¡Qk(D) ¡ ¡ ¡> ¡ ¡ ¡τ’ ¡– ¡noisek ¡ ¡>= ¡ ¡ ¡τ’ ¡– ¡|noisek| ¡ ¡ ¡ ¡>= ¡ ¡τ ¡-­‑ ¡|τ ¡-­‑ ¡τ’| ¡-­‑ ¡|noisek| ¡ ¡ ¡ ¡> ¡ ¡ ¡τ ¡– ¡α ¡ ¡

  • For ¡all ¡aj ¡= ¡NO, ¡ ¡

¡Qj(D) ¡ ¡ ¡< ¡τ’ ¡-­‑ ¡noisej ¡ ¡ ¡<= ¡ ¡τ’ ¡+ ¡|noisej| ¡ ¡ ¡ ¡ ¡<= ¡τ ¡+ ¡|τ ¡-­‑ ¡τ’| ¡+|noisej| ¡< ¡τ ¡+ ¡α ¡ ¡ ¡

Lecture ¡11: ¡590.03 ¡Fall ¡16 ¡ 14 ¡

slide-15
SLIDE 15

Proof ¡

  • All ¡we ¡need ¡to ¡show ¡is ¡with ¡probability ¡1-­‑ ¡β: ¡ ¡

¡for ¡all ¡j, ¡ ¡ ¡ ¡|noisej| ¡+ ¡|τ ¡-­‑ ¡τ’| ¡< ¡α ¡

  • Pr[|τ ¡-­‑ ¡τ’| ¡> ¡α/2 ¡] ¡< ¡exp( ¡-­‑ ¡ε ¡α ¡/4) ¡
  • Pr[|noisej| ¡> ¡α/2] ¡< ¡exp( ¡-­‑ ¡ε ¡α ¡/8) ¡

Therefore, ¡Pr[maxj ¡|noisej| ¡> ¡α/2] ¡< ¡k ¡exp( ¡-­‑ ¡ε ¡α ¡/8) ¡ ¡

  • SeRng ¡ ¡ε ¡α ¡> ¡8(log ¡k ¡+ ¡log(2/β)) ¡ensures ¡each ¡of ¡the ¡above ¡

probabiliLes ¡is ¡bounded ¡by ¡β/2. ¡ ¡ ¡

Lecture ¡11: ¡590.03 ¡Fall ¡16 ¡ 15 ¡

slide-16
SLIDE 16

Sparse ¡Vector ¡Technique ¡(c=1) ¡

¡

  • Set ¡τ’ ¡= ¡τ ¡+ ¡Lap(2/ε) ¡
  • For ¡each ¡query: ¡qi’ ¡= ¡Qi(D) ¡+ ¡Lap(4/ε) ¡
  • If ¡qi’ ¡< ¡τ’ ¡

¡ ¡Return ¡NO ¡and ¡conLnue ¡ ¡Else ¡// ¡qi’ ¡≥ ¡τ’, ¡ ¡ ¡ ¡ ¡Return ¡YES ¡and ¡STOP ¡ ¡ ¡

Lecture ¡11: ¡590.03 ¡Fall ¡16 ¡ 16 ¡

Does ¡this ¡saLsfy ¡ε-­‑differenLal ¡ privacy? ¡ ¡

slide-17
SLIDE 17

Privacy ¡analysis ¡

Lecture ¡11: ¡590.03 ¡Fall ¡16 ¡ 17 ¡

Pr SVT D = !a1, … , ak =! Pr !! = ! Pr !! ! + !! > ! Pr[max

!!! !! ! + ! ! < !] ! !

!"!#! Probability ¡of ¡ noisy ¡threshold ¡ taking ¡value ¡t ¡ Probability ¡that ¡ last ¡query ¡answer ¡ crosses ¡noisy ¡ threshold ¡ Probability ¡previous ¡ query ¡answers ¡do ¡ not ¡cross ¡noisy ¡ threshold ¡

slide-18
SLIDE 18

Privacy ¡analysis ¡

  • Let ¡N ¡denote ¡the ¡set ¡of ¡noise ¡values ¡for ¡queries ¡1 ¡… ¡k-­‑1, ¡that ¡

make ¡the ¡noisy ¡query ¡answers ¡smaller ¡than ¡t. ¡That ¡is, ¡ ¡

Lecture ¡11: ¡590.03 ¡Fall ¡16 ¡ 18 ¡

Pr SVT D = !a1, … , ak =! Pr !! = ! Pr !! ! + !! > ! Pr[max

!!! !! ! + ! ! < !] ! !

!"!#!

! = !!, !!, … , !!!! max

!!! !! ! + ! ! < !}!

slide-19
SLIDE 19

Privacy ¡analysis ¡

  • Then, ¡ ¡

Lecture ¡11: ¡590.03 ¡Fall ¡16 ¡ 19 ¡

Pr SVT D = !a1, … , ak =! Pr !! = ! Pr !! ! + !! > ! Pr[max

!!! !! ! + ! ! < !] ! !

!"!#!

! = !!, !!, … , !!!! max

!!! !! ! + ! ! < !}!

∀!! !!, !!, … , !!!! ∈ !, !max

!!! !! !! + ! ! < ! + 1!

⟹!!Pr max

!!! !! ! + ! ! < ! <!Pr max !!! !! !′ + ! ! < ! + 1 !!!

slide-20
SLIDE 20

Privacy ¡analysis ¡

Lecture ¡11: ¡590.03 ¡Fall ¡16 ¡ 20 ¡

Pr SVT D = !a1, … , ak =! Pr !! = ! Pr !! ! + !! > ! Pr max

!!! !! ! + ! ! < ! ! !

!"!# <

Pr !′ = ! Pr !! ! + !! > ! Pr max

!<! !! !′ + !! < ! + 1 ! !

!"!# < !

!

! 2 Pr !′ = ! + 1 Pr !! !

+ !! > ! Pr max

!<! !! !′

+ !! < ! + 1

! !

!"!# < !

!

! 2 Pr ! ′ = ! + 1 ! ! 2 Pr ! ! !′

+ !! > ! + 1 Pr max

!<!

!

! ! ′

+ !! < ! + 1

! !

!!"!# <

!! Pr !′ = ! Pr !! !′ + !! > ! Pr max

!<! !! !′

+ !! < !

! !

!!"!# < Pr SVT D′ = !a1, … , ak !

slide-21
SLIDE 21

Sparse ¡Vector ¡Technique ¡

¡

  • Set ¡τ’ ¡= ¡τ ¡+ ¡Lap(2/ε) ¡
  • For ¡each ¡query: ¡qi’ ¡= ¡Qi(D) ¡+ ¡Lap(4/ε) ¡
  • If ¡qi’ ¡< ¡τ’ ¡

¡ ¡Return ¡NO ¡and ¡conLnue ¡ ¡Else ¡// ¡qi’ ¡≥ ¡τ’, ¡ ¡ ¡ ¡ ¡Return ¡YES ¡and ¡STOP ¡ ¡ ¡

Lecture ¡11: ¡590.03 ¡Fall ¡16 ¡ 21 ¡

Why ¡Stop? ¡ ¡ Why ¡add ¡noise? ¡ ¡

slide-22
SLIDE 22

Sparse ¡Vector ¡Technique ¡ ¡

(without ¡adding ¡noise ¡to ¡queries ¡and ¡without ¡stopping) ¡

¡

  • Set ¡τ’ ¡= ¡τ ¡+ ¡Lap(2/ε) ¡
  • For ¡each ¡query: ¡qi ¡= ¡Qi(D) ¡
  • If ¡qi ¡< ¡τ’ ¡

¡ ¡Return ¡NO ¡and ¡conLnue ¡ ¡Else ¡// ¡qi ¡≥ ¡τ’, ¡ ¡ ¡ ¡ ¡Return ¡YES ¡and ¡con/nue ¡ ¡

Lecture ¡11: ¡590.03 ¡Fall ¡16 ¡ 22 ¡

slide-23
SLIDE 23

Sparse ¡Vector ¡Technique ¡ ¡

(without ¡adding ¡noise ¡to ¡queries ¡and ¡without ¡stopping) ¡

¡… ¡does ¡not ¡saLsfy ¡privacy. ¡ ¡ ¡ D: ¡Q1(D) ¡= ¡0, ¡Q2(D) ¡= ¡1 ¡ D’: ¡Q1(D’) ¡= ¡1, ¡Q2(D’) ¡= ¡0 ¡ ¡ ¡ ¡ ¡… ¡both ¡queries ¡with ¡sensiLvity ¡1 ¡ ¡ Let ¡τ ¡= ¡0 ¡ ¡ Pr[SVT(D) ¡= ¡NO, ¡YES] ¡> ¡0 ¡ ¡(whenever ¡0 ¡< ¡τ’ ¡<= ¡1) ¡ ¡ Pr[SVT(D’) ¡= ¡NO, ¡YES] ¡= ¡0 ¡(no ¡value ¡of ¡τ’) ¡ ¡ ¡

Lecture ¡11: ¡590.03 ¡Fall ¡16 ¡ 23 ¡

slide-24
SLIDE 24

Sparse ¡Vector ¡Technique ¡ ¡

¡Does ¡not ¡saLsfy ¡privacy ¡if: ¡ ¡ ¡

  • No ¡stopping ¡and ¡no ¡noise ¡is ¡added ¡to ¡queries ¡ ¡ ¡ ¡
  • No ¡stopping ¡and ¡noise ¡is ¡added ¡to ¡queries ¡
  • Stop ¡aXer ¡1 ¡query ¡but ¡release ¡the ¡noisy ¡count ¡used ¡to ¡compute ¡

the ¡YES ¡answer ¡ ¡ Takeaway: ¡Need ¡to ¡be ¡very ¡careful ¡with ¡privacy ¡analysis ¡ ¡ ¡

Lecture ¡11: ¡590.03 ¡Fall ¡16 ¡ 24 ¡

slide-25
SLIDE 25

Numeric ¡Sparse ¡Vector ¡Technique ¡

¡

  • Set ¡τ’ ¡= ¡τ ¡+ ¡Lap(2c/ε1) ¡
  • Set ¡count ¡= ¡0 ¡
  • For ¡each ¡query: ¡qi’ ¡= ¡Qi(D) ¡+ ¡Lap(4c/ε1) ¡
  • If ¡qi’ ¡< ¡τ’ ¡

¡ ¡Return ¡NO ¡and ¡conLnue ¡ ¡Else ¡// ¡qi’ ¡≥ ¡τ’, ¡ ¡ ¡ ¡Return ¡Qi(D) ¡+ ¡Lap(4c/ε2) ¡ ¡ ¡ ¡If ¡count ¡< ¡c: ¡ ¡ ¡τ’ ¡= ¡τ ¡+ ¡Lap(2c/ε1) ¡ ¡ ¡ ¡count ¡++ ¡ ¡ ¡Else ¡STOP ¡

Lecture ¡11: ¡590.03 ¡Fall ¡16 ¡ 25 ¡

Allows ¡c ¡answers ¡ Need ¡new ¡ randomness ¡to ¡ release ¡noisy ¡count ¡ Need ¡new ¡noisy ¡ threshold ¡aXer ¡each ¡ YES ¡answer ¡

slide-26
SLIDE 26

SVT ¡for ¡online ¡QA ¡

  • Maintain ¡a ¡“syntheLc” ¡distribuLon ¡A ¡(say ¡uniform) ¡on ¡the ¡domain ¡
  • For ¡each ¡query ¡Qi: ¡ ¡

– Ask ¡two ¡queries ¡Qi(D) ¡– ¡Qi(A) ¡ ¡and ¡using ¡Numeric ¡SVT ¡ – Use ¡a ¡posiLve ¡threshold ¡(depends ¡on ¡c, ¡total ¡number ¡of ¡queries, ¡domain ¡ size ¡…) ¡

  • If ¡both ¡queries ¡result ¡in ¡NO ¡answers, ¡Release ¡Qi(A) ¡
  • If ¡Qi(D) ¡– ¡Qi(A) ¡is ¡a ¡number, ¡Release ¡Qi(A) ¡+ ¡answer ¡from ¡SVT ¡

Else ¡(Qi(A) ¡– ¡Qi(D) ¡is ¡a ¡number), ¡Release ¡Qi(A) ¡-­‑ ¡answer ¡from ¡SVT ¡ ¡

  • Update ¡A ¡using ¡mulLplicaLve ¡weights ¡

Lecture ¡11: ¡590.03 ¡Fall ¡16 ¡ 26 ¡

slide-27
SLIDE 27

Private ¡MulLplicaLve ¡Weights ¡

  • Maintains ¡a ¡current ¡esLmate ¡of ¡the ¡database. ¡ ¡
  • AXer ¡c ¡answers, ¡Numeric ¡SVT ¡stops ¡releasing ¡YES ¡answers. ¡

ThereaXer, ¡we ¡can ¡use ¡current ¡esLmate ¡of ¡database ¡to ¡keep ¡ answering ¡quesLons. ¡ ¡

  • Privacy ¡analysis ¡follows ¡from ¡privacy ¡of ¡Numeric ¡SVT ¡
  • ULlity ¡analysis ¡is ¡a ¡liVle ¡more ¡complex ¡(see ¡textbook). ¡ ¡

Lecture ¡11: ¡590.03 ¡Fall ¡16 ¡ 27 ¡