PINN versus gPINN under Sparse Collocation: A Reproducible Low-Resource Study of Accuracy and Computational Cost

Authors

  • Jegajothi Sudhakar Research Associate, SRS Tech Solutions, Chennai, India
  • Ibrahim M. Mehedi School of Robotics XJTLU Entrepreneur College (Taicang) Xi’an Jiaotong-Liverpool University No. 111 Taicang Ave., Suzhou 215400, China https://orcid.org/0000-0001-8073-9750

DOI:

https://doi.org/10.21015/vtcs.v14i2.2689

Abstract

Physics-informed neural networks (PINNs) are appealing when there are limited labelled datasets due to their approach of incorporating the governing partial differential equations, initial, and boundary conditions directly into the network training objective. However, they have the drawback of being expensive to train, and are sensitive to the choice of collocation points and their random initialization. Gradient enhanced PINNs (gPINNs) also add a penalty on the PDE-residual derivatives which may make it more accurate at higher automatic-differentiation cost. This paper compares PINN and gPINN by reproducing the results of the paper under sparse collocation, where the resources are low. The 1D heat equation is used as a controlled benchmark, ground truth solution. The same lightweight network (501 parameters), Adam optimizer, 3,000 epochs, 100 initial-condition points, 100 boundary-condition points, and 100x100 evaluation grid are used in both methods. Five collocation budgets (5,000, 2,000, 1,000, 500, 250) are tested with three random seeds, yielding 30 runs. In all the budgets, the mean Relative L2 error of gPINN is lower than that of PINN. The largest reduction is 33.4% at 500 collocation points (from 0.004513 to 0.003005), with a computational penalty of roughly 2.63--3.58x training time. Results also reveal non-monotonic error behavior and variation dependent on the seed. The results place gPINN as an alternative that provides good accuracy over other methods, but not always. The study provides a small-scale, reproducible model for science on resource-poor ML machines.

References

[1] M. Raissi, P. Perdikaris, and G. 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, vol. 378, pp. 686–707, 2019.

[2] G. E. Karniadakis, I. G. Kevrekidis, L. Lu, P. Perdikaris, S. Wang, and L. Yang, "Physics-informed machine learning," Nature Reviews Physics, vol. 3, pp. 422–440, 2021.

[3] S. Wang, Y. Teng, and P. Perdikaris, "Understanding and mitigating gradient flow pathologies in physics-informed neural networks," SIAM Journal on Scientific Computing, vol. 43, no. 5, pp. A3055–A3081, 2021.

[4] J. Yu, L. Lu, X. Meng, and G. E. Karniadakis, "Gradient-enhanced physics-informed neural networks for forward and inverse PDE problems," Computer Methods in Applied Mechanics and Engineering, vol. 393, p. 114823, 2022.

[5] S. Wang, X. Yu, and P. Perdikaris, "When and why PINNs fail to train: A neural tangent kernel perspective," Journal of Computational Physics, vol. 449, p. 110768, 2022.

[6] C. Wu, M. Zhu, Q. Tan, Y. Kartha, and L. Lu, "A comprehensive study of non-adaptive and residual-based adaptive sampling for physics-informed neural networks," Computer Methods in Applied Mechanics and Engineering, vol. 403, p. 115671, 2023.

[7] M. A. Nabian, R. J. Gladstone, and H. Meidani, "Efficient training of physics-informed neural networks via importance sampling," Computer-Aided Civil and Infrastructure Engineering, vol. 36, no. 8, pp. 962–977, 2021.

[8] L. Lu, X. Meng, Z. Mao, and G. E. Karniadakis, "DeepXDE: A deep learning library for solving differential equations," SIAM Review, vol. 63, no. 1, pp. 208–228, 2021.

[9] A. D. Jagtap, K. Kawaguchi, and G. E. Karniadakis, "Adaptive activation functions accelerate convergence in deep and physics-informed neural networks," Journal of Computational Physics, vol. 404, p. 109136, 2020.

[10] M. Raissi, A. Yazdani, and G. E. Karniadakis, "Hidden fluid mechanics: Learning velocity and pressure fields from flow visualizations," Science, vol. 367, no. 6481, pp. 1026–1030, 2020.

