Precision-Aware Automated Discovery of Numerical Function Approximations via Landscape-Adaptive Search and LLM Agents
Toghrul Abbasov ⋅ Limeng ZHANG ⋅ Zhihang Lin ⋅ Zhenyang Xiao ⋅ Xiaoxiao Tu ⋅ Zirong Zeng ⋅ Wentao Lin ⋅ Zheng Lingchao ⋅ Li Jun ⋅ Yuwei Fan ⋅ Tian Ding ⋅ Congliang Chen ⋅ Ruoyu Sun
Abstract
Elementary-function approximations are core components of numerical software, yet their design remains a manual, per-function, per-precision exercise. Reduced precision makes this substantially harder: designs that are accurate in real arithmetic can suffer catastrophic cancellation, intermediate overflow, or silent saturation when evaluated natively at the deployment precision. AutoNumerics-Zero recast this design step as evolutionary search over computation graphs, but its CMA-ES-based inner constant solver can discard good graph structures after poor constant optimization, and its outer workflow still requires manual decisions about interval partitioning and per-piece strategy selection. We address both limitations with a precision-aware, three-level pipeline: an outer language-model agent for partitioning, strategy selection, verification, and retry; a middle AutoNumerics-Zero-inspired evolutionary search over short arithmetic DAGs; and an inner fitter that combines Levenberg--Marquardt with Nelder--Mead on the requested rounded-arithmetic metric. On identical AutoNumerics-Zero $2^x$ candidates, the inner loop matches or improves published optima while avoiding large CMA-ES failures. End-to-end tanh experiments against same-precision OpenLibm-style baselines show that the full pipeline improves native-precision kernels: in fp16 tanh, it reduces max ULP from $287$ to $2$ on a dense validation grid.
Chat is not available.
Successful Page Load