160

Approximate Maximum Halfspace Discrepancy

International Symposium on Algorithms and Computation (ISAAC), 2021
Abstract

Consider the geometric range space (X,Hd)(X, \mathcal{H}_d) where XRdX \subset \mathbb{R}^d and Hd\mathcal{H}_d is the set of ranges defined by dd-dimensional halfspaces. In this setting we consider that XX is the disjoint union of a red and blue set. For each halfspace hHdh \in \mathcal{H}_d define a function Φ(h)\Phi(h) that measures the "difference" between the fraction of red and fraction of blue points which fall in the range hh. In this context the maximum discrepancy problem is to find the h=argmaxh(X,Hd)Φ(h)h^* = \arg \max_{h \in (X, \mathcal{H}_d)} \Phi(h). We aim to instead find an h^\hat{h} such that Φ(h)Φ(h^)ε\Phi(h^*) - \Phi(\hat{h}) \le \varepsilon. This is the central problem in linear classification for machine learning, in spatial scan statistics for spatial anomaly detection, and shows up in many other areas. We provide a solution for this problem in O(X+(1/εd)log4(1/ε))O(|X| + (1/\varepsilon^d) \log^4 (1/\varepsilon)) time, which improves polynomially over the previous best solutions. For d=2d=2 we show that this is nearly tight through conditional lower bounds. For different classes of Φ\Phi we can either provide a Ω(X3/2o(1))\Omega(|X|^{3/2 - o(1)}) time lower bound for the exact solution with a reduction to APSP, or an Ω(X+1/ε2o(1))\Omega(|X| + 1/\varepsilon^{2-o(1)}) lower bound for the approximate solution with a reduction to 3SUM. A key technical result is a ε\varepsilon-approximate halfspace range counting data structure of size O(1/εd)O(1/\varepsilon^d) with O(log(1/ε))O(\log (1/\varepsilon)) query time, which we can build in O(X+(1/εd)log4(1/ε))O(|X| + (1/\varepsilon^d) \log^4 (1/\varepsilon)) time.

View on arXiv
Comments on this paper