Precise Verification of Transformers Through ReLU-Catalyzed Abstraction Refinement
Open Access
- 24 July 2026
- book chapter
- Published by Springer Nature
- p. 527-550
Abstract
Formal verification of transformers has become increasingly important due to their widespread deployment in safety-critical applications. Compared to classic neural networks, the inferences of transformers involve highly complex computations, such as dot products in self-attention layers, rendering their verification extremely difficult. Existing approaches explored over-approximation methods by constructing convex constraints to bound the output ranges of transformers, which can achieve high efficiency. However, they may sacrifice verification precision, and consequently introduce significant approximation error that leads to frequent occurrences of false alarms. In this paper, we propose a transformer verification approach that can achieve improved precision. At the core of our approach is a novel usage of ReLU, by which we represent a precise but non-linear bound for dot products such that we can further exploit the rich body of literature for convex relaxation of ReLU to derive precise bounds. We extend two classic approaches to the context of transformers, a rule-based one and an optimization-based one, resulting in two new frameworks for efficient and precise verification. We evaluate our approaches on different model architectures and robustness properties derived from two datasets about sentiment analysis, and compare with the state-of-the-art baseline approach. Compared to the baseline, our approach can achieve significant precision improvement for most of the verification tasks with acceptable compromise of efficiency, which demonstrates the effectiveness of our approach.Keywords
All Related Versions
This publication has 25 references indexed in Scilit:
- Neural Network Verification with Branch-and-Bound for General Nonlinearities2025
- NLP verification: towards a general methodology for certifying robustnessEuropean Journal of Applied Mathematics, 2025
- A review of abstraction methods towards verifying neural networksACM Transactions on Embedded Computing Systems, 2024
- Are Transformers More Robust? Towards Exact Robustness Verification for Transformers2023
- Provably Tightest Linear Approximation for Robustness Verification of Sigmoid-like Neural Networks2022
- Verification of Image-based Neural Network Controllers Using Generative Models2021
- Fast and precise certification of transformers2021
- An abstract domain for certifying neural networksProceedings of the ACM on Programming Languages, 2019
- AI2: Safety and Robustness Certification of Neural Networks with Abstract Interpretation2018
- Reluplex: An Efficient SMT Solver for Verifying Deep Neural Networks2017