[11] E. Haghighat, M. Raissi, A. Moure, H. Gomez, and R. Juanes, "A physics-informed deep learning framework for inversion and surrogate modeling in solid mechanics," Computer Methods in Applied Mechanics and Engineering, vol. 379, p. 113741, 2021.

[12] A. D. Jagtap, E. Kharazmi, and G. E. Karniadakis, "Conservative physics-informed neural networks on discrete domains for conservation laws: Applications to forward and inverse problems," Computer Methods in Applied Mechanics and Engineering, vol. 365, p. 113028, 2020.

[13] A. D. Jagtap and G. E. Karniadakis, "Extended physics-informed neural networks (XPINNs): A generalized space-time domain decomposition based deep learning framework for nonlinear partial differential equations," Communications in Computational Physics, vol. 28, no. 5, pp. 2002–2041, 2020.

[14] K. Shukla, A. D. Jagtap, and G. E. Karniadakis, "Parallel physics-informed neural networks via domain decomposition," Journal of Computational Physics, vol. 447, p. 110683, 2021.

[15] E. Kharazmi, Z. Zhang, and G. E. Karniadakis, "hp-VPINNs: Variational physics-informed neural networks with domain decomposition," Computer Methods in Applied Mechanics and Engineering, vol. 374, p. 113547, 2021.

[16] S. Berrone, C. Canuto, and M. Pintore, "Variational Physics Informed Neural Networks: The role of quadratures and test functions," Journal of Scientific Computing, vol. 92, p. 100, 2022.

[17] Z. Hu, A. D. Jagtap, G. E. Karniadakis, and K. Kawaguchi, "When do extended physics-informed neural networks (XPINNs) improve generalization?" SIAM Journal on Scientific Computing, vol. 44, no. 5, pp. A3158–A3182, 2022.

[18] Y. Wang, Y. Yao, J. Guo, and Z. Gao, "A practical PINN framework for multi-scale problems with multi-magnitude loss terms," Journal of Computational Physics, vol. 510, p. 113112, 2024.

[19] K. Luo, J. Zhao, Y. Wang, J. Li, J. Wen, J. Liang, H. Soekmadji, and S. Liao, "Physics-informed neural networks for PDE problems: A comprehensive review," Artificial Intelligence Review, vol. 58, p. 323, 2025.

[20] T. De Ryck and S. Mishra, "Numerical analysis of physics-informed neural networks and related models in physics-informed machine learning," Acta Numerica, vol. 33, pp. 633–713, 2024.

[21] J. Wang, Y. L. Mo, B. Izzuddin, and C.-W. Kim, "Exact Dirichlet boundary physics-informed neural network EPINN for solid mechanics," Computer Methods in Applied Mechanics and Engineering, vol. 414, p. 116184, 2023.

[22] Z. Mao, A. D. Jagtap, and G. E. Karniadakis, "Physics-informed neural networks for high-speed flows," Computer Methods in Applied Mechanics and Engineering, vol. 360, p. 112789, 2020.

[23] Y. Chen, L. Lu, G. E. Karniadakis, and L. Dal Negro, "Physics-informed neural networks for inverse problems in nano-optics and metamaterials," Optics Express, vol. 28, no. 8, pp. 11618–11633, 2020.

[24] S. Wang, H. Wang, and P. Perdikaris, "Learning the solution operator of parametric partial differential equations with physics-informed DeepONets," Science Advances, vol. 7, no. 40, eabi8605, 2021.

[25] Z. Hao, J. Yao, C. Su, H. Su, Z. Wang, F. Lu, Z. Xia, Y. Zhang, S. Liu, L. Lu, and J. Zhu, "PINNacle: A comprehensive benchmark of physics-informed neural networks for solving PDEs," in Advances in Neural Information Processing Systems 37, 2024.

[26] A. Krishnapriyan, A. Gholami, S. Zhe, R. Kirby, and M. W. Mahoney, "Characterizing possible failure modes in physics-informed neural networks," in Advances in Neural Information Processing Systems 34, pp. 26548–26560, 2021.

Downloads

Published

2026-09-15

How to Cite

Sudhakar , J., & M. Mehedi , I. (2026). PINN versus gPINN under Sparse Collocation: A Reproducible Low-Resource Study of Accuracy and Computational Cost. VAWKUM Transactions on Computer Sciences, 14(2), 44–57. https://doi.org/10.21015/vtcs.v14i2.2689