[Paper Review] Can machine learning identify interesting mathematics? An exploration using empirically observed laws
This paper investigates whether machine learning can identify mathematically interesting integer sequences by leveraging empirical laws—Benford’s law and Taylor’s law—as feature extractors. Using 40,000 OEIS sequences, it trains classifiers on derived statistical features and finds that models like extra trees and neural networks outperform baseline methods in predicting labels like 'nice', 'prime', and 'palindrome', suggesting empirical laws capture salient properties of mathematically significant sequences.
We explore the possibility of using machine learning to identify interesting mathematical structures by using certain quantities that serve as fingerprints. In particular, we extract features from integer sequences using two empirical laws: Benford's law and Taylor's law and experiment with various classifiers to identify whether a sequence is, for example, nice, important, multiplicative, easy to compute or related to primes or palindromes.
Motivation & Objective
- To explore whether machine learning can detect qualitative mathematical interest in integer sequences using only numerical features.
- To assess whether empirically observed laws like Benford’s and Taylor’s laws serve as effective, invariant features for classifying mathematical sequences.
- To evaluate the performance of various classifiers in predicting subjective or domain-specific labels (e.g., 'nice', 'core', 'prime') from sequence data.
- To determine if these empirical laws capture intrinsic properties of mathematically significant sequences.
- To investigate the potential of using statistical fingerprints derived from number distributions to distinguish interesting from uninteresting sequences.
Proposed method
- Extract 14 features per sequence using Benford’s law: leading digit frequencies and four statistical distances (KL divergence, KS statistic, Wasserstein, and total variation) between observed and expected Benford distributions.
- Apply Taylor’s law to compute the relationship between the mean and variance of sequence terms, fitting a power law to estimate parameters Ta and Tb.
- Use the Online Encyclopedia of Integer Sequences (OEIS) as a curated dataset of 40,000 sequences with at least 990 terms, each labeled with keywords such as 'nice', 'prime', 'palindrome', 'binomial', 'mult', 'core'.
- Train and compare three classifiers—neural network, random forest, and extra trees—on the 14-dimensional feature space to predict sequence labels.
- Evaluate performance using standard metrics: accuracy, precision, recall, and F1 score, with a random baseline classifier for comparison.
- Test generalization by checking if models predict correct labels for related sequences not in the training set (e.g., A059259 for A059260).
Experimental results
Research questions
- RQ1Can empirical laws like Benford’s and Taylor’s laws serve as effective, low-dimensional features to distinguish mathematically interesting sequences from random ones?
- RQ2Do machine learning classifiers trained on these features outperform random baselines in predicting subjective or mathematical labels such as 'nice' or 'prime'?
- RQ3To what extent can classifiers generalize to related sequences not explicitly in the training set, indicating learned pattern recognition?
- RQ4Why do certain labels like 'mult' (multiplicative) show significantly higher performance, and is this due to the mathematical definition or the feature representation?
- RQ5How do the performance metrics of different classifiers (neural network, random forest, extra trees) compare across diverse labels, especially those with low support?
Key findings
- The extra trees classifier achieved the highest overall performance, followed by random forest and neural network, all significantly outperforming the random baseline classifier.
- The neural network achieved perfect precision (no false positives) for the 'nice' label, indicating high confidence in true positives.
- The extra trees classifier achieved nontrivial precision and recall for the 'palindrome' label, while other models failed entirely, suggesting better sensitivity to this pattern.
- Performance for 'mult' (multiplicative) sequences was substantially higher across all models compared to baseline, indicating that empirical laws may capture structural properties of multiplicative sequences.
- The models successfully predicted 'binomial' and 'nice' labels for related sequences not in the training set, such as A059259 and A182009, demonstrating generalization beyond exact matches.
- Despite moderate overall scores, the results suggest that empirical laws encode meaningful, discriminative features of mathematically significant sequences, even with only 14 features.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.