WorksMathematics
Hierarchical randomized neural networks for efficiently and accurately finding multiple solutions of semilinear elliptic equations
Abstract
Being able to find multiple solutions of a semilinear elliptic equation is a fundamental problem in scientific computing. In this paper, fully taking the advantages of randomized neural networks, we propose a new efficient and accurate method for identifying potentially as many solutions as possible. The new method is constructed from three aspects–initialization, optimization, a technique for acceleration and improving accuracy, two of which are innovative developments. Firstly, based on the basis functions of a randomized network and the sampling points, a characteristic matrix is introduced so that its singular value decomposition can be used to determine weakly variant search directions, followed by a newly developed algorithm to generate effective initial candidates. Then the good deflated Gauss-Newton method [see A. Riley, et al., SIAM Journal on Scientific Computing 47~(5) (2025) A2963-A2987] using an exponential deflation operator is adapted as the optimization to search for all multiple solutions. Local error estimate of a particular solution under some proper condition is given in terms of the neurons in the hidden layer and the sampling points for this newly designed method. Furthermore, to accelerate the computation and improve the solution accuracy, a new multilevel method based on hierarchical networks is designed. Without using any a priori information, several numerical tests show together with the multilevel method, the new method can not only accurately find multiple solutions with relative errors reaching only in less than one-tenth computational cost for the best case, but also preserve the inherent symmetries of multiple solutions.
Introduction
Nonlinear elliptic equations arise in a wide range of scientific and engineering disciplines, including quantum physics, solid mechanics, and fluid dynamics, where they model steady-state or equilibrium phenomena. The properties of their solutions are closely tied to the physical behavior of the underlying systems. Although one-dimensional problems have been thoroughly studied using analytical tools such as Galerkin projections and energy estimates, the analysis of multidimensional or highly nonlinear cases remains challenging. Consequently, developing efficient and reliable numerical methods for approximating solutions to nonlinear elliptic problems is not only of theoretical interest but also a critical demand in scientific computing and practical engineering applications.
This is the first attempt of our serial work on finding multiple solutions of nonlinear elliptic equation. Let us begin with the nonlinear elliptic equation with polynomial nonlinearity. In this paper, we are concerned with the following nonlinear elliptic equation
where is some bounded domain, is a polynomial nonlinearity with constant or variable coefficients, is a real positive constant. This is a typical mathematical model contains the Lane-Emden equation, Allen-Cahn equation, nonlinear eigenvalue problem and elliptic Lotka-Volterra system as special cases. The study of existence and multiplicity of solutions of model (1) by using variational method and other nonlinear analysis techniques has received considerable attention, given that satisfies some necessary increasement restrictions. For a comprehensive review, we refer the readers to an interesting small monograph by David Costa [1]. It illustrates many examples with multiple solutions, which also inspire us to further ask: How many classical solutions model (1) will have exactly? If the number is finite but not unique, or infinite, can we find all of these classical solution numerically? While theoretical results are usually discussed in a functional space with general dimensionality , for the convenience of simulations, we shall focus on .
For the model problem, comparing to the associate linear problem , with , , whose distribution of eigenvalues and behavior of eigenfunction for regular domain are clear, the semilinear elliptic equation with general polynomial nonlinearity is not well-studied yet as it involves more complicated dynamics, especially when is some particular cubic polynomial of . For example, in [2], the bounded solutions of semilinear elliptic equations in the whole space is studied. The investigation of existence of solutions to this problem with drives a famous conjecture by De Giorgi. About ten year later, Pino, Kowalczyk and Wei find a counterexample to De Giorgi’s conjecture for dimension [3]. In [4], the author proves that for nonlinearity , , the elliptic equation in () with and has a unique solution . These celebrate progresses motivate us to consider what property the model (1) will have theoretically if it defines on a smooth bounded domain with general polynomial nonlinearity.
From a numerical viewpoint, solving nonlinear elliptic equations still runs into several challenges. First of all, the inherent nonlinearity of these problems often leads to non-convex energy functionals, multiple solutions, and bifurcation structures, rendering classical linear numerical methods ineffective. Secondly, two-dimensional and even high-dimensional versions of these equations yield large-scale discrete systems that require advanced computational strategies to maintain stability and efficiency. Thirdly, an additional difficulty arises from multiscale behavior, boundary layers, and singularities, necessitating numerical schemes with strong adaptivity and robustness. Classic methods such as finite element method, Galerkin-based methods together with Newton-type techniques, homotopy continuation, and multilevel technique [5, 6] have shown some promising abilities to resolve some of the mentioned issues. Recently, due to the success of neural networks and the improvements for solving various problems [7, 8], physics-informed neural networks have also been used to discover multiple solutions[11, 17, 18], where neural networks are mainly used to find good initializations and then classic methods are again used to maintain high accuracy. Overall, for arbitrary semilinear problems, efficiently and accurately finding all solutions of a general nonlinear elliptic equation is still far to be done.
Therefore, in this paper, we mainly focus on the investigation of the numerical method for the model problem with multiple solutions. Instead of using classic methods, we fully take the advantages of randomized neural networks and propose a new efficient and accurate method for identifying potentially as many solutions as possible without a priori information, although some analysis results can speed up finding these solutions. The new method is constructed from three different aspects—initializations, optimizations, and improvements in terms of efficiency and accuracy. And main contributions of this paper are as follows:
Based on randomized neural networks and sampling points, the characteristic matrix and the weakly variant search directions are introduced. Meanwhile, the singular value decomposition of the characteristic equation is used to generate effective candidates at initialization step, instead of generating initialization randomly, which is very low efficiency;
New initialization algorithm together with the recently developed good deflated Gauss-Newton method is combined to form a new algorithm. Under some proper conditions for some solutions, the local error estimate of the randomized neural network is presented in terms of numbers of both neurons in the hidden layer and the sampling points;
Multilevel method, which is like the full multigrid method in some sense, is further proposed to accelerate the computation and improve the solution accuracy;
Various examples with or without exact solutions are used to demonstrate the effectiveness of the proposed method, reaching the relative error for the best case while reducing the computational cost to only less
than 8%. Meanwhile, numerical tests show that the proposed method is able to preserve the inherent symmetries of multiple solutions, which is a very important property for many applications.
The rest paper is organized as follows. The second section is the introduction of the considered model, some analysis could be used to prove existence of different solutions, and the difficulties of identifying number of solutions by pure analysis tools. The third section is devoted to the numerical method to identify multiple solutions, including randomized neural networks, new algorithm for initialization, the optimization algorithm, and the local error estimate for a solution satisfying some conditions. Then a new improved method based on hierarchical networks, the multilevel method, is proposed in Section 4, followed by several numerical tests from one-dimensional cases to three dimensional ones in Section 5, showing the effective and improvements of the proposed method. Lastly a conclusion together with some future work is given.
Model description
In this paper, we shall recall the elementary analysis of nonlinear elliptic equations. Firstly, we will show the variational property of model problem and introduce some existence results of weak solutions. Then we present the mathematical analysis of multiplicity for one-dimensional nonlinear elliptic equation.
Variational formulation
Let be a bounded open set with -boundary, and we consider the Dirichlet problem (1) with being a Carathéodory function. For , one usually writes , while for , it becomes . We denote equipped with the Hilbert norm and the corresponding inner product. By the Poincaré inequality, this norm is equivalent to the standard -norm on . The continuous embedding , and compact embedding , are useful in the discussion later. The dual space of is denoted by .
A function is called a weak solution of the problem (1) if
Define and the energy functional
Under the growth assumptions below, and
Thus weak solutions are precisely the critical points of . Firstly, we have the following result, proof of which is omitted as it is standard.
Theorem 1. Assume that is Carathéodory, and there exists a constant , such that
Then for every , the model problem (1) has at least one weak solution . Moreover, such a solution is the global minimizer of on .
It is easy to see that is too restrictive for polynomial nonlinearity, although it holds whenever is finite and pre-given. We shall consider the existence of solution to the model problem in weaker assumptions.
Theorem 2. Assume that is Carathéodory and satisfies the following conditions:
(G1) There exist constants and , such that
If , any finite is allowed.
(G2) Uniformly in ,
(G3) There exist constants and , such that
Then for every , the model problem (1) has at least one nontrivial weak solution .
Proof. By assumption (G1), the functional is well defined and of class in , and
We first verify the famous Palais-Smale condition. Let be a sequence, such that
Using assumption (G3), we compute
It is easy to have that for , condition (G3) implies . Similarly, for , the growth condition (G1) gives that for some constant depending only on . Hence
from which it implies
Since is bounded and in , . Because , it follows that is bounded in . Thus, after passing to a subsequence, weakly in . By the compact embedding , we have
From the growth condition (G1), the sequence is bounded in . Hence, by Hölder’s inequality,
Since in , we have . Therefore, . That is, . But weak convergence gives . Hence we know . Together with weak convergence, this implies
Consequently . Thus satisfies the Palais-Smale condition.
Next we prove the Mountain Pass Geometry. From conditions (G2) and (G1), for every , there exists a constant , such that
Therefore
Using the continuous embedding results and , we obtain
We may choose so small that . Since , it follows that for sufficiently small ,
Also . Thus 0 is a local minimum of .
On the other hand, condition (G3) implies the existence of constants and , such that
We choose with and . Then for ,
Since , the right-hand side tends to as . Hence for sufficiently large , . Set for such a given . Then . Therefore satisfies the hypotheses of the mountain pass theorem (see [1]). Hence has a critical point with . In particular, . Since every critical point of is a weak solution of the model problem, is a nontrivial weak solution.
Based on Theorem 1 and Theorem 2, it is still difficult to know the number of solutions to the model problem in general. Next, we consider a one-dimensional model problem with polynomial term at most quintic, to show how complex this task will be.
Mathematical analysis for one-dimensional model problem
In this section, we discuss some theoretical results of nonlinear elliptic equation with polynomial nonlinearity for one-dimensional case. Let us begin with
where , and () are real constants. Let , and we have
with and , where is a constant determined later. Direct computation shows that
which implies
Hence, we arrive at
Integrating from with respect to variable , we get
Therefore, we may see that the key step to search an elementary solution to model (1) subjects to find a primitive of integral for the left hand side of (5).
Let , we get a linear problem , with . After some elementary calculation, one may have the solution
where and is an arbitrary constant. From the viewpoint of dynamical system, we transform the second-order ODE into a first-order system by introduced above. Hence,
which admits the solution given by
Since , we can simplify the above expression as , where we have applied the condition to remove the negative sign in . This also implies that for every fixed , model (2) has unique solution up to a constant factor. However, it shall be an obvious truth that uniqueness of solution will be violated once the source function on the right hand side becomes nonlinear and satisfies some mild conditions.
Consider in model (2), i.e., . Then by (5) one will have
Because it has the cubic nonlinear term in the square root, we do not expect an explicit solution to such integral. With the help of hypergeometric function or elliptic integral, one may get
or
where is the incomplete elliptic integral of the first kind, and .
If , and in (2), we have
Again, with the help of hypergeometric function or elliptic integral, we shall obtain
where , , . For the case , it may need more tools of complex analysis and hence we choose to omit here. Anyhow, we can see the limit of analysis to identify all solutions.
Numerical methods
In this section, we construct a numerical method to identify multiple solutions of the considered problems, which includes the discretization method, how to choose the initial guesses, and how to solve the nonlinear problems.
Randomized neural networks
Neural networks are one important technique to solve forward and inverse partial differential equations. Here we use the randomized neural networks as the tool to discretize the considered problems due to the high efficiency and accuracy [9], compared to the fully trained neural networks, and the mesh-free and flexibility in handling the complex domain, compared to the classic numerical methods. For completeness, we give it a brief introduction.
For a given fully connected neural network, say a shallow neural network with a width , the network is capable of representing all functions defined by , where , , and is the output. Here is the activation function, which is taken to be for the later analysis purpose, and are the weights and the bias in the hidden layer, while and are the ones in the output layer. For the randomized neural network, instead of determining all their weights and bias according to the minimization of a given loss function, it randomly determines the weights and bias in the hidden layer (e.g., determine and according to a normal distribution) and only leaves parameters in the last layer tunable. Without loss of generality, we assume the bias term in the last layer to be zero.
Then in order to find a solution of equation (1) based on neural networks, we construct the following loss function and the minimization problem
where the positive coefficients serve as penalty weights, and the residual terms measure the errors within the domain and on the boundary respectively, which are defined by
By approximating the function with a shallow network of width and employing Monte Carlo sampling to discretize the loss, we then have the following discrete minimization problem
where denotes the hypothesis space, and are the discrete forms given by
with and being the numbers of (uniformly distributed) sampling points in and on , respectively.
For a fully connected network, what we need to do is invoking an optimization method to minimize the loss function to obtain a solution. However, for a randomized neural network, due to the special structure of the hypothesis space , it is equivalent to the following nonlinear least square problem:
where ,
and
To solve this nonlinear least square problem, we can call some nonlinear solver, like the function least_square from the scipy package, by solving the normal equations iteratively to get an approximation. Of course, the boundary part in (14) can be ignored if we use the hard constraint instead of the soft constraint [10]. Therefore, with a little abuse of notations and for easy presentations in the following, without loss of generality, we will assume the boundary condition is exactly satisfied by the neural network. Next, we are going to construct new method to compute multiple solutions of semilinear problem from two aspects: initializations and optimizations.
Initializations
For a nonlinear problem, it is critical to have a sufficient good initial guess to guarantee the convergence using some Newton-like methods. To find multiple solutions, it is exactly the same here. Meanwhile, we expect that if the considered problem has more than one solution, each solution should have its own convergence region so that different initializations would lead to different final solutions. As shown in [11], random initializations can be used to uncover multiple solutions. So in this subsection, we like to propose a new method to efficiently construct different initial guesses to eventually find different solutions effectively.
Given a randomized neural network with the width , the sampling points uniformly distributed in (no sampling points on the domain boundary as the Dirichlet boundary condition is exactly satisfied by the assumption), and an arbitrary initial guess , by solving the nonlinear least square problem (14), suppose we have obtained one solution . Next, with this fixed shallow neural network and the fixed sampling points, to obtain different solutions, we propose a new method to systematically design how to choose initial guess properly to fulfill this goal.
First of all, we introduce the following discretized characteristic matrix
which is used to judge how good the coefficient vector of in the linear combination of is to fit the problem (14). Then for the solution , we have for some coefficient vector . To effectively construct the initial guess, we will follow the idea of the Newton method and firstly consider the nonlinear problem around the (first) found solution locally.
To do that, we assume the following discretized nonlinear residual function
with and . Then we know that and
with denoting the Jacobian matrix at the point and meaning a small perturbation. This indicates the local perturbation of the residual is approximately determined by the quantity . Therefore, if there is another solution near , the search direction with the norm of being relatively small would be a good choice, since small residual in some sense indicates being sufficient close to a solution of the considered problem. For the notation simplicity, we call this kind of search direction close to be weakly variant search direction (WVSD). As for WVSD, we have the following easy result to tell us how to choose these directions.
Theorem 3. For , the best WVSD is any right eigenvector corresponding to the smallest singular value.
Proof. For the matrix , we have the singular value decomposition (SVD) as follows
where and are the orthonormal matrices containing the left and right eigenvectors, and is the diagonal matrix with singular values .
Let for some vector , and we have
from which we know that , exactly when we take to be right eigenvector in corresponding to the singular value . Therefore, the conclusion follows.
Based on the solution representation form of , it means finding multiple solutions is just equal to uncover different coefficient vectors for the nonlinear least square problem (14). However, due to the randomness in generating these basis functions , it may lead to the column vectors of the characteristic matrix is (weakly) linear dependent so that even for some perturbation with large norm, it is possible to have
which is the easy consequence when with the SVD of being and the smallest singular values close to zero (i.e., is taken to be the right eigenvector corresponding to the smallest singular value). Therefore, it is proper to introduce the following optimization subproblem:
to determine the possible (local) search direction for the purpose of identifying effective initial guesses.
Based on the SVD, it turns out it is unnecessary to solve this subproblem. However, we need to do some modifications in order to improve the numerical stability. First of all, for the characteristic matrix , since the search direction is not changed by a multiplication of a constant, the constraint of can be imposed or fulfilled by the normalization technique (i.e., ). Hence in order to avoid the overflow problems caused by the extremely small values of , we truncate the SVD decomposition so that the singular values less than or equal to a given threshold are neglected. By the truncation, we then have , where , , and are the matrices consisting of the left eigenvectors, the singular values larger than , and the right eigenvectors correspondingly. Meanwhile, in order to minimize the effect of different numbers of sampling points, following the definition of the root mean square, the norm to measure the variation in terms of the solution is redefined as follows
With this change, the constraint in the minimization problem will be changed to correspondingly. Furthermore, to reduce the computational costs, we can also setup another threshold such that the potential direction is only searched in a relatively small subset spanned by the right eigenvectors of small eigenvalues of the Jacobian matrix . This is also essential for increasing the robustness of the method. As for the minimization problem, the exact solution is the right eigenvector of the smallest singular value multiplied by certain constant to satisfy the equality constraint. Indeed, this is the best choice of the search direction locally. However, from the global point of view, it could be better to include also the right eigenvectors corresponding to the small eigenvalues (e.g., less than the given ) as the choices of the search direction. For the latter case with multiple eigenvectors, we actually just need to set each eigenvector as the candidate of the search direction since what we are interested in the search direction for constructing effective initial guesses.
Noticing that as the columns of are orthonormal with each other, and the singular values in after the truncation are positive, if we take for some vector with , it implies that
Therefore, for the constraint , we have when . So we consider the SVD of the modified Jacobian and once the is given, we can find the right eigenvectors from whose singular values are smaller than , followed by the multiplication to determine the potential search directions together with arbitrarily chosen step sizes.
For clarity purpose, we summarize the algorithm of the initialization in the following.
Algorithm 1: Initializations
Input: A randomized neural network with hidden layers, sampling points, and a precomputed solution with the coefficient vector . Meanwhile, specify and .
For the characteristic matrix and the given , construct the truncated SVD and the matrix.
For the nonlinear problem , compute the Jacobian matrix at the point .
Compute the SVD of the modified Jacobian matrix .
Given , find the right eigenvectors in corresponding to the singular eigenvalues less than .
For each of the right eigenvectors, we construct the search direction by .
Output: the initial guesses constructed by with the step size .
In practice, we take to be the largest module of the eigenvalues multiplied by a given small constant. Meanwhile, we can consider the right eigenvectors and thus the search directions corresponding to the first few smallest singular values without using . And the step size can be chosen empirically. By default, we set and set in the numerical tests.
Optimization method
This part is devoted to the optimization method based on the deflation technique for the discretized problem given in (15). Assume currently we already find some solutions, say for some integer . With the initial guess produced in Algorithm 1, we try to find a new solution .
For this purpose, first of all, we define the deflation operator so that new solution is expected to find for the considered problem. Commonly used deflation operators for a single root (i.e., ) includes
;
with and ;
.
Here the second deflation operator includes the parameter to overcome the higher multiplicity of a root, while the last exponential one is proposed to incorporate all possible values of instead of choosing the parameter value empirically. Then extended from the single root to the multiple roots, we have the following deflation operator
Then considering the following least square problem
we adapt the good deflated Gauss-Newton method proposed in [12], where the norm is used in the deflation to measure the effective distance of differnet solutions. Its novelties and advantages lie in the following three aspects:
The exponential deflation operator is used;
Instead of solving the nonlinear linear square problem, like the Levenberg–Marquardt method, only the linearized part is considered to design the deflation algorithm, which avoids the calculation of the Hessian matrix and thus is computationally cheaper. Meanwhile, it can avoid the convergence to the stationary points;
Theoretically it guarantees (see [12 Theorem 3.5]) that the local convergence of the proposed method (i.e., converge to the local minima that are of interest), and it would not converge to any of the deflated points (i.e., the founded solution in ) under some requirements of the deflation operator and the Jacobian matrix.
For clarity and completeness purpose, we present the good deflation Gauss-Newton algorithm in the following.
Algorithm 2: Good deflated Gauss-Newton algorithm (GDGN)
Input: Given an initial guess , and the set of founded solutions as well as the corresponding deflation operator defined in (17), where the norm defined in (16) is used. Meanwhile, choose a , a and define .
While do
with being the Jacobian of the minimized function given (18) in at the point .
if then
;
;
else
with being determined by the quadratic line search on the nonlinear problem defined in (18);
end if
end while
Output: if finding a new solution , update .
In this algorithm, for the sub-minimization problem , since the sampling points is generally larger than the width of the hidden layer , so the minimizer can be obtained by solving the following
which is efficiently solved based on the QR decomposition or the SVD decomposition of . Meanwhile, in practice, to see a is a solution or not, we setup another threshold and we accept the approximation as a solution if the norm of the residue is less than or equal to , where will be specified in the numerical tests.
Local convergence analysis
Here we present the local convergence of the used method for solving the semilinear problem (1) for some particular solution . Without loss of generality, we assume and is a bounded domain with for simplicity. Meanwhile, we also assume the following assumptions:
A. The function is measurable in and twice continuously differentiable in for almost every . Meanwhile, there exists a constant such that, in a neighbourhood of , for almost every and .
B. [Non-degeneracy] The linearized homogeneous Dirichlet problem
has only the trivial solution. Equivalently, with .
Remark. The non-degeneracy condition is satisfied by some solutions, like the positive solutions of the two-dimensional Lane-Emden problem [13], which we will investigate in the numerical section.
Based on these two assumptions, we firstly have the following.
Theorem 4. Suppose and , then we have is an isomorphism and
Proof. For the Laplace operator defined on , by the Lax–Milgram theorem and the elliptic regularity on , it is easy to see that is bijective and therefore we know exists and is bounded. Let . By Assumption A, we have . Denoting by the multiplication operator
then we obtain . Since is bounded and the embedding is compact by the Rellich–Kondrachov theorem, is also compact operator. Consequently, is also compact as is linear bounded. Therefore, by the Riesz–Schauder theorem and the assumption B, is invertible on . Since is invertible, we hence know that is an isomorphism, from which we obtain the inequality.
For the nonlinear problem (1), corresponding we can define the nonlinear operator , where
Then for satisfying for and by the Taylor expansion, we have , from which we have
with . By the assumption A and the Sobolev embedding for , we have
which give the local estimate of the nonlinear remainder term. Based on the analysis, then we are able to present the following local stability result as a easy consequence.
Theorem 5. For satisfying (i.e., ) for some , we have
Proof. Set , and we then have
For with , by Theorem 4 and the previous calculation, we have
where the generic constant is denoted by . We choose such that . Then if , we have and . Therefore,
which concludes the theorem with the generic constant in the inequality (20).
Based on the stability result and following the routine analysis we commonly used [9, 14, 15], then we are able to prove the error estimate without considering optimization errors in solving the nonlinear least square problem. Assume the boundary condition is satisfied exactly, then defined in (12) when , and similarly the corresponding discretized problem is the minimization problem given in (13) without the boundary term neither. Then, ,
Meanwhile, noticing that , we have
where the last second inequality is obtained due to the Lipschitz continuity of the nonlinear equation with respect to as assumed in the assumption A. Therefore, we have
where the first term characterize the approximation error, and the second term is commonly known as the statistical or generalization error. As for the approximation error, we have the following result proved in [16 Corollary 3.8].
Theorem 6. Assume that have a global extension such that and its Fourier transform . For the randomized neural networks with random variables sampled independent and identically distributed from the uniform distributions over the bounded domain , if the parameter is chosen as and , then we have
where is a positive integer, , , with being the -th row of the matrix, and and denoting the -th component of the vectors, respectively.
Remark. Fix the way to randomly generate the parameters in the hidden layer, by considering the almost optimal way in the analysis to determine the weights in the output layer, we try to show the smallest bound for all possible different choices of parameters in the hidden layer, from which we know it is reasonable assume the output weights have bounded Euclidean norm under some additional regularity assumption, a commonly-used assumption in the establishing the statistical error.
To do that, suppose with , where and . As shown in [16], we know
where the function is defined to satisfy integral representation of the shallow neural network, and is the density function of the uniform distribution satisfying .
Since for some constant , we know that it is bounded as . Therefore, we have
This implies that for solution with high regularity, for some , and increasing number of neurons leads to the decay of the almost optimal output weights. So assuming the solution at least or higher, we can reasonably assume the output weights have bounded Euclidean norm independent of the width for simplicity, which is also required by the local error estimate.
As for the statistical error, after the set of basis functions are determined by randomly chosen according to the uniform distributions, we can prove the following.
Theorem 7. For a randomized shallow network with bounded output weights in the Euclidean norm, we have
for some constant .
Proof. Here we mainly use the Rademacher complexity to derive the result. Firstly,
where with being the Rademacher random variables, , and .
For a basis function , , from which we know . Since is a fixed constant, is the difference of two tanh functions, and is Lipschitz continuous with respect to , we know . Therefore, we further have
Separating by the linearity of the Rademacher complexity, then for the first term we have
where the first inequality is obtained due to the boundedness of the output weights in 2 norm. Noticing that , we further have
from which we obtain . Similarly, we have . Therefore, we obtain the conclusion noticing that .
Combining all of previous results, we obtain the following error estimate.
Theorem 8. With the previous assumptions, we have the following local error estimate
for some constant and , where is the number of neurons in the hidden layer, and the error estimate is understood in mean.
Remark. So to guarantee the convergence, at least we need the number of sampling points growing far more fast than the number of neurons in the hidden layer. However, the rate of depending on can be further decreased by using different tools. Here we just present the worst case.
Improvements using the multilevel method
In this section, in order to accelerate the calculation as well as improving the solution accuracy, adapting the multilevel method proposed in [9], we further propose a projection method by considering a minimization problem to fulfill the purpose of increasing the robustness of the algorithm.
For the discretized characteristic matrix , where denotes the number of sampling points and is the number of neurons in the hidden layer (i.e., the number of basis functions), to carry out the initialization process followed by the optimization algorithm, relative large values of both and would be needed for finding more solutions with better accuracy. However, increasing these two numbers too much would significantly increase the memory consumptions and the computational costs. Meanwhile, for the given threshold to determine accepting one approximation as a solution or not, on a coarse neural network, it is highly possible that an approximation is denied due to its low accuracy. So in order to partially overcome these difficulties, we firstly propose a projection method and then combine with the multilevel method, which turns out the new method can sharply reduce the computational costs while preserving high solution accuracy, even being able to find more solutions as shown in the numerical tests.
To be specific, given relatively small numbers of both and , by the initialization algorithm and the Newton method proposed in the previous sections, assume we have obtained one solution . Now with relatively large numbers of and , given a and to map the solution from a coarse network to a fine network, we firstly consider the following linear least square problem
where and , the row vectors consisting of the randomized basis functions for the neural networks with the width and , respectively, is number of (uniformly distributed) sampling points to do the fitting, and the corresponding norm is defined to be for . For simplicity, we can take and use the sampling points in the fine network to calibrate the closeness of the solutions in different levels of networks. Like before, for this linear square problem, the solution can be easily obtained by solving the corresponding normal equation. Likewise, given a , we could also define another similar linear least square problem as follows
which maps the solution from a fine network to a coarse network, as we will use later. Inspired by the Gauss-Newton method, suppose the solution of the least square problem (21) is denoted by , then as a good initial guess, we have
from which we obtain , where satisfies
where the equality is understood also in the least square sense. If this works, then we can repeat several times to further improve the solution’s accuracy. Inspired by the multigrid method, we define a new method, called hierarchical randomized neural networks, to efficiently and accurately find multiple solutions of the considered semilinear problem. We describe the method in Algorithm 3 for the two level version, which is very like the full multigrid method.
In the algorithm, for the initial solution, we can just take the trivial solution if it is. Otherwise, with an arbitrary initial guess, we need solve a nonlinear least square problem once using a randomized neural network. This process can be repeated to compute multiple solutions on a very fine network. And also due to its ability of improving accuracy, we can set a relatively large threshold on the first course network and use a relatively small one on the fine networks to identify more potential solutions.
Algorithm 3: Hierarchical randomized neural networks (Two levels)
Input: Two randomized neural networks with and hidden layers (), and sampling points (), respectively, and a given constant . And the set of finding solutions is denoted by . Suppose an initial solution has been identified, denoted by , and .
For currently new solution or just added one in , perform the initialization in Algorithm 1 and then the optimization in Algorithm 2 on the coarse network with the width using sampling points. Here assume we find some approximations, the set of which is denoted by .
In order to enhance the solution’s accuracy, for each potential solution , (a) we do the prolongation operator by solving the linear least square problem (21) and obtain an improved approximation by the Gauss-Newton method on the fine network with the width using sampling points. (b) Accept the improved approximation as the solution if the norm of residues is less than or equal to , and set ; Otherwise deny the approximation as one solution.
For each new solution , we do the restriction operator by solving the linear least square problem (22) on the coarse network with the width using sampling points. And then back to step 1 to repeat the process to find more solutions.
Output: The multiple solutions in with satisfied accuracy.
Numerical experiments
In this section, we carry out the numerical experiments using the proposed method. Here we use , and when , and , respectively. All the experiments are implemented by Python on a desktop PC with an Intel Xeon E5-2666 V3 CPU (2.90 GHz) and 32 GB of RAM. The shallow neural networks use as the activation function. And the weights and bias of the neural networks are initialized by the scrambled Sobol sequences. That is, , , where and denote the two coordinate blocks of a scrambled Sobol point set, denotes the element-wise product, and is the weight scaling parameter. In the coarse level, we set , and in the refinement levels, we set to improve the expressivity of the neural networks. Unless otherwise specified, the structures of the shallow neural networks as well as the sampling points in different levels follow the numbers given in Table 1.
| Level | 1D | 1D | 2D | 2D | 3D | 3D |
| Coarse | 120 | 400 | 600 | 2000 | 720 | 2400 |
| Level 1 | 240 | 1200 | 1000 | 4000 | 1300 | 4800 |
| Level 2 | 400 | 2400 | 1600 | 8000 | 2200 | 8000 |
| Level 3 | 640 | 4000 | 3500 | 12000 | 3500 | 12000 |
Table 1. Numbers of random features and collocation points.
In the process of initializations, the parameters is set as at the coarse level and at the refinement levels. In all levels, we employ and . The deflation parameters are set as and . In GDGN, we set and employ a line search with an initial step size of , and the step size is halved at most 16 times until a reduction in the residual is achieved. Meanwhile, in order to test the accuracy of the proposed method, we use the following relative errors for problems with exact solutions available and RMS errors for others,
where and represent the numerical solutions and the exact solutions, respectively, denotes the residual of the PDEs, and represents the total number of test points chosen uniformly in the domain. For the 1D, 2D and 3D problems, we set , , and , respectively.
Example 1 (Bratu problem). We first consider the following Bratu problem,
where and . This problem has two exact solutions given by , where takes either of the two positive roots of .
| Solution | Level | Coarse | Level 1 | Level 2 | Level 3 | |
| Solution 1 | 3.718e-05 | 1.276e-13 | 9.410e-14 | 6.097e-14 | 1.570e-15 | |
| Solution 2 | 1.545e-02 | 4.579e-13 | 2.643e-13 | 2.093e-13 | 4.060e-14 |
Table 2. Numerical errors of the multilevel solutions for Example 1.
Table 2 reports the training errors on different levels. It’s clearly observed that the multilevel refinement significantly reduces the PDE residuals, thus yielding the final relative errors of and , respectively. These results demonstrate the effectiveness of the proposed method in identifying multiple solutions and achieving high numerical accuracy. For completeness, the numerical solutions and the exact solutions as well as the residuals are presented in Figure 1.

