The Neural Compiler: Program-to-Network Translation for Hybrid Scientific Machine Learning
- URL: http://arxiv.org/abs/2605.22498v1
- Date: Thu, 21 May 2026 13:49:20 GMT
- Title: The Neural Compiler: Program-to-Network Translation for Hybrid Scientific Machine Learning
- Abstract summary: We present The Neural Compiler, a system that translates programs written in a first-order Scheme-like expression language into frozen, differentiable PyTorch modules.<n>In hybrid models, the compiled module encodes known physics exactly while learned components model the unknown remainder.<n>Compiled modules match hand-coded PyTorch implementations numerically for single equations, showing no accuracy loss from compilation.
- Score: 0.0
- License: http://creativecommons.org/licenses/by/4.0/
- 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. 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.
Related papers
- Compile Once, Differentiate Everywhere: A Differentiable Meta-Circular Interpreter [0.0]
We present a compiler that translates a self-hosting subset of Scheme into differentiable graphs for autograd backends.<n>Because the subset can compile its own evaluator, this yields differentiable meta-circular interpretation (DMCI)<n>DMCI executes programs supplied as data, while reverse-mode autodiff propagates gradients to continuous constants embedded in those programs.
arXiv Detail & Related papers (2026-06-07T15:13:41Z) - Compositional Neural Operators for Multi-Dimensional Fluid Dynamics [0.0]
Partial differential equations govern diverse physical phenomena, yet high-fidelity numerical solutions are computationally expensive and Machine Learning approaches lack generalization.<n>We propose Compositional Neural Operators (CompNO) for 2D systems, a framework that decomposes complex PDEs into a library of Foundation Blocks.<n>Our results demonstrate that learning from elementary operators significantly improves adaptability, enhances model interpretability and facilitates the reuse of pretrained blocks when adapting to new physical systems.
arXiv Detail & Related papers (2026-05-12T07:48:03Z) - When Attention Beats Fourier: Multi-Scale Transformers for PDE Solving on Irregular Domains [0.0]
msat achieves state-the-art generalization on complex geometry problems.<n>textbfMulti-Scale Attention Transformer (msat) encodes solution histories as token sequences and trains end-to-end.
arXiv Detail & Related papers (2026-05-08T15:23:13Z) - Fast and accurate AI-based pre-decoders for surface codes [0.0]
We introduce a scalable AI-based pre-decoder for the surface code that performs local, parallel error correction with low decoding runtimes.<n>This architecture is backend-agnostic and composes with arbitrary global decoding algorithms designed for surface codes.<n> integrated with uncorrelated PyMatching, the pipeline achieves end-to-end decoding runtimes of order $mathcalO (1 texts)$ per round at large code distances.
arXiv Detail & Related papers (2026-04-14T15:01:05Z) - Algorithms and Scientific Software for Quasi-Monte Carlo, Fast Gaussian Process Regression, and Scientific Machine Learning [0.0]
This thesis unifies our developments in three broad domains: Quasi-Monte Carlo (QMC) methods for efficient high-dimensional integration, Gaussian process (GP) regression for high-dimensional domains with built-in uncertainty, and scientific machine learning (sciML) for modeling partial differential equations (PDEs) with mesh-free solvers.
arXiv Detail & Related papers (2025-11-26T21:11:08Z) - INC: An Indirect Neural Corrector for Auto-Regressive Hybrid PDE Solvers [61.84396402100827]
We propose the Indirect Neural Corrector ($mathrmINC$), which integrates learned corrections into the governing equations.<n>$mathrmINC$ reduces the error amplification on the order of $t-1 + L$, where $t$ is the timestep and $L$ the Lipschitz constant.<n>We test $mathrmINC$ in extensive benchmarks, covering numerous differentiable solvers, neural backbones, and test cases ranging from a 1D chaotic system to 3D turbulence.
arXiv Detail & Related papers (2025-11-16T20:14:28Z) - In-Context Language Learning: Architectures and Algorithms [73.93205821154605]
We study ICL through the lens of a new family of model problems we term in context language learning (ICLL)
We evaluate a diverse set of neural sequence models on regular ICLL tasks.
arXiv Detail & Related papers (2024-01-23T18:59:21Z) - Guess & Sketch: Language Model Guided Transpilation [59.02147255276078]
Learned transpilation offers an alternative to manual re-writing and engineering efforts.
Probabilistic neural language models (LMs) produce plausible outputs for every input, but do so at the cost of guaranteed correctness.
Guess & Sketch extracts alignment and confidence information from features of the LM then passes it to a symbolic solver to resolve semantic equivalence.
arXiv Detail & Related papers (2023-09-25T15:42:18Z) - Equivariant geometric convolutions for emulation of dynamical systems [6.3003220645859175]
We use geometric convolutions to enforce coordinate freedom in surrogate machine learning models.
In numerical experiments emulating 2D compressible Navier-Stokes, we see better accuracy and improved stability.
The ease of enforcing coordinate freedom without making major changes to the model architecture provides an exciting recipe for any CNN-based method applied to an appropriate class of problems.
arXiv Detail & Related papers (2023-05-21T22:44:18Z) - GradInit: Learning to Initialize Neural Networks for Stable and
Efficient Training [59.160154997555956]
We present GradInit, an automated and architecture method for initializing neural networks.
It is based on a simple agnostic; the variance of each network layer is adjusted so that a single step of SGD or Adam results in the smallest possible loss value.
It also enables training the original Post-LN Transformer for machine translation without learning rate warmup.
arXiv Detail & Related papers (2021-02-16T11:45:35Z) - RE-MIMO: Recurrent and Permutation Equivariant Neural MIMO Detection [85.44877328116881]
We present a novel neural network for symbol detection in wireless communication systems.
It is motivated by several important considerations in wireless communication systems.
We compare its performance against existing methods and the results show the ability of our network to efficiently handle a variable number of transmitters.
arXiv Detail & Related papers (2020-06-30T22:43:01Z) - Predictive Coding Approximates Backprop along Arbitrary Computation
Graphs [68.8204255655161]
We develop a strategy to translate core machine learning architectures into their predictive coding equivalents.
Our models perform equivalently to backprop on challenging machine learning benchmarks.
Our method raises the potential that standard machine learning algorithms could in principle be directly implemented in neural circuitry.
arXiv Detail & Related papers (2020-06-07T15:35:47Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.