REVIEW 2 major objections 2 minor 22 references
Compile Once, Differentiate Everywhere: A Differentiable Meta-Circular Interpreter
T0 review · 2 major / 2 minor · reviewed 2026-06-27 · grok-4.3
Pith's one-line read A once-compiled Scheme interpreter executes programs supplied as data while propagating exact gradients to their continuous parameters.
desk verdict The paper gives a working differentiable meta-circular Scheme interpreter that lets gradients flow through compiled programs with closures and recursion, verified on 171 cases, but the experiments need explicit checks that the LLM-generated and scientific programs stay inside the supported subset. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
Differentiable meta-circular interpreter (DMCI): a compiler that turns a self-hosting Scheme subset into an autograd graph so that the interpreter itself runs programs as data while gradients flow through execution.
What would settle it
Gradients computed through the compiled interpreter would diverge from those of direct compilation on new recursive or higher-order program-seed pairs, or the co-search procedure would fail to recover the knee-like degradation structure on the battery early-extrapolation split.
Extended reading notes
Core claim
Differentiable meta-circular interpretation is realized by compiling the self-hosting Scheme subset once; the resulting evaluator treats supplied programs as data, retains closures and recursion, and lets reverse-mode autodiff propagate gradients correctly almost everywhere to embedded constants. Numerical agreement with direct compilation holds across 171 recursive and higher-order program-seed pairs. The same frozen interpreter then supports program-and-parameter co-search in which LLM-proposed structures receive exact gradient-based tuning of their continuous values.
Load-bearing premise
The self-hosting Scheme subset is expressive enough to represent the programs proposed by the LLM and the scientific models in the battery and El Nino examples without hitting unsupported features or non-differentiable points that would invalidate the gradient claims.
Editorial extensions
If this is right
- New programs inherit differentiability without recompilation or custom gradient code.
- LLM-proposed program structures can be calibrated exactly against data through one frozen interpreter.
- The method recovers a knee-like degradation model on battery capacity-fade data that improves held-out extrapolation.
- It optimizes an interpreted Kalman-filter likelihood on the El Nino inverse problem where gradient-free search fails.
- Symbolic regression extends from closed-form expressions to executable stateful programs with recursion.
Reading between the lines
- The approach could be tested on program classes that include more complex control flow or external library calls to measure where the almost-everywhere gradient guarantee breaks.
- Integration with other discrete search methods beyond LLMs might reveal how the continuous calibration step interacts with different proposal distributions.
- The same compiled interpreter could serve as a fixed differentiable backend for multiple scientific modeling tasks without per-task reimplementation.
Signed reviews
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper presents a compiler translating a self-hosting subset of Scheme into differentiable computation graphs, yielding differentiable meta-circular interpretation (DMCI). A single compiled interpreter executes programs-as-data while supporting reverse-mode autodiff on embedded continuous constants. The work claims a proof that gradients are correct almost everywhere, numerical agreement with direct compilation on 171 recursive/higher-order program pairs, and applications to LLM-driven program-and-parameter co-search on battery capacity-fade and El Niño inverse problems.
Significance. If the central claims hold, the approach allows executable, stateful programs (with closures, recursion, and data structures) to be directly optimized via gradients through a frozen interpreter, extending symbolic regression and neurosymbolic search beyond closed-form expressions. The numerical match on 171 pairs supplies an external, independent check; the applications fit parameters on held-out splits rather than reusing training data to define the interpreter.
major comments (2)
- [Abstract, §5, §6] Abstract and §5–§6: the transfer of the 'correct almost everywhere' gradient guarantee to the reported results requires that every LLM-proposed program and every model in the battery/El Niño examples lies inside the supported self-hosting subset and never evaluates a non-differentiable primitive whose predicate depends on a continuous parameter. No listing, static analysis, or runtime check of the concrete programs is supplied to confirm this coverage.
- [Abstract] Abstract: the claim of a proof that gradients through the compiled interpreter are correct almost everywhere is asserted without derivation details, key lemmas, or identification of the measure-zero set of discontinuities, preventing assessment of whether the 'almost everywhere' qualifier is load-bearing for the numerical match or the application results.
minor comments (2)
- [Abstract] The abstract states that DMCI 'improves held-out extrapolation' on the early-extrapolation split but supplies no quantitative metrics (e.g., RMSE, MAE) or error bars for either the battery or El Niño experiments.
- Notation for the compiled interpreter and the embedding of continuous constants is introduced without an explicit small-step or big-step semantics that would make the 'almost everywhere' claim mechanically checkable.
Simulated Author's Rebuttal
We thank the referee for their thorough review and valuable comments. We address each of the major comments point by point below.
read point-by-point responses
-
Referee: [Abstract, §5, §6] Abstract and §5–§6: the transfer of the 'correct almost everywhere' gradient guarantee to the reported results requires that every LLM-proposed program and every model in the battery/El Niño examples lies inside the supported self-hosting subset and never evaluates a non-differentiable primitive whose predicate depends on a continuous parameter. No listing, static analysis, or runtime check of the concrete programs is supplied to confirm this coverage.
Authors: This is a valid observation. To ensure the gradient guarantee applies to our experimental results, we will add to the revised manuscript a verification section (likely in §5 and §6 or a new appendix) that lists or analyzes all programs used in the LLM-driven search and the battery/El Niño models. We will confirm via static analysis or runtime checks that they remain within the self-hosting subset and avoid non-differentiable predicates dependent on continuous parameters. This addresses the transfer of the proof to the results. revision: yes
-
Referee: [Abstract] Abstract: the claim of a proof that gradients through the compiled interpreter are correct almost everywhere is asserted without derivation details, key lemmas, or identification of the measure-zero set of discontinuities, preventing assessment of whether the 'almost everywhere' qualifier is load-bearing for the numerical match or the application results.
Authors: The full manuscript includes the proof in Appendix B, with key lemmas establishing differentiability almost everywhere (the discontinuities occur only at measure-zero sets where predicates on continuous values change, such as in if-branches). We will revise the abstract to briefly note the appendix and add a short summary of the proof in the main text near the claim to facilitate assessment. The numerical agreement on 171 pairs provides independent empirical support, but we agree that more details on the proof will strengthen the presentation. revision: yes
Circularity Check
No significant circularity; external numerical validation and held-out evaluation keep derivation independent
full rationale
The paper validates its central claim (correct gradients almost everywhere through the compiled interpreter) by direct numerical match to separate direct-compilation baselines across 171 program pairs, which is an independent external check rather than a self-referential fit. Program-and-parameter search results are assessed on held-out extrapolation splits for battery and El Nino tasks. No equations or steps reduce a claimed prediction or uniqueness result to a fitted parameter, self-citation chain, or definitional renaming; the meta-circular construction and proof are presented as self-contained against the supported Scheme subset.
Assumptions & free parameters
Cite this review
Pith. "Pith review of Compile Once, Differentiate Everywhere: A Differentiable Meta-Circular Interpreter." pith.science (2026). https://pith.science/paper/VJXU7Y7Q
@misc{pith2026260609930,
author = {Pith},
title = {Pith review of: Compile Once, Differentiate Everywhere: A Differentiable Meta-Circular Interpreter},
year = {2026},
howpublished = {\url{https://pith.science/paper/VJXU7Y7Q}},
note = {Machine review of arXiv:2606.09930}
}
read the original abstract
The boundary between program execution and gradient-based optimization has long limited the use of code itself as a learnable scientific model. We present a compiler that translates a self-hosting subset of Scheme into differentiable computation graphs for autograd backends. Because the subset can compile its own evaluator, this yields differentiable meta-circular interpretation (DMCI): a compiled Scheme interpreter executes programs supplied as data, while reverse-mode autodiff propagates gradients to continuous constants embedded in those programs. The interpreter is compiled once, so new programs inherit differentiability without recompilation or custom gradient machinery, while retaining closures, recursion, and data structures. We prove that gradients through the compiled interpreter are correct almost everywhere and show that they match direct compilation to numerical precision across 171 recursive and higher-order program-seed pairs. We then use DMCI for program-and-parameter co-search, where a large language model proposes Scheme programs and exact gradients calibrate their continuous parameters through a single frozen interpreter. This enables OpenEvolve-style program search in which an outer loop proposes discrete program structures and DMCI supplies exact gradient-based calibration of each candidate's continuous parameters. On battery capacity-fade data, the search recovers a knee-like degradation structure and improves held-out extrapolation over hand-crafted baselines on the harder early-extrapolation split, matching them on the later split. On a high-dimensional El Nino inverse problem, DMCI optimizes an interpreted Kalman-filter likelihood where gradient-free search fails. These results extend symbolic regression and neurosymbolic search from closed-form expressions to executable, stateful programs, making model-generated code directly optimizable against data.
Figures
Figures from the paper (18 more)
Reference graph
Works this paper leans on
-
[1]
doi: 10.5194/bg-20-2671-2023. Peter M. Attia, Alexander Bills, Ferran Brosa Planella, Philipp Dechent, Gonçalo dos Reis, Matthieu Dubarry, Paul Gasper, Richard Gilchrist, Samuel Greenbank, David Howey, Ouyang Liu, Edwin Khoo, Yuliya Preger, Abhishek Soni, Shashank Sripad, Anna G. Stefanopoulou, and Valentin Sulzer. Review—“knees” in Lithium-ion battery ag...
-
[2]
Matko Bošnjak, Tim Rocktäschel, Jason Naradowsky, and Sebastian Riedel
doi: 10.48550/arXiv.2510.00373. Matko Bošnjak, Tim Rocktäschel, Jason Naradowsky, and Sebastian Riedel. Programming with a differentiable Forth interpreter. InProceedings of the 34th International Conference on Machine Learning (ICML), volume 70 of Proceedings of Machine Learning Research, pages 547–556. PMLR, 2017. URL https://proceedings.mlr. press/v70/...
-
[3]
TerpreT: A Probabilistic Programming Language for Program Induction
doi: 10.48550/arXiv.1608.04428. Alexander L. Gaunt, Marc Brockschmidt, Nate Kushman, and Daniel Tarlow. Differentiable programs with neural libraries. InProceedings of the 34th International Conference on Machine Learning (ICML), volume 70 of Proceedings of Machine Learning Research, pages 1213–1222. PMLR, 2017. URL https://proceedings.mlr. press/v70/gaun...
work page Pith review arXiv doi:10.48550/arxiv.1608.04428 2017
-
[4]
A Differentiable Programming System to Bridge Machine Learning and Scientific Computing
doi: 10.48550/arXiv.1907.07587. Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with Gumbel-Softmax. In5th International Conference on Learning Representations (ICLR), 2017. URL https://openreview.net/forum?id=rkE3y85ee. arXiv:1611.01144. Peishi Jiang, Patrick Kidger, Toshiyuki Bandai, Dennis Baldocchi, Heping Liu, Yi Xiao, Qianyu Zh...
work page Pith review arXiv doi:10.48550/arxiv.1907.07587 1907
-
[5]
Gradient-Based Program Synthesis with Neurally Interpreted Languages
doi: 10.48550/arXiv.2604.18907. URLhttps://openreview.net/forum?id=NAORIWBaoO. Chris J. Maddison, Andriy Mnih, and Yee Whye Teh. The concrete distribution: A continuous relaxation of discrete random variables. In5th International Conference on Learning Representations (ICLR), 2017. URL https: //openreview.net/forum?id=S1jE5L5gl. arXiv:1611.00712. Mehrdad ...
work page Pith review arXiv doi:10.48550/arxiv.2604.18907 2017
-
[6]
Pawan Kumar, Emilien Dupont, Francisco J
doi: 10.1038/s41586-023-06924-6. Jürgen Schmidhuber. Gödel machines: Fully self-referential optimal universal self-improvers. In Ben Goertzel and Cassio Pennachin, editors,Artificial General Intelligence, Cognitive Technologies, pages 199–226. Springer, 2007. doi: 10.1007/978-3-540-68677-4_7. Kristen A. Severson, Peter M. Attia, Norman Jin, Nicholas Perki...
-
[7]
What is guaranteed: gradient correctness on the full-measure setΘtc where the discrete execution trace is constant in θ. Θtc is open because each branch condition is a continuous function ofθ, so a sufficiently small perturbation of θ does not change any branch outcome; it has full Lebesgue measure because its complement is a countable union of analytic h...
-
[8]
The compiled program inherits the source program’s non-differentiability
What is not guaranteed: the gradient at branch boundaries (measure zero). The compiled program inherits the source program’s non-differentiability
Show all 22 references
-
[9]
gradients through an interpreter,
Parameter-dependent recursion depth: programs where a learnable parameter affects recursion depth have correct gradients almost everywhere. The boundary is a measure-zero hypersurface. The empirical trajectory-equivalence results (<7×10 −7 maximum loss difference across 171 (p...
-
[10]
Compile the target program directly to a differentiable module
Direct compilation(autograd). Compile the target program directly to a differentiable module. This is the upper bound: shortest gradient path
-
[11]
same DMCI engine?
Compiled interpreter(autograd). DMCI: compile the self-hosted evaluator and pass the target program as quoted data. 3.Hand-coded PyTorch interpreter(autograd). Tree-walking evaluator in Python/PyTorch (∼100 lines). Isolates the effect of compilation. 4.Finite differences. Cent...
1992
-
[12]
DMCI provides correctness through the evaluator’s compilation: any program representable as an S-expression receives correct gradients by construction
Guaranteed correctness.Direct compilation produces correct gradients for each candidate, but this correctness must be verified per-program (or trusted based on compiler testing). DMCI provides correctness through the evaluator’s compilation: any program representable as an S-e...
-
[13]
Direct compilation also works for these programs, but DMCI’s evaluator-as-module architecture makes the integration path explicit: string in, differentiable module out
Zero-effort integration.In Experiment B, 15 LLM-generated Scheme programs compiled and trained with zero manual adaptation. Direct compilation also works for these programs, but DMCI’s evaluator-as-module architecture makes the integration path explicit: string in, differentia...
-
[14]
a model was discovered and trained
Runtime composition.Programs can be composed, modified, or selected at runtime without touching the compilation pipeline. This matters for workloads beyond GP, such as an LLM agent that iteratively refines a scientific model, or a meta-learning system that selects among a libr...
2015
-
[15]
Compare batched evaluation against a sequential loop baseline
Part A (Forward throughput).For each of 12 directly-compiled models from Experiment B, measure forward- pass time at batch sizes 1–4096. Compare batched evaluation against a sequential loop baseline. 50 Compile Once, Differentiate EverywhereA PREPRINT 1 4 16 64 256 1024 100 10...
-
[16]
Both start from identical initial parameters
Part B (Training speedup).Run 500-epoch training with Adam on 64 data points, comparing sequential (64 evaluations per epoch) against batched (1 evaluation per epoch). Both start from identical initial parameters
-
[17]
Part C (Correctness).Verify that batched and sequential evaluation produce identical predictions (within floating-point tolerance) and that gradients flow correctly through the batched path
-
[18]
This tests DMCI as an engine for population-based optimization
Part D (Population batching).Evaluate M random parameter initializations across N data points simultaneously, with shape (M, N) , through a single forward pass. This tests DMCI as an engine for population-based optimization
-
[19]
Part E (torch.compile).Apply torch.compile (PyTorch 2.x graph compilation with Inductor backend) to the batched evaluator, measuring whether kernel fusion and Python overhead elimination provide additional speedup beyond batching alone
-
[20]
This tests batching on a program an order of magnitude larger than the Experiment B models, with complex nonlinear feedback loops and deeply nested arithmetic
Part F (Large-model stress test).Benchmark a coupled 9-module Earth System Model (DiffESM-S) with 95 inputs, 70 learnable parameters, 20 state variables, and 100-step recursive time integration. This tests batching on a program an order of magnitude larger than the Experiment ...
-
[21]
Part G (Convergence speedup).Fit 15 DiffESM-S climate parameters to synthetic observational data ( N=32 data points). Compare sequential, batched, and population-batched (M random restarts ×N data points) training over 300 epochs, each restart initialized by perturbing the 15 ...
-
[22]
forward” is a batched forward pass; “train
Part H (Second large-model stress test).Benchmark DIFFSOC-S, a 10-module Urban Political Economy Simulator with 204 inputs, 87 learnable parameters, and 206 compiled graph nodes. This second large model tests whether the batching results from Part F generalize across model dom...
2000 doi
Reviewed June 27, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.