Direct Sum Testing: The General Case
Irit Dinur, Konstantin Golubev

TL;DR
This paper introduces a 4-query test to efficiently distinguish direct sum functions from those far from such functions, extending linearity testing to higher dimensions and tensor products.
Contribution
It presents a novel 4-query test for direct sums, generalizing the BLR linearity test and agreement tests to higher-dimensional tensor product functions.
Findings
The test distinguishes direct sums from far functions with high probability.
The approach extends linearity testing to tensor product structures.
An alternative, simpler test with up to (d+2) queries is also proposed.
Abstract
A function is a direct sum if it is of the form for some functions for all , and where . We present a -query test which distinguishes between direct sums and functions that are far from them. The test relies on the BLR linearity test (Blum, Luby, Rubinfeld, 1993) and on an agreement test which slightly generalizes the direct product test (Dinur, Steurer, 2014). In multiplicative notation, our result reads as follows. A -dimensional tensor with entries is called a tensor product if it is a tensor product of vectors with entries, or equivalently, if it is of rank . The presented tests can be read as tests for distinguishing between tensor products and tensors that…
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.
\DeclareCaptionType
ctest[Test]
Direct Sum Testing:
The General Case
Irit Dinur
The Weizmann Institute of Science, Israel
Konstantin Golubev
ETH Zurich, Switzerland
Abstract
A function is a direct sum if it is of the form for some functions for all , and where . We present a -query test which distinguishes between direct sums and functions that are far from them. The test relies on the BLR linearity test (Blum, Luby, Rubinfeld, 1993) and on an agreement test which slightly generalizes the direct product test (Dinur, Steurer, 2014).
In multiplicative notation, our result reads as follows. A -dimensional tensor with entries is called a tensor product if it is a tensor product of vectors with entries, or equivalently, if it is of rank . The presented tests can be read as tests for distinguishing between tensor products and tensors that are far from being tensor products.
We also present a different test, which queries the function at most times, but is easier to analyze.
1 Introduction
Let us first fix some notations and definitions. By we mean the set . For positive integers , we denote . For two functions , we denote by the relative Hamming distance between them, namely . We say that is -close to have some Property, if there exists a function such that has the Property and .
Given functions , where , their direct sum is the function given by , where stands for addition is in the field . We denote . We study the testability question: given a function test if it is a direct sum, namely if it belongs to the set
[TABLE]
Direct sum is a natural construction that is often used in complexity for hardness amplification [Y82, IJK06, IJKW08, STV01, T03]. It is related to the direct product construction: a function is the direct product of as above if for all . The testability of direct products has received attention [GS97, DR06, DG08, IKW12, DS14] as abstraction of certain PCP tests. It was not surprising to find [DDG*+*17] that there is a connection between testing direct products to testing direct sum. However, somewhat unsatisfyingly this connection was confined to testing a certain type of symmetric direct sum. A symmetric direct sum is a function that is a direct product with all components equal; namely such that there is a single such that
[TABLE]
In [DDG*+*17], a 3-query test was presented for testing if a given is a symmetric direct sum, and the analysis carried out relying on the direct product test. It was left as an open question to devise and analyze a test for the property of being a (not necessarily symmetric) direct sum.
We design and analyze a four-query test which we call the “square in a cube” test, and show that it is a strong absolute local test for being a direct sum. That is, the number of queries is an absolute constant (namely, ), and the distance from a function to the subspace of direct sums is bounded by some absolute constant (independent of and ) times the probability of the failure of the test on this function. We also describe a simpler -query test, whose easy analysis we defer to section 3.
In order to define the test, we need to introduce the following notation. Given two strings and a set , denote by the string in whose -th coordinate equals if and otherwise.
We prove the following theorem for Test 1.
Theorem 1.1** (Main).**
There exists an absolute constant s.t. for all and , given ,
[TABLE]
where are chosen independently and uniformly from the domain of , and are random subsets of .
Our proof, similarly to [DDG*+*17], relies on a combination of the BLR linearity testing theorem [BLR93] and a direct product test, similar to the one analyzed in [DS14]. These two components were also used in the proof of [DDG*+*17] for the symmetric case, but here we use the components differently. The trick is to find the right combination. We first observe that once we fix , the test is confined to a set of at most points in the domain, and can be viewed as performing a BLR (affinity rather than linearity) test on this piece of the domain. From the BLR theorem, we deduce an affine linear function on this piece. The next step is to combine the different affine linear functions, one from each piece, into one global direct sum, and this is done by reducing to direct product.
Testing if a tensor has rank .
An equivalent way to formulate our question is as a test for whether a -dimensional tensor with entries has rank . Indeed moving to multiplicative notation and writing and , we are asking whether there are such that
[TABLE]
Denoting
[TABLE]
we have
Corollary 1.2**.**
There exists an absolute constant s.t. for all and , for every ,
[TABLE]
Structure of the Paper.
In Sections 2 and 3 we present two different approaches for testing whether a -dimensional binary tensor is a tensor product. In Section 5 we discuss possible directions for future research. In Section 4, we explain how to derive the specific direct product test that we need from the agreement testing theorem of [DD19]. This is used in the course of the proof in Section 2. The numbering is section-wise. Finally, in Section 5 we discuss possible directions for future research.
2 Square in a Cube Test
In this section we present the Square in a Cube Test. Then we introduce the required background: the BLR test for a function being Affine in Subsection 2.1, the direct product test in Subsection 2.2. Finally, in Subsection 2.3 we prove the main result on the test.
We start by introducing some notation.
Given two vectors , define
- •
;
- •
the induced subcube is the binary cube ;
- •
the projection map defined for as
[TABLE]
The following test is the same as Test 1 in Introduction.
Theorem 2.1**.**
Suppose a function passes Test 2 with probability for some , then is -close to a tensor product.
2.1 The BLR affinity test
The Blum-Luby-Rubinfeld linearity test was introduced in [BLR93], where its remarkable properties were proven. Later a simpler proof via Fourier analysis was presented, e.g. see [BCH*+*95]. Below we give a variation of this test for affine functions, see [O’D14, Chapter 1].
Definition 2.2**.**
A function is called affine, if there exists a set and a constant such that for every vector
[TABLE]
Note that (see [O’D14, Exercise 1.26]) a function is affine iff for any two vectors it satisfies
[TABLE]
The BLR test implies that if a function satisfies (1) with high probability, then it is close to an affine function.
Theorem 2.3** ([BLR93]).**
Suppose passes the affinity test with probability for some . Then is -close to being affine.
2.2 Generalized Direct Product Test
Definition 2.4**.**
For , and functions , their direct product is the function denoted and defined as . A function , is called a direct product if there exist functions such that for all .
Dinur and Steurer [DS14] presented a -query test, very similar to Test 4 below, that, with constant probability, distinguishes between direct products and functions that are far from direct product.
The proof in [DS14] works for the special case of and can easily be modified to work for the more general situation. Nevertheless, for completeness, we will rely on a newer and more general agreement theorem of [DD19] that directly implies what we need.
Theorem 2.5** (Generalized direct product testing theorem).**
Let be positive integers, and let . Let be a function that passes Test 4 with parameter with probability at least . Then there exist functions such that
[TABLE]
We will show in Section 4 how to derive the above theorem from the agreement theorem of [DD19].
2.3 Proof of Theorem 2.1
For a positive integer , we denote by the distribution on , where each coordinate, independently, is equal to [math] with probability and to with probability .
We use the following proposition in the course of the proof.
Proposition 2.6**.**
Let be a set and be the corresponding linear function, i.e., . Suppose
[TABLE]
then .
Proof.
Consider . Then
[TABLE]
Also the following holds
[TABLE]
[TABLE]
and the statement follows. ∎
Proof.
(of Theorem 2.1.) Assume Test 2 rejects a function with probability less than , i.e.,
[TABLE]
where all distributions are uniform, and is a shorthand for . Then there exists such that
[TABLE]
Note that the operations re-indexing the domain 111By this we mean selecting permutations on for , and setting , as well as flipping a function, i.e., adding the constant one function to it element-wise, preserve the distance between functions. Hence, w.l.o.g. we can assume for convenience that and that .
We write for and for . Then for every ,
[TABLE]
The BLR theorem (Theorem 2.3) implies that for each there exists a subset , such that
[TABLE]
Remark 2.7*.*
By the BLR theorem, there should be the “greater or equal to” sign instead of the equality. We assume equality for convenience.
Let be a function defined as follows. For each , the set can be viewed as a subset of , since . Then is defined as the element of corresponding to the set .
We now show that passes Test 4 with high probability and hence is close to a direct product.
Let be chosen uniformly at random, and let be chosen with respect to the following distribution . For each ,
[TABLE]
Note that the distribution on pairs , where is chosen uniformly from and w.r.t. , is equivalent to the following: for each ,
[TABLE]
In particular, it is symmetric in the sense that choosing uniformly at random first, and then , leads to the same distribution on pairs as the one described above.
For such a pair define distribution on as follows. For a vector ,
[TABLE]
Note that the distribution is supported on a binary cube of dimension inside . Denote
[TABLE]
We claim that the following holds
[TABLE]
To see (3) note that since is chosen uniformly, is chosen w.r.t. , and , the resulting distribution for is
[TABLE]
which is exactly the uniform distribution on .
We now show that
[TABLE]
First note that it follows from the definitions that
[TABLE]
And by the symmetry of the distribution on pairs ,
[TABLE]
Combined together, the previous two equations imply that
[TABLE]
and by the Markov inequality, Inequality 4 follows. By the definition of ,
[TABLE]
which is equivalent to
[TABLE]
Proposition 2.6 implies that if , then
[TABLE]
By Theorem 2.5, the function is close to a direct product, i.e., there exist functions such that
[TABLE]
Therefore,
[TABLE]
∎
3 The Shapka Test
In this section we present a different test for whether a tensor is a tensor product. It queries the tensor at places at most, but the proof is simpler than for the previous test.
In [KL14], Kaufman and Lubotzky showed an interesting connection between the theory of high-dimensional expanders and property testing. Namely, they showed that -coboundary expansion of a -dimensional complete simplicial complex implies testability of whether a symmetric -matrix is a tensor square of a vector. The following test is inspired by their work and in a way generalizes it. However, since the description below does not employ neither terminology nor machinery of high-dimensional expanders, we refer to [KL14] for the connection between this theory and property testing.
Given two strings , for denote by the vector which coincides with in every coordinate except for the -th one, where it coincides with , i.e.,
[TABLE]
For a string , and a number , we write for the string which is equal to in every coordinate except for the -th one, where it is equal to , i.e.,
[TABLE]
Remark 3.1*.*
Shapka is the Russian word for a winter hat (derived from Old French chape for a cap). The name the Shapka test comes from the fact that the set consists of the two top layers of the induced binary cube (and also the bottom layer if is even).
Theorem 3.2**.**
Suppose a function passes Test 8 with probability for some , then is -close to a tensor product.
Proof.
Let be the relative Hamming distance from to the subspace of direct sums, i.e., for every direct sum it holds that
[TABLE]
For a vector , let us define the local view of from , that is functions , where , that are defined as follows. For , and ,
[TABLE]
For , the definition of depends on the parity of and goes as follows
[TABLE]
Given a collection of functions, , recall that their direct sum is the function such that for a vector the following holds
[TABLE]
The following holds for any ,
[TABLE]
As is a direct sum, it is at least -far from , and hence for any ,
[TABLE]
Assume now that fails Test 8 with probability , i.e.,
[TABLE]
Combining this equality with (5) and (6), we get the following
[TABLE]
which completes the proof. ∎
4 Generalized direct product test
In this section we prove Theorem 2.5, restated directly below, by relying on known agreement test results.
**Theorem 2.5 (restated) **Let be positive integers, and let . Let be a function that passes Test 4 with parameter with probability at least . Then there exist functions such that
[TABLE]
This theorem was proven “in spirit” in [DS14] although formally that proof is written only for the case of . Instead of reworking the details we will rely on a newer work that generalizes the [DS14] paper to a broader context of agreement testing.
First, let us move from the distribution of Test 4 to a related distribution. It turns out that if passes one of these two-query tests with good probability then we can draw conclusions regarding its success in related tests.
Claim 4.1**.**
Suppose passes Test 4 with with probability then it passes Test 6 with parameter probability .
We prove this claim later in Section 4.1. Theorem 2.5 will follow by invoking a theorem from [DD19] about agreement testing. In agreement testing the input is a collection of local functions each defined on its own small domain. The agreement test checks that whenever the small domains overlap the functions agree with each other. An agreement theorem deduces a single global function (on a domain that contains all the smaller ones) from the given local pairwise agreements. To see who are the small domains in our context let us construct the following set system.
- •
Vertices: Let be disjoint sets of vertices, and we identify with .
- •
Subsets: We have a subset for every choice of one element from each ,
[TABLE]
There is a straightforward bijection between and the domain of , namely .
- •
Local functions: For a set we have a local function defined by
[TABLE]
where is associated with in the identification of and .
A direct product function can thus be represented as a collection of local functions. The direct product test, Test 6, can be rephrased as Test 7 below. Given we view it as a family of local functions and would like to invoke the following agreement test theorem,
Theorem 4.2** ([DD19, Theorem 4.4]).**
Suppose is a collection of subsets that are top faces of a -one-sided -partite -high dimensional expander. Then given for which Test 7 succeeds with probability , and assuming , there exists a function such that
[TABLE]
We will show in Section 4.2 that we are justified to apply this theorem because our collection of subsets, also known as the “complete multi-partite complex”, is a -one-sided-HDX for any . Assuming this is the case, we can now take and get the desired conclusion of Theorem 2.5,
[TABLE]
4.1 Moving between different variants of agreement tests
Claim 4.1 follows immediately from the following lemma, (one needs to apply the first item 3 times to get from to then and then and then item 2 once).
Lemma 4.3**.**
Let be a function that passes Test 4 with parameter with probability at least . Then,
- •
* passes Test 4 with parameter with probability at least .*
- •
There exists a number , , such that passes Test 6 with parameter with probability at least
Proof.
We first prove the first item. Choosing two queries according to the test distribution in Test 4 and then another pair conditioned on the first query being , we get a pair whose distribution is exactly as if the were chosen from Test 4 with parameter . Suppose was the set of indices in which was chosen to equal , and suppose was that set for the pair . Setting it remains to notice that the event that is contained in at least one of the events or , so its probability is at most .
For the second item, observe that with probability the size of the set defined by the test is some such that (this follows from Hoefding’s tail bound). There must be some in this range for which the failure probability of the test is at most . Otherwise, even if the test succeeds with probability when is outside this range, we would still not be able to reach a sucess probability of since
[TABLE]
∎
4.2 The complete multi-partite complex
The collection of subsets defined in the beginning of this section gives rise to the so-called complete multi-partite simplicial complex, by downwards closing that set system.
We wish to show that it satisfies the requirements of Theorem 4.2. For this we briefly recall the relevant definitions. For a more comprehensive introduction to this topic we refer the reader to [DD19] and the references therein.
- •
Simplicial Complex: A simplicial complex is a hypergraph that is closed downward with respect to containment. It is -dimensional if the largest hyperedge has size . We refer to as the hyperedges (also called faces) of size . are the vertices. It is -partite if the vertices are partitioned into parts, and each hyperedge in has one vertex from each part.
- •
Link: Given a -face , the link of is the collection of faces that are disjoint from and whose union belongs to ,
[TABLE]
This is a simplicial complex whose dimension is .
- •
Distribution: Given any probability distribution on the top faces , it propagates to a distribution on the edges by selecting a top face and then a pair of vertices in it uniformly. This gives a weighted graph that is called the -skeleton of the complex.
- •
HDX: A -dimensional simplicial complex is a -one-sided HDX if for every face , , the -skeleton of the link is a -one-sided expander graph, meaning that the random walk Markov chain on this weighted graph has all non-trivial normalized eigenvalues at most .
The complete -partite complex has parameters and has a vertex set of size . It is defined by the following distribution over -hyperedges: For each choose uniformly. This gives a probability distribution on faces in . The -skeleton of this complex is a graph whose vertices are and whose weighted edges are obtained by selecting a random hyperedge in and then a random pair of vertices inside it. The link of a face in this complex is itself a complete partite complex, with fewer parts. To show that this complex is a -one-sided HDX it remains to prove the following lemma,
Lemma 4.4**.**
Let be the -skeleton of a complete -partite complex with parameters . Then the normalized adjacency matrix of has one eigenvalue of , eigenvalue of [math] with multiplicity , and the remaining eigenvalues have value .
In particular, except for one eigenvalue of , all of ’s remaining eigenvalues are non-positive.
Proof.
Let, as before, denote the part of vertices of size . The distribution on edges induced by the uniform distribution on the maximal faces is as follows. For an edge , where and , its probability is equal to
[TABLE]
Hence the transition probability of moving from the vertex to the vertex is equal to
[TABLE]
The transition matrix is of the following form
[TABLE]
where stands for the all-one matrix of size . In order to show that has a single positive eigenvalue, we use the approach developed in [EH80]. First, note that the multiplicity of [math] is , where , because the matrix is of rank . Next, note that if is an eigenfunction with eigenvalue , then
it is constant on for each ; 2. 2.
and
[TABLE]
where is the value of on .
For ,
[TABLE]
The expression on r.h.s. is the same for every , and , which completes the proof of (1). To show (2), it is enough to substitute for in the equality above.
It follows from the above that the non-zero eigenvalues of are exactly the eigenvalues of the matrix
[TABLE]
which has eigenvalue with multiplicity , and with multiplicity . ∎
5 Further Directions
Below we present possible directions for future research.
Can the original function be reconstructed by a voting scheme using the Shapka Test 8? 2. 2.
It is plausible that the Square in the Cube test 2 can be analyzed by the Fourier transform approach similarly to the analysis of the BLR test. 3. 3.
Another test in the spirit of the paper is the following.
We conjecture that this test is also good, i.e., if a function passes the test with high probability then it is close to a tensor product.
Acknowledgements
The authors would like to thank Oded Goldreich for pointing out a gap in the proof in a previous version of this manuscript.
The first author is supported by ERC-CoG grant number 772839. A substantial part of the work was done while the second author held a joint postdoctoral position at The Weizmann Institute and Bar-Ilan University funded by the ERC grant number 336283. Currently, the second author is supported by the SNF grant number 200020_169106. The second author would also like to thank the Swiss Mathematical Society for travel funding related to this paper.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[BCH + 95] Mihir Bellare, Don Coppersmith, Johan Håstad, Marcos A. Kiwi, and Madhu Sudan. Linearity testing in characteristic two. In 36th Annual Symposium on Foundations of Computer Science, Milwaukee, Wisconsin, USA, 23-25 October 1995 , pages 432–441, 1995.
- 2[BLR 93] Manuel Blum, Michael Luby, and Ronitt Rubinfeld. Self-testing/correcting with applications to numerical problems. Journal of computer and system sciences , 47(3):549–595, 1993.
- 3[DDG + 17] Roee David, Irit Dinur, Elazar Goldenberg, Guy Kindler, and Igor Shinkar. Direct sum testing. SIAM J. Comput. , 46(4):1336–1369, 2017.
- 4[DG 08] Irit Dinur and Elazar Goldenberg. Locally testing direct products in the low error range. In Proc. 49th IEEE Symp. on Foundations of Computer Science , 2008.
- 5[DR 06] Irit Dinur and Omer Reingold. Assignment testers: Towards combinatorial proofs of the PCP theorem. SIAM Journal on Computing , 36(4):975–1024, 2006. Special issue on Randomness and Computation.
- 6[DD 19] Yotam Dikstein and Irit Dinur. Agreement testing theorems on layered set systems. In 60th Annual IEEE Symposium on Foundations of Computer Science (FOCS) , 2019.
- 7[DS 14] Irit Dinur and David Steurer. Direct product testing. In 2014 IEEE 29th Conference on Computational Complexity (CCC) , pages 188–196, 2014.
- 8[EH 80] Friedrich Esser and Frank Harary. On the spectrum of a complete multipartite graph. In European Journal of Combinatorics , 1(3), 211–218, 1980.
