arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2501.14951cs.LGcs.CLcs.SC
收藏

E-Gen:利用E-Graph改进符号表达式的连续表示

E-Gen: Leveraging E-Graphs to Improve Continuous Representations of Symbolic Expressions

University of Illinois at Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校)

Hongbo Zheng, Suyuan Wang, Neeraj Gangwar, Nickvash Kani

AI总结:

本文提出E-Gen,一种基于e-graph的大规模数学表达式数据集生成方案,并利用等价生成与对比学习训练嵌入模型,在多个数学语言处理任务上超越先前方法和大语言模型。

摘要:

向量表示在推动自然语言处理(NLP)发展中发挥了关键作用,先前的研究侧重于利用数学等价形式对数学表达式进行嵌入。虽然这些方法有效,但受限于训练数据的规模和多样性。在本工作中,我们通过引入E-Gen来解决这些局限性。E-Gen是一种新颖的基于e-graph的数据集生成方案,能够合成大规模且多样化的数学表达式数据集,在规模和运算符种类上超越了先前方法。利用该数据集,我们采用两种策略训练嵌入模型:(1)生成数学等价表达式,以及(2)通过对比学习显式地将等价表达式分组。我们在分布内和分布外的数学语言处理任务上评估这些嵌入,并将其与先前方法进行比较。最后,我们证明了基于嵌入的方法在若干任务上优于最先进的大语言模型(LLMs),强调了针对数学数据模态优化嵌入方法的必要性。源代码和数据集可在https://github.com/MLPgroup/E-Gen获取。

英文摘要:

Vector representations have been pivotal in advancing natural language processing (NLP), with prior research focusing on embedding techniques for mathematical expressions using mathematically equivalent formulations. While effective, these approaches are constrained by the size and diversity of training data. In this work, we address these limitations by introducing E-Gen, a novel e-graph-based dataset generation scheme that synthesizes large and diverse mathematical expression datasets, surpassing prior methods in size and operator variety. Leveraging this dataset, we train embedding models using two strategies: (1) generating mathematically equivalent expressions, and (2) contrastive learning to explicitly group equivalent expressions. We evaluate these embeddings on both in-distribution and out-of-distribution mathematical language processing tasks, comparing them against prior methods. Finally, we demonstrate that our embedding-based approach outperforms state-of-the-art large language models (LLMs) on several tasks, underscoring the necessity of optimizing embedding methods for the mathematical data modality. The source code and datasets are available at https://github.com/MLPgroup/E-Gen.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