Conflict handling on the update that is actually applied
Gradient-surgery methods construct a direction with a desired multi-objective geometry before optimizer transformation. However, modern optimizers can alter this direction through historical state, adaptive scaling, preconditioning, or decoupled weight decay.
Let
the optimizer proposal may satisfy
We call this optimizer-induced discrepancy Gradient-Update Mismatch (GUM).
Gradient-Update Alignment (GUA) operates after optimizer transformation.
Given the optimizer proposal
The aligned update
For stateful optimizers, GUA can additionally align the optimizer state toward a state reconstructed from the applied update.
| Symbol | Role |
|---|---|
| Loss-specific gradient | |
| Direction constructed by a gradient-surgery method before optimizer transformation | |
| Optimizer proposal after optimizer transformation | |
| Aligned update applied to the parameters |
Using the two-loss Burgers problem with ConFIG and Adam as a representative
example, we visualize how GUM arises during training and how GUA acts on the
resulting optimizer proposal. Importantly, GUM is not specific to the ConFIG–Adam combination. The same phenomenon can arise with other gradient surgery methods and optimizers.
The animation below follows a real training trajectory. The shaded region
denotes the current conflict-free cone. ConFIG constructs the pre-optimizer
direction
The static slice below shows a representative step from the same
Burgers--ConFIG--Adam setting and makes the directional geometry easier to
inspect. All displayed vectors are normalized, so only their directions are
shown. The coordinate system is also rotated so that
Across six PDE benchmarks and two- and three-loss decompositions, GUA eliminates update-level conflicts in the evaluated PINN settings and consistently improves performance across gradient-surgery methods.
arXiv. Gradient-Update Mismatch: Rethinking Conflict-Free Training of Physics-Informed Neural Networks.
Abstract.
Training Physics-Informed Neural Networks (PINNs) requires jointly optimizing
physics residual and initial/boundary condition loss terms, which often induce
conflicting gradients. Gradient surgery methods mitigate this issue by constructing directions from
loss-specific gradients to reduce conflict before optimizer transformation.
However, even when the constructed direction is conflict-free, this property
may not be preserved after optimizer transformation. Let
If you find this work useful, please cite:
@misc{xiao2026gradientupdatemismatchrethinkingconflictfree,
title = {Gradient-Update Mismatch: Rethinking Conflict-Free Training of Physics-Informed Neural Networks},
author = {Jing Xiao and Xinhai Chen and Qinglin Wang and Menghan Jia and Zhiquan Lai and Dongsheng Li and Jie Liu and Tiejun Li},
year = {2026},
eprint = {2609.01558},
archivePrefix = {arXiv},
primaryClass = {cs.LG},
url = {https://arxiv.org/abs/2609.01558},
}This project is licensed under the MIT License. See LICENSE for details.
This repository is based on and extends the official implementation of ConFIG:
Qiang Liu, Mengyu Chu, and Nils Thuerey. ConFIG: Towards Conflict-free Training of Physics Informed Neural Networks.
We thank the authors for publicly releasing the ConFIG implementation.
The original ConFIG implementation is licensed under the MIT License.
git clone <YOUR_REPOSITORY_URL>
cd <YOUR_REPOSITORY_NAME>The reference environment uses Python 3.10.12, PyTorch 2.12.0, torchvision 0.27.0, and CUDA 13.0. Each reported experiment was run on a single NVIDIA GeForce RTX 4090 GPU.
We recommend creating a clean Conda environment:
conda create -n gua python=3.10.12
conda activate guaInstall the reference PyTorch build:
pip install torch==2.12.0 torchvision==0.27.0 \
--index-url https://download.pytorch.org/whl/cu130Then install the remaining dependencies:
pip install -r requirements.txtconflictfree/ Core gradient, conflict, and projection operators
experiments/PINN/ PINN equations, trainers, and optimizer integration
experiments/MTL/ CelebA multi-task trainer and GUA adapter
docs/assets/ Figures and README visualizations
The Burgers and Schrodinger reference files are included in
experiments/PINN/data/
The remaining PINN evaluation sets are generated according to the benchmark-specific equation protocols included in the repository.
Users only need to select the equation, gradient-surgery method, loss decomposition, and whether GUA is enabled. The optimizer and all remaining optimization settings use the repository defaults.
The main options are:
--equation <equation>
--method <method>
--n-losses <2|3>
--optimizer-correction <none|gua>
| Argument | Accepted values | Meaning |
|---|---|---|
--equation |
burgers, schrodinger, heat, beltrami, kovasznay, poisson5d |
PINN equation to train |
--method |
config, pcgrad, cagrad, upgrad, aligned_mtl, imtlg |
Gradient-surgery method |
--n-losses |
2, 3 |
Loss decomposition. All equations support 2, while 3 is available for Burgers, Schrodinger, Heat-MS, and Beltrami |
--optimizer-correction |
none, gua |
Disable or enable Gradient-Update Alignment |
Baseline ConFIG:
python experiments/PINN/trainer.py \
--equation burgers \
--method config \
--n-losses 2 \
--optimizer-correction noneConFIG with GUA:
python experiments/PINN/trainer.py \
--equation burgers \
--method config \
--n-losses 2 \
--optimizer-correction guaBoth commands above run one trial with the default paper seed, seed 0.
To reproduce the five-seed PINN evaluation reported in the paper, set
--num-run 5. For example, the following command runs ConFIG with GUA using
seeds 0--4:
python experiments/PINN/trainer.py \
--equation burgers \
--method config \
--n-losses 2 \
--optimizer-correction gua \
--num-run 5For the corresponding five-seed baseline, change
--optimizer-correction gua to --optimizer-correction none. To run one
specific seed, use --random-seed <seed>.
The available equations and methods can also be inspected with:
python experiments/PINN/trainer.py --helpCelebA is not redistributed with this repository. Follow the data-preparation instructions provided by the public FAMO or ConFIG implementations, then place the prepared dataset in the following directory structure:
experiments/MTL/celeba/dataset/
Anno/list_attr_celeba.txt
Eval/list_eval_partition.txt
Img/img_align_celeba/
The CelebA entry point evaluates how ConFIG with and without GUA behaves as
task cardinality increases. The supported task counts are
2, 3, 5, 10, 20, 30, and 40.
The single-run examples below use the default paper seed, seed 0.
Baseline ConFIG:
python experiments/MTL/celeba/trainer.py \
--method config \
--num-tasks 10 \
--optimizer-correction noneConFIG with GUA:
python experiments/MTL/celeba/trainer.py \
--method config \
--num-tasks 10 \
--optimizer-correction guaThe CelebA results reported in the paper use seeds 0--2. They can be run with
--seeds 0,1,2 --num-run 3
Use --data-path when the prepared dataset is stored outside the repository,
and --save-dir to select the output directory.



