Skip to content
QFT.org

Search QFT.org

Enter a word or phrase.

    You can also browse the main navigation and chapter contents.

    Semidefinite Programming for Field Theory

    How low can a scalar potential go? Minimizing a polynomial directly finds stationary points; rewriting it as a sum of squares can instead prove a bound at every field value. The latter viewpoint leads to semidefinite programming, where the unknown is constrained by matrix positivity.

    We solve a quartic example analytically and with an actual damped Newton algorithm. Its dual formulation uses moments of a positive measure, so the calculation also explains why a positive matrix, a small residual and a valid bound are different statements. The same machinery underlies much larger positivity problems in field theory, although this example is a classical polynomial problem rather than a quantum vacuum-energy calculation.

    Preparation: Ordinary real symmetric matrices, positive definiteness and constrained optimization. The matrices below use a Euclidean inner product; Lorentzian metric signs do not enter their positivity conditions.

    A global lower bound as a matrix problem

    Choose dimensionless xx, a>0a>0 and initially b>0b>0, and ask for the largest constant γ\gamma satisfying

    V(x)−γ=ax4−bx2−γ≥0for every x∈R.(1)V(x)-\gamma=ax^4-bx^2-\gamma\geq0 \qquad\text{for every }x\in\mathbb R. \tag{1}

    Introduce the monomial vector q(x)=(1,x,x2)Tq(x)=(1,x,x^2)^{\mathsf T}. A positive semidefinite matrix QQ gives a nonnegative polynomial qTQqq^{\mathsf T}Qq: if Q=RTRQ=R^{\mathsf T}R, this polynomial is the sum of squares of the components of RqRq. Here the parity-even coefficient matching is particularly simple:

    Q(γ,t)=(−γ0t0−b−2t0t0a),qTQq=ax4−bx2−γ.(2)Q(\gamma,t)= \begin{pmatrix} -\gamma&0&t\\ 0&-b-2t&0\\ t&0&a \end{pmatrix}, \qquad q^{\mathsf T}Qq=ax^4-bx^2-\gamma. \tag{2}

    Thus we maximize γ\gamma subject to Q(γ,t)⪰0Q(\gamma,t)\succeq0. This is a semidefinite program (SDP): the objective and matrix entries are affine in the optimization variables.

    For this quartic, the matrix construction gives the exact answer, not merely a sufficient lower bound. Since a>0a>0, positivity of the 0,20,2 block and of the middle diagonal entry requires

    t≤−b2,γ≤−t2a.(3)t\leq-\frac b2, \qquad \gamma\leq-\frac{t^2}{a}. \tag{3}

    The largest allowed γ\gamma occurs at t∗=−b/2t_*=-b/2:

    γ∗=−b24a,V(x)−γ∗=a(x2−b2a)2.(4)\gamma_*=-\frac{b^2}{4a}, \qquad V(x)-\gamma_* =a\left(x^2-\frac b{2a}\right)^2. \tag{4}

    The minima are x=±b/(2a)x=\pm\sqrt{b/(2a)}. Conversely, evaluating any proposed global bound at either minimum proves that it cannot exceed (4). The rank-one Gram matrix and direct minimization therefore meet at the same exact answer.

    More general polynomial-matrix programs require a specified domain and Gram representation. For example, positivity on a half-line uses additional factors associated with the domain; it is not the same statement as positivity on all of R\mathbb R. The construction in Simmons-Duffin, §2.2, Theorem 2.1 concerns the half-line. Equation (4) supplies the independent proof needed for our all-real example.

    The dual problem is a moment problem

    For real symmetric positive semidefinite matrices Q,MQ,M,

    tr⁡(QM)=tr⁡ ⁣(M1/2QM1/2)≥0.(5)\operatorname{tr}(QM) =\operatorname{tr}\!\left(M^{1/2}QM^{1/2}\right)\geq0. \tag{5}

    Introduce such an MM and form an upper bound on the primal objective:

    γ+tr⁡(MQ)=γ(1−M00)+2t(M02−M11)+aM22−bM11.(6)\gamma+\operatorname{tr}(MQ) =\gamma(1-M_{00}) +2t(M_{02}-M_{11})+aM_{22}-bM_{11}. \tag{6}

    The supremum over the free variables γ,t\gamma,t is finite only if M00=1M_{00}=1 and M02=M11M_{02}=M_{11}. Averaging MM under x↦−xx\mapsto-x preserves positivity and the objective, so we may set its odd entries to zero. The resulting dual problem is

    minimized=ay4−by2,subject toM(y)=(10y20y20y20y4)⪰0.(7)\begin{aligned} \text{minimize}\quad&d=a y_4-b y_2,\\ \text{subject to}\quad& M(y)= \begin{pmatrix} 1&0&y_2\\ 0&y_2&0\\ y_2&0&y_4 \end{pmatrix}\succeq0. \end{aligned} \tag{7}

    The notation comes from a normalized nonnegative measure ρ\rho:

    Mij=∫Rxi+j dρ(x),yn=∫Rxn dρ(x),i,j=0,1,2.(8)M_{ij}=\int_{\mathbb R}x^{i+j}\,d\rho(x), \qquad y_n=\int_{\mathbb R}x^n\,d\rho(x), \qquad i,j=0,1,2. \tag{8}

    Indeed, vTMv=∫(v0+v1x+v2x2)2 dρ≥0v^{\mathsf T}Mv=\int(v_0+v_1x+v_2x^2)^2\,d\rho\geq0, and d=∫V dρd=\int V\,d\rho. We will exhibit an actual measure at the optimum; no general moment-representation theorem is needed for the argument.

    For any feasible primal and dual pair,

    d−γ=tr⁡(QM)≥0.(9)d-\gamma=\operatorname{tr}(QM)\geq0. \tag{9}

    This is weak duality. A feasible pair with zero gap proves optimality. The general polynomial-matrix version and its complementarity condition are derived in Simmons-Duffin, §2.3, Theorem 2.2.

    Take equal point masses at the two minima:

    dρ∗=12δ ⁣(x−b2a)dx+12δ ⁣(x+b2a)dx.(10)d\rho_*=\frac12\delta\!\left(x-\sqrt{\frac b{2a}}\right)dx +\frac12\delta\!\left(x+\sqrt{\frac b{2a}}\right)dx. \tag{10}

    Their moments are y2=b/(2a)y_2=b/(2a) and y4=b2/(4a2)y_4=b^2/(4a^2). Consequently d∗=−b2/(4a)=γ∗d_*=-b^2/(4a)=\gamma_* and Q∗M∗=0Q_*M_*=0. The dual measure is supported exactly where the bounding square vanishes.

    The word “feasible” in (9) includes the moment equalities. An arbitrary positive matrix need not satisfy them. A small negative formal gap can therefore indicate an equality error rather than a violation of weak duality.

    Follow the interior with a logarithmic barrier

    The optimum lies on the boundary of the PSD cone. For μ>0\mu>0, keep QQ positive definite and minimize

    fμ(γ,t)=−γ−μlog⁡det⁡Q(γ,t).(11)f_\mu(\gamma,t)=-\gamma-\mu\log\det Q(\gamma,t). \tag{11}

    The logarithm diverges as an eigenvalue approaches zero from above. Lowering μ\mu lets the objective approach the boundary while retaining a smooth interior problem.

    Write w=(γ,t)w=(\gamma,t), c=(−1,0)c=(-1,0) and Bi=∂Q/∂wiB_i=\partial Q/\partial w_i. Differentiating log⁡det⁡Q\log\det Q gives

    gi=ci−μtr⁡(Q−1Bi),Hij=μtr⁡(Q−1BiQ−1Bj).(12)g_i=c_i-\mu\operatorname{tr}(Q^{-1}B_i), \qquad H_{ij}=\mu\operatorname{tr}(Q^{-1}B_iQ^{-1}B_j). \tag{12}

    At each step solve HΔw=−gH\Delta w=-g. Backtrack from step length one until Q(w+αΔw)Q(w+\alpha\Delta w) is positive definite and satisfies the Armijo decrease

    fμ(w+αΔw)≤fμ(w)+10−4α gTΔw.(13)f_\mu(w+\alpha\Delta w) \leq f_\mu(w)+10^{-4}\alpha\,g^{\mathsf T}\Delta w. \tag{13}

    The implementation evaluates the determinant through Cholesky factors and obtains Q−1Q^{-1} by linear solves. It uses the matrix derivatives in (12), including when the basis is changed on the precision page. It does not insert the analytic solution as an iterate. This is a small specialized barrier solver, not a run of SDPB or a demonstration of bootstrap-scale performance. The related primal–dual central path and Newton equations are discussed in Simmons-Duffin, §2.4, Eqs. (2.34)–(2.36).

    An independent central-path solution makes this example unusually informative. Define

    c0=−b−2t,D=−aγ−t2,det⁡Q=c0D.(14)c_0=-b-2t,\qquad D=-a\gamma-t^2, \qquad \det Q=c_0D. \tag{14}

    Stationarity implies D=μa=−tc0D=\mu a=-tc_0, so

    tμ=−b−b2+8μa4,γμ=−tμ2a−μ.(15)t_\mu=\frac{-b-\sqrt{b^2+8\mu a}}4, \qquad \gamma_\mu=-\frac{t_\mu^2}{a}-\mu. \tag{15}

    The matrix Mμ=μQμ−1M_\mu=\mu Q_\mu^{-1} obeys the moment equalities, and

    QμMμ=μI3,dμ−γμ=3μ.(16)Q_\mu M_\mu=\mu I_3, \qquad d_\mu-\gamma_\mu=3\mu. \tag{16}

    At a computed point that is not exactly stationary, however,

    M00−1=gγ,M11−M02=12gt,M=μQ−1.(17)M_{00}-1=g_\gamma, \qquad M_{11}-M_{02}=\frac12g_t, \qquad M=\mu Q^{-1}. \tag{17}

    Thus checking QM≈μIQM\approx\mu I alone mostly checks the inverse used to define MM. The moment constraints supply additional information.

    What the numerical calculation achieves

    The retained calculation sets a=b=1a=b=1 and uses 68 decimal working digits. It starts from t=−bt=-b, γ=−(b2+1)/a\gamma=-(b^2+1)/a and follows μ=1,10−2,…,10−12\mu=1,10^{-2},\ldots,10^{-12}, warm-starting from the preceding computed point. This particular initial point already lies on the μ=1\mu=1 central path; the later six stages require actual Newton iterations.

    Each stage has at most 60 Newton iterations and 60 step halvings, and stops when the working maximum gradient component is at most 10−1210^{-12}. Failure does not trigger a larger budget or an analytic replacement. The existing mpmath 1.3.0 linear solver temporarily uses ten extra binary guard bits internally; the quoted decimal precision describes the surrounding calculation.

    Barrier parameterNewton stepsPrimal objectiveActual primal–dual gapMoment residual
    10−210^{-2}9−0.269903810568-0.2699038105683.00×10−23.00\times10^{-2}5.55×10−195.55\times10^{-19}
    10−410^{-4}8−0.250199990004-0.2501999900043.00×10−43.00\times10^{-4}1.95×10−151.95\times10^{-15}
    10−810^{-8}9−0.250000020000-0.2500000200003.00×10−83.00\times10^{-8}3.99×10−183.99\times10^{-18}
    10−1210^{-12}9−0.250000000002-0.2500000000023.00×10−123.00\times10^{-12}4.00×10−184.00\times10^{-18}

    The moment residual is the maximum error in its physical normalization, Hankel and odd-entry equalities. The last working point differs from the analytic central-path parameters by about 8.0×10−308.0\times10^{-30}. Its physical Gram and moment matrices both have smallest eigenvalue about 8.0×10−138.0\times10^{-13}. The actual gap differs from 3μ3\mu by about 1.0×10−181.0\times10^{-18} because the numerical moment equalities are not exact.

    Computed primal and dual objective errors approach the exact quartic minimum as the barrier decreases; independently recomputed moment residuals remain distinct from the barrier gap.

    The a=b=1a=b=1 quartic solved through seven prescribed barrier stages. The left panel compares computed objective distances from −1/4-1/4; the right separates the moment-equality residual from the gap d−γd-\gamma. The zero residual at the exactly stationary initial point is omitted from logarithmic plotting. The analytic minimum and central path provide independent controls.

    Verification reads the serialized, rounded matrices in a fresh 140-digit calculation. It recomputes their polynomial coefficients, moment equalities, symmetry, minimum eigenvalues, objectives and complementarity. Directional finite differences of the separate scalar formula −γ−μlog⁡(c0D)-\gamma-\mu\log(c_0D) check the matrix gradient and Hessian; decreasing the step from 10−410^{-4} to 10−1210^{-12} reduces their errors from roughly 10−1010^{-10} to 10−2610^{-26}.

    Two deliberately incorrect candidates are also rejected: a PSD matrix that violates the moment equalities, and a still-positive Gram matrix whose constant coefficient has been altered by 10−610^{-6}. These controls test errors that a positive-eigenvalue check alone would miss.

    The final numerical residual and gap target is 10−1010^{-10}, separate from the chosen barrier endpoint. Meeting that target does not prove exact feasibility of rounded data: no outward-rounded eigenvalue enclosure or residual-repair theorem is supplied. The exact bound follows from (4) and (10). This distinction also matters in large computations, where primal residual, dual residual and objective gap have separate termination criteria; see Simmons-Duffin, §2.4.3, Eqs. (2.48)–(2.49).

    The companion files quartic_sdp.py, sdp_checks.py and sdp-results.json in examples/computational-qft/optimization/ retain the implementation, independent checks and selected outputs.

    From a quartic to field-theory positivity

    In a bootstrap application, the unknowns may be coefficients of a linear functional, while positivity applies to matrices built from conformal blocks over a continuous range of operator dimensions. Several additional steps then separate the physical question from the finite SDP: function approximation, matrix-polynomial representation, basis choice and control of the unbounded domain.

    Even the small quartic illustrates the distinction. Imposing V(xj)−γ≥0V(x_j)-\gamma\geq0 on a finite grid permits a bound above the true minimum whenever the grid misses both minimizers. Increasing arithmetic precision cannot remove that error. Conversely, matching a known-degree polynomial identity at sufficiently many distinct points is exact algebra; it is not a claim that sampled inequalities imply positivity between samples. The latter distinction is explicit in Simmons-Duffin, §2.2, Eqs. (2.15)–(2.16).

    Summary

    A Gram matrix can turn a global polynomial lower bound into an SDP. Its moment dual supplies an upper bound on the optimum, and a feasible zero-gap pair proves the answer. In the quartic example, a genuine matrix Newton calculation approaches the independently known solution, while separate coefficient, moment and cone checks explain what its numerical accuracy means. The next article keeps this problem fixed while varying arithmetic, basis conditioning and approximation choices.

    Exercises

    1. Change the sign of the quadratic coefficient

    Keep a>0a>0 but allow any real bb. Find the exact global lower bound, a PSD Gram matrix attaining it, and a positive measure attaining the dual value.

    Solution

    For b>0b>0, the two minima and witnesses are those in (4) and (10). For b≤0b\leq0,

    V(x)=ax4+∣b∣x2≥0,V(x)=ax^4+|b|x^2\geq0,

    with a minimum at x=0x=0. Choose γ=t=0\gamma=t=0. Then

    Q=diag⁡(0,−b,a)⪰0.Q=\operatorname{diag}(0,-b,a)\succeq0.

    The measure concentrated at zero has y2=y4=0y_2=y_4=0 and M=diag⁡(1,0,0)M=\operatorname{diag}(1,0,0). Both objectives vanish, proving optimality. Combining the cases gives

    γ∗=−max⁡(b,0)24a.\gamma_*=-\frac{\max(b,0)^2}{4a}.

    At b=0b=0 the two-point measure of the positive-bb case coalesces at zero.

    2. A positive matrix with an impossible “bound”

    For a=b=1a=b=1, someone proposes M~=diag⁡(1,2,0)\widetilde M=\operatorname{diag}(1,2,0) and evaluates aM~22−bM~11=−2a\widetilde M_{22}-b\widetilde M_{11}=-2. The matrix is PSD, yet the true minimum is −1/4-1/4. Identify the error and find the restriction on y4y_4 if the second moment really is y2=2y_2=2.

    Solution

    The matrix violates the moment equality M~02=M~11\widetilde M_{02}=\widetilde M_{11}: its two sides are zero and two. Hence the tt term in (6) does not cancel, and −2-2 is not a dual bound.

    A normalized moment matrix with y2=2y_2=2 must instead be

    M=(10202020y4).M= \begin{pmatrix} 1&0&2\\ 0&2&0\\ 2&0&y_4 \end{pmatrix}.

    Its 0,20,2 principal minor requires y4−4≥0y_4-4\geq0. Its dual objective therefore satisfies y4−y2≥2y_4-y_2\geq2, consistent with weak duality. Equivalently, the variance of x2x^2 is nonnegative: ⟨x4⟩≥⟨x2⟩2\langle x^4\rangle\geq\langle x^2\rangle^2. Matrix positivity and the correct moment identifications must both be imposed.

    References

    • Simmons-Duffin, David. “A Semidefinite Program Solver for the Conformal Bootstrap.” Journal of High Energy Physics 06 (2015), 174. DOI; arXiv:1502.02033 (PDF). Sections 2.2–2.4 give the polynomial-matrix formulation, duality and solver equations; §2.6 discusses numerical precision.

    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.