用Transformer模型加速多项式计算,提速3.5倍且结果正确。
Computational Algebra with Attention: Transformer Oracles for Border Basis Algorithms
- 用Transformer构建预言机,识别并跳过耗时的化简步骤。
- 相比基础算法提速最高达3.5倍,结果仍保证正确性。
- 适合需要高效符号计算的科研与工程场景。
求解多项式方程组(尤其是有限解情形)在多个科学领域中至关重要。传统方法如Gröbner基和Border基虽基础但计算成本高,近年深度学习方法虽提升效率却牺牲正确性。本文提出首个保持结果正确的深度学习加速Border基算法——Oracle Border Basis Algorithm。设计并训练基于Transformer的预言机,识别并跳过计算量大的化简步骤(这些步骤主导算法耗时)。在关键计算阶段选择性调用该预言机,实现最高3.5倍加速,且不损害结果正确性。为生成训练数据,提出一种采样方法并给出首个Border基采样定理。构建针对单项式为中心代数计算的分词与嵌入方案,使n元多项式编码的词元数量减少O(n)倍。该学习方法数据高效、稳定,是传统计算机代数算法的实用增强。
原文摘要 · Abstract (English)
Solving systems of polynomial equations, particularly those with finitely many solutions, is a crucial challenge across many scientific fields. Traditional methods like Gröbner and Border bases are fundamental but suffer from high computational costs, which have motivated recent Deep Learning approaches to improve efficiency, albeit at the expense of output correctness. In this work, we introduce the Oracle Border Basis Algorithm, the first Deep Learning approach that accelerates Border basis computation while maintaining output guarantees. To this end, we design and train a Transformer-based oracle that identifies and eliminates computationally expensive reduction steps, which we find to dominate the algorithm's runtime. By selectively invoking this oracle during critical phases of computation, we achieve substantial speedup factors of up to 3.5x compared to the base algorithm, without compromising the correctness of results. To generate the training data, we develop a sampling method and provide the first sampling theorem for border bases. We construct a tokenization and embedding scheme tailored to monomial-centered algebraic computations, resulting in a compact and expressive input representation, which reduces the number of tokens to encode an $n$-variate polynomial by a factor of $O(n)$. Our learning approach is data efficient, stable, and a practical enhancement to traditional computer algebra algorithms and symbolic computation.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。