Electronic Journal of Qualitative Theory of Differential Equations

In this paper, we consider the continuous Hopfield model with a weak interaction of network neurons. This model is described by a system of differential equations with linear boundary conditions. Also, we consider the questions of finding necessary and sufficient conditions of solvability and constructive construction of solutions of the given problem, which turn into solutions of the linear generating problem, as the parameter ε tends to zero. An iterative algorithm for finding solutions has been constructed. The problem of finding the extremum of the target functions on the given problem solution is considered. To minimize a functional, an accelerated method of conjugate gradients is used. Results are illustrated with examples for the case of three neurons.


Introduction
The study of various natural and social phenomena is carried out today by building and investigating their mathematical models.Practical applications contributed to the birth and development of many mathematical disciplines.Among them, there is a theory of dynamic neural networks, which are used to solve various optimization problems, control theory and mathematical modelling.The variety of tasks to be solved led to the existence of several models of such networks.An important place among them takes Hopfield model (see [22,25,43]), a single layer neural network with general non-linear and additional internal linear connections among neurons.Hopfield nets have a large number of publications.Both models with discrete and continuous time are considered.In particular, such questions as stability (see [47]), absolute stability of neural nets (see [15]), modelling of closed control systems, asymptotics and stability of relaxation self-oscillations in Hopfield nets with delay (see [19,20]) are considered.The vital phenomenon is flow invariance for such systems (see [34]).Ill-posed problems with fractional derivative (see [46]), optimization problems (see [17,26,45]), deep neural networks (see [35]), relativistic Hopfield model (see [1]), quantum generalization of Hopfield model (see [40]), as well as its discrete analogue (see [2]) are studied.Chaos is explored in the corresponding models (see [14]).The Hopfield model is considered as a model of memory (see [23]).The impulsive Hopfield model with boundary conditions is studied in [38].In this work, the case of weak interaction of network neurons is considered, to the study of which for other models, for example, the papers are devoted [27,29].Using the theory of pseudo-inverse matrices (see [3][4][5][6][7][8]41]), an approach allows establishing necessary and sufficient conditions for the solvability of boundary-value problem for a system of differential equations that describe Hopfield network for n neurons with weak interaction.We use hyperbolic tangent as the increasing activation function and symmetric matrix of weights as in [22, p. 690]).The application of the accelerated method of conjugate gradients (see [31,32]) for solving the problem of finding the extremum (minimum) of the loss function is explored on the solutions of the given problem in the form of a quadratic functional of synaptic communication scales.

Formulation of the problem
We consider a continuous Hopfield model with a weak interaction of the network neurons, the evolution in time of which is described by a system of n non-linear differential equations (see [22, p. 690], [43, p. 140]) x j (t) = − x j (t) where x j (t) ∈ C 1 [0, T] is the potential of the jth neuron; the real parameters a j are gain coefficients of the jth neuron, and w ij are the elements of a symmetric matrix W: , which consists of synaptic weights of the connection of the ith neuron with the jth neuron, R j are the leakage resistances, Îj (t) 1 is a small parameter characterizing the strength of the interaction of network neurons.
As is known (see [22, p. 693], [43, p. 144]), in practice the property of a monotonic increasing of the activation function (in our case this is hyperbolic tangent) of the considered matrix W (w ij = w ji , w ii = 0) and the asynchronous mode of network operation are often used.It provides the global asymptotic stability of the Hopfield network.These features persist in the case of a weak interaction of network neurons described by equation (2.1) and provide both practical and theoretical interest in Hopfield networks.For the convenience of further reasoning, we rewrite the equation (2.1) in the following form where w is a vector of dimension M = n(n − 1)/2 formed from the elements of the matrix W in the following way: w = col w 12 , w 22 , . . . ,w 1n , w 23 , w 24 , . . . ,w 2n , . . . ,w (n−1)n .
In some cases, the solutions of systems of equations describing the functioning of neural nets satisfy additional conditions due to particular properties of the modelled process.Various types of boundary-value problems are explored for such systems (see [12,38,44]).In our paper, we investigate the questions of finding conditions for the existence and effective construction of equation (2.2) solutions with m boundary conditions , which for ε = 0 turns into the solution of the generating problem ) These solutions will be called generating solutions of the boundary-value problem (2.2), (2.3).Note that the boundary-value problem (2.2), (2.3) includes both underdetermined (m < n) and overdetermined (m > n) boundary-value problems, the study of which for Hopfield models is not given enough attention, in our opinion.

