Skip to content
QFT.org

Search QFT.org

Enter a word or phrase.

    You can also browse the main navigation and chapter contents.

    Precision and Conditioning in Semidefinite Optimization

    Why can a calculation need many more digits than the answer eventually displays? Two common causes are subtracting nearly equal function values and representing a positive matrix in a nearly dependent basis. Neither is repaired by converting already rounded data to a high-precision number. Moreover, a precise solution of a truncated or sampled problem need not solve the intended problem.

    We keep the quartic semidefinite program fixed while separating these effects. Its coefficient will be a feature of an actual one-dimensional conformal block. The resulting polynomial problem is a small bootstrap-like numerical example: it is not a crossing equation and produces no bound on CFT data.

    Preparation: Gram matrices, moment duality and the logarithmic barrier developed in Semidefinite Programming for Field Theory. All variables in this example are dimensionless.

    A block feature whose evaluation matters

    For identical external scalars, use the standard one-dimensional global block normalization

    GΔ(z)=zΔ 2F1(Δ,Δ;2Δ;z),0<z<1.(1)G_\Delta(z)=z^\Delta\,{}_2F_1(\Delta,\Delta;2\Delta;z), \qquad 0<z<1. \tag{1}

    The exchanged dimension is Δ\Delta; it is not the spacetime dimension or an optimization variable here. This normalization appears in Mazáč–Paulos, §2.2, Eq. (2.4).

    At Δ=1\Delta=1, the hypergeometric series simplifies:

    G1(z)=∑k=1∞zkk=−log⁡(1−z).(2)G_1(z)=\sum_{k=1}^{\infty}\frac{z^k}{k} =-\log(1-z). \tag{2}

    Indeed, the Gauss-series coefficient is (1)n2/[(2)nn!]=1/(n+1)(1)_n^2/[(2)_n n!]=1/(n+1) before multiplication by zz. The series converges absolutely for ∣z∣<1|z|<1; see NIST DLMF §15.2(i), Eq. (15.2.1).

    Fix exact z0=1/2z_0=1/2 and δ=10−20\delta=10^{-20}. Define

    bδ=G1(z0+δ)−G1(z0−δ)4δ=atanh⁡(2δ)2δ.(3)b_\delta =\frac{G_1(z_0+\delta)-G_1(z_0-\delta)}{4\delta} =\frac{\operatorname{atanh}(2\delta)}{2\delta}. \tag{3}

    This divided difference is the definition of the feature being studied. We are not silently replacing it by the derivative G1′(z0)/2G_1'(z_0)/2, although that derivative is its δ→0\delta\to0 limit. Expanding the stable expression gives

    bδ=1+4δ23+16δ45+⋯ .(4)b_\delta=1+\frac{4\delta^2}{3} +\frac{16\delta^4}{5}+\cdots. \tag{4}

    Use a=1a=1, b=bδb=b_\delta in the finite SDP

    max⁡γ{γ:x4−bδx2−γ≥0 for all real x}.(5)\max_\gamma\{\gamma:x^4-b_\delta x^2-\gamma\geq0 \text{ for all real }x\}. \tag{5}

    Its exact optimum is γ∗=−bδ2/4\gamma_*=-b_\delta^2/4. This transparent dependence lets us distinguish inaccurate input data from inaccurate optimization. In a genuine bootstrap application, the functional must satisfy a specified normalization and positivity conditions on the entire allowed spectrum; the quartic use of (3) does not impose those conditions. See Mazáč–Paulos, §2.3, Eqs. (2.14)–(2.15) for that additional structure.

    Rebuild the input at each precision

    The direct route evaluates two hypergeometric blocks and subtracts them. Their difference is of order δ\delta, even though each block is of order one. Rounding errors in the block values are consequently amplified by division by δ\delta. Worse, the two input arguments can already round to the same number.

    The stable route in (3) evaluates the same mathematical feature without this subtraction. The retained study uses mpmath 1.3.0 at 17, 34 and 68 decimal working digits. Each cell constructs 1/21/2, the decimal string 10−2010^{-20}, both arguments and all function values afresh. The direct route calls the hypergeometric function; a separate logarithmic evaluation checks its special-case identity. Independent 100- and 140-digit evaluations provide the reference, without being claimed as rigorous enclosures.

    Working digitsDirect feature errorStable feature errorDirect input behavior
    17approximately 111.33×10−401.33\times10^{-40}arguments coincide; result zero
    342.05×10−162.05\times10^{-16}1.33×10−401.33\times10^{-40}arguments remain distinct
    683.67×10−513.67\times10^{-51}8.30×10−708.30\times10^{-70}arguments remain distinct

    At 17 digits the direct calculation has lost the feature before the optimizer starts. It is retained as an input failure, rather than repaired invisibly by substituting the stable value. The stable calculation returns one at both 17 and 34 digits: its error is the unresolved correction in (4), which is far below the numerical target of this example. Thus “cannot resolve the first tiny correction” and “inaccurate for the stated optimization tolerance” are different judgments.

    At 34 digits, direct subtraction loses many of the available digits but still supplies bb to about sixteen decimal places. Solving that rounded problem accurately does not restore the missing input information. Similarly, a 140-digit matrix filled from old binary64 coefficients is still a high-precision solution of rounded data.

    A basis change preserves the problem, not its conditioning

    In the monomial basis q=(1,x,x2)Tq=(1,x,x^2)^{\mathsf T}, use

    Q(γ,t)=(−γ0t0−b−2t0t01).(6)Q(\gamma,t)= \begin{pmatrix} -\gamma&0&t\\ 0&-b-2t&0\\ t&0&1 \end{pmatrix}. \tag{6}

    Now introduce a nearly dependent polynomial basis:

    qp=Tq=(1x1+ϵx2),T=(10001010ϵ),ϵ=10−12.(7)q_{\rm p}=Tq= \begin{pmatrix}1\\x\\1+\epsilon x^2\end{pmatrix}, \qquad T= \begin{pmatrix} 1&0&0\\ 0&1&0\\ 1&0&\epsilon \end{pmatrix}, \qquad \epsilon=10^{-12}. \tag{7}

    The same polynomial and moment pairing use

    Qp=T−TQT−1,Mp=TMTT.(8)Q_{\rm p}=T^{-\mathsf T}QT^{-1}, \qquad M_{\rm p}=TMT^{\mathsf T}. \tag{8}

    In exact arithmetic, congruence preserves positive semidefiniteness, and

    qpTQpqp=qTQq,tr⁡(QpMp)=tr⁡(QM).(9)q_{\rm p}^{\mathsf T}Q_{\rm p}q_{\rm p}=q^{\mathsf T}Qq, \qquad \operatorname{tr}(Q_{\rm p}M_{\rm p})=\operatorname{tr}(QM). \tag{9}

    For example, the 0,20,2 block of the poor-basis Gram matrix contains entries

    (Qp)00=−γ−2tϵ+1ϵ2,(Qp)02=tϵ−1ϵ2,(Qp)22=1ϵ2.(10)\begin{aligned} (Q_{\rm p})_{00}&=-\gamma-\frac{2t}{\epsilon}+\frac1{\epsilon^2},\\ (Q_{\rm p})_{02}&=\frac t\epsilon-\frac1{\epsilon^2},& (Q_{\rm p})_{22}&=\frac1{\epsilon^2}. \end{aligned} \tag{10}

    Recovering ordinary physical coefficients therefore subtracts numbers of order 102410^{24}. Errors that look small relative to these entries can be large compared with the original coefficients. This is why residuals must be checked after transforming back, with scales set by the physical problem.

    The exact logarithmic barriers differ only by a constant:

    log⁡det⁡Qp=log⁡det⁡Q−2log⁡∣det⁡T∣.(11)\log\det Q_{\rm p} =\log\det Q-2\log|\det T|. \tag{11}

    Their gradients and central paths are identical mathematically. The numerical experiment nevertheless assembles and factorizes the actual poor-basis matrices, including transformed derivative matrices. Using a canceled scalar determinant formula in this cell would remove the very loss of precision we intend to measure.

    Scaling and better bases can help, but there is no general guarantee that all bootstrap derivative variation can be scaled away. Simmons-Duffin, §2.6 discusses the resulting need for arbitrary precision in much larger problems.

    The fixed solver study, including failures

    Every valid cell follows the same matrix Newton algorithm as the SDP article. The barrier parameters are 1,10−2,…,10−121,10^{-2},\ldots,10^{-12}; each stage allows at most 60 Newton steps and 60 line-search halvings, with working-gradient target 10−1210^{-12}. We retain factorization, line-search and stagnation failures and stop that cell. Its precision or budget is not increased after seeing the outcome.

    The following table holds the stable block input route fixed. Residuals refer to the last attempted stage, so failed cells are not compared as if they had reached a common barrier endpoint.

    DigitsBasisLast attempted μ\muOutcomePhysical moment residual
    17monomial10−410^{-4}stagnation1.35×10−91.35\times10^{-9}
    17poor11factorization failureunavailable
    34monomial10−1210^{-12}all stages stationary4.00×10−184.00\times10^{-18}
    34poor10−210^{-2}line-search exhaustion6.70×10−106.70\times10^{-10}
    68monomial10−1210^{-12}all stages stationary4.00×10−184.00\times10^{-18}
    68poor10−1210^{-12}all stages stationary4.00×10−184.00\times10^{-18}

    Both 68-digit bases meet the final physical residual and gap target 10−1010^{-10}, with gap about 3.0×10−123.0\times10^{-12}. The 34-digit monomial calculation also meets that target.

    At 17 digits in the poor basis, the parameters remain at the initial point, close to its exact central-path values. Yet transforming the actual returned Gram matrix back gives a coefficient error of order one and a minimum eigenvalue about −0.618-0.618. Accurate-looking parameters alone would miss this representation failure.

    Verification parses the actual returned rounded matrices at 140 digits. In the poor-basis case it evaluates

    Qphys=TTQpT,Mphys=T−1MpT−T,(12)Q_{\rm phys}=T^{\mathsf T}Q_{\rm p}T, \qquad M_{\rm phys}=T^{-1}M_{\rm p}T^{-\mathsf T}, \tag{12}

    then checks polynomial coefficients, moment equalities, symmetry, minimum eigenvalues, complementarity and objective gap. Reconstructing a clean Q(γ,t)Q(\gamma,t) only from the fitted parameters would hide errors in the poor-basis matrix representation. Conversely, checking residuals relative to a 102410^{24} matrix entry could conceal a substantial error in an order-one physical coefficient.

    The direct-input 34-digit solve provides a useful further distinction. It reaches the final barrier stage and meets the 10−1010^{-10} physical checks both for its supplied coefficient and for the intended coefficient. Its supplied coefficient differs from the intended one by only 2.05×10−162.05\times10^{-16}. Nevertheless, substituting its parameters into the central-path gradient for the intended coefficient gives a residual about 1.03×10−41.03\times10^{-4}, whereas its own problem has a residual about 4.00×10−184.00\times10^{-18}.

    There is no contradiction. Near the cone boundary, the gradient contains the inverse of a matrix with eigenvalues of order μ\mu, so this diagnostic is sensitive to coefficient perturbations on scales much smaller than the fixed feasibility tolerance. The independent gradient is reported separately; it is not silently equated with a physical objective error or added to the declared feasibility test after the runs.

    Numerical minimum eigenvalues and tolerances still do not provide an exact certificate. Here the analytic square and moment measure establish the exact bound; the numerical study measures how reliably the chosen implementation approaches it.

    Function truncation is a separate approximation

    Increasing working precision does not remove the error made by truncating a function. Hold the arithmetic at 68 digits and replace (2) by

    G1,N(z)=∑k=1Nzkk.(13)G_{1,N}(z)=\sum_{k=1}^{N}\frac{z^k}{k}. \tag{13}

    To compute its same divided-difference feature without cancellation, expand the numerator before evaluating:

    bδ,N=∑k=1N12k∑1≤j≤kj odd(kj)z0k−jδj−1.(14)b_{\delta,N}= \sum_{k=1}^{N}\frac1{2k} \sum_{\substack{1\leq j\leq k\\j\ {\rm odd}}} \binom{k}{j}z_0^{k-j}\delta^{j-1}. \tag{14}

    At δ=0\delta=0 this reduces to 1−2−N1-2^{-N}, a simple independent limiting check. At nonzero δ\delta, all terms in the omitted series are positive. With r=z0+δ<1r=z_0+\delta<1, the derivative of the remainder is zN/(1−z)z^N/(1-z), hence

    0<bδ−bδ,N≤τN=rN2(1−r).(15)0<b_\delta-b_{\delta,N} \leq \tau_N=\frac{r^N}{2(1-r)}. \tag{15}

    Because the exact optimum is −b2/4-b^2/4, this gives

    0<γ∗(bδ,N)−γ∗(bδ)≤2∣bδ,N∣τN+τN24.(16)0<\gamma_*(b_{\delta,N})-\gamma_*(b_\delta) \leq\frac{2|b_{\delta,N}|\tau_N+\tau_N^2}{4}. \tag{16}

    The derivation is given in Exercise 2. It controls the function approximation; it does not assert that a finite-precision optimizer resolves every shift in this bound.

    Series order NNExact optimum shift from full feature
    81.9493×10−31.9493\times10^{-3}
    167.6293×10−67.6293\times10^{-6}
    321.1642×10−101.1642\times10^{-10}
    642.7105×10−202.7105\times10^{-20}
    1281.4694×10−391.4694\times10^{-39}

    The values use independent high-precision evaluation of the finite polynomial and the full feature. All five numerical SDPs reach the prescribed final stage. For N=64N=64 and 128128, however, the known change of the exact optimum is far below the final barrier gap of approximately 3×10−123\times10^{-12}. The solver tolerance is too coarse to resolve that shift.

    A positivity grid can solve the wrong problem exactly

    Finally, retain the full feature but require positivity only at xj=jhx_j=jh in [−2,2][-2,2]. This finite set of inequalities gives

    γgrid=min⁡j{xj4−bδxj2}.(17)\gamma_{\rm grid}=\min_j\{x_j^4-b_\delta x_j^2\}. \tag{17}

    Completing the square shows exactly what was missed:

    γgrid−γ∗=min⁡j(xj2−bδ2)2.(18)\gamma_{\rm grid}-\gamma_* =\min_j\left(x_j^2-\frac{b_\delta}{2}\right)^2. \tag{18}

    At the true minimizer x∗=bδ/2x_*=\sqrt{b_\delta/2},

    V(x∗)−γgrid=−(γgrid−γ∗)<0(19)V(x_*)-\gamma_{\rm grid} =-(\gamma_{\rm grid}-\gamma_*)<0 \tag{19}

    unless a grid point hits the minimum exactly. For the chosen bδb_\delta the potential is increasing beyond x=2x=2 and decreasing toward the interval from x<−2x<-2, so the failure is an interior gap between samples, not an omitted remote minimum.

    Grid spacingSampled bound above the true bound
    1/41/43.90625×10−33.90625\times10^{-3}
    1/161/167.47681×10−47.47681\times10^{-4}
    1/641/643.15309×10−53.15309\times10^{-5}

    All those sampled inequalities could be evaluated exactly and the global conclusion would still be false. This must not be confused with imposing an equality between two known-degree polynomials at degree-plus-one distinct points: the latter proves an identity by the number of roots of their difference. SDPB uses this identity principle in its polynomial representation, not an inference of positivity from isolated samples; see Simmons-Duffin, §2.2, Eqs. (2.15)–(2.16).

    In the numerical scalar bootstrap bound, a stored functional passes the sampled test within tolerance and takes a value near −0.2501-0.2501 between neighboring nodes. Re-evaluating at higher precision confirms the sign. There the variable ranges over exchanged dimensions; passing to a rational block representation also requires a denominator of controlled sign and a bound on the omitted tail.

    Direct and stable conformal-block feature errors at three working precisions, followed by separate exact-optimum shifts from function truncation and positivity sampling.

    Different refinements address different errors. The left panel holds the mathematical block feature fixed while changing arithmetic and evaluation formula. The right compares exact optimum shifts from finite series and sampled positivity; it also marks the numerical barrier-gap scale. Series orders and grid sizes are different approximation families, not a common cost comparison. The underlying finite SDPs and all failed basis/precision cells are retained separately.

    The companion files block_precision.py and block-precision-results.json, together with the pure solver and verifier, retain every prescribed cell and failure. Their command order and runtime are documented with the chapter's scientific examples. No results were replaced by finer scans after failure.

    Summary

    Precision should be increased where the calculation loses information, with fresh inputs at each precision. A justified basis change can preserve the exact problem while making its numerical representation much better. Neither operation removes function truncation or missing positivity constraints. In this example, independent analytic bounds, actual returned matrices and separate refinement axes reveal which problem was solved and how accurately.

    Exercises

    1. Transform the primal and dual together

    Let q′=Tqq'=Tq with invertible real TT. Derive the transformations of the Gram matrix and the moment matrix that preserve the polynomial and trace pairing. Show that the logarithmic barrier changes only by a constant, and explain why checking only γ,t\gamma,t is insufficient in a poorly conditioned implementation.

    Solution

    Since q=T−1q′q=T^{-1}q',

    qTQq=q′T(T−TQT−1)q′.q^{\mathsf T}Qq =q'^{\mathsf T}(T^{-\mathsf T}QT^{-1})q'.

    Thus Q′=T−TQT−1Q'=T^{-\mathsf T}QT^{-1}. A moment matrix is the average of qqTqq^{\mathsf T}, so M′=TMTTM'=TMT^{\mathsf T}. Cyclicity gives

    tr⁡(Q′M′)=tr⁡(T−TQMTT)=tr⁡(QM).\operatorname{tr}(Q'M') =\operatorname{tr}(T^{-\mathsf T}QMT^{\mathsf T}) =\operatorname{tr}(QM).

    Congruence preserves the sign of the quadratic form in both directions. Also det⁡Q′=det⁡Q/(det⁡T)2\det Q'=\det Q/(\det T)^2, so

    −γ−μlog⁡det⁡Q′=−γ−μlog⁡det⁡Q+2μlog⁡∣det⁡T∣.-\gamma-\mu\log\det Q' =-\gamma-\mu\log\det Q+2\mu\log|\det T|.

    The final term is independent of optimization variables and does not change the exact stationary point. Finite arithmetic can nevertheless corrupt the transformed matrix entries. Rebuilding Q(γ,t)Q(\gamma,t) in a good basis replaces those corrupted entries with newly assembled data; it does not test the matrix that was actually factorized. A faithful check transforms the returned Q′Q' and M′M' back and recomputes physical identities.

    2. Bound the omitted block series

    Let RN(z)=G1(z)−G1,N(z)R_N(z)=G_1(z)-G_{1,N}(z) on 0<z<10<z<1. Prove (15) and (16). Explain why a bound below 10−2010^{-20} on the exact optimum shift is not resolved by a numerical primal–dual gap of 3×10−123\times10^{-12}.

    Solution

    Absolute convergence permits differentiation inside this interval:

    RN′(z)=∑k=N+1∞zk−1=zN1−z>0.R_N'(z)=\sum_{k=N+1}^{\infty}z^{k-1} =\frac{z^N}{1-z}>0.

    This function increases with zz. Integrating it over the feature interval gives

    bδ−bδ,N=14δ∫z0−δz0+δzN1−z dz≤rN2(1−r)=τN.b_\delta-b_{\delta,N} =\frac1{4\delta}\int_{z_0-\delta}^{z_0+\delta} \frac{z^N}{1-z}\,dz \leq\frac{r^N}{2(1-r)}=\tau_N.

    Write e=bδ−bδ,Ne=b_\delta-b_{\delta,N}, so 0<e≤τN0<e\leq\tau_N. Then

    γ∗(bδ,N)−γ∗(bδ)=(bδ,N+e)2−bδ,N24=2bδ,Ne+e24,\gamma_*(b_{\delta,N})-\gamma_*(b_\delta) =\frac{(b_{\delta,N}+e)^2-b_{\delta,N}^2}{4} =\frac{2b_{\delta,N}e+e^2}{4},

    which yields (16). This bounds the shift between two exact optimization problems. A numerical primal and dual separated by 3×10−123\times10^{-12} leave a much wider interval than 10−2010^{-20}, even before numerical feasibility errors are considered. The analytic truncation statement remains useful, but the solver would need separately justified tighter accuracy to measure such a small change.

    References

    • Mazáč, Dalimil, and Miguel F. Paulos. “The Analytic Functional Bootstrap I: 1D CFTs and 2D S-Matrices.” Journal of High Energy Physics 02 (2019), 162. DOI; arXiv:1803.10233 (PDF). Sections 2.2–2.3 fix the global-block and crossing-functional conventions.
    • NIST Digital Library of Mathematical Functions. §15.2(i), Gauss series and analytic properties. Equation (15.2.1) supplies the hypergeometric series used in (2).
    • 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 and 2.6 distinguish polynomial representation, solver termination and arbitrary-precision arithmetic.

    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.