alphaFeedback

WorksComputer Science

Privacy for Free in Efficient Agnostic Halfspace Learning

AI contributions
  • AI tools
View details

Abstract

We provide the first computationally efficient, differentially private algorithms for agnostically learning halfspaces. In particular, we study three different settings of agnostic learning: improper learning under Gaussian and log-concave marginals; proper learning under Gaussian marginals; and semi-agnostic learning under Gaussian marginals. In all three aforementioned settings, the added cost in the sample complexity due to privacy matches the respective non-private sample complexity, implying that we get privacy for free.

Introduction

Learning halfspaces is a classical problem in learning theory. A halfspace is specified by a weight vector w∈Rdw \in\mathbb{R}^{d} and a threshold t∈Rt \in\mathbb{R}, and classifies a point x∈Rdx \in\mathbb{R}^{d} according to sign⁡(⟨w,x⟩+t)\operatorname{sign}(\langle w,x\rangle+ t). We write PP for the distribution of labeled examples and μ=PX\mu= P_{X} for its input marginal. In classical realizable PAC learning, the distribution PP is assumed to be linearly separable and the learner is required to output a classifier hh with err⁡P(h)≤α\operatorname{err}_{P}(h) \le\alpha for any accuracy parameter α∈(0,1)\alpha\in(0,1). In the agnostic setting, the labels in the dataset may be arbitrary. Thus, the guarantee is relaxed to requiring the learner to output a classifier hh with error

err⁡P(h)≤OPT⁡+α,\operatorname{err}_{P}(h) \le\operatorname{OPT} + \alpha,

where OPT is the minimum error achievable by a halfspace under PP. This setting allows the data to be noisy or imperfectly separable by a linear decision boundary. Differential privacy (DP) Dwork et al. [21] imposes an additional constraint, requiring the distribution of the learner’s output to change only slightly when a single training example is replaced. In this paper, we study whether agnostic halfspace learning can be made differentially private with small computational and statistical overhead relative to non-private learning.

Agnostically learning halfspaces is known to be computationally hard, even for non-private improper learners, i.e., learners whose output need not be a halfspace Tiegel [48]. To overcome this, a rich line of work has focused on distributions with structured marginals but arbitrary labels. Under Gaussian and more generally log-concave marginals, Kalai et al. [29] provided the first algorithm for agnostic learning of halfspaces whose runtime is polynomial in the dimension for every fixed accuracy. For Gaussian marginals, their complexity scales as dO(1/α4)d^{O(1/\alpha^{4})} which was later improved to dO(1/α2)d^{O(1/\alpha^{2})} by Diakonikolas et al. [11]. However, their algorithm was improper. A proper algorithm must output a halfspace and can be desirable because a linear halfspace offers a more compact and interpretable representation of the classifier with O(d)O(d) parameters. For Gaussian marginals, Diakonikolas et al. [15] provided the first agnostic proper learner for halfspaces with somewhat comparable statistical and computational complexity. For DP agnostic learning, Kasiviswanathan et al. [34] provided the first agnostic private learners for finite classes with sample complexity scaling logarithmically in the size of the hypothesis class. Alon et al. [2] and Li et al. (2025) provided general reductions from agnostic learning to realisable learning. However, their reductions are not shown to be computationally efficient. For halfspaces over finite domains, Beimel et al. [6] provided efficient private agnostic learners, but over infinite domains such as Rd\mathbb{R}^d, distribution-free private learning of halfspaces is information-theoretically impossible even in the realisable setting due to their infinite Littlestone dimension ([7, 1]). Distributional assumptions on the marginal μ\mu are therefore essential for both privacy and computational efficiency. Given the non-private agnostic learners under structured marginals ([29, 15]), our goal in this work is to obtain matching statistical and computational complexities under differential privacy.

However, even under Gaussian marginals, the dO(1/α2)d^{O(1/\alpha^2)} dependence on statistical and therefore computational complexity is likely unavoidable for approaches using polynomial regression due to known SQ lower bounds ([16, 25]). A natural relaxation for the problem is semi-agnostic proper learning, which allows halfspaces hh with

