Can Test-time Computation Mitigate Memorization Bias in Neural Symbolic Regression?
Shun Sato, Issei Sato
TL;DR
This paper investigates memorization bias as a core limitation of Transformer-based neural symbolic regression (NSR). Through controlled experiments and a theoretical analysis, it shows that Transformers tend to memorize training expressions and struggle to compose novel formulas that also accurately fit data. It then evaluates test-time strategies—large-beam decoding, TPSR, and NSR-gvs—that provide additional information at inference to mitigate bias, finding that such strategies can increase novelty but do not necessarily improve or may even harm numerical accuracy. The results illuminate a fundamental tension between generalization and memorization in NSR and motivate future work on robust, compositional symbolic regression methods. Overall, the findings offer a foundation for designing NSR approaches that balance bias reduction with numerical fidelity in scientific applications.
Abstract
Symbolic regression aims to discover mathematical equations that fit given numerical data. It has been applied in various fields of scientific research, such as producing human-readable expressions that explain physical phenomena. Recently, Neural symbolic regression (NSR) methods that involve Transformers pre-trained on large-scale synthetic datasets have gained attention. While these methods offer advantages such as short inference time, they suffer from low performance, particularly when the number of input variables is large. In this study, we hypothesized that this limitation stems from the memorization bias of Transformers in symbolic regression. We conducted a quantitative evaluation of this bias in Transformers using a synthetic dataset and found that Transformers rarely generate expressions not present in the training data. Additional theoretical analysis reveals that this bias arises from the Transformer's inability to construct expressions compositionally while verifying their numerical validity. We finally examined if tailoring test-time strategies can lead to reduced memorization bias and better performance. We empirically demonstrate that providing additional information to the model at test time can significantly mitigate memorization bias. On the other hand, we also find that reducing memorization bias does not necessarily correlate with improved performance. These findings contribute to a deeper understanding of the limitations of NSR approaches and offer a foundation for designing more robust, generalizable symbolic regression methods. Code is available at https://github.com/Shun-0922/Mem-Bias-NSR .
