{"id":82,"date":"2023-01-24T16:12:59","date_gmt":"2023-01-24T16:12:59","guid":{"rendered":"https:\/\/todaysainews.com\/index.php\/2023\/01\/24\/differential-privacy-accounting-by-connecting-the-dots-google-ai-blog\/"},"modified":"2025-04-27T07:36:13","modified_gmt":"2025-04-27T07:36:13","slug":"differential-privacy-accounting-by-connecting-the-dots-google-ai-blog","status":"publish","type":"post","link":"https:\/\/todaysainews.com\/index.php\/2023\/01\/24\/differential-privacy-accounting-by-connecting-the-dots-google-ai-blog\/","title":{"rendered":"Differential Privacy Accounting by Connecting the Dots \u2013 Google AI Blog"},"content":{"rendered":"<p> [ad_1]<br \/>\n<\/p>\n<div id=\"post-body-248013862447315445\">\n<span class=\"byline-author\">Posted by Pritish Kamath and Pasin Manurangsi, Research Scientists, Google Research<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEg4-TwH71IbVhZa8HjVhO7gpmZTCjPcMLOBgBRfFnbQ9oY3B_mk8mG5qls3e1-9Y5tzlylAHiIfjff7AxdustEp9yDF9-um5543gWhpKRa3rv9IGfI_BQZUbubVLmR533BZxxZHNPQqx7_hgCxm2GpET2UcUgz4AGEca-JAYmXcycivtaJ4bbi-Zz5-\/s936\/connect-the-dots-small.jpg\" style=\"display: none;\"\/><\/p>\n<p>\n<a href=\"https:\/\/en.wikipedia.org\/wiki\/Differential_privacy\">Differential privacy<\/a> (DP) is an approach that enables data analytics and machine learning (ML) with a mathematical guarantee on the privacy of user data.  DP quantifies the \u201cprivacy cost\u201d of an algorithm, i.e., the level of guarantee that the algorithm\u2019s output distribution for a given dataset will not change significantly if a single user\u2019s data is added to or removed from it. The algorithm is characterized by two parameters, \u03b5 and \u03b4, where smaller values of both indicate \u201cmore private\u201d. There is a natural tension between the privacy budget (\u03b5, \u03b4) and the utility of the algorithm: a smaller privacy budget requires the output to be more \u201cnoisy\u201d, often leading to less utility. Thus, a fundamental goal of DP is to attain as much utility as possible for a desired privacy budget.\n<\/p>\n<p><a name=\"more\"\/> <\/p>\n<p>\nA key property of DP that often plays a central role in understanding privacy costs is that of <em>composition<\/em>, which reflects the net privacy cost of a combination of DP algorithms, viewed together as a single algorithm. A notable example is the <a href=\"https:\/\/arxiv.org\/abs\/1607.00133\">differentially-private stochastic gradient descent<\/a> (DP-SGD) algorithm. This algorithm trains ML models over multiple iterations \u2014 each of which is differentially private \u2014 and therefore requires an application of the composition property of DP.  A basic composition theorem in DP says that the privacy cost of a collection of algorithms is, at most, the sum of the privacy cost of each. However, in many cases, this can be a gross overestimate, and several improved composition theorems provide better estimates of the privacy cost of composition.<\/p>\n<p>\nIn 2019, we released an <a href=\"https:\/\/developers.googleblog.com\/2019\/09\/enabling-developers-and-organizations.html\">open-source library<\/a> (on <a href=\"https:\/\/github.com\/google\/differential-privacy\">GitHub<\/a>) to enable developers to use analytic techniques based on DP.  Today, we announce the <a href=\"https:\/\/github.com\/google\/differential-privacy\/commit\/b4b26475acce0be9b7e9844db4af5a1b9929cab1\">addition<\/a> to this library of <em>Connect-the-Dots<\/em>, a new privacy accounting algorithm based on a novel approach for discretizing <a href=\"https:\/\/petsymposium.org\/popets\/2019\/popets-2019-0029.pdf\">privacy loss distributions<\/a> that is a useful tool for understanding the privacy cost of composition. This algorithm is based on the paper \u201c<a href=\"https:\/\/petsymposium.org\/popets\/2022\/popets-2022-0122.pdf\">Connect the Dots: Tighter Discrete Approximations of Privacy Loss Distributions<\/a>\u201d, presented at <a href=\"https:\/\/petsymposium.org\/2022\/\">PETS 2022<\/a>. The main novelty of this accounting algorithm is that it uses an indirect approach to construct more accurate discretizations of privacy loss distributions. We find that Connect-the-Dots provides significant gains over other privacy accounting methods in literature in terms of accuracy and running time. This algorithm was also recently applied for the <a href=\"https:\/\/ai.googleblog.com\/2022\/12\/private-ads-prediction-with-dp-sgd.html\">privacy accounting of DP-SGD in training Ads prediction models<\/a>.\n<\/p>\n<h2>Differential Privacy and Privacy Loss Distributions<\/h2>\n<p>\nA randomized algorithm is said to satisfy DP guarantees if its output \u201cdoes not depend significantly\u201d on any one entry in its training dataset, quantified mathematically with parameters (\u03b5, \u03b4). For example, consider the motivating example of DP-SGD. When trained with (non-private) SGD, a neural network could, in principle, be encoding the entire training dataset within its weights, thereby allowing one to <a href=\"https:\/\/ai.googleblog.com\/2020\/12\/privacy-considerations-in-large.html\">reconstruct some training examples from a trained model<\/a>. On the other hand, when trained with DP-SGD, we have a formal guarantee that if one were able to reconstruct a training example with non-trivial probability then one would also be able to reconstruct the same example even if it was not included in the training dataset.\n<\/p>\n<p>\nThe <a href=\"https:\/\/ieeexplore.ieee.org\/ielaam\/18\/7593371\/7552457-aam.pdf?tag=1\">hockey stick divergence<\/a>, parameterized by \u03b5, is a measure of distance between two probability distributions, as illustrated in the figure below. The privacy cost of most DP algorithms is dictated by the hockey stick divergence between two associated probability distributions P and Q. The algorithm satisfies DP with parameters (\u03b5, \u03b4), if the value of the hockey stick divergence for \u03b5 between P and Q is at most \u03b4. The hockey stick divergence between (P, Q), denoted \u03b4<sub>P||Q<\/sub>(\u03b5) is in turn completely characterized by it associated privacy loss distribution, denoted by PLD<sub>P||Q<\/sub>.\n<\/p>\n<table align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto;\">\n<tbody>\n<tr>\n<td style=\"text-align: center;\"><a href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjQuHliiJW5dHS8Joc4s5mo2hybHbbXK1-8OuNwvApLTFtUS9J3nc-P88iOuYDpOyxhY8ISip4Velk4er9Q0He-fhz-4y3Kz_k0lLD3FHHLx2eUuazJM7r90zLpGgq3VeT9JK--MChbD1tykgIkKZcmOs5ZcI9UJrWnfrgsJYJM0MMwyxegUSuYjULx\/s1999\/image2.png\" style=\"margin-left: auto; margin-right: auto;\"><img decoding=\"async\" border=\"0\" data-original-height=\"434\" data-original-width=\"1999\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjQuHliiJW5dHS8Joc4s5mo2hybHbbXK1-8OuNwvApLTFtUS9J3nc-P88iOuYDpOyxhY8ISip4Velk4er9Q0He-fhz-4y3Kz_k0lLD3FHHLx2eUuazJM7r90zLpGgq3VeT9JK--MChbD1tykgIkKZcmOs5ZcI9UJrWnfrgsJYJM0MMwyxegUSuYjULx\/s16000\/image2.png\"\/><\/a><\/td>\n<\/tr>\n<tr>\n<td class=\"tr-caption\" style=\"text-align: center;\">Illustration of hockey stick divergence \u03b4<sub>P||Q<\/sub>(\u03b5) between distributions P and Q (<b>left<\/b>), which corresponds to the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Probability_mass_function\">probability mass<\/a> of P that is above e<sup>\u03b5<\/sup>Q, where e<sup>\u03b5<\/sup>Q is an e<sup>\u03b5<\/sup> scaling of the probability mass of Q (<b>right<\/b>).<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\nThe main advantage of dealing with PLDs is that compositions of algorithms correspond to the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Convolution\">convolution<\/a> of the corresponding PLDs. Exploiting this fact, <a href=\"https:\/\/arxiv.org\/pdf\/2102.12412.pdf\">prior work<\/a> has designed efficient algorithms to compute the PLD corresponding to the composition of individual algorithms by simply performing convolution of the individual PLDs using the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Fast_Fourier_transform\">fast Fourier transform<\/a> algorithm.\n<\/p>\n<p>\nHowever, one challenge when dealing with many PLDs is that they often are continuous distributions, which make the convolution operations intractable in practice. Thus, researchers often apply various discretization approaches to approximate the PLDs using equally spaced points. For example, the basic version of the <a href=\"https:\/\/dl.acm.org\/doi\/abs\/10.1145\/3243734.3243765\">Privacy Buckets algorithm<\/a> assigns the probability mass of the interval between two discretization points entirely to the higher end of the interval.<\/p>\n<table align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto;\">\n<tbody>\n<tr>\n<td style=\"text-align: center;\"><a href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjJqq4bPUjClak4QcGhOzjPgfFLl9hbPXD9TDw8YsNCSj30mOpuu4T1ePRBYl5IJPgXuMtaKTXCXS8A8Tlx79Up-k-CcZoUpibZDyO3eFCMF3fDTbFjtL2nW2cbr5yrhhfENgJwrQ0y5-_vLl-ThGQ5hgOZHvwE3GOMuAZfCB46rl4YAPvJwNSJu9ow\/s1999\/image4.png\" style=\"margin-left: auto; margin-right: auto;\"><img decoding=\"async\" border=\"0\" data-original-height=\"923\" data-original-width=\"1999\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjJqq4bPUjClak4QcGhOzjPgfFLl9hbPXD9TDw8YsNCSj30mOpuu4T1ePRBYl5IJPgXuMtaKTXCXS8A8Tlx79Up-k-CcZoUpibZDyO3eFCMF3fDTbFjtL2nW2cbr5yrhhfENgJwrQ0y5-_vLl-ThGQ5hgOZHvwE3GOMuAZfCB46rl4YAPvJwNSJu9ow\/s16000\/image4.png\"\/><\/a><\/td>\n<\/tr>\n<tr>\n<td class=\"tr-caption\" style=\"text-align: center;\">Illustration of discretization by rounding up probability masses. Here a continuous PLD (in blue) is discretized to a discrete PLD (in red), by rounding up the probability mass between consecutive points.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Connect-the-Dots : A New Algorithm<\/h2>\n<p>\nOur new Connect-the-Dots algorithm provides a better way to discretize PLDs towards the goal of estimating hockey stick divergences. This approach works indirectly by first discretizing the hockey stick divergence function and then mapping it back to a discrete PLD supported on equally spaced points.\n<\/p>\n<table align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto;\">\n<tbody>\n<tr>\n<td style=\"text-align: center;\"><a href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEilAITwMEHcMY6aQsPh14XcIfXJ1Qrl8Li3SbLYMCpyETU_IdVEfNheUB4VGI-Tn6ZKLCvfjL9RttJNKlBkwgoj-tKyIRjnDGOWlnGsh1WLu12DJatyV1O_KSyXJRwKylHvHPg3MiRerwTiRBBbgqU_1OD1mJZUqItNUqUqDJioHv9neGATd869XVNp\/s1999\/image1.png\" style=\"margin-left: auto; margin-right: auto;\"><img decoding=\"async\" border=\"0\" data-original-height=\"1172\" data-original-width=\"1999\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEilAITwMEHcMY6aQsPh14XcIfXJ1Qrl8Li3SbLYMCpyETU_IdVEfNheUB4VGI-Tn6ZKLCvfjL9RttJNKlBkwgoj-tKyIRjnDGOWlnGsh1WLu12DJatyV1O_KSyXJRwKylHvHPg3MiRerwTiRBBbgqU_1OD1mJZUqItNUqUqDJioHv9neGATd869XVNp\/s16000\/image1.png\"\/><\/a><\/td>\n<\/tr>\n<tr>\n<td class=\"tr-caption\" style=\"text-align: center;\">Illustration of high-level steps in the Connect-the-Dots algorithm.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\nThis approach relies on the notion of a \u201c<a href=\"https:\/\/proceedings.mlr.press\/v151\/zhu22c.html\">dominating PLD<\/a>\u201d, namely, PLD<sub>P\u2019||Q\u2019<\/sub> dominates over PLD<sub>P||Q<\/sub> if the hockey stick divergence of the former is greater or equal to the hockey stick divergence of the latter for all values of \u03b5. The key property of dominating PLDs is that they remain dominating after compositions. Thus for purposes of privacy accounting, it suffices to work with a dominating PLD, which gives us an upper bound on the exact privacy cost.\n<\/p>\n<p>\nOur main insight behind the Connect-the-Dots algorithm is a characterization of discrete PLD, namely that a PLD is supported on a given finite set of \u03b5 values if and only if the corresponding hockey stick divergence as a function of e<sup>\u03b5<\/sup> is linear between consecutive e<sup>\u03b5<\/sup> values. This allows us to discretize the hockey stick divergence by simply connecting the dots to get a piecewise linear function that precisely equals the hockey stick divergence function at the given e<sup>\u03b5<\/sup> values. See <a href=\"https:\/\/youtu.be\/jqOEj1_d2ZE\">a more detailed explanation<\/a> of the algorithm.\n<\/p>\n<table align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto;\">\n<tbody>\n<tr>\n<td style=\"text-align: center;\"><a href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEiE6rJKpbCqAMBtnF0GAwd-nzPwob4DhXZSbXjzDVnP1SGKwG9adUm8PN5QDaw6U7WqR-Z1k3iIZBXcpEL4-tpC3Winyo3yAahUGYKl7x_GdyE9j4sUD4yZe_ETZkSQ9NR05ksALQ7n4LaGmWKXTFzBV3pK6aTtv5x6kFm2KHFsy-uKU8yxMaTcgAA6\/s1999\/image3.png\" style=\"margin-left: auto; margin-right: auto;\"><img decoding=\"async\" border=\"0\" data-original-height=\"751\" data-original-width=\"1999\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEiE6rJKpbCqAMBtnF0GAwd-nzPwob4DhXZSbXjzDVnP1SGKwG9adUm8PN5QDaw6U7WqR-Z1k3iIZBXcpEL4-tpC3Winyo3yAahUGYKl7x_GdyE9j4sUD4yZe_ETZkSQ9NR05ksALQ7n4LaGmWKXTFzBV3pK6aTtv5x6kFm2KHFsy-uKU8yxMaTcgAA6\/s16000\/image3.png\"\/><\/a><\/td>\n<\/tr>\n<tr>\n<td class=\"tr-caption\" style=\"text-align: center;\">Comparison of the discretizations of hockey stick divergence by Connect-the-Dots vs Privacy Buckets.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Experimental Evaluation<\/h2>\n<p>\nThe DP-SGD algorithm involves a <em>noise multiplier<\/em> parameter, which controls the magnitude of noise added in each gradient step, and a <em>sampling probability<\/em>, which controls how many examples are included in each mini-batch. We compare Connect-the-Dots against the algorithms listed below on the task of privacy accounting DP-SGD with a noise multiplier = 0.5, sampling probability = 0.2 x 10<sup>-4<\/sup> and \u03b4 = 10<sup>-8<\/sup>.\n<\/p>\n<p>\nWe plot the value of the \u03b5 computed by each of the algorithms against the number of composition steps, and additionally, we plot the running time of the implementations. As shown in the plots below, privacy accounting using Renyi DP provides a loose estimate of the privacy loss. However, when comparing the approaches using PLD, we find that in this example, the implementation of Connect-the-Dots achieves a tighter estimate of the privacy loss, with a running time that is 5x faster than the Microsoft PRV Accountant and &gt;200x faster than the previous approach of Privacy Buckets in the Google-DP library.\n<\/p>\n<table align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto;\">\n<tbody>\n<tr>\n<td style=\"text-align: center;\"><a href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEg1sR32rJbcXkLLXSD6dDP0NUpbTeMtNJ_8iVq6upHdRTJ1x_-dU4KOuwNGnjW1bNXo-a2b4tGI2QJPViPY4IowynmfhXcRkSJXIjOpn8Ni4we0wX7MP19EOZ0u9zRsDcr6p5hNRqTAP7yquono6i-84M5l7uKQY-MlMBzKu22jvdSVK_0JcFzc2N9Q\/s1999\/image5.png\" style=\"margin-left: auto; margin-right: auto;\"><img decoding=\"async\" border=\"0\" data-original-height=\"594\" data-original-width=\"1999\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEg1sR32rJbcXkLLXSD6dDP0NUpbTeMtNJ_8iVq6upHdRTJ1x_-dU4KOuwNGnjW1bNXo-a2b4tGI2QJPViPY4IowynmfhXcRkSJXIjOpn8Ni4we0wX7MP19EOZ0u9zRsDcr6p5hNRqTAP7yquono6i-84M5l7uKQY-MlMBzKu22jvdSVK_0JcFzc2N9Q\/s16000\/image5.png\"\/><\/a><\/td>\n<\/tr>\n<tr>\n<td class=\"tr-caption\" style=\"text-align: center;\"><b>Left:<\/b> Upper bounds on the privacy parameter \u03b5 for varying number of steps of DP-SGD, as returned by different algorithms (for fixed \u03b4 = 10<sup>-8<\/sup>). <b>Right:<\/b> Running time of the different algorithms.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Conclusion &amp; Future Directions<\/h2>\n<p>\nThis work proposes <a href=\"https:\/\/github.com\/google\/differential-privacy\/commit\/b4b26475acce0be9b7e9844db4af5a1b9929cab1\">Connect-the-Dots<\/a>, a new algorithm for computing optimal privacy parameters for compositions of differentially private algorithms. When evaluated on the DP-SGD task, we find that this algorithm gives tighter estimates on the privacy loss with a significantly faster running time.\n<\/p>\n<p>\nSo far, the library only supports the pessimistic estimate version of Connect-the-Dots algorithm, which provides an upper bound on the privacy loss of DP-algorithms. However, the <a href=\"https:\/\/petsymposium.org\/popets\/2022\/popets-2022-0122.pdf\">paper<\/a> also introduces a variant of the algorithm that provides an \u201coptimistic\u201d estimate of the PLD, which can be used to derive<em> lower bounds<\/em> on the privacy cost of DP-algorithms (provided those admit a \u201cworst case\u201d PLD). Currently, the library does support optimistic estimates as given by the Privacy Buckets algorithm, and we hope to incorporate the Connect-the-Dots version as well.\n<\/p>\n<h2>Acknowledgements<\/h2>\n<p>\n<em>This work was carried out in collaboration with Vadym Doroshenko, Badih Ghazi, Ravi Kumar. We thank Galen Andrew, Stan Bashtavenko, Steve Chien, Christoph Dibak, Miguel Guevara, Peter Kairouz, Sasha Kulankhina, Stefan Mellem, Jodi Spacek, Yurii Sushko and Andreas Terzis for their help.<\/em>\n<\/p>\n<\/div>\n<p>[ad_2]<br \/>\n<br \/><a href=\"http:\/\/ai.googleblog.com\/2022\/12\/differential-privacy-accounting-by.html\">Source link <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>[ad_1] Posted by Pritish Kamath and Pasin Manurangsi, Research Scientists, Google Research Differential privacy (DP) is an approach<\/p>\n","protected":false},"author":2,"featured_media":83,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-82","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-google-ai"],"_links":{"self":[{"href":"https:\/\/todaysainews.com\/index.php\/wp-json\/wp\/v2\/posts\/82","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/todaysainews.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/todaysainews.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/todaysainews.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/todaysainews.com\/index.php\/wp-json\/wp\/v2\/comments?post=82"}],"version-history":[{"count":1,"href":"https:\/\/todaysainews.com\/index.php\/wp-json\/wp\/v2\/posts\/82\/revisions"}],"predecessor-version":[{"id":3020,"href":"https:\/\/todaysainews.com\/index.php\/wp-json\/wp\/v2\/posts\/82\/revisions\/3020"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/todaysainews.com\/index.php\/wp-json\/wp\/v2\/media\/83"}],"wp:attachment":[{"href":"https:\/\/todaysainews.com\/index.php\/wp-json\/wp\/v2\/media?parent=82"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/todaysainews.com\/index.php\/wp-json\/wp\/v2\/categories?post=82"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/todaysainews.com\/index.php\/wp-json\/wp\/v2\/tags?post=82"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}