This short paper accompanies an invited talk given at ICALP2025. It is an informal, high-level presentation of tolerant testing and distance approximation. It includes some general results as well as a few specific ones, with the aim of providing a taste of this research direction within the area of sublinear algorithms.
Counting small subgraphs, referred to as motifs, in large graphs is a fundamental task in graph analysis, extensively studied across various contexts and computational models. In the sublinear-time regime, the relaxed problem of approximate counting has been explored within two prominent query frameworks: the standard model, which permits degree, neighbor, and pair queries, and the strictly more powerful augmented model, which additionally allows for uniform edge sampling. Currently, in the standard model, (optimal) results have been established only for approximately counting edges, stars, and cliques, all of which have a radius of one. This contrasts sharply with the state of affairs in the augmented model, where algorithmic results (some of which are optimal) are known for any input motif, leading to a disparity which we term the ``scope gap" between the two models. In this work, we make significant progress in bridging this gap. Our approach draws inspiration from recent advancements in the augmented model and utilizes a framework centered on counting by uniform sampling, thus allowing us to establish new results in the standard model and simplify on previous results. In particular, our first, and main, contribution is a new algorithm in the standard model for approximately counting any Hamiltonian motif in sublinear time. Our second contribution is a variant of our algorithm that enables nearly uniform sampling of these motifs, a capability previously limited in the standard model to edges and cliques. Our third contribution is to introduce even simpler algorithms for stars and cliques by exploiting their radius-one property. As a result, we simplify all previously known algorithms in the standard model for stars (Gonen, Ron, Shavitt (SODA 2010)), triangles (Eden, Levi, Ron Seshadhri (FOCS 2015)) and cliques (Eden, Ron, Seshadri (STOC 2018)).
We consider the problems of characterizing and testing the stability of cellular automata configurations that evolve on a two-dimensional torus according to threshold rules with respect to the von-Neumann neighborhood. While stable configurations for Threshold-1 (OR) and Threshold-5 (AND) are trivial (and hence easily testable), the other threshold rules exhibit much more diverse behaviors. We first characterize the structure of stable configurations with respect to the Threshold-2 (similarly, Threshold-4) and Threshold-3 (Majority) rules. We then design and analyze a testing algorithm that distinguishes between configurations that are stable with respect to the Threshold-2 rule, and those that are ε-far from any stable configuration, where the query complexity of the algorithm is independent of the size of the configuration and depends quadratically on 1/ε.
In this work, we study the problem of approximating the distance to subsequence-freeness in the sample-based distribution-free model. For a given subsequence (word) $w = w_1 \dots w_k$, a sequence (text) $T = t_1 \dots t_n$ is said to contain $w$ if there exist indices $1 \leq i_1 < \dots < i_k \leq n$ such that $t_{i_{j}} = w_j$ for every $1 \leq j \leq k$. Otherwise, $T$ is $w$-free. Ron and Rosin (ACM TOCT 2022) showed that the number of samples both necessary and sufficient for one-sided error testing of subsequence-freeness in the sample-based distribution-free model is $\Theta(k/\epsilon)$. Denoting by $\Delta(T,w,p)$ the distance of $T$ to $w$-freeness under a distribution $p :[n]\to [0,1]$, we are interested in obtaining an estimate $\widehat{\Delta}$, such that $|\widehat{\Delta} - \Delta(T,w,p)| \leq \delta$ with probability at least $2/3$, for a given distance parameter $\delta$. Our main result is an algorithm whose sample complexity is $\tilde{O}(k^2/\delta^2)$. We first present an algorithm that works when the underlying distribution $p$ is uniform, and then show how it can be modified to work for any (unknown) distribution $p$. We also show that a quadratic dependence on $1/\delta$ is necessary.
We study the problem of testing C_k-freeness (k-cycle-freeness) for fixed constant k > 3 in graphs with bounded arboricity (but unbounded degrees). In particular, we are interested in one-sided error algorithms, so that they must detect a copy of C_k with high constant probability when the graph is ϵ-far from C_k-free. We next state our results for constant arboricity and constant ϵ with a focus on the dependence on the number of graph vertices, n. The query complexity of all our algorithms grows polynomially with 1/ϵ. (1) As opposed to the case of k=3, where the complexity of testing C_3-freeness grows with the arboricity of the graph but not with the size of the graph (Levi, ICALP 2021) this is no longer the case already for k=4. We show that Ω(n^1/4) queries are necessary for testing C_4-freeness, and that O(n^1/4) are sufficient. The same bounds hold for C_5. (2) For every fixed k ≥ 6, any one-sided error algorithm for testing C_k-freeness must perform Ω(n^1/3) queries. (3) For k=6 we give a testing algorithm whose query complexity is O(n^1/2). (4) For any fixed k, the query complexity of testing C_k-freeness is upper bounded by O(n^1-1/⌊ k/2⌋). Our Ω(n^1/4) lower bound for testing C_4-freeness in constant arboricity graphs provides a negative answer to an open problem posed by (Goldreich, 2021).
We initiate a study of a new model of property testing that is a hybrid of testing properties of distributions and testing properties of strings. Specifically, the new model refers to testing properties of distributions, but these are distributions over huge objects (i.e., very long strings). Accordingly, the model accounts for the total number of local probes into these objects (resp., queries to the strings) as well as for the distance between objects (resp., strings), and the distance between distributions is defined as the earth mover's distance with respect to the relative Hamming distance between strings. We study the query complexity of testing in this new model, focusing on three directions. First, we try to relate the query complexity of testing properties in the new model to the sample complexity of testing these properties in the standard distribution testing model. Second, we consider the complexity of testing properties that arise naturally in the new model (e.g., distributions that capture random variations of fixed strings). Third, we consider the complexity of testing properties that were extensively studied in the standard distribution testing model: Two such cases are uniform distributions and pairs of identical distributions.
For a natural number m , a distribution is called m -grained, if each element appears with probability that is an integer multiple of 1/m . We prove that, for any constant c<1 , testing whether a distribution over [Θ(m)] is m -grained requires Ω(m^c) samples, where testing a property of distributions means distinguishing between distributions that have the property and distributions that are far (in total variation distance) from any distribution that has the property.
We study the dynamics of (synchronous) one-dimensional cellular automata with cyclical boundary conditions that evolve according to the majority rule with radius $ r $. We introduce a notion that we term cell stability with which we express the structure of the possible configurations that could emerge in this setting. Our main finding is that apart from the configurations of the form $ (0^{r+1}0^* + 1^{r+1}1^*)^* $, which are always fixed-points, the other configurations that the automata could possibly converge to, which are known to be either fixed-points or 2-cycles, have a particular spatially periodic structure. Namely, each of these configurations is of the form $ s^* $ where $ s $ consists of $ O(r^2) $ consecutive sequences of cells with the same state, each such sequence is of length at most $ r $, and the total length of $ s $ is $ O(r^2) $ as well. We show that an analogous result also holds for the minority rule.
In this work, we study the problem of testing subsequence-freeness. For a given subsequence (word) w = w1 … wk, a sequence (text) T = t1 … tn is said to contain w if there exist indices 1 ≤ i1 < … < ik ≤ n such that tij = wj for every 1 ≤ j ≤ k. Otherwise, T is w-free. While a large majority of the research in property testing deals with algorithms that perform queries, here we consider sample-based testing (with one-sided error). In the “standard” sample-based model (i.e., under the uniform distribution), the algorithm is given samples (i, ti) where i is distributed uniformly independently at random. The algorithm should distinguish between the case that T is w-free, and the case that T is ε-far from being w-free (i.e., more than an ε-fraction of its symbols should be modified so as to make it w-free). Freitag, Price, and Swartworth (Proceedings of RANDOM, 2017) showed that O((k2 log k)ε) samples suffice for this testing task. We obtain the following results. – The number of samples sufficient for one-sided error sample-based testing (under the uniform distribution) is O(kε). This upper bound builds on a characterization that we present for the distance of a text T from w-freeness in terms of the maximum number of copies of w in T, where these copies should obey certain restrictions. – We prove a matching lower bound, which holds for every word w. This implies that the above upper bound is tight. – The same upper bound holds in the more general distribution-free sample-based model. In this model, the algorithm receives samples (i, ti) where i is distributed according to an arbitrary distribution p (and the distance from w-freeness is measured with respect to p). We highlight the fact that while we require that the testing algorithm work for every distribution and when only provided with samples, the complexity we get matches a known lower bound for a special case of the seemingly easier problem of testing subsequence-freeness with one-sided error under the uniform distribution and with queries (Canonne et al., Theory of Computing, 2019).
Counting and sampling small subgraphs are fundamental algorithmic tasks. Motivated by the need to handle massive datasets efficiently, recent theoretical work has examined the problems in the sublinear time regime. In this work, we consider the problem of sampling a k-clique in a graph from an almost uniform distribution. Specifically the algorithm should output each k-clique with probability (1 +/- epsilon)/n(k), where n(k) denotes the number of k-cliques in the graph and epsilon is a given approximation parameter. To this end, the algorithm may perform degree, neighbor, and pair queries. We focus on the class of graphs with arboricity at most a, and prove that the query complexity of the problem is Theta* (min {n alpha, max {((n alpha)(k/2)/n(k))(1/k-1), n alpha(k-1)/n(k)}}), where n is the number of vertices in the graph, and Theta*(center dot) suppresses dependencies on (log n/epsilon)(O(k)). Our upper bound is based on defining a special auxiliary graph H-k, such that sampling edges almost uniformly in H-k translates to sampling k-cliques almost uniformly in the original graph G. We then build on a known edge-sampling algorithm (Eden, Ron and Rosenbaum, ICALP19) to sample edges in H-k. The challenge is simulating queries to H-k while being given query access only to G. Our lower bound follows from a construction of a family of graphs with arboricity alpha such that in each graph there are n(k) k-cliques, where one of these cliques is "hidden" and hence hard to sample.
We consider the problem of estimating the number of triangles in a graph. This problem has been extensively studied in both theory and practice, but all existing algorithms read the entire graph. In this work we design a sublinear-time algorithm for approximating the number of triangles in a graph, where the algorithm is given query access to the graph. The allowed queries are degree queries, vertex-pair queries and neighbor queries. We show that for any given approximation parameter 0<;epsilon<;1, the algorithm provides an estimate hat{t} such that with high constant probability, (1-epsilon) t<;hat{t}κ(1+epsilon)t, where t is the number of triangles in the graph G. The expected query complexity of the algorithm is O(n/t̂{1/3} + min {m, m̂{3/2}/t}) poly(log n, 1/epsilon), where n is the number of vertices in the graph and m is the number of edges, and the expected running time is (n/t̂{1/3} + m̂{3/2}/t) poly(log n, 1/epsilon). We also prove that Omega(n/t̂{1/3} + min {m, m̂{3/2}/t}) queries are necessary, thus establishing that the query complexity of this algorithm is optimal up to polylogarithmic factors in n (and the dependence on 1/epsilon).
A distance-approximation algorithm for a graph property $\mathcal{P}$ in the adjacency-matrix model is given an approximation parameter $\epsilon \in (0,1)$ and query access to the adjacency matrix of a graph $G=(V,E)$. It is required to output an estimate of the \emph{distance} between $G$ and the closest graph $G'=(V,E')$ that satisfies $\mathcal{P}$, where the distance between graphs is the size of the symmetric difference between their edge sets, normalized by $|V|^2$. In this work we introduce property covers, as a framework for using distance-approximation algorithms for "simple" properties to design distance-approximation. Applying this framework we present distance-approximation algorithms with $poly(1/\epsilon)$ query complexity for induced $P_3$-freeness, induced $P_4$-freeness, and Chordality. For induced $C_4$-freeness our algorithm has query complexity $exp(poly(1/\epsilon))$. These complexities essentially match the corresponding known results for testing these properties and provide an exponential improvement on previously known results.
We present algorithms for testing if a (0,1)-matrix M has Boolean/binary rank at most d, or is 𝜖-far from having Boolean/binary rank at most d (i.e., at least an 𝜖-fraction of the entries in M must be modified so that it has rank at most d). For the Boolean rank we present a non-adaptive testing algorithm whose query complexity is $\tilde {O}\left (d^{4}/ \epsilon ^{6}\right )$ . For the binary rank we present a non-adaptive testing algorithm whose query complexity is O(22d/𝜖2), and an adaptive testing algorithm whose query complexity is O(22d/𝜖). All algorithms are 1-sided error algorithms that always accept M if it has Boolean/binary rank at most d, and reject with probability at least 2/3 if M is 𝜖-far from having Boolean/binary rank at most d.
We continue the line of work initiated by Goldreich and Ron (Journal of the ACM, 2017) on testing dynamic environments and propose to pursue a systematic study of the complexity of testing basic dynamic environments and local rules. As a first step, in this work we focus on dynamic environments that correspond to elementary cellular automata that evolve according to threshold rules. Our main result is the identification of a set of conditions on local rules, and a meta-algorithm that tests evolution according to local rules that satisfy the conditions. The meta-algorithm has query complexity poly$ (1/\epsilon) $, is non-adaptive and has one-sided error. We show that all the threshold rules satisfy the set of conditions, and therefore are poly$ (1/\epsilon) $-testable. We believe that this is a rich area of research and suggest a variety of open problems and natural research directions that may extend and expand our results.
We study the problem of approximating the number of k -cliques in a graph when given query access to the graph. We consider the standard query model for general graphs via (1) degree queries, (2) neighbor queries and (3) pair queries. Let n denote the number of vertices in the graph, m the number of edges, and C k the number of k -cliques. We design an algorithm that outputs a (1+ε)-approximation (with high probability) for C k , whose expected query complexity and running time are O ( n / C k 1/ k + m k /2 / C k )(log n , 1/ε, k ). Hence, the complexity of the algorithm is sublinear in the size of the graph for C k = ω( m k /2−1 ). Furthermore, we prove a lower bound showing that the query complexity of our algorithm is essentially optimal (up to the dependence on log n , 1/ε and k ). The previous results in this vein are by Feige (SICOMP 06) and by Goldreich and Ron (RSA 08) for edge counting ( k =2) and by Eden et al. (FOCS 2015) for triangle counting ( k =3). Our result matches the complexities of these results. The previous result by Eden et al. hinges on a certain amortization technique that works only for triangle counting, and does not generalize for larger cliques. We obtain a general algorithm that works for any k ≥ 3 by designing a procedure that samples each k -clique incident to a given set S of vertices with approximately equal probability. The primary difficulty is in finding cliques incident to purely high-degree vertices, since random sampling within neighbors has a low success probability. This is achieved by an algorithm that samples uniform random high degree vertices and a careful tradeoff between estimating cliques incident purely to high-degree vertices and those that include a low-degree vertex.
Constructing a spanning tree of a graph is one of the most basic tasks in graph theory. We consider a relaxed version of this problem in the setting of local algorithms. The relaxation is that the constructed subgraph is a sparse spanning subgraph containing at most $$(1+\epsilon )n$$ edges (where n is the number of vertices and $$\epsilon $$ is a given approximation/sparsity parameter). In the local setting, the goal is to quickly determine whether a given edge e belongs to such a subgraph, without constructing the whole subgraph, but rather by inspecting (querying) the local neighborhood of e. The challenge is to maintain consistency. That is, to provide answers concerning different edges according to the same spanning subgraph. We first show that for general bounded-degree graphs, the query complexity of any such algorithm must be $$\Omega (\sqrt{n})$$. This lower bound holds for constant-degree graphs that have high expansion. Next we design an algorithm for (bounded-degree) graphs with high expansion, obtaining a result that roughly matches the lower bound. We then turn to study graphs that exclude a fixed minor (and are hence non-expanding). We design an algorithm for such graphs, which may have an unbounded maximum degree. The query complexity of this algorithm is $$\mathrm{poly}(1/\epsilon , h)$$ (independent of n and the maximum degree), where h is the number of vertices in the excluded minor. Though our two algorithms are designed for very different types of graphs (and have very different complexities), on a high-level there are several similarities, and we highlight both the similarities and the differences.
The “relative earth mover distance” is a technical term introduced by Valiant and Valiant (43rd STOC, 2011), and extensively used in their work. They claimed that, for every two distributions, the relative earth mover distance upper-bounds the variation distance up to relabeling, but this claim was not used in their work. The claim appears as a special case of a result proved by Valiant and Valiant in a later work (48th STOC, 2016), but we found their proof too terse. The proof presented here is merely an elaboration of (this special case of) their proof.
In the course of research in computational learning theory, we found ourselves in need of an error-correcting encoding scheme for which relatively few bits in the codeword yield no information about the plain message. Being unaware of a previous solution, we came-up with the scheme presented here. Clearly, a scheme as postulated above cannot be deterministic. Thus, we introduce a probabilistic coding scheme that, in addition to the standard coding theoretic requirements, has the feature that any constant fraction of the bits in the (randomized) codeword yields no information about the message being encoded. This coding scheme is also used to obtain efficient constructions for the Wire-Tap Channel Problem.
Given query access to an undirected graph G, we consider the problem of computing a (1 +/- epsilon)-approximation of the number of k-cliques in G. The standard query model for general graphs allows for degree queries, neighbor queries, and pair queries. Let n be the number of vertices, m be the number of edges, and nk be the number of k-cliques. Previous work by Eden, Ron and Seshadhri (STOC 2018) gives an O*(n/n(k)(1/k) + m(k/2)/n(k))-time algorithm for this problem (we use O*(.) to suppress poly(log n; 1/epsilon; k(k)) dependencies). Moreover, this bound is nearly optimal when the expression is sublinear in the size of the graph. Our motivation is to circumvent this lower bound, by parameterizing the complexity in terms of graph arboricity. The arboricity of G is a measure for the graph density \everywhere". There is a very rich family of graphs with bounded arboricity, including all minor-closed graph classes (such as planar graphs and graphs with bounded treewidth), bounded degree graphs, preferential attachment graphs and more. We design an algorithm for the class of graphs with arboricity at most alpha, whose running time is O*(min{n alpha(k-1)/n(k); n/n(k)(1/k) + m alpha(k-2)/n(k)}). We also prove a nearly matching lower bound. For all graphs, the arboricity is O(root m), so this bound subsumes all previous results on sub-linear clique approximation. As a special case of interest, consider minor-closed families of graphs, which have constant arboricity. Our result implies that for any minor-closed family of graphs, there is a (1 +/- epsilon)-approximation algorithm for nk that has running time O*(n/n(k)). Such a bound was not known even for the special (classic) case of triangle counting in planar graphs.