Skip to content
QFT.org

Search QFT.org

Enter a word or phrase.

    You can also browse the main navigation and chapter contents.

    Neural Solvers for Spectral and Boundary Response

    A boundary response can become large because an operator is close to an eigenvalue. Learning that response directly asks a smooth network to approximate a pole. A better starting point is often the smooth shooting determinant whose zeros locate the singularities—but a small determinant error can still move a pole appreciably.

    We train two small determinant surrogates for an exactly solvable Dirichlet operator and compare them with direct shooting, collocation, independent eigenvalue counts, and polynomial fits to the same data. The calculation preserves both failed extrapolation and optimizer stopping: one neural fit shifts the fourth zero far from the physical eigenvalue, while the other does not find it in the tested range.

    Preparation: A linear boundary-value problem, eigenvalues, and a simple pole. Generalized eigenproblems and complex spectral roots discuss conventional spectral diagnostics. Here the spectral parameter is real and the operator is self-adjoint; it is not a quasinormal-frequency calculation.

    Normalize before learning a spectral equation

    Extend the chapter's positive Dirichlet operator

    Lε=−ε2d2dx2+1,0<x<1,ε>0,(1)L_\varepsilon=-\varepsilon^2\frac{d^2}{dx^2}+1, \qquad 0<x<1,\qquad \varepsilon>0, \tag{1}

    by a spectral shift zz. Set

    q=z−1ε2.(2)q=\frac{z-1}{\varepsilon^2}. \tag{2}

    The homogeneous equation (Lε−z)y=0(L_\varepsilon-z)y=0 becomes

    y′′+qy=0.(3)y''+qy=0. \tag{3}

    Minimizing only a homogeneous residual permits y=0y=0 at every zz. We instead fix the shooting normalization

    y(0;q)=0,y′(0;q)=1.(4)y(0;q)=0,\qquad y'(0;q)=1. \tag{4}

    It defines a unique nonzero initial-value solution for every qq. The endpoint data are

    D(q)=y(1;q)=sin⁡qq,C(q)=y′(1;q)=cos⁡q.(5)D(q)=y(1;q)=\frac{\sin\sqrt q}{\sqrt q}, \qquad C(q)=y'(1;q)=\cos\sqrt q. \tag{5}

    At q=0q=0, D=C=1D=C=1. At negative qq, the same functions are

    D(q)=sinh⁡−q−q,C(q)=cosh⁡−q.(6)D(q)=\frac{\sinh\sqrt{-q}}{\sqrt{-q}}, \qquad C(q)=\cosh\sqrt{-q}. \tag{6}

    The square-root representations change form, but the power series

    D(q)=∑j=0∞(−q)j(2j+1)!,C(q)=∑j=0∞(−q)j(2j)!(7)D(q)=\sum_{j=0}^{\infty}\frac{(-q)^j}{(2j+1)!}, \qquad C(q)=\sum_{j=0}^{\infty}\frac{(-q)^j}{(2j)!} \tag{7}

    are entire. There is no branch point or eigenvalue at q=0q=0. Multiplying or dividing a spectral equation by a vanishing factor can manufacture an apparent root, so the removable limit must be retained.

    The Dirichlet eigenvalues are the zeros of DD:

    qn=n2π2,zn=1+ε2n2π2,n=1,2,….(8)q_n=n^2\pi^2,\qquad z_n=1+\varepsilon^2n^2\pi^2,\qquad n=1,2,\ldots. \tag{8}

    Endpoint analysis must precede discretization in a more general problem as well. Jansen, §§2.1–2.3, Eqs. (4)–(13) describes endpoint-adapted fields, cardinal discretization, and matrix eigenproblems for black-hole modes. Our elementary self-adjoint example uses none of its horizon or metric conventions; it isolates the normalization and spectral-validation questions.

    A boundary source and its flux

    Now prescribe a unit source at the right endpoint:

    (Lε−z)u=0,u(0)=0,u(1)=1.(9)(L_\varepsilon-z)u=0,\qquad u(0)=0,\quad u(1)=1. \tag{9}

    When D(q)≠0D(q)\ne0,

    u(x;q)=y(x;q)D(q),Mε(z)=ε2u′(1;q)=ε2C(q)D(q).(10)u(x;q)=\frac{y(x;q)}{D(q)}, \qquad M_\varepsilon(z)=\varepsilon^2u'(1;q) =\varepsilon^2\frac{C(q)}{D(q)}. \tag{10}

    The sign defines the right outward flux. It is not a separately asserted retarded Green function.

    Differentiate DD to find

    C(q)=D(q)+2qD′(q),D′(qn)=(−1)n2qn.(11)C(q)=D(q)+2qD'(q), \qquad D'(q_n)=\frac{(-1)^n}{2q_n}. \tag{11}

    Because C(qn)=(−1)nC(q_n)=(-1)^n, the pole has the form

    Mε(z)=2ε4qnz−zn+regular terms.(12)M_\varepsilon(z) =\frac{2\varepsilon^4q_n}{z-z_n} +\text{regular terms}. \tag{12}

    The positive residue follows from the chosen outward-flux convention and from converting q−qn=(z−zn)/ε2q-q_n=(z-z_n)/\varepsilon^2. The zeros of MεM_\varepsilon, at q=(n+12)2π2q=(n+\tfrac12)^2\pi^2, are not Dirichlet eigenvalues.

    At a true pole the boundary problem (9) has no finite solution. A relative field-error claim exactly there is meaningless. To assess a surrogate, inspect the smooth determinant, its roots, and its behavior at declared offsets from the poles.

    Learn a smooth determinant with hard normalization

    Use the real-axis model

    D^θ(q)=1+qhθ(q),hθ(q)=c+∑j=116vjtanh⁡(wjq/100+bj).(13)\widehat D_\theta(q)=1+q h_\theta(q), \qquad h_\theta(q)=c+\sum_{j=1}^{16} v_j\tanh(w_jq/100+b_j). \tag{13}

    All 49 real parameters are optimized. The exact determinant is entire, but a finite tanh⁡\tanh model generally has complex poles. We therefore call D^θ\widehat D_\theta a smooth real-axis surrogate and do not infer its complex analyticity from a successful real fit.

    Tie the derivative response and reconstructed shooting field to the same function:

    C^θ(q)=D^θ(q)+2qD^θ′(q),y^θ(x;q)=xD^θ(qx2).(14)\widehat C_\theta(q) =\widehat D_\theta(q)+2q\widehat D_\theta'(q), \qquad \widehat y_\theta(x;q)=x\widehat D_\theta(qx^2). \tag{14}

    Then y^θ(0;q)=0\widehat y_\theta(0;q)=0 and y^θ′(0;q)=1\widehat y_\theta'(0;q)=1 hold exactly. Dividing by D^θ(q)\widehat D_\theta(q), when nonzero, also enforces both boundary values in (9). This removes trivial normalization failure without pretending that the interior differential equation is solved.

    Indeed, with s=qx2s=qx^2,

    y^θ′′+qy^θ=qx[D^θ(s)+6D^θ′(s)+4sD^θ′′(s)].(15)\widehat y_\theta''+q\widehat y_\theta =qx\left[ \widehat D_\theta(s)+6\widehat D_\theta'(s) +4s\widehat D_\theta''(s) \right]. \tag{15}

    We evaluate this defect away from the training points. Normalizing the field by a small endpoint determinant can amplify it further.

    There is a subtle built-in identity. At any simple surrogate zero q^\widehat q, (14) forces C^(q^)=2q^ D^′(q^)\widehat C(\widehat q)=2\widehat q\,\widehat D'(\widehat q). Its flux residue is consequently 2ε4q^2\varepsilon^4\widehat q, even if q^\widehat q is wrong. Recovering that algebraic residue relation is a check of the construction, not an independent validation of the pole.

    The need to exclude zero functions also occurs in variational eigenvalue calculations; see E and Yu, §3.5, Eqs. (20)–(23). Here the initial derivative in (4), rather than a norm penalty, specifies the amplitude.

    A fixed fit and conventional alternatives

    Training labels are actual integrations of (3)–(4) at 81 Chebyshev–Lobatto values of qq in [−4,100][-4,100]. The DOP853 solve uses relative tolerance 10−1210^{-12}, absolute tolerance 10−1410^{-14}, and maximum step 0.050.05. Tightening these at nine predetermined nodes changes the endpoint data by at most 5.31×10−135.31\times10^{-13}. The exact expressions (5)–(7) check the numerical labels; their series coefficients are not supplied to the fit.

    The loss is

    L(θ)=181∑i[(D^θ(qi)−Di)2+0.1(C^θ(qi)−Ci)2].(16)\mathcal L(\theta) =\frac1{81}\sum_i \left[ \bigl(\widehat D_\theta(q_i)-D_i\bigr)^2 +0.1\bigl(\widehat C_\theta(q_i)-C_i\bigr)^2 \right]. \tag{16}

    Two initializations and the full optimizer settings are fixed before fitting. Each L-BFGS-B run has a maximum of 800 iterations and a hard maximum of 1600 objective/gradient evaluations, enforced inside the objective wrapper. The last accepted state is retained on a budget stop. Both actual runs stop earlier on a relative objective-change criterion:

    StartObjective evaluationsFinal lossGradient infinity norm
    06945.21×10−75.21\times10^{-7}7.46×10−67.46\times10^{-6}
    12136.22×10−46.22\times10^{-4}0.133

    Both optimizer success flags are true, but neither final gradient meets the separately declared 10−810^{-8} target. Neither fit is discarded, restarted, or replaced by a better test result.

    For a conventional comparison, fit

    Dp(q)=1+qhp(q),Cp(q)=Dp(q)+2qDp′(q),(17)D_p(q)=1+q h_p(q),\qquad C_p(q)=D_p(q)+2qD_p'(q), \tag{17}

    where hph_p is a Chebyshev polynomial of degree 8, 16, or 32. A linear least-squares solve uses the same labels, weights, and normalization as (16). The degree is fixed rather than selected from the test data.

    The nominal test set has 256 independently drawn qq values in [−4,100][-4,100]. Two further fixed grids, each with 129 points, cover [−16,−4][-16,-4] and [100,180][100,180]. These are deterministic approximation errors, not estimates with observational noise:

    MethodNominal DD RMSENegative-range DD RMSEPositive-range DD RMSE
    Neural start 01.91×10−41.91\times10^{-4}0.029960.2123
    Neural start 10.014590.37140.4708
    Chebyshev degree 83.62×10−63.62\times10^{-6}5.08×10−45.08\times10^{-4}0.9749
    Chebyshev degree 168.17×10−148.17\times10^{-14}4.83×10−124.83\times10^{-12}1.74×10−51.74\times10^{-5}
    Chebyshev degree 322.28×10−132.28\times10^{-13}1.00×10−71.00\times10^{-7}1.06×1061.06\times10^6

    The low-dimensional analytic problem favors a simple polynomial. Increasing its degree from 16 to 32 does not improve the retained result and badly damages extrapolation. This is a finite-data and finite-precision comparison, not a general theorem that polynomial or neural methods must dominate.

    Normalized shooting determinants inside the training range and absolute determinant errors beyond it. Neural and polynomial extrapolations diverge from the exact response, with the degree-32 polynomial growing especially rapidly.

    The dots in the left panel are true Dirichlet zeros. The shaded interval on the right is the training range. The displayed extrapolation failures are retained from the fixed fits; no new training data were added to repair them.

    Count modes independently and inspect their locations

    The physical problem supplies several independent spectral tests. Direct shooting locates sign-bracketed zeros without seeding the solver with exact eigenvalues. Chebyshev collocation at orders 24 and 40 diagonalizes the Dirichlet operator after forming the full second derivative and removing endpoint unknowns. An independent symmetric finite-difference matrix, with 128 and 256 interior points, counts negative pivots of K−qIK-qI.

    At positive non-eigenvalue endpoints, the exact continuum count is

    N(q)=⌊qπ⌋.(18)\mathcal N(q)=\left\lfloor\frac{\sqrt q}{\pi}\right\rfloor. \tag{18}

    The finite-difference counts agree at the eight prescribed endpoints, including three modes below 100100 and four below 180180. A finite-matrix inertia is still a count for that discretization; the analytic result and refinement connect it to the continuum problem here. The collocation eigenvalues are real within the recorded arithmetic checks; algebraic and off-grid residuals are reported separately.

    Each surrogate is searched on a fixed 4097-point grid over [−16,180][-16,180], with sign changes refined by a scalar root solver. This diagnostic cannot prove that every zero of an arbitrary tanh⁡\tanh function was found, since an unresolved pair or a touching zero could be missed.

    RootExact qnq_nNeural start 0Neural start 1
    19.869609.869359.44441
    239.4784239.4870239.41586
    388.8264488.8444289.08366
    4157.91367138.26758None found

    Even start 0's count of four is insufficient: its fourth zero is far from the fourth physical eigenvalue. The degree-16 polynomial gives 157.91278157.91278, while degree 32 produces an out-of-range zero at 129.50174129.50174. Counts, positions, and refinement answer different questions.

    Near a simple true zero, a small determinant error shifts the inferred root approximately by

    δqn≃−δD(qn)D′(qn).(19)\delta q_n\simeq-\frac{\delta D(q_n)}{D'(q_n)}. \tag{19}

    The same shift can produce a very large response error. At ε=0.1\varepsilon=0.1 and q=q3+0.001q=q_3+0.001, start 0 has absolute flux error about 1.88×1031.88\times10^3, despite its nominal determinant RMSE of only 1.91×10−41.91\times10^{-4}. All offsets ±0.1\pm0.1, ±0.01\pm0.01, and ±0.001\pm0.001 are retained. A typical smooth-function error does not certify a pole-resolved observable.

    Changing ε\varepsilon while holding qq fixed simply rescales the known map to physical zz and flux units. The companion checks this translation explicitly; it is not evidence of newly learned parameter extrapolation.

    A source can hide an operator pole

    Return to homogeneous Dirichlet endpoints and a constant bulk source:

    (Lε−z)v=1,v(0)=v(1)=0,Rε(z)=∫01v(x) dx.(20)(L_\varepsilon-z)v=1,\qquad v(0)=v(1)=0,\qquad R_\varepsilon(z)=\int_0^1v(x)\,dx. \tag{20}

    The normalized eigenfunctions are 2sin⁡(nπx)\sqrt2\sin(n\pi x). Their overlap with the constant source vanishes for even nn, giving

    Rε(z)=∑n≥1n odd8n2π2 [1+ε2n2π2−z].(21)R_\varepsilon(z) =\sum_{\substack{n\geq1\\n\ {\rm odd}}} \frac{8}{n^2\pi^2\,[1+\varepsilon^2n^2\pi^2-z]}. \tag{21}

    Equivalently,

    Rε(z)=2tan⁡(q/2)/q−1ε2q.(22)R_\varepsilon(z) =\frac{2\tan(\sqrt q/2)/\sqrt q-1}{\varepsilon^2q}. \tag{22}

    Its limit at q=0q=0 is 1/(12ε2)1/(12\varepsilon^2). At z=0z=0,

    Rε(0)=1−2εtanh⁡ ⁣(12ε),(23)R_\varepsilon(0) =1-2\varepsilon\tanh\!\left(\frac1{2\varepsilon}\right), \tag{23}

    recovering the chapter's scalar response.

    At an even-nn eigenvalue the full inverse operator is singular, but (21) has a finite continuation because the specified source has zero overlap with that eigenfunction. The inhomogeneous equation is compatible there but not uniquely solvable; adding the invisible even mode does not change its integrated response. Pole cancellation in one measured quantity is not absence of the mode. The boundary-flux response (10) instead sees every Dirichlet pole.

    Summary

    Hard normalization removes the trivial homogeneous solution, and learning a smooth determinant avoids fitting an explicit divergence. Neither step guarantees accurate eigenvalues or extrapolation. Independent shooting, discretizations, counts, and near-pole probes are essential. The retained example also shows why optimizer success is weaker than a gradient target, why an architecture-imposed residue identity is not an independent check, and why a scalar response can hide eigenmodes through its source overlap.

    Exercises

    1. Obtain the determinant and its flux residue

    Solve the normalized shooting problem, derive (11)–(12), and show why q=0q=0 is not a Dirichlet eigenvalue. Explain what is lost if the initial derivative is not fixed.

    Solution

    For q=k2>0q=k^2>0, the initial conditions give y(x)=sin⁡(kx)/ky(x)=\sin(kx)/k, hence D=sin⁡k/kD=\sin k/k and C=cos⁡kC=\cos k. Differentiating with dk/dq=1/(2k)dk/dq=1/(2k),

    2qD′(q)=cos⁡k−sin⁡kk=C−D.2qD'(q)=\cos k-\frac{\sin k}{k}=C-D.

    At k=nπk=n\pi, D′(qn)=(−1)n/(2qn)D'(q_n)=(-1)^n/(2q_n) and C(qn)=(−1)nC(q_n)=(-1)^n. Therefore

    ε2CD∼2ε2qnq−qn=2ε4qnz−zn.\varepsilon^2\frac{C}{D} \sim\frac{2\varepsilon^2q_n}{q-q_n} =\frac{2\varepsilon^4q_n}{z-z_n}.

    The power-series limit gives y(x;0)=xy(x;0)=x, so D(0)=1D(0)=1; the right homogeneous Dirichlet condition is not satisfied. At negative qq, the hyperbolic expression has no real zero.

    Without y′(0)=1y'(0)=1, the equation and the left homogeneous boundary condition permit the identically zero function for every qq. It has zero residual and zero endpoint value but contains no eigenvalue information. The prescribed derivative fixes a nonzero shooting solution before its endpoint is tested.

    2. Explain the missing even poles

    Derive (21) and (22) for the constant bulk source. Evaluate the q=0q=0 and z=0z=0 limits and explain what the finite value at an even-nn eigenvalue means.

    Solution

    For ϕn(x)=2sin⁡(nπx)\phi_n(x)=\sqrt2\sin(n\pi x),

    ⟨ϕn,1⟩=2[1−(−1)n]nπ.\langle\phi_n,1\rangle =\frac{\sqrt2[1-(-1)^n]}{n\pi}.

    The squared overlap is 8/(n2π2)8/(n^2\pi^2) for odd nn and zero for even nn. Expanding the resolvent between two constant sources gives (21), away from the operator spectrum.

    For q=k2q=k^2, solve v′′+qv=−1/ε2v''+qv=-1/\varepsilon^2 in a form symmetric about the midpoint:

    v(x)=1ε2q[cos⁡(k(x−12))cos⁡(k/2)−1].v(x)=\frac1{\varepsilon^2q} \left[ \frac{\cos(k(x-\tfrac12))}{\cos(k/2)}-1 \right].

    Integrating gives (22). Since 2tan⁡(k/2)/k=1+k2/12+O(k4)2\tan(k/2)/k=1+k^2/12+O(k^4), the q=0q=0 response is 1/(12ε2)1/(12\varepsilon^2). At z=0z=0, q=−1/ε2q=-1/\varepsilon^2; replacing the trigonometric functions by their hyperbolic continuations yields (23).

    At q=(2mπ)2q=(2m\pi)^2, the expression (22) is finite. The source is orthogonal to the corresponding eigenfunction, so a particular forced solution exists, but any multiple of that homogeneous mode can be added. Its integral is zero. The scalar response thus has a unique finite continuation while the full operator inverse still does not exist at that eigenvalue.

    References

    • W. E and B. Yu, “The Deep Ritz Method: A Deep Learning-Based Numerical Algorithm for Solving Variational Problems,” arXiv:1710.00211v1, HTML, §2 and §3.5, Eqs. (20)–(23), for the distinction between trial functions, numerical objectives, and normalization.
    • A. Jansen, “Overdamped Modes in Schwarzschild-de Sitter and a Mathematica Package for the Numerical Computation of Quasinormal Modes,” arXiv:1709.09178v2, HTML, §§2.1–2.3, Eqs. (4)–(13), for endpoint reduction and conventional spectral discretization.

    Scrollable formula. Use Left and Right arrow keys to reveal hidden content.

    Scrollable table. Use Left and Right arrow keys to reveal hidden columns.

    Scrollable figure. Use Left and Right arrow keys to reveal hidden content.