Figure 1. Numerical results for Example 1. (a) Comparison of numerical and exact solutions; (b) PDE residuals in different levels.
Example 2. Next we consider the following boundary value problem,
where , and exact solutions are and .
Table 3 reports the training PDE residuals at different refinement levels for Example 2. We can see that the proposed method successfully identifies both solutions, with relative errors on the order of . Although the residuals increase slightly at Level 3, they remain at the order of –. This may be caused by roundoff errors, as the residuals have already reached a very low level.
| Solution | Level | Coarse | Level 1 | Level 2 | Level 3 | |
| Solution 1 | 1.615e-03 | 2.924e-13 | 2.275e-13 | 4.666e-13 | 2.210e-15 | |
| Solution 2 | 4.429e-06 | 2.174e-12 | 1.768e-12 | 3.304e-12 | 2.060e-15 |
Table 3. Numerical errors of the multilevel solutions for Example 2.
Example 3. Here we consider the following nonlinear boundary value problem,
where . This nonlinear equation can be factorized as , which has two distinct classical solutions under the homogeneous Dirichlet boundary conditions, where and . This example also provides a simple test of the proposed method’s ability to identify distinct solution branches.
From Table 4, we can see the training PDE residuals at different refinement levels for Example 3. In the coarse level, the residuals of two solutions are and . After the first refinement, both residuals decrease to , indicating a substantial improvement. Like the previous example, the residuals increase slightly at Level 3, which may be caused by the roundoff errors, as the solutions have already achieved very high accuracy. Moreover, the relative errors reach , approaching the machine precision. All of these results show the accuracy of the proposed multilevel method.
| Solution | Level | Coarse | Level 1 | Level 2 | Level 3 | |
| Solution 1 | 2.329e-09 | 3.830e-12 | 1.441e-12 | 2.011e-12 | 4.240e-16 | |
| Solution 2 | 2.734e-03 | 7.660e-12 | 2.882e-12 | 4.022e-12 | 4.100e-16 |
Table 4. Numerical errors of the multilevel solutions for Example 3.
Example 4. Given a non-negative parameter , We consider the following nonlinear boundary value problem
Here in order to enforce the mixed boundary conditions, we employ the modified random features defined by . Meanwhile, unlike the previous examples, we set , the coarse-level feature scale , and the refinement feature scales to .
For this test case, as pointed out in [17], for any given parameter , there exist multiple solutions, and the number of solutions increases as goes large. So here we consider , respectively, to see the abilities of our method identifying the different solutions. As shown in Figure 2, the proposed method successfully identifies all nontrivial solutions for each , demonstrating its effectiveness in discovering multiple solutions.