err⁡P(h)≤C⋅OPT+α,\operatorname{err}_{P}(h) \le C\cdot\mathrm{OPT}+\alpha,

where CC is a known universal constant. Non-private learners, under Gaussian marginals, can achieve this guarantee in time polynomial in both dd and 1/α1/\alpha simultaneously ([17]). This raises the natural question of whether the polynomial dependence on dd, 1/α1/\alpha can be maintained for semi-agnostic learning under privacy. Together, these lead to the following question:

What statistical and computational guarantees can DP algorithms get under Gaussian marginals for i) agnostic improper, ii) agnostic proper, and iii) semi-agnostic proper learning of halfspaces?

Our Results

Table 1 summarizes our results. All algorithms satisfy (εDP,δDP)(\varepsilon_{\mathrm{DP}},\delta_{\mathrm{DP}})-DP guarantees with respect to the dataset, and their error guarantees hold with high probability. Additionally, all our algorithms run in time polynomial in the sample size for every fixed accuracy. Throughout, O~(⋅)\widetilde{O}(\cdot) hides factors polylogarithmic in 1/α1/\alpha, 1/β1/\beta, 1/εDP1/\varepsilon_{\mathrm{DP}}, and 1/δDP1/\delta_{\mathrm{DP}}.

MarginalLearnerErrorSample complexity O~(⋅)\widetilde{O}(\cdot)
GaussianImproperOPT+α\mathrm{OPT}+\alphaDGα2+DGεDPα\frac{D_{\mathrm{G}}}{\alpha^2}+\frac{D_{\mathrm{G}}}{\varepsilon_{\mathrm{DP}}\alpha}
Log-concaveImproperOPT+α\mathrm{OPT}+\alphaDLα2+DLεDPα3/2\frac{D_{\mathrm{L}}}{\alpha^2}+\frac{D_{\mathrm{L}}}{\varepsilon_{\mathrm{DP}}\alpha^{3/2}}
GaussianProperOPT+α\mathrm{OPT}+\alphaDGα2+DGεDPα+1α6+1εDPα5\frac{D_{\mathrm{G}}}{\alpha^2}+\frac{D_{\mathrm{G}}}{\varepsilon_{\mathrm{DP}}\alpha}+\frac{1}{\alpha^6}+\frac{1}{\varepsilon_{\mathrm{DP}}\alpha^5}
GaussianProperC⋅OPT+αC\cdot\mathrm{OPT}+\alphadα2+dεDPα\frac{d}{\alpha^2}+\frac{d}{\varepsilon_{\mathrm{DP}}\alpha}

Table 1. The rows correspond, respectively, to Theorem 2.1, Theorem D.1, Theorem 3.1, and Theorem 4.1. Here, DG≍dO(1/α2)D_{\mathrm{G}}\asymp d^{O(1/\alpha^2)} and DL≍dexp⁡(O(1/α))D_{\mathrm{L}}\asymp d^{\exp(O(1/\alpha))} match known rates in the non-private setting ([11, 29]), and O~\widetilde{O} suppresses polylogarithmic factors.

Agnostic Improper learning. Our first result in § 2 gives a private improper agnostic learner under the standard Gaussian marginal. The algorithm relies on private polynomial L1L^1 regression using clipped Hermite features of degree O(1/α2)O(1/\alpha^2). A key step is to control the effect of clipping on the error and then convert the expected excess-loss bound to a high-probability one. This achieves an error at most OPT +α+\alpha with high probability using sample complexity

n=O~(Dpα2+DpαεDP)whereDp=(d+pp)(1)n = \widetilde{O}\left(\frac{D_p}{\alpha^2}+\frac{D_p}{\alpha\varepsilon_{\mathrm{DP}}}\right) \quad\text{where} \quad D_p = \binom{d+p}{p} \tag*{(1)}

The first term in Equation (1) is the statistical cost of the problem due to finite samples and the second term is the cost due to privacy. In Appendix § 10, we extend this approach to known log-concave marginals using p=exp⁡(O(1/α))p=\exp(O(1/\alpha)), incurring an additional α−1/2\alpha^{-1/2} factor in the privacy term of Equation (1) (as shown in Table 1).

