  In this paper, we present refined generalization bounds for the Deep Ritz
Method (DRM) and Physics-Informed Neural Networks (PINNs). For the DRM, we
focus on two prototype elliptic PDEs: Poisson equation and static Schr\"odinger
equation on the $d$-dimensional unit hypercube with the Neumann boundary
condition. And sharper generalization bounds are derived based on the
localization techniques under the assumptions that the exact solutions of the
PDEs lie in the Barron spaces or the general Sobolev spaces. For the PINNs, we
investigate the general linear second elliptic PDEs with Dirichlet boundary
condition via the local Rademacher complexity in the multi-task learning.
