cs.DSAug 22, 2025

Quality control in sublinear time: a case study via random graphs

Authors: Cassandra Marcussen, Ronitt Rubinfeld, Madhu Sudan

Organizations: School of Engineering and Applied Sciences, Harvard University, Cambridge, Massachusetts, USA. · Computer Science and Artificial Intelligence Laboratory, MIT, Cambridge, Massachusetts, USA.

Abstract

Many algorithms are designed to work well on average over inputs. But when such an algorithm is run on an arbitrary input, the question arises: Can we trust the algorithm on this input? This question is especially relevant in network science, where algorithms for theoretical random graph models are often applied to individual real-world networks. We identify a new class of algorithmic problems addressing this, which we call "Quality Control Problems." These problems are specified by a "quality function" ρρ and a distribution DD such that, with high probability, a sample drawn from DD is "high quality," meaning its ρρ-value is near 11. The goal is to accept most inputs x∼Dx \sim D and reject potentially adversarially generated inputs xx with ρ(x)ρ(x) far from 11. In this work, we consider the sublinear version of the quality control problem, where D∈Δ({0,1}N)D \in Δ(\{0,1\}^N) and the goal is to solve the (D,ρ)(D,ρ)-quality problem with o(N)o(N) queries and time. As a case study, we consider random graphs, i.e., D=Gn,pD = G_{n,p} (and N=(n2)N = \binom{n}2), and the kk-clique count function ρk:=Ck(G)/EG′∼Gn,p[Ck(G′)]ρ_k := C_k(G)/\mathbb{E}_{G' \sim G_{n,p}}[C_k(G')], where Ck(G)C_k(G) is the number of kk-cliques in GG. In suitable parameter ranges, worst-case approximate kk-clique counting requires p−Ω(k2)p^{-Ω(k^2)} queries. In contrast, we show that the quality control problem for Gn,pG_{n,p} (with n≥p−ckn\geq p^{-ck} for some constant cc) with respect to ρkρ_k can be tested with p−O(k)p^{-O(k)} queries and time, showing quality control is provably superpolynomially more efficient in this setting. More generally, for a motif HH of maximum degree Δ(H)Δ(H), we show that the corresponding quality control problem can be solved with p−O(Δ(H))p^{-O(Δ(H))} queries and running time.

Figures & tables

Explore similar work

Aug 4, 2026

Quality Control Algorithms for Pattern Counting

In recent work, Marcussen, Rubinfeld, and Sudan introduced the notion of quality control problems, which aim to capture the task of determining if a given input is truly random. Formally, their goal is to accept typical inputs from the specified distribution while rejecting every input whose value of a specified statistic is far from the distributional baseline. This captures the empirical practice of using specified statistics as a proxy for the quality of randomness. Empirical algorithms, however, have not exploited the asymmetry in the definition of quality control problems, which require soundness guarantees in the worst-case while only seeking average-case completeness. Their work abstracted a problem definition emphasizing this asymmetry and used it to give efficient quality control algorithms for assessing the randomness of graphs. In this work, we introduce and study quality control problems over sequences, where the goal is to distinguish a sequence of i.i.d. characters from sequences where some specified pattern appears too often (or too infrequently) as a subsequence. We consider this problem in both the finite-alphabet setting and for real-valued sequences. We refer to the former setting as the pattern counting problem. In the latter case, the natural notion of a pattern is to consider the relative ordering of the characters in the subsequence, and we refer to this as the permutation pattern counting problem. Algorithms to approximately count (permutation) patterns of length kk in a worst-case sequence of length nn can provably require exponential in kk queries into the sequence. In contrast, we show that by taking advantage of the asymmetry in the definition of quality control, we give algorithms that run in poly(k)(k) time to solve these problems. We also prove that any quality control algorithm (over some natural distributions) requires superlinear queries in kk.
Aug 17, 2026

Correlation Clustering with Random Partial Information

Correlation clustering is a fundamental unsupervised learning problem. On complete graphs, both the min-disagreement and min-max objectives admit constant-factor approximations, yet on general (non-complete) graphs, the best guarantees blow up to O(log⁡n)O(\log n) and O(n)O(\sqrt{n}). This gap between the two regimes motivates the following question: are there classes of incomplete graphs that circumvent the lower bounds on general graphs and admit approximation guarantees approaching those attainable on complete graphs? We study a natural class of graphs obtained by randomly subsampling a complete signed graph GG, where each edge is independently deleted with probability qq. For such graph instances both for the min-max and the min-disagreement objectives, we prove approximation guarantees (depending on qq) that are substantially better than the bounds achievable for general graphs. We supplement our theoretical results with experiments that also suggest that the approximation ratios of our algorithm are close to those of the complete graph and better than the worst-case bounds for general (non-complete) graphs.
Sep 17, 2024

Clustering with Non-adaptive Subset Queries

Recovering the underlying kk-clustering of a set UU of nn points by asking pair-wise same-cluster queries has garnered significant interest in the past few years. Given a query S⊂US \subset U, ∣S∣=2|S|=2, the oracle returns "yes" if the points are in the same cluster and "no" otherwise. For adaptive algorithms, the query complexity is known to be Θ(nk)Θ(nk), while non-adaptive algorithms are extremely limited: even for k=3k=3, such algorithms require Ω(n2)Ω(n^2) queries, matching the trivial upper bound. However, non-adaptivity is highly desirable since it allows queries to be asked in parallel. To break the quadratic barrier for non-adaptive queries, we study a natural generalization of this problem to subset queries for ∣S∣>2|S|>2, where the oracle returns the number of clusters intersecting SS. Previous work obtained an O(n)O(n) query adaptive algorithm, but the realm of non-adaptive algorithms remained completely unknown. In this paper, we give the first non-adaptive algorithms for clustering with subset queries. Our main result is a non-adaptive algorithm making O(nlog⁡k⋅(log⁡k+log⁡log⁡n)2)O(n \log k \cdot (\log k + \log\log n)^2) queries, improving to O(nlog⁡log⁡n)O(n \log \log n) when kk is constant. In addition to non-adaptivity, we make other practical considerations, such as enforcing a bound, ss, on the query size. We show Ω(max⁡(n2/s2,n))Ω(\max(n^2/s^2,n)) queries are necessary and obtain algorithms making O~(n2k/s2)\smash{\widetilde{O}(n^2k/s^2)} queries for any s≤ns \leq \sqrt{n} and O~(n2/s)\smash{\widetilde{O}(n^2/s)} queries for any s≤ns \leq n. Finally, we obtain improved upper bounds when the clusters are roughly balanced, and when the algorithm is allowed two rounds of adaptivity.