Search papers, labs, and topics across Lattice.
This study introduces the hard-soft physics-informed neural network (HSPINN), which enhances the conventional physics-informed neural networks (PINNs) by enforcing boundary conditions exactly while treating other constraints as soft. By employing an inverse-share softmax strategy for adaptive loss weighting, HSPINN improves convergence efficiency and numerical robustness, addressing the limitations of slow convergence and sensitivity to loss weight scaling in traditional PINNs. Experimental results on various PDE problems, including elliptic, parabolic, and hyperbolic equations, show that HSPINN outperforms conventional PINNs in terms of speed, accuracy, and stability.
HSPINN achieves exact boundary enforcement and faster convergence, revolutionizing how we solve PDEs with neural networks.
Physics-informed neural networks (PINNs) provide an effective way to solve partial differential equations (PDEs) by embedding physical principles into the learning process. However, the conventional PINN formulation, in which all constraints are imposed as soft penalty terms within a composite loss, often exhibits slow convergence, sensitivity to loss weight scaling, and inaccurate boundary enforcement due to poor conditioning of the optimization landscape. To address these limitations, this study proposes a unified hard--soft physics--informed neural network (HSPINN) with adaptive loss weighting. In this framework, Dirichlet and periodic boundary conditions are enforced exactly by construction through analytical or polynomial lifting, masking functions, and periodic feature mappings, while the governing PDE residuals, Neumann fluxes, and initial conditions are treated as soft constraints. An inverse-share softmax strategy dynamically balances the relative importance of individual loss components during training, eliminating manual penalty tuning and improving gradient stability. This formulation ensures boundary admissibility throughout optimization and enhances convergence efficiency and numerical robustness. Applications to representative elliptic (Poisson), parabolic (Burgers), and hyperbolic (convection with periodic boundaries) problems demonstrate that HSPINN consistently achieves faster convergence, higher accuracy, and greater stability than conventional PINNs, establishing a general and scalable foundation for physics-constrained deep learning across science and technology.