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

Owner
Rafael Bischof
Rafael Bischof
Moment-DETR code and QVHighlights dataset

Moment-DETR QVHighlights: Detecting Moments and Highlights in Videos via Natural Language Queries Jie Lei, Tamara L. Berg, Mohit Bansal For dataset de

Jie Lei 雷杰 133 Dec 22, 2022
This repository implements variational graph auto encoder by Thomas Kipf.

Variational Graph Auto-encoder in Pytorch This repository implements variational graph auto-encoder by Thomas Kipf. For details of the model, refer to

DaehanKim 215 Jan 02, 2023
CausalNLP is a practical toolkit for causal inference with text as treatment, outcome, or "controlled-for" variable.

CausalNLP CausalNLP is a practical toolkit for causal inference with text as treatment, outcome, or "controlled-for" variable. Install pip install -U

Arun S. Maiya 95 Jan 03, 2023
ElasticFace: Elastic Margin Loss for Deep Face Recognition

This is the official repository of the paper: ElasticFace: Elastic Margin Loss for Deep Face Recognition Paper on arxiv: arxiv Model Log file Pretrain

Fadi Boutros 113 Dec 14, 2022
TriMap: Large-scale Dimensionality Reduction Using Triplets

TriMap TriMap is a dimensionality reduction method that uses triplet constraints to form a low-dimensional embedding of a set of points. The triplet c

Ehsan Amid 235 Dec 24, 2022
Repository for benchmarking graph neural networks

Benchmarking Graph Neural Networks Updates Nov 2, 2020 Project based on DGL 0.4.2. See the relevant dependencies defined in the environment yml files

NTU Graph Deep Learning Lab 2k Jan 03, 2023
Training code and evaluation benchmarks for the "Self-Supervised Policy Adaptation during Deployment" paper.

Self-Supervised Policy Adaptation during Deployment PyTorch implementation of PAD and evaluation benchmarks from Self-Supervised Policy Adaptation dur

Nicklas Hansen 101 Nov 01, 2022
A scanpy extension to analyse single-cell TCR and BCR data.

Scirpy: A Scanpy extension for analyzing single-cell immune-cell receptor sequencing data Scirpy is a scalable python-toolkit to analyse T cell recept

ICBI 145 Jan 03, 2023
Self-supervised Augmentation Consistency for Adapting Semantic Segmentation (CVPR 2021)

Self-supervised Augmentation Consistency for Adapting Semantic Segmentation This repository contains the official implementation of our paper: Self-su

Visual Inference Lab @TU Darmstadt 132 Dec 21, 2022
Code for the Convolutional Vision Transformer (ConViT)

ConViT : Vision Transformers with Convolutional Inductive Biases This repository contains PyTorch code for ConViT. It builds on code from the Data-Eff

Facebook Research 418 Jan 06, 2023
Lipstick ain't enough: Beyond Color-Matching for In-the-Wild Makeup Transfer (CVPR 2021)

Table of Content Introduction Datasets Getting Started Requirements Usage Example Training & Evaluation CPM: Color-Pattern Makeup Transfer CPM is a ho

VinAI Research 248 Dec 13, 2022
Repository for "Space-Time Correspondence as a Contrastive Random Walk" (NeurIPS 2020)

Space-Time Correspondence as a Contrastive Random Walk This is the repository for Space-Time Correspondence as a Contrastive Random Walk, published at

A. Jabri 239 Dec 27, 2022
SurfEmb (CVPR 2022) - SurfEmb: Dense and Continuous Correspondence Distributions

SurfEmb SurfEmb: Dense and Continuous Correspondence Distributions for Object Pose Estimation with Learnt Surface Embeddings Rasmus Laurvig Haugard, A

Rasmus Haugaard 56 Nov 19, 2022
The World of an Octopus: How Reporting Bias Influences a Language Model's Perception of Color

The World of an Octopus: How Reporting Bias Influences a Language Model's Perception of Color Overview Code and dataset for The World of an Octopus: H

1 Nov 13, 2021
PERIN is Permutation-Invariant Semantic Parser developed for MRP 2020

PERIN: Permutation-invariant Semantic Parsing David Samuel & Milan Straka Charles University Faculty of Mathematics and Physics Institute of Formal an

ÚFAL 40 Jan 04, 2023
[3DV 2021] A Dataset-Dispersion Perspective on Reconstruction Versus Recognition in Single-View 3D Reconstruction Networks

dispersion-score Official implementation of 3DV 2021 Paper A Dataset-dispersion Perspective on Reconstruction versus Recognition in Single-view 3D Rec

Yefan 7 May 28, 2022
This repository implements Douzero's interface to IGCA.

douzero-interface-for-ICGA This repository implements Douzero's interface to ICGA. ./douzero: This directory stores Doudizhu AI projects. ./interface:

zhanggenjin 4 Aug 07, 2022
Tutorial materials for Part of NSU Intro to Deep Learning with PyTorch.

Intro to Deep Learning Materials are part of North South University (NSU) Intro to Deep Learning with PyTorch workshop series. (Slides) Related materi

Hasib Zunair 9 Jun 08, 2022
Zero-Shot Text-to-Image Generation VQGAN+CLIP Dockerized

VQGAN-CLIP-Docker About Zero-Shot Text-to-Image Generation VQGAN+CLIP Dockerized This is a stripped and minimal dependency repository for running loca

Kevin Costa 73 Sep 11, 2022
Large Scale Fine-Grained Categorization and Domain-Specific Transfer Learning. CVPR 2018

Large Scale Fine-Grained Categorization and Domain-Specific Transfer Learning Tensorflow code and models for the paper: Large Scale Fine-Grained Categ

Yin Cui 187 Oct 01, 2022