pith. sign in

arxiv: 2604.15398 · v1 · submitted 2026-04-16 · 💻 cs.LG · cs.NA· math.NA

Python library supporting Discrete Variational Formulations and training solutions with Collocation-based Robust Variational Physics Informed Neural Networks (DVF-CRVPINN)

Pith reviewed 2026-05-10 11:08 UTC · model grok-4.3

classification 💻 cs.LG cs.NAmath.NA
keywords discrete variational formulationsphysics informed neural networksStokes equationsweak formulationsfinite difference derivativesrobust loss functioncollocation methodsPython library
0
0 comments X

The pith

A Python library defines discrete weak formulations with Kronecker delta test functions so that neural networks can be trained on finite point sets to solve PDEs like the Stokes equations using only finite difference derivatives.

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The paper builds a programming environment that lets users set up a discrete domain, define functions only at chosen points, form discrete inner products, and write weak formulations that test with Kronecker deltas. From this setup it constructs a neural network whose output is defined solely on those points and whose derivatives inside the loss are computed by discrete finite differences rather than continuous automatic differentiation. Training then minimizes the discrete weak residual with the Adamax optimizer. A mathematical argument shows the resulting loss is well-posed and directly tied to the true discrete error, giving explicit control over numerical accuracy. The same machinery is illustrated on both the two-dimensional Stokes system and the Laplace equation.

Core claim

The central claim is that discrete weak formulations using Kronecker delta test functions on a finite point set, together with a neural-network representation of the solution at those same points and discrete finite-difference derivatives, produce a loss function that is mathematically well-posed, robust, and directly related to the true error of the discrete problem, thereby furnishing controllable numerical accuracy when the network is trained on PDEs such as the two-dimensional Stokes equations.

What carries the argument

The discrete weak formulation with Kronecker delta test functions on a finite point set, which supplies the loss for training a neural network that stores the solution only at those points and approximates all derivatives by finite differences inside automatic differentiation.

If this is right

  • The loss remains well-posed and tied to the true discrete error, allowing direct monitoring of numerical accuracy during training.
  • Robust error control is obtained for the Stokes equations without continuous-mesh or additional regularization terms.
  • The same discrete machinery applies unchanged to the Laplace problem.
  • Training uses only discrete automatic differentiation of finite-difference gradients and the Adamax optimizer.

Where Pith is reading between the lines

These are editorial extensions of the paper, not claims the author makes directly.

  • The approach could be applied to other linear elliptic PDEs by simply changing the discrete weak form while keeping the same training loop.
  • Refining the point set density would act like mesh refinement and could be used to drive adaptive accuracy.
  • Because the loss is provably related to the true error, the method might serve as a diagnostic tool for when a physics-informed network has converged on a given discretization.

Load-bearing premise

The discrete weak formulation built from Kronecker delta test functions on a finite point set accurately represents the continuous PDE without extra regularization or mesh-dependent adjustments.

What would settle it

Solve the Stokes equations on a known analytic solution over successively denser point sets, train the network to a fixed loss tolerance, and verify that the pointwise solution error decreases at a consistent rate with the number of points.

Figures

Figures reproduced from arXiv: 2604.15398 by Askold Vilkha, Maciej Paszy\'nski, Marcin {\L}o\'s, Tomasz S{\l}u\.zalec.