Necessary condition for the solvability of the problem (2.2), (2.3)
Let us first consider the question of solution existence to the problem (2.2), (2.3).For this purpose, we use the general scheme for the exploration of boundary-value problems studied in detail in [7], which allows finding effective coefficients which are necessary and sufficient for the solvability of problem (2.2), (2.3).In particular, for the generating problem (2.4), (2.5), the following criterion holds (see [7]).
Theorem 3.1.The homogeneous problem (2.4), (2.5) (I(t) = 0, α = 0) has an r-parametric (r ≤ n) family of solutions x(t, c r ) The inhomogeneous problem (2.4), (2.5) is solvable if and only if g satisfies d (d ≤ m) linearly independent conditions: In this case, the inhomogeneous problem (2.4), (2.5) has an r-parameter family of solutions x(t, c r ) ∈ C 1 [0, T] of the following form: where is the generalized Green operator. Here

Rn
is a fundamental decision matrix of the linear homogeneous system (2.4), is the matrix which consists of the complete system r (d) of linearly independent columns (rows) of the projector matrix P Q (P Q * ), where P Q (P Q * ) is projector onto the kernel (cokernel) of the matrix Q, Q + is the Moore-Penrose pseudo-inverse (see [37]) to the Q matrix.
Let us find necessary conditions for the existence of a solution x(t, w, ε) to the problem (2.2), (2.3), which for ε = 0 turns into one of the solutions x(t, c r ) of the generating problem (2.4), (2.5) Taking into account (3.1), we obtain that condition (3.3) is equivalent to the following Considering the limit for (3.4) as ε → 0 and also taking into account that x(t, w, ε) → x(t, c r ) in this case, we obtain the following solvability condition Note that in the case of the periodic boundary-value problem (2.2), (2.3) (lx(•, w, ε) = x(0, w, ε) − x(T, w, ε) = α = 0) equation (3.5) corresponds to that known in the theory of nonlinear oscillations of the equation for the generating amplitudes (see [21,33]).Therefore, we will call the equation (3.5)  3) has a solution, which for ε = 0 turns into one of the solutions x t, c 0 r generating boundary-value problem (2.4), (2.5), then the vector c 0 r ∈ R r must be a real solution to the equation for the generating vectors (3.5).

