<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>Corresponding author.
$ jannis.brugger@tu-darmstadt.de (J. Brugger)</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Residuals for Equation Discovery</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Jannis Brugger</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff4">4</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Viktor Pfanschilling</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff4">4</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mira Mezini</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
          <xref ref-type="aff" rid="aff4">4</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Stefan Kramer</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>German Research Center for Artificial Intelligence</institution>
          ,
          <addr-line>67663 Kaiserslautern</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Hessian Center for Artificial Intelligence (hessian.AI)</institution>
          ,
          <addr-line>64293 Darmstadt</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Johannes Gutenberg-Universität Mainz</institution>
          ,
          <addr-line>55128 Mainz</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>National Research Center for Applied Cybersecurity ATHENE</institution>
          ,
          <addr-line>64293 Darmstadt</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff4">
          <label>4</label>
          <institution>Technical University of Darmstadt</institution>
          ,
          <addr-line>64289 Darmstadt</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2024</year>
      </pub-date>
      <volume>000</volume>
      <fpage>0</fpage>
      <lpage>0002</lpage>
      <abstract>
        <p>Residuals for equation discovery (RED) is a simple, universal, yet efective way to improve pre-trained equation discovery systems by disentangling the original problem into simpler problems. Based on an initial equation, we compute for a subequation the residual that this subequation should have yielded so that the entire formula predicts the output correctly. By parsing the initial equation to a syntax tree, we can use node-based calculation rules to compute the residual for each subequation of the initial equation. Using this residual as new target values, the equation discovery system predicts a new subequation, which can be merged with the initial equation. We show the advantage of using residuals for equations from the Feynman benchmark.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;AI for Science</kwd>
        <kwd>Equation Discovery</kwd>
        <kwd>Decomposition</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>We calculate the residuals by representing the equation as a syntax tree. The root is a  node connected
to a child node. This child node can be an operator node with child nodes or a leaf node. Leaf nodes are
constants or variables, and if they are called they return the corresponding value or the column from
the data set. For an operator node, the mathematical operation it performs depends on which adjacent
node is calling. An overview of the operator nodes is in Figure 1 II.</p>
      <p>To evaluate the residual for a node, the node calls its parent node. Operators that are not bijective
