The Neural Compiler: Program-to-Network Translation for Hybrid Scientific Machine Learning
Not on the map. Why?
Abstract (arXiv)
Scientific machine learning often requires combining known physics with unknown parameters or correction terms learned from data. Existing approaches either ignore known structure, encode it as a soft penalty, or require hand-written PyTorch code for each equation. We present The Neural Compiler, a system that translates programs written in a first-order Scheme-like expression language into frozen, differentiable PyTorch modules. These modules match the source program to floating-point precision and provide gradients through autograd. In hybrid models, the compiled module encodes known physics exactly while learned components model the unknown remainder. We evaluate the compiler across six experiment domains: Feynman physics equations, Lotka-Volterra dynamics, a damped pendulum, a one-dimensional heat equation, three-dimensional vector mechanics, and compositional generalization. Compiled modules match hand-coded PyTorch implementations numerically for single equations, showing no accuracy loss from compilation. With only 1 to 4 trainable parameters, compiled models recover physical constants to less than 1 percent error in most cases, while standard PINN baselines with more than 8500 parameters show 7 to 93 percent error. Compiled modules also compose with zero error, while neural approximations can accumulate large errors in deep composition chains. The main value of the compiler is not improved accuracy over hand-coded equations, but systematic composability: it generates correct, differentiable modules from symbolic specifications without rewriting each equation by hand. The system supports 51 primitive operations, including vector and matrix algebra, enabling PDE discretizations and hybrid scientific models. This string-in, module-out interface also provides a natural target for large language models that translate scientific descriptions into executable differentiable modules.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 12 of its 24 references that are in the map. First posted on arXiv 21 May 2026.
Builds on
12 of 24 references.
References · 12
- 2018Neural Ordinary Differential Equationscited by 3,779
- 2019Hamiltonian Neural Networkscited by 712
- 2019AI Feynman: a Physics-Inspired Method for Symbolic Regressioncited by 548
- 2020Lagrangian Neural Networkscited by 398
- 2019Neural Probabilistic Logic Programming in DeepProbLogcited by 394
- 2015Neural Module Networkscited by 376
- 2020Universal Differential Equations for Scientific Machine Learningcited by 353
- 2023Tracr: Compiled Transformers as a Laboratory for Interpretabilitycited by 104
- 2023NeurASP: Embracing Neural Networks into Answer Set Programmingcited by 92
- 2023PINNacle: A Comprehensive Benchmark of Physics-Informed Neural Networks for Solving PDEscited by 87
- 2019A Differentiable Programming System to Bridge Machine Learning and Scientific Computingcited by 83
- 2023Scallop: A Language for Neurosymbolic Programmingcited by 63
Built on by
Citing papers per year: 2026: 2.
2 papers.