Skip to content

HazyResearch/bwler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BWLer: Barycentric Weight Layer Elucidates a Precision-Conditioning Tradeoff for PINNs

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:

Method overview

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).

Dependencies

Install dependencies with

conda create -n "bwler" python=3.11
conda activate bwler
pip install -e .

Code structure

The code is organized as follows:

Getting started

  • 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 in get_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!

Citation

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}
}

About

Official repo for BWLer: Barycentric Weight Layer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published