Testing convexity of functions over finite domains
Aleksandrs Belovs, Eric Blais, and Abhinav Bommireddi

TL;DR
This paper establishes tight bounds and new algorithms for testing convexity of functions over finite discrete domains, revealing the power of adaptivity and providing bounds for various dimensions and domain structures.
Contribution
It introduces simplified convexity testers, proves tight bounds on query complexity, and demonstrates the exponential advantage of adaptive testing in higher dimensions.
Findings
Tight upper and lower bounds for convexity testing on the line.
Adaptive tester for 3-by-n domains with logarithmic squared complexity.
Non-adaptive lower bounds for higher-dimensional domains.
Abstract
We establish new upper and lower bounds on the number of queries required to test convexity of functions over various discrete domains. 1. We provide a simplified version of the non-adaptive convexity tester on the line. We re-prove the upper bound in the usual uniform model, and prove an upper bound in the distribution-free setting. 2. We show a tight lower bound of queries for testing convexity of functions on the line. This lower bound applies to both adaptive and non-adaptive algorithms, and matches the upper bound from item 1, showing that adaptivity does not help in this setting. 3. Moving to higher dimensions, we consider the case of a stripe . We construct an \emph{adaptive} tester for convexity of functions…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Testing convexity of functions over finite domains
Aleksandrs Belovs
Faculty of Computing
University of Latvia
Riga, Latvia
Eric Blais
Cheriton School of Computer Science
University of Waterloo
Waterloo, Canada
eblais,[email protected]
Abhinav Bommireddi
Cheriton School of Computer Science
University of Waterloo
Waterloo, Canada
eblais,[email protected]
Abstract
We establish new upper and lower bounds on the number of queries required to test convexity of functions over various discrete domains.
We provide a simplified version of the non-adaptive convexity tester on the line. We re-prove the upper bound O\bigl{(}\frac{\log(\varepsilon n)}{\epsilon}\bigr{)} in the usual uniform model, and prove an O\bigl{(}\frac{\log n}{\varepsilon}\bigr{)} upper bound in the distribution-free setting. 2. 2.
We show a tight lower bound of \Omega\bigl{(}\frac{\log(\varepsilon n)}{\epsilon}\bigr{)} queries for testing convexity of functions on the line. This lower bound applies to both adaptive and non-adaptive algorithms, and matches the upper bound from item 1, showing that adaptivity does not help in this setting. 3. 3.
Moving to higher dimensions, we consider the case of a stripe . We construct an adaptive tester for convexity of functions with query complexity . We also show that any non-adaptive tester must use queries in this setting. Thus, adaptivity yields an exponential improvement for this problem. 4. 4.
For functions over domains of dimension , we show a non-adaptive query lower bound \Omega\mathopen{}\mathclose{{}\left((\frac{n}{d})^{\frac{d}{2}}}\right).
1 Introduction
Let be a subset of . A function is called convex if for every finite collection of points and non-negative reals satisfying and , we have
[TABLE]
Convex functions are typically considered on convex domains, but for property testing questions, we will be mostly interested in the case when is a finite (hence, discrete) subset of . In this case, one can show that is convex on if and only if it can be extended to a convex function on the entire linear space .111I.e., is convex on if and only if there exists a function that is convex on and satisfies for every . See Section 2 for details.
For a finite set , we say that a function is -far from convex with respect to some proximity parameter if for every convex function , we have \bigl{\lvert}\{x\in X:h(x)\neq g(x)]\}\bigr{\rvert}\geq\epsilon|X|.
In this work, we consider the problem of distinguishing convex functions from those that are far from convex in the property testing framework [11, 19]. Formally, an -convexity tester is a bounded-error randomized algorithm that queries the values of an unknown function on a set of inputs from and distinguishes the case where is convex from the one where is -far from convex. A tester is non-adaptive if it selects all the inputs to query before observing the value of on any of those inputs; otherwise the tester is adaptive.
Our goal is to determine the minimum query complexity of -convexity testers for various discrete sets , and to determine whether the query complexity of adaptive and non-adaptive -convexity testers differs for any set . While there has been work studying the problem of testing convexity of functions in various settings [17, 2, 16, 3, 4], large gaps remain between the best upper and lower bounds. We give new bounds on the number of queries required to test convexity of functions on the line, over a stripe, and over higher-dimensional domains.
1.1 Testing convexity on the line
The problem of testing convexity of functions on the line was first considered by Parnas, Ron, and Rubinfeld [17]. They showed that queries suffice to -test convexity in this setting. A slightly better upper bound of was shown by Ben-Eliezer [2]. This follows from his more general algorithm for testing local properties of arrays. We give a more direct algorithm.
Theorem 1.1**.**
There exists an -tester for convexity of functions over the line with complexity . The tester is non-adaptive and has 1-sided error.
We also consider the problem of testing convexity of functions on the line in the distribution-free model of Halevy and Kushilevitz [12]. In this model, the distance of a function to convexity is measured with respect to some unknown distribution over the domain . The algorithm can query the target function as usual, and it can also sample from . The tester must distinguish the case where is convex and the case where is -far from a convex function with respect to , in that for every convex function . The tester must work for any distribution , and the complexity measure is the worst-case sum of the number of queries to and samples from . Thus, distribution-free property testing is at least as hard as usual property testing, and for some problems the query complexity is much larger in the distribution-free setting [12].
We show that our algorithm for testing convexity of functions can be made distribution-free with only a slight loss in the dependence of .
Theorem 1.2**.**
There exists a non-adaptive 1-sided algorithm that -tests a function for convexity with respect to an unknown distribution using O\bigl{(}\frac{\log n}{\varepsilon}\bigr{)} queries to and O\bigl{(}\frac{1}{\varepsilon}\bigr{)} samples from .
The algorithms that establish Theorems 1.1 and 1.2 are both triple testers: they repeatedly draw triples of points from a natural probability distribution over and test that the function is convex on those three points.222This is similar to the situation for the well-known pair testers for monotonicity [8] that sample pairs of points from a natural distribution and test them for monotonicity. Note also that while it is not presented as such, the convexity tester of Parnas, Ron, and Rubinfeld [17] can also be reformulated as a triple tester. This has a number of consequences. First, both our algorithm admit time-efficient implementation. Second consequence is for quantum testers (see [14] for introduction to quantum property testing). Using quantum amplitude amplification [5], we can achieve quadratic improvement. Thus, in the standard property testing model, the quantum query complexity for -testing convexity is O\mathopen{}\mathclose{{}\left(\sqrt{\epsilon^{-1}\log(\epsilon n)}}\right), and in the distribution-free setting the quantum query complexity of the problem is O\mathopen{}\mathclose{{}\left(\sqrt{\epsilon^{-1}\log n}}\right). Again, both of the algorithms can be implemented time-efficiently.
Blais, Raskhodnikova, and Yaroslavtsev [4] showed that the bound in Theorem 1.1 on the query complexity of non-adaptive convexity testers is optimal when is a constant. For adaptive algorithms, this only gives a lower bound of by the standard conversion between adaptive and non-adaptive algorithms. We close this gap and show that the bound in Theorem 1.1 is optimal for all values of , even when the testers are allowed to be adaptive.
Theorem 1.3**.**
For every , any -tester for convexity of functions has query complexity \Omega\bigl{(}\frac{\log(\varepsilon n)}{\epsilon}\bigr{)}.
In particular, the lower bound in Theorem 1.3 implies that adaptivity does not help to reduce query complexity when testing convexity of functions over the line. This is analogous to the situation for testing monotonicity of functions over the line [10]. This result, combined with the distance approximation algorithm of Fattal and Ron [9], also shows that approximating the distance to convexity is essentially no harder than testing convexity.
1.2 Testing convexity over 2-dimensional domains
Parnas, Ron, and Rubinfeld [17] asked whether convexity can be tested efficiently for functions over 2-dimensional domain. The first non-trivial upper bound on the query complexity for testing the convexity of functions mapping to was obtained by Ben-Eliezer [2], who showed that queries suffice for non-adaptive testing of convexity—a number of queries that is sublinear (in fact, quadratically smaller) than the size of the domain.
The only previous lower bound for non-adaptive testing of convexity of functions was again [4], so it remained open whether it is possible to test convexity non-adaptively using a number of queries that is exponentially smaller than the size of the domain. We show that it is not, and that the Ben-Eliezer bound is optimal for all non-adaptive algorithms when is a constant.
Theorem 1.4** (Special case of Theorem 1.6 below).**
Any non-adaptive -tester for convexity of has query complexity .
Note that Theorem 1.4 does not eliminate the possibility that convexity of functions on can be tested with queries by adaptive algorithms. Based on the results for testing convexity in 1D, one may be tempted to guess that adaptivity does not help in this setting either and that the bound in the theorem could be strengthened to apply to adaptive algorithms as well. To test this intuition, we consider an intermediate domain between 1-dimensional and full 2-dimensional case: the stripe . The same intuition from the 1-dimensional case would suggest that adaptivity does not help in testing convexity of functions over the stripe. We show, however, that here adaptivity can be used to obtain an exponential improvement on the query complexity of convexity testers.
Theorem 1.5**.**
There exists a 1-sided-error algorithm that -tests a function for convexity in the distribution-free testing model using O\bigl{(}\frac{\log^{2}n}{\varepsilon}\bigr{)} queries to and O\bigl{(}\frac{1}{\varepsilon}\bigr{)} samples from . By contrast, any non-adaptive -tester for convexity of (in the standard testing model) has query complexity .
The exponential gap between the adaptive and non-adaptive query complexity of convexity testing in Theorem 1.5 stands in stark contrast to the situation for the related problem of testing monotonicity: there it is known that adaptivity does not yield any reduction in query complexity, as there is a non-adaptive monotonicity tester for functions with query complexity [6] and every monotonicity tester (adaptive or not) has query complexity [7].
1.3 Testing convexity over high-dimensional domains
Ben-Eliezer’s upper bound for testing convexity [2] also carries over to high-dimensional settings. When the dimension is large, however, the bound is quite weak: it shows that queries suffice to test convexity non-adaptively. This is (barely) sublinear in the domain size when .
Blais, Raskhodnikova, and Yaroslavtsev [4] previously showed that non-adaptive algorithms that test linear convexity of functions over the hypergrid have query complexity . (Linear convexity is a slightly different notion of convexity than the one studied here; see Appendix A for details.) We show that a much stronger lower bound holds for the problem of testing convexity: any non-adaptive algorithm for testing convexity of functions over has query complexity that is linear in and exponential in .
Theorem 1.6**.**
For every and any , any bounded-error non-adaptive -tester for convexity has query complexity \Omega\mathopen{}\mathclose{{}\left((\frac{n}{d})^{\frac{d}{2}}}\right).
Note that the trivial upper bound for testing convexity (or any other property) of functions over is , so Theorem 1.6 shows that non-adaptive convexity testers cannot do significantly better (qualitatively) than the naïve brute-force testing algorithm.
This result also implies a general lower bound of queries for adaptive convexity testers of convexity for functions over the hypergrid . This is the first general lower bound for convexity testing which shows that the query complexity must scale as the product of the dimension and the logarithm of the length of hypergrids.
1.4 Discussion and open problems
Our results suggest two main open problems.
Open Problem 1**.**
Is it possible to -test convexity of functions with queries?
Parnas, Ron, and Rubinfeld [17] also raised the problem of determining the query complexity for testing convexity in , and the upper bound in Theorem 1.5 provides the first suggestion that the query complexity of the problem might be exponentially smaller than—and not just sublinear in—the domain size. As the lower bound in the same theorem shows, however, any algorithm that would provide a positive answer to this question would have to be adaptive.
We can also generalize Open Problem 1 to ask whether convexity testing of can be done with query complexity for every constant value of . For high-dimensional settings, it is also natural to ask about the dependence on .
Open Problem 2**.**
Must every -tester for convexity of functions have query complexity ?
Theorem 1.6 gives a positive answer to this question for non-adaptive algorithms, but it still allows for the possibility that there is a convexity tester with query complexity that is polynomial in . It is also possible that the best query complexity of convexity testers is subexponential in , even if it is not polynomial in . (C.f., for instance, the submodularity testing problem, where it is known that queries suffice to test submodularity of functions [20]. It is possible that a similar bound holds for testing convexity as well.)
1.5 Organization
We introduce some basic facts about convexity in Section 2, estalish our algorithmic results in Sections 3 and 4, and give the proofs for our hardness results in Sections 5 and 6.
Specifically, the proofs of Theorems 1.1 and 1.2 for testing convexity over one-dimensional domains are presented Section 3. The upper bound in Theorem 1.5 for testing convexity of functions on the stripe is established in Section 4.
The lower bound in Theorem 1.6 for testing convexity over high-dimensional domains is presented in Section 5; the lower bound for the stripe in Theorem 1.5 is found in Section 5.6; and the optimal lower bound for testing convexity on the line in Theorem 1.3 is presented in Section 6.
2 Basic facts about convexity
In this section, we establish some basic facts about convex functions over finite subsets of . We use the notation and . All the results in this section are standard; we provide the missing proofs in Appendix B for completeness.
The restriction of a function to a domain is the function defined by for each . Our first basic observation is that restriction preserves convexity.
Lemma 2.1**.**
Let be a convex function and . Then the function restricted to is also convex.
To define the extension of convex functions, we first need the notion of a centred simplex.
Definition 2.1**.**
A simplex in is a set of affinely independent points. A centred simplex in is a collection of points such that form a simplex, and can be (uniquely) expressed as
[TABLE]
where all and . The point is called the centre of the simplex, and we say that the simplex is centred at when this condition is satisfied.
In other words, is a centred simplex if is inside the convex hull of and no can be removed from the simplex without breaking this property. When is a finite subset of and , we say that the centred simplex is of .
Definition 2.2**.**
The centred simplex of is minimal iff is the only point of inside the convex hull of the simplex except for its vertices.
Lemma 2.2**.**
Let be a convex functions with a finite subset of . Then the function can be extended to a convex function on the whole space . That is, there exists a convex function such that for all . Moreover, for a point in the convex hull of the function can be defined as
[TABLE]
where range over all simplices of centred at , and are as in Equation (1).
Combining the above two lemmata, we see that if is a convex function with finite, and , then the function can be extended to a convex function on . This is how we will usually use the above lemma.
We say that a function is convex on a centred simplex if its restriction to this set of points is convex. This is equivalent to
[TABLE]
where are as in Equation (1). This notion provides a characterization of convexity that we will use to test convex functions.
Theorem 2.3**.**
A function is convex if and only if it is convex on every minimal centred simplex of .
Let us apply the general Theorem 2.3 to the setting where is a function over the line. For the rest of this section, let where . A centred simplex in this case is a triple and is the centre of the triple. A function is convex on the triple if and only if
[TABLE]
A minimal centred simplex is a minimal triple of the form . Thus, we get the following corollary.
Corollary 2.4**.**
The function is convex if and only if it is convex on every triple of consecutive points.
A nice feature of convex functions on the line is that we can efficiently find their minimum.
Theorem 2.5**.**
Assume is a convex function. It is possible to find the minimum of on in time .
Proof.
Use bisection. Let . If , query all the values of and find the minimum. Otherwise, let a=\mathopen{}\mathclose{{}\left\lfloor n/2}\right\rfloor and . Query and . If , execute the minimum search on the set . Otherwise, execute the minimum search on the set . By each execution, the size of the set decreases roughly by a factor of 2, hence iterations suffice. ∎
3 Algorithms for testing convexity over the line
In this section, we prove Theorem 1.1 and Theorem 1.2. Both theorems are established using similar ideas, by constructing explicit convexity testing algorithms that are inspired by the monotonicity tester on the line [1].
Definition 3.1**.**
Let . A triple test rooted at is a (non-necessarily sorted) triple such that
- •
b\in\mathopen{}\mathclose{{}\left\{2^{k}\mathopen{}\mathclose{{}\left\lfloor\frac{a-1}{2^{k}}}\right\rfloor,2^{k}\mathopen{}\mathclose{{}\left\lceil\frac{a+1}{2^{k}}}\right\rceil}\right\} for some integer satisfying , and
- •
is either or .
The element is called the root, and is called a hub of . The integer is called the height of the triple. We say that passes the triple test if the function is convex on . We say that passes all its triple tests if it passes all the triple tests rooted at it.
Claim 3.1**.**
If , then and have a common hub with height not exceeding .
Proof.
Let be such that . There can be either one or two multiples of between and . If there is just one then we are done and that is the common hub. If there are two then there will be exactly one multiple of between and and that is their common hub. ∎
Lemma 3.2**.**
Assume is a non-convex triple. Then at least one of , or fails some of its triple tests with height not exceeding .
Proof.
Assume for now that and . Let be the common hub between with height not exceeding and be the common hub between with height not exceeding . Consider the function restricted to the domain . By Lemma 2.1, we know the function is not convex, hence, by Corollary 2.4, it is non-convex on at least one of the triples , , or . Let us consider the three cases separately:
- •
is non-convex on the triple . Consider the function on the domain . Using Corollary 2.4 if needed, we get that the function is non-convex on one of the triples or . Each of them constitutes a triple test: , , , or , , , respectively.
- •
is non-convex on the triple . Consider the function on the domain . The function is non-convex on one of the triples or . Again, each of them constitutes a triple test: , , , or , , , respectively.
- •
is non-convex on the triple . This case is analogous to the first one.
If , then the above analysis works with (the first case never holds, and is a hub of ). If , the above analysis works with (the third case never holds, and is a hub of ). Finally, if both and , we can use the triple test with , , and . ∎
A simple consequence of this lemma is that the function is convex on the set of points passing all their triple tests. This allows us to formulate the following notion.
Definition 3.2**.**
A convex replacement of a function is a convex function such that for all that pass all their triple tests.
The proof of Theorem 1.2 now follows easily.
Proof of Theorem 1.2.
The algorithm is simple: sample from and run all the triple tests rooted at . It takes sample and queries. The probability that this test fails is at least the distance (with respect to ) to the convex replacement to . Repeat the above test times to increase the success probability to . ∎
We are now also ready to complete the proof of Theorem 1.1.
Proof of Theorem 1.1.
The algorithm is a triple tester. It selects a root of the triple uniformly at random from , select a triple rooted at with height at most uniformly at random, and tests it for convexity. For completeness, let us restate the algorithm:
We claim that if the function is -far from convex, then this test fails with probability . Thus, this test has to be repeated times.
We will construct a subset of size such that every fails one of its triple tests with height at most . Start with . We treat as a sorted list. While , the function is non-convex. Choose three neighbouring elements in that violate convexity. Let be the non-convex triple constructed in Lemma 3.2. The height of this triple is at most . Remove from . When , let . ∎
4 Algorithm for testing convexity on the stripe
In this section, we prove the upper bound in Theorem 1.5.
4.1 High-level description
Our approach to testing convexity on the stripe is as follows. This set is very close to the 1-dimensional line, so we can draw a lot from the tester of Section 3. In this vein, for , let be the restrictions of to the column . We will construct a convex replacement of so that every point where and disagree fails some test. Sampling from and executing the test on will give us a distribution-free tester of convexity.
Any simplex centred at a point in the line or is completely contained inside this line. Hence, for and we can simply take convex replacements and from Definition 3.2, and assume that restricted to or is or , respectively.
Let us define a function as
[TABLE]
Note that where is the convex extension, as in Equation (2), of the function restricted to . (We have not defined on the line yet.) By Lemma 2.2 and Lemma 2.1, the function is convex. Its value can be computed by minimising the convex function \delta\mapsto\bigl{(}\tilde{f}_{0}(x-\delta)+\tilde{f}_{2}(x+\delta)\bigr{)}/2. This is exactly the place where our tester uses adaptivity.
The main part of our algorithm deals with interplay between the functions and . Let us give some relations between and for the case when is convex. First, the function is convex on any simplex of the form centred at , which implies that for every . Next, for every , let be the affine function agreeing with at and . We have that the function is convex on any simplex of the form centred at , which implies that for all .333Note that this observation does not immediately follow from the first observation and convexity of , because it also incorporates half-integer values of , where is not defined. Similarly, considering simplices centred at , we get that for all . Our tester will check these conditions.
4.2 Subroutines
We are now ready to describe the subroutines used by our tester. The first subroutine is the convexity test for the line from Section 3.
The complexity of this subroutine is . The following claim is a direct consequence of Definition 3.2.
Claim 4.1**.**
If 1DTest does not fail for or , then .
The next subroutine evaluates the function .
Claim 4.2**.**
The subroutine either finds a violation of convexity or returns . The complexity of the subroutine is .
Proof.
Define so that . Steps 2 and 3 of the subroutine ensure that and agree on and . If Step 4 fails, we get that , meaning that the function is not convex. Otherwise, we get that and . As is convex, this implies that the minimum of is attained at . The complexity estimate is obvious. ∎
4.3 The algorithm
Now let us state the test for convexity over the stripe.
The tester uses one sample from and queries to , since steps 7 and 9 each require calls to the Evaluate subroutine, which in turn makes queries to .
By the discussion at the beginning of the section, any convex function passes the test with probability 1. Let be any function that is -far from convex with respect to . Let be the set of points that pass the test. We claim that restricted to is convex. Hence, the error probability of the test is at least , and it suffices to repeat the test times.
In order to prove that is convex on , we extend it to a slightly larger domain. This is done to better handle possible minimal centred simplices. Let as above be convex replacement of . We claim that the function defined by
[TABLE]
is convex (the two values are equal when both conditions apply). As and agree on , this implies that restricted to is convex.
By Theorem 2.3 and above discussion, it suffices to consider minimal simplices centred at points of the form . From Lemma 3.2, we get that the function is convex on a centred simplex of the form . The function is also convex on a simplex centred at because by Step 4.
Any other minimal simplex centred at is of the form . Let , and assume (the case is similar). From Step 7 of the algorithm, we know that the function defined by
[TABLE]
is convex. Both and are in and so they pass the test. Thus, from Steps 2 and 5, we have that and agree on , and . As is convex, and using Corollary 2.4, we have that the function defined by
[TABLE]
is also convex. Finally, since , we get that is convex on the simplex centred at .
5 Lower bounds for testing convexity in high dimensions
In this section we prove the \Omega\mathopen{}\mathclose{{}\left((\frac{n}{d})^{\frac{d}{2}}}\right) lower bound for non-adaptive algorithms that test convexity on the grid in Theorem 1.6 and the lower bound for non-adaptive algorithms that test convexity over the stripe in Theorem 1.5.
5.1 Overview of the proof
The lower bounds in Theorems 1.5 and 1.6 are both obtained using the same general construction. We describe it in the setting of functions over for simplicity.
The key idea is that we can construct convex functions whose increase in slope (i.e., second derivative) is small in a particular direction and large in the rest of the directions. We can perturb the values of such functions by in a way that yields functions which are far from convex but for which the only violation of convexity on the hypergrid will contain at least two points that form a line along the direction where the slope was increasing slowly. So any algorithm that does not query two points which give a line in that direction cannot catch any violations of convexity. To get a strong lower bound from this key idea, we show that it is possible to “hide” the slowly-increasing direction among \Omega\big{(}(\frac{n}{d})^{d}\big{)} possible directions. Since a set of queries contains pairs of points that form at most different directions, this construction shows that any non-adaptive convexity testing algorithm with one-sided error—i.e., that always accepts convex functions—must have query complexity at least \Omega\big{(}(\frac{n}{d})^{d/2}\big{)}.
To generalize this argument in a way that gives a lower bound for non-adaptive testing algorithms with two-sided error as well, we consider a different perturbation of the convex functions of that preserves convexity. We can do this by performing the same perturbation (i.e., either all or all ) for every point along a line in the slowly-increasing direction. The perturbations for each line are chosen independently at random; by ensuring that the slope of the original function is large enough in all other directions, these independent perturbations do not violate convexity. As we show in the rest of this section, non-adaptive algorithms with query complexity o\big{(}(\frac{n}{d})^{d/2}\big{)} cannot distinguish this type of perturbation from the type that breaks convexity.
5.2 Preliminaries
We write to denote the coordinates of an input . We use the following standard results in our proof.
Lemma 5.1** (Hoeffding’s inequality).**
Let be negatively correlated random variables bounded by and define . Then
[TABLE]
Lemma 5.2** (Yao’s minimax).**
Fix any disjoint sets and of functions mapping to . Let and be probability distributions on functions mapping to that satisfy
[TABLE]
Let be the distribution where with probability we sample from and with probability we sample from . If any non-adaptive deterministic algorithm with query complexity can not answer correctly with probability , then any non-adaptive randomized algorithm that decides whether or with error at most makes queries.
Proposition 5.3** (Theorem 332 [13]).**
Let be two numbers picked uniformly at random. The probability that the pair is co-prime is .
5.3 Change of basis and convexity
Definition 5.1**.**
A lattice basis is a matrix whose columns are linearly independent vectors in . The lattice generated by is the set
[TABLE]
Fact 5.4** (Lemma 1.2 [18]).**
* is a basis of if and only if its determinant is .*
Definition 5.2**.**
Given any vector whose first two coordinates and are coprime, the canonical basis completion of is the basis whose th column is
[TABLE]
where and are the integers that satisfy and is the vector with value in the th coordinate and [math] in all other coordinates.
The next proposition shows that the canonical basis completion of any vector that satisfies the condition of the above definition generates the lattice .
Proposition 5.5**.**
Given any vector whose first two coordinates and are coprime, the canonical basis completion of generates the lattice .
Proof.
Follows from Fact 5.4. ∎
If be the representation of a point according to the basis , then is the representation according to the basis . So and are equivalent.
5.4 Constructions
In this subsection we show how to construct the distributions . We also prove that every function in is convex and every function in is -far from convex.
Let be the distribution over bases obtained by drawing a vector uniformly at random among all vectors whose coordinates are in the range and whose first two coordinates and are coprime and returning the canonical basis for .
The distributions and are both obtained by drawing a basis from and starting with a convex function associated with that basis that we will call the canonical convex function for .
Definition 5.3**.**
The canonical convex function for a basis of is the function defined by
[TABLE]
Our distribution on convex functions is obtained by shifting the values of the canonical convex function in a way that preserves convexity.
Definition 5.4** ().**
Let to be the distribution on functions obtained by drawing values independently and uniformly at random for each and defining
[TABLE]
for each . Let be the distribution obtained by drawing and then drawing a function .
Our distribution on functions that are far from convex is similar, except that the shifts of the canonical convex function are now constructed in a way that will create many disjoint violations of convexity.
Definition 5.5** ().**
Let be the distribution on functions obtained by drawing values independently and uniformly at random for each and defining
[TABLE]
for each . Let be the distribution obtained by drawing and then drawing a function .
We complete this section by showing that the functions in the support of are indeed convex and that the functions in the support of are far from convex.
Claim 5.6**.**
Every function in the support of is convex.
Proof.
Fix any in the support of , any in the support of , and any points such that is a convex combination of the points , and . We will show that .
Let us define to be the vectors for which for each . Then the identity implies that for every and that
[TABLE]
Define . For each , the vector satisfies so we have that
[TABLE]
Furthermore, since is always bounded below by and the difference is zero whenever , we obtain
[TABLE]
Claim 5.7**.**
Every function in the support of is -far from convex.
Proof.
Fix any in the support of and any in the support of . For any points that satisfy and , if we have
[TABLE]
Then the triple is a witness of non-convexity of since
[TABLE]
Hence from how we defined , any four points that satisfy , and one of , is a witness on non-convexity. Let . For , let . Since we have that . And since any consecutive points with the same coordinates, in basis , have a witness of non-convexity, the number of witnesses in is . Also , hence the number of disjoint witnesses of non-convexity is greater than . In every disjoint non-convexity witness we have to change the value of at least one point to make the function convex. Therefore is -far from convex. ∎
5.5 Proof of Theorem 1.6
Let be the distribution where with probability we pick something from and with probability we pick something from . In this section we prove that there does not exist a non-adaptive deterministic algorithm with query complexity that answers correctly with probability on the distribution . From Lemma 5.2 this would prove Theorem 1.6 as from Claim 5.6 and Claim 5.7 we know that every function in the support of is convex and every function in the support of is -far from convex.
Let us assume there exists such a deterministic algorithm that answers correctly on a distribution with probability greater than . We can think of the distribution as pick a and pick a uniformly at random. And at the end with probability we choose whether we want a function in the support of or . Let the points the algorithm queries be .
We refer to a in the support of to be exposed if there exists such that , otherwise we refer to it as hidden.
Claim 5.8**.**
On the distribution the probability that answers correctly is less than .
Proof.
When is hidden then there is no way the algorithm can answer correctly with probability greater than . This is because . In fact it is even stronger, along with function values at the queried points even if we give what the hidden basis is, the algorithm can not answer correctly with probability greater than . This is because, as for any , , we have , for each , with probability irrespective of being in or . We can assume that the algorithm always answers correctly when is exposed. The probability that the algorithm answers correctly is .
Since there are only , pairs, there are at most exposed . From Proposition 5.3 and the construction of we know that and if the probability that a is exposed is .
Hence the success probability of the algorithm is . ∎
This a contradiction on the assumption that the algorithm answers correctly with probability . Hence there can not exist such a non-adaptive deterministic algorithm .
5.6 Non-adaptive lower bound for
In this section we prove a lower bound for non-adaptively testing convexity on the grid. The proof is almost the same as the the higher dimensional setting with slight changes.
Let be the distribution over bases obtained by drawing a vector uniformly at random among all vectors whose first coordinate is and the second coordinate is in the range and returning the canonical basis for .
Define the distributions and as above with the one modification that the domain of is set to be instead of . In this setting, we again have that every function in the support of is convex, using the same argument as in Claim 5.6. But now it is no longer true that every function in the support of is -far from convex. Instead, we have that a function is -far from convex with probability .
Claim 5.9**.**
A function is -far from convex with probability .
Proof.
For any in the support of , a function is -far from convex with probability . Let . For any points and that satisfy and we have that and
[TABLE]
with probability . Therefore, form a witness for non-convexity with probability . This is true for all . Using Hoeffding’s inequality the probability that the number of witnesses for non-convexity is less than is . Hence with probability the distance to convexity is at least . ∎
Any non-adaptive deterministic algorithm which performs can not answer correctly with probability grater than . The proof is similar to that of Claim 5.8. From Lemma 5.2 this completes the proof of the lower bound in Theorem 1.5.
6 Lower bound for testing convexity on the line
The lower bound in Theorem 1.3 is obtained by using similar ideas to the ones in [1] used to prove the analogous lower bound for testing monotonicity. The key idea is to introduce violations of convexity that are only visible at a given scale.
We first show a lower bound of for -testing convexity and then extend it to general .
6.1 General principle
In this section, we formulate the general principle our proof is based on in an abstract form to give the overall structure of our proof. In the next sections, we show how to apply it to convexity testing.
We deal with randomised query algorithms whose inputs are functions , and which want to distinguish the set of positive inputs from the set of negative inputs , that is, accept all and reject all . If is a deterministic decision tree, then denotes the terminal leaf of the decision tree on input .
Lemma 6.1**.**
Let and be two disjoint sets of functions mapping to . Let and be sets of labels, and assume there are mappings and . Let and be two probability measures supported on and , respectively.
Assume that for every deterministic decision tree of depth , one can find a partial mapping such that
- •
* for every in the domain of ;*
- •
;
- •
* for every .*
Then, every randomised query algorithm distinguishing from makes queries.
Proof.
Assume and for every , where are constants. Performing standard error reduction, we may assume that the error probability of the algorithm is a constant , which depends on and in a way to be determined later.
By standard Yao’s principle, there exists a deterministic decision tree that accepts with probability on where , and rejects with probability on where .
Let be the set of such that accepts . By the first property of , accepts all with . We have
[TABLE]
As this quantity is supposed to be less then , we get a contradiction when , or
[TABLE]
which is a positive constant. ∎
6.2 The case of
In this subsection we prove the following theorem, which covers the case of Theorem 1.3.
Theorem 6.2**.**
For an integer , it takes queries to -test a function for convexity.
We will define the required objects from Lemma 6.1. Clearly, and . The sets and consist of convex and -far-from-convex functions, respectively.
Let . Denote by the set of ternary strings of length strictly less than , including the empty string. The set consists of all the functions from into . For , the value of on is denoted by . We define the function corresponding to by giving its discrete derivative, which is a monotone function . That is,
[TABLE]
It is clear that if the function is monotone, the function is convex. Also, the maximal value of is at most .
The function is defined as follows. Assume that the argument is written in ternary and the value in -ary. We prepend leading zeroes if necessary so that each number has exactly digits. We enumerate the digits from left to right with the elements of , so that the [math]-th digit is the most significant one, and the -st digit is the least significant one. We use to denote the th digit of . For an interval , we define as the substring of formed by the digits as ranges over .
Let
[TABLE]
for and . The -th digit of is equal to . That is,
[TABLE]
Let us make some clarifying comments here. The main case of interest in Equation (6) is and . In the far-from-convex case, the first two cases will be essentially switched. This makes the function far from convex, but it is hard to see that just by observing the or case independently. The case is necessary to ensure that the sum of the elements on the right-hand side of Equation (6) is independent of , see Claim 6.4.
Claim 6.3**.**
Every function is convex.
Proof.
Every function is monotone because for every . ∎
Claim 6.4**.**
The value only depends on the values of as ranges over the prefixes of , and is independent from the remaining values of .
Proof.
From Equation (5) and Equation (7), we can write
[TABLE]
Note that the sum of the elements on the right-hand-side of Equation (6) is for every value of . This means that for every such that , we have
[TABLE]
The number of such is exactly . Using this, and summing explicitly over , we get that
[TABLE]
∎
The set is defined as . For , , and , let denote the function defined by
[TABLE]
Note that the value of may lie outside of , but the definition still makes sense, and Claim 6.4 still holds.
For , the corresponding function is defined by
[TABLE]
Claim 6.5**.**
Every function is -far from convex.
Proof.
First consider the case . Partition the domain of into -tuples which differ only in the th and the last th ternary digits. In a given -tuple, let and be the inputs that satisfy and . The definition of implies that
[TABLE]
and
[TABLE]
Since , we have and for each . Therefore,
[TABLE]
and so . Any convex function must disagree with on at least one of the four points , , , or .
The case is similar, but only considering the triples which differ in the last, st, digit. ∎
The probability distributions and are uniform on and , respectively.
Let be a deterministic decision tree of depth . Now we define the mapping which depends on .
We will define in the inverse direction, starting from a potential image . Let be the values which the decision tree queries on input of . Denote . We will proceed only if
[TABLE]
Take , and define as
[TABLE]
if there are no conflicts among the first three cases in this definition. Note that Equation (9) implies that . If is well-defined, we let .
Claim 6.6**.**
The mapping is well-defined and in the above notation.
Proof.
By definition of and , and using Claim 6.4, we have that for all . This proves that .
Now consider in the domain of . By the previous paragraph it can only come from such that . Then, the set is known, and the mapping in Equation (10) can be inverted, proving that is well-defined. ∎
Claim 6.7**.**
We have and for every .
Proof.
We will prove first that if condition Equation (9) is satisfied. Indeed, in this case, we do not set only if there are two inputs such that and . By a simple modification of [1, Lemma 6], there are at most values of for which this happens. As , this proves the second part of the claim.
For the first part of the claim, the probability that Equation (9) does not hold is upper bounded by the union bound over at most elements of and prefixes of each as
[TABLE]
Now we can apply Lemma 6.1 and get that complexity of -testing functions for convexity is as required.
6.3 General lower bound for the line
The lower bound can be strengthened for general values of as follows.
Theorem 6.8**.**
Fix any . Any -tester for convexity of functions has query complexity
[TABLE]
The proof of Theorem 6.8 is a slight extension of the proof of Theorem 6.2.
Define , , and . We will show that -testing the convexity of a function mapping requires queries.
We will use notations with tilde for objects referring to the proof of Theorem 6.8, and non-tilde notation for the objects from Section 6.2.
Let be as in Section 6.2, and define . For , we have with each . The partial derivative is given by
[TABLE]
for , , and as in Section 6.2. The function is given by
[TABLE]
Similarly to Claims Claim 6.3 and Claim 6.4, we have the following result
Claim 6.9**.**
Every function is convex. The value of only depends on the values of as runs through the prefixes of .
The set is defined as . For , define as with and for . Then,
[TABLE]
Claim 6.10**.**
Every function is -far from convex.
Proof.
This is due to the fact that there are disjoint pairs of values for which , as in the proof of Claim 6.5. ∎
The probability distributions and are defined as uniform on and , respectively.
The mapping is also defined similarly to Section 6.2. Let be a deterministic decision tree of depth . Take . Let be the set of variables queried by on , and let . For , let
[TABLE]
and . We call the pair good if there are no conflicts in the first three cases of Equation (11) (that is, is well-defined) and . If there are at least good pairs, we define for each good pair , where , of course, depends on and .
Similarly to Claim 6.6, is well-defined and for every in the domain of . Also, by definition, for every . In order to apply Lemma 6.1, it remains to show the following.
Claim 6.11**.**
We have .
Proof.
Fix . Similarly to Claim 6.7, there can be at most pairs such that there is a contradiction in the first three cases of Equation (11). A pair can be bad also because equals [math] or . The expected number of such pairs as is By Markov’s inequality, probability that the number of such pairs is is . And if this does not happen, the number of good pairs is at least . ∎
Acknowledgements
Aleksandrs Belovs is supported by the ERDF grant number 1.1.1.2/VIAA/1/16/113. Eric Blais and Abhinav Bommireddi are funded by an NSERC Discovery grant.
Appendix A On convexity and line convexity
In the introduction, we mentioned that the notion of linear convexity studied in [4] is not equivalent to the notion of convexity we study in this current work. In this section, we provide a proof of this statement.
Definition A.1**.**
Fix a set . The function is linearly convex if for every and every for which , we have .
When or, more generally, when is a convex set, then the notion of linear convexity is equivalent to convexity. When is a discrete set with dimension , however, the two definitions are not equivalent.
Proposition A.1**.**
For any and any discrete set , every convex function is also linearly convex. However, for every there are discrete sets for which there exist linearly convex functions that are not convex.
Proof.
That every convex function is also linearly convex follows directly from the definitions. For the second statement, consider the function defined by
[TABLE]
The function is linearly convex, but it has a violation of convexity on the point with respect to the points , , and . ∎
We note that many other notions of convexity of functions over discrete domains have also been considered in the context of discrete convex analysis. See [15] and the references therein for more details on those notions.
Appendix B Missing proofs from Section 2
For completeness, we include proofs of Lemma 2.2 and Theorem 2.3 in this section.
B.1 Proof of Lemma 2.2
By convexity of , we have that for all . Hence, indeed extends . It remains to prove that is convex.
Claim B.1**.**
The definition of in Equation (2) does not change if we minimise over all possible convex combinations , where need not form a simplex.
Proof.
Let be defined as in the statement of this claim. Take a linear combination which minimises and such that is as small as possible. We claim that then form a simplex.
Indeed, assume are not affinely independent. Then, there exists a non-trivial linear combination such that . Changing the sign of each if necessary, we may assume that . Let be the maximal real number such that for all .
Let . We have that , , , and . Moreover, at least one of is equal to 0, which contradicts minimality of . ∎
Claim B.2**.**
The function is convex on the convex hull of .
Proof.
Consider a convex combination , where all lie in the convex hull of . For each choose a convex combination such that . Then, give a convex combination over the elements of such that . By Claim B.1,
[TABLE]
proving that the function is convex. ∎
By [21], the function can be extended from the convex hull of to the whole . This completes the proof of Lemma 2.2.
B.2 Proof of Theorem 2.3
Assume that is not convex. Then there exists a convex combination such that . Choose such a convex combination that is as small as possible and the convex hull of is inclusion-wise minimal. We claim that then form a minimal centred simplex.
Using the same argument as in Claim B.1, we get that is a simplex. Assume it contains more than two points in its convex hull minus the vertices. Let be such that the violation is as large as possible. Let be any other point in the convex hull of except for its vertices. Then,
[TABLE]
where . Let be the largest real number such that for all . Let . We have the following convex combination:
[TABLE]
Moreover, one of is equal to 0. As , we have that . This together with Equation (12) yields
[TABLE]
This contradicts inclusion-wise minimality of .
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] Aleksandrs Belovs. Adaptive lower bound for testing monotonicity on the line. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, APPROX/RANDOM 2018 , pages 31:1–31:10, 2018.
- 2[2] Omri Ben-Eliezer. Testing local properties of arrays. In 10th Innovations in Theoretical Computer Science Conference, ITCS 2019, January 10-12, 2019, San Diego, California, USA , pages 11:1–11:20, 2019.
- 3[3] Piotr Berman, Sofya Raskhodnikova, and Grigory Yaroslavtsev. l p subscript 𝑙 𝑝 l_{p} testing. In STOC , pages 164–173, 2014.
- 4[4] Eric Blais, Sofya Raskhodnikova, and Grigory Yaroslavtsev. Lower bounds for testing properties of functions over hypergrid domains. In Proceedings of the 29th Conference on Computational Complexity (CCC) , pages 309–320, 2014.
- 5[5] Gilles Brassard, Peter Høyer, Michele Mosca, and Alain Tapp. Quantum amplitude amplification and estimation. In Quantum Computation and Quantum Information: A Millennium Volume , volume 305 of AMS Contemporary Mathematics Series , pages 53–74, 2002.
- 6[6] Deeparnab Chakrabarty and C. Seshadhri. Optimal bounds for monotonicity and lipschitz testing over hypercubes and hypergrids. In Symposium on Theory of Computing Conference (STOC ’13) , pages 419–428, 2013.
- 7[7] Deeparnab Chakrabarty and C. Seshadhri. An optimal lower bound for monotonicity testing over hypergrids. Theory of Computing , 10:453–464, 2014.
- 8[8] Funda Ergün, Sampath Kannan, Ravi Kumar, Ronitt Rubinfeld, and Mahesh Viswanathan. Spot-checkers. J. Comput. Syst. Sci. , 60(3):717–751, 2000.
