Manuscript Offprint
arXiv:2610.31855Cautious Conflict-Free Inverse Gradient Methods
ABSTRACT
Partial differential equations (PDEs) are indispensable tools for modeling complex phenomena in physics and engineering. Physics-Informed Neural Networks (PINNs) have emerged as a powerful alternative to traditional numerical solvers by directly incorporating physical constraints into neural network loss functions. Despite their advantages, PINN training requires multi-objective optimization, which often leads to significant gradient conflicts among boundary, initial, and residual loss terms. The Conflict-Free Inverse Gradient (ConFIG) method addresses these conflicts; however, integrating ConFIG with adaptive optimizers such as Adam introduces a critical vulnerability: the conflict-free direction generated by ConFIG is further processed by the optimizer, and the resulting weight update may no longer be conflict-free with respect to the task gradients. To address this issue, Cautious ConFIG is proposed as a concise three-line extension to the ConFIG algorithm that empirically restores the conflict-freeness guarantee prior to the weight update. The method is evaluated on three PINN benchmarks: the 1D Viscous Burgers' equation, the 1D Nonlinear Schrödinger equation, and the 2D Kovasznay flow. Experimental results demonstrate consistent performance improvements over the standard ConFIG baseline. Additionally, the stabilizing effect of cautious masking and its reaction to conflict severity, task number, and optimizer lag are investigated using a simple toy system. The code is available at https://github.com/damiha/CautiousConFIG
1 INTRODUCTION
Partial differential equations (PDEs) are widely applied in physics Sommerfeld (1949), chemistry Jamwal et al. (2025), engineering Ames (1965), and finance Duffy (2013) to model complex phenomena that evolve over space and time. These equations implicitly define a function of several variables, and solving a PDE with given initial and boundary conditions involves determining this function. Traditionally, PDEs and their initial boundary value (IBV) problems are solved using numerical methods that discretize the domain into a finite set of subregions. The solution function is then represented as a set of values corresponding to these subregions. For example, the PDE can be reformulated as a time-stepping rule by approximating partial derivatives with finite differences. Discretization may introduce artifacts, particularly for complex geometries, and the number of subregions can increase exponentially with the number of dimensions, a phenomenon known as the curse of dimensionality Bellman (2015). Physics-informed neural networks (PINNs) Raissi et al. (2019) have gained significant attention in recent years by directly parameterizing the solution function with a neural network. This approach mitigates discretization errors and alleviates the curse of dimensionality. As a mesh-free method, it is well-suited for complex geometries. Furthermore, formulating IBV problems as neural network training enables the utilization of recent advances in deep learning architectures and optimization techniques. However, PINNs also present limitations, as deep learning methods are less well-understood regarding error analysis and generalization compared to classical numerical approaches. While numerical methods reliably yield solutions when conditions such as the Courant-Friedrichs-Lewy criterion Courant et al. (1952) are satisfied, training a neural network in a high-dimensional loss landscape can be unpredictable. One notable challenge in PINN training is gradient interference. Each IBV condition is formulated as a separate loss function, and the resulting gradients can interact adversely, severely hindering convergence. The ConFIG method Liu et al. (2025) was developed to address the gradient interference problem by computing an update direction that is conflict-free with respect to all task gradients. However, the ConFIG direction typically serves as an input to another optimizer, such as Adam Kingma & Ba (2014), and the resulting update direction may not remain conflict-free with respect to the task gradients. Consequently, the conflict-freeness property is often lost before the weight update is applied. Our contributions are as follows:
• We introduce Cautious ConFIG, a simple three-line extension compatible with any ConFIG-optimizer combination. It incurs negligible computational overhead, is easily parallelizable on the GPU, and effectively restores ConFIG's mathematical properties.
• We evaluate Cautious ConFIG on three challenging PINN benchmarks: the 1D viscous Burgers equation, the 1D nonlinear Schrödinger equation, and the 2D Kovasznay flow, observing substantial performance improvements over the baseline (19% to 28% relative improvement).
• We analyze the effectiveness of Cautious ConFIG by monitoring key metrics during PINN training and present a computational model demonstrating that Cautious ConFIG produces update directions that align more closely with task gradients under conditions of severe conflict, numerous tasks, and significant optimizer lag.
The initial values of are specified by the initial operator , while boundary values and their derivatives are defined using the boundary operator . The partial differential equation (PDE) itself constitutes only a component of the PDE operator . IBV problems are commonly addressed using traditional numerical schemes, such as finite-difference or finite-element methods. In this work, we employ physics-informed neural networks (PINNs) Raissi et al. (2019) to solve these problems. The conditions, represented by the operators , , and , are reformulated as loss functions. We denote the number of loss functions as . The solution field is approximated by , a neural network parameterized by :
The loss functions are differentiable with respect to because the neural network is fully differentiable with respect to and . Consequently, these loss functions can be computed using an autograd engine such as PyTorch Paszke et al. (2019). As a result, solving an IBV problem is reformulated as an optimization problem involving loss functions. Minimizing loss functions falls within the domain of multi-task learning (MTL). When all loss functions are differentiable with respect to , gradient-based optimization techniques can be applied. A common approach is to form a linear combination of the loss functions, resulting in a single scalar loss function . Classic optimization methods, such as gradient descent, can then be used to minimize . However, these scalarization-based approaches are susceptible to gradient conflicts. Gradient conflicts as a source of problems in MTL training were first identified by Yu et al. (2020). Two gradients and (corresponding to the loss functions and respectively) are said to exhibit a gradient conflict when . If one gradient is significantly larger than the other, the resulting update direction , which is a linear combination of and , may conflict with one of them, indicated by a negative dot product with or . Updating parameters in the direction can therefore minimize one loss while increasing another, provided the learning rate is sufficiently small. This outcome is undesirable. Furthermore, if the gradients point in opposite directions, they may cancel, thereby slowing down learning. The susceptibility of PINNs to gradient conflicts is demonstrated in Liu et al. (2025). At a specific location in parameter space, the gradients are fixed, assuming the input is not randomized. Each gradient defines a set of directions that are conflict-free with respect to it. This is referred to as the half-space . The task gradient acts as the normal vector to a hyperplane, with representing one side of this hyperplane. The intersection of all gradient half-spaces defines the set of common-descent or conflict-free directions . Updating the weights in the direction , where , ensures that all losses decrease, provided is sufficiently small. A specific optimization direction within is defined by the Conflict-Free Inverse Gradient (ConFIG) Liu et al. (2025) method. The optimization direction is constructed to have positive and equal cosine similarities with all gradients . This direction is given by the following equations:
The normalization scales all task gradients to unit norm, ensuring that the direction of is independent of the magnitudes of . The scalar factor functions as a conflict-aware learning rate. Previous discussion has focused exclusively on spatial conflicts, which are intrinsic to and are associated with specific regions in parameter space. However, the use of momentum-based optimizers such as Adam Kingma & Ba (2014) can also introduce conflicts. When the current gradient is provided as input to such an optimizer, it updates the optimizer's internal state. The optimizer's output combines the current gradient with state variables that accumulate the history of past gradients throughout the optimization process. The weights are updated with , but it is possible that . In this case, the current gradient does not sufficiently influence the optimizer state, resulting in a weight update that increases the loss. This clash between the present (represented by ) and the past (represented by ) is referred to as a temporal conflict. Temporal conflicts can be addressed by employing a cautious update Liang et al. (2026), defined as follows:
Masking updates where and disagree ensures that . The cautious rescaling factor maintains at approximately the same norm as .
3 RELATED WORK
The proposed method, Cautious ConFIG, is directly derived from the ConFIG method Liu et al. (2025) and cautious optimizers Courant et al. (1952). ConFIG addresses spatial conflicts, whereas cautious updates resolve temporal conflicts introduced by adaptive optimizers. Several alternatives to ConFIG exist for resolving spatial conflicts. The PCGrad method Yu et al. (2020) subtracts the projection of one gradient from another to eliminate pairwise gradient conflicts. This process removes shared directional components, thereby preventing gradient interference. However, because these subtractions are performed randomly before summing the cleaned gradients, PCGrad cannot guarantee, as ConFIG does, that is conflict-free with respect to the input gradients. Nash-MTL Navon et al. (2022) formulates multi-task learning as a game and derives a conflict-free direction using the Nash bargaining solution. CAGrad Liu et al. (2021) identifies a conflict-free direction that maximizes the minimum dot product with all task gradients while remaining close to the average gradient . Early methods for resolving temporal conflicts include RProp Riedmiller & Braun (1993), which compares gradients and elementwise based on their sign. If the signs agree, the parameter-specific learning rate is increased multiplicatively; otherwise, the learning rate is decreased. Magma Joo et al. (2026) represents another alternative to cautious optimizers. In Magma, the cosine similarity between u and g is computed for each parameter group, such as a weight matrix in a neural network. The number of gradient updates skipped depends on the cosine similarity. The norm lost due to masking is redistributed to the remaining coordinates, analogous to the approach used in cautious optimizers. The work most closely related to Cautious ConFIG is Gradient Update Mismatch (GUM) Xiao et al. (2026), which was developed concurrently; therefore, a direct comparison is not provided. GUM addresses the same issue, namely conflicts arising from introducing an optimizer after ConFIG, referred to as gradient update mismatch. The authors specifically analyze the Adam and ConFIG combination and evaluate their approach on the same IBV problems (Burgers, Schrödinger, Kovasznay). However, notable differences exist between their proposed solution, Gradient Update Alignment (GUA), and Cautious ConFIG regarding geometric approach and solution complexity. In GUA, the optimizer output u is projected onto C, referred to as the conflict-free cone. This projection is achieved by solving a quadratic program, where a custom metric , such as the Adam metric, may be employed. In contrast, Cautious ConFIG projects u onto the orthant defined by , resulting in a solution that is invariant to the choice of metric. While solving a quadratic program in GUA requires an active set solver, which is challenging to parallelize on GPUs due to branching logic, the Cautious ConFIG approach is easily parallelizable, involving only the application of a binary mask. Furthermore, Cautious ConFIG is significantly simpler to implement, requiring only three lines of code compared to more than 120 lines for the GUA projection logic. Additionally, GUA introduces a state-alignment procedure that updates the optimizer state after projection using an exponential moving average update of Adam's m and v, introducing two new hyperparameters, and , that require tuning. Cautious ConFIG does not introduce any new hyperparameters.
4 PROPOSED APPROACH
4.1 PROBLEM
ConFIG computes a direction denoted as . This direction satisfies for all task gradients . In other words, ConFIG generates a direction that is conflict-free with respect to all task gradients. If the ConFIG direction is used for the weight update , then all losses decrease after the optimization step, provided the learning rate is sufficiently small. In practical applications, ConFIG serves as an input to another optimizer, such as Adam. Adam incorporates both momentum and adaptiveness, and both aspects can lead to a loss of the conflict-freeness guarantee. Although a direction conflict-free with the task gradients is provided to Adam, the resulting direction may not retain this property. This output direction is then used in the weight update. Adam updates the weights in the direction . When is set to , adaptiveness is disabled. In this scenario, updating with can still be problematic because the current first moment consists of and only (for the default setting ). If was not conflict-free with the task gradients, might also lack conflict-freeness, as may not adjust the first moment sufficiently quickly. Consequently, the weights may move in a conflicting direction. Adaptiveness can also result in the loss of the conflict-freeness property. When , the update is performed as . This corresponds to gradient descent with the Adam metric . The ConFIG algorithm ensures (conflict-freeness with respect to the Euclidean metric), but not . As a result, the weights may again move in a conflicting direction.
4.2 CAUTIOUS CONFIG
The optimizer can be regarded as a black box that transforms into , which is subsequently used for the weight update. A key issue arises when the directions of and strongly diverge. When and exhibit low cosine similarity, and also tend to have low similarity, at least heuristically. The objective is to transform into a direction that maintains a positive dot product with all task gradients. This is achieved through a soft alignment strategy, which brings closer to . Since exhibits maximally large cosine similarities with all task gradients as the maximum angular margin solution, aligning with is expected to increase its cosine similarity with all task gradients. This hypothesis is supported by the experimental results shown in Figure [REF]. Cautious ConFIG constitutes a concise extension

