User Tools

Site Tools


sql-guessing-advantage-analyser

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
sql-guessing-advantage-analyser [2019/06/05 20:25]
alisa [Quick guide]
sql-guessing-advantage-analyser [2019/09/26 16:26]
alisa [Quick guide]
Line 11: Line 11:
 Compared to [[sql-derivative-sensitivity-analyser|combined sensitivity analyser]], the data objects of a model also have schemas and data tables, but now there are no explicit table norms. The distance measure for differential privacy will be determined in a different way. Compared to [[sql-derivative-sensitivity-analyser|combined sensitivity analyser]], the data objects of a model also have schemas and data tables, but now there are no explicit table norms. The distance measure for differential privacy will be determined in a different way.
  
-Clicking on //Analyze// button opens a menu entitled //Analysis settings// on the right side of the page (in sidebar). ​The emerging ​slider allows to set desired upper bound on attacker’s advantage, which ranges between 0% and 100%.+Clicking on //Analyze// button opens a menu entitled //Analysis settings// on the right side of the page (in sidebar). ​In addition to the error level confidence slider that we have in [[sql-derivative-sensitivity-analyser|combined sensitivity analyser]], there is another ​slider allows to set desired upper bound on attacker’s advantage, which ranges between 0% and 100%.
  
-{{slider.png}}+{{slider2.png}}
  
-The user has to specify ​a particular subset of attributes that the attacker ​is trying ​to guesswithin given precision range. To characterize the attacker more precisely, the user defines prior knowledge of the attacker. +The user has to specify the attacker's goal. Similarly ​to [[sql-derivative-sensitivity-analyser|combined sensitivity analyser]], user can define constraints on table attributes that are known in advance. There are two buttons for this.
-There are now two extra buttons ​to define bounds ​for used attributes.+
  
-=== Sensitive attributes ​=== +=== Table constraints ​=== 
-This input starts with the keyword ​''​LEAK''​. It defines a set of sensitive componentswhich the attacker is trying to guess. For each sensitive attribute, the guess can either be ''​exact'' ​(discrete attributes),​ or ''​approx r'' ​(approximated by r > 0 units). The guesses can be combined into an expression ​ using AND and OR operationdescribing ​the case where leakage ​is considered successful. The expression can be followed by a sequence of statements of the form ''​FROM table WHERE condition'', ​which describes which rows of the considered tables are treated as sensitive. The statements can in turn be followed by a single line containing keyword ​''​cost'' ​and a number ​that defines ​the cost of leaking that combination of attributesBy defaultthe cost is set to 100. The delimiter ​''​;'' ​finishes ​the description of the sensitive components.+The syntax for table constraints is the same as for [[sql-derivative-sensitivity-analyser|combined sensitivity analyser]], with some extensions. The keywords ​''​total'',​ ''​set'' ​and ''​range'' ​do not specify any probability distribution on the dataand the analyser assumes worst-case distribution by default (i.e. one for which the advantage ​is the largest). The keywords ​''​totalUnif'',​ ''​setunif''​, ''​rangeUnif''​ in addition specify ​that the distribution is uniformTo provide even more distribution details''​setPrior''​ allows ​to define a probability for each element, and ''​rangePrior'' ​allows to split a range into n blocks, defining a different weight to each block (inside each block, ​the elements are distributed uniformly).
  
 <​code>​ <​code>​
-LEAK +table_1.attr_1 exact              --attacker ​knows the exact value
-ship.latitude approx 5 AND +
-ship.longitude approx 5 +
-FROM ship WHERE cargo > 0 +
-cost 100; +
-</​code>​ +
-In this example, the attacker ​wins iff he guesses //both// attributes ''​latitude''​ and ''​longitude''​ of some row of the table ''​ship''​ within 5-unit precision. The definition of "​unit"​ depends on the data table, e.g. if the location was defined in miles, then a unit is also a mile. We only worry about location of ships that carry some cargo.+
  
-If we want to express that the attacker wins if he guesses //either// ''​latitude''​ or ''​longitude''​we replace AND operation ​with OR.+table_2.attr_2 total int;           ​--there are n possible values 
 +table_3.attr_3 set v1 ... vn;       ​--there are values {v1 ... vn} 
 +table_4.attr_4 range lb ub;         --the values come from range [lb,ub) 
 + 
 +table_5.attr_5 totalUnif int;       -- there are n uniformly distributed values 
 +table_6.attr_6 setUnif v1 ... vn;   -- uniformly distributed in {v1 ... vn} 
 +table_7.attr_7 rangeUnif lb ub;     -- uniformly distributed in [lb,ub) 
 + 
 +-- value vk comes with probability pk 
 +table_8.attr_8 setPrior (v1, p1) ... (vn, pn)   
 + 
 +-- range [v(k-1)...vk) comes with prob.pk 
 +-- the values within [v(k-1)...vk) are distributed uniformly 
 +table_9.attr_9 rangePrior v0 (v1, p1) ... (vn, pn)  
 +                                      
 +</​code>​
  
