Enhancing Transformer Representations of Symbolic ODE Expressions

Xiyue Fan, Adam Prugel-Bennett, Stuart E. Middleton
9/21/2026
cs.LGcs.AI

No confident code implementation found for this paper.

Abstract

Existing approaches to solving differential equations, such as symbolic regression, physics informed neural networks, and neural operators, typically focus on numerical approximations or blind symbolic search via fitting to numerical data. Less attention has been paid to learning structured representations of mathematical expressions that preserve commutative properties and could support mathematical reasoning in symbolic forms. Transformer models have shown strong capabilities in solving symbolic differential equations. However, standard positional embeddings in transformers are designed for sequence data. Symbolic differential equations are naturally represented by expression trees, so these positional embeddings may not efficiently capture their hierarchical structures. We investigate existing tree positional embeddings in symbolic ordinary differential equation (ODE) tasks. We systematically study their effectiveness under different settings. Our results show that tree positional embeddings aid learning in early epochs and continue to improve performance throughout, ultimately yielding consistent advantages across various data sizes and tasks. Based on learned structural representations, we apply contrastive learning to support the commutative property in mathematics. Ablation studies provide insight into how these methods interact in modelling symbolic mathematical structures.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{fan2026enhancing,
  title  = {Enhancing Transformer Representations of Symbolic ODE Expressions},
  author = {Xiyue Fan and Adam Prugel-Bennett and Stuart E. Middleton},
  year   = {2026},
  eprint = {2609.24746},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.24746v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2609.24746.svg)](https://codeofpaper.com/paper/2609.24746)

Discussion