Figure 1: The output of "Adam + ConFIG" is post-processed using a cautious update to tie it closer to the conflict-free input.
to the Adam + ConFIG combination (see Algorithm 1 for the pseudo code and Figure 1 for the pipeline). The optimizer output is adjusted towards through a cautious update, ensuring that (see Proposition A). In this approach, serves as a geometric anchor, selecting an orthant for orthogonal projection, followed by rescaling to preserve the norm. The geometric interpretation is depicted in Figure 2. Because is centrally located within the conflict-free cone , the selected orthant typically overlaps substantially with this cone. Projecting onto the orthant frequently results in being a common descent direction. Since multiplying with a binary mask

Figure 2: Cautious ConFIG projects the optimizer output u onto the orthant given by
ensures (see Proposition A), we could turn into a conflict-free direction just by masking alone. We would calculate and then multiply elementwise with . This process, known as hard alignment, aligns directly with the task gradients . In this scenario, becomes unnecessary because conflict-freeness is achieved solely through masking. The downside of this is that the number of parameters updated decreases exponentially in (all gradient components have to agree on the same sign, assuming each sign occurs with probability , the number of updated parameters is proportional to ). This exponential reduction in updated parameters negates the benefits of multi-task learning and leads to rapid destabilization, as the exponentially reduced set of updated parameters receives a proportionally high learning rate. Therefore, to eliminate dependence on , the number of tasks, cautious masking should be applied only once to enforce alignment of with a single target direction that summarizes all m task gradients. This summary direction is the ConFIG direction.
Algorithm 1 Cautious ConFIG
1: 2: 3: for to n_epochs do 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: end for
▷ First momentum ▷ Second momentum ▷ m backward passes ▷ Debias first momentum ▷ Debias second momentum ▷ Calculate Adam direction ▷ Binary mask ▷ Cautious rescaling ▷ Parameter update
5 EXPERIMENTS

