Three years ago, I started working on an easy-to-use tool for interpretable machine learning in…
@MilesCranmer17.748 Follower
240.524 Aufrufe
30 Kommentare
Kommentare aus dem Originalbeitrag auf X (Twitter)

@MilesCranmer
Symbolic Regression (SR) is a supervised learning task where the space of potential models is spanned by analytic expressions. Often, the goal is to find simple yet accurate expressions that lend themselves to interpretation🔍. 2.
39 Likes

@MilesCranmer
Throughout history, scientists have performed SR "manually," using a mix of intuition and trial-and-error. Empirically-discovered expressions can lead to new theory developments (e.g., Kepler’s law=>Newton's gravity; Planck’s law=>Quantum). 3.
31 Likes

@MilesCranmer
But, with much of ML used in science relying on blackbox models, I worry we often miss out on this crucial step of *understanding* the world. After all, that is the ultimate goal of science! The Latin word scientia literally means “to know.” 4.
42 Likes

@MilesCranmer
To understand a concept, you need to first represent it in your language (however abstract that language is). I think SR is attractive since it grounds ML models in the language of science: symbolic expressions! Just look at any physics cheat sheet: 5.
39 Likes

@MilesCranmer
That isn’t to argue that we avoid deep learning; one can actually use SR as a distillation tool for such blackbox models! 6.
33 Likes

@MilesCranmer
However, when I started my thesis, available SR codes were either: - Easy to use but slow ⏳ - Fast but hard to use 🤔 The only fast and easy-to-use tool was Eureqa, a proprietary and closed-source tool, which meant no customization or embedding into an analysis pipeline. 7.
19 Likes

@MilesCranmer
Enter PySR: fast, easy-to-use, and open-source🎉. Today, PySR has even more features than proprietary alternatives! 8.
45 Likes

@MilesCranmer
A driver of deep learning's accelerated innovation is the strong open-source tooling – we need similar tooling for SR too. This is also why I have also split up the evaluation code of SymbolicRegression.jl into a separate library: DynamicExpressions.jl. 9.
24 Likes

@MilesCranmer
This package makes it easy for others to create new symbolic regression libraries with new ideas, built on a strong foundation of highly optimized kernels used in PySR. Here’s a deep learning analogy: 10.
28 Likes

@MilesCranmer
Okay, so how does PySR work? It’s a fairly traditional approach: a multi-population evolutionary algorithm. Expressions are represented as binary trees, and evolve via a series of mutations and crossovers applied to the “fittest” members of each subpopulation: 11.
25 Likes

@MilesCranmer
But there are many other tricks: BFGS for constant optimization, algebraic simplification, simulated annealing, age-regularized tournament selection, and an adaptive complexity penalty. It’s a bit too much to describe precisely here, so please see the paper if curious 🙂 12.
23 Likes

@MilesCranmer
PySR also works seamlessly across 1000s of cores. Each population evolves independently, and will asynchronously "migrate" between these independent populations to share updates. 13.
22 Likes

@MilesCranmer
A motif in PySR's design is flexibility – while also being extremely high-performance. PySR ought to be a tool that can solve model discovery problems all throughout science, without needing hacks. Here's a comparison: (includes links so you can check these others out!) 14.
20 Likes

@MilesCranmer
In the paper, I demo a benchmark based on historical discoveries, and see whether codes can re-discover these with little prior information. Where possible, I include original datasets! (for Leavitt’s law I had to manually read off data from a 1912 plot…) 15.
22 Likes

@MilesCranmer
To really emulate the problem of discovering an unknown model, I use the same hyperparameters as each author submitted to the SRBench competition (as well as PySR), and let every code search for 1 hour on 8 cores. The rediscovery results (scored: yes/no) - 16.
17 Likes

@MilesCranmer
All methods seem to struggle with Planck’s law and Rydberg formula, likely due to the unusual scaling. Pure deep learning methods (EQL + SR-Transformer) seem to have difficulty on a range of problems. 17.
15 Likes

@MilesCranmer
We can see EQL experiencing numerical instabilities, and SR Transformer (pre-trained on synthetic expressions in various levels of noise) seems to generate overly complex expressions in every test. 18.
13 Likes

@MilesCranmer
While it is important to note some of these are tuned for accuracy alone, it is very interesting that pure deep learning methods still really struggle here. Perhaps it is a testament to the difficulty of learning representations in the space of symbolic expressions. 19.
14 Likes

@MilesCranmer
Regardless of this, DL methods still perform well on synthetic benchmarks, which is what they are tuned for, so I see hybrid approaches as very much worth pursuing! 20.
10 Likes

@MilesCranmer
Today, PySR has a growing community across academia and industry, with users working in a variety of fields from economics to astronomy. I am looking forward to seeing it continue to grow! I would like to thank: 21.
10 Likes