Figure 1
Figure 1. Figure 1: The solution of the Laplace problem with manufactured solution solved [PITH_FULL_IMAGE:figures/full_fig_p003_1.png] view at source ↗
Figure 2
Figure 2. Figure 2: Dependence of the constant from Lemma 8 on the mesh size. [PITH_FULL_IMAGE:figures/full_fig_p013_2.png] view at source ↗
Figure 3
Figure 3. Figure 3: Manufactured solution Stokes problem, 20 × 20 grid. 0 10 20 30 40 0 5 10 15 20 25 30 35 40 u1 0 10 20 30 40 u2 0 10 20 30 40 p 0.015 0.010 0.005 0.000 0.005 0.010 0.015 0.015 0.010 0.005 0.000 0.005 0.010 0.015 0.020 0.125 0.100 0.075 0.050 0.025 0.000 0.025 0.050 0 10 20 30 40 0 5 10 15 20 25 30 35 40 11 0 10 20 30 40 12 0 10 20 30 40 21 0 10 20 30 40 22 0.050 0.025 0.000 0.025 0.050 0.075 0.10 0.05 0.00 … view at source ↗
Figure 4
Figure 4. Figure 4: Manufactured solution Stokes problem, 40 × 40 grid [PITH_FULL_IMAGE:figures/full_fig_p020_4.png] view at source ↗
Figure 5
Figure 5. Figure 5: Loss function value and true error throughout the training process for the [PITH_FULL_IMAGE:figures/full_fig_p021_5.png] view at source ↗
Figure 6
Figure 6. Figure 6: PINN solution for the cavity flow problem after 25,000 training epochs [PITH_FULL_IMAGE:figures/full_fig_p022_6.png] view at source ↗
Figure 7
Figure 7. Figure 7: Loss function value and true error of the best solution encountered so far [PITH_FULL_IMAGE:figures/full_fig_p022_7.png] view at source ↗
read the original abstract

We explore the possibility of solving Partial Differential Equations (PDEs) using discrete weak formulations. We propose a programming environment for defining a discrete computational domain, introducing discrete functions defined over a set of points, constructing discrete inner products, and introducing discrete weak formulations employing Kronecker delta test functions. Building on this setup, we propose a discrete neural network representation, training the solution function defined over a discrete set of points and employing discrete finite difference derivatives in the automatic differentiation procedures. As a challenging computational model example, we focus on Stokes equations in two-dimensions, defined over a discrete set of points. We train the solution using the discrete weak residual and the Adamax algorithm with discrete automatic differentiation of the discrete gradients. Despite introducing the python environment, we also provide a rigorous mathematical formulation based on discrete weak formulations, proving the well-posedness and robustness of the loss function. The solution of the discrete weak formulations is based on neural network training employing a robust loss function that is related to the true error. In this way, we have a robust control of the numerical error during the training of the neural networks. Besides the Stokes formulation, we also explain the functionality of the proposed library using the Laplace problem formulation.

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, simulated authors' rebuttal, and a circularity audit. Tearing a paper down is the easy half of reading it; the pith above is the substance, this is the friction.

Referee Report

2 major / 2 minor

Summary. The paper introduces a Python library for defining discrete computational domains, discrete functions over point sets, discrete inner products, and weak formulations that employ Kronecker-delta test functions. It proposes a discrete neural-network representation of the solution, trained via the discrete weak residual using finite-difference derivatives inside automatic differentiation, with application to the 2D Stokes equations (and Laplace as illustration). A rigorous discrete mathematical formulation is supplied that claims to prove well-posedness and robustness of the resulting loss, asserting that the loss is directly related to the true error and thereby furnishes robust numerical-error control during training.

Significance. If the well-posedness and robustness claims can be substantiated with consistency analysis, the library would supply a practical, open-source environment for experimenting with discrete variational PINN-style methods on point clouds. The explicit linkage of training loss to true error (when it holds) would be a useful engineering contribution for controlling discretization error in neural PDE solvers.

major comments (2)
  1. [Mathematical formulation / discrete weak formulations] The choice of Kronecker-delta test functions on a finite point set reduces the discrete weak form exactly to pointwise collocation of the residual at those points (see the definition of the discrete inner product and test functions in the mathematical formulation section). Consequently the claimed proof of well-posedness and robustness applies only to this algebraic collocation loss; no consistency argument is supplied showing that the discrete residual converges to the continuous weak residual under point-set refinement, nor any a-priori estimate relating the training loss to the true PDE error in a continuous norm.
  2. [Stokes equations numerical results] For the Stokes example, the manuscript asserts robust control of numerical error during training, yet no numerical tables, convergence rates under increasing point density, or comparison against standard collocation or weak-form PINNs are referenced in the results section. Without such verification the claim that the loss is “related to the true error” remains unanchored.