(e.g., ) cannot be inverted. Thus, for their child nodes, the residual cannot be computed.</p>
      <p>
        We use NeSymReS [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] to test RED on the Feynman equations as reported in SRBench [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. We only
examine equations with a maximum of two independent variables. We first run NeSymReS on the
problem once; if the mean squared error (MSE) of the equation is &gt; 0.001, the predicted equation is parsed
to a syntax tree, and for each node except the  node and its child node, an alternative subequation
is predicted with RED. Subsequently, we rerun the NeSymReS as many times again on the original
problem as we calculated residuals. In Figure 1 III, the best results are reported for the Classic method
with a median value of 0.89 (IQR 0.06-9.21) and RED with a median value of 0.003 (IQR 0.001 - 0.08).
      </p>
      <p>While RED is independent of the functionality of the pre-trained equation discovery system, it
depends on an initial solution, which has to enable the disentanglement. In future work, we want to
analyze this constraint and perform experiments comparing multiple equation discovery systems, data
set dimensionalities, and noise levels.</p>
    </sec>
    <sec id="sec-2">
      <title>Acknowledgments</title>
      <p>This research project was partly funded by the Hessian Ministry of Higher Education, Research, Science
and the Arts (HMWK) within the projects The Third Wave of Artificial Intelligence (3AI) and hessian.AI</p>
    </sec>
    <sec id="sec-3">
      <title>Declaration on Generative AI</title>
      <p>The author(s) have not employed any Generative AI tools.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>S.-M.</given-names>
            <surname>Udrescu</surname>
          </string-name>
          , M. Tegmark, AI Feynman:
          <article-title>A physics-inspired method for symbolic regression</article-title>
          ,
          <source>Sci. Adv</source>
          .
          <volume>6</volume>
          (
          <year>2020</year>
          )
          <article-title>eaay2631</article-title>
          . doi:
          <volume>10</volume>
          .1126/sciadv.aay2631.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>W. G. L.</given-names>
            <surname>Cava</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Orzechowski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Burlacu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>O. de França</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Virgolin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Jin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Kommenda</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. H.</given-names>
            <surname>Moore</surname>
          </string-name>
          ,
          <article-title>Contemporary symbolic regression methods and their relative performance</article-title>
          , in: J.
          <string-name>
            <surname>Vanschoren</surname>
          </string-name>
          , S. Yeung (Eds.),
          <source>Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks</source>
          <volume>1</volume>
          ,
          <string-name>
            <given-names>NeurIPS</given-names>
            <surname>Datasets</surname>
          </string-name>
          and
          <source>Benchmarks</source>
          <year>2021</year>
          ,
          <year>December 2021</year>
          , virtual,
          <year>2021</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>L.</given-names>
            <surname>Biggio</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Bendinelli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Neitz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Lucchi</surname>
          </string-name>
          , G. Parascandolo,
          <article-title>Neural symbolic regression that scales</article-title>
          , in: M.
          <string-name>
            <surname>Meila</surname>
          </string-name>
          , T. Zhang (Eds.),
          <source>Proceedings of the 38th International Conference on Machine Learning</source>
          ,
          <string-name>
            <surname>ICML</surname>
          </string-name>
          <year>2021</year>
          ,
          <volume>18</volume>
          -
          <issue>24</issue>
          <year>July 2021</year>
          ,
          <string-name>
            <given-names>Virtual</given-names>
            <surname>Event</surname>
          </string-name>
          , volume
          <volume>139</volume>
          <source>of Proceedings of Machine Learning Research, PMLR</source>
          ,
          <year>2021</year>
          , pp.
          <fpage>936</fpage>
          -
          <lpage>945</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>P.</given-names>
            <surname>Kamienny</surname>
          </string-name>
          , S. d'Ascoli,
          <string-name>
            <given-names>G.</given-names>
            <surname>Lample</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Charton</surname>
          </string-name>
          ,
          <article-title>End-to-end symbolic regression with transformers</article-title>
          , in: S. Koyejo,
          <string-name>
            <given-names>S.</given-names>
            <surname>Mohamed</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Agarwal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Belgrave</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Cho</surname>
          </string-name>
          ,
          <string-name>
            <surname>A</surname>
          </string-name>
          . Oh (Eds.),
          <source>Advances in Neural Information Processing Systems 35: Annual Conference on Neural Information Processing Systems</source>
          <year>2022</year>
          , NeurIPS
          <year>2022</year>
          , New Orleans, LA, USA, November 28 - December 9,
          <year>2022</year>
          ,
          <year>2022</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>P.</given-names>
            <surname>Kamienny</surname>
          </string-name>
          , G. Lample,
          <string-name>
            <given-names>S.</given-names>
            <surname>Lamprier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Virgolin</surname>
          </string-name>
          ,
          <article-title>Deep generative symbolic regression with montecarlo-tree-search</article-title>
          , in: A.
          <string-name>
            <surname>Krause</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          <string-name>
            <surname>Brunskill</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          <string-name>
            <surname>Cho</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Engelhardt</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Sabato</surname>
          </string-name>
          , J. Scarlett (Eds.),
          <source>International Conference on Machine Learning</source>
          ,
          <string-name>
            <surname>ICML</surname>
          </string-name>
          <year>2023</year>
          ,
          <volume>23</volume>
          -
          <issue>29</issue>
          <year>July 2023</year>
          , Honolulu, Hawaii, USA, volume
          <volume>202</volume>
          <source>of Proceedings of Machine Learning Research, PMLR</source>
          ,
          <year>2023</year>
          , pp.
          <fpage>15655</fpage>
          -
          <lpage>15668</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>P.</given-names>
            <surname>Shojaee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Meidani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. B.</given-names>
            <surname>Farimani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C. K.</given-names>
            <surname>Reddy</surname>
          </string-name>
          ,
          <article-title>Transformer-based planning for symbolic regression</article-title>
          , in: A.
          <string-name>
            <surname>Oh</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          <string-name>
            <surname>Naumann</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Globerson</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          <string-name>
            <surname>Saenko</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Hardt</surname>
          </string-name>
          , S. Levine (Eds.),
          <source>Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems</source>
          <year>2023</year>
          , NeurIPS
          <year>2023</year>
          , New Orleans, LA, USA, December
          <volume>10</volume>
          -
          <issue>16</issue>
          ,
          <year>2023</year>
          ,
          <year>2023</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>M.</given-names>
            <surname>Valipour</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>You</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Panju</surname>
          </string-name>
          ,
          <string-name>
            <surname>A</surname>
          </string-name>
          . Ghodsi,
          <article-title>SymbolicGPT: A Generative Transformer Model for Symbolic Regression</article-title>
          ,
          <year>2021</year>
          . doi:
          <volume>10</volume>
          .48550/arXiv.2106.14131, arXiv:
          <fpage>2106</fpage>
          .14131 [cs] version:
          <fpage>1</fpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>