Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
144 tokens/sec
GPT-4o
7 tokens/sec
Gemini 2.5 Pro Pro
46 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

AutoNumerics-Zero: Automated Discovery of State-of-the-Art Mathematical Functions (2312.08472v1)

Published 13 Dec 2023 in cs.NE, cs.LG, cs.NA, and math.NA

Abstract: Computers calculate transcendental functions by approximating them through the composition of a few limited-precision instructions. For example, an exponential can be calculated with a Taylor series. These approximation methods were developed over the centuries by mathematicians, who emphasized the attainability of arbitrary precision. Computers, however, operate on few limited precision types, such as the popular float32. In this study, we show that when aiming for limited precision, existing approximation methods can be outperformed by programs automatically discovered from scratch by a simple evolutionary algorithm. In particular, over real numbers, our method can approximate the exponential function reaching orders of magnitude more precision for a given number of operations when compared to previous approaches. More practically, over float32 numbers and constrained to less than 1 ULP of error, the same method attains a speedup over baselines by generating code that triggers better XLA/LLVM compilation paths. In other words, in both cases, evolution searched a vast space of possible programs, without knowledge of mathematics, to discover previously unknown optimized approximations to high precision, for the first time. We also give evidence that these results extend beyond the exponential. The ubiquity of transcendental functions suggests that our method has the potential to reduce the cost of scientific computing applications.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (69)
  1. The XLA Authors. Openxla/xla. URL https://github.com/openxla/xla/blob/7a7cee6e31a01d0103c41b753c7e7fe6e0eeece8/xla/service/cpu/parallel_task_assignment.cc#L77 , 2023.
  2. The XLA Authors. Openxla/xla. URL https://github.com/openxla/xla/blob/7a7cee6e31a01d0103c41b753c7e7fe6e0eeece8/xla/service/cpu/cpu_instruction_fusion.cc#L71 , 2023.
  3. Automatic generation of peephole superoptimizers. ACM SIGARCH Computer Architecture News, 2006.
  4. Some considerations on the reason for bloat. Genetic Programming and Evolvable Machines, 2002.
  5. Genetic programming: an introduction: on the automatic evolution of computer programs and its applications. Morgan Kaufmann Publishers Inc., 1998.
  6. Advanced mathematical methods for scientists and engineers I: Asymptotic methods and perturbation theory. Springer Science & Business Media, 1999.
  7. Neural symbolic regression that scales. In ICML, 2021.
  8. Efficient polynomial l-approximations. In ARITH, 2007.
  9. Discovering governing equations from data by sparse identification of nonlinear dynamical systems. PNAS, 2016.
  10. Symbolic discovery of optimization algorithms. arXiv, 2023.
  11. Sollya: An environment for the development of numerical codes. In Mathematical Software - ICMS 2010. Springer, 2010.
  12. A fast and elitist multiobjective genetic algorithm: Nsga-ii. IEEE transactions on evolutionary computation, 2002.
  13. Leonhard Euler. Introductio in analysin infinitorum, volume 2. Apud Marcum-Michaelem Bousquet & Socios, 1748.
  14. Discovering faster matrix multiplication algorithms with reinforcement learning. Nature, 2022.
  15. Intelligent decision making through a simulation of evolution. Behavioral science, 1966.
  16. Compiling machine learning programs via high-level tracing. Systems for Machine Learning, 2018.
  17. Carl Friedrich Gauss. Disquisitiones generales circa seriem infinitam. 1813.
  18. A comparative analysis of selection schemes used in genetic algorithms. FOGA, 1991.
  19. Completely derandomized self-adaptation in evolution strategies. Evolutionary computation, 2001.
  20. John H Holland. Adaptation in natural and artificial systems. MIT press, 1992.
  21. Automated machine learning: methods, systems, challenges. Springer Nature, 2019.
  22. Wolfram Research, Inc. Mathematica, Version 12.0.0.0. Champaign, IL, 2023.
  23. Denali: A goal-directed superoptimizer. ACM SIGPLAN Notices, 2002.
  24. Discovering adaptable symbolic algorithms from scratch. IROS, 2023.
  25. Parameter identification for symbolic regression using nonlinear least squares. Genetic Programming and Evolvable Machines, 2020.
  26. Effects of constant optimization by nonlinear least squares minimization in symbolic regression. In GECCO, 2013.
  27. Genetic programming: on the programming of computers by means of natural selection. MIT press, 1992.
  28. Grammar variational autoencoder. In ICML, 2017.
  29. Automatic identification of wind turbine models using evolutionary multiobjective optimization. Renewable Energy, 2016.
  30. Contemporary symbolic regression methods and their relative performance. arXiv, 2021.
  31. Darts: Differentiable architecture search. ICLR, 2019.
  32. Pde-net: Learning pdes from data. In ICML, 2018.
  33. Cma-es for hyperparameter optimization of deep neural networks. arXiv, 2016.
  34. A comparison of bloat control methods for genetic programming. Evolutionary computation, 2006.
  35. Nathaniel Macon. On the computation of exponential and hyperbolic functions using continued fractions. Journal of the ACM (JACM), 2(4):262–266, 1955.
  36. Faster sorting algorithms discovered using deep reinforcement learning. Nature, 2023.
  37. Jordan Ninin. Global optimization based on contractor programming: An overview of the ibex library. In Mathematical Aspects of Computer and Information Sciences: 6th International Conference, MACIS 2015, Berlin, Germany, November 11-13, 2015, Revised Selected Papers 6, pages 555–559. Springer, 2016.
  38. Where are we now? a large benchmark study of recent symbolic regression methods. In GECCO, 2018.
  39. Alexander M Ostrowski. On two problems in abstract algebra connected with horner’s rule. In Studies in Mathematics and Mechanics presented to Richard von Mises. Academic Press San Diego, 1954.
  40. V Ya Pan. Methods of computing values of polynomials. Russian Mathematical Surveys, 1966.
  41. Deep symbolic regression: Recovering mathematical expressions from data via risk-seeking policy gradients. arXiv, 2019.
  42. Efficient neural architecture search via parameter sharing. ICML, 2018.
  43. Regularized evolution for image classifier architecture search. AAAI, 2019.
  44. Automl-zero: Evolving machine learning algorithms from scratch. In ICML, 2020.
  45. E Ya Remez. Foundations of numerical methods of chebyshev approximation. Kiev, Naukova dumka, 1969.
  46. Data-driven discovery of partial differential equations. Science advances, 2017.
  47. Amit Sabne. Xla: Compiling machine learning for peak performance. 2020.
  48. Learning equations for extrapolation and control. In ICML, 2018.
  49. Hayden Schaeffer. Learning partial differential equations via data discovery and sparse optimization. Proceedings of the Royal Society A, 2017.
  50. Stochastic superoptimization. ACM SIGARCH Computer Architecture News, 2013.
  51. Stochastic optimization of floating-point programs with tunable precision. ACM SIGPLAN Notices, 2014.
  52. Distilling free-form natural laws from experimental data. Science, 2009.
  53. Neil JA Sloane et al. The on-line encyclopedia of integer sequences, 2003.
  54. Pareto-front exploitation in symbolic regression. 2005.
  55. Advances in genetic programming: volume 3. MIT Press, 1999.
  56. Modeling global temperature changes with genetic programming. Computers & Mathematics with Applications, 2012.
  57. Vasp hits the memory wall: Processors efficiency comparison. Concurrency and Computation: Practice and Experience, 31(19):e5136, 2019.
  58. Richard Sutton. The bitter lesson. Incomplete Ideas (blog), 2019.
  59. P Tchébychev. Sur les questions de minima qui se rattechent a la raprésentation aproximative des fonctions. Imprimerie de l’Academie Impériale des Sciences, 1858.
  60. The XLA team. Xla - tensorflow, compiled, 2017. [Online; accessed 13-December-2023].
  61. Mujoco: A physics engine for model-based control. In IROS, 2012.
  62. Warwick Tucker. Validated numerics: a short introduction to rigorous computations. Princeton University Press, 2011.
  63. Ai feynman: A physics-inspired method for symbolic regression. Science Advances, 2020.
  64. Semantically-based crossover in genetic programming: application to real-valued symbolic regression. Genetic Programming and Evolvable Machines, 2011.
  65. Arthur F Voter. Introduction to the kinetic monte carlo method. In Radiation effects in solids. Springer, 2007.
  66. Symbolic regression in materials science. MRS Communications, 2019.
  67. Wikipedia contributors. Unit in the last place — Wikipedia, the free encyclopedia, 2023. [Online; accessed 26-July-2023].
  68. Spea2: Improving the strength pareto evolutionary algorithm. 2001.
  69. Ieee standard for floating-point arithmetic. IEEE Std, 754, 2008.

