Model Discovery with Grammatical Evolution. An Experiment with Prime Numbers
Jakub Skrzyński, Dominik Sepioło, Antoni Ligęza
TL;DR
This work investigates transparent model discovery using Grammatical Evolution (GE) guided by a context-free grammar to derive readable, explainable formulas from partial problem knowledge and limited data. The authors apply GE to approximate the function $\pi(x)$, the prime-counting function, using a PEG-based grammar implemented in PonyGE2 and a dataset of 1000 primes up to 7919. They report two runs: an initial, highly complex solution with nested operations and a second, simpler formula $f_2(x)$ that more closely resembles $\pi(x)$ and runs in about $143.7$ seconds. The study demonstrates that grammar design can effectively constrain the search space to yield interpretable expressions, while suggesting that larger search spaces and more data could further improve accuracy and robustness of the discovered models.
Abstract
Machine Learning produces efficient decision and prediction models based on input-output data only. Such models have the form of decision trees or neural nets and are far from transparent analytical models, based on mathematical formulas. Analytical model discovery requires additional knowledge and may be performed with Grammatical Evolution. Such models are transparent, concise, and have readable components and structure. This paper reports on a non-trivial experiment with generating such models.