Figure 2. Nontrivial numerical solutions of Example 4 for different .
Table 5 presents the numerical results for . The proposed method successfully identifies all three nontrivial solutions. Multilevel refinement significantly reduces the PDE residuals, with two solutions reaching the order of –, while the third achieves .
| Solution | Coarse | Level 1 | Level 2 | Level 3 | |
| Solution 1 | 1.702e-03 | 9.768e-11 | 3.945e-10 | 1.980e-10 | 2.031e-10 |
| Solution 2 | 4.030e-02 | 4.059e-12 | 1.883e-11 | 9.506e-12 | 9.737e-12 |
| Solution 3 | 6.708e-02 | 9.573e-04 | 3.323e-04 | 2.999e-04 | 3.014e-04 |
Table 5. Numerical errors of the nontrivial multilevel solutions for Example 4 with .
Example 5. In this case, we consider the following 2D nonlinear elliptic problem,
where . This problem has a trivial solution and infinitely many non-trivial solutions. Meanwhile, the set of the exact solutions is invariant under the dihedral group , so that the rotation of the solution by integer multiple of 90 degree is still a solution.
In this case, we set coarse-level threshold to make more candidates for refinement. As shown in Table 6, although some coarse solutions have relatively large residuals, multilevel refinement reduces them by several orders of magnitude. Meanwhile, to further show the effectiveness of the multilevel method, we compare it with direct nonlinear
| Solution | Coarse | Level 1 | Level 2 | Level 3 | |
| Solution 1 | 1.149e+00 | 3.831e-07 | 9.237e-09 | 2.127e-10 | 2.632e-10 |
| Solution 2 | 4.675e+00 | 3.831e-07 | 9.237e-09 | 2.127e-10 | 2.632e-10 |
| Solution 3 | 4.457e+00 | 3.291e-03 | 2.313e-04 | 1.038e-06 | 1.283e-06 |
| Solution 4 | 4.467e+00 | 3.291e-03 | 2.313e-04 | 1.038e-06 | 1.283e-06 |
| Solution 5 | 4.565e+00 | 4.054e-03 | 1.843e-04 | 1.094e-06 | 1.264e-06 |
| Solution 6 | 4.575e+00 | 4.054e-03 | 1.843e-04 | 1.094e-06 | 1.264e-06 |
| Solution 7 | 4.869e+00 | 5.839e-02 | 5.252e-03 | 4.932e-05 | 5.758e-05 |
| Solution 8 | 3.003e+00 | 5.839e-02 | 5.252e-03 | 4.932e-05 | 5.758e-05 |
| Solution 9 | 4.189e+00 | 1.020e-01 | 1.048e-02 | 1.362e-04 | 1.566e-04 |
| Solution 10 | 4.399e+00 | 1.174e-01 | 1.163e-02 | 1.434e-04 | 1.579e-04 |
| Solution 11 | 4.144e+00 | 1.174e-01 | 1.163e-02 | 1.434e-04 | 1.579e-04 |
| Solution 12 | 4.486e+00 | 1.020e-01 | 1.048e-02 | 1.362e-04 | 1.566e-04 |
Table 6. Numerical errors of the nontrivial multilevel solutions for Example 5.
optimization at Level 2 (Here the direct nonlinear optimization at Level 3 would be computational costs and also may exceed the memory limit). So in order to make a fair comparison, all other procedures remain unchanged, including initialization and solution search algorithms.
Table 7 presents the results, which demonstrates that the proposed multilevel method not only increases the solution accuracy significantly using less than one tenth computational cost, but also is able to find more distinct solutions. This is particular important when we search for as many solution as possible. Lastly, we also show the structures of
| Method | Solutions | Min. Err | Max. Err | Time (s) |
| Direct Level-2 | 8 | 94121 | ||
| Multilevel | 12 | 7093 |
Table 7. Comparison results for Example 5.
the identified nontrivial solutions in Figure 3, from which we can see that all symmetric solutions can be identified. That is, as long as is a solution, so is the for the dihedral group . This is another evaluable point demonstrating the effectiveness of our proposed method.

