mlsanityData to 14 Oct 2026

LLM-Based FORM Code Generation with Verification-Driven Fine-Tuning

arXiv 2609.23367 ↗First posted 20 Sep 2026hep-ph cs.CE cs.CLcited by 0

Not on the map. Why?

Abstract (arXiv)

FORM is a domain-specific symbolic manipulation language widely used in particle physics for processing the very large algebraic expressions arising from multi-loop Feynman diagram calculations. Despite its central role in precision theoretical physics, no artificial-intelligence tooling exists, to our knowledge, for assisting physicists in writing FORM code. We show that contemporary large language models (LLMs), including frontier models with hundreds of billions of parameters, achieve a zero-percent execution pass rate on our instruction-following and tutorial-style FORM tasks without documentation in a single attempt, establishing FORM as a genuine zero-shot language for LLMs at the time of writing. We then present a verification-driven data generation pipeline that uses the FORM binary itself as an execution oracle to produce and validate a corpus of 4,633 training examples spanning deterministic computations, open-ended programs, tutorial code, and knowledge question-answer pairs. Fine-tuning a compact open-weights model (Qwen3-8B) with quantized low-rank adaptation (QLoRA) yields a specialist that, evaluated on four complementary benchmarks (840 tasks, single attempt each), decisively outperforms frontier models with up to 756B parameters in execution rate and in strict, FORM-verified output matching on the larger benchmarks, and remains statistically indistinguishable from them on the smaller, harder ones. General reasoning and coding capabilities are preserved within 2.6 percentage points.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 11 of its 38 references that are in the map. First posted on arXiv 20 Sep 2026.

Builds on

11 of 38 references.

References · 11

  1. 2021Training Verifiers to Solve Math Word Problemscited by 10,109
  2. 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 9,379
  3. 2025Qwen3 Technical Reportcited by 8,820
  4. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  5. 2020Measuring Massive Multitask Language Understandingcited by 7,963
  6. 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,418
  7. 2025gpt-oss-120b & gpt-oss-20b Model Cardcited by 1,386
  8. 2026GLM-5: from Vibe Coding to Agentic Engineeringcited by 587
  9. 2023Knowledge Transfer from High-Resource to Low-Resource Programming Languages for Code LLMscited by 45
  10. 2024Synthetic Programming Elicitation for Text-to-Code in Very Low-Resource Programming and Formal Languagescited by 6
  11. 2026Supervising Ralph Wiggum: Exploring a Metacognitive Co-Regulation Agentic AI Loop for Engineering Designcited by 3

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2025A PennyLane-Centric Dataset to Enhance LLM-based Quantum Code Generation using RAG
  2. 2026FormalScience: Scalable Human-in-the-Loop Autoformalisation of Science with Agentic Code Generation in Lean
  3. 2026Reliable LLM-Generated Programs for High-Energy Physics Experiments through Graph-Grounded Software Knowledge ↗
  4. 2025Rewriting Pre-Training Data Boosts LLM Performance in Math and Code
  5. 2024Exploring the Limits of Fine-grained LLM-based Physics Inference via Premise Removal Interventions
  6. 2026Training and Benchmarking Code Generation for Physics-Inspired Animations
  7. 2026Evaluating LLM-generated code for domain-specific languages: molecular dynamics with LAMMPS
  8. 2025ABench-Physics: Benchmarking Physical Reasoning in LLMs via High-Difficulty and Dynamic Physics Problems