Agnostic Proper learning. In § 3 we give a proper DP learner for halfspaces under Gaussian marginals with error at most OPT +α+\alpha. As shown in Table 1, its sample size is

n=O~(Dpα2+DpαεDP+1α6+1εDPα5)(2)n = \widetilde{O}\left(\frac{D_p}{\alpha^2}+\frac{D_p}{\alpha\varepsilon_{\mathrm{DP}}}+\frac{1}{\alpha^6}+\frac{1}{\varepsilon_{\mathrm{DP}}\alpha^5}\right) \tag*{(2)}

The learner works by first estimating a polynomial privately, similar to the improper case, which gives the first two terms in Equation (2). Then we show that this polynomial can be used to obtain a subspace of dimension O(α−4)O(\alpha^{-4}) which contains a halfspace with error close to OPT. Finally, creating a discrete cover of halfspaces supported on this space, and using the exponential mechanism leads to the final output. This subspace creation, discretisation, and exponential mechanism costs the last two terms in Equation (2).

Semi-Agnostic Proper learning. In § 4, we give a proper learner under Gaussian marginals with error at most O(OPT)+αO(\mathrm{OPT})+\alpha. The sample complexity, as described in Table 1, is

n=O~(dα2+dαεDP).(3)n = \widetilde{O}\left(\frac{d}{\alpha^2}+\frac{d}{\alpha\varepsilon_{\mathrm{DP}}}\right). \tag*{(3)}

The learner works by utilizing a privatized semi-agnostic learner from Diakonikolas et al. [17] that provides the error guarantee of O(η)O(\eta), where η≥OPT\eta\geq\mathrm{OPT} is known a priori. However, since we do not know what η\eta is, we search over a small candidate set of η\eta’s by using the said privatized learner, and then pick the best hypothesis using the exponential mechanism on a fresh validation set.

Remark 1. Note that dO(1/α2)⋅1/αc=dO(1/α2)d^{O(1/\alpha^2)}\cdot1/\alpha^c=d^{O(1/\alpha^2)}. We fix pp for both improper and proper agnostic settings, such that it is the smallest p∈Np\in\mathbb{N} guaranteeing the existence of the polynomial bases that accurately approximate halfspaces. In other words, we use the same pp as required by the known non-private counterparts of our algorithms (Diakonikolas et al., [11]; Pesenti et al., [45]). Thus, whatever exponent dd has in the sample complexity of the respective non-private learners, we achieve that, while keeping the additional cost in poly⁡(1/α)\operatorname{poly}(1/\alpha) explicitly outside the exponent of dd.

Remark 2. We additionally note that the added cost in our sample complexity due to DP matches the non-private sample complexity (terms without εDP\varepsilon_{\mathrm{DP}} or δDP\delta_{\mathrm{DP}}) for each of the three Gaussian settings above when εDP=Ω(α)\varepsilon_{\mathrm{DP}}=\Omega(\alpha). In that sense, we get privacy for free. This is commonly observed in DP statistical estimation (see, e.g., [33, 30]), and such sample complexity is often tight for various problems, such as mean and covariance estimation (Kamath et al., [31]).

Notation. We denote the class of halfspaces by C\mathcal{C}. For a classifier h:Rd→{±1}h:\mathbb{R}^d\to\{\pm1\}, its population error is err⁡P(h):=P(X,Y)∼P[h(X)≠Y]\operatorname{err}_{P}(h):=\mathbb{P}_{(X,Y)\sim P}[h(X)\ne Y] and, given a sample SS, its empirical error is err⁡^S(h):=\widehat{\operatorname{err}}_{S}(h):= ∣S∣−1∑(x,y)∈S1{h(x)≠y}|S|^{-1}\sum_{(x,y)\in S}\mathbf{1}\{h(x)\ne y\}. Unless stated otherwise, the input marginal is μ=N(0,Id)\mu=\mathcal{N}(0,I_d); the only exception is our result for log-concave marginals (Theorem D.1). We define OPT:=inf⁡c∈Cerr⁡P(c)\mathrm{OPT}:=\inf_{c\in\mathcal{C}}\operatorname{err}_P(c). For a function g:Rd→Rg:\mathbb{R}^d\to\mathbb{R} and q∈{1,2}q\in\{1,2\}, we write ∥g∥Lq(μ):=(EX∼μ[∣g(X)∣q])1/q\|g\|_{L^q(\mu)}:=\left(\mathbb{E}_{X\sim\mu}[|g(X)|^q]\right)^{1/q}. The formal definition of differential privacy and associated properties are given in Appendix § 8.§ 2.