Figure 3. Nontrivial numerical solutions of Example 5.
Example 6. We consider the following two-dimensional Lotka-Volterra competition system,
where . This problem has four nonnegative solutions, including a trivial solution, two semitrivial solutions, and one positive coexistence solution. Each component uses the same number of random features as in the previous 2D examples, and the two equations are solved simultaneously.
As shown in Table 8, the proposed method again successfully identifies all four nonnegative solutions. The multilevel refinement again reduces the PDE residuals to the order of , with of order . All of these results show the effectiveness of our proposed method again for the system of nonlinear problems.
| Solution | Coarse | Level 1 | Level 2 | Level 3 | |
| Solution 1 | 1.505e-03 | 9.159e-07 | 5.014e-07 | 7.607e-08 | 1.188e-07 |
| Solution 2 | 2.817e-04 | 9.159e-07 | 5.014e-07 | 7.607e-08 | 1.188e-07 |
| Solution 3 | 3.017e-03 | 1.079e-06 | 5.910e-07 | 8.965e-08 | 1.400e-07 |
Table 8. Numerical errors of the nontrivial multilevel solutions for Example 6.
Example 7. Here we consider the following two-dimensional stationary Allen–Cahn equation,
where . Different from the previous examples, this problem is subject to nonhomogeneous Dirichlet boundary conditions. So in this case, the soft constraint is used to handle the nonhomogeneous boundary conditions.
From Figure 4, we can see that our method successfully identifies three distinct solutions. Table 9 presents the PDE residuals at different refinement levels. The results shows that without requiring any prior knowledge of the solution structures, our method once again successfully discovers multiple solutions and achieves high accuracy. The validation RMS errors of the three solutions are , , and , respectively. These results further demonstrate the effectiveness and accuracy of the proposed method in solving nonlinear PDEs with multiple solutions.
| Solution | Coarse | Level 1 | Level 2 | Level 3 | |
| Solution 1 | 7.938e-03 | 5.176e-07 | 1.166e-07 | 2.535e-08 | 3.892e-08 |
| Solution 2 | 3.812e-02 | 3.044e-06 | 2.553e-07 | 2.580e-08 | 4.090e-08 |
| Solution 3 | 8.285e-03 | 3.717e-06 | 2.085e-07 | 2.600e-08 | 3.981e-08 |
Table 9. Numerical errors of the multilevel solutions for Example 7.