minor comments (2)
  1. [Library description] The library API description would benefit from a short usage example that shows how a user defines a discrete domain, registers a discrete function, and assembles the loss for a new PDE; the current text jumps directly to the Stokes implementation.
  2. [Discrete automatic differentiation] Notation for the discrete gradient operator and the automatic-differentiation pipeline should be introduced once with a clear table or diagram; repeated inline definitions make the exposition harder to follow.

Simulated Author's Rebuttal

2 responses · 0 unresolved

We thank the referee for the thorough review and valuable comments on our manuscript. We address each major comment below, indicating planned revisions where appropriate to clarify the discrete nature of the approach and strengthen the numerical evidence.

read point-by-point responses
  1. Referee: The choice of Kronecker-delta test functions on a finite point set reduces the discrete weak form exactly to pointwise collocation of the residual at those points (see the definition of the discrete inner product and test functions in the mathematical formulation section). Consequently the claimed proof of well-posedness and robustness applies only to this algebraic collocation loss; no consistency argument is supplied showing that the discrete residual converges to the continuous weak residual under point-set refinement, nor any a-priori estimate relating the training loss to the true PDE error in a continuous norm.

    Authors: We agree that the Kronecker-delta test functions render the discrete weak formulation equivalent to pointwise collocation of the residual at the discrete points. The provided mathematical formulation proves well-posedness and robustness strictly in the discrete setting: the loss is equivalent to a discrete norm of the residual and thus directly controls the discrete approximation error. We acknowledge that the manuscript supplies neither a consistency analysis relating the discrete residual to the continuous weak form under point-set refinement nor a-priori estimates in continuous norms. In the revised manuscript we will insert a new subsection explicitly noting this equivalence to collocation, discussing its implications for point-cloud discretizations, and stating the absence of continuous consistency results as a current limitation of the framework while highlighting the practical utility of the discrete loss for neural-network training on unstructured point sets. revision: partial

  2. Referee: For the Stokes example, the manuscript asserts robust control of numerical error during training, yet no numerical tables, convergence rates under increasing point density, or comparison against standard collocation or weak-form PINNs are referenced in the results section. Without such verification the claim that the loss is “related to the true error” remains unanchored.

    Authors: The referee is correct that the results section describes the Stokes application but does not include numerical tables, convergence rates with respect to point density, or comparisons against standard collocation or weak-form PINNs. While the text illustrates the training procedure and asserts robust error control via the discrete loss, additional quantitative support is needed to anchor the claim. We will revise the results section to incorporate error tables for varying point densities, convergence plots of the discrete residual and solution error, and a short comparison with a standard collocation PINN baseline, thereby providing concrete verification that the loss controls the discrete error as proven. revision: yes

Circularity Check

0 steps flagged

No significant circularity; derivation defines discrete objects and proves properties for them without reducing claims to inputs by construction

full rationale

The paper introduces a discrete computational domain, discrete functions, inner products, and weak formulations using Kronecker-delta test functions on a finite point set, then defines a neural-network representation trained via the resulting discrete residual loss with finite-difference derivatives inside autodiff. It supplies a mathematical proof of well-posedness and robustness specifically for this discrete algebraic loss and asserts that the loss is related to the true error, thereby giving control of numerical error during training. None of these steps reduce a claimed prediction or uniqueness result to a fitted parameter or to a self-citation whose content is itself the target claim; the discrete formulation is explicitly constructed and its properties are proved directly rather than smuggled in via prior work or by renaming an existing collocation method as a new weak-form result. The absence of any load-bearing self-citation chain or definitional loop keeps the central derivation self-contained.

Axiom & Free-Parameter Ledger

0 free parameters · 1 axioms · 0 invented entities

The central claim depends on the unproven-in-abstract assertion that discrete weak forms with Kronecker deltas yield well-posed robust losses for Stokes; no explicit free parameters or invented entities are named, but NN hyperparameters and point-set density are implicit.

axioms (1)
  • domain assumption Discrete weak formulations with Kronecker delta test functions are well-posed and produce a loss directly related to the true numerical error for the Stokes problem.
    Stated as proved in the paper but details and assumptions on discretization not visible in abstract.

