TL;DR
This paper introduces a novel framework, Real2Float, that uses semidefinite programming (SDP) to automatically compute certified upper bounds on roundoff errors for nonlinear floating-point programs. This approach offers a way to formally verify the precision of complex numerical computations, which is crucial for safety-critical systems and hardware implementations, outperforming existing methods in both accuracy and speed for a significant portion of tested programs.
What Problem Does This Paper Address?
Numerical programs, especially those involving floating-point arithmetic, are susceptible to roundoff errors. For critical applications like aircraft control systems or hardware implementations (e.g., FPGAs), understanding and bounding these errors is paramount. The challenge intensifies when programs involve non-linear operations, where traditional interval arithmetic can lead to overly pessimistic bounds or high analysis times. Existing sophisticated techniques often lack formal verification capabilities or are computationally expensive. This paper addresses the need for a method that can efficiently compute tight, formally verifiable bounds on roundoff errors for a broad class of nonlinear programs.
Methods
The core of the Real2Float framework is the application of semidefinite programming (SDP), specifically sparse SDP relaxations, to bound the roundoff error. The authors decompose the total roundoff error into an affine part (linear in error variables) and a remainder. The affine part is bounded using SDP, which leverages sums of squares (SOS) certificates. These certificates can be formally checked within the Coq proof assistant, providing a high degree of confidence in the computed bounds. The framework is designed to handle not only polynomial programs but also semialgebraic (involving operations like division and square roots) and transcendental functions (like exp, log, sin, cos) through approximation techniques. For programs with conditional statements, a recursive procedure is employed to handle different branches. The use of sparse SDP relaxations is key to managing the computational complexity associated with larger problems.
Datasets
The paper evaluates its approach on a set of 30 benchmarks, categorized as:
- Polynomial functions: 9 benchmarks, including those from physics and the Kepler Conjecture.
- Semialgebraic functions: 10 benchmarks, originating from physics, biology, and control systems.
- Polynomial functions with polynomial preconditions: 5 benchmarks from global optimization literature.
- Conditional statements: 2 benchmarks from static analysis literature.
- Transcendental functions: 4 benchmarks, including those from optimization problems and standard functions like logexp and sphere.
These benchmarks are largely drawn from existing literature (e.g., Rosa paper, FPTaylor paper) to facilitate comparison with other tools.
Key Insights and Ideas
- SDP for Roundoff Error: The paper demonstrates that SDP, a powerful optimization technique, can be effectively adapted to bound roundoff errors in complex nonlinear programs, offering a more precise alternative to traditional interval arithmetic.
- Sparse SDP for Scalability: By exploiting the "correlation sparsity pattern" of the problem, the authors enable the use of sparse SDP relaxations. This significantly improves scalability, allowing the analysis of larger and more complex programs than dense SDP methods.
- Formal Verification with Coq: The ability to generate SOS certificates that can be formally verified within the Coq proof assistant is a major contribution, providing a rigorous guarantee of the computed error bounds.
- Handling Diverse Program Types: The framework's extension to semialgebraic and transcendental functions, as well as conditional statements, makes it applicable to a wider range of real-world numerical computations.
- Decomposition Strategy: Separating the error into an affine component (bounded by SDP) and a remainder (bounded by interval arithmetic) is crucial for both accuracy and robustness against numerical issues in SDP solvers.
Key Results
- Tighter Bounds: Real2Float computes tighter upper bounds for roundoff errors in 23% of the tested programs compared to other tools.
- Improved Performance: The tool demonstrates better performance (faster execution) in 66% of the tested programs.
- Formal Guarantees: For polynomial programs, Real2Float can provide formal guarantees by checking SOS certificates within Coq, with formal verification times being competitive.
- Scalability: The use of sparse SDP relaxations allows the framework to handle problems that would be intractable for dense SDP methods.
- Comparison: In comparisons, Real2Float often achieves a good balance between accuracy and speed, outperforming competitors like Rosa and FPTaylor in specific scenarios, particularly for programs with polynomial preconditions.
Limitations and Future Work
- Limited Symbolic Manipulation: The current Real2Float tool has limitations in manipulating complex symbolic expressions, which led to an "Out Of Memory" error for one benchmark (jetEngine).
- Formal Verification Scope: The formal verification aspect is currently limited to polynomial programs. Extending this to semialgebraic and transcendental functions is a future goal.
- Conditional Statements: While handled, the current implementation for conditionals is not exhaustive and could be extended to more complex cases (e.g., "or" conditions).
- Iterative/While Loops: Programs with iterative or while loops are not currently supported.
- Future Directions: The authors suggest several avenues for future research:
- Exploiting SDP relaxations for programs involving sums of rational functions.
- Tackling symmetry patterns in program sub-classes.
- Extending to programs with finite or infinite conditional loops.
- Generating inductive invariants with SDP relaxations.
- Deriving sequences of lower roundoff error bounds with SDP-based certificates.
- Improving formal verification efficiency by leveraging existing Coq libraries for floating-point/interval arithmetic.
- Combining Real2Float with FPTaylor's strengths.
- Investigating theoretical aspects of SOS performance and complexity.
- Integrating with tools for automatic reordering of arithmetic expressions for FPGA optimization.
Summary updated