Skip to main content
QUICK REVIEW

[Paper Review] Learning to Discretize: Solving 1D Scalar Conservation Laws via Deep Reinforcement Learning

Yufei Wang, Ziju Shen|arXiv (Cornell University)|May 27, 2019
Model Reduction and Neural NetworksPhysics and Astronomy44 references5 citations
TL;DR

This paper proposes a deep reinforcement learning (DRL) framework to learn adaptive numerical discretization for solving 1D scalar conservation laws, treating the solution process as a sequential decision-making problem. The method learns a policy network to dynamically select optimal finite difference stencils based on local solution states, achieving superior accuracy and generalization over WENO schemes and supervised learning baselines like L3D and PINNs.

ABSTRACT

Conservation laws are considered to be fundamental laws of nature. It has broad applications in many fields, including physics, chemistry, biology, geology, and engineering. Solving the differential equations associated with conservation laws is a major branch in computational mathematics. The recent success of machine learning, especially deep learning in areas such as computer vision and natural language processing, has attracted a lot of attention from the community of computational mathematics and inspired many intriguing works in combining machine learning with traditional methods. In this paper, we are the first to view numerical PDE solvers as an MDP and to use (deep) RL to learn new solvers. As proof of concept, we focus on 1-dimensional scalar conservation laws. We deploy the machinery of deep reinforcement learning to train a policy network that can decide on how the numerical solutions should be approximated in a sequential and spatial-temporal adaptive manner. We will show that the problem of solving conservation laws can be naturally viewed as a sequential decision-making process, and the numerical schemes learned in such a way can easily enforce long-term accuracy. Furthermore, the learned policy network is carefully designed to determine a good local discrete approximation based on the current state of the solution, which essentially makes the proposed method a meta-learning approach. In other words, the proposed method is capable of learning how to discretize for a given situation mimicking human experts. Finally, we will provide details on how the policy network is trained, how well it performs compared with some state-of-the-art numerical solvers such as WENO schemes, and supervised learning based approach L3D and PINN, and how well it generalizes.

Motivation & Objective

  • To address the challenge of designing high-order, adaptive numerical solvers for 1D scalar conservation laws that balance accuracy and robustness.
  • To overcome the limitations of traditional methods relying on expert-designed rules and heuristics, such as in WENO schemes.
  • To develop an end-to-end learning framework that integrates discretization decisions with long-term solution accuracy, rather than relying on supervised pre-training.
  • To explore whether reinforcement learning can learn a meta-learner policy that mimics expert decision-making in numerical flux selection.
  • To evaluate generalization performance across diverse initial conditions and equation settings (inviscid, viscous, forcing) beyond training distribution.

Proposed method

  • The numerical solution process is modeled as a Markov Decision Process (MDP), where each spatial-temporal step corresponds to a decision state.
  • A policy network is trained via deep reinforcement learning to select optimal finite difference stencils (flux approximations) based on local solution features.
  • The action space encodes discrete choices of numerical flux schemes, with rewards shaped to encourage long-term accuracy and stability.
  • The method uses a meta-learning design where the policy adapts its discretization strategy based on current solution state, emulating expert behavior.
  • The DRL agent is trained using a reward function that penalizes error accumulation over time, promoting long-horizon accuracy.
  • The framework is evaluated on the viscous and inviscid Burgers’ equations with various initial conditions and forcing terms.

Experimental results

Research questions

  • RQ1Can the process of solving 1D scalar conservation laws be naturally framed as a sequential decision-making problem suitable for reinforcement learning?
  • RQ2Can a deep reinforcement learning agent learn a numerical flux policy that adapts locally and achieves higher accuracy than fixed high-order schemes like WENO?
  • RQ3Does the learned RL-based solver generalize better than supervised learning methods (e.g., L3D, PINNs) to out-of-distribution test cases?
  • RQ4Can the DRL agent learn a meta-learner policy that selects discretization strategies based on local solution features, mimicking expert knowledge?
  • RQ5How does the performance of the RL-based solver compare in terms of long-term accuracy and robustness across different PDE settings?

Key findings

  • The RL-based solver, named RL-WENO, achieves lower relative errors than WENO across all test settings, including viscous and inviscid Burgers’ equations.
  • On the viscous Burgers’ equation with Δx = 0.02 and η = 0.01, RL-WENO achieved a relative error of 1.64 (±0.57), outperforming WENO’s 1.94 (±0.55).
  • In the forcing test setting, RL-WENO generalized well, achieving 4.66 (±0.72) relative error at Δx = 0.01, compared to WENO’s 4.74 (±0.70).
  • The RL-WENO policy generalized effectively to unseen settings: when trained on viscous settings, it achieved 1.01 (±0.19) error on inviscid test cases, outperforming WENO’s 1.02 (±0.27).
  • Unlike L3D and PINNs, which failed to generalize or blew up under distribution shift, RL-WENO maintained stable and accurate performance across diverse test configurations.
  • The method demonstrated strong out-of-distribution generalization, with consistent performance across inviscid, viscous, and forcing settings, indicating robust policy learning.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.