pith-pipeline@v0.9.0 · 5552 in / 1299 out tokens · 52447 ms · 2026-05-10T11:08:38.883953+00:00 · methodology

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Reference graph

Works this paper leans on

33 extracted references · 33 canonical work pages

  1. [1]

    NPJ Digital Medicine 2(2019)

    Alber, M., Tepole, A.B., Cannon, W.R., De, S., Dura-Bernal, S., Garikipati, K., Karniadakis, G., Lytton, W.W., Perdikaris, P., Petzold, L., Kuhl, E.: Integrating machine learning and multiscale modeling-perspectives, challenges, and opportu- nities in the biologica biomedical, and behavioral sciences. NPJ Digital Medicine 2(2019). https://doi.org/10.1038/...

  2. [2]

    Computer Methods in Applied Mechanics and Engineering418(A) (2024)

    Badia, S., Li, W., Martin, A.F.: Finite element interpolated neural networks for solving forward and inverse problems. Computer Methods in Applied Mechanics and Engineering418(A) (2024). https://doi.org/10.1016/j.cma.2023.116505

  3. [3]

    Acta Mechanica Sinica37(12), 1727–1738 (2021)

    Cai, S., Mao, Z., Wang, Z., Yin, M., Karniadakis, G.E.: Physics-informed neural networks (PINNs) for fluid mechanics: A review. Acta Mechanica Sinica37(12), 1727–1738 (2021)

  4. [4]

    https://doi.org/10.1364/OE.384875

    Chen, Y., Lu, L., Karniadakis, G.E., Dal Negro, L.: Physics-informed neural net- worksforinverseproblemsinnano-opticsandmetamaterials.OpticsExpress28(8), 11618–11633 (2020). https://doi.org/10.1364/OE.384875

  5. [5]

    Demkowicz, L.: Babuska <=> Brezzi ?? (2006), https://www.ices.utexas.edu/ media/reports/2006/0608.pdf

  6. [6]

    Geneva, N

    Geneva, N., Zabaras, N.: Modeling the dynamics of pde systems with physics- constrained deep auto-regressive networks. Journal of Computational Physics403 (2020). https://doi.org/10.1016/j.jcp.2019.109056

  7. [7]

    In: 2017 IEEE international conference on computational science and engineering (CSE) and IEEE international conference on embedded and ubiquitous computing (EUC)

    Gheisari, M., Wang, G., Bhuiyan, M.Z.A.: A survey on deep learning in big data. In: 2017 IEEE international conference on computational science and engineering (CSE) and IEEE international conference on embedded and ubiquitous computing (EUC). vol. 2, pp. 173–180. IEEE (2017) 24 T. Służalec et al

  8. [8]

    Masset, R

    Goswami, S., Anitescu, C., Chakraborty, S., Rabczuk, T.: Transfer learning en- hanced physics informed neural network for phase-field modeling of fracture. The- oretical and applied fracture machanics106(2020). https://doi.org/10.1016/j. tafmec.2019.102447

  9. [9]

    IEEE Signal processing magazine29(6), 82–97 (2012)

    Hinton, G., Deng, L., Yu, D., Dahl, G.E., Mohamed, A.r., Jaitly, N., Senior, A., Vanhoucke, V., Nguyen, P., Sainath, T.N., et al.: Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal processing magazine29(6), 82–97 (2012)

  10. [10]

    3839–3846 (2022)

    Huang, X., Liu, H., Shi, B., Wang, Z., Yang, K., Li, Y., Wang, M., Chu, H., Zhou, J., Yu, F., Hua, B., Dong, B., Chen, L.: A universal pinns method for solving partial differentialequationswithapointsource.ProceedingsoftheFourteenInternational Joint Conference on Artificial Intelligence (IJCAI-22) pp. 3839–3846 (2022)

  11. [11]

    Liang, Y.-C

    Jin, H., Mattheakis, M., Protopapas, P.: Physics-informed neural networks for quantum eigenvalue problems. In: 2022 International Joint Conference on Neu- ralNetworks(IJCNN).pp.1–8(2022).https://doi.org/10.1109/IJCNN55064.2022. 9891944

  12. [12]

    V ariational physics-informed neural networks for solving partial di fferential equations

    Kharazmi, E., Zhang, Z., Karniadakis, G.E.: Variational physics-informed neural networks for solving partial differential equations. arXiv preprint arXiv:1912.00873 (2019)

  13. [13]

    Computer Methods in Ap- plied Mechanics and Engineering374, 113547 (2021)

    Kharazmi, E., Zhang, Z., Karniadakis, G.E.: hp-vpinns: Variational physics- informed neural networks with domain decomposition. Computer Methods in Ap- plied Mechanics and Engineering374, 113547 (2021)

  14. [14]

    In: 35th AAAI Conference on Artificial Intelligence, AAAI 2021

    Kim, J., Lee, K., Lee, D., Jin, S.Y., Park, N.: Dpm: A novel training method for physics-informed neural networks in extrapolation. In: 35th AAAI Conference on Artificial Intelligence, AAAI 2021. pp. 8146–8154 (2021)

  15. [15]

    Korean Journal of Chemical Engineering40(9), 2119–2127 (SEP 2023)

    Kim, Y., Kwak, H., Nam, J.: Physics-informed neural networks for learning fluid flows with symmetry. Korean Journal of Chemical Engineering40(9), 2119–2127 (SEP 2023). https://doi.org/10.1007/s11814-023-1420-4

  16. [16]

    Computer Methods in Applied Mechanics and Engineering358(2020)

    Kissas, G., Yang, Y., Hwuang, E., Witschey, W.R., Detre, J.A., Perdikaris, P.: Machine learning in cardiovascular flows modeling: Predicting arterial blood pressure from non-invasive 4d flow mri data using physics-informed neural net- works. Computer Methods in Applied Mechanics and Engineering358(2020). https://doi.org/10.1016/j.cma.2019.112623

  17. [17]

    Communications of the ACM60(6), 84–90 (2017)

    Krizhevsky, A., Sutskever, I., Hinton, G.E.: Imagenet classification with deep con- volutional neural networks. Communications of the ACM60(6), 84–90 (2017)

  18. [18]

    John L Lumley

    Ling, J., Kurzawski, A., Templeton, J.: Reynolds averaged turbulence modelling using deep neural networks with embedded invariance. Journal of Fuild Mechanics 807, 155–166 (2016). https://doi.org/10.1017/jfm.2016.615

  19. [19]

    International Journal of Applied Mechanics15(08) (2023)

    Liu, C., Wu, H.A.: A variational formulation of physics-informed neural net- work for the applications of homogeneous and heterogeneous material proper- ties identification. International Journal of Applied Mechanics15(08) (2023). https://doi.org/10.1142/S1758825123500655

  20. [20]

    Extreme Mechanics Letter63(2023)

    Liu, C., Wu, H.: cv-pinn: Efficient learning of variational physics-informed neural network with domain decomposition. Extreme Mechanics Letter63(2023). https: //doi.org/10.1016/j.eml.2023.102051

  21. [21]

    In: International Con- ference on Computational Science

    Maczuga, P., Paszyński, M.: Influence of activation functions on the convergence of physics-informed neural networks for 1d wave equation. In: International Con- ference on Computational Science. pp. 74–88. Springer (2023)

  22. [22]

    Computer Methods in Applied Mechanics and Engineering360, 112789 (2020) Python library supporting discrete weak formulations with CRVPINN 25

    Mao, Z., Jagtap, A.D., Karniadakis, G.E.: Physics-informed neural networks for high-speed flows. Computer Methods in Applied Mechanics and Engineering360, 112789 (2020) Python library supporting discrete weak formulations with CRVPINN 25

  23. [23]

    IMA Journal of Numerical Analysis42(2), 981–1022 (2022)

    Mishra, S., Molinaro, R.: Estimates on the generalization error of physics-informed neural networks for approximating a class of inverse problems for PDEs. IMA Journal of Numerical Analysis42(2), 981–1022 (2022)

  24. [24]

    In: 2021 IEEE Inter- national Conference on Communications, Control, and Computing Technologies for Smart Grids (SmartGridComm)

    Nellikkath, R., Chatzivasileiadis, S.: Physics-informed neural networks for min- imising worst-case violations in dc optimal power flow. In: 2021 IEEE Inter- national Conference on Communications, Control, and Computing Technologies for Smart Grids (SmartGridComm). pp. 419–424 (2021). https://doi.org/10.1109/ SmartGridComm51999.2021.9632308

  25. [25]

    Journal of Computational physics378, 686–707 (2019)

    Raissi, M., Perdikaris, P., Karniadakis, G.E.: Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. Journal of Computational physics378, 686–707 (2019)

  26. [26]

    Journal of Geophysical Research: Solid Earth127(5), e2021JB023120 (2022)

    Rasht-Behesht, M., Huber, C., Shukla, K., Karniadakis, G.E.: Physics-informed neural networks (pinns) for wave propagation and full waveform inversions. Journal of Geophysical Research: Solid Earth127(5), e2021JB023120 (2022)

  27. [27]

    Computers & Mathematics with Applications67(4), 966–995 (Mar 2014)

    Roberts, N.V., Bui-Thanh, T., Demkowicz, L.: The DPG method for the Stokes problem. Computers & Mathematics with Applications67(4), 966–995 (Mar 2014). https://doi.org/10.1016/j.camwa.2013.12.015, https://linkinghub.elsevier. com/retrieve/pii/S0898122113007116

  28. [28]

    Computer Methods in Applied Mechanics and Engineering425, 116904 (2024)

    Rojas, S., Maczuga, P., Muñoz-Matute, J., Pardo, D., Paszyński, M.: Robust varia- tional physics-informed neural networks. Computer Methods in Applied Mechanics and Engineering425, 116904 (2024)

  29. [29]

    In: Mikyška, J., de Mulatier, C., Paszynski, M., Krzhizhanovskaya, V.V., Dongarra, J.J., Sloot, P.M

    Służalec, T., Paszyński, M.: Fast solver for advection dominated diffusion us- ing residual minimization and neural networks. In: Mikyška, J., de Mulatier, C., Paszynski, M., Krzhizhanovskaya, V.V., Dongarra, J.J., Sloot, P.M. (eds.) Com- putational Science – ICCS 2023. pp. 517–531. Springer Nature Switzerland, Cham (2023)

  30. [30]

    Computer Methods in Applied Mechanics and Engineering361, 112732 (2020)

    Sun, L., Gao, H., Pan, S., Wang, J.X.: Surrogate modeling for fluid flows based on physics-constrained deep learning without simulation data. Computer Methods in Applied Mechanics and Engineering361, 112732 (2020)

  31. [31]

    Proceed- ings of the AAAI Conference on Artificial Intelligence36(8), 8529–8538 (2022)

    Wandel, N., Weinmann, M., Neidlin, M., Klein, R.: Spline-pinn: Approaching pdes without data using fast, physics-informed hermite-spline cnns. Proceed- ings of the AAAI Conference on Artificial Intelligence36(8), 8529–8538 (2022). https://doi.org/10.1609/aaai.v36i8.20830, https://ojs.aaai.org/index.php/AAAI/ article/view/20830

  32. [32]

    Journal of Computational Physics394, 136–152 (2019)

    Yang, Y., Perdikaris, P.: Adversarial uncertainty quantification in physics-informed neural networks. Journal of Computational Physics394, 136–152 (2019)

  33. [33]

    Computers & Structures316, 107839 (Sep 2025)

    Łoś, M., Służalec, T., Maczuga, P., Vilkha, A., Uriarte, C., Paszyński, M.: Collocation-based robust variational physics-informed neural net- works (CRVPINNs). Computers & Structures316, 107839 (Sep 2025). https://doi.org/10.1016/j.compstruc.2025.107839, https://linkinghub.elsevier. com/retrieve/pii/S004579492500197X