Efficient TaskSpecific Data Valuation for Nearest Neighbor Algorithms Given a data set mathcalD containing millions of data points and a data consumer who is willing to pay for X to train a machine learning (ML) model over mathcalD, how should we distribute this X to each data point to reflect its value? In this paper, we define the relative value of data via the Shapley value, as it uniquely possesses properties with appealing realworld interpretations, such as fairness, rationality and decentralizability. For general, bounded utility functions, the Shapley value is known to be challenging to compute: to get Shapley values for all N data points, it requires O(2N) model evaluations for exact computation and O(Nlog N) for (epsilon, delta)approximation. In this paper, we focus on one popular family of ML models relying on Knearest neighbors (KNN). The most surprising result is that for unweighted KNN classifiers and regressors, the Shapley value of all N data points can be computed, exactly, in O(Nlog N) time  an exponential improvement on computational complexity! Moreover, for (epsilon, delta)approximation, we are able to develop an algorithm based on Locality Sensitive Hashing (LSH) with only sublinear complexity O(Nh(epsilon,K)log N) when epsilon is not too small and K is not too large. We empirically evaluate our algorithms on up to 10 million data points and even our exact algorithm is up to three orders of magnitude faster than the baseline approximation algorithm. The LSHbased approximation algorithm can accelerate the value calculation process even further. We then extend our algorithms to other scenarios such as (1) weighed KNN classifiers, (2) different data points are clustered by different data curators, and (3) there are data analysts providing computation who also requires proper valuation.

Approximating the Distance to Monotonicity of Boolean Functions We design a nonadaptive algorithm that, given a Boolean function fcolon 0,1n to 0,1 which is alphafar from monotone, makes poly(n, 1alpha) queries and returns an estimate that, with high probability, is an widetildeO(sqrtn)approximation to the distance of f to monotonicity. Furthermore, we show that for any constant kappa u003e 0, approximating the distance to monotonicity up to n12  kappafactor requires 2nkappa nonadaptive queries, thereby ruling out a poly(n, 1alpha)query nonadaptive algorithm for such approximations. This answers a question of Seshadhri (Property Testing Review, 2014) for the case of nonadaptive algorithms. Approximating the distance to a property is closely related to tolerantly testing that property. Our lower bound stands in contrast to standard (nontolerant) testing of monotonicity that can be done nonadaptively with widetildeO(sqrtn  varepsilon2) queries.  :128,obtain our lower bound by proving an analogous bound for erasureresilient testers. An alphaerasureresilient tester for a desired property gets oracle access to a function that has at most an alpha fraction of values erased. The tester has to accept (with probability at least 23) if the erasures can be filled in to ensure that the resulting function has the property and to reject (with probability at least 23) if every completion of erasures results in a function that is varepsilonfar from having the property. Our method yields the same lower bounds for unateness and being a kjunta. These lower bounds improve exponentially on the existing lower bounds for these properties.