Summary

  • The paper's main contribution is the development of AutoNumerics-Zero, which evolves highly precise and efficient approximations of transcendental functions using an evolutionary algorithm.
  • It employs symbolic regression and CMA-ES optimization to fine-tune floating-point computations, significantly outperforming traditional methods in both precision and speed.
  • The approach reduces computational costs and demonstrates potential for general application, extending beyond the exponential function to other mathematical operations.

Overview

In the field of computational science, evaluating transcendental functions with high precision and efficiency is crucial. This paper introduces a method that automates the discovery of optimized mathematical function approximations. Through an evolutionary algorithm known as AutoNumerics-Zero, the paper demonstrates the ability to outperform classical methods developed by mathematicians in approximating transcendental functions, particularly focusing on the exponential function.

Evolutionary Approach to Function Approximation

The core idea is to utilize a simple evolutionary algorithm to derive programs that approximate functions with a predefined precision in both real-number and floating-point (float32) computations. The evolutionary algorithm begins with no prior mathematical knowledge and evolves from scratch, using basic computational operations permissible on contemporary hardware. This process contrasts starkly with traditional mathematical methods that require deep theoretical insights and aim for high precision using advanced theory.

AutoNumerics-Zero Algorithm

AutoNumerics-Zero harnesses symbolic regression, starting from a blank state, to optimize programs in terms of precision and computational efficiency, such as operation count and execution speed. Unlike traditional approaches, this technique does not just evolve the program structure symbolically but also fine-tunes the floating-point coefficients using Covariance Matrix Adaptation Evolution Strategy (CMA-ES), a strategy that avoids assuming differentiable real-valued arithmetic which is untrue for float32 numbers.

Results and Contributions

The paper's key results showcase that evolving programmatic approximations can achieve far greater precision in mathematical calculations on both real numbers and for float32 computations. For the exponential function, which is a well-studied mathematical operation, the evolutionary search managed to discover programs that were significantly more precise and, in practical float32 computations, also considerably faster than any known baseline method. The remarkable efficiencies obtained are attributed to the generation of code that takes advantage of compiler and hardware characteristics imperceptible to conventional mathematical techniques.

Implications

The ability of AutoNumerics-Zero to outperform existing methods in approximating transcendental functions, and its success in handling both precision and speed, highlights a significant potential for reducing the computational costs in scientific applications. Additionally, while this paper primarily focused on the exponential function, preliminary evidence suggests the method's effectiveness may extend to other functions as well, indicating a wide range of applicability for the proposed algorithm.