(a) Baseline: Adam

(b) Baseline: Adam + ConFIG
Figure 3: Relative improvement to the baseline
Cautious ConFIG is evaluated on three nonlinear PDEs: the 1D viscous Burgers equation, the 1D nonlinear Schrödinger equation, and the 2D Kovasznay flow. Definitions of the IBVs are provided in Appendix A. The minimum mean squared error (MSE) between the PINN prediction and the numerical solution achieved during training is used as the scalar performance metric. Figure 3 presents these results. The results indicate that Cautious ConFIG yields substantial relative improvements over both plain Adam, where gradient conflicts are present, and Adam + ConFIG, where the mathematical guarantees of ConFIG are not preserved at the optimizer output. The observed relative improvement ranges from 19% to 28% compared to Adam + ConFIG. Shared hyperparameters are listed in Table 3 and are consistent with those used in the original ConFIG study. However, PINN-specific hyperparameters, such as the number of sampling points for the domain boundary and interior, and the number of training epochs, differ from those in the original paper due to time and resource constraints. Consequently, the minimum MSE values are not directly comparable to those reported previously. The key finding is that the relative improvement over Adam + ConFIG remains substantial. Table 1 demonstrates that both the mean MSE and its standard deviation, mea-
Table 1: Mean Squared Error (MSE) and standard deviation over 10 random seeds for Viscous Burgers, Nonlinear Schrödinger, and Kovasznay flow.
| Optimizer | MSE | ||
|---|---|---|---|
| Burgers () | Schrödinger () | Kovasznay () | |
| Cautious ConFIG (ours) | |||
| Adam + ConFIG | |||
| Adam + Caution | |||
| Adam | |||
sured over 10 random seeds, are reduced. Cautious ConFIG exhibits higher performance and can be trained with greater stability. Figure 7 presents three versions of the Kovasznay flow problem with varying numbers of tasks (). Cautious ConFIG converges more rapidly in the initial stages, and the performance gap increases as the number of tasks grows. This advantage for larger will be further illustrated in the subsequent toy model.
6 ANALYSIS
We identify two primary aspects in which Cautious ConFIG demonstrates improvements over the Adam + ConFIG baseline: better distribution of update energy and improved directional alignment. We define the norm of the vector as the update energy. Cautious ConFIG skips the gradient update for parameter when does not equal . Zeroing out a component reduces the vector's update energy. To conserve total update energy, the cautious rescaling factor is applied to all remaining components. Consequently, update energy is redistributed from conflicting to non-conflicting coordinates. This redistribution is advantageous, as other optimizers such as RMSProp Hinton (2012) and Grams Cao et al. (2024), whose update vector is constrained to the orthant of , but who lack a redistribution mechanism, do not perform as well as Cautious ConFIG, as shown in Table 2. Grams, in particular, applies coordinatewise sign flips to mirror into the correct orthant. Experimental results indicate that merely aligning with the ConFIG orthant is insufficient; redistribution of update energy is also required. In coordinates where and disagree, the sign of should not always be trusted. In such sign conflicts, which indicate uncertainty, it is preferable to skip the update and redistribute the update energy. The second aspect, improved directional alignment, is the primary focus of our analysis. By this, we refer to the following points:
-
Cautious ConFIG always increases the cosine similarity to compared to the unmodified optimizer output (see Proposition A)
-
Empirical results show that the cosine similarity between and all task gradients is higher than that between the unmodified output and , as confirmed by Figure 4.
-
Cautious ConFIG produces trajectories in parameter space with fewer conflicts between different task gradients, as supported by Figure 5. This reduction in conflicts alleviates the need for conflict resolution, since conflicts between task gradients are a necessary condition for conflicts between a task gradient and a conic combination of task gradients.
-
The Adam input exhibits greater magnitude under Cautious ConFIG compared to the baseline, due to the reduced conflicts among task gradients along Cautious ConFIG trajectories. Figure 6 provides supporting evidence.
To analyze this second aspect, we consider a toy model that enables comparison of Cautious ConFIG and the baseline Adam + ConFIG as the number of tasks increases, optimizer lag grows, intrinsic conflict between task gradients intensifies, and the number of parameters rises. We observe that in the first three settings, conflict resolution becomes more challenging and the baseline's ability to produce conflict-free directions declines rapidly, whereas Cautious ConFIG maintains high directional alignment. In contrast, increasing the number of parameters facilitates conflict resolution, and Cautious ConFIG's performance accelerates this improvement.
| Optimizer | MSE |
|---|---|
| Cautious ConFIG | |
| Adam + ConFIG | |
| Grams + ConFIG | |
| RMSProp + ConFIG |
Table 2: Burgers Equation, All values are scaled with . Mean and standard deviation over 10 random seeds.
TOY MODEL FOR DIRECTIONAL STABILITY
CONFLICT MODEL
Initially, the task gradients were generated by drawing vectors from a multivariate standard normal distribution . This model requires specification of only the hyperparameters and and is straightforward to analyze. However, when is large, as in deep learning applications, all task gradients become approximately pairwise orthogonal. This scenario does not reflect the PINN setting, where significant intrinsic gradient conflicts persist even in high-dimensional spaces (see Figure 5). Additionally, this approach does not allow for investigation of the impact of conflict strength on the method. This consideration is important because conflicts are most pronounced at the beginning of training and diminish over time (see Figure 5). Notably, Cautious ConFIG demonstrates substantial performance improvements over ConFIG during this initial high-conflict phase (see Figure 7), indicating the need to focus on this period. Instead, a direction is initially sampled from a multivariate standard normal distribution and then normalized. This vector serves as the "conflict axis." Half of the task gradients are aligned with the conflict axis, while the other half are oriented in the opposite direction. The conflict strength linearly interpolates between the pure conflict direction (either along or opposite to the conflict axis) and a normally distributed noise vector:
The proposed model enables the representation of gradient conflicts within high-dimensional spaces. When , the model exhibits maximal gradient conflicts, as half of the gradients are oriented in one direction while the remaining half are oriented oppositely. When , each task gradient is sampled from a multivariate standard normal distribution, thereby recovering the simpler model described previously. The model also reflects that, in PINNs, initial and boundary conditions typically do not exhibit significant gradient conflicts. Initial conditions are a specific type of boundary condition. In contrast, boundary conditions often display substantial gradient conflicts with the residual task gradient. To evaluate the conflict model, the intra-alignment score can be calculated as defined by Wang et al. (2026). This metric generalizes cosine similarity, which corresponds to the intra-alignment score when . The intra-alignment score remains below zero because, by construction, there are always two groups of tasks that are opposed. As the number of tasks increases, the number of conflicts also increases, resulting in a lower intra-alignment score. Additionally, the score rapidly approaches -1.0 (the lowest value) for all as the conflict strength exceeds 0.9.
OPTIMIZER MODEL
With the given task gradients , we can calculate the corresponding . Then we have to compare an adaptive optimizer's output with its cautious counterpart . Adam e.g. has