Optimization of the objective function
One of the important research questions of exploring neural networks is finding the extremum (minimum) or the objective function by solving the considered model.In particular, the such problems, arising in medicine, neurobiology, machine learning, were studied in [11-13, 36, 42, 44].In this paper, we consider the problem of finding the minimum of the objective function on the solutions of boundary-value problem (2.2), (2.3), which at ε = 0 turn into generating solution of (2.4), (2.5).Here, x 0 is the generating solution and q is a small parameter.Suppose that when ε tends to 0 function L(x(t, w, ε), w) takes the form of quadratic functional by vector of parameters w ∈ R M , that is where x t, c 0 r is a solution of the generating problem (2.4), (2.5) and S : R M → R M is the linear self-adjoint bounded positive operator (positive definite quadratic form), that is f ∈ R M .Restriction (4.1), as known from [30], is equivalent to finding solutions w of the following equation To minimize functional (4.1) we use the accelerated method of conjugate gradients, which, as known from [31,32], improves the convergence of the method of steepest descent and the conjugate gradient method, expands their scope and is more robust to rounding errors.Since S satisfies condition (4.2), the functional (4.1) has a unique minimum w * (equation ( 4.3) has a unique solution for any f ) (see [30]).
Let us take a closer look at the accelerated method of conjugate gradients.Its essence for the minimization of functional (4.1) is, that based on some initial value approximation w = w 0 , the following approximate solutions are determined according to the formulas ) where ϕ i , i = 1, n 0 , n 0 ≤ M is a system of linearly independent elements and the unknown parameters α k , β k and a k i we will determine from the system of linear algebraic equations Note that in [31], using the form of functional (4.1) and the rule of differentiation of scalar product, a convenient for practical application computational scheme of the method (4.4)-(4.6) is given.
Remark 4.1.As known (see [31]), the use of the method (4.4)-(4.6) in the space R M allows to obtain an exact solution to equation (4.3) in k ≤ M iterations.
Let us formulate, using the results of [31], an estimate for the rate of convergence of the corresponding conjugate gradient method (4.4)-(4.6)for our optimization problem.Let H n 0 , n 0 ≤ M be the subspace spanned on a system of linearly independent elements {ϕ i } n 0 i=1 .We introduce into consideration a self-adjoint mapping in the space V n 0 , Here the operator Z is linear and is defined by the formula where g ∈ R M is an arbitrary element and h ∈ H n 0 is a solution of equation where P is the operator of orthogonal projection R M onto H n 0 .
The following statement is true (see [31]).
Theorem 4.3.Let the operator S satisfy condition (4.2).Then, the accelerated method of conjugate gradients (4.4)-(4.6)converges and the rate of its convergence is characterized by estimate where

