Navigation überspringen
Three years ago, I started working on an easy-to-use tool for interpretable machine learning in…
0:00 / 1:33

Three years ago, I started working on an easy-to-use tool for interpretable machine learning in…

Miles Cranmer

@MilesCranmer17.748 Follower

Auf X besuchen
1.704 LikesHerunterladenOriginalbeitrag

240.524 Aufrufe

Three years ago, I started working on an easy-to-use tool for interpretable machine learning in science. I wanted it to do for symbolic regression what Theano did for deep learning. Today, I am beyond excited to share with you the paper describing it! 1.

30 Kommentare

Kommentare aus dem Originalbeitrag auf X (Twitter)

  • Profilbild von Miles Cranmer

    @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

  • Profilbild von Miles Cranmer

    @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

  • Profilbild von Miles Cranmer

    @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

  • Profilbild von Miles Cranmer

    @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

  • Profilbild von Miles Cranmer

    @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

  • Profilbild von Miles Cranmer

    @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

  • Profilbild von Miles Cranmer

    @MilesCranmer

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

    45 Likes

  • Profilbild von Miles Cranmer

    @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

  • Profilbild von Miles Cranmer

    @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

  • Profilbild von Miles Cranmer

    @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

  • Profilbild von Miles Cranmer

    @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

  • Profilbild von Miles Cranmer

    @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

  • Profilbild von Miles Cranmer

    @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

  • Profilbild von Miles Cranmer

    @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

  • Profilbild von Miles Cranmer

    @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

  • Profilbild von Miles Cranmer

    @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

  • Profilbild von Miles Cranmer

    @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

  • Profilbild von Miles Cranmer

    @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

  • Profilbild von Miles Cranmer

    @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

  • Profilbild von Miles Cranmer

    @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