Multi-Objective Loss Balancing for Physics-Informed Deep Learning

Overview

Multi-Objective Loss Balancing for Physics-Informed Deep Learning

Code for ReLoBRaLo.

Abstract

Physics Informed Neural Networks (PINN) are algorithms from deeplearning leveraging physical laws by including partial differential equations (PDE)together with a respective set of boundary and initial conditions (BC / IC) aspenalty terms into their loss function. As the PDE, BC and IC loss function parts cansignificantly differ in magnitudes, due to their underlying physical units or stochasticityof initialisation, training of PINNs may suffer from severe convergence and efficiencyproblems, causing PINNs to stay beyond desirable approximation quality. In thiswork, we observe the significant role of correctly weighting the combination of multiplecompetitive loss functions for training PINNs effectively. To that end, we implementand evaluate different methods aiming at balancing the contributions of multipleterms of the PINNs loss function and their gradients. After review of three existingloss scaling approaches (Learning Rate Annealing, GradNorm as well as SoftAdapt),we propose a novel self-adaptive loss balancing of PINNs calledReLoBRaLo(RelativeLoss Balancing with Random Lookback). Finally, the performance of ReLoBRaLo iscompared and verified against these approaches by solving both forward as well asinverse problems on three benchmark PDEs for PINNs: Burgers’ equation, Kirchhoff’splate bending equation and Helmholtz’s equation. Our simulation studies show thatReLoBRaLo training is much faster and achieves higher accuracy than training PINNswith other balancing methods and hence is very effective and increases sustainabilityof PINNs algorithms. The adaptability of ReLoBRaLo illustrates robustness acrossdifferent PDE problem settings. The proposed method can also be employed tothe wider class of penalised optimisation problems, including PDE-constrained andSobolev training apart from the studied PINNs examples.

Launch Training

Example:

python train.py --verbose --layers 2 --nodes 32 --task helmholtz --update_rule relobralo --resample

The available options are the following:

  • --path, default: experiments, type: str, path where to store the results

  • --layers, default: 1, type: int, number of layers

  • --nodes, default: 32, type: int, number of nodes

  • --network, default: fc, type: str, type of network

  • --optimizer, default: adam, type: str, type of optimizer

  • --lr, default: 0.001, type: float, learning rate

  • --patience, default: 3, type: int, how many evaluations without improvement to wait before reducing learning rate

  • --factor, default: .1, type: float, multiplicative factor by which to reduce the learning rate

  • --task, default: helmholtz, type: str, type of task to fit

  • --inverse, action: store_true, solve inverse problem

  • --inverse_var, default: None, type: float, target inverse variable

  • --update_rule, default: manual, type: str, type of balancing

  • --T, default: 1., type: float, temperature parameter for softmax

  • --alpha, default: .999, type: float, rate for exponential decay

  • --rho, default: 1., type: float, rate for exponential decay

  • --aggregate_boundaries, action: store_true, aggregate all boundary terms into one before balancing

  • --epochs, default: 100000, type: int, number of epochs

  • --resample, action: store_true, resample datapoints or keep them fixed

  • --batch_size, default: 1024, type: int, number of sampled points in a batch

  • --verbose, action: store_true, print progress to terminal

You might also like...
Pytorch implementation of "MOSNet: Deep Learning based Objective Assessment for Voice Conversion"

MOSNet pytorch implementation of "MOSNet: Deep Learning based Objective Assessment for Voice Conversion" https://arxiv.org/abs/1904.08352 Dependency L

Exact Pareto Optimal solutions for preference based Multi-Objective Optimization

Exact Pareto Optimal solutions for preference based Multi-Objective Optimization

Code for the paper Relation Prediction as an Auxiliary Training Objective for Improving Multi-Relational Graph Representations (AKBC 2021).
Code for the paper Relation Prediction as an Auxiliary Training Objective for Improving Multi-Relational Graph Representations (AKBC 2021).

Relation Prediction as an Auxiliary Training Objective for Knowledge Base Completion This repo provides the code for the paper Relation Prediction as

Information-Theoretic Multi-Objective Bayesian Optimization with Continuous Approximations

Information-Theoretic Multi-Objective Bayesian Optimization with Continuous Approximations Requirements The code is implemented in Python and requires

