Cost-Driven Synthesis of Sound Abstract Interpreters
Qiuhan Gu, Avaljot Singh, Gagandeep Singh
TL;DR
This work tackles the long-standing challenge of constructing globally sound abstract interpreters by leveraging large language models (LLMs) to synthesize abstract transformers across domains, framed as constrained optimization guided by a novel soundness cost $\mathcal{L}$. The authors formalize global soundness via $F(\gamma(z)) \subseteq_C \gamma(F^{\#}(z))$ and introduce a comprehensive deviation metric $\Delta_S$, including shape-aware and single-assignment decompositions, together with a sampling-based relaxation that uses gradient-informed weights $\phi$ to drive refinement. The framework integrates LLM generation with static validation, a repair agent, and an SMT-based verifier (ProveSound) to obtain sound transformers, and proves convergence of the iterative refinement procedure under a fixed improvement threshold $\lambda$. Empirically, the approach yields transformers on par with handcrafted ones for standard nonlinear operators and can generate sound transformers for novel nonlinear operators (e.g., GeLU, ELU, Sigmoid) within DeepPoly and related domains, demonstrating strong precision in neural-network verification and indicating broad applicability beyond neural certification.
Abstract
Constructing abstract interpreters that provide global soundness guarantees remains a major obstacle in abstract interpretation. We investigate whether modern LLMs can reduce this burden by leveraging them to synthesize sound, non-trivial abstract interpreters across multiple abstract domains in the setting of neural network verification. We formulate synthesis as a constrained optimization problem and introduce a novel mathematically grounded cost function for measuring unsoundness under strict syntactic and semantic constraints. Based on this formulation, we develop a unified framework that unifies LLM-based generation with syntactic and semantic validation and a quantitative cost-guided feedback mechanism. Empirical results demonstrate that our framework not only matches the quality of handcrafted transformers, but more importantly, discovers sound, high-precision transformers for complex nonlinear operators that are absent from existing literature.
