cronokirby

(2026-01) A SNARK for (Non-)Subsequences with Text-Sub-Linear Proving Time

2026-01-04

Abstract

A keyword s\mathbf{s} is a subsequence of a text t\mathbf{t} if s\mathbf{s} can be obtained by deleting some characters from t\mathbf{t}; otherwise, s\mathbf{s} is a non-subsequence of t\mathbf{t}. (Non-)subsequence relationships arise in various fields, including genetic analysis, blockchains, and natural language processing. Recently, Ling et al. (SCN 2024) proposed a succinct argument for non-subsequences based on multivariate sumcheck (Lund et al., FOCS 1990) whose prover's running time is at least O(n+N+Σ)\mathcal{O}(n + N + |\Sigma|), where nn and NN are respectively the lengths of strings s\mathbf{s} and t\mathbf{t}, and Σ\Sigma is the alphabet over which s\mathbf{s} and t\mathbf{t} are defined. As shown in their work, proving non-subsequence relationships is non-trivial since one needs to decompose such an argument into smaller components for sumcheck, permutation, and lookup.

We propose a subsequence scheme that separates proving (non-)subsequences into the following two phases: (i) a preprocessing phase and (ii) a (non-)subsequence proving phase, assuming nNn \ll N (i.e., st|\mathbf{s}| \ll |\mathbf{t}|). Specifically, we can generate a one-time preprocessing proof with inputs t\mathbf{t} and Σ\Sigma, without any knowledge of s\mathbf{s}. When s\mathbf{s} is known, we can determine whether s\mathbf{s} is a subsequence of t\mathbf{t} and prove the corresponding statement. Employing cached quotients (IACR ePrint 2022/1763), we achieve a running time quasi-linear in N+ΣN + |\Sigma| for preprocessing, while the running time of proving a (non-)subsequence relationship is O(n\log2(N+Σ))\mathcal{O}(n \log_2 (N + |\Sigma|)) for each query s\mathbf{s}. Since nNn \ll N and \log2(N+Σ)\log_2(N + |\Sigma|) grows sub-linearly with the text size, this saves the prover's running time, assuming a preprocessing depending only on t\mathbf{t} is computed in advance. Hence, we achieve a \textit{text-sub-linear} proving time.