HistoSeg : Quick attention with multi-loss function for multi-structure segmentation in digital histology images

HistoSeg : Quick attention with multi-loss function for multi-structure segmentation in digital histology images Histological Image Segmentation This

Official implementation of
Official implementation of "Learning Forward Dynamics Model and Informed Trajectory Sampler for Safe Quadruped Navigation" (RSS 2022)

Intro Official implementation of "Learning Forward Dynamics Model and Informed Trajectory Sampler for Safe Quadruped Navigation" Robotics:Science and

Objective of the repository is to learn and build machine learning models using Pytorch. 30DaysofML Using Pytorch
Objective of the repository is to learn and build machine learning models using Pytorch. 30DaysofML Using Pytorch

30 Days Of Machine Learning Using Pytorch Objective of the repository is to learn and build machine learning models using Pytorch. List of Algorithms

Simple and Robust Loss Design for Multi-Label Learning with Missing Labels
Simple and Robust Loss Design for Multi-Label Learning with Missing Labels

Simple and Robust Loss Design for Multi-Label Learning with Missing Labels Official PyTorch Implementation of the paper Simple and Robust Loss Design

Pytorch Implementation of Interaction Networks for Learning about Objects, Relations and Physics

Interaction-Network-Pytorch Pytorch Implementraion of Interaction Networks for Learning about Objects, Relations and Physics. Interaction Network is a

Owner
Rafael Bischof
Rafael Bischof
Must-read Papers on Physics-Informed Neural Networks.

PINNpapers Contributed by IDRL lab. Introduction Physics-Informed Neural Network (PINN) has achieved great success in scientific computing since 2017.

IDRL 330 Jan 7, 2023
Physics-informed convolutional-recurrent neural networks for solving spatiotemporal PDEs

PhyCRNet Physics-informed convolutional-recurrent neural networks for solving spatiotemporal PDEs Paper link: [ArXiv] By: Pu Ren, Chengping Rao, Yang

Pu Ren 11 Aug 23, 2022
PINN(s): Physics-Informed Neural Network(s) for von Karman vortex street

PINN(s): Physics-Informed Neural Network(s) for von Karman vortex street This is

ShotaDEGUCHI 2 Apr 18, 2022
Official implementation of NeurIPS 2021 paper "One Loss for All: Deep Hashing with a Single Cosine Similarity based Learning Objective"

Official implementation of NeurIPS 2021 paper "One Loss for All: Deep Hashing with a Single Cosine Similarity based Learning Objective"

Ng Kam Woh 71 Dec 22, 2022
Implement of "Training deep neural networks via direct loss minimization" in PyTorch for 0-1 loss

This is the implementation of "Training deep neural networks via direct loss minimization" published at ICML 2016 in PyTorch. The implementation targe

Cuong Nguyen 1 Jan 18, 2022
Code for the paper "Balancing Training for Multilingual Neural Machine Translation, ACL 2020"

Balancing Training for Multilingual Neural Machine Translation Implementation of the paper Balancing Training for Multilingual Neural Machine Translat

Xinyi Wang 21 May 18, 2022
[ICML 2020] Prediction-Guided Multi-Objective Reinforcement Learning for Continuous Robot Control

PG-MORL This repository contains the implementation for the paper Prediction-Guided Multi-Objective Reinforcement Learning for Continuous Robot Contro

MIT Graphics Group 65 Jan 7, 2023
Multi-objective gym environments for reinforcement learning.

MO-Gym: Multi-Objective Reinforcement Learning Environments Gym environments for multi-objective reinforcement learning (MORL). The environments follo

Lucas Alegre 74 Jan 3, 2023
Recall Loss for Semantic Segmentation (This repo implements the paper: Recall Loss for Semantic Segmentation)

Recall Loss for Semantic Segmentation (This repo implements the paper: Recall Loss for Semantic Segmentation) Download Synthia dataset The model uses

null 32 Sep 21, 2022
An implementation for the loss function proposed in Decoupled Contrastive Loss paper.

Decoupled-Contrastive-Learning This repository is an implementation for the loss function proposed in Decoupled Contrastive Loss paper. Requirements P

Ramin Nakhli 71 Dec 4, 2022