Papers › Learning to Compute Gröbner Bases

Learning to Compute Gröbner Bases

21 Nov 2023arXiv:2311.12904archive 2025-07-28

Hiroshi Kera, Yuki Ishihara, Yuta Kambe, Tristan Vaccon, Kazuhiro Yokoyama

Solving a polynomial system, or computing an associated Gr\"obner basis, has been a fundamental task in computational algebra. However, it is also known for its notorious doubly exponential time complexity in the number of variables in the worst case. This paper is the first to address the learning of Gr\"obner basis computation with Transformers. The training requires many pairs of a polynomial system and the associated Gr\"obner basis, raising two novel algebraic problems: random generation of Gr\"obner bases and transforming them into non-Gr\"obner ones, termed as backward Gr\"obner problem. We resolve these problems with 0-dimensional radical ideals, the ideals appearing in various applications. Further, we propose a hybrid input embedding to handle coefficient tokens with continuity bias and avoid the growth of the vocabulary set. The experiments show that our dataset generation method is a few orders of magnitude faster than a naive approach, overcoming a crucial challenge in learning to compute Gr\"obner bases, and Gr\"obner computation is learnable in a particular class.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology: its repositories, every harvested function with whether it ran, its licence and the call to fetch it.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2311.12904")

Code

Syntology Ran 12 of 18 code samples harvested from 2 repositories linked to this paper; 6 have no recorded run. Of those that ran: 12 ran with no contract checked.

By repository: official repository: 17 samples from 1 repository, 12 ran; community (archive-listed): 1 sample from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

hiroshikera/transformer-groebner officialmentioned in paperpytorch report
HiroshiKERA/calt mentioned on GitHub report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

18 samples harvested; 12 ran; 0 honoured the contract we drafted; 6 have no recorded run. Read from Syntology's graph 2026-09-25; that is when this build read the record, not when the samples ran.

12ran
6unverified

Licence: 17 of the 18 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

ContinuousEmbedding hiroshikera/transformer-groebner/src/loader/models/encoding.py official repository ran · metamorphic tier: invariant fingerprinted no licence file found · pointer only · a0d24f0f17337d49 · report
coeffs_eq HiroshiKERA/transformer-groebner/src/evaluation/generation.py official repository ran no licence file found · pointer only · 653a3879fe5fb006 · report
generate_yaml HiroshiKERA/transformer-groebner/src/misc/generate_config.py official repository ran no licence file found · pointer only · 87a927cf120f3e7b · report
generation HiroshiKERA/transformer-groebner/src/evaluation/generation.py official repository ran no licence file found · pointer only · f469b8d56291d428 · report
get_checkpoint_id HiroshiKERA/transformer-groebner/src/loader/checkpoint.py official repository ran no licence file found · pointer only · 02e9a1b6a46e3abc · report
load_config HiroshiKERA/transformer-groebner/src/loader/checkpoint.py official repository ran no licence file found · pointer only · ec5278f3a6789c1a · report
load_model HiroshiKERA/transformer-groebner/src/loader/model.py official repository ran no licence file found · pointer only · 6f185d3c02bfd65e · report
set_tokenizer HiroshiKERA/transformer-groebner/src/dataset/tokernizer.py official repository ran no licence file found · pointer only · 46d6bad400ce74ff · report
set_vocab HiroshiKERA/transformer-groebner/src/dataset/tokernizer.py official repository ran no licence file found · pointer only · 28a75bc84651a621 · report
str_to_float HiroshiKERA/transformer-groebner/src/loader/data.py official repository ran no licence file found · pointer only · 8055a9403fdd2b0a · report
summarize_all_results HiroshiKERA/transformer-groebner/src/experiments/timing.sage.py official repository ran no licence file found · pointer only · d4cd57d1fa5a2683 · report
support_eq HiroshiKERA/transformer-groebner/src/evaluation/generation.py official repository ran no licence file found · pointer only · c3f85c891219a257 · report
HybridEmbedding hiroshikera/transformer-groebner/src/loader/models/encoding.py official repository unverified no licence file found · pointer only · a8dba307b67d1d22 · report
get_datacollator HiroshiKERA/transformer-groebner/src/loader/data.py official repository unverified no licence file found · pointer only · 10788cb1bffd7651 · report
get_raw_dataset HiroshiKERA/transformer-groebner/src/experiments/showcase.sage.py official repository unverified no licence file found · pointer only · 30e7a6e24f878bce · report
load_data HiroshiKERA/transformer-groebner/src/loader/data.py official repository unverified no licence file found · pointer only · 642b1733fc94bd92 · report
load_pretrained_model HiroshiKERA/transformer-groebner/src/loader/checkpoint.py official repository unverified no licence file found · pointer only · 6ad2f1e65d935216 · report
get_input_embedding HiroshiKERA/calt/src/calt/models/input_embeddings/base.py community (archive-listed) unverified MIT (permissive) · 837c794d0cdda4ff · report

Tasks

Dataset Generation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections