This repository contains code for the following paper:
BWLer: Barycentric Weight Layer Elucidates a Precision-Conditioning Tradeoff for PINNs
Jerry Liu, Yasa Baig, Denise Hui Jean Lee, Rajat Vadiraj Dwaraknath, Atri Rudra, Chris Ré.
Best Paper Award at the Workshop on the Theory of AI for Scientific Computing (TASC) @ COLT 2025
[Read the paper]
BWLer replaces or augments physics-informed neural networks with barycentric polynomial interpolants, towards higher-precision solutions to partial differential equations. BWLer comes in two variants:
- BWLer-hatted MLP: adds a global interpolation layer on top of an existing neural network architecture.
- Explicit BWLer: removes the neural network entirely, and instead directly optimizes the function values at BWLer's interpolation nodes.
See our accompanying blog posts for more details:
- Part 1: PDEs, PINNs, and the Precision Gap
- Part 2: Navigating a Precision–Conditioning Tradeoff for PINNs

Figure: Standard PINN evaluates an MLP throughout the domain (left). BWLer interpolates globally based on values at discrete grid nodes; BWLer-hatted MLP obtains values using an MLP (middle), explicit BWLer parameterizes values directly (right).
Install dependencies with
conda create -n "bwler" python=3.11
conda activate bwler
pip install -e .
The code is organized as follows:
- scripts/: contains scripts for running the experiments:
- scripts/pdes/: PDE experiment submission scripts
- scripts/ablations/: ablation study scripts
- src/experiments/: contains the main experiment framework, including the PDE problem definitions
- src/models/: contains the two BWLer variants:
- src/models/interpolant_nd.py: explicit BWLer
- src/models/mlp_interpolant_nd.py: BWLer-hatted MLP
- src/models/mlp.py: standard MLP
- src/optimizers/: contains the Nyström-Newton CG optimizer
- To try BWLer on the five benchmark PDEs from our paper, run the scripts in scripts/pdes/.
- To incorporate new PDE problems into the repo, create a new class extending base_pde.py. Simply specify the domain in the
__init__
and PDE loss terms inget_loss_dict
. Please refer to convection.py for a simple example, and poisson_2d_cg.py for an example with an irregular domain. - To try different optimizers or training techniques, refer to base_fcn.py for the optimizer initialization and base_pde.py for the main training loops. We currently only support Adam and NNCG, but we think there's a lot more to do towards higher-precision optimizers with BWLer!
If you find this work useful, please cite it as follows:
@misc{liu2025bwlerbarycentricweightlayer,
title={BWLer: Barycentric Weight Layer Elucidates a Precision-Conditioning Tradeoff for PINNs},
author={Jerry Liu and Yasa Baig and Denise Hui Jean Lee and Rajat Vadiraj Dwaraknath and Atri Rudra and Chris Ré},
year={2025},
eprint={2506.23024},
archivePrefix={arXiv},
primaryClass={cs.LG},
note={Presented at the Workshop on the Theory of AI for Scientific Computing (TASC) @ COLT 2025},
url={https://arxiv.org/abs/2506.23024}
}