When an image is fed to a sequential model — a state-space model or any recurrent network that reads tokens one at a time — the image is first flattened into a 1D sequence by a scan path: a raster sweep, a zigzag, or a fractal space-filling curve like the Hilbert curve. The model's hidden state forgets older tokens gradually, so the influence of token $i$ on the state at step $j$ decays roughly like $\gamma^{j-i}$ for some decay factor $\gamma < 1$. Now suppose we hide a watermark in that image. Whether the watermark is still detectable after the scan is not mainly a question of perturbation size — it is a question of whether the accumulated, decay-discounted watermark signal stays above the detector's threshold along the one path the model actually takes. No existing method answers this question with a guarantee.
This proposal builds that answer out of three older results that have never touched. Comparator automata reduce "does one discounted sum dominate another along every sequence?" to an automata emptiness check, decidable in PSPACE when the discount factor is an integer Comparator Automata in Quantitative Verification. Locality-preserving scans satisfy a Hilbert-curve bound $\|p-q\|_2^2 \le C\,|h(p)-h(q)|$, so a spatially local 2D edit footprint becomes a local, interval-like footprint in the 1D sequence Boosting Vision State Space Model with Fractal Scanning. And watermarking already knows its blind spot: passive, pixel-level watermarks are certifiably stripped by regeneration attacks whenever the perturbation stays within the invisibility budget Generative Autoencoders as Watermark Attackers. We combine these into a verifier that, given a scan, a decay-coupled detector, and an attacker's invisibility budget $\Delta$, either certifies that no budget-respecting edit can push the discounted detection statistic below threshold, or produces a concrete counterexample edit — a synthesized minimal attack.
Core Claim
Model the watermark pipeline along the scan as a weighted automaton. Let $s = h(x_w)$ be the watermarked image serialized by a locality-preserving map $h$, let the attacker replace $s$ by any $s'$ reachable with 2D perturbation energy at most $\Delta$ (the invisibility constraint), and let the detector accumulate a discounted statistic
$$V(s') = \sum_{i=1}^{n} \gamma^{\,i}\, g(s'_i),$$
declaring the watermark present iff $V(s') \ge \tau$. The watermark is certifiably robust at budget $\Delta$ iff the language of budget-respecting attacked sequences with $V(s') < \tau$ is empty:
$$\mathcal{L}_\Delta \cap \{s' : V(s') < \tau\} \stackrel{?}{=} \emptyset.$$
The claim is that this is a genuine automata emptiness problem, not a metaphor. The attacker's budget language $\mathcal{L}_\Delta$ is finite-state because the scan is locality-preserving: by the Hilbert bound, a 2D edit region of radius $r$ touches only $O(r^2)$ cells that form a bounded union of contiguous intervals in the serialized word, so a finite automaton with a bounded interval counter recognizes every legal attack. And the threshold comparison is exactly the discounted-sum dominance question that Comparator Automata in Quantitative Verification showed decidable — the comparator reads the pair (attacked signal, threshold weight) synchronously and accepts iff detection fails, and for integer $1/\gamma$ it is an $\omega$-regular Büchi automaton of polynomial size, so the whole check runs in PSPACE. Emptiness of the product of the budget automaton with the comparator is the certificate; a non-empty product yields an ultimately periodic witness (stem plus cycle) that we invert through $h$ to obtain a concrete 2D adversarial patch, reusing the witness-generation machinery already implemented in Automating the Analysis of Quantitative Automata with QuAK.
The identification that makes this more than a formal trick is $\gamma \leftrightarrow 1/d$: the recurrent decay of a state-space model is the discount factor of the aggregation function. Integer discounting gives a decidable comparator; non-integer rational decay lands in the open problem territory that Bansal et al. explicitly leave unresolved, which this application now motivates studying.
Research Program
The work has three parts: a construction, a decidability carve-out, and a witness-to-attack bridge.
The construction. We build a prototype verifier (call it ScanCert) that takes four inputs: a serialization map (Hilbert, Morton, zigzag, or raster), a grid-quantized watermark embedding that assigns each cell a per-token weight $g$, a detector specified as a discounted or prefix-average accumulator over the serialized word, and a budget $\Delta$ in 2D perturbation energy. ScanCert compiles the budget into the finite-state attack language, builds the comparator following the integer-discount construction, and runs an antichain-based inclusion check of the kind QuAK implements QuAK: Quantitative Automata Kit. For decoders whose statistic is a long-run average rather than a discounted sum, we use the prefix-average relaxation, which admits a pushdown comparator and a decidable pushdown emptiness check — precisely the relaxation Comparator Automata in Quantitative Verification established for limit-average comparison.
The decidability carve-out. A learned state-space model has a real-valued decay, not an integer one, and we will not pretend otherwise. The honest position, constrained by the undecidability results in this literature: quantitative threshold emptiness for probabilistic automata is undecidable in general, with equivalence decidable but inclusion not When are emptiness and containment decidable for probabilistic automata?, and even unary probabilistic emptiness is as hard as the Skolem problem On Regularity of Unary Probabilistic Automata. So ScanCert verifies in two tiers. Tier one verifies the designed detector, whose decay we fix to an integer reciprocal ($\gamma \in \{1/2, 1/3, 1/4\}$) — a genuine design constraint on the detector, and the price of a sound certificate. Tier two verifies the abstraction of a trained decoder: we reuse the result that $K$-Lipschitz robustness of synchronized transducers is decidable in polynomial time via reduction to weighted-automata emptiness Lipschitz Robustness of Finite-state Transducers to bound how far the trained decoder's margins can drift from the integer-decay abstraction per unit of perturbation, giving a cheap outer robustness radius; the comparator check then gives the exact per-budget verdict inside that radius. The gap between the tiers is measured empirically, not assumed away. Separately, we pose non-integer rational decay as a theory subproblem: our setting supplies concrete instances (real decoder decay factors rounded to nearby rationals) on which the open regularity question can be attacked, including whether the regularity conjecture raised by the comparator line holds for this fragment.
Witnesses as attacks. When the emptiness check fails, the witness is an ultimately periodic word over the serialized alphabet. Mapping it back through the inverse Hilbert map yields a concrete image edit. The research question is whether these formally minimal edits transfer to real neural decoders: we compare them against the Gaussian regeneration attack of Generative Autoencoders as Watermark Attackers and against gradient-guided attacks, measuring removal success per unit of $\ell_2$ energy. A witness that evades the real detector at lower energy than a black-box attack is evidence that the abstraction is not just sound but tight.
Baselines
The do-nothing reference point is passive pixel-level watermarking under a regeneration attack: on 500 MS-COCO images, the attack of Generative Autoencoders as Watermark Attackers removes 93–99% of RivaGAN, DwtDctSvd, and SSL watermarks while keeping PSNR above 30, where the strongest baseline attacks remove no more than 3%; on the 500-image Stable Diffusion prompt set it reports over 99% removal for the same schemes. This is the floor any certified method must clear: our certificate must hold at budgets at which this attack operates, or the certificate is decorative.
The strongest existing certified competitor is Luminark, which certifies false-alarm rates for a statistical test over patch luminance statistics Luminark: Training-free, Probabilistically-Certified Watermarking for General Vision Generative Models. It is the strongest because it is the only prior method with a formal, distribution-free guarantee and strong numbers: reported false-alarm probability $p < 0.01$, detection accuracy $\ge 95\%$ after aggressive transformations (scaling, cropping, JPEG quality 50, Gaussian noise), FID 2.13 on EDM2-XXL versus an unwatermarked reference of 1.81, and an average of roughly 2.3 guidance repetitions. We will run Luminark on exactly our MS-COCO and ImageNet splits, with the same generator, the same perturbation-budget grid, and the same tuning budget, comparing three things: certified robust budget (largest $\Delta$ at which the guarantee holds), invisibility (FID and PSNR at that budget), and whether the method produces any counterexample when it fails. Beating Luminark means certifying robustness at a strictly larger budget while holding false-alarm probability at or below 0.01 and FID within 0.5 of the unwatermarked reference — or certifying the same budget and additionally emitting a valid attack witness.
The key ablation isolates the locality ingredient: the identical formal pipeline run with a raster or zigzag scan in place of the Hilbert scan. Under raster scanning the same 2D edit budget scatters across the word at stride equal to the image width, so the attack language needs either an unbounded counter or a much larger automaton; we predict the emptiness check either blows up in state count or the certified budget shrinks substantially, which would show that locality preservation is what buys the finite-state encoding — the property that zigzag and fractal scanning papers establish empirically PlainMamba: Improving Non-Hierarchical Mamba in Visual Recognition, ZigMa: A DiT-style Zigzag Mamba Diffusion Model, but never connect to decidability. A second ablation replaces the discounted comparator with an i.i.d. Hoeffding test over tokens, to show where the sequential coupling breaks the independence assumption.
Why not just…?
Why not just use a statistical hypothesis test like Luminark? Because Luminark's certificate rests on independence across patches, and a recurrent detector violates it by construction: the hidden state couples token $i$ to every later token with weight $\gamma^{j-i}$, so the detection statistic is a discounted sum of correlated contributions, not a mean of independent Bernoulli draws. Our Hoeffding ablation makes this concrete: we will measure the empirical false-alarm rate of a Luminark-style test applied to the sequential detector under correlated token statistics and check whether it exceeds the certified $p < 0.01$. If it does not — if the i.i.d. test remains valid under realistic decay — then the ablation will have deflated our claim, and we will report that honestly. Even in that case, the statistical test cannot answer the dual question of which edit evades detection, which the emptiness witness answers directly.
Why not just use randomized smoothing? The certified-radius approach for LLM watermarks A Certified Robust Watermark For Large Language Models — with F1 0.851 under DIPPER paraphrasing versus 0.826 for SIR and 0.760 for Unigram, resilience to roughly 44 token replacements, and F1 above 0.90 across GPT-2, OPT-1.3B, and LLaMA-7B — proves that scalar certified radii are achievable. But its own authors identify the smoothing tax, and the radius is a norm-ball that says nothing about where in the 2D image the budget is spent or about path-dependent accumulation along the scan; two edits of equal norm at different locations have different effects once decay and locality enter, and a scalar radius cannot express that. Our check is per-instance and exact within the abstraction, with no Monte Carlo sampling. The real threat is the reverse: randomized smoothing works for any black-box detector, while ScanCert needs the detector abstracted as a weighted automaton. The tier-two Lipschitz experiment — measuring the gap between the certified verdict and the trained decoder's actual behavior on held-out images — is designed precisely to quantify the cost of that assumption, and if the gap is large, the smoothing route wins and we will say so.
Why not just embed in the Fourier domain like Tree-Ring? Tree-Ring watermarking reports AUC 1.000 with 100% TPR at 1% FPR in clean settings and AUC 0.935 under rotation where DwtDct drops to 0.596 Tree-Rings Watermarks: Invisible Fingerprints for Diffusion Images — excellent numbers, but for diffusion pipelines with deterministic DDIM inversion, and the regeneration analysis shows such signals can still be stripped once noise exceeds the $\ell_2$ threshold Generative Autoencoders as Watermark Attackers. Our scope is complementary: recurrent and state-space decoders, where Fourier inversion is undefined because there is no invertible sampling trajectory to read backward. For pure diffusion watermarking, Tree-Ring is likely to remain the better engineering choice; we claim the sequential-decoder regime, where no structural invariance trick currently exists.
Why not just use multi-path cross-scanning? Four-way scanning empirically mitigates locality loss 2D-CrossScan Mamba: Enhancing State Space Models with Spatially Consistent Multi-Path 2D Information Propagation, at roughly four times the memory and compute, and offers no guarantee that any particular watermark survives. We will run our pipeline under a four-way scan as an additional condition: if cross-scanning matches the certified Hilbert pipeline's empirical robustness at acceptable cost, then the value of our contribution reduces to the certificate and the synthesized attacks, and we will frame the results that way rather than overselling the robustness numbers.
Proposed Experiments
First, the formal core: a synthetic benchmark of serializer × detector × budget triples, run through ScanCert with the antichain inclusion algorithm that QuAK showed solves nearly 2,000 more instances out of 10,000 randomly generated automata pairs within a 2-second limit than the baseline approach, and whose scc-search optimization improved 90% of tested cases Automating the Analysis of Quantitative Automata with QuAK. We measure the fraction of decidable instances, check time, and certified budget as a function of scan type and decay factor, predicting a sharp cliff between integer and non-integer decay.
Second, soundness on real systems: we implement an integer-decay discounted detector over a Hilbert-serialized Mamba-style image decoder, embed watermarks, and sweep the perturbation budget on the 500-image MS-COCO split and 500-image Stable Diffusion prompt set used by the regeneration-attack study Generative Autoencoders as Watermark Attackers, plus the ImageNet evaluation used by Tree-Ring and Luminark. For every budget where ScanCert certifies robustness, we run the Gaussian regeneration attack and gradient attacks; a single successful removal inside a certified budget falsifies the abstraction and is the decisive failure condition. We also track invisibility — PSNR above 30 and FID close to the unwatermarked reference — so the certified frontier is reported as a budget–fidelity curve, not a single point.
Third, witness transfer: for budgets where the check fails, we extract ultimately periodic witnesses, invert them through the space-filling map, and apply the resulting patches to the real decoder. The metric is removal success per unit $\ell_2$ energy versus the regeneration attack's 93–99% removal curve. If formal witnesses evade at lower energy, the abstraction is tight and the tool doubles as an attack synthesizer; if they transfer poorly, the witnesses still localize which scan regions are the watermark's weak points, which is actionable design feedback no empirical attack suite provides.
The decisive checks are therefore three: the integer-decay cliff on the synthetic benchmark, zero soundness violations across the certified budget grid on real decoders, and witness transfer at or below black-box attack energy. Any one failing tells us exactly which link — the locality encoding, the decay abstraction, or the witness inversion — does not hold, and each has a dedicated experiment to locate it.
References
- Comparator Automata in Quantitative Verification
- Boosting Vision State Space Model with Fractal Scanning
- Generative Autoencoders as Watermark Attackers: Analyses of Vulnerabilities and Threats
- Automating the Analysis of Quantitative Automata with QuAK
- QuAK: Quantitative Automata Kit
- When are emptiness and containment decidable for probabilistic automata?
- On Regularity of Unary Probabilistic Automata
- Lipschitz Robustness of Finite-state Transducers
- Luminark: Training-free, Probabilistically-Certified Watermarking for General Vision Generative Models
- PlainMamba: Improving Non-Hierarchical Mamba in Visual Recognition
- ZigMa: A DiT-style Zigzag Mamba Diffusion Model
- A Certified Robust Watermark For Large Language Models
- Tree-Rings Watermarks: Invisible Fingerprints for Diffusion Images
- 2D-CrossScan Mamba: Enhancing State Space Models with Spatially Consistent Multi-Path 2D Information Propagation