Transcript slides
๐ณ๐ -Testing
With P. Berman and S. Raskhodnikova (STOCโ14+).
Grigory Yaroslavtsev
Warren Center for Network and Data Sciences
http://grigory.us
Property Testing
[Goldreich, Goldwasser, Ron; Rubinfeld, Sudan]
Randomized Algorithm
YES
โ
Property Tester
Accept with
๐
probability โฅ
๐
YES
๐-close
NO
โ
Reject with
๐
probability โฅ
๐
NO
โ
Accept with
๐
probability โฅ
๐
โ Donโt care
โ Reject with
probability โฅ
๐-close : โค ๐ fraction has to be changed to become YES
๐
๐
Which stocks were growing?
Data from http://finance.google.com
Property testing: testing monotonicity?
Data from http://finance.google.com
Tolerant Property Testing
[Parnas, Ron, Rubinfeld]
Tolerant Property Tester
Property Tester
YES
โ
Accept with
๐
probability โฅ
๐
YES
โ
Accept with
๐
probability โฅ
๐
๐-close
NO
โ Donโt care
Reject with
โ
probability โฅ
๐๐ -close
(๐๐ , ๐๐ )-close
๐
๐
NO
โ Donโt care
Reject with
โ probability โฅ ๐
๐
๐-close : โค ๐ fraction has to be changed to become YES
Tolerant monotonicity testing?
Data from http://finance.google.com
Tolerant โ๐ณ๐ Property Testingโ
โข ๐: {1, โฆ , ๐} โ 0,1
โข ๐ท = class of monotone
functions
โข ๐๐๐ ๐ก1 ๐, ๐ท =
min ๐ โ๐ 1
๐โ๐ท
Tolerant โ๐ณ๐ Property Testerโ
YES
๐
๐
โข ๐-close: ๐๐๐ ๐ก1 ๐, ๐ท โค ๐
โข More general: distance
approximation
โข Even more general: isotonic
regression
โ
Accept with
๐
probability โฅ
๐๐ -close
(๐๐ , ๐๐ )-close
NO
โ Donโt care
Reject with
โ probability โฅ ๐
๐
๐ฟ1 -Isotonic Regression
โข Pool Adjacent Violators Algorithm
โข Running time O ๐ log ๐ [Folklore]
โข Available in Matlab/R packages
New ๐ฟ๐ -Testing Model for
Real-Valued Data
โข Generalizes standard Hamming testing
โข For ๐ > 0 still has a probabilistic interpretation:
๐๐ ๐, ๐ = ๐ ๐ โ ๐ ๐ 1/๐
โข Compatible with existing PAC-style learning models that
have ๐ฟ๐ -error (preprocessing for model selection)
โข For Boolean functions, ๐0 ๐, ๐ = ๐๐ ๐, ๐ ๐ .
โข Various distances used widely in distribution testing
Our Contributions
1. Relationships between ๐ฟ๐ -testing models
2. Algorithms
โ ๐ฟ๐ -testers for ๐ โฅ 1
โข monotonicity, Lipschitzness, convexity
โ Tolerant ๐ฟ๐ -tester for ๐ โฅ 1
โข monotonicity in 1D (sublinear algorithm for isotonic regression)
โข monotonicity in 2D
๏ถOur ๐ฟ๐ -testers beat lower bounds for Hamming testers
๏ถSimple algorithms backed up by involved analysis
๏ถUniformly sampled (or easy to sample) data suffices
3. Nearly tight lower bounds in many cases
Implications for Hamming Testing
Some techniques/results carry over to Hamming testing
โ Improvement on Levinโs work investment strategy
โข Connectivity of bounded-degree graphs [Goldreich, Ron โ02]
โข Properties of images [Raskhodnikova โ03]
โข Multiple-input problems [Goldreich โ13]
โ First example of monotonicity testing problem where
adaptivity helps
โ Improvements to Hamming testers for Boolean
functions
Definitions
โข ๐: ๐ท โ 0,1 (D = finite domain/poset)
โข
๐
โข
๐
๐
๐
=(
๐ฅโ ๐ท
๐ ๐ฅ
๐ 1/๐
)
, for ๐ โฅ 1
= Hamming weight (# of non-zero values)
โข Property ๐ท = class of functions (monotone,
convex, Lipschitz, โฆ)
โข ๐๐๐ ๐ก๐ ๐, ๐ท =
min ||๐ โ๐||๐
๐โ๐ท
1 ๐
Relationships: ๐ฟ๐ -Testing
๐๐ (๐ท,๐) = query complexity of ๐ฟ๐ -testing
property ๐ท at distance ๐
โข ๐๐ (๐ท,๐) โค ๐๐ (๐ท,๐)
โข ๐๐ (๐ท,๐) โค ๐๐ (๐ท,๐) (Cauchy-Shwarz)
โข ๐๐ (๐ท,๐) โฅ ๐๐ (๐ท, ๐)
Boolean functions ๐: ๐ท โ 0,1
๐๐ (๐ท,๐) = ๐๐ (๐ท,๐) = ๐๐ (๐ท, ๐)
Relationships: Tolerant ๐ฟ๐ -Testing
๐๐ (๐ท,๐๐ , ๐๐ ) = query complexity of tolerant ๐ฟ๐ -testing
property ๐ท with distance parameters ๐๐ , ๐๐
โข No general relationship between tolerant ๐ฟ๐ -testing
and tolerant Hamming testing
โข ๐ฟ๐ -testing for ๐ > 1 is close in complexity to ๐ฟ๐ -testing
๐
๐
๐๐ (๐ท,๐บ๐ , ๐บ๐ ) โค ๐๐ (๐ท,๐บ๐ , ๐บ๐ ) โค ๐๐ (๐ท,๐บ๐ , ๐บ๐ )
For Boolean functions ๐: ๐ท โ 0,1
๐/๐
๐/๐
๐๐ (๐ท,๐บ๐ , ๐บ๐ ) = ๐๐ (๐ท,๐บ๐ , ๐บ๐ ) = ๐๐ (๐ท,๐๐ , ๐บ๐
)
Testing Monotonicity
โข Line (๐ท = [๐])
Upper
bound
Lower
bound
๐ฟ0
๐ฟ1
๐ (log ๐/๐)
๐(1/๐)
[Ergun, Kannan, Kumar,
Rubinfeld,
Viswanathanโ00]
ฮฉ(log ๐/๐)
[Fischerโ04]
ฮฉ(1/๐)
Monotonicity
๐
โข Domain D=[๐] (vertices of ๐-dim hypercube)
โข A function ๐: ๐ท โ โ is monotone
if increasing a coordinate of ๐ฅ does
not decrease ๐ ๐ฅ .
โข Special case ๐ = 1
(๐, ๐, ๐)
(1,1,1)
๐: [๐] โ โ is monotone โ ๐ 1 , โฆ ๐(๐) is sorted.
One of the most studied properties in property testing [Ergรผn
Kannan Kumar Rubinfeld Viswanathan , Goldreich Goldwasser Lehman Ron, Dodis Goldreich Lehman
Raskhodnikova Ron Samorodnitsky, Batu Rubinfeld White, Fischer Lehman Newman Raskhodnikova
Rubinfeld Samorodnitsky, Fischer, Halevy Kushilevitz, Bhattacharyya Grigorescu Jung Raskhodnikova
Woodruff, ..., Chakrabarty Seshadhri, Blais, Raskhodnikova Yaroslavtsev, Chakrabarty Dixit Jha Seshadhri, โฆ]
Monotonicity: Key Lemma
โข M = class of monotone functions
โข Boolean slicing operator ๐๐ : ๐ท โ {0,1}
๐๐ ๐ฅ = 1, if ๐ ๐ฅ โฅ ๐,
๐๐ ๐ฅ = 0, otherwise.
โข Theorem:
๐๐๐ ๐ก1 ๐, ๐ =
1
โซ0 ๐๐๐ ๐ก0
๐๐ , ๐ ๐๐
Proof sketch: slice and conquer
1) Closest monotone function with minimal ๐ณ๐ -norm is
unique (can be denoted as an operator ๐๐1 ).
2)
๐ โ๐
1
=
1
โซ0
๐๐ โ ๐๐ ๐๐
3) ๐๐1 and ๐๐ commute: ๐๐1
1) ๐ โ ๐๐1
๐๐๐ ๐ก1 ๐, ๐ =
|๐ท|
1
โซ0
=
1
๐๐ โ๐(๐
๐)
๐ท
๐๐
1
=
๐
= ๐1 (๐
๐)
2) โซ1 ๐๐ โ (๐๐1 )๐
0
1
=
๐ท
1
โซ0 ๐๐๐ ๐ก0
๐๐ , ๐ ๐๐
๐๐ 3)
1
=
๐ฟ1 -Testers from Boolean Testers
Thm: A nonadaptive, 1-sided error ๐ฟ0 -test for monotonicity of
๐: ๐ท โ {0,1} is also an ๐ฟ1 -test for monotonicity of ๐: ๐ท โ [0,1].
Proof:
>
๐(๐)
๐(๐)
โข A violation (๐ฅ, ๐ฆ):
โข A nonadaptive, 1-sided error test queries a random set ๐ โ ๐ท
and rejects iff ๐ contains a violation.
โข If ๐: ๐ท โ [0,1] is monotone, ๐ will not contain a violation.
โข If ๐1 ๐, ๐ โฅ ๐ then โ๐โ : ๐0 ๐(๐โ ) , ๐ โฅ ๐บ
โข W.p. โฅ 2/3, set ๐ contains a violation (๐ฅ, ๐ฆ) for ๐(๐โ )
๐(๐โ) ๐ฅ = 1, ๐(๐โ) ๐ฆ = 0
โ
๐ ๐ฅ >๐ ๐ฆ
โข For Boolean functions ๐(1/๐) sample is enough
Our Results: Testing Monotonicity
โข Hypergrid (๐ท = ๐ ๐
)
๐ฟ0
Upper
bound
Lower
bound
โข 2๐
๐
๐ log ๐
๐
๐
๐ฟ1
๐
๐
๐
log
๐
๐
[Dodis et al. โ99,โฆ,
Chakrabarti, Seshadhri โ13]
๐ log ๐
ฮฉ
๐
[Dodis et al.โ99โฆ,
Chakrabarti, Seshadhri โ13]
1
1
ฮฉ log
๐
๐
Non-adaptive 1-sided error
/๐ adaptive tester for Boolean functions
Testing Monotonicity of ๐
๐
โ {0,1}
โข ๐ ๐ = (0 โฆ 1 โฆ 0) = ๐-th unit vector.
โข For ๐ โ ๐
, ๐ผ โ ๐ ๐
where ๐ผ๐ = 0 an axis-parallel line
along dimension ๐ : ๐ผ + ๐ฅ๐ ๐ ๐ ๐ฅ๐ โ [๐]}
โข ๐ฟ๐,๐
= set of all ๐
๐๐
โ1 axis-parallel lines
โข Dimension reduction for ๐: ๐
๐ธโโผ๐ฟ๐,๐
๐๐๐ ๐ก ๐
โข If ๐๐๐ ๐ก ๐|โ , ๐ โฅ ๐น => ๐
,๐
โ
1
๐น
๐
โ 0,1 [Dodis et al.โ99]:
๐๐๐ ๐ก ๐, ๐
โฅ
2๐
-sample detects a violation
Testing Monotonicity on ๐
โข Dimension reduction for ๐: ๐
๐ธโโผ๐ฟ๐,๐
๐
๐
โ {0,1}[Dodis et al.โ99]:
๐๐๐ ๐ก ๐, ๐
๐๐๐ ๐ก ๐ , ๐ โฅ
2๐
โ
โข If ๐๐๐ ๐ก ๐|โ , ๐ โฅ ๐น => ๐
1
๐น
-sample can detect a violation
โข โInverse Markovโ: For r. v. ๐ฟ โ 0,1 with E ๐ = ๐ and ๐ < 1
1 โ ๐
๐
๐
๐
Pr ๐ฟ โค ๐๐ โค
โ Pr ๐ฟ โค
โค1 โ
โค1 โ
1 โ๐๐
2
2 โ๐
2
โข Pr ๐๐๐ ๐ก ๐|โ , ๐
๐๐๐ ๐ก ๐,๐
๐๐๐ ๐ก ๐,๐
๐
๐
โฅ
โฅ
โ๐ ๐
๐๐
๐๐
๐
๐
๐
2
log
via โLevinโs economical
๐
๐
-test
โข [Dodis et al.] ๐
work
investment strategyโ (used in other papers for testing
connectedness of a graph, properties of images, etc.)
Testing Monotonicity on ๐
๐
โข โDiscretized Inverse Markovโ
1
2
For r. v. ๐ฟ โ 0,1 with E ๐ = ๐ โค and ๐ = 3 log 1/๐
โ ๐ โ ๐ : Pr ๐ฟ โฅ 2โ๐
โข For each ๐ โ [๐] pick ๐
๐
1
๐ 2๐
2๐ ๐
โฅ
4
samples of size ๐(2๐ ) => complexity
1
1
log
๐
๐
โข For the right value j the test rejects with constant probability
โข ๐ = ๐ธโโผ๐ฟ๐,๐
๐๐๐ ๐ก ๐|โ , ๐
โฅ
๐๐๐ ๐ก ๐,๐
2๐
=> ๐
๐
๐
log
๐
๐
-test
Distance Approximation and Tolerant Testing
Approximating ๐ณ๐ -distance to monotonicity ยฑ๐น ๐. ๐. โฅ ๐/๐
๐
๐ โ [0,1]
๐ฟ0
๐
polylog ๐ โ
๐น
๐ฟ1
๐ถ ๐/๐น
๐
ฮ ๐
๐น
[Saks Seshadhri 10]
โข Sublinear algorithm for isotonic regression
๐
โข Improves ๐ ๐ adaptive distance approximation of [Fattal,Ronโ10] for
๐น
Boolean functions
โข Time complexity of tolerant ๐ฟ1 -testing for monotonicity is
๐บ๐
O
(๐บ๐ โ ๐บ๐ )๐
โ Better dependence than what follows from distance appoximation for
๐๐ โช 1
Distance Approximation ๐: ๐ โ 0,1
Theorem: with constant probability over the choice of
1
a random sample S of size O 2 :
๐ฟ
๐๐๐ ๐ก1 ๐|๐บ , ๐ โ ๐๐๐ ๐ก1 ๐, ๐
โข Implies an O
๐2 โ๐1
3
โข ๐๐๐ ๐ก1 ๐, ๐ =
<๐ฟ
1
๐2 โ๐1 2
tolerant tester by setting ๐ฟ =
1
โซ0 ๐๐๐ ๐ก0
๐๐ , ๐ ๐๐
โข Suffices: โ๐: ๐๐๐ ๐ก0 ๐๐ |๐บ , ๐ โ ๐๐๐ ๐ก0 ๐๐ , ๐
<๐ฟ
โข Improves previous ๐(1/๐ฟ 2 ) algorithm [Fattal, Ronโ10]
Distance Approximation
For ๐: [๐] โ 0,1 violation graph ๐ฎ๐ ๐ , ๐ธ :
edge (๐ฅ1 , ๐ฅ2 ) if ๐ฅ1 โค ๐ฅ2 , ๐ ๐ฅ1 = 1, ๐ ๐ฅ2 = 0
MM(G) = maximum matching
VC(G) = minimum vertex cover
โข ๐๐๐ ๐ก0 ๐, ๐ =
๐ด๐ด ๐บ๐
โข ๐๐๐ ๐ก0 ๐|๐ , ๐ =
|๐ท|
=
๐ด๐ด ๐บ๐|๐
๐
๐ฝ๐ช ๐บ๐
|๐ท|
=
[Fischer et al.โ02]
๐ฝ๐ช ๐บ๐|๐
|๐|
๐๐๐ ๐ก0 ๐|๐บ , ๐ โ ๐๐๐ ๐ก0 ๐, ๐ < O
๐ฝ๐ช๐ โฉ๐บ
Define: ๐ ๐บ =
๐บ
โข ๐๐๐ ๐ก0 ๐|๐บ , ๐ =
๐ฝ๐ช๐|๐บ
|๐บ|
โค
๐ฝ๐ช๐ โฉ๐บ
๐บ
= ๐(๐บ)
๐(๐บ) has hypergeometric distribution:
โข ๐ธ๐ ๐บ
โข ๐๐๐ ๐ ๐บ
=
๐ฝ๐ช๐
๐ท
โค
= ๐๐๐ ๐ก0 ๐, ๐
๐บ ๐๐ถ๐
๐ท ๐บ2
=
๐๐๐ ๐ก0 ๐,๐
๐บ
โค
1
|๐บ|
1
๐บ
Experiments
โข Data: Apple stock price data (2005-2015) from Google Finance
โข Left: ๐ฟ1 -isotonic regression
โข Right: multiplicative error vs. sample size
๐ฟ1 -Testers for Other Properties
Via combinatorial characterization of ๐ฟ1 -distance to the property
โข Lipschitz property ๐: ๐ ๐
โ [0,1]:
๐
ฮ
๐
Via (implicit) proper learning: approximate in ๐ฟ1 up to error ๐,
test approximation on a random ๐(1/๐)-sample
โข Convexity ๐: ๐
๐
โ [0,1]:
๐
โ2
O ๐
โข Submodularity ๐: 0,1
1
๐
2 ๐
+ ๐๐๐๐ฆ
1
๐
+
1
๐
๐
โ 0,1
(tight for ๐
โค 2)
log ๐
[Feldman, Vondrak 13, โฆ]
๐ฟ๐ -Testing for Convex Optimization
โข Theory: Convergence rates of gradient
descent methods depends on:
โ Convexity / strong convexity constant
โ Lipschitz constant of the derivative
โข Practice:
โ Q: How to pick learning rate in ML
packages?
โ A: Set 0.01 and hope it converges fast
โข Even non-tolerant ๐ฟ๐ -testers can be used to
sanity check convexity/Lipschitzness
A lot of open problems!
โข ๐ฟ๐ -Testing Fourier sparsity [Backurs, Blais,
Kapralov, Onak, Y.]
โข Eric Price: Hey, I can do this better!
Open Problems
โข Our complexity for ๐ฟ๐ -testing convexity grows
exponentially with d
Is there an ๐ฟ๐ -testing algorithm for convexity with
subexponential dependence on the dimension?
โข Only have tolerant monotonicity for ๐ = 1,2.
Tolerant testers for higher dimensions?