Private Improper Agnostic Learning

In this section, we give a differentially private algorithm for agnostically learning halfspaces under Gaussian marginals. We build on the polynomial L1L^1 regression algorithm of Kalai et al. [29], which fits a low-degree polynomial to the labels and then thresholds its predictions.

To privatize this approach, we need two additional properties. We first need a bounded domain that contains the coefficients of a good polynomial approximation to every halfspace. Working in the orthonormal Hermite basis, the unit-norm approximation guarantee of Lemma B.10 allows us to restrict the coefficient vector to the Euclidean unit ball. Second, we need uniformly bounded feature norms so that the regression loss is Lipschitz in the coefficient vector. We obtain this by clipping the feature vectors. This increases the population L1L^1 loss by at most the probability of clipping, which we bound in Lemma C.2. These two properties allow us to fit the coefficients using private convex optimisation (Kulkarni et al. [36]). We then repeat the DP optimisation step on independent samples to boost its success probability and use the exponential mechanism (McSherry and Talwar [41]) to privately select among the resulting thresholded classifiers. Our main result is stated as follows.

References

  1. [1]Noga Alon, Roi Livni, Maryanthe Malliaris, and Shay Moran. Private PAC learning implies finite Littlestone dimension. In ACM Symposium on Theory of Computing (STOC), 2019.arxiv.org/abs/1806.00949
  2. [2]Noga Alon, Amos Beimel, Shay Moran, and Uri Stemmer. Closure properties for private classification and online prediction. In Conference on Learning Theory (COLT), 2020.arxiv.org/abs/2003.04509
  3. [3]George E Andrews, Richard Askey, and Ranjan Roy. Special functions. 1999.
  4. [4]Pranjal Awasthi, Maria Florina Balcan, and Philip M Long. The power of localization for efficiently learning linear separators with noise. Journal of the ACM (JACM), 2017.
  5. [5]Raef Bassily, Mehryar Mohri, and Ananda Theertha Suresh. Differentially private learning with margin guarantees. In Advances in Neural Information Processing Systems (NeurIPS), 2022.arxiv.org/abs/2204.10376
  6. [6]Amos Beimel, Shay Moran, Kobbi Nissim, and Uri Stemmer. Private center points and learning of halfspaces. In Conference on Learning Theory (COLT), 2019.arxiv.org/abs/1902.10731
  7. [7]Mark Bun, Kobbi Nissim, Uri Stemmer, and Salil Vadhan. Differentially private release and learning of threshold functions. In IEEE Symposium on Foundations of Computer Science (FOCS), 2015.
  8. [8]Mark Bun, Roi Livni, and Shay Moran. An equivalence between private classification and online prediction. In IEEE Symposium on Foundations of Computer Science (FOCS), 2020.arxiv.org/abs/2003.00563
  9. [9]Amit Daniely. A PTAS for agnostically learning halfspaces. In Conference on Learning Theory (COLT), 2015.arxiv.org/abs/1410.7050
  10. [10]Amit Daniely. Complexity theoretic limitations on learning halfspaces. In ACM Symposium on Theory of Computing (STOC), 2016.arxiv.org/abs/1505.05800
  11. [11]Ilias Diakonikolas, Daniel M Kane, and Jelani Nelson. Bounded independence fools degree-2 threshold functions. In IEEE Symposium on Foundations of Computer Science (FOCS), 2010. URL https://arxiv.org/abs/0911.3389.
  12. [12]Ilias Diakonikolas, Daniel M Kane, and Alistair Stewart. Learning geometric concepts with nasty noise. In ACM Symposium on Theory of Computing (STOC), 2018.arxiv.org/abs/1707.01242
  13. [13]Ilias Diakonikolas, Daniel Kane, and Nikos Zarifis. Near-optimal SQ lower bounds for agnostically learning halfspaces and ReLUs under Gaussian marginals. In Advances in Neural Information Processing Systems (NeurIPS), 2020a.arxiv.org/abs/2006.16200
  14. [14]Ilias Diakonikolas, Vasilis Kontonis, Christos Tzamos, and Nikos Zarifis. Non-convex SGD learns halfspaces with adversarial label noise. In Advances in Neural Information Processing Systems (NeurIPS), 2020b.arxiv.org/abs/2006.06742
  15. [15]Ilias Diakonikolas, Daniel M. Kane, Vasilis Kontonis, Christos Tzamos, and Nikos Zarifis. Agnostic proper learning of halfspaces under Gaussian marginals. In Conference on Learning Theory (COLT), 2021a. URL https://proceedings.mlr.press/v134/diakonikolas21b.html.arxiv.org/abs/2102.05629
  16. [16]Ilias Diakonikolas, Daniel M. Kane, Thanasis Pittas, and Nikos Zarifis. The optimality of polynomial regression for agnostic learning under Gaussian marginals in the SQ model. In Conference on Learning Theory (COLT), 2021b.
  17. [17]Ilias Diakonikolas, Vasilis Kontonis, Christos Tzamos, and Nikos Zarifis. Learning general halfspaces with adversarial label noise via online gradient descent. In International Conference on Machine Learning (ICML), 2022. URL https://proceedings.mlr.press/v162/diakonikolas22b.html.
  18. [18]Ilias Diakonikolas, Daniel Kane, and Lisheng Ren. Near-optimal cryptographic hardness of agnostically learning halfspaces and ReLU regression under Gaussian marginals. In International Conference on Machine Learning (ICML), 2023.arxiv.org/abs/2302.06512
  19. [19]Charles F. Dunkl and Yuan Xu. Orthogonal Polynomials of Several Variables. 2014.
  20. [20]Cynthia Dwork and Aaron Roth. The algorithmic foundations of differential privacy. Foundations and Trends in Theoretical Computer Science, 2014.
  21. [21]Cynthia Dwork, Frank McSherry, Kobbi Nissim, and Adam Smith. Calibrating noise to sensitivity in private data analysis. In Theory of Cryptography Conference (TCC), 2006.
  22. [22]Vitaly Feldman, Parikshit Gopalan, Subhash Khot, and Ashok Kumar Ponnuswami. New results for learning noisy parities and halfspaces. In IEEE Symposium on Foundations of Computer Science (FOCS), 2006.DOI
  23. [23]Spencer Frei, Yuan Cao, and Quanquan Gu. Agnostic learning of halfspaces with gradient descent via soft margins. In International Conference on Machine Learning (ICML), 2021.arxiv.org/abs/2010.00539
  24. [24]G Freud, A Giroux, and QI Rahman. Sur l’approximation polynomiale avec poids exp(−|x|). Canadian Journal of Mathematics, 1978.DOI
  25. [25]Surbhi Goel, Aravind Gollakota, and Adam Klivans. Statistical-query lower bounds via functional gradients. In Advances in Neural Information Processing Systems (NeurIPS), 2020.arxiv.org/abs/2006.15812
  26. [26]Venkatesan Guruswami and Prasad Raghavendra. Hardness of learning halfspaces with noise. SIAM Journal on Computing, 2009.
  27. [27]Wassily Hoeffding. Probability inequalities for sums of bounded random variables. Journal of the American statistical association, 1963.
  28. [28]Ziwei Ji, Kwangjun Ahn, Pranjal Awasthi, Satyen Kale, and Stefani Karp. Agnostic learnability of halfspaces via logistic loss. In International Conference on Machine Learning (ICML), 2022.arxiv.org/abs/2201.13419
  29. [29]Adam Tauman Kalai, Adam R. Klivans, Yishay Mansour, and Rocco A. Servedio. Agnostically learning halfspaces. SIAM Journal on Computing, 2008. URL https://doi.org/10.1137/060649057.
  30. [30]Gautam Kamath, Jerry Li, Vikrant Singhal, and Jonathan Ullman. Privately learning high-dimensional distributions. In Conference on Learning Theory (COLT), 2019.arxiv.org/abs/1805.00216
  31. [31]Gautam Kamath, Argyris Mouzakis, and Vikrant Singhal. New lower bounds for private estimation and a generalized fingerprinting lemma. In Advances in Neural Information Processing Systems (NeurIPS), 2022.arxiv.org/abs/2205.08532
  32. [32]Haim Kaplan, Yishay Mansour, Uri Stemmer, and Eliad Tsfadia. Private learning of halfspaces: Simplifying the construction and reducing the sample complexity. In Advances in Neural Information Processing Systems (NeurIPS), 2020.arxiv.org/abs/2004.07839
  33. [33]Vishesh Karwa and Salil Vadhan. Finite sample differentially private confidence intervals. In Conference on Innovations in Theoretical Computer Science (ITCS), 2018.arxiv.org/abs/1711.03908
  34. [34]Shiva Prasad Kasiviswanathan, Homin K. Lee, Kobbi Nissim, Sofya Raskhodnikova, and Adam Smith. What can we learn privately? In IEEE Symposium on Foundations of Computer Science (FOCS), 2008.
  35. [35]Michael Kearns. Efficient noise-tolerant learning from statistical queries. Journal of the ACM (JACM), 1998.
  36. [36]Janardhan Kulkarni, Yin Tat Lee, and Daogao Liu. Private non-smooth ERM and SCO in sub-quadratic steps. In Advances in Neural Information Processing Systems (NeurIPS), 2021.
  37. [38]Nathan Linial, Yishay Mansour, and Noam Nisan. Constant depth circuits, Fourier transform, and learnability. Journal of the ACM (JACM), 1993.
  38. [39]Nick Littlestone. Learning quickly when irrelevant attributes abound: A new linear-threshold algorithm. Machine learning, 1988.
  39. [40]Doron S Lubinsky. A survey of weighted approximation for exponential weights. arXiv preprint math/0701099, 2007.arxiv.org/abs/math/0701099
  40. [41]Frank McSherry and Kunal Talwar. Mechanism design via differential privacy. In IEEE Symposium on Foundations of Computer Science (FOCS), 2007. URL https://doi.org/10.1109/FOCS.2007.66.
  41. [42]HN Mhaskar and EB Saff. Extremal problems for polynomials with exponential weights. Transactions of the American Mathematical Society, 1984.DOI
  42. [43]Huy Lê Nguyễn, Jonathan Ullman, and Lydia Zakynthinou. Efficient private algorithms for learning large-margin halfspaces. In International Conference on Algorithmic Learning Theory (ALT). PMLR, 2020.arxiv.org/abs/1902.09009
  43. [44]Ryan O’Donnell. Analysis of Boolean Functions. 2014.arxiv.org/abs/2105.10386
  44. [45]Lucas Pesenti, Lucas Slot, and Manuel Wiedmer. Agnostic learning in (almost) optimal time via Gaussian surface area. arXiv preprint arXiv:2603.06027, 2026.arxiv.org/abs/2603.06027
  45. [46]Shai Shalev-Shwartz and Shai Ben-David. Understanding machine learning: From theory to algorithms. 2014.
  46. [47]Shai Shalev-Shwartz, Ohad Shamir, Nathan Srebro, and Karthik Sridharan. Learnability, stability and uniform convergence. The Journal of Machine Learning Research, 2010.DOI
  47. [48]Stefan Tiegel. Hardness of agnostically learning halfspaces from worst-case lattice problems. In Conference on Learning Theory (COLT), 2023. URL https://proceedings.mlr.press/v195/tiegel23a.html.arxiv.org/abs/2207.14030

Paper details

vlnc:W_agafn6u8
v1 · latestHistory (1)

published · Fresh — added to the Hub within the last 30 days

added ·

Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

CC BY 4.0

Original source

  • Computer Science

AI tools · View statement →

Looking for related papers…
Contents