Skip to main content
QUICK REVIEW

[Paper Review] Can Neural Networks Learn Symbolic Rewriting?

Bartosz Piotrowski, Josef Urban|arXiv (Cornell University)|Nov 7, 2019
Natural Language Processing TechniquesComputer Science15 references13 citations
TL;DR

This paper investigates whether neural machine translation (NMT) models can learn symbolic rewriting by training on two datasets: one derived from automated theorem proving (AIM loops) and another synthetic polynomial normalization dataset. Despite limited model capacity and short training times, NMT models achieve surprisingly high accuracy—up to 67.7% on the best-performing default OpenNMT model—demonstrating that neural networks can learn complex symbolic rewriting rules, though generalization and data leakage remain critical concerns.

ABSTRACT

This work investigates if the current neural architectures are adequate for learning symbolic rewriting. Two kinds of data sets are proposed for this research -- one based on automated proofs and the other being a synthetic set of polynomial terms. The experiments with use of the current neural machine translation models are performed and its results are discussed. Ideas for extending this line of research are proposed, and its relevance is motivated.

Motivation & Objective

  • To investigate whether current neural architectures, particularly NMT models, can learn symbolic rewriting tasks.
  • To evaluate the performance of NMT models on two distinct symbolic rewriting datasets: one from automated theorem proving (AIM loops) and one synthetic polynomial normalization set.
  • To assess the generalization capability of neural models in symbolic rewriting, especially in light of potential data leakage due to constant and sign variations.
  • To identify limitations in existing evaluation practices and propose more rigorous analysis methods for symbolic machine learning.

Proposed method

  • Two datasets were constructed: one from paramodulation inferences in Prover9 proofs of AIM loop theorems, and another from randomly generated polynomial terms normalized to standard form.
  • The AIM dataset includes 20 separate rewriting rules (8 ground, 12 non-ground), with terms tokenized as linear sequences of symbols.
  • The polynomial dataset contains 300,000 examples per set, with varying numbers of variables and constants, filtered to avoid excessively long or complex terms.
  • Experiments used an LSTM-based NMT model with scaled Luong attention, trained on 60% of data, validated on 10%, and tested on 30%.
  • A default OpenNMT model with 500 units and beam search (width 10) was also evaluated, alongside a comparison with a larger Transformer model from prior work.
  • A data similarity analysis was performed by replacing constants with a 'CONST' token and comparing test examples to training sets to detect memorization or overlap.

Experimental results

Research questions

  • RQ1Can neural machine translation models learn symbolic rewriting rules from formal mathematical proofs?
  • RQ2How well do NMT models generalize to unseen symbolic expressions when the training data contains overlapping patterns due to constant variations?
  • RQ3To what extent does model performance depend on data structure and distribution, especially in synthetic symbolic domains like polynomial normalization?
  • RQ4Can simple neural models achieve high accuracy on symbolic rewriting tasks with minimal hyperparameter tuning and short training times?
  • RQ5What are the risks of data memorization in symbolic machine learning, and how can they be detected and mitigated?

Key findings

  • The default OpenNMT model achieved 67.7% accuracy on the BWD integration dataset, significantly outperforming the smaller NMT model (18.4%).
  • The Transformer model from Lample & Charton (2020) achieved near-perfect performance (99.6%) on the same BWD dataset, suggesting that model scale strongly influences results.
  • For the IBP dataset, 75% of test examples were similar to training examples when constants and signs were ignored, indicating potential data leakage and overfitting risks.
  • Performance dropped from 85.5% to 71.8% when increasing variables and constants from 2 to 3 in the polynomial dataset, suggesting sensitivity to input complexity.
  • The analysis revealed that up to 92% of test examples in the most complex polynomial dataset were unique modulo constants, indicating strong generalization demands.
  • Despite short training times (1–2 hours), the models achieved surprisingly high performance, suggesting that neural networks can learn symbolic rewriting even with limited resources.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.