<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Differentially Private Simple Linear Regression</title></titleStmt>
			<publicationStmt>
				<publisher></publisher>
				<date>03/03/2022</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10336471</idno>
					<idno type="doi">10.2478/popets-2022-0041</idno>
					<title level='j'>Proceedings on Privacy Enhancing Technologies</title>
<idno>2299-0984</idno>
<biblScope unit="volume">2022</biblScope>
<biblScope unit="issue">2</biblScope>					

					<author>Daniel Alabi</author><author>Audra McMillan</author><author>Jayshree Sarathy</author><author>Adam Smith</author><author>Salil Vadhan</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Abstract                          Economics and social science research often require analyzing datasets of sensitive personal information at fine granularity, with models fit to small subsets of the data. Unfortunately, such fine-grained analysis can easily reveal sensitive individual information. We study regression algorithms that satisfy              differential privacy              , a constraint which guarantees that an algorithm’s output reveals little about any individual input data record, even to an attacker with side information about the dataset. Motivated by the              Opportunity Atlas              , a high-profile, small-area analysis tool in economics research, we perform a thorough experimental evaluation of differentially private algorithms for simple linear regression on small datasets with tens to hundreds of records—a particularly challenging regime for differential privacy. In contrast, prior work on differentially private linear regression focused on multivariate linear regression on large datasets or asymptotic analysis. Through a range of experiments, we identify key factors that affect the relative performance of the algorithms. We find that algorithms based on robust estimators—in particular, the median-based estimator of Theil and Sen—perform best on small datasets (e.g., hundreds of datapoints), while algorithms based on Ordinary Least Squares or Gradient Descent perform better for large datasets. However, we also discuss regimes in which this general finding does not hold. Notably, the differentially private analogues of Theil–Sen (one of which was suggested in a theoretical work of Dwork and Lei) have not been studied in any prior experimental work on differentially private linear regression.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction</head><p>The analysis of small datasets, with sizes in the dozens to low hundreds of records, is crucial in many social science applications. For example, neighborhood-level household income, high-school graduation rate, and incarceration rates are all studied using sensitive datasets that are subdivided into small, local units to allow for fine-grained inspection (e.g., <ref type="bibr">[12]</ref>). As datasets get larger, they are subdivided more finely. Handling small samples automatically and reliably is therefore crucial even for working with big data. However, the release of statistical estimates based on these data quantities-if too many and too accurate-can allow reconstruction of the original dataset <ref type="bibr">[17]</ref>. The possibility of such attacks led to di erential privacy <ref type="bibr">[19]</ref>, a rigorous mathematical definition used to quantify privacy loss. Di erentially private (DP) algorithms limit the information that is leaked about any particular individual by introducing random distortion. The amount of distortion, and its effect on utility, are most often studied for large datasets, using asymptotic tools. When datasets are small, one has to be very careful when calibrating di erentially private statistical estimates to preserve utility.</p><p>In this work, we focus on the prominent statistical task of simple (i.e., one-dimensional) linear regression, which is a workhorse of analysis in many social science fields <ref type="bibr">[16]</ref>. Our goal is to provide methodology for performing di erentially private linear regression in practical applications. In particular, we are motivated by the small-area regressions that underpin the highprofile Opportunity Atlas <ref type="bibr">[13]</ref>. We show that di erentially private linear regression can be accurate even on small datasets. We will provide insight and guidance into how to choose a DP algorithm for simple linear regression in a variety of realistic parameter regimes. Our work di ers from previous work on di erentially private linear regression in its emphasis on small datasets (previous works mostly focus on asymptotic theoretical analysis) and in our evaluation on a real application.</p><p>Even without a privacy constraint, small sample sizes pose a problem for statistical inference, since the variability from sample to sample, called the sampling error, can overwhelm the signal about the underlying trend. A reasonable concrete goal for a DP mechanism, then, is that it not introduce substantially more uncertainty into the estimate than the sampling error. Specifically, we compare the noise added in order to maintain privacy to the standard error of the nonprivate estimate, obtained using Ordinary Least Squares (OLS). Our experiments indicate that for a wide range of realistic datasets and moderate values of the privacy parameter, &#193;, it is possible to choose a DP linear regression algorithm that introduces distortion less than the standard error. In particular, in our motivating use-case, the Opportunity Atlas <ref type="bibr">[13]</ref>, we provide a di erentially private algorithm, DPTheilSen, that matches or outperforms the heuristic method currently deployed, which does not formally satisfy di erential privacy.</p><p>We focus on univariate linear regression because, as shown by the Opportunity Atlas deployment, choosing the right algorithm for this basic task when data is limited is a challenge. This problem remains a barrier to adoption of di erential privacy for many practical applications. While the univariate case may seem much simpler than the higher dimensional cases studied in many previous works, the algorithms that we show are commonly the best performing in the small dataset regime, DPTheilSen and its variants, were not considered in prior experimental work, including in the systematic empirical evaluation conducted by Wang <ref type="bibr">[29]</ref>. Prior work focuses almost exclusively on the large dataset regime, and our work shows that there is a fundamental shift in the types of algorithms that should be considered in the small versus large dataset regimes. One of the variants of Theil-Sen we consider, DPTheilSen1Match, was proposed by Dwork and Lei <ref type="bibr">[18]</ref>, who gave a theoretical, asymptotic analysis of its accuracy. We are not aware of any prior experimental evaluation of any of the DPTheilSen variants.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">Preliminaries</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1">Di erential Privacy</head><p>The algorithms in this paper satisfy di erential privacy (DP). Since our algorithms often include hyperparameters, we state a definition of DP for algorithms that take as input not only the dataset, but also the desired privacy parameters and any required hyperparameters. Let X be a data universe (e.g., R 2 for simple linear regression) and X n be the space of datasets. Two datasets d, d &#213; oe X n are neighboring, denoted d &#8805; d &#213; , if they di er on a single record. Let H be a hyperparameter space and Y be an output space.</p><p>Definition 1 ((&#193;, ")-Di erential Privacy <ref type="bibr">[19]</ref>). A randomized mechanism M : X n &#9674; R &#216;0 &#9674; [0, 1] &#9674; H ae Y is di erentially private if for all datasets d &#8805; d &#213; oe X n , privacy-loss parameters &#193; &#216; 0, " oe [0, 1], hp oe H, and events E &#8482; Y,</p><p>where probabilities are taken over M 's random coins.</p><p>For strong privacy guarantees, the privacy-loss parameter is typically taken to be a small constant less than 1 (note that e &#193; &#165; 1 + &#193; as &#193; ae 0), but we will sometimes consider larger constants such as &#193; = 8 to match what was used in our motivating application (described in Section 3).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2">Simple Linear Regression</head><p>In this paper, we consider the most common model of linear regression: we are given n observations x 1 , . . . , x n oe R of an explanatory variable and corresponding observations y 1 , . . . , y n oe R of a response variable. We wish to find a slopeoe R and an interceptoe R such that, y i is well-approximated by -&#8226; x i + -. Specifically, we consider the Ordinary Least Squares (OLS) objective characterized by the following optimization problem:</p><p>where x = (x 1 , . . . , x n ) T , y = (y 1 , . . . , y n ) T , and 1 is the all-ones vector. This is the most commonly used linear regression formulation in practice. Indeed, when y is generated according to the model</p><p>Gaussian noise e i , then the OLS solution is the maximum likelihood estimator for the "ground truth" parameters -, -. Moreover, OLS has a simple closed form solution:</p><p>where</p><p>In this paper, we focus on predicting the (mean of the) response variable y at a single value of the explanatory variable x. For x new oe R, the prediction at x new is defined as:</p><p>p xnew be the prediction at x new computed using the OLS estimatesand -. The corresponding DP estimates will be denoted by &#194; p xnew . The quantities &#8218; p xnew and &#194; p xnew are random variables, where the randomness is due to the sampling process and/or the noise added to ensure privacy. After normalizing the independent variable to lie in the interval [0, 1], we will be primarily concerned with the predicted values at x new = 0.25 and 0.75, which for ease of notation we denote as p 25 and p 75 , respectively. Correspondingly, we will use &#8218; p 25 , &#8218; p 75 to denote the OLS estimates of the predicted values and &#194; p 25 , &#194; p 75 to denote the DP estimates. Note that computing both of these predicted values allows one to derive the full simple linear regression model. In this paper, we focus on the error on the predicted values rather than the slope itself in order to compare directly with the Opportunity Atlas tool <ref type="bibr">[12]</ref>, described in Section 3, which releases estimates of p 25 and p 75 for certain regressions done for every census tract in each state. However, we also discuss how the error on these predicted values relates to the error on the slope.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.3">Error Metric</head><p>In measuring the performance of di erent algorithms, we will focus on high probability error bounds that can be accurately estimated through Monte Carlo experiments. Providing tight theoretical error bounds for DP linear regression is an important direction for future work. Since the relationship between the OLS estimate &#8218; p xnew and the true value p xnew is well-understood, we focus on measuring the di erence between the private estimate &#194; p xnew and &#8218; p xnew Specifically, we define the prediction error at x new to be |&#194; p xnew &#8800; &#8218; p xnew |. Note that the slopecan be computed as (p 75 &#8800; p 25 )/(0.75 &#8800; 0.25), and thus if we estimate the slope using di erentially private estimates &#194; p 75 and &#194; p 25 , the error (compared to the OLS estimate -) will be at most a constant factor larger than the prediction errors at .25 and .75:</p><p>Furthermore, in Section 7.3.2, we also experimentally evaluate the error on the slope and find that the com-parison between algorithms is very similar to what we see for the point estimate errors. For a dataset d oe X n , x new oe R, and q oe [0, 1], we define the q error bound as</p><p>where the dataset d is fixed, and the probability is taken over the randomness in the DP algorithm. We empirically estimate C(q) by running many trials of the algorithm on the same dataset d: &#264;(q)(d) = min{c : for at least q fraction of trials,</p><p>We term &#264;(q)(d), the q empirical error bound. We will often drop the reference to d from the notation, but note that the error metric |&#194; p xnew &#8800; &#8218; p xnew | only accounts for the randomness in the algorithm, not the sampling error.</p><p>When the ground truth slopeand interceptare known (e.g., for synthetically generated data), we can compute error bounds compared to the ground truth, rather than to the non-private OLS estimate. So, let C true (q)(d) and &#264;true (q)(d) be similar to the error bounds described earlier, except that the prediction error is measured as |&#194; p xnew &#8800; p xnew |. This error metric accounts for the randomness in both the sampling and the algorithm.</p><p>The standard error &#8218; &#8225;(&#8218; p xnew ) is an estimate of the standard deviation of &#8218; p xnew , &#8225;(&#8218; p xnew ). We use the following formula, which is an unbiased estimate of &#8225;(&#8218; p xnew ) in the case where y i = -&#8226; x i + -+ e i for all i oe [n] and for i.i.d. Gaussian e i (see <ref type="bibr">[30]</ref>, for example):</p><p>Even for non-Gaussian e i , it can be shown that the variance of (&#8218;</p><p>When we say the noise added for privacy is less than the sampling error, we are referring to the technical statement that &#264;(0.68) is less than the standard error, &#8218; &#8225;(&#8218; p xnew ). 1 We stress that the methods we develop do not require that the noise distribution be Gaussian; the noise model assumption is only used to derive the formula for the non-private standard deviation (Equation 3) that we use as a benchmark to compare against.</p><p>1 Note that without privacy and under an assumption of normally distributed noise, we expect &#264;(0.68) to be roughly equal to &#8225;(&#8218; px new ).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">Motivating Use-Case: Opportunity Atlas</head><p>The Opportunity Atlas, designed and deployed by the economics research group Opportunity Insights, is an interactive tool designed to study the link between the neighbourhood a child grows up in and their prospect for economic mobility <ref type="bibr">[12]</ref>. The tool provides valuable insights to researchers and policy-makers, and has received much press since its release (e.g., see coverage by the New York Times <ref type="bibr">[5]</ref>).  <ref type="bibr">[12]</ref>. This type of highly local and fine-grained analysis is typical of social sciences, where one often wants to subdivide the population as finely as possible, subject to the units having enough size for some particular statistical analysis. Working at that sample size limit poses privacy risks, which makes it a challenging but important regime for DP.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">Robustness and DP Algorithm Design</head><p>Simple linear regression is one of the most fundamental statistical tasks with well-understood convergence properties in the non-private literature. However, finding a di erentially private estimator for this task that is accurate across a range of datasets and parameter regimes is surprisingly nuanced. While there has been a significant amount of prior work on di erentially private linear regression, often in even more general settings than we consider (such as multivariate regression or even general convex optimization), our work appears to be unique in its focus on achieving high utility on small datasets. Indeed, prior work has focused on asymptotic performance (as the sample size n grows), giving either theoretical bounds with large or unspecified constants (e.g., <ref type="bibr">[6,</ref><ref type="bibr">11,</ref><ref type="bibr">18,</ref><ref type="bibr">25,</ref><ref type="bibr">26]</ref>) or experimental evaluation on datasets of size at least n = 1, 000 (e.g., <ref type="bibr">[25,</ref><ref type="bibr">29]</ref> 2 ). This type of analysis makes it di cult to compare the relative performance of these algorithms on small datasets. In contrast, we provide a thorough experimental evaluation on datasets of size in the range n = 30 to 400 datapoints for the Opportunity Atlas use-case and n = 30 to 10, 000 on synthetically generated data. This regime requires a fundamental change in the types of algorithms that are considered.</p><p>As a first attempt to construct a di erentially private estimator for this task, one might consider the global sensitivity <ref type="bibr">[19]</ref>:</p><p>One can create a di erentially private mechanism by adding noise proportional to GS f /&#193;. Unfortunately, the global sensitivity of &#8218; p 25 and &#8218; p 75 are both infinite (even if we clip each (x, y) datapoint to lie within a bounded range, like in the Opportunity Atlas use-case, the point estimates &#8218; p 25 and &#8218; p 75 are unbounded). For the type of datasets that we typically see in practice, however, changing one datapoint does not result in a major change in the point estimates. For such datasets, where the point estimates are reasonably stable, one might hope to take advantage of the local sensitivity: Definition 3 (Local Sensitivity <ref type="bibr">[23]</ref>). The local sensitivity of a query f :</p><p>Unfortunately The Opportunity Insights (OI) algorithm takes a heuristic approach by adding noise proportional to a non-private, heuristic upper bound on the local sensitivity of data from tracts in any given state. However, their heuristic approach does not satisfy the formal requirements of di erential privacy, leaving open the possibility that there exists a realistic attack.</p><p>The OI algorithm incorporates a "winsorization" step in their estimation procedure (e.g., dropping the top and bottom 10% of data values). This sometimes has the e ect of greatly reducing the local sensitivity (and also their upper bound on it) due to the possible removal of outliers. This suggests that for finding an e ective di erentially private algorithm, we should consider di erentially private analogues of robust linear regression methods rather than of OLS. Specifically, we consider Theil-Sen, a robust estimator for linear regression proposed by Theil <ref type="bibr">[28]</ref> and further developed by Sen <ref type="bibr">[24]</ref>. Similar to the way in which the median is more robust to changes in the data than the mean, the Theil-Sen estimator is more robust to changes in the data than OLS .</p><p>Motivated by the above conditions, we consider three di erentially private algorithms based on both robust and non-robust methods:</p><p>DPSuffStats is the DP mechanism that most closely mirrors OLS. It involves perturbing the su cient statistics ncov(x, y) and nvar(x) from the OLS computation. This algorithm is related to the "Analyze Gauss" tech-nique <ref type="bibr">[20]</ref>, which is the basis of some of the algorithms considered by <ref type="bibr">[25]</ref> and <ref type="bibr">[29]</ref>. However, we deviate from prior work in using Laplace noise, rather than Gaussian noise, to ensure pure di erential privacy rather than approximate di erential privacy. DPSuffStats has two main benefits: it is as computationally e cient as its non-private analogue, and it allows us to release DP versions of the su cient statistics with no extra privacy cost.</p><p>DPTheilSen is a DP version of Theil-Sen. The non-private estimator computes the p 25 estimates based on the lines defined by all pairs of datapoints (x i , y i ), (x j , y j ) for all i " = j oe [n], then outputs the median of these pairwise estimates. To create a di erentially private version, we replace the median computation with a di erentially private median algorithm. We consider three DP versions of this algorithm which use di erent DP median algorithms: DPExpTheilSen, DPWideTheilSen, and DPSSTheilSen. We also consider more computationally e cient variants that pair points according to one or more random matchings, rather than using all ! n 2 " pairs. A DP algorithm obtained by using one matching was previously considered by Dwork and Lei <ref type="bibr">[18]</ref> (their "Short-Cut Regression Algorithm"). Our algorithms can be viewed as updated versions of their approach, reflecting improvements in DP median estimation since <ref type="bibr">[18]</ref>, as well as incorporating benefits accrued by considering more than one matching.</p><p>DPGradDescent is a DP mechanism that uses DP gradient descent to solve the convex optimization problem that defines OLS: argmin -,-&#206;y &#8800; -x &#8800; -1&#206; 2 . We use the private stochastic gradient descent technique proposed by <ref type="bibr">[6]</ref>. Versions that satisfy pure, approximate, and zero-concentrated di erential privacy are considered. While a variant of DPTheilSen does appear in <ref type="bibr">[18]</ref>, to the best of our knowledge it does not appear in any experimental studies exploring di erentially private algorithms for linear regression. We find that DPTheilSen is particularly e ective in the small dataset regime, and can significantly outperform other DP algorithms in this regime.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">Related Work</head><p>Linear regression is one of the most prevalent statistical methods in the social sciences, and hence has been studied previously in the di erential privacy literature. These works have included both theoretical analysis and experimental exploration, with the majority of work focusing on large datasets.</p><p>One of our main findings -that robust estimators perform better than parametric estimators in the di erentially private setting, even when the data come from a parametric model -corroborate insights by Dwork and Lei <ref type="bibr">[18]</ref> with regard to the connection between robust statistics and di erential privacy, and by Couch et al. <ref type="bibr">[15]</ref> in the context of hypothesis testing.</p><p>As discussed earlier, systematic studies of DP linear regression have been performed in several prior works. She et <ref type="bibr">[25]</ref> considered di erentially private ordinary least squares methods and estimated confidence intervals for the regression coe cients. When we plug in parameters from our experiments<ref type="foot">foot_0</ref> , She et's main algorithm (OLS over projected data) requires n to be larger than 431 at a minimum. She et runs experiments on synthetic datasets with sizes ranging from n = 10 3 to n = 10 5 , and on real datasets with sizes ranging from n = 30, 000 to n = 70, 000. She et's algorithms perform well (i.e., they correctly reject the null hypothesis with high probability) only once the dataset size n is at least 10, 000. Wang <ref type="bibr">[29]</ref> considered private ridge regression, using techniques similar to output perturbation <ref type="bibr">[11]</ref>. Wang runs some experiments on synthetic data with n ranging from 50 to 10 7 datapoints, but the real dataset evaluations included are focused on large datasets with n ranging from 500 to 583, 250 datapoints. These previous works on DP linear regression present methods and experiments for multi-dimensional data (e.g., the datasets used in <ref type="bibr">[29]</ref> contain at least 13 explanatory variables), whereas we are concerned with the one-dimensional setting and the small dataset regime.</p><p>A Bayesian approach to DP linear regression is taken by Bernstein and Sheldon <ref type="bibr">[7]</ref> which, unlike ours, requires a prior on the distribution of both the regression coe cients and the independent variables. Zhang et al. <ref type="bibr">[31]</ref> and Awan and Slavkovic <ref type="bibr">[4]</ref> study the functional mechanism for linear regression, and Cai et al. <ref type="bibr">[10]</ref> provide sharp minimax bounds for linear regression under (&#193;, ")-di erential privacy constraints. But these works do not pertain to the small dataset onedimensional regime.</p><p>In all of the works mentioned above, the theoretical utility guarantees are asymptotic, and the experimental results are focused on large datasets (i.e., with tens of thousands of datapoints), so it is di cult to ascertain the utility in the small dataset regime. None of the pre-vious experimental works have considered DPTheilSen and its variants, which we find to be the best performing set of algorithms in this challenging regime.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6">Algorithms</head><p>In this section we detail the practical di erentially private algorithms we will evaluate experimentally. Pseudocode for all e cient implementations of each algorithm described can be found here or later on in the Appendix, and real code can be found in our GitHub repository: <ref type="url">https://github.com/anonymous-conf/dplr</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.1">DPSuffStats</head><p>In DPSuffStats (Algorithm 1), we add Laplace noise, with standard deviation approximately 1/&#193;, to the OLS su cient statistics, ncov(x, y), nvar(x), and then use the noisy su cient statistics to compute the predicted values. Note that this algorithm fails if the denominator for the OLS estimator, the noisy version of nvar(x), becomes 0 or negative, in which case we output &#8249; (failure). The probability of failure decreases as &#193; or nvar(x) increases. DPSuffStats is the simplest and most e cient algorithm that we will study. In addition, the privacy guarantee is maintained even if we additionally release the noisy statistics nvar(x) + L 1 and ncov(x, y) + L 2 , which may be of independent interest to researchers. We also note that the algorithm is biased due to dividing by a Laplacian distribution centered at nvar(x). Lemma 4. For 0 AE r l AE r u , Algorithm 1 (DPSuffStats) is (&#193;, 0)-DP.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.2">DP TheilSen</head><p>The non-private Theil-Sen estimator is a robust estimator for linear regression. It computes the p 25 estimates based on the lines defined by all pairs of datapoints (x i , y i ), (x j , y j ) for all i " = j oe [n], then outputs the median of these pairwise estimates. To create a di erentially private version, we can replace the median computation with a di erentially private median algorithm. We implement this approach using three DP median algorithms; two based on the exponential mechanism <ref type="bibr">[21]</ref> and one based on the smooth sensitivity of <ref type="bibr">[23]</ref> and the noise distributions of <ref type="bibr">[9]</ref>.</p><p>In the "complete" version of Theil-Sen, all pairwise estimates are included in the final median computation. A similar algorithm can be run on the point estimates computed using k random matchings of the (x i , y i ) pairs. The case k = 1 amounts to the di erentially private "Short-cut Regression Algorithm" proposed by Dwork and Lei <ref type="bibr">[18]</ref>. This results in a more computationally e cient algorithm.</p><p>We will focus mainly on k = n &#8800; 1, which we will refer to simply as DPTheilSen and k = 1, which we will refer to as DPTheilSenMatch. For any other k, we denote the algorithm by DPTheilSenkMatch. In the following subsections we discuss the di erent di erentially private median algorithms we use as subroutines. The pseudocode for DPTheilSenkMatch is found in Algorithm 2.</p><p>The lemma below relates the privacy guarantee of Algorithm 2 to the privacy guarantee of the DP median sub-algorithm, DPmed.</p><p>, hp)) for some (&#193;/k, 0)-DP mechanism M, then Algorithm 2 ( DPTheilSenkMatch) is (&#193;, 0)-DP.</p><p>4 A maximal matching here is a subset of the edges of Kn such that no two edges share a vertex and no edge can be added.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Algorithm 2: DPTheilSenkMatch</head><p>K n , the complete graph on n vertices. 4 Each &#8226; h is a vector of &#194;n/2&#202; pairs corresponding to edges. There are many possible choices for</p><p>to z (p25) and z</p><p>" return p25 , p75</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.2.1">DP Median Using Exponential Mechanism</head><p>The first di erentially private algorithm for the median that we will consider is an instantiation of the exponential mechanism <ref type="bibr">[21]</ref>, a di erentially private algorithm designed for general optimization problems. The exponential mechanism is defined with respect to a utility function u, which maps (dataset, output) pairs to real values. For a dataset z, the mechanism aims to output a value r that maximizes u(z, r).</p><p>Definition 6 (Exponential Mechanism <ref type="bibr">[21]</ref>). Given dataset z oe R n and the range of the outputs, [r l , r u ], the exponential mechanism outputs r oe [r l , r u ] with probability proportional to exp 1 &#193;u(z,r) 2GSu</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>2</head><p>, where</p><p>One way to instantiate the exponential mechanism to compute the median is by using the following utility function. Let</p><p>where #above r and #below r denote the number of datapoints in z that are above and below r in value respectively, not including r itself. An example of the shape of the output distribution of this algorithm is given in Figure <ref type="figure">1</ref>. An e cient implementation is given in the Appendix. We will write DPExpTheilSenkMatch to refer to DPTheilSenkMatch where the DP median function is the DP exponential mechanism described above with privacy parameter &#193;/k. Again, we write</p><p>DPExpTheilSenMatch when k = 1 and DPExpTheilSen when k = n &#8800; 1.</p><p>Lemma 7. DPExpTheilSenkMatch is (&#193;, 0)-DP.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.2.2">DP Median Using Widened Exponential Mechanism</head><p>When the output space is the real line, the standard exponential mechanism for the median has some nuanced behaviour when the data is highly concentrated. For example, imagine in Figure <ref type="figure">1</ref>    The parameter &#9674; needs to be carefully chosen. All outputs within &#9674; of the median are given the same utility score, so &#9674; represents a lower bound on the expected error. Conversely, choosing &#9674; too small may result in the area around the median not being given su cient weight in the sampled distribution. We defer the question of optimally choosing &#9674; to future work.</p><p>An e cient implementation of the &#9674;-widened exponential mechanism for the median can be found in the Appendix. We will use DPWideTheilSenkMatch to refer to DPTheilSenkMatch where the DP median mechanism is the &#9674;-widened exponential mechanism with privacy parameter &#193;/k. Again, we use DPWideTheilSenMatch when k = 1 and DPWideTheilSen when k = n &#8800; 1. Lemma 8. DPWideTheilSenkMatch is (&#193;, 0)-DP.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.2.3">DP Median Using Smooth Sensitivity Noise Addition</head><p>The final algorithm we consider for releasing a di erentially private median adds noise scaled to the smooth sensitivity -a smooth upper bound on the local sensitivity function. Intuitively, this algorithm should perform well when the datapoints are clustered around the median; that is, when the median is very stable.</p><p>Definition 9 (Smooth Upper Bound on LS f <ref type="bibr">[23]</ref>).</p><p>For t &gt; 0, a function S f,t : X n ae R is a t-smooth upper bound on the local sensitivity of a function f :</p><p>where d(z, z &#213; ) is the distance between datasets z and z &#213; .</p><p>denote the function that transforms a set of point coordinates into estimates for each pair of points in our k matchings. The function that we are concerned with the smooth sensitivity of is med &#182;Z k . We will use the following smooth upper bound to the local sensitivity:</p><p>&#212; , is a t-smooth upper bound on the local sensitivity of med &#182;Z k .</p><p>Proof. Proof in the Appendix.</p><p>The algorithm then adds noise proportional to S k med &#182;Z,t ((x, y))/&#193; to med &#182;Z(x, y). Pseudo-code is given in the Appendix.The noise is sampled from the Student's T distribution. There are several other valid choices of noise distributions (see <ref type="bibr">[23]</ref> and <ref type="bibr">[9]</ref>), but we found the Student's T distribution to be preferable as the mechanism remains stable across values of &#193;</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.3">DP Gradient Descent</head><p>Ordinary Least Squares (OLS) for simple 1-dimensional linear regression is defined as the solution to the optimization problem in Equation <ref type="formula">1</ref>.There has been an extensive line of work on solving convex optimization problems in a di erentially private manner. We use the private gradient descent algorithm of <ref type="bibr">[6,</ref><ref type="bibr">27]</ref> to provide private estimates of the 0.25, 0.75 predictions (p 25 , p 75 ). This algorithm performs standard gradient descent, except that noise is added to a clipped version of the gradient at each round (clipped to range [&#8800;&#8226;, &#8226; ] 2 for some setting of &#8226; &gt; 0).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.4">DPIntercept</head><p>We also compare the above DP mechanisms to simply adding noise to the average y-value. For any given dataset (x, y), this method clips the datapoints to a given range [r l , r u ], computes &#563; = 1 n q n i=1 y i and outputs a noisy estimate &#7929; = &#563; + Lap ! 0, ru&#8800;r l &#193;n " as the predicted &#194; p 25 , &#194; p 75 estimates. This method performs well when the slopeis very small.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.5">A Note on Hyperparameters</head><p>We leave the question of how to choose the optimal hyperparameters for each algorithm to future work. Unfortunately, since the optimal hyperparameter settings may reveal sensitive information about the dataset, one cannot simply tune the hyperparameters on a subset of the sensitive data. However, we found that for most of the hyperparameters, once a good choice of hyperparameter setting was found, it could be used for a variety of similar datasets. Thus, one realistic way to tune the parameters may be to tune on a public dataset similar to the dataset of interest. For example, for applications using census data, one could tune the parameters on previous years' census data.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7">Experiments and Results</head><p>In our experiments, we evaluate the following algorithms: DPSuffStats, DPIntercept, DPExpTheilSen, DPWideTheilSen, DPSSTheilSen, DPGradDescent, and OpportunityInsights (OI). We will present results on a simulated version of the data used by the Opportunity Insights team in creating the Opportunity Insights tool, a real UCI dataset, and synthetically generated datasets that allow us to explore how properties of the data a ect relative performance of the algorithms. Our experiments indicate that for a wide range of realistic datasets, and moderate values of &#193;, it is possible to choose a DP linear regression algorithm where the error due to privacy is less than the standard error. In our motivating use-case of the Opportunity Atlas, we can design a di erentially private algorithm that outperforms the heuristic method used by the Opportunity Insights team. This is promising, since the error added by the heuristic method was deemed acceptable for deployment of the Opportunity Atlas, and for use by policy makers.</p><p>One particular di erentially private algorithm of the robust variety, called DPExpTheilSen, emerges as the best algorithm in a wide variety of settings for this small-dataset regime. This algorithm uses the exponential mechanism <ref type="bibr">[21]</ref> for the di erentially private median computation to be used in the Theil-Sen method. We will discuss some reasons for DPExpTheilSen's strong performance, and identify some regimes in which other algorithms perform better.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7.1">Experimental Setup</head><p>We will focus on data with values bounded between 0 and 1, so 0 AE x i , y i AE 1 for i = 1, . . . , n. This boundedness assumption is inherited from our main use-case, the Opportunity Atlas tool. Not all our methods require this assumption. Note that the independent variables x i in all the datasets listed below are drawn from di erent distributions.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7.1.1">Simulated Opportunity Atlas Datasets</head><p>The first set of datasets we consider is a simulated version of the data used by the Opportunity Insights team in creating the Opportunity Atlas tool described in Section 3. These datasets are valuable for our evaluation because they mimic a real-world release of privacyprotected statistics. The independent variables x i of the simulated datasets follow a lognormal distribution. Each datapoint, (x i , y i ) oe [0, 1] 2 , corresponds to a pair, (parent income percentile rank, child income percentile rank). In the data, every state in the United States is partitioned into small neighborhood-level blocks called tracts. As each individual exists in only one tract, the privacy loss on the entire release is only the maximum privacy loss of the per-tract releases (by the parallel composition theorem of di erential privacy <ref type="bibr">[22]</ref>). We perform the linear regression on each tract individually. Each of the tracts can look very di erent, as the distribution of income both across tracts and inside each tract varies in di erent states. For example, in Illinois, more than 90% of residents have incomes above the national median income. In North Carolina, on the other hand, about 50% of residents have incomes below the national median income. The "best" di erentially private algorithm di ers from state to state, and even tract to tract. We display results for Illinois (IL) which has a total of n = 219, 594 datapoints divided among 3,108 tracts. The individual datasets (corresponding to tracts in the Census data) each contain between n = 30 and n = 400 datapoints. The statistic nvar(x) ranges between 0 and 25, with the majority of tracts having nvar(x) oe [0, 5].</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7.1.2">Stock Exchange UCI Dataset</head><p>Next, we consider a real dataset that studies the relationship between the Istanbul Stock Exchange and the USD Stock Exchange <ref type="bibr">[2]</ref>. It compares {x i = Istanbul Stock Exchange national 100 index} to {y i = the USD International Securities Exchange}. The independent variables x i in this dataset follow a normal distribution. This dataset has n = 250 datapoints.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7.1.3">Other Real Datasets</head><p>In the full version of this paper, we evaluate the DP algorithms on two additional real datasets -a Washington DC Bikeshare UCI dataset and a Carbon Nanotubes UCI dataset. The Washington DC Bikeshare UCI dataset is a family of 288 small datasets (with sizes ranging from 45 to 62 datapoints) that contain the temperature (x i ) and user count of a bikeshare program (y i ) for a fixed time period. The independent variables x i have a normal distribution. The Carbon Nanotubes dataset is a larger dataset (with 10, 683 datapoints), where x i is the u-coordinate of the initial atomic coordinates of a molecule and y i is the u-coordinate of the calculated atomic coordinates after the energy of the system has been minimized. The independent variables x i have a uniform distribution. Due to space constraints and for clarity of exposition, we only briefly mention the results on these additional real datasets.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7.1.4">Synthetic Datasets</head><p>Finally, we construct synthetic datasets by sampling x i oe R, for i = 1, . . . , n, independently from a uniform distribution with x = 0.5 and variance &#8225; 2</p><p>x . For each x i , the corresponding y i is generated as y i = -x i + -+ e i , where -= 0.5, -= 0.2, and e i is sampled from N (0, &#8225; 2 e ). The (x i , y i ) datapoints are then clipped to the box [0, 1] 2 . The DP algorithms estimate the prediction at</p><p>x new using privacy parameter &#193;.</p><p>The values of n, &#8225; 2 x , &#8225; 2 e , x new , and &#193; vary across the individual experiments. The synthetic data experiments are designed to study which properties of the data and privacy regime determine the performance of the private algorithms. Thus, in these experiments, we vary one of parameters listed above and observe the impact on the accuracy of the algorithms and their relative performance to each other. Since we know the ground truth on this synthetically generated data, we plot empirical error bounds that take into account both the sampling error and the error due to the DP algorithms, &#264;true (0.68)/ &#8225;(&#8218; p xnew ). We evaluate DPTheilSenkMatch with k = 10 in the synthetic experiments rather than DPTheilSen, since the former is computationally more e cient and still gives us insight into the performance of the latter.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7.1.5">Privacy Parameters and Hyperparameters</head><p>A note on the privacy parameters in the experiments: We will state the privacy budget used to compute the pair (p 25 , p 75 ), but we will only show empirical error bounds for p 25 . The empirical error bounds for p 75 display similar phenomena. The algorithms DPSuffStats and DPGradDescent inherently release both point estimates together so the privacy loss is the same whether we release the pair (p 25 , p 75 ) or just p 25 . However, DPExpTheilSen, DPWideTheilSen, DPSSTheilSen and the OI algorithm use half their budget to release p 25 and half their budget to release p 75 , separately.</p><p>Our experiments explore a range of privacy parameters. The synthetic data experiments show results using moderate to small privacy loss parameters (Figures 5a, 5b Hyperparameters were tuned on the semi-synthetic Opportunity Insights data by experimenting with many di erent choices, and choosing the best. The hyperparameters are listed in Table <ref type="table">1</ref>. We leave the question of optimizing hyperparameters in a privacy-preserving way to future work. Hyperparameters for the synthetic datasets were chosen according to choices that seemed to perform well on the Opportunity Insights datasets. We empirically observe that good parameter choices tended to be good for a wide variety of datasets. (In particular, our synthetic data and our two real dataset  examples all have di erent x distributions. This ensures that the hyperparameters were not tuned to the specific datasets, but also leaves some room for improvement in the performance by more careful setting of hyperparameters.) As mentioned above, one realistic way to tune the parameters may be to tune on a public dataset similar to the dataset of interest.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7.2">Results on Simulated and Real Datasets</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7.2.1">Simulated Opportunity Atlas Datasets</head><p>Figure <ref type="figure">3</ref> shows the results of all the DP linear regression algorithms, as well as the heuristic mechanism used by the Opportunity Insights team (labeled OI), on the Opportunity Insights simulated data for the state of Illinois For each algorithm, we build a cumulative distribution function of the empirical error bounds set over the tracts in that state. The vertical dotted line in Figures <ref type="figure">3 in-</ref>tercepts each curve at the point where the noise due to privacy exceeds the standard error.</p><p>The privacy-loss parameter of &#193; = 16 used in the Atlas was selected by the Opportunity Insights team and a Census Disclosure Review Board by balancing the privacy and utility considerations. Although we use the same value in our experiments for sake of comparison, we stress that we generally do not recommend or endorse using such a large privacy-loss parameter in applications.</p><p>Figure <ref type="figure">3</ref> shows that there exist di erentially private algorithms that are competitive with, and in many cases more accurate than, the algorithm currently de- ployed in the Opportunity Atlas, such as DPExpTheilSen and DPSSTheilSen. Additionally, we note that the methods used by Opportunity Insights are highly tailored to their setting; as discussed in Section 4, the computation of an upper bound on the local sensitivity relies on coordination across Census tracts. (This is why we are not able to include this algorithm in our stock exchange data or synthetic data experiments -there is no natural analogue for this algorithm in the context of a single dataset.) The di erentially private methods, on the other hand, are general-purpose and do not require any coordination across tracts.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7.2.2">Results on Stock Exchange UCI Dataset</head><p>Next, we provide experimental results of all the DP linear regression algorithms on the Stock Exchange UCI dataset. We use the same hyperparameter settings for these datasets that were used for the OI dataset, shown in Table <ref type="table">1</ref>. Figure <ref type="figure">4</ref> shows the empirical cumulative density function of the output distribution on the Stock Exchange dataset. This has a di erent form from that of the empirical CDF which appears in Figure <ref type="figure">3</ref>. On this real dataset, for a moderate &#193; value of 2, the additional noise due to privacy using DPExpTheilSen is less than the standard error. Similar to Figure <ref type="figure">3</ref>, Figure <ref type="figure">4</ref> shows that DPExpTheilSen is generally the best performing algorithm, followed by DPWideTheilSen and DPSSTheilSen.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7.2.3">Results on Additional Real Datasets</head><p>The results on the Washington DC Bikeshare dataset and the Carbon Nanotubes dataset corroborate our findings on the Opportunity Atlas and Stock Exchange datasets. For a range of realistic &#193; values, the additional noise due to privacy, in particular when using DPExpTheilSen, remains less than the standard error. The full version of our paper contains detailed analysis of the results on these additional real datasets, but we will not include any further discussion here due to space constraints and for clarity of exposition. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7.3">Robustness vs. Non-robustness: Guidance for Algorithm Selection</head><p>The DP algorithms we evaluate can be divided into two classes, robust DP estimators based on Theil-Sen -DPSSTheilSen, DPExpTheilSen and DPWideTheilSen -and non-robust DP estimators based on OLS -DPSuffStats and DPGradDescent. Experimentally, we found that the algorithms' behaviour tends to be clustered in these two classes, with the robust estimators outperforming the non-robust estimators in a wide variety of parameter regimes. In the experiment we saw in the previous section (Figure <ref type="figure">3</ref>), DPExpTheilSen was the best performing algorithm, followed by DPWideTheilSen and DPSSTheilSen. In our experiments on synthetic data, however, we will see that the non-robust estimators outperform the robust estimators in some parameter regimes.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7.3.1">DPSuffStats and DPExpTheilSen</head><p>In Figure <ref type="figure">5</ref>, we investigate the relative performance ( &#264;true (0.68)/ &#8225;(&#8218; p 25 )) of the algorithms in several parameter regimes of n, &#193;, and &#8225; 2 x on synthetically generated data. For each parameter setting and for each algorithm, we plot of the average value of &#264;true (0.68)/ &#8225;(&#8218; p 25 ) over 50 trials on a single dataset, and average again over 500 independently sampled datasets. Across ranges for each of these three parameters (n oe <ref type="bibr">[31,</ref><ref type="bibr">15848]</ref>; &#8225; 2 x oe [0.003, 0.08]; &#193; oe [0.01, 10], all varied on a logarithmic scale), we see that DPExpTheilSen10Match 5 or DPSuffStats is consistently close to the best performing algorithm. We see that DPGDzCDP and DPSuffStats trend towards taking over as the best algorithm as &#193;, n, and &#8225; 2</p><p>x increases. For parameter regimes in which the non-robust algorithms outperform the robust estimators, DPSuffStats is preferable to DPGDzCDP since it is more e cient, requires less hyperparameter tuning (except for the clipping bound [r l , r u ] on the inputs x i and y i for all i oe [n]), satisfies a stronger privacy guarantee ("pure DP" instead of "concentrated DP"), and releases the noisy sufficient statistics with no additional cost in privacy. Experimentally, we find that the main indicator for ciding between robust estimators and non-robust estimators is the quantity &#193;nvar(x) (which is a proxy for &#193;n &#8225; 2</p><p>x ). Roughly, when &#193;nvar(x) and &#8225; 2 e are both large, we conclude that DPSuffStats is the best choice among the DP algorithms tested; otherwise, the robust estimator DPExpTheilSen10Match typically has lower error. Hyperparameter tuning and the quantity |x new &#8800; x| also play minor roles in determining the relative performance of the algorithms.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7.3.2">Slopes vs. Point Estimates</head><p>In Figure <ref type="figure">7</ref>, we show error bounds with respect to the slopes instead of point estimates as we vary &#193;. The slopes here are computed directly (e.g., for the Theil-Sen algorithms, we compute the DP median of many estimates of the slope); we could also compute the slopes using the p 25 and p 75 estimates. We observe similar relative performance of the algorithms between the slopes and point estimates (i.e., between Figure <ref type="figure">7</ref> and Figure <ref type="figure">5c</ref>). We note that for the Theil-Sen based algorithms, it can be more di cult to choose hyperparameters for the slopes as these can be unbounded while the point estimates are bounded between 0 and 1 in our setting of data normalized to [0, 1]. As we show in the full version of the paper, however, the Theil-Sen algorithms are less sensitive to the choice of hyperparameters than DPSuffStats.</p><p>5 DPExpTheilSen10Match is DPExpTheilSen where instead of considering all pairs of points, we use 10 random matchings of the points. We use it in the synthetic experiments since it is more computationally e cient than, but similarly performing to, DPTheilSen. x from 0.003 to 0.08, and &#193; from 0.01 to 10.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7.3.3">Role of &#193;nvar(x)</head><p>In the experiments of Figure <ref type="figure">6</ref>, we control the quantity &#193;n &#8225; 2</p><p>x , which combines the three parameters varied separately in Figure <ref type="figure">5</ref> -the size of the dataset, how concentrated the independent variable of the data is and how private the mechanism is, and is a "ground truth" analogue of the empirical quantity &#193;nvarx that appears in OLS. It appears to be a better indicator of the performance of DP mechanisms than any of the individual statistics &#193;, n, or &#8225; 2</p><p>x in isolation. In Fig- ure 6, we compare the performance of DPSuffStats and DPExpTheilSen10Match when we hold &#193;n &#8225; 2</p><p>x constant and vary &#8225; 2 e , the variance of the noise e i in the linear relationship y i = -x i + -+ e i . The error is computed as the average error over 20 trials and 500 independently sampled datasets. Notice that the periwinkle line presents the error of the non-private OLS estimator, which is our baseline. In all of our synthetic data experiments, in which the e i 's are Gaussian, once &#193;n &#8225; 2</p><p>x &gt; 400 and &#8225; 2 e &#216; 0.03, DPSuffStats is the better performing algorithm. It is also important to note that once &#193;nvar(x) is large, both DPSuffStats and DPExpTheilSen perform well.</p><p>The error, as measured by &#264;true (0.68), of both nonprivate OLS and Theil-Sen estimators converges to 0 as n ae OE at the same asymptotic rate. However, OLS converges a constant factor faster than Theil-Sen, which can be seen by the fact that the Theil-Sen and TheilSen10Match lines are strictly above the OLS line in Figures <ref type="figure">5</ref> and<ref type="figure">6</ref>. As &#193;n &#8225; 2</p><p>x increases, DPSuffStats and DPGD approach the performance of non-private OLS, and hence outperform both the non-private and private versions of Theil-Sen.</p><p>Additional experiments we ran, which we were not able to include here to due to space constraints, confirm that &#193;n &#8225; 2</p><p>x is a strong indicator of the relative performance of DPSuffStats and DPExpTheilSen as long as &#8225; e is not too small, even as other variables in the OLS standard error equation (3) -including the di erence between x new and the mean of the x values, |x new &#8800; x| -are varied.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7.3.4">The Role of Hyperparameter Tuning</head><p>A final major distinguishing feature among the DPTheilSen algorithms, DPSuffStats and DPGradDescent is the amount of prior knowledge needed by the data analyst to choose the hyperparameters appropriately. Notably, DPSuffStats does not require any hyperparameter tuning other than a bound on the data. The DPTheilSen algorithms require some reasonable knowledge of the range that p 25 and p 75 lie in.</p><p>DPGradDescent requires some knowledge of where the input values lie so it can set its hyperparameters &#8226; , T .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7.3.5">Which Robust Estimator?</head><p>In the majority of the regimes we have tested, DPExpTheilSen outperforms all the other private algorithms. However, another variation on DP TheilSen, DPWideTheilSen, can outperform DPExpTheilSen when the standard error is small. When there is little noise in the data we expect the set of pairwise estimates to be highly concentrated. As discussed in Section 6.2, this is a di cult setting for DPExpTheilSen; we designed DPWideTheilSen to address this problem.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="8">Conclusion</head><p>It is possible to design DP simple linear regression algorithms where the distortion added by the private algorithm is less than the standard error, even for small datasets. In this work, we found that in order to achieve this we needed to switch from OLS regression to the more robust linear regression estimator, Theil-Sen. We identified key factors that analysts should consider when deciding whether DP methods based on robust or nonrobust estimators are right for their applications.</p><p>This work is the first to experimentally evaluate the performance of robust algorithms for di erentially private linear regression. Prior theoretical work has highlighted the strong connection between robust statistics and di erential privacy <ref type="bibr">[15,</ref><ref type="bibr">18]</ref>, but experimental evaluations of di erentially private algorithms for linear regression (such as the systematic study by Wang <ref type="bibr">[29]</ref>) have failed to include robust algorithms in their comparisons. In addition, we are the first to consider the winning algorithm from our experiments, DPTheilSen, under privacy constraints. This algorithm is a generalization of the "Short-Cut Regression Algorithm" that was analyzed theoretically (but not experimentally) by Dwork and Lei <ref type="bibr">[18]</ref>.</p><p>The focus of this work has been on DP univariate regression releases for small datasets. The challenge of selecting an algorithm with good utility for this setting remains a barrier to adoption of di erential privacy for many practical applications. Prior work on DP linear regression has focused on multiple linear regression (i.e., where there are several or many independent variables), albeit in an asymptotic or large-dataset setting. Our results show that even in the setting of simple linear regression, the story is already quite nuanced. The algorithm that performs best depends on properties of the dataset, such as nvar(x), which cannot be directly used without violating di erential privacy. One has to make the choice based on guesses (e.g., using similar public datasets) or develop di erentially private methods for selecting the algorithm, a problem which we leave to future work. However, our experimental evaluation offers valuable heuristics for choosing a suitable algorithm in practice -in particular, our experiments demonstrate that DPTheilSen performs well across many regimes (including with small dataset sizes, when the data range is unknown and when knowledge of the output range is limited) compared to DPSuffStats, and is therefore a reliable choice for most applications. Our findings highlight important directions for future work, such as generalizing DPTheilSen to cover multivariate regression, providing uncertainty estimates such as confidence intervals, and developing theoretical explanations for its superior performance in the small dataset regime.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A Some Results in Di erential Privacy</head><p>In this section we will briefly review some of the fundamental definitions and results pertaining to general di erentially private algorithms.</p><p>For any query function f :</p><p>the global sensitivity, be the maximum amount the query can di er on neighboring datasets.</p><p>Theorem 11 (Laplace Mechanism <ref type="bibr">[19]</ref>). For any privacy parameter &#193; &gt; 0 and any given query function f : X n ae R K and database d oe X n , the Laplace mechanism outputs fL Theorem 12 (Exponential Mechanism <ref type="bibr">[21]</ref>).</p><p>Given an arbitrary range R, let u : X n &#9674; R ae R be a utility function that maps database/output pairs to utility scores. Let GS u = max r GS u(&#8226;,r) . For a fixed database d oe X n and privacy parameter &#193; &gt; 0, the exponential mechanism outputs an element r oe R with probability proportional to exp</p><p>. The exponential mechanism is (&#193;, 0)-DP.</p><p>The following results allow us to use di erentially private algorithms as building blocks in larger algorithms.</p><p>Lemma 13 (Post-Processing <ref type="bibr">[19]</ref>). Let M : X n ae Y be an (&#193;, ") di erentially private and f : Y ae R be a (randomized) function. Then f &#182; M : X n ae R is an (&#193;, ") di erentially private algorithm. Theorem 14 (Basic Composition <ref type="bibr">[19]</ref>). For any k oe</p><p>Definition 15 (Coupling). Let z and z &#213; be two random variables defined over the probability spaces Z and Z &#213; , respectively. A coupling of z and z &#213; is a joint variable Proof. The lemma follows directly from the Lipschitz property on adjacent databases and the definition of (&#193;, ")-di erential privacy.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B Privacy Proof of DPSuffStats</head><p>Lemma 18. Suppose we are given dataset x, y oe</p><p>Also, let x, &#563; be the means of x and y respectively and 1 be the all ones vector. Then if GS ncov and GS nvar are the global sensitivities of functions ncov and nvar then GS</p><p>Proof. Let z = &#200;x, y&#205; and z &#213; = &#200;x &#213; , y &#213; &#205; be neighbouring databases di ering on the nth datapoint 6 . Let a = q n&#8800;1 i=1 x i and b = q n&#8800;1 i=1 y i and note that max{a, b} AE (n &#8800; 1). Then,</p><p>6 This is without loss of generality as we can always "rotate" both databases until the index on which they di er becomes the nth datapoint.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C.2 Sensitivity to Hyperparameter</head><p>Choosing optimal hyperparameters is beyond the scope of this work. However, in this section we present some preliminary work exploring the behavior of DPWideTheilSen with respect to the choice of &#9674;. In particular, we consider the question of how robust this algorithm is to the setting of the hyperparameter. Figure <ref type="figure">8</ref> shows the performance as a function the widening parameter &#9674; on synthetic (Gaussian) data. Note that in each graph both axes are on a log-scale so we see very large variation the quality depending on the choice of hyperparameter.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C.3 Pseudo-code for DPExpTheilSen and DPWideTheilSen</head><p>In Algorithm 3, we give an e cient method for implementation of the DP median algorithm used as subroutine in DPExpTheilSen, the exponential mechanism for computing medians. To sample e ciently from this distribution, we implement a two-step algorithm following <ref type="bibr">[14]</ref>: first, we sample an interval according to the exponential mechanism, and then we will sample an output uniformly at random from that interval. To eciently sample from the exponential mechanism, we use the fact that sampling from the exponential mechanism is equivalent to choosing the value with maximum utility score after i.i.d. Gumbel-distributed noise has been added to the utility scores <ref type="bibr">[1,</ref><ref type="bibr">20]</ref>. The pseudo-code for DPWideTheilSen is given in Algorithm 5. It is a small variant on Algorithm 3.  ). The parameters of the data are fixed at &#8225; = 10 &#8800;3 and &#8226; = 10 &#8800;4 . The datapoints are then truncated so they belong between 0 and 1. Note that both axes are on a log scale. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D DPSSTheilSen</head><p>Suppose we are given a dataset (x, y). Consider a neighboring dataset (x &#213; , y &#213; ) that di ers from the original dataset in exactly one row. Let z be the set of point estimates (e.g., the p25 or p75 point estimates) induced by the dataset (x, y), and let z &#213; be the set of point estimates induced by dataset (x &#213; , y &#213; ) by Theil-Sen. Formally, for N = kn/2, we let Z k : [0, 1] n &#9674; [0, 1] n ae R N denote the function that transforms a set of point coordinates into estimates for each pair of points. Then z = Z(x, y), z &#213; = Z(x &#213; , y &#213; ). Notice that changing one datapoint in (x, y) changes at most k of the point estimates in z. Assume that both z and z &#213; are in sorted   choices that have been made in designing this algorithm: the step size, the batch size for the gradients, how many of the estimates are averaged to make our final estimate, how the privacy budget is distributed. We have included this pseudo-code for completeness to show the choices that were made in our experiments. We do not claim to have extensively explored the suite of parameter choices, and it is possible that a better choice of these parameters would result in a better performing algorithm. Differentially private gradient descent has received a lot of attention in the literature. For a more in-depth discussion of DP gradient descent see <ref type="bibr">[6]</ref>. Proof. The proof of the first statement is a routine application of Proposition 1.6 in <ref type="bibr">[8]</ref>, and the proof of the second statement is a routine application of Theorem 11 and Theorem 14.</p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="3" xml:id="foot_0"><p>We set &#8225;x = 0.08, B = 1, &#193; = 1, " = 10 &#8800;6 , and r = n.</p></note>
		</body>
		</text>
</TEI>