A sufficient condition for the solvability of problem (2.2), (2.3)
For the further investigation of the problem (2.2), (2.3), let us fix the value of the vector of parameters w = w * , which is found using the accelerated method of conjugate gradients (4.4)-(4.6).To obtain a sufficient condition for the existence of a solution, we make the following change in variables in the boundary-value problem (2.2), (2.3): where x t, c 0 r is a solution of the generating boundary-value problem (2.4), (2.5), and c 0 r ∈ R r is a solution to the equation for the generating vectors (3.5).By replacing the variables in (5.1), the study of the existence of a solution to problem (2.2), (2.3) is reduced to the corresponding question for the boundary-value problem As follows from the vector-function Z(x(t, w * , ε)), it is differentiable in the neighbourhood of the generating solution x t, c 0 r , therefore, the following representation holds: where is a limit to which the function Z(x(t, w * , ε)) tends under ε tends towards 0 and c = c 0 r , is derivative in the sense of Fréchet, and R(y(t, w * , ε)) are higher-order members Thus, the boundary-value problem (5.2), (5.3) takes the following form ) According to the Theorem 3.1, under d conditions boundary-value problem (5.4), (5.5) has an r-parametric family of solutions of the following form ) Using condition (3.5), relation (5.6) can be rewritten as (5.8) Substituting (5.7) into (5.8),we obtain the following equation for c r : W * H (τ, y(τ, w * , ε), y(τ, w * , ε)) dτ, (5.9) where matrix B (d × r) has the following form (5.10) The algebraic system (5.9) is solvable if and only if d 1 conditions hold If, for example, then the condition (5.11) is always valid, and system (5.9) has r 1 -parametric solution Here is a matrix that consists of the complete system r 1 (d 1 ) of linearly independent columns (rows) of the projector matrix P B (P B * ), where P B (P B * ) is the projector on kernel (cokernel) of the matrix B, B + is the Moore-Penrose pseudo-inverse to the matrix B.
From now on we will restrict ourselves to the particular solution c r = c of the system (5.9).So, for defining the solution of the problem (5.2), (5.3) we come to the system of equations which can be solved using a convergent iterative process explained in detail in [7].The following statement is true.
Theorem 5.1 (Sufficient condition).Let the generating problem for (2.2), (2.3) problem (2.4), (2.5), subject to the conditions of d linearly independent conditions (3.1), have an r-parametric family of solutions x t, c 0 r (3.2) and the operator S satisfy condition (4.2).Then for every real value of the vector c 0 r ∈ R r , which satisfies the equation for the generating vectors (3.5), for the value of the parameter vector w * ∈ R M minimizing the quadratic functional (4.1), and when conditions (5.12) hold, the boundary-value problem (2.2), (2.3) has a solution that can be found using the following iterative process Corollary 5.2.Let r = d and nonlinearity F (c r ) has the inverse to F c 0 r for the vector c 0 r , that satisfies the equation (3.5).Then F c 0 r = B, and for such each c 0 r , the boundary-value problem (2.2), (2.3) has a unique solution.
Proof.Consider the difference Based on the representation (3.2), that is x(τ, c r ) = U(τ)P Q r c r + (G[I, α])(τ), we obtain that where R (U(τ)P Q r h) contains terms higher than the first order in h.Substituting the received equality in the difference F(c r + h) − F(c r ), we get the following: From the equation above we obtain that F c 0 r = B. Thus, reversibility of F c 0 r implies the invertibility of the matrix B. From this follows, that In this case, the matrix Q is defined by the equality The Moore-Penrose pseudo-inverse matrix Q + and vector g have the following form: and orthoprojectors P Q , P Q * look as follows where E 2 , E 3 identity matrices of dimensions 2 and 3, respectively, O 2 is zero matrix of dimension 2. That is, r = 1, d = 0 and the condition of solvability (3.1) holds, and the linear boundary-value problem (2.4), (2.5) has a one-parameter set of solutions of the following form: The equation for the generating vectors (3.5) takes the form of the identity F(c r ) ≡ 0 for any vector c r .Example 6.2.Consider the original problem for three equations with the boundary condition (2.3) of this form In this case and the Moore-Penrose pseudo-inverse matrix Q + coincides with matrix Q −1 , the vector g has the form The orthoprojectors P Q , P Q * are given by the relations where O 3 is the zero matrix of dimension 3. The condition of solvability (3.1) is fulfilled automatically, and the linear boundary-value problem (2.4), (2.5) has only one solution of the following form: Any vector c r satisfies the equation for generating vectors (3.5) since P Q * = O 3 .From (5.10) follows that matrix B = O 3 .Thus, the boundary-value problem (2.2), (6.1) has a solution which, according to Theorem 5.1, can be found using the iterative process If we rewrite this componentwise, then we obtain the following iterative procedure for finding the solutions of the boundary-value problem (2.2), (6.1): Example 6.3.Let us consider the Hopfield model for three neurons described by the boundary-value problem (2.2), (2.3) of the form x 2 (t, w, ε) = ε (w 12 tanh (x 1 (t, w, ε)) + w 23 tanh (x 3 (t, w, ε))) , and the generating problem for it x 1 (1) Let us investigate the problem of finding the extremum (minimum) of the loss function on the solutions of the boundary-value problem (6.2), (6.3), which at ε = 0 turn into solutions of the generating problem (6.4), (6.5), by the vector of parameters w = col w 12 , w 13 , w 23 ∈ R 3 .
Using the well-known formulas (see [7, p. 48], [28, p. 501]), we get r = 2, d = 1, and the vector g has the following form The solvability condition (3.1), in our case, is satisfied and due to Theorem 3.1, the solution of the generating problem (6.4), (6.5) takes the form The necessary condition for the existence of a solution x(t, w, ε) of the problem (6.2), (6.3), which by ε = 0 turns into one of the solutions x(t, c r ) (6.8) of the generating problem (6.4), (6.5), in our case has the following representation: or The values of the parameters c 2 = c 3 = 0, which are the solution of the system of equations (6.9), determine the generating solution to which corresponds the solution x(t, w, ε) of the problem (6.2), (6.3).Let us return to the problem of finding the minimum of functional (6.6).When ε tends to 0, taking into consideration x(t, w, ε) → x t, c 0 r , where x t, c 0 r taking into consideration (6.10), we obtain the quadratic functional for the vector of parameters w Φ(w) = 4w 2  12 + 2w The problem of finding the minimum of the quadratic functional (6.11) is equivalent to the solution of the following equation To find the solution of the equation (6.12), or, which is the same, find the minimum of the quadratic functional (6.11), we use the accelerated method of conjugate gradients (4.4)- (4.6) and compare it with the method of steepest descent and the conjugate gradient method.Now let us consider the case where If the system ϕ i , i = 1, n, n ≤ 3 consists of more than one linearly independent element, then the rate of convergence of the accelerated method of conjugate gradients increases.Without cluttering the example above with calculations that can be made following the computational scheme from [31], we present successive approximations to the minimum of functional (6.11) obtained by the accelerated method of conjugate gradients and the conjugate gradient method Therefore, as can be proved by substituting the obtained approximations into the equation (6.12), the minimum of functional (6.11) is achieved by the accelerated method of conjugate gradients in the second approximation w 2 , and by the conjugate gradient method in the third approximation w 3 , and is equal to Note that the rate of convergence of the method of steepest descent, in our case, is considerably slower and even the approximation w 5 is far away from the value (6.13) Let us fix the value of the vector of parameters w = w * (6.13).Let us now find the sufficient condition for the existence of solutions of the problem (6.2), (6.3).For this we make the substitution x(t, w * , ε) = x t, c 0 r + y(t, w * , ε), where x t, c 0 r has the form (6.10).After such a substitution we obtain the following boundaryvalue problem For the vector-function Z x t, c 0 r + y(t, w * , ε) , in the neighbourhood of the generating solution x t, c 0 r (6.10), the following representation holds where The function H (t, y(t, w * , ε), y(t, w * , ε)) has the form: in our case takes the following view Using (6.7), (6.14), we verify the validity of condition (5.12).Following Theorem 5.1, we can find an approximate solution of (6.2), (6.3), which under ε = 0 turns into x t, c 0 (6.10) of the generating problem (6.4), (6.5), following this algorithm ) Let us construct the first approximation x 1 (t, w * , ε).Since y 0 (t, w * , ε) = y 0 (t, w * , ε) = 0, then the constants c 0 2 (w * , ε), c 0 3 (w * , ε) defined by formula (6.15) take the form c 0 2 (w * , ε) = c 0 3 (w * , ε) = 0. From (6.16)-(6.20)we obtain and all subsequent approximations x k (t, w * , ε), k ≥ 2 are equal to the first approximation, that is vector-function (6.23), as can be seen by a simple substitution, is the solution of (6.2), (6.3), which at ε = 0 turns into the generating solution (6.10) for the values of parameters (6.13), minimizing functional (6.11).
Note that one of the important concepts in the study of the problem for finding the extremum of a function on solutions of an equation, including problem (2.2), (2.3), (4.1), is the concept of solution sensitivity with respect to the parameters s(t, ε) = ∂x(t, w, ε) ∂w .
In the literature [9,10,12,16,18,24,42] there are two approaches to find s(t, ε): the direct method, which uses the chain rule to find the complete derivative, and adjoint sensitivity method from Pontryagin papers [39].The use of the conjugate sensitivity method reduces the computational costs when finding the gradient by parameters when the number of parameters is much greater than the dimension of the set of required functions.When the number of parameters is much less than the number of desired functions, the advantages of this method are lost due to the complexity of solving the auxiliary coupled system.In Example 6.3 we consider a boundary-value problem for systems of three differential equations with three parameters.Therefore, the use of the direct method and adjoint sensitivity method for finding the gradient by parameters w 12 , w 13 , w 23 are equivalent.However, when investigating the problem of optimization of function on solutions of the Hopfield network for n (n 3) neurons, in which the number of weights by far exceeds the number of potentials (M n), the adjoint sensitivity method has advantages over the direct method.The study of relationships of the direct method, adjoint sensitivity method and the accelerated method of conjugate gradients for solving the presented paper tasks will be devoted to our future research.

Conclusions
Necessary and sufficient conditions for the solvability were established, as well as a constructive algorithm for finding solutions to a boundary-value problem for a system of weakly non-linear differential equations describing Hopfield network for n neurons is presented.The problem of minimizing a functional on the solutions of the given problem was investigated and the application of the accelerated method of conjugate gradients to its solutions was explored.The results are demonstrated by examples of problems for the case of three neurons. )