blob: 6b9a28dadd9329e5e011126950dd0ef466a23d22 [file] [log] [blame]
#
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This collection of test cases is intended to statistically evaluate the shape
# of the distribution of the Laplace noise generated by the DP library.
# The test cases and validation parameters are calibrated such that:
# - A distribution closeness test accepts with a probability of at least 0.9 if
# two identical Laplace distributions are compared.
# - A distribution closeness test rejects with a probability of at least 0.9 if
# two Laplace distributions are compared whose means are shifted by the
# respective standard deviation times 0.02 or whose variances differs by
# 1.0625 in scale or if the shape of one of the distributions is Gaussian
# instead of Laplace.
validity_parameters {
shift_specificity: 0.02
scale_specificity: 1.0625
}
# Taking the majority vote over 9 repeated runs of a particular test case
# increases the accept and reject probabilities to 0.99911 or more.
voting_parameters {
number_of_votes: 9
}
distribution_closeness_test_case {
name: "Default parameters"
closeness_test_parameters {
mean: 0.0
variance: 1.65707089938044608875
l2_tolerance: 0.00065
granularity: 0.00390625
}
noise_sampling_parameters {
number_of_samples: 1000000
l0_sensitivity: 1
linf_sensitivity: 1.0
epsilon: 1.09861228866810969140 # = log(3)
raw_input: 0.0
}
}
distribution_closeness_test_case {
name: "Low l_inf sensitivity"
closeness_test_parameters {
mean: 0.0
variance: 0.00414267724845111522
l2_tolerance: 0.00075
granularity: 0.000244140625
}
noise_sampling_parameters {
number_of_samples: 1000000
l0_sensitivity: 1
linf_sensitivity: 0.05
epsilon: 1.09861228866810969140 # = log(3)
raw_input: 0.0
}
}
distribution_closeness_test_case {
name: "Very low l_inf sensitivity"
closeness_test_parameters {
mean: 0.0
variance: 0.00000041426772484511
l2_tolerance: 0.00075
granularity: 0.000003814697265625
}
noise_sampling_parameters {
number_of_samples: 1000000
l0_sensitivity: 1
linf_sensitivity: 0.0005
epsilon: 1.09861228866810969140 # = log(3)
raw_input: 0.0
}
}
distribution_closeness_test_case {
name: "High l_inf sensitivity"
closeness_test_parameters {
mean: 0.0
variance: 165.707089938044608875
l2_tolerance: 0.00075
granularity: 0.0625
}
noise_sampling_parameters {
number_of_samples: 1000000
l0_sensitivity: 1
linf_sensitivity: 10.0
epsilon: 1.09861228866810969140 # = log(3)
raw_input: 0.0
}
}
distribution_closeness_test_case {
name: "Very high l_inf sensitivity"
closeness_test_parameters {
mean: 0.0
variance: 1657070.89938044608875
l2_tolerance: 0.00075
granularity: 4.0
}
noise_sampling_parameters {
number_of_samples: 1000000
l0_sensitivity: 1
linf_sensitivity: 1000.0
epsilon: 1.09861228866810969140 # = log(3)
raw_input: 0.0
}
}
distribution_closeness_test_case {
name: "High l_0 sensitivity"
closeness_test_parameters {
mean: 0.0
variance: 6.62828359752178435500
l2_tolerance: 0.00075
granularity: 0.015625
}
noise_sampling_parameters {
number_of_samples: 1000000
l0_sensitivity: 2
linf_sensitivity: 1.0
epsilon: 1.09861228866810969140 # = log(3)
raw_input: 0.0
}
}
distribution_closeness_test_case {
name: "Very high l_0 sensitivity"
closeness_test_parameters {
mean: 0.0
variance: 414267.724845111522187
l2_tolerance: 0.00075
granularity: 4.0
}
noise_sampling_parameters {
number_of_samples: 1000000
l0_sensitivity: 500
linf_sensitivity: 1.0
epsilon: 1.09861228866810969140 # = log(3)
raw_input: 0.0
}
}
distribution_closeness_test_case {
name: "Small epsilon"
closeness_test_parameters {
mean: 0.0
variance: 20000.0
l2_tolerance: 0.00075
granularity: 0.5
}
noise_sampling_parameters {
number_of_samples: 1000000
l0_sensitivity: 1
linf_sensitivity: 1.0
epsilon: 0.01
raw_input: 0.0
}
}
distribution_closeness_test_case {
name: "Very small epsilon"
closeness_test_parameters {
mean: 0.0
variance: 2000000000000.0
l2_tolerance: 0.00065
granularity: 8192.0
}
noise_sampling_parameters {
number_of_samples: 1000000
l0_sensitivity: 1
linf_sensitivity: 1.0
epsilon: 0.000001
raw_input: 0.0
}
}
distribution_closeness_test_case {
name: "Large epsilon"
closeness_test_parameters {
mean: 0.0
variance: 0.41426772484511152218
l2_tolerance: 0.00075
granularity: 0.00390625
}
noise_sampling_parameters {
number_of_samples: 1000000
l0_sensitivity: 1
linf_sensitivity: 1.0
epsilon: 2.19722457733621938279 # = 2log(3)
raw_input: 0.0
}
}
distribution_closeness_test_case {
name: "Very large epsilon"
closeness_test_parameters {
mean: 0.0
variance: 0.08
l2_tolerance: 0.00065
granularity: 0.0009765625
}
noise_sampling_parameters {
number_of_samples: 1000000
l0_sensitivity: 1
linf_sensitivity: 1.0
epsilon: 5
raw_input: 0.0
}
}
distribution_closeness_test_case {
name: "Small positive raw input"
closeness_test_parameters {
mean: 1.0
variance: 1.65707089938044608875
l2_tolerance: 0.00065
granularity: 0.00390625
}
noise_sampling_parameters {
number_of_samples: 1000000
l0_sensitivity: 1
linf_sensitivity: 1.0
epsilon: 1.09861228866810969140 # = log(3)
raw_input: 1.0
}
}
distribution_closeness_test_case {
name: "Large positive raw input"
closeness_test_parameters {
mean: 1000000.0
variance: 1.65707089938044608875
l2_tolerance: 0.00065
granularity: 0.00390625
}
noise_sampling_parameters {
number_of_samples: 1000000
l0_sensitivity: 1
linf_sensitivity: 1.0
epsilon: 1.09861228866810969140 # = log(3)
raw_input: 1000000.0
}
}
distribution_closeness_test_case {
name: "Very large positive raw input"
closeness_test_parameters {
mean: 1000000000000.0
variance: 1.65707089938044608875
l2_tolerance: 0.00065
granularity: 0.00390625
}
noise_sampling_parameters {
number_of_samples: 1000000
l0_sensitivity: 1
linf_sensitivity: 1.0
epsilon: 1.09861228866810969140 # = log(3)
raw_input: 1000000000000.0
}
}
distribution_closeness_test_case {
name: "Small negative raw input"
closeness_test_parameters {
mean: -1.0
variance: 1.65707089938044608875
l2_tolerance: 0.00065
granularity: 0.00390625
}
noise_sampling_parameters {
number_of_samples: 1000000
l0_sensitivity: 1
linf_sensitivity: 1.0
epsilon: 1.09861228866810969140 # = log(3)
raw_input: -1.0
}
}
distribution_closeness_test_case {
name: "Large negative raw input"
closeness_test_parameters {
mean: -1000000.0
variance: 1.65707089938044608875
l2_tolerance: 0.00065
granularity: 0.00390625
}
noise_sampling_parameters {
number_of_samples: 1000000
l0_sensitivity: 1
linf_sensitivity: 1.0
epsilon: 1.09861228866810969140 # = log(3)
raw_input: -1000000.0
}
}
distribution_closeness_test_case {
name: "Very large negative raw input"
closeness_test_parameters {
mean: -1000000000000.0
variance: 1.65707089938044608875
l2_tolerance: 0.00065
granularity: 0.00390625
}
noise_sampling_parameters {
number_of_samples: 1000000
l0_sensitivity: 1
linf_sensitivity: 1.0
epsilon: 1.09861228866810969140 # = log(3)
raw_input: -1000000000000.0
}
}
distribution_closeness_test_case {
name: "Fractional positive raw input"
closeness_test_parameters {
mean: 6.48074069840786023096
variance: 1.65707089938044608875
l2_tolerance: 0.00065
granularity: 0.00390625
}
noise_sampling_parameters {
number_of_samples: 1000000
l0_sensitivity: 1
linf_sensitivity: 1.0
epsilon: 1.09861228866810969140 # = log(3)
raw_input: 6.48074069840786023096
}
}
distribution_closeness_test_case {
name: "Fractional negative raw input"
closeness_test_parameters {
mean: -125773.181179024284936
variance: 1.65707089938044608875
l2_tolerance: 0.00065
granularity: 0.00390625
}
noise_sampling_parameters {
number_of_samples: 1000000
l0_sensitivity: 1
linf_sensitivity: 1.0
epsilon: 1.09861228866810969140 # = log(3)
raw_input: -125773.181179024284936
}
}