Tree-Based Representation and Generation of Natural and Mathematical Language

02/15/2023
by   Alexander Scarlatos, et al.
0

Mathematical language in scientific communications and educational scenarios is important yet relatively understudied compared to natural languages. Recent works on mathematical language focus either on representing stand-alone mathematical expressions, especially in their natural tree format, or mathematical reasoning in pre-trained natural language models. Existing works on jointly modeling and generating natural and mathematical languages simply treat mathematical expressions as text, without accounting for the rigid structural properties of mathematical expressions. In this paper, we propose a series of modifications to existing language models to jointly represent and generate text and math: representing mathematical expressions as sequences of node tokens in their operator tree format, using math symbol and tree position embeddings to preserve the semantic and structural properties of mathematical expressions, and using a constrained decoding method to generate mathematically valid expressions. We ground our modifications in GPT-2, resulting in a model MathGPT, and demonstrate that it outperforms baselines on mathematical expression generation tasks.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
05/29/2018

Structural Isomprphism in Mathematical Expressions: A Simple Coding Scheme

While there exist many methods in machine learning for comparison of let...
research
10/08/2022

Semantic Representations of Mathematical Expressions in a Continuous Vector Space

Mathematical notation makes up a large portion of STEM literature, yet, ...
research
08/08/2023

InfeRE: Step-by-Step Regex Generation via Chain of Inference

Automatically generating regular expressions (abbrev. regexes) from natu...
research
04/30/2020

Natural Language Premise Selection: Finding Supporting Statements for Mathematical Text

Mathematical text is written using a combination of words and mathematic...
research
02/16/2021

Compilation of mathematical expressions in Kotlin

Interpreting mathematical expressions at runtime is a standard task in s...
research
09/09/2021

Math Word Problem Generation with Mathematical Consistency and Problem Context Constraints

We study the problem of generating arithmetic math word problems (MWPs) ...
research
02/26/2023

Navigating the Grey Area: Expressions of Overconfidence and Uncertainty in Language Models

Despite increasingly fluent, relevant, and coherent language generation,...

Please sign up or login with your details

Forgot password? Click here to reset