Figure 4. Results of Example 7. Here (a) shows the unstable solution, while (b) and (c) show the positive and negative stable solutions, respectively.
Example 8. We lastly consider the following three-dimensional Allen-Cahn equation
where and . For , this problem has three solutions: the trivial solution and a pair of symmetric positive and negative solutions. As shown in Figure 5, the proposed method successfully identifies all nontrivial solutions. And Table 10 presents the training loss and validation . From the table, it’s clear that the multilevel refinement reduces the PDE residuals to , with of for both nontrivial solutions. Since these two nontrivial solutions are and , the symmetry known from the equation, and our method seems exactly preserve this hidden symmetry, which explaining why except the coarse level, it seems we have exactly the same residuals for each refined levels and also exact the same RMS for the obtained different solutions lastly.

Figure 5. Nontrivial numerical solutions of Example 8 on the plane . Here (a) and (b) show the negative and positive solutions, respectively.
| Solution | Coarse | Level 1 | Level 2 | Level 3 | |
| Solution 1 | 2.088e-03 | 5.064e-04 | 1.107e-04 | 3.033e-05 | 3.704e-05 |
| Solution 2 | 6.069e-03 | 5.064e-04 | 1.107e-04 | 3.033e-05 | 3.704e-05 |
Table 10. Numerical errors of the nontrivial multilevel solutions for Example 8.
Conclusion
This paper was devoted to developing the method for efficiently and accurately finding multiple solutions of semilinear elliptic problems. The improvements were done mainly from three different aspects, initializations, optimization, and the multilevel technique for accelerations and enhancing solutions’ accuracies. Local error estimate of a particular solution satisfying some conditions were also considered in terms of both numbers of the neurons in the hidden layer and the sampling points. Meanwhile, the numerical tests on several examples with or without exact solutions not only demonstrated the effectiveness of the proposed method (the solution accuracy reaching the machine accuracy for the best case, while the computational cost being reduced to less than 8% for the tested case), but also preserved the inherent symmetries of multiple solutions, latter of which is significant in some applications.
For the proposed method, high dimensional problems are not tested yet, which will be considered in the future. Meanwhile, how to fulfill the proposed algorithm in a cluster using some parallel techniques to identify multiple solutions of some large-scale engineering problems is also worth to consider. Lastly, as the first paper in a series of work, we will continue to work on semilinear problems with exponential nonlinearity or others, to see if further theoretical analysis on solutions can be used to alleviate the computation to find more solutions.
Acknowledgments
The work was supported by the Natural Science Foundation of China (12671352), the Research Foundation and the Young Core Instructor Project of Education Department of Hunan Province (25A0167, 25B0011, and HNJG-20230343), the Major Scientific and Technological Innovation Platform Project of Hunan Province (2024JC1003), and the Natural Science Foundation of Hunan Province (2025JJ50013). We are also grateful to the High Performance Computing Center of Central South University for partial support of this work.
Declaration of interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work.
References
- [1]D. Costa, An Invitation to Variational Methods in Differential Equations, Birkhäuser, Boston, 2007.DOI
- [2]L. Ambrosio, X. Cabré, Entire solutions of semilinear elliptic equations in ℝ³ and a conjecture of De Giorgi, Journal of the American Mathematical Society 13 (4) (2000) 725–739.DOI
- [3]M. Pino, M. Kowalczyk, J. Wei, On De Giorgi’s conjecture in dimension N ≥ 9, Annals of Mathematics 174 (2011) 1485–1569.DOI
- [4]M. Tang, Uniqueness of bound states to Δu − u + |u|^{p−1}u = 0 in ℝⁿ, n ≥ 3, Inventiones Mathematicae 243 (2026) 245–291.DOI
- [5]A. Brandt, Multilevel adaptive solutions to boundary value problems, Mathematics of Computation 31 (1977) 333–390.DOI
- [6]G. Timmermann, A cascadic multigrid algorithm for semilinear elliptic problems, Numerische Mathematik 86 (2000) 717–731.DOI
- [7]M. Raissi, P. Perdikaris, G. 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 (2019) 686–707.DOI
- [8]J. Ying, J. Li, Q. Liu, Y. Chen, Improved multi-scale fusion network for solving non-smooth elliptic interface problems with applications, Applied Mathematical Modelling 132 (2024) 274–297.DOI
- [9]J. Ying, J. Hu, Z. Shi, J. Li, An accurate and efficient continuity-preserved deep learning method for elliptic interface problem, SIAM Journal on Scientific Computing 46 (5) (2024) C633–C657.
- [10]M. Lai, Y. Song, X. Yuan, H. Yue, T. Zeng, The hard-constraint PINNs for interface optimal control problems, SIAM Journal on Scientific Computing 47 (3) (2025) C601–C629.arxiv.org/abs/2308.06709
- [11]Z. Zou, Z. Wang, G. Karniadakis, Learning and discovering multiple solutions using physics-informed neural networks with random initialization and deep ensemble, Proceedings of the Royal Society A 481 (2325) (2025) 20250205.
- [12]A. Riley, M. Webb, M. Baker, Deflation techniques for finding multiple local minima of a nonlinear least squares problem, SIAM Journal on Scientific Computing 47 (5) (2025) A2963–A2987.arxiv.org/abs/2409.14438
- [13]M. Grossi, I. Ianni, P. Luo, S. Yan, Non-degeneracy and local uniqueness of positive solutions to the Lane-Emden problem in dimension two, Journal de Mathématiques Pures et Appliquées 157 (2022) 145–210.arxiv.org/abs/2102.09523
- [14]J. Li, H. Mei, Q. Ou, H. Wang, J. Ying, Neural networks for solving elliptic problems: analysis and adaptivities, Applied Mathematical Modelling 155 (2025) 116716.DOI
- [15]J. Li, H. Mei, H. Wang, J. Ying, Shallow neural networks for solving nonuniform size-modified Poisson-Boltzmann equations, Applied Numerical Mathematics 225 (2026) 128–145.DOI
- [16]R. Bi, W. Deng, Adaptive randomized neural networks with locally activation function: Theory and algorithm for solving PDEs, arXiv preprint arXiv:2604.08869 (2026).arxiv.org/abs/2604.08869
- [17]Y. Huang, W. Hao, G. Lin, Hompinns: Homotopy physics-informed neural networks for learning multiple solutions of nonlinear elliptic differential equations, Computers & Mathematics with Applications 121 (2022) 62–73.DOI
- [18]S. Disarò, R. Maity, A. Bacho, Deflation-PINNs and Deflation-Deep-Ritz: Multi-Solution Discovery, Certification, and Refinement for Nonlinear PDEs, Computer Methods in Applied Mechanics and Engineering 464 (2027) 119476.DOI