CEGAR-certified latent-state abstraction
Implementation & benchmark of arXiv:2608.10254 — A Pragmatic Guide to Building Conservative Discrete Abstractions of Cyber-Physical Systems
Source paper: A Pragmatic Guide to Building Conservative Discrete Abstractions of Cyber-Physical Systems arXiv:2608.10254 ⓘ · analyzed Sep 1, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Construct a finite nondeterministic abstraction of an RNN or neural state-space model by partitioning its hidden-state domain into cells and adding every abstract transition that could contain a concrete successor. Use temporal-logic counterexamples to refine only cells involved in violating paths instead of globally increasing discretization resolution. This provides a falsifiable bridge between long-horizon neural dynamics and formal safety or attractor analysis.
Formulas
Mathematical statement
Let the neural state update be $h_{k+1}=F_\theta(h_k,u_k)$, where $h_k\in X\subset\mathbb{R}^d$ is the hidden state and $u_k\in U$ is the input. Let $C_i$ be partition cells and let $Q(h)=i$ when $h\in C_i$. Define a conservative transition relation by $i\to j$ if and only if $F_\theta(C_i,U_i)\cap C_j\neq\varnothing$, where $U_i$ is the allowed input region and $F_\theta(C_i,U_i)$ is the set of all possible successors. Soundness requires every concrete trajectory to map to an abstract path. Refinement splits cells on unresolved abstract counterexamples, preserving all concrete transitions while reducing spurious paths.
Implementation notes
Integrate this as an analysis module around an RNN or neural state-space model. First select a bounded hidden-state domain using known saturation limits or rollout quantiles, then partition it into axis-aligned boxes. For each box C_i and input region U_i, propagate bounds through the network using interval bound propagation, zonotopes, or sampled trajectories enlarged by an explicit safety margin. Add an edge i to j whenever the estimated successor set intersects C_j; never delete an edge merely because it was not observed. Pseudocode: initialize the partition; for each cell compute B_i = Bound(F_theta(C_i,U_i)); add every intersecting cell as a successor; search the abstract graph for an unsafe path; test that path for concretizability with constrained optimization; split the first unresolved cell; recompute only incident transitions. Analytical bounds are the paper-derived component, while sampling is an empirical check and not a certificate. The first experiment should use a GRU on a synthetic two-dimensional damped oscillator with a known unsafe region, comparing coarse, uniformly refined, and CEGAR abstractions. The predicted signature is that the abstract unsafe set always contains the empirical unsafe set, while state growth concentrates near counterexample paths and spurious violations disappear after refinement.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Confirmed ✓
Stage 2 · Practical benchmark result: Significantly worse ✗
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
Stage 1 — Mechanism check agent confidence 8/10
Built a conservative axis-aligned latent-state abstraction with exact interval propagation for a 2D affine damped oscillator, plus uniform refinement, CEGAR refinement, sampled soundness checks, and parameter sweeps. The mechanism manifested: in-domain sampled transition omissions were 0/19,215 for every tested margin, reachable unsafe area decreased from 2.0 at 2×2 to 0.40625 at 16×16, and the interval margin increased edges from 256 to 354. CEGAR reached unsafe area 0.390625 with 160 cells versus 0.40625 with 256 uniformly refined cells, providing a promising focused-refinement signal, though not evidence for a neural RNN at scale.
- Agent confidence
- 8/10
- Baseline
- Uniform partitions: n=2/4/8/16 gave reachable unsafe areas 2.0/0.75/0.625/0.40625 with 4/16/64/256 cells.
- Idea
- CEGAR: at 48 refinement rounds used 160 cells and gave unsafe area 0.390625; sampled soundness had 0 omissions among 19,215 in-domain transitions. Margin sweep: edges 256,256,256,354 for margins 0,0.001,0.01,0.05.
Limitations: The experiment uses an affine 2D state-space map rather than a trained GRU/RNN, and interval propagation is exact only for this affine rectangular case. Soundness was additionally checked by finite random sampling and conditioned on successors remaining inside the declared bounded domain; no temporal-logic parser, constrained optimizer, learned model, or high-dimensional scalability test was included.
How to run: python3 cegar_abstraction.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2608.10254)
Significantly WORSE than the tuned baseline (+230.7%, p=0.0081, wins 0 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0014
- Idea mean
- 0.0048
- Effect (Δ)
- 0.0033 (+230.7%; negative = idea better)
- Wins
- 0 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±197.2%
- Mechanism
- Confirmed ✓
- Practical effect
- Hurts
- Baseline tuning
- swept over 3 configs
The intervention is a differentiable latent-box consistency surrogate rather than a complete temporal-logic CEGAR verifier. It does not implement an unsafe-path parser, constrained counterexample solver, incident-edge-only graph refinement, or a formal interval certificate. Only the built-in dynamics track, rnn_small architecture, 400 training samples, 160 test samples, 12 epochs, and three learning rates were tested.
How to run: python3 bench_cegar.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Failed ✗
Agent confidence: 9/10
Implemented and ran the registered dynamics benchmark using the built-in dynamics track and rnn_small model. The best CEGAR-inspired system had higher test MSE than the tuned standard baseline: delta_mean=+0.0033235 with permutation p=0.0081, so the idea was significantly worse and did not produce a training win. The mechanism signature was measured from trained-model latent behavior and marked confirmed, but this did not improve the independent task metric.
- Baseline
- Best lr=0.01, weight_decay=0.0; full 8-seed MSE mean=0.0014403377863345668, std=0.0003958335789015625.
- Idea
- Best lr=0.001, weight_decay=0.0; full 8-seed MSE mean=0.004763860866660252, std=0.002933690813628907; paired delta=+0.0033235230803256854; 0/8 wins; permutation p=0.0081.
Benchmark result
Significantly WORSE than the tuned baseline (+230.7%, p=0.0081, wins 0 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0014
- Idea mean
- 0.0048
- Effect (Δ)
- 0.0033 (+230.7%; negative = idea better)
- Wins
- 0 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±197.2%
- Mechanism
- Confirmed ✓
- Practical effect
- Hurts
- Baseline tuning
- swept over 3 configs
The intervention is a differentiable latent-box consistency surrogate rather than a complete temporal-logic CEGAR verifier. It does not implement an unsafe-path parser, constrained counterexample solver, incident-edge-only graph refinement, or a formal interval certificate. Only the built-in dynamics track, rnn_small architecture, 400 training samples, 160 test samples, 12 epochs, and three learning rates were tested.
How to run: python3 bench_cegar.py
Artifacts
- bench_cegar.py 7.2 KB View Raw
- bench_report.json 3.9 KB View Raw
- cegar_abstraction.py 6.7 KB View Raw
- report.md 1.7 KB View
- report_bench_2026-09-01T100508.md 5.8 KB View
- results.json 2.0 KB View Raw