-=== Attacker ​settings ​=== +=== Attacker ​goal === 
-This input defines ​prior knowledge ​of the attacker ​by setting pre-known bounds on attributesdefined ​either ​as ''​exact'',​ ''​range b''​, or ''​total a'' ​(the latter ​is used only for discrete data).+Attacker goal is given in form of an SQL guery. It defines ​a set of sensitive components, which the attacker ​is trying to guess. For each sensitive attributethe guess can either ​be ''​exact'' ​(discrete attributes)or ''​approx r''​ (approximated by r > 0 units). It is possible to combine several attributes into vector and define approximation w.r.t. some l_p-norm as ''​approxWrtLp(p)'' ​and ''​approxWrtLinf''​. The guesses can be combined into an expression using AND and OR operation, describing ​the case where leakage ​is considered successful. The filter ''​WHERE condition''​ describes which rows of the considered tables are treated as sensitive. The delimiter '';''​ finishes the description of the attacker goal.
  
 <​code>​ <​code>​
-ship.latitude range 0 300; +SELECT 
-ship.longitude range 0 300;+(t.x, t.y) approxWrt(5) AND 
 +t.z exact 
 +FROM t 
 +WHERE t.b;
 </​code>​ </​code>​
 +In this example, the attacker wins iff he guesses //both// ''​t.z''​ exactly and ''​(t.x,​t.y)''​ within 5-unit precision w.r.t. l_2-norm of any row of the table ''​t''​ where ''​t.b''​ holds. The definition of "​unit"​ depends on the data table, e.g. if the location was defined in miles, then a unit is also a mile.
  
-In this example, ​the attacker ​knows that both ''​latitude'' ​and ''​longitude''​ range between ''​0''​ and ''​300''​.+If we want to express that the attacker ​wins if he guesses //​either// ​''​t.z'' ​or ''​(t.x,t.y)''​, we replace AND operation with OR.
  
 === Running analysis === === Running analysis ===
-Click on //Run analysis// button to run analysis. The analyser internally converts these values to a suitable ε for differential privacy, and computes the noise required to achieve the bound on attacker’s advantage. The results (entitled //Analysis results//) appear in the sidebar as well. The result ​is given for each of the input tables, and it consists of the following components+Click on //Run analysis// button to run analysis. The analyser internally converts these values to a suitable ε for differential privacy, and computes the noise required to achieve the bound on attacker’s advantage. The results (entitled //Analysis results//) appear in the sidebar as well. The result consists of the following components, which are the same as for [[sql-derivative-sensitivity-analyser|combined sensitivity analyser]].
-Click on //Run analysis// button to run analysis. The results (entitled //Analysis results//) appear in the sidebar ​as well. The result is given for each of the input tables, and it consists of the following components.+
  
-  * **Relative error (additive noise / query output)** is the quotient ​of the additive ​noise and the query outputIt shows how far the differentially private result gets from the actual result+  * **actual outputs y** are the true outputs ​of the query, without ​noise
-  * **Expected cost** tells how much we lose in average if we let the attacker observe ​the output, ​in addition to what we had lost if the attacker has not observed the output.+  * **p%-noise magnitude a** is the additive noise magnitude, i.e. the noise stays below this quantity with probability p%
 +  * **p%-realtive error |a|/|y|** is the quotient of the additive noise and the query output. If there are several outputsit is the quotient of corresponding vector norms.
  
-To see more precise values of prior and posterior guessing ​probabities, click //View more//. This can be useful for choosing appropriate value on the guessing advantage slider. For example, if the prior guessing probability was already 75%, then any value above 25% makes no sense since it would mean that the attacker is allowed to learn everything.+To see more precise values of prior and posterior guessing ​probabilities, click //View more//. This can be useful for choosing appropriate value on the guessing advantage slider. For example, if the prior guessing probability was already 75%, then any value above 25% makes no sense since it would mean that the attacker is allowed to learn everything. Clicking //View more// also provides more information about how the noise should actually be generated, and it does it for Cauchy and Laplace noise distributions.
  
 ===== Source code ===== ===== Source code =====
  
 The source code of SQL guessing advantage editor is available at [[https://​github.com/​pleak-tools/​pleak-guessing-advantage-editor|pleak-sql-guessing-advantage-editor]] and the source code of SQL sensitivity analysis tools at [[https://​github.com/​pleak-tools/​pleak-sql-analysis|pleak-sql-analysis]] repositories. Installation details can be found at [[sql-derivative-sensitivity-analyser_install|analyser installation guide]]. The source code of SQL guessing advantage editor is available at [[https://​github.com/​pleak-tools/​pleak-guessing-advantage-editor|pleak-sql-guessing-advantage-editor]] and the source code of SQL sensitivity analysis tools at [[https://​github.com/​pleak-tools/​pleak-sql-analysis|pleak-sql-analysis]] repositories. Installation details can be found at [[sql-derivative-sensitivity-analyser_install|analyser installation guide]].
sql-guessing-advantage-analyser.txt · Last modified: 2021/06/14 11:46 by alisa