(a) Burgers

(b) Kovasznay (three losses)
Figure 4: Cosine similarity between update direction and task gradients

(a) Burgers

(b) Kovasznay (three losses)
Figure 5: Task conflicts quantified via gradient cosine similarities during the initial training phase across different PINNs

(a) Burgers

(b) Kovasznay (two losses)

(c) Kovasznay (three losses)
Figure 6: ConFIG scaling factor during early epochs

(a) Kovasznay (two losses)
(b) Kovasznay (three losses)
(c) Kovasznay (six losses)
Figure 7: Cautious ConFIG converges faster than the Adam + ConFIG baseline. The performance gap widens with more tasks.

Figure 8: Impact of conflict strength and different numbers of tasks on the intra-alignment Score an internal state which is not modeled here, as including it would complicate the analysis. The directional model presented is purely static. The optimizer output is modeled as the true value plus isotropic noise . Then, we can also calculate the cautious direction:
The cautious scaling factor can be omitted, as it affects only the magnitude of , but not its direction. Since the analysis focuses on cosine similarities, and whether the resulting direction is a common descent direction (i.e., within the intersection of all conflict-free half spaces), this factor is not considered here. Our formulation can model momentum-based optimizers. When is high, the optimizer lags behind , which can be represented by high . However, it does not describe adaptive optimizers like Adam or RMSProp, as preconditioning with the inverse metric distorts the space.
QUALITATIVE ANALYSIS
Given , , and a set of task gradients , it is possible to compute both the likelihood that the optimizer output is conflict-free and the average cosine similarity with the task gradients:
The first quantity evaluates whether Cautious ConFIG restores the common descent property in this simplified context, which requires all dot products to be positive. In contrast, the average cosine similarity may be disproportionately influenced by outliers, such as a single task gradient with which has high similarity. Nevertheless, average cosine similarity remains important for quantifying the degree of gradient alignment, which is a key factor in loss reduction. Figure 9 demonstrates
d = 1000,

