arXiv:2504.09763cs.CLcs.AI2025-04被引 3

用AI自动生成高级数学题的可执行抽象程序,让模型学会举一反三。

Executable Functional Abstractions: Inferring Generative Programs for Advanced Math Problems

  • 将数学题抽象为可执行程序,通过测试反馈优化生成
  • 在竞赛级数学题上成功生成忠实且可变的题目变体
  • 适合用于模型训练、难题筛选与数据生成

科学家常从具体问题中归纳出抽象规则,并用其生成新问题。我们提出可执行功能抽象(EFA)来表示这类数学问题的程序化规则,其输出随参数变化而不同。现有方法仅适用于小学数学,高级数学仍需人工设计。本文提出EFAGen,将自动推导高级数学题的EFA视为程序合成任务:首先将有效EFA的性质形式化为可执行单元测试,利用测试执行反馈,从大语言模型生成的候选程序中搜索符合原始问题与解法类别的程序,并以测试结果作为奖励信号训练模型提升生成能力。实验表明,EFAGen能生成与种子题一致、可学习的题目变体,覆盖多种竞赛级数学题源,并可用于发现难易变体与数据生成。

原文摘要 · Abstract (English)

Scientists often infer abstract procedures from specific instances of problems and use the abstractions to generate new, related instances. For example, programs encoding the formal rules and properties of a system have been useful in fields ranging from reinforcement learning (procedural environments) to physics (simulation engines). These programs can be seen as functions which execute to different outputs based on their parameterizations (e.g., gridworld configuration or initial physical conditions). We introduce the term EFA (Executable Functional Abstraction) to denote such programs for math problems. EFA-like constructs have been shown to be useful for mathematical reasoning as problem generators for stress-testing models. However, prior work has been limited to automatically constructing abstractions for grade-school math (whose simple rules are easy to encode in programs), while generating EFAs for advanced math has thus far required human engineering. We explore the automatic construction of EFAs for advanced mathematics problems by developing EFAGen, which operationalizes the task of automatically inferring an EFA for a given seed problem and solution as a program synthesis task. We first formalize the properties of any valid EFA as executable unit tests. Using execution feedback from the unit tests, we search over candidate programs sampled from a LLM to find EFA programs that are faithful to the generalized problem and solution class underlying the seed problem. We then apply the tests as a reward signal, training LLMs to become better writers of EFAs. We show that EFAs inferred by EFAGen are faithful to the seed problems, produce learnable problem variations, and that EFAGen can infer EFAs across diverse sources of competition-level math problems. Finally, we show uses of model-written EFAs e.g., finding harder/easier problem variants, as well as data generation.

数学推理程序合成生成模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。