The Neural Compiler: Program-to-Network Translation for Hybrid Scientific Machine Learning
Lucas Sheneman

TL;DR
The Neural Compiler translates symbolic scientific programs into differentiable PyTorch modules, enabling accurate, composable hybrid models that combine known physics with learned components, streamlining scientific machine learning workflows.
Contribution
It introduces a system that automatically converts symbolic physics equations into differentiable modules, improving systematic composability without manual rewriting.
Findings
Compiled modules match hand-coded implementations numerically.
Models recover physical constants with less than 1% error.
Supports complex operations like PDE discretizations and composition.
Abstract
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.…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
