Skip to content

Reinforcement Learning with Verifiable Physics: Post-training LLMs with Continuous Rewards

Jul 2026 · arXiv.org · Vol abs/2607.10474 · 0 citations · 78 references
Computer Science

TL;DR

This work introduces RLVP: Reinforcement Learning with Verifiable Physics, an RL post-training framework for multi-PDE solver code generation and shows that a smaller LLM post-trained with RLVP can outperform prompting a frontier model on in-distribution PDE solver generation.

Abstract

Partial differential equations (PDEs) are foundational to modeling in science and engineering, but constructing reliable numerical solvers remains labor-intensive, demanding expert knowledge of discretization schemes, stability conditions, and boundary treatments. Recent work has begun to frame PDE solving as a code-generation task for large language models (LLMs), yet existing approaches operate primarily at inference time: relying on prompting, debugging, self-refinement, and test-time scaling rather than adapting the model itself. In parallel, reinforcement learning with verifiable rewards has emerged as a post-training paradigm for code and math reasoning, but its verifiers are typically binary: a compiler runs, or a test passes. Such signals discard the graded structure of scientific correctness, where two solvers may both execute and yet differ in solution accuracy by orders of magnitude. In this work, we introduce RLVP: Reinforcement Learning with Verifiable Physics, an RL post-training framework for multi-PDE solver code generation. RLVP addresses this verifiability gap with a hybrid verifier: hard program-validity checks ensure executability, while continuous physics rewards score function-space accuracy and PDE-residual consistency. A single policy is post-trained across diverse PDE families spanning hyperbolic, parabolic, elliptic, and incompressible-flow systems. RLVP improves over both pre-trained and supervised-only baselines on PDE benchmarks, and shows zero-shot improvement transfer to held-out PDEs. We show that a smaller LLM post-trained with RLVP can outperform prompting a frontier model on in-distribution PDE solver generation. The trained policy shows evidence of compositionality in numerical motifs: it recombines stencils, time-stepping schemes, and boundary-handling primitives learned from the PDEs used in training into generated solvers for unseen PDE problems.

View source

Similar papers

#artificial intelligence Preprint Sep 2026

The Imitation Game: When LLMs Learn to Reason Like Programs via Code-Centric Reasoning Data Synthesis

The proposed MIMIC framework fundamentally transforms algorithms into verifiable reasoning trajectories through narrative fusion, code-guided test synthesis, and dynamic code instrumentation, demonstrating that the procedural rigor of executable code can effectively unlock and enhance the generalized reasoning capabili...

Jin-Yang Zhang, Wei-Bin Liao, Ke-Qin Bao et al. · 0 citations
#machine learning Preprint Aug 2026

Reinforcement Learning for Symbolic Equation Solving

A reinforcement-learning agent that solves symbolic equations step by step, covering both nonlinear closed equations and a controlled class of restricted-open families requiring a change of variables (CoV) such as completing the square is presented.

Kevin P. O. Keeffe · 0 citations
Conference Open access Sep 2026

Verifiable PDE Reasoning and Modeling with Neurosymbolics

The PDE-Controller formalizes informal PDEs, synthesizes solver-ready code, and plans subgoals to tackle nonconvex con-trol via interactions with external solvers, and the Lean Finder accelerates PDE formalization via a semantics-aware search engine for Lean/Mathlib that retrieves relevant theorems.

Wu-Yang Chen · 0 citations
#artificial intelligence Preprint Aug 2026

Program Learning with Verifiable Rewards: Symbolic Backpropagation for Post-Training LLMs

PLVR (Program Learning with Verifiable Rewards): a post training method that learns such programs directly from input-output examples and is released with the symbolic backpropagation library and a conformance checker so the method can be applied to primitive libraries other than the authors' own.

Vishvesh Bhat · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.