Figure 9: The effect of conflict strength at constant optimizer noise. Cautious ConFIG (solid), ConFIG (dashed)
that as increases, the average cosine similarity between the optimizer output and the task gradients rapidly approaches zero, regardless of the number of tasks . In contrast, for , the decrease in average cosine similarity with increasing occurs at a much slower rate. Furthermore, an increase in the number of tasks results in a lower average cosine similarity, indicating that conflict resolution becomes more challenging as the number of losses increases. The probability of conflict-freeness also declines sharply at conflict strengths for , whereas it remains nearly 100% until for . Given the model , where , increasing (the optimizer noise) causes the optimizer input and output to become increasingly unaligned. This scenario can represent the behavior of a momentum-based optimizer without preconditioning as increases. Figure 10 illustrates this relationship. As optimizer noise increases, the probability that d = 1000, conflict_strength = 0.9

Figure 10: The effect of optimizer noise at constant conflict strength. Cautious ConFIG (solid), ConFIG (dashed)
is a descent direction rapidly decreases. Furthermore, the average cosine similarity approaches zero quickly, independent of m. In contrast, consistently exhibits a high probability of producing a common descent direction, and its average cosine similarity converges to a positive constant rather than decaying to zero. Notably, scenarios with fewer tasks display a slightly higher plateau, indicating that a reduced number of tasks facilitates conflict resolution. Figure 11 demonstrates
conflict_strength = 0.9,

Figure 11: The effect of model size at constant conflict strength and optimizer noise. Cautious ConFIG (solid), ConFIG (dashed)
that as the number of trainable parameters increases, the probability of being a conflict-free direction also increases. A high , which corresponds to a larger space for the conflict-free cone, facilitates conflict resolution. Previous results indicate that a low similarly eases conflict resolution, since the conflict-free cone is defined by the intersection of half-spaces and fewer intersections occur. However, the probability of being conflict-free increases only gradually with model size, and the average cosine similarity stagnates at a low positive value as model size grows. In contrast, for , the probability of conflict-freeness rises sharply at and remains near 100% for larger . In this case, anchoring amplifies the advantages of high . Furthermore, the average cosine similarity between and the task gradients plateaus at substantially higher values (exceeding 15%), and lower results in higher plateaus. Cautious masking eliminates the degeneracy in for the average cosine similarity and significantly increases the plateau values. Although this model greatly simplifies the situation by excluding preconditioning that distorts space and internal optimizer state, the probability of conflict-freeness and the average cosine similarity decrease rapidly when task conflicts are severe (high conflict strength ), the optimizer lag is large (modeled by high optimizer noise ), the number of model parameters is small (low ), or the number of tasks is high. In all of these scenarios, performance degradation is significantly slowed by cautious updates until conflicts reach their maximum (). Even in this extreme case, the average cosine similarity does not vanish but instead plateaus at a positive value significantly greater than zero. A high parameter count d facilitates conflict resolution, and this effect is further amplified by cautious masking.
7 CONCLUSION
In this paper, we identified that the mathematical guarantees of the ConFIG update direction are lost when this direction is used as input to an adaptive optimizer such as Adam. Consequently, the parameter update direction is no longer guaranteed to be conflict-free with respect to the task gradients. We proposed Cautious ConFIG, a simple three-line extension to ConFIG, which is easily parallelizable, introduces negligible computational overhead and does not require additional hyperparameters. Empirically, it restores the conflict-freeness property for the modified optimizer output prior to the parameter update. We evaluated Cautious ConFIG on three nonlinear PINN scenarios (Burgers, Schrödinger, Kovasznay) where it demonstrates a relative improvement of 19% to 28% over the baseline. Additionally, we present a toy model that demonstrates the superiority of Cautious ConFIG in task alignment under conditions of significant optimizer lag, numerous tasks, and pronounced gradient conflicts.
Promising future research directions include integrating cautious updates with other conflict-resolution algorithms such as PCGrad or Nash-MTL, which are also frequently used in conjunction with adaptive optimizers. In addition, it will be highly interesting to incorporate the method into physics-constrained generative models Baldan et al. (2026) and hybrid numerical methods Franz et al. (2025). On the theoretical side, the toy model we provide could be analyzed mathematically to derive relationships involving relevant quantities such as task number and conflict strength, as our current work is limited to computational experiments. Additionally, we could develop an improved toy system that incorporates both strong conflicts in high-dimensional spaces, as observed in the PINN setting, and a more realistic yet analytically tractable optimizer model.
REFERENCES
William F Ames. Nonlinear partial differential equations in engineering, volume 18. Academic press, 1965.
Giacomo Baldan, Qiang Liu, Albterto Guardone, and Nils Thuerey. Physics vs distributions: Pareto optimal flow matching with physics constraints. International Conference on Learning Representations (ICLR), 2026.
Richard E Bellman. Adaptive control processes: a guided tour. Princeton university press, 2015.
Yang Cao, Xiaoyu Li, and Zhao Song. Grams: Gradient descent with adaptive momentum scaling. arXiv preprint arXiv:2412.17107, 2024.
Richard Courant, Eugene Isaacson, and Mina Rees. On the solution of nonlinear hyperbolic differential equations by finite differences. Communications on pure and applied mathematics, 5(3):243–255, 1952.
Daniel J Duffy. Finite difference methods in financial engineering: a partial differential equation approach. John Wiley & Sons, 2013.
Aleksandra Franz, Hao Wei, Luca Guastoni, and Nils Thuerey. PICT – A Differentiable, GPU-Accelerated Multi-Block PISO Solver for Simulation-Coupled Learning Tasks in Fluid Dynamics. Journal of Computational Physics, 2025.
Geoffrey Hinton. rmsprop: Divide the gradient by a running average of its recent magnitude, 2012. URL https://www.cs.toronto.edu/~tijmen/csc321/slides/lecture_slides_lec6.pdf.
Hem Suman Jamwal, Samjeet Singh Thakur, and Nirmal Singh. Applications of differential equations in chemistry. Proceedings of ICAMAS, pp. 1–4, 2025.
Taejong Joo, Wenhan Xia, Cheolmin Kim, Ming Zhang, and Eugene Ie. On surprising effectiveness of masking updates in adaptive optimizers. arXiv preprint arXiv:2602.15322, 2026.
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
Kaizhao Liang, Lizhang Chen, Bo Liu, and Qiang Liu. Cautious optimizers: Improving training with one line of code. In International Conference on Learning Representations, volume 2026, pp. 106538–106563, 2026.
Bo Liu, Xingchao Liu, Xiaojie Jin, Peter Stone, and Qiang Liu. Conflict-averse gradient descent for multi-task learning. Advances in neural information processing systems, 34:18878–18890, 2021.
Qiang Liu, Mengyu Chu, and Nils Thuerey. Config: Towards conflict-free training of physics informed neural networks. In International Conference on Learning Representations, volume 2025, pp. 59531–59566, 2025.
Aviv Navon, Aviv Shamsian, Idan Achituve, Haggai Maron, Kenji Kawaguchi, Gal Chechik, and Ethan Fetaya. Multi-task learning as a bargaining game. arXiv preprint arXiv:2202.01017, 2022.
Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. Pytorch: An imperative style, high-performance deep learning library. Advances in neural information processing systems, 32, 2019.
Maziar Raissi, Paris Perdikaris, and George E Karniadakis. Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. Journal of Computational physics, 378:686–707, 2019.
Martin Riedmiller and Heinrich Braun. A direct adaptive method for faster backpropagation learning: The rprop algorithm. In IEEE international conference on neural networks, pp. 586–591. IEEE, 1993.
Arnold Sommerfeld. Partial differential equations in physics, volume 1. Academic press, 1949.
Sifan Wang, Bowen Li, Paris Perdikaris, et al. Gradient alignment in physics-informed neural networks: A second-order optimization perspective. Advances in Neural Information Processing Systems, 38:168482–168532, 2026.
Jing Xiao, Xinhai Chen, Qinglin Wang, Menghan Jia, Zhiquan Lai, Dongsheng Li, Jie Liu, and Tiejun Li. Gradient-update mismatch: Rethinking conflict-free training of physics-informed neural networks. arXiv preprint arXiv:2609.01558, 2026.
Tianhe Yu, Saurabh Kumar, Abhishek Gupta, Sergey Levine, Karol Hausman, and Chelsea Finn. Gradient surgery for multi-task learning. Advances in neural information processing systems, 33:5824–5836, 2020.
A APPENDIX
PROPOSITION (CAUTIOUS MASKING INCREASES COSINE SIMILARITY WITH CONFIG DIRECTION)
It is demonstrated that the cautious direction is always more aligned with than its unprocessed counterpart:
The cosine similarity does not depend on the scaling of the arguments. Since , we have:
We have to prove the last relation. We see that:
Furthermore, because setting a component to zero can only decrease the vector's length. Therefore, the numerator increases while the denominator decreases, confirming that the relation holds.
PROPOSITION (CAUTIOUS MASKING CREATES NON-NEGATIVE DOT PRODUCTS)
Consider the case where . It follows that :
EXPERIMENTAL DETAILS
The one-dimensional viscous Burgers' equation is considered in the following form:
The objective is to find the solution This function models the velocity of a one-dimensional fluid, such as fluid flow within a pipe. The initial condition is defined as follows:
The boundary conditions are specified as follows:
The viscosity of the fluid is set to .
The one-dimensional nonlinear Schrödinger equation is defined as follows:
The computational domain is defined as and . Periodic boundary conditions are imposed, along with the initial condition .
The partial differential of the Kovasznay flow is given by:
Our domain is:
The analytical solution (used for the Dirichlet boundary condition) is:
Here, we defined:
Table 3: Shared Hyperparameters
| Parameter | Value |
|---|---|
| Learning Rate Scheduler | Cosine |
| Learning Rate Max/Min | 1e-3/ 1e-4 |
| Hidden Dimensions | [50, 50, 50, 50, 50] |
| Activation Function | Tanh |
| Initialization | Xavier |
| useLeast_squares (ConFIG) | False |
| Sampling Method | Latin Hypercube |
| Seeds | 0 ... 9 |
Table 4: PINN-specific Hyperparameters
| PINN | Epochs | Initial Points | Boundary Points | Interior Points |
|---|---|---|---|---|
| Burgers | ||||
| Schrödinger | ||||
| Kovasznay | - |