betaFeedback

WorksPhysics and Astronomy

Transferable neural-network preconditioners for Wilson–Clover propagator inversions

Abstract

We investigate two single–layer neural-network architectures for accelerating four-dimensional Wilson–Clover propagator inversions on lattice ensembles in practical use; both transfer directly without retraining. The first is a gauge-covariant parallel transport convolution (PTC) network that directly reduces the number of generalized conjugate residual (GCR) solver iterations. The second is a CNN-like network used together with a multigrid-inspired algorithm. The two approaches can be combined to further reduce GCR iterations. PTC transfers without retraining across lattice volumes, lattice spacings, and pion masses while maintaining comparable acceleration, whereas the CNN-like network transfers directly from small- to large-volume ensembles with strong acceleration. A cost comparison accounting for both basis construction and solves shows that the proposed scheme is more advantageous for large-volume ensembles than for small-volume ones.

Introduction

Hadron spectroscopy and matrix-element calculations in lattice quantum chromodynamics (QCD) require many quark propagators on each gauge configuration. Each source entails a large Dirac-equation solve, while the gauge background and valence mass can remain fixed. Information prepared for one inversion can therefore help subsequent sources. The relevant computational cost includes both this preparation and the inversions required by the measurement.

Propagator solvers have a long history of exploiting the structure of the lattice Dirac operator. Even–odd preconditioning and nonsymmetric Krylov methods reduce the work of Wilson-fermion inversions [1, 2]. Domain decomposition supplies local solves [3], while deflation and recycling reuse slowly converging directions [4, 5]. The local coherence of low modes makes their representation on small lattice blocks economical. Adaptive multigrid combines a correction in this block representation with fine-lattice relaxation [6, 7]; combining multigrid with domain decomposition further improves Wilson–Clover solvers [8]. Recent studies have refined basis preparation through chiral truncation and local singular vectors [9, 10]; mixed-precision and multigrid implementations provide complementary advances [11, 12].

Neural networks offer another way to construct an inexpensive approximate inverse. Ref. [13] introduced gauge-equivariant parallel-transport convolution (PTC) for lattice-QCD solvers, followed by gauge-equivariant pooling and unpooling for multigrid networks [14]. Ref. [15] studied low-mode-sensitive training and transfer between gauge backgrounds and volumes. Ref. [16] investigated learned low-mode test vectors for multigrid setup.

Learned preconditioners have also been developed for the normal equations of the two-dimensional Schwinger model [17, 18]. These studies motivate our investigation of local learned corrections in four-dimensional Wilson–Clover propagator solves.

We investigate whether single-layer local maps, whose parameter counts do not grow with lattice volume, can reduce the outer generalized conjugate residual (GCR) iterations required for Wilson–Clover propagator solves, and whether fixed trained weights remain effective across gauge configurations and ensembles. We assess each solve by convergence of the true relative residual to the prescribed tolerance and by its outer GCR iteration count. Dirac-operator application counts provide a separate estimate of computational work; for multiple solves, we include the stated basis-preparation costs and treat the trained network weights as available.

We study two operators. The gauge-covariant PTC is a single fine-lattice layer using an on-site path and eight nearest-neighbor paths. The other operator resembles a convolutional neural network (CNN): it applies a shared linear map to the coefficients of the current block and its eight neighboring blocks in a local basis rebuilt for each target gauge field. Here CNN-like refers to shared local weights in a single linear layer, with no nonlinear activation. Within the multigrid-inspired correction, it replaces the reference projection onto global templates, after which the same relaxation is applied. We test PTC on its own, fit it directly to near-null error, and combine it with the multigrid-inspired correction at three different stages. Both maps reduce GCR iterations after transfer to other ensembles, including larger lattice volumes. Adding PTC to the CNN-like correction further reduces outer GCR iterations in the matched tests on CLQCD ensembles.

The rest of the paper is organized as follows. Sec. II introduces the PTC and CNN-like corrections within the propagator solver. Sec. III evaluates their transfer, composition, and preparation-plus-solve costs. Sec. IV contains our conclusions. Appendices A–E provide a self-contained account of the basis construction, projected reference solve, training definitions, and GCR iteration.

Theoretical analysis

We construct two learned local corrections within a conventional Krylov solver for quark propagators. The reference combines a projected solve in a small set of template fields with fine-lattice relaxation, following deflation and multigrid methods [4, 6, 7, 8]. PTC acts on fine-lattice quark fields; the CNN-like map replaces the template correction by a shared local operation on block coefficients. We give the operations needed to interpret the numerical comparisons below. The full basis construction and GCR recurrence are given in Appendices B and C, with notation defined independently of the main text.

For a fixed gauge field UU, dimensionless bare valence mass m0m_0, and clover coefficient cSWc_{\mathrm{SW}}, let D=D[U,m0]D = D[U,m_0] denote the Wilson–Clover Dirac operator [19], with its dependence on cSWc_{\mathrm{SW}} implicit. A lattice with extents Lx,Ly,Lz,LtL_x,L_y,L_z,L_t in lattice units has V=LxLyLzLtV = L_xL_yL_zL_t sites. The quark fields have n=4×3×Vn = 4 \times3 \times V complex components, accounting for spin, color, and position. The source η∈Cn\eta\in\mathbb{C}^{n} and propagator column ψ∈Cn\psi\in\mathbb{C}^{n}, where C\mathbb{C} denotes the complex numbers, satisfy

Dψ=η.(1)D\psi= \eta. \tag*{(1)}

At the GCR iteration jj, the field ψj\psi_j has an unknown error ej=ψ−ψje_j = \psi- \psi_j satisfying

Dej=η−Dψj=rj,(2)De_j = \eta- D\psi_j = r_j, \tag*{(2)}

where rjr_j is the residual. A preconditioner supplies a trial correction tj∈Cnt_j \in\mathbb{C}^{n} that approximates this error. GCR uses tjt_j and its Dirac image DtjDt_j to construct a search direction and update ψj\psi_j by minimizing the original residual [20]. Both learned maps remain fixed during a solve. We use ∥⋅∥2\lVert\cdot\rVert_2 for the Euclidean norm over all field components, †\dagger for the Hermitian adjoint, and INI_N for the identity on an NN-dimensional space.

PTC on the quark-field residual

The gauge-covariant PTC layer [13, 14] uses one on-site path and eight nearest-neighbor paths. Let v∈Cnv \in\mathbb{C}^{n} be an input quark field and xx a fine-lattice site. The displacement δ\delta is zero or one lattice spacing in either direction along a lattice axis. The color transporter Uδ(x)U_\delta(x) brings v(x+δ)v(x+\delta) to v(x)v(x), and a learned matrix Aδ∈C4×4A_\delta\in\mathbb{C}^{4\times4} mixes its spin components. The map FPTCF_{\mathrm{PTC}} is

(FPTCv)(x)=∑δ[Aδ⊗Uδ(x)]v(x+δ).(3)(F_{\mathrm{PTC}}v)(x) = \sum_{\delta}[A_\delta\otimes U_\delta(x)]v(x+\delta). \tag*{(3)}

Here ⊗\otimes denotes the direct product of the spin and color. The transporters are 3×33 \times3 matrices in the special unitary color group SU(3)\mathrm{SU}(3), constructed from stout-smeared links [21]; backward paths use adjoint links, and the on-site transporter is I3I_3. Parallel transport ensures that FPTCvF_{\mathrm{PTC}}v transforms as a quark field.

All sites share the nine spin matrices AδA_\delta, giving 9×42=1449 \times4^2 = 144 complex parameters. Training uses NpN_p random quark fields vℓv_\ell, with probe index ℓ=1,…,Np\ell= 1,\ldots,N_p. The training input is DvℓDv_\ell and the target is vℓv_\ell, so the training loss is

LPTC=1Np∑ℓ=1Np∥FPTCDvℓ−vℓ∥22∥vℓ∥22.(4)\mathcal{L}_{\mathrm{PTC}} = \frac{1}{N_p}\sum_{\ell=1}^{N_p}\frac{\lVert F_{\mathrm{PTC}}Dv_\ell-v_\ell\rVert_2^2}{\lVert v_\ell\rVert_2^2}. \tag*{(4)}

After training, the same spin matrices can be reused on another configuration.

PTC supplies tj=FPTCrjt_j = F_{\mathrm{PTC}}r_j. Let B:Cn→CnB:\mathbb{C}^{n}\to\mathbb{C}^{n} denote the complete baseline correction, including any relaxation. We investigate three variants of PTC. “PTC first” applies FPTCF_{\mathrm{PTC}} before BB:

tj=B(FPTCrj).(5)t_j = B(F_{\mathrm{PTC}}r_j). \tag*{(5)}

“PTC last” applies FPTCF_{\mathrm{PTC}} after BB:

tj=FPTC(Brj).(6)t_j = F_{\mathrm{PTC}}(Br_j). \tag*{(6)}

“PTC residual” applies FPTCF_{\mathrm{PTC}} to the residual left by the complete correction BrjBr_j:

tj=Brj+FPTC(rj−D(Brj)).(7)t_j = Br_j + F_{\mathrm{PTC}}(r_j-D(Br_j)). \tag*{(7)}

Note that “PTC residual” adds one application of DD per preconditioner call, while “PTC first” and “PTC last” do not. In the construction of BB below, its input is denoted by q∈Cnq \in\mathbb{C}^{n}.

q={rj,without PTC preprocessing,FPTCrj,with PTC preprocessing.(8)q = \begin{cases} r_j, & \text{without PTC preprocessing},\\ F_{\mathrm{PTC}}r_j, & \text{with PTC preprocessing}. \end{cases} \tag*{(8)}

CNN-like correction in the local block basis

The reference represents a correction with a small set of full-lattice templates. We first prepare Nv=32N_v=32 candidate quark fields. Starting from random fields vi(0)v_i^{(0)}, with candidate index i=1,…,Nvi=1,\ldots,N_v, kk Richardson steps give

vi(k)=(In−ω0D)kvi(0),(9)v_i^{(k)} = (I_n-\omega_0D)^k v_i^{(0)}, \tag*{(9)}

where ω0\omega_0 is the fixed preparation step size. Alternatively, Lanczos iteration prepares the eigenvectors of D†DD^\dagger D with the smallest eigenvalues, namely the right singular vectors of DD with the smallest singular values. Either construction gives a candidate matrix V∈Cn×Nv\mathcal{V}\in\mathbb{C}^{n\times N_v} whose columns are complete candidate quark fields. The preparation length kk is separately chosen from the number of relaxation steps (which is taken as 5 in the present case) used in each preconditioner call.

Divide the lattice into Nb=V/16N_b=V/16 blocks, with each of them having 24=162^4=16 lattice sites and $4\times3\times16=192 spin–color components, where the latter are orthonormalized by a QR factorization. Here QR denotes a factorization into orthonormal columns and an upper-triangular matrix. We retain s=8s = 8 local vectors per block, giving nc=Nvsn_c = N_v s block coefficients. The subscript cc labels the block representation, not color. The precise column selection is given in Appendix B 2.

Extend each local vector by zero outside its block and collect them in P∈Cn×ncP \in\mathbb{C}^{n \times n_c}. Then PP reconstructs a quark field from block coefficients, while R=P†∈Cnc×nR = P^{\dagger} \in\mathbb{C}^{n_c \times n} extracts those coefficients by projection. Local orthonormality gives P†P=IncP^{\dagger}P = I_{n_c}. These maps are rebuilt on every target gauge configuration.

The reference further compresses the block representation. Let Nd≤NvN_d \le N_v be the numerical rank of RVRV. The matrix W∈Cnc×NdW \in\mathbb{C}^{n_c \times N_d} contains an orthonormal basis for its retained column space:

W=orth⁡(RV).(10)W = \operatorname{orth}(RV). \tag*{(10)}

Here orth discards numerically dependent directions and orthonormalizes the retained columns. Reconstructing these columns gives the template matrix

Z=PW.(11)Z = PW. \tag*{(11)}

Thus Z∈Cn×NdZ \in\mathbb{C}^{n \times N_d} contains NdN_d complete candidate quark fields, each with nn components. The projected Dirac matrix is

H=Z†DZ∈CNd×Nd.(12)H = Z^{\dagger}DZ \in\mathbb{C}^{N_d \times N_d}. \tag*{(12)}

For input qq, the vector of global template weights ξ∈CNd\xi\in\mathbb{C}^{N_d} is found by a direct solve of

(H+τINd)ξ=Z†q,(13)(H + \tau I_{N_d})\xi= Z^{\dagger}q, \tag*{(13)}

where τ≥0\tau\ge0 is a prescribed real shift to regularize potential singularities in HH. The first quark-field correction is then

δψc=Zξ.(14)\delta\psi_c = Z\xi. \tag*{(14)}

The subscript cc identifies the contribution from the block representation. The shifted matrix is factored once per target configuration. For Nd=32N_d = 32, every call solves a 32×3232 \times32 system, but its correction is restricted to 32 global template weights.

The CNN-like map replaces this first correction. Its input is the projected field Rq∈CncRq \in\mathbb{C}^{n_c}, with ss coefficients (Rq)(y)(Rq)(y) on block yy. The displacement Δ\Delta is zero or one block in either direction along a lattice axis. Nine shared matrices TΔ∈Cs×sT_{\Delta} \in\mathbb{C}^{s \times s} define FCNN:Cnc→CncF_{\mathrm{CNN}} : \mathbb{C}^{n_c} \to\mathbb{C}^{n_c} by

(FCNNRq)(y)=∑ΔTΔ(Rq)(y+Δ).(15)(F_{\mathrm{CNN}}Rq)(y) = \sum_{\Delta} T_{\Delta}(Rq)(y + \Delta). \tag*{(15)}

The block shifts are periodic. Each block combines its own residual coefficients with those of its eight neighbors to produce eight correction coefficients. This single linear layer has no nonlinear activation and uses 9s2=9×82=5769s^2 = 9 \times8^2 = 576 complex parameters, shared by all blocks. Its output has ncn_c coefficients even though its parameter count is independent of volume. Expanding back to the fine lattice gives

δψc=PFCNN(Rq).(16)\delta\psi_c = P F_{\mathrm{CNN}}(Rq). \tag*{(16)}

Equation (16) replaces Eqs. (13) and (14); applying FCNNF_{\mathrm{CNN}} requires neither a projected solve nor the global templates WW, ZZ.

After either first correction, the remaining input is

rc=q−Dδψc.(17)r_c = q - D\delta\psi_c. \tag*{(17)}

Five Richardson steps approximately solve for its remaining correction. With u(0)=0u^{(0)} = 0, define the quark fields u(h)∈Cnu^{(h)} \in\mathbb{C}^{n} by

u(h+1)=u(h)+ω(rc−Du(h)),(18)u^{(h+1)} = u^{(h)} + \omega(r_c - Du^{(h)}), \tag*{(18)}

where h=0,…,4h = 0,\ldots,4 counts these steps and ω\omega is their fixed step size. Write Src=u(5)Sr_c = u^{(5)} for the resulting relaxation map. The complete baseline returns

Bq=δψc+Src.(19)Bq = \delta\psi_c + Sr_c. \tag*{(19)}

The CNN-like variant changes only the first correction: it replaces Eqs. (13) and (14) by Eq. (16), then uses the same residual update and five Richardson steps. Without a first correction, the relaxation-only baseline is B=SB = S. GCR receives tj=Bqt_j = Bq, or the corresponding combined correction from Sec. II A.

Training determines FCNNF_{\mathrm{CNN}} before the propagator solves. For each residual qq recorded in an earlier GCR iteration, we obtain target block-correction coefficients ξc∈Cnc\xi_c \in\mathbb{C}^{n_c} by approximately solving

(RDP)ξc=Rq.(20)(RDP)\xi_c = Rq. \tag*{(20)}

Equation (20) uses the same projected Dirac construction as Eqs. (12)–(14), but in the full block basis PP rather than the compressed template basis ZZ, to generate training targets for FCNNF_{\mathrm{CNN}}. Thus RDPRDP acts on ncn_c block coefficients, whereas HH acts on NdN_d global weights. The target fine-lattice correction is PξcP\xi_c; during a propagator solve, the network supplies the coefficients FCNN(Rq)F_{\mathrm{CNN}}(Rq) instead. For 64 training pairs (Rqℓ,ξc,ℓ)(Rq_{\ell},\xi_{c,\ell}), indexed by ℓ\ell, we minimize

LCNN=∑ℓ=164∥FCNN(Rqℓ)−ξc,ℓ∥22+λ∑Δ∥TΔ∥F2.(21)\mathcal{L}_{\mathrm{CNN}} = \sum_{\ell=1}^{64} \left\lVert F_{\mathrm{CNN}}(Rq_{\ell}) - \xi_{c,\ell} \right\rVert_2^2 + \lambda\sum_{\Delta} \left\lVert T_{\Delta} \right\rVert_F^2. \tag*{(21)}

Here λ≥0\lambda\ge0 controls the penalty on large matrix entries, and the Frobenius norm ∥⋅∥F\lVert\cdot\rVert_F is the square root of the sum of squared entry magnitudes. Training and transfer use the same local-basis convention. The fitted matrices remain fixed while PP and RR are rebuilt for the target gauge field.

Placement of the learned corrections in a propagator solve

Figure 1. Placement of the learned corrections in a propagator solve. The CNN-like map replaces the first template correction; PTC first changes the input to the complete baseline. PTC alone bypasses the block correction and relaxation and returns FPTCrjF_{\mathrm{PTC}}r_j directly to GCR. The detailed preparation, projected reference solve, and GCR updates are given in Appendices B and C.

Figure 1 summarizes the complete solve. The learned weights can be shared across sources and volumes; target links and local bases supply the gauge-field dependence. For every method, GCR recomputes the true residual of Eq. (1) and accepts convergence only when

∥η−Dψj∥2∥η∥2≤10−8.(22)\frac{\lVert\eta-D\psi_j\rVert_2}{\lVert\eta\rVert_2}\leq10^{-8}. \tag*{(22)}

Learning changes the trial correction, while the original Dirac equation fixes the accepted propagator.

Numerical Setup and Analysis

Gauge ensembles, templates, and training

EnsembleEnsemble typeVolume VVβ\beta
C12P29TITLC + TITLS123×3212^3 \times326.2
C24P29TITLC + TITLS243×7224^3 \times726.2
F32P30TITLC + TITLS323×9632^3 \times966.4
Aβ 6.2A_{\beta\,6.2}TITLC + TITLS83×168^3 \times166.2
Aβ 6.4A_{\beta\,6.4}TITLC + TITLS83×168^3 \times166.4
Aβ 6.6A_{\beta\,6.6}TITLC + TITLS83×168^3 \times166.6
Aβ 6.8A_{\beta\,6.8}TITLC + TITLS83×168^3 \times166.8

Table 1. Ensembles used in this work. TITLC and TITLS denote the tadpole-improved tree-level clover fermion and Symanzik gauge actions, respectively [22]. The volume VV counts lattice sites. The gauge coupling parameter β\beta follows the convention of that reference for the CLQCD ensembles; values in this table are displayed to one decimal place.

Table I lists the seven ensembles used in the numerical analysis. C24P29 and F32P30 are Chinese Lattice QCD (CLQCD) ensembles reported in Ref. [22]; C12P29 is an additional, previously unpublished CLQCD ensemble. The four A ensembles are pure-gauge ensembles generated for the transfer tests.

PTC weights are trained on the three CLQCD ensembles and compared with models trained locally on each A ensemble. The block-basis and composition tests use C12P29 and C24P29; valence parameters are specified for each test series.

CLQCD configurations are labeled cfgiC12\mathrm{cfg}i_{\mathrm{C12}}, cfgiC24\mathrm{cfg}i_{\mathrm{C24}}, or cfgiF32\mathrm{cfg}i_{\mathrm{F32}}, where ii is the configuration number. For the A ensembles, cfgib2\mathrm{cfg}i_{\mathrm{b2}}, cfgib4\mathrm{cfg}i_{\mathrm{b4}}, cfgib6\mathrm{cfg}i_{\mathrm{b6}}, and cfgib8\mathrm{cfg}i_{\mathrm{b8}} denote β=6.2,6.4,6.6,6.8\beta=6.2,6.4,6.6,6.8, respectively. The block-basis and composition tests use cSW=1.1609c_{\mathrm{SW}}=1.1609 and m0=−0.286m_0=-0.286, with additional C24P29 tests at m0=−0.277m_0=-0.277. Standalone PTC transfer on C24P29 uses m0=−0.280m_0=-0.280 and cSW=1.16c_{\mathrm{SW}}=1.16. Comparisons use matched parameters within each series.

We prepare 32 candidates using Eq. (9) or Lanczos iteration and normally retain 32 global templates through Eq. (10). Preparation and the five-step relaxation in Eq. (18) use the same step size. The reference solve follows Eq. (13). GCR starts from zero, uses restart length 50 and two orthogonalization passes, and tests convergence with Eq. (22).

PTC uses one stout-smearing step with smearing parameter ρ=0.125\rho=0.125 [21]. We train the layer in Eq. (3) with the loss in Eq. (4), using adaptive moment estimation (Adam) at learning rate 10−310^{-3} for 900 steps. The transferred models are trained on cfg2000C12\mathrm{cfg}2000_{\mathrm{C12}}, cfg4050C24\mathrm{cfg}4050_{\mathrm{C24}}, and cfg1000F32\mathrm{cfg}1000_{\mathrm{F32}}. The first uses m0=−0.286m_0=-0.286 and cSW=1.16c_{\mathrm{SW}}=1.16; the third uses m0=−0.275m_0=-0.275 and cSW=0.956955c_{\mathrm{SW}}=0.956955. Local controls use the same optimization settings on cfg120b2\mathrm{cfg}120_{\mathrm{b2}}, cfg120b4\mathrm{cfg}120_{\mathrm{b4}}, cfg120b6\mathrm{cfg}120_{\mathrm{b6}}, and cfg120b8\mathrm{cfg}120_{\mathrm{b8}}. Each control is trained at a mass different from both test masses on its ensemble, and its training configuration is excluded from the test set.

The CNN-like map is trained on cfg2000C12\mathrm{cfg}2000_{\mathrm{C12}} at m0=−0.286m_0=-0.286 using 64 pairs from earlier GCR solves. Targets are approximate solutions of Eq. (20), and the fit minimizes Eq. (21). Both learned maps remain fixed during subsequent solves and transfer tests.

Measuring work per propagator and across sources

For the block-basis and composition tests, we estimate work by counting Dirac applications. Let JJ count outer GCR iterations and cBc_B count Dirac applications per preconditioner call. At restart length 50, the estimate per solve is

N^D(J,cB)=J(cB+1)+⌈J50⌉+2.(23)\widehat{N}_D(J,c_B)=J(c_B+1)+\left\lceil\frac{J}{50}\right\rceil+2. \tag*{(23)}

The ceiling ⌈⋅⌉\lceil\cdot\rceil rounds upward. The count includes preconditioner and GCR Dirac applications and residual checks; it excludes local-map arithmetic, projections, and communication.

Equations (17) and (18) give cB=5c_B=5 for either the reference or CNN-like correction and cB=4c_B=4 for relaxation alone. Standalone PTC [Eq. (3)] has cB=0c_B=0. PTC first and last [Eqs. (5) and (6)] preserve these counts; PTC residual [Eq. (7)] adds one Dirac application per call.

Let ADA_D be the preparation cost and JνJ_\nu the iteration count for source ν\nu. For NsrcN_{\mathrm{src}} source solves, the total estimated work is

TD(Nsrc)=AD+∑ν=1NsrcN^D(Jν,cB).(24)T_D(N_{\mathrm{src}})=A_D+\sum_{\nu=1}^{N_{\mathrm{src}}}\widehat{N}_D(J_\nu,c_B). \tag*{(24)}

Preparing relaxed candidates [Eq. (9)] costs NvkN_vk Dirac applications; assembling the projected matrix [Eq. (12)] costs NdN_d. Each Lanczos application of D†DD^\dagger D counts as two. We charge the recorded basis preparation and matrix assembly, assuming trained weights are available; training and gauge preprocessing are excluded. Four-source work estimates are averaged after applying Eq. (23) to each source.

Iteration comparisons use the reduction

RGCR=100(1−JmethodJbaseline)%.(25)\mathcal{R}_{\mathrm{GCR}}=100\left(1-\frac{J_{\mathrm{method}}}{J_{\mathrm{baseline}}}\right)\%. \tag*{(25)}

Here JmethodJ_{\mathrm{method}} and JbaselineJ_{\mathrm{baseline}} are the outer GCR iteration counts under matched configuration, source, valence-mass, and convergence conditions. Positive values mean fewer iterations; negative values mean more. Each caption states the baseline and, where applicable, the averaging procedure.

Transfer of a single PTC layer

We transfer the PTC models trained on F32P30, C24P29, and C12P29 to the four A ensembles, using Eq. (3). Each solve uses a point source at the origin in spin 0 and color 0, cSW=1.16c_{\mathrm{SW}}=1.16, and the stout-smearing settings of § 2 A. In Figure 2, transferred weights and local controls give similar iteration reductions across the tested β\beta and m0m_0 values. Reductions generally grow toward criticality within each mass pair.

GCR iteration reduction ratio for the single-layer PTC tests

Figure 2. GCR iteration reduction ratio, defined in Eq. (25), for the single-layer PTC tests on the A ensembles listed in Table I. The tested methods are GCR with each of the three transferred PTC models or the local control; the baseline is unpreconditioned GCR on the same configuration and source at the same valence mass. Tick labels give m0m_0, grouped by β\beta. Points show means over configurations, and error bars show one sample standard deviation of the per-configuration GCR iteration reduction ratios. Each point summarizes approximately 15 configurations. Colors distinguish the models. All included solves reach a true relative residual of 10−810^{-8}; each point uses the configurations for which all five methods converged.

On five held-out C24P29 configurations, we solve all twelve spin–color point-source columns at m0=−0.280m_0=-0.280. PTC weights trained on cfg2000C12 and cfg4050C24, both at m0=−0.286m_0=-0.286, reduce the mean iteration counts by 31.5% and 31.4%, respectively, relative to unpreconditioned GCR. Other settings follow § 2 A.

These tests show transfer without retraining across the investigated gauge backgrounds, lattice spacings, valence masses, and volumes.

Direct single-layer PTC fits to low-mode error

We also fit PTC directly to low-mode error, without a block basis. For held-out errors projected onto the 32 lowest measured modes on C12P29, path radii of one to three lattice spacings leave a median error fraction of 0.99968–0.99987. A matched flexible generalized minimal residual (FGMRES) solve [23] takes 8400 iterations with direct low-mode fitting and 8500 without it. This small gain motivates combining PTC with the block correction in Eq. (19).

CNN-like correction and transfer

We test the CNN-like correction [Eqs. (16) and (19)] with fixed C12P29-trained weights on C12P29 and C24P29. The C24P29 volume is 18 times that of C12P29. Each target basis is rebuilt from 32 random candidates after k=50k=50 Richardson steps [Eq. (9)] on C12P29, or from 32 Lanczos vectors on C24P29. All solves in Figure 3 satisfy Eq. (22).

GCR iteration reduction ratio for the CNN-like correction

Figure 3. GCR iteration reduction ratio, defined in Eq. (25), for the CNN-like correction. The tested method uses the CNN-like correction followed by five Richardson relaxation steps; the baseline uses the same five relaxation steps alone. The dashed line denotes zero GCR iteration reduction ratio. Marker shapes identify configurations: circle, cfg2000C12; square, cfg2020C12; triangle, cfg3000C12; diamond, cfg4050C24. C12P29 uses target-specific Nv=32N_v = 32 block bases generated with k=50k = 50 Richardson steps; C24P29 uses 32 target-specific Lanczos modes. Each point is a single-configuration result, and all solves reach a true relative residual of 10−810^{-8}. For the additional comparisons quoted in the text, the baselines are the matched reference correction with a direct solve of the shifted template system and five Richardson steps on C24P29, and unpreconditioned GCR on C12P29.

Relative to five-step relaxation alone [Eq. (18)], the CNN-like correction reduces GCR iterations by 42.1%–51.1% in the three C12P29 tests and by 60.5% on C24P29. Matched comparisons also give a 25.2% reduction against the reference with relaxation [Eqs. (14) and (19)] on C24P29, and reductions exceeding 90% against unpreconditioned GCR on C12P29.

PTC placement in the combined correction

We compare PTC first, last, and residual [Eqs. (5), (6), and (7)] with the gauge field, source, valence mass, target basis, and baseline fixed within each comparison. Figures 4 and 5 specify the baselines.

On C24P29, Figure 4 uses the reference and relaxation-only baselines, without the CNN-like map. PTC residual gives the largest iteration reductions in all five cases, 20.3%–28.0%, followed by PTC first at 12.4%–18.0%. PTC last increases iterations by 28.0% in the Lanczos case and reduces them by 5.1%–14.6% in the other four cases.

GCR iteration reduction ratio for three PTC placements on C24P29

Figure 4. GCR iteration reduction ratio, defined in Eq. (25), for three PTC placements on C24P29C24P29. Each tested method combines PTC with the baseline correction in the indicated placement; its baseline omits PTC. In the first four rows, the baseline uses the reference template correction followed by five Richardson relaxation steps; in the last row, it uses five-step relaxation alone. Row labels specify the mass and basis. The first two rows use cfg4500C24, and the remaining rows use cfg4050C24. Circles, squares, and triangles denote PTC first, PTC last, and PTC residual. Each point is a matched single-source result; all solves reach a true relative residual of 10−810^{-8}.

Figure 5 compares the PTC–CNN-like combinations on C12P29. Target bases use either 32 random candidates after k=60k=60 Richardson steps [Eq. (9)] or thickrestart block Krylov–Schur (block KS) iteration with eight starting fields and 32 retained Ritz vectors. Averaged over four sources, the reductions relative to the CNN-like correction with relaxation are 15.2%–19.7% for PTC residual, 5.4%–6.0% for PTC first, and 2.5%–4.8% for PTC last [panel (a)]. Against five-step relaxation alone, the corresponding reductions are 62.5%–74.2%, 56.1%–71.3%, and 55.6%–70.4% [panel (b)].

GCR iteration reduction ratio plots for three PTC placements

Figure 5. GCR iteration reduction ratio, defined in Eq. (25), for three PTC placements combined with the CNN-like correction on cfg2000C12_{12} from C12P29. In both panels, the tested method is the complete PTC–CNN-like correction, including five Richardson relaxation steps. The baseline in panel (a) is the corresponding CNN-like correction with relaxation but without PTC; the baseline in panel (b) is five-step relaxation alone. Circles and squares denote the k=60k = 60 relaxed basis and the block KS basis, respectively. Faint points show individual right-hand sides; open markers show the mean GCR iteration reduction ratios over four right-hand sides, with error bars denoting one sample standard deviation. All solves reach a true relative residual of 10−810^{-8}.

PTC residual saves the most iterations but adds one Dirac application per iteration [Eq. (7)]. PTC first [Eq. (5)] reduces iterations without this extra cost. The placement with the fewest iterations therefore need not have the lowest work estimate in Eq. (23).

Preparation and solve costs across methods

Figure 6 combines preparation and solve costs using Eq. (24). On C12P29, the Lanczos reference and CNN-like map with 60-step relaxed candidates have preparation costs of 10742 and 1952 Dirac applications, and representative per-solve counts of 767 and 2561, respectively. The CNN-like preparation count includes the recorded projected-matrix assembly, although Eq. (16) does not require it. The estimated cost curves cross at 4.90 solves: the CNN-like method costs less for up to four solves, and the Lanczos reference costs less from the fifth onward.

On C24P29, PTC first [Eq. (5)] and the relaxation-1000 reference share the same preparation cost. PTC reduces iterations without extra Dirac applications per iteration, lowering the estimated work per solve. The Lanczos zos reference costs more to prepare but less per solve. Its estimated cost crosses those of the relaxation reference and the PTC-first combination at 103.81 and 165.27 solves, respectively. These estimates assume available trained weights and fixed representative costs per solve; the preferred method depends on the number of sources.

Conclusion and outlook

Deflation and multigrid exploit reduced representations of the slowly converging modes of the lattice Dirac operator. Our reference combines a projected template solve with fine-lattice relaxation. Within this framework, we studied two single-layer learned corrections for four-dimensional Wilson–Clover propagators. The gauge-covariant map FPTCF_{\mathrm{PTC}} acts on fine-lattice quark fields with 144 shared complex parameters. The block map FCNNF_{\mathrm{CNN}} uses 576 shared complex parameters to replace the reference solve for global template weights, followed by the same five Richardson steps. Both parameter counts are independent of lattice volume. The maps supply trial corrections to GCR, which retains the original Dirac equation and the true-residual criterion in Eq. (22).

We examined transfer without retraining, direct PTC fits to low-mode error, combinations of the two corrections, and the cost of preparation and repeated source solves. PTC transfers without retraining across the tested gauge backgrounds, lattice spacings, valence masses, and volumes. On the four A ensembles, transferred models give iteration reductions comparable to locally trained controls. On five held-out C24P29 configurations with twelve source spin–color columns each, the models trained on C12P29 and C24P29 reduce mean iterations by 31.5% and 31.4%, respectively, relative to unpreconditioned GCR. Direct PTC fits to low-mode error give little improvement, motivating its combination with a block correction. With the basis rebuilt on each target, fixed CNN-like weights reduce iterations by 42.1%–51.1% on C12P29 and by 60.5% on C24P29 relative to five-step relaxation alone. The latter volume is 18 times the training volume; its iteration reduction relative to the reference correction with relaxation is 25.2%.

Combining PTC with the CNN-like correction gives further gains. On C12P29, applying PTC to the residual left by the complete baseline reduces iterations by a further 15.2%–19.7%, averaged over four sources, but adds one Dirac application per iteration. Applying PTC first reduces iterations without that additional Dirac cost. Thus the placement that minimizes iterations need not minimize the estimated work. With trained weights available, preparation-plus-solve estimates favor inexpensive relaxed bases for fewer sources, while the lower per-source cost of a Lanczos reference can offset its higher preparation cost over many solves. On C24P29, PTC first lowers the solve cost of the relaxed-basis reference and extends its cost advantage over the Lanczos reference to more source solves. The useful comparison therefore includes both the target volume and the number of propagators required.

These results motivate incorporating the learned corrections into solvers with improved local bases and established multigrid implementations [8, 9, 10, 12]. Wider-range corrections could be explored using generative models [24, 25] or attention-based models [26, 27]. Comparisons for production measurements should include training, basis preparation, local-map arithmetic, and communication alongside Dirac applications.

Acknowledgments

The work is supported in part by National Natural Science Foundation of China under grant No. 12375080, the Ministry of Science and Technology of China under Grant No. 2024YFA1611004, and by CUHK-Shenzhen under grant No. UDF01002851.

Estimated total Dirac-operator application count plots

Figure 6. Estimated total Dirac-operator application count from preparation and solve costs, according to Eq. (24), with logarithmic axes. Ensemble parameters are given in Table I. (a) C12P29 compares the Lanczos reference with the CNN-like map using candidate vectors after 60 relaxation steps. (b) C24P29 compares the Lanczos reference, the relaxation-1000 reference, and PTC first with the same relaxation basis. Vertical dotted lines mark 12 solves, corresponding to the twelve spin–color columns at one source position; crosses mark the estimated curve intersections at 4.90, 103.81, and 165.27 solves. Curves use representative costs per solve, and the intersections are extrapolated from those costs.

Quark fields and the propagator equation

These appendices give the complete construction used in the quark-propagator solves, from candidate fields and local bases to the trial correction and its acceptance by the outer solver. The notation and training objectives are defined here independently of the main text.

Fix a gauge configuration UU and a dimensionless bare valence mass m0m_0. The Wilson–Clover Dirac operator is denoted by D=D[U,m0]D = D[U,m_0] [19]. For lattice extents Lx,Ly,Lz,LtL_x,L_y,L_z,L_t in lattice units, the number of sites is V=LxLyLzLtV = L_xL_yL_zL_t. A quark field has four spin and three color components at every site, giving n=4×3×Vn = 4 \times3 \times V complex components. On C12P29, for example, V=123×32=55296V = 12^3 \times32 = 55296 and n=4×3×55296=663552n = 4 \times3 \times55296 = 663552. The Dirac matrix therefore has 663552 rows and columns. We use its sparse lattice action in an iterative solve.

For a source field η\eta, the desired quark field ψ\psi satisfies

Dψ=η(26)D\psi= \eta \tag*{(26)}

A point source in one spin–color component gives one propagator column; twelve such solves give all source spin–color components at a fixed source position. The method below first prepares a representation of useful error corrections on the fixed gauge background. Each source solve then uses this representation to propose corrections, with generalized conjugate residual iteration (GCR) [20] determining their contributions to ψ\psi. We describe these operations in their execution order. Throughout, †\dagger denotes the Hermitian adjoint and INI_N the identity matrix on NN components.

Preparation on a fixed gauge configuration

Generate candidate quark fields

The aim is to prepare fields that represent error components which are slow to relax. Let NvN_v be the number of candidate fields, normally Nv=32N_v = 32. The inexpensive construction starts from independent complex Gaussian quark fields vi(0)v_i^{(0)}, with i=1,…,Nvi = 1,\ldots,N_v. Applying kk steps of homogeneous relaxation with fixed step size ω0\omega_0 gives

vi(k)=(In−ω0D)kvi(0).(27)v_i^{(k)} = (I_n - \omega_0D)^k v_i^{(0)}. \tag*{(27)}

For this Richardson relaxation, we select the fixed step size ω0\omega_0 with reference to the discussion of Richardson iteration in Ref. [28]. The principal inexpensive-template comparison uses k=60k = 60; other preparation lengths are specified with their numerical tests. The preparation step count kk is separate from the five relaxation steps applied during each propagator iteration.

For a more accurate low-mode preparation, we instead use Lanczos iteration [29] to obtain the eigenvectors associated with the smallest eigenvalues of D†DD^\dagger D. These are the right singular vectors of DD with the smallest singular values. The normal operator acts on a quark field vv as v↦D†(Dv)v \mapsto D^\dagger(Dv), without forming its matrix. It is used here to prepare the basis; the propagator equation remains Eq. (26). Collect the resulting candidates, from either construction, as the columns of V∈Cn×Nv\mathcal{V} \in\mathbb{C}^{n \times N_v}, where C\mathbb{C} denotes the complex numbers. Each column is a complete quark field.

Construct the local block basis

Low-mode local coherence motivates representing these fields with a small basis on each lattice block [4, 6, 7]. Divide the lattice into nonoverlapping blocks of 2×2×2×2=162 \times2 \times2 \times2 = 16 sites. The block lattice has extents (Lx/2,Ly/2,Lz/2,Lt/2)(L_x/2,L_y/2,L_z/2,L_t/2) and contains Nb=V/16N_b = V/16 blocks. Each block contains 4×3×16=1924 \times3 \times16 = 192 spin–color components.

On each block, restrict the first 16 candidate columns to its sites. Perform a QR factorization of the resulting 192×16192 \times16 matrix, meaning a factorization into a matrix with orthonormal columns and an upper-triangular matrix; the implementation uses no column pivoting. Retain its first s=8s = 8 orthonormal columns as the local basis. When the first eight restricted candidates are locally independent, they determine this retained span; columns 9–16 do not enlarge it. A field in the resulting block representation has ss coefficients per block, hence

nc=Nbs(28)n_c = N_b s \tag*{(28)}

coefficients in total. The subscript cc in ncn_c labels the block representation rather than color. On C12P29, Nb=55296/16=3456N_b = 55296/16 = 3456 and nc=3456×8=27648n_c = 3456 \times8 = 27648.

Extend each retained local vector by zero outside its own block and collect these vectors as the columns of P∈Cn×ncP \in\mathbb{C}^{n \times n_c}. Multiplication by PP reconstructs a quark field from its block coefficients. Its Hermitian adjoint R=P†∈Cnc×nR = P^\dagger\in\mathbb{C}^{n_c \times n} extracts the coefficients of a fine-lattice field by projection. Local orthonormality gives P†P=IncP^\dagger P = I_{n_c}. Thus the first compression reduces 663552 fine-field components to 27648 block coefficients on C12P29. Both the reference and the learned block correction use this same local basis.

Form the global templates for the reference correction

The reference further reduces the number of unknown correction coefficients. Project all candidate fields to the blocks and orthonormalize their independent coefficient patterns:

W=orth⁡(RV).(29)W = \operatorname{orth}(RV). \tag*{(29)}

Here orth⁡\operatorname{orth} selects the numerical rank and orthonormalizes the retained columns. Let Nd≤NvN_d \leq N_v be their number, normally Nd=32N_d = 32. Then W∈Cnc×NdW \in\mathbb{C}^{n_c \times N_d} contains NdN_d global patterns of block coefficients. Reconstruct them on the fine lattice:

Z=PW.(30)Z = PW. \tag*{(30)}

The columns of Z∈Cn×NdZ \in\mathbb{C}^{n \times N_d} are the template quark fields, with Z†Z=INdZ^\dagger Z = I_{N_d}. On C12P29 with Nd=32N_d = 32, WW is 27648 × 32 and ZZ is 663552 × 32. Thus 32 counts the number of complete templates, each still containing 663552 components. A correction built from these templates is specified by only 32 global weights.

Assemble the small Dirac matrix

Apply DD to each template and project the result back onto the templates to obtain

H=Z†DZ.(31)H = Z^\dagger D Z. \tag*{(31)}

This Nd×NdN_d \times N_d matrix describes the action of DD between the retained global templates. Its assembly requires NdN_d applications of DD. With a prescribed real shift τ≥0\tau\geq0, the matrix H+τINdH + \tau I_{N_d} is nonsingular in our tests. We factor it once and reuse the factorization for all source solves. Forming WW, ZZ and assembling this shifted matrix are needed by the reference correction. The learned block replacement below acts directly in the basis PP and does not require this further compression to NdN_d global directions when it is applied.

Prepare the optional parallel-transport convolution (PTC) map

In the preprocessing placement, the fine-lattice learned operation acts on a quark field before the baseline correction is called. It combines the field at each site with its eight nearest neighbors, using PTC [13, 14]. Let vv be an input quark field and xx a fine-lattice site. Here δ\delta denotes the zero displacement or one fine-lattice spacing in either direction along an axis.

Before combining the fields, the 3×33 \times3 color transporter Uδ(x)∈SU(3)U_\delta(x) \in\mathrm{SU}(3), where SU(3)\mathrm{SU}(3) is the special unitary group of degree three, brings the field at x+δx + \delta to xx. A learned matrix Aδ∈C4×4A_\delta\in\mathbb{C}^{4 \times4} mixes its four spin components. The resulting map FPTCF_{\mathrm{PTC}} is

(FPTCv)(x)=∑δ[Aδ⊗Uδ(x)]v(x+δ),(32)(F_{\mathrm{PTC}}v)(x) = \sum_{\delta} [A_\delta\otimes U_\delta(x)]v(x + \delta), \tag*{(32)}

where ⊗\otimes denotes the tensor product of the spin and color actions. The transporters use stout-smeared links [21], with adjoint links for backward transport and U0=I3U_0 = I_3 for the on-site term. Parallel transport ensures that FPTCvF_{\mathrm{PTC}}v transforms as a quark field under a gauge transformation.

The nine spin matrices are shared by all sites, giving 9×42=1449 \times4^2 = 144 complex parameters. The color transporters are supplied by the gauge field. Training uses random probe fields vv: the input is DvDv, the target is vv, and the spin matrices are fitted to make FPTCDvF_{\mathrm{PTC}}Dv close to vv. After training, applying FPTCF_{\mathrm{PTC}} requires color transport and spin mixing but no application of DD. These coefficients remain fixed throughout each propagator solve. The training objectives and numerical conventions are stated in Appendix § 2.1.4.

Prepare the optional convolutional neural network (CNN)-like map

The learned block operation uses the coefficients on each block and its eight nearest neighbors to propose a correction. Let q∈Cnq \in\mathbb{C}^{n} be an input quark field. Its projection Rq∈CncRq \in\mathbb{C}^{n_c} has ss coefficients (Rq)(y)(Rq)(y) on block yy. Let Δ\Delta denote the zero displacement or one block in either direction along each of the four axes. Assign one learned matrix TΔ∈Cs×sT_{\Delta} \in\mathbb{C}^{s \times s} to each of these nine displacements. The CNN-like map FCNNF_{\mathrm{CNN}} is

(FCNNRq)(y)=∑ΔTΔ(Rq)(y+Δ).(33)(F_{\mathrm{CNN}}Rq)(y) = \sum_{\Delta} T_{\Delta}(Rq)(y+\Delta). \tag*{(33)}

Each 8×88 \times8 matrix mixes the eight coefficients from one input block. Adding the nine contributions gives eight proposed correction coefficients on block yy. All blocks share the same nine matrices, so this is a single CNN-like linear layer on the block lattice, with 9s2=9×82=5769s^{2} = 9 \times8^{2} = 576 complex parameters independent of the lattice volume. The layer acts on coefficients of a target-built low-mode basis rather than directly on fine-lattice quark fields. Its output nevertheless has ncn_c coefficients, one set of eight for every block.

To determine these matrices, we use residuals qq recorded at different iterations of earlier GCR solves on the training gauge field. Their projections RqRq are the training inputs. Target correction coefficients ξc∈Cnc\xi_c \in\mathbb{C}^{n_c} are obtained by an approximate GCR solve in the full block space:

(RDP)ξc=Rq.(34)(RDP)\xi_c = Rq. \tag*{(34)}

The operator RDPRDP is nc×ncn_c \times n_c, and PξcP\xi_c is the target fine-lattice correction. This is a projected Dirac solve in the full block basis PP, whereas the reference uses the compressed templates ZZ and NdN_d global weights. A regularized complex least-squares fit chooses the nine matrices so that FCNN(Rq)F_{\mathrm{CNN}}(Rq) approximates ξc\xi_c. These targets are prepared only for training; during a propagator solve, Eq. (33) supplies the block coefficients without a projected solve.

The block shifts are periodic, and training and application use the same local-basis convention. Different sources share the fitted matrices. They can also be reused on another gauge configuration or volume while rebuilding PP and RR for the target gauge field.

A GCR iteration for each source

Track the current residual

For each new source, start from the zero initial approximation ψ0=0\psi_0 = 0. At iteration jj, define the residual of the current approximation ψj\psi_j by

rj=η−Dψj.(35)r_j = \eta- D\psi_j. \tag*{(35)}

The unknown error is ej=ψ−ψje_j = \psi- \psi_j. Subtracting the approximate equation from Eq. (26) shows that it satisfies

Dej=rj.(36)De_j = r_j. \tag*{(36)}

Solving this equation exactly would itself require a full Dirac inversion. We instead use the prepared fields and local maps to obtain a trial correction. GCR updates rjr_j by recurrence after each search step; Eq. (35) defines that residual and is evaluated directly for the accuracy check. The following steps describe one call that supplies a trial correction to GCR.

Choose the input, with or without PTC preprocessing

Let q∈Cnq \in\mathbb{C}^{n} denote the field passed into the baseline correction:

q={rj,without PTC preprocessing,FPTCrj,with PTC preprocessing.(37)q = \begin{cases} r_j, & \text{without PTC preprocessing},\\ F_{\mathrm{PTC}}r_j, & \text{with PTC preprocessing}. \end{cases} \tag*{(37)}

All operations inside this call use qq. In particular, when PTC preprocessing is enabled, both the first correction and the subsequent relaxation are driven by FPTCrjF_{\mathrm{PTC}}r_j. The residual of the original equation used by GCR remains rjr_j from Eq. (35).

Compute the first correction

Reference correction. Project qq onto the global templates and solve for their weights ξ∈CNd\xi\in\mathbb{C}^{N_d}:

(H+τINd)ξ=Z†q,(38)(H+\tau I_{N_d})\xi=Z^\dagger q, \tag*{(38)}

using the prepared factorization, and reconstruct the first quark-field correction:

δψc=Zξ.(39)\delta\psi_c=Z\xi. \tag*{(39)}

The subscript cc labels this template or block contribution. The field δψc\delta\psi_c has nn components; only its NdN_d global weights were determined by the small solve. For Nd=32N_d=32, this is the 32×3232\times32 solve in the reference method. Without the shift, the small solve imposes Z†(q−Dδψc)=0Z^\dagger(q-D\delta\psi_c)=0, the usual Galerkin condition. With the prescribed shift, this becomes Z†(q−Dδψc)=τξZ^\dagger(q-D\delta\psi_c)=\tau\xi. The shift changes the small system, while the original propagator equation remains Dψ=ηD\psi=\eta.

Learned replacement. In this branch, project the input to RqRq, apply FCNNF_{\mathrm{CNN}} to obtain block-correction coefficients, and reconstruct the fine-lattice field:

δψc=PFCNN(Rq).(40)\delta\psi_c=P F_{\mathrm{CNN}}(Rq). \tag*{(40)}

This replaces the reference small solve and template reconstruction. It permits a separate set of correction coefficients on each block, determined from its local input, instead of restricting them to the global pattern WξW\xi. The two branches now proceed to the same relaxation step.

Relax the remainder and return the trial field

Apply relaxation to what remains after the first correction. Compute the remainder

rc=q−Dδψc.(41)r_c=q-D\delta\psi_c. \tag*{(41)}

Without PTC preprocessing, this is the residual of the still uncorrected error, D(ej−δψc)=rcD(e_j-\delta\psi_c)=r_c. With PTC preprocessing, it is the remainder of the auxiliary input q=FPTCrjq=F_{\mathrm{PTC}}r_j inside the preconditioner.

Use five Richardson relaxation steps to construct a further correction. Let u(h)u^{(h)} be the accumulated relaxation field after hh steps, and let ω\omega be the fixed step size. Starting from u(0)=0u^{(0)}=0, iterate

u(h+1)=u(h)+ω(rc−Du(h)),h=0,…,4.(42)u^{(h+1)}=u^{(h)}+\omega(r_c-Du^{(h)}),\qquad h=0,\ldots,4. \tag*{(42)}

Denote the resulting five-step map by SS, so that Src=u(5)Sr_c=u^{(5)}. The trial field tjt_j returned to GCR is the sum of the first correction and the relaxation correction:

tj=δψc+Src.(43)t_j=\delta\psi_c+Sr_c. \tag*{(43)}

This order lets the prepared representation supply one part of the correction and relaxation address the remaining input with inexpensive applications of DD. Write Bq=tjBq=t_j for the complete correction, whether its first step uses the global templates or the CNN-like map FCNNF_{\mathrm{CNN}}. For relaxation alone, B=SB=S acts directly on qq. Without PTC preprocessing, tj=Brjt_j=Br_j; for PTC first,

tj=B(FPTCrj).(44)t_j=B(F_{\mathrm{PTC}}r_j). \tag*{(44)}

Standalone PTC returns tj=FPTCrjt_j=F_{\mathrm{PTC}}r_j, without a block correction or relaxation. Section E3 defines the other placements of FPTCF_{\mathrm{PTC}}.

Update the propagator and test the original equation

GCR computes DtjDt_j and orthogonalizes it against the Dirac images of the retained search directions in the current restart cycle. Applying the same linear combinations to tjt_j gives the search direction pjp_j. Its Dirac image DpjDp_j is therefore orthogonal to those retained images. Let ∥⋅∥2\lVert\cdot\rVert_2 denote the Euclidean norm over all field components. For nonzero DpjDp_j, GCR minimizes the residual along pjp_j by choosing the step coefficient αj\alpha_j:

αj=(Dpj)†rj∥Dpj∥22.(45)\alpha_j = \frac{(Dp_j)^\dagger r_j}{\lVert Dp_j\rVert_2^2}. \tag*{(45)}

The propagator approximation is then updated by

ψj+1=ψj+αjpj.(46)\psi_{j+1} = \psi_j + \alpha_j p_j. \tag*{(46)}

The corresponding residual is rj+1=rj−αjDpjr_{j+1}=r_j-\alpha_jDp_j. Thus GCR chooses the contribution of the proposed field using the original residual rjr_j, including when the preconditioner was fed FPTCrjF_{\mathrm{PTC}}r_j.

We recompute the true residual from the original Dirac action and accept a source solve at the tolerance used in the numerical tests:

∥η−Dψj∥2∥η∥2≤10−8.(47)\frac{\lVert\eta-D\psi_j\rVert_2}{\lVert\eta\rVert_2}\leq10^{-8}. \tag*{(47)}

If this test fails, the iteration continues from the updated residual. The next source reuses the preparation and repeats this solve and accuracy test.

What the two learned operations change

The single-layer, gauge-covariant PTC [13, 14] has 144 shared complex parameters: nine shared 4×44\times4 spin matrices, one for each of the on-site and eight nearest-neighbor paths; the gauge links supply color transport. We first test it alone in the outer GCR solve: at each iteration, it maps the current residual rjr_j to the trial correction FPTCrjF_{\mathrm{PTC}}r_j, with no block correction or relaxation, and we assess its effect on the iteration count. We then combine PTC with the multigrid-inspired correction described above, comparing placements before and after that correction and on the residual it leaves. These placements can affect outer GCR iterations and counted Dirac applications differently. In all cases, PTC changes the trial correction supplied to GCR; GCR continues to solve the original equation and uses the same true-residual test.

The CNN-like map acts instead on coefficients in the local block basis. Its nine shared s×ss\times s matrices keep the learned parameter count at 9s29s^2 as the volume grows. Candidate-field preparation, the local basis, the projected Dirac equation, and relaxation follow established deflation and multigrid ideas. In the reference sequence, the residual is projected onto global templates, their weights are determined by the projected Dirac system, and the resulting correction is applied before relaxing the remainder. The CNN-like map replaces this first correction: it uses the same local basis but computes a correction on each block from the coefficients on that block and its neighbors, rather than solving for global weights. Within the multigrid-inspired sequence, the map supplies the first correction, after which the same relaxation acts on the remaining residual and the resulting trial field goes to GCR. The preparation and source-by-source iteration are specified in Appendices B and C. The required preparation is performed once for a fixed gauge field and valence mass and reused across sources. Both branches use the same five Richardson steps and true-residual test. For the relaxation-only baseline, omit basis preparation and the first correction and apply the five relaxation steps directly to qq. Standalone PTC instead returns FPTCrjF_{\mathrm{PTC}}r_j to GCR without a block basis or relaxation. Between direct checks of the original equation, GCR updates the residual by recurrence.

Training definitions and numerical conventions

PTC and block-map objectives

The PTC training uses NpN_p complex random probe fields vℓv_\ell, with probe index ℓ=1,…,Np\ell=1,\ldots,N_p, in each optimization step. The input–target pair is (Dvℓ,vℓ)(Dv_\ell,v_\ell), and the normalized loss LPTC\mathcal{L}_{\mathrm{PTC}} is

LPTC=1Np∑ℓ=1Np∥FPTCDvℓ−vℓ∥22∥vℓ∥22.(48)\mathcal{L}_{\mathrm{PTC}}=\frac{1}{N_p}\sum_{\ell=1}^{N_p}\frac{\lVert F_{\mathrm{PTC}}Dv_\ell-v_\ell\rVert_2^2}{\lVert v_\ell\rVert_2^2}. \tag*{(48)}

The transporters use one stout-smearing step with parameter ρ=0.125\rho=0.125. The transfer models are trained for 900 steps with adaptive moment estimation (Adam) and learning rate 10−310^{-3}. After training, only the target gauge links change when these weights are transferred.

For the block map, the 64 training pairs are (Rqℓ,ξc,ℓ)(Rq_\ell, \xi_{c,\ell}), where ℓ\ell indexes the pairs, qℓq_\ell is a residual recorded in an earlier GCR solve, and ξc,ℓ\xi_{c,\ell} is an approximate solution of Eq. (34). The regularized least-squares loss is

LCNN=∑ℓ=164∥FCNN(Rqℓ)−ξc,ℓ∥22+λ∑Δ∥TΔ∥F2(49)\mathcal{L}_{\mathrm{CNN}} = \sum_{\ell=1}^{64} \left\|F_{\mathrm{CNN}}(Rq_\ell)-\xi_{c,\ell}\right\|_2^2 + \lambda\sum_{\Delta} \left\|T_{\Delta}\right\|_F^2 \tag*{(49)}

Here λ≥0\lambda\ge0 is the regularization strength, and the Frobenius norm ∥⋅∥F\|\cdot\|_F is the square root of the sum of squared matrix-entry magnitudes. The penalty suppresses large entries of the shared block matrices. Training and application use the same local-basis convention. The learned matrices remain fixed, while the local maps PP and RR are reconstructed for each target configuration.

Basis regularization and source solves

The global orthonormalization uses a relative numerical-rank threshold of 10−810^{-8}, normally retaining Nd=Nv=32N_d = N_v = 32 templates. Candidate preparation applies no intermediate normalization or global reorthogonalization. The relaxation step sizes obey ω=ω0\omega= \omega_0. The real shift in Eq. (38) is

τ=10−8(∣tr⁡H∣Nd+10−300)(50)\tau= 10^{-8}\left(\frac{|\operatorname{tr} H|}{N_d} + 10^{-300}\right) \tag*{(50)}

where tr⁡\operatorname{tr} is the matrix trace. Each source solve starts from zero, uses GCR restart length 50 and two orthogonalization passes, and accepts only a true relative residual at most 10−810^{-8}.

Alternative placements of PTC

Let BB denote the complete baseline correction, including the five Richardson steps when a template or block correction is used. PTC first returns B(FPTCrj)B(F_{\mathrm{PTC}}r_j), as in Eq. (44). PTC last applies FPTCF_{\mathrm{PTC}} after the baseline:

tj=FPTC(Brj).(51)t_j = F_{\mathrm{PTC}}(Br_j). \tag*{(51)}

For PTC residual, apply FPTCF_{\mathrm{PTC}} to the residual left after the complete baseline correction:

tj=Brj+FPTC(rj−D(Brj)).(52)t_j = Br_j + F_{\mathrm{PTC}}(r_j - D(Br_j)). \tag*{(52)}

Here rj−D(Brj)r_j - D(Br_j) is formed after the complete baseline, including relaxation; rcr_c in Eq. (41) is formed after only the first template or block correction. Computing D(Brj)D(Br_j) requires one additional Dirac application. All three placements supply a trial field to the same outer GCR iteration and use the acceptance test in Eq. (47).

References

References

  1. [1]T. A. DeGrand and P. Rossi, Conditioning techniques for dynamical fermions, Comput. Phys. Commun. 60, 211 (1990).DOI
  2. [2]A. Frommer, V. Hannemann, B. Nöckel, T. Lippert, and K. Schilling, Accelerating Wilson fermion matrix inversions by means of the stabilized biconjugate gradient algorithm, Int. J. Mod. Phys. C 5, 1073 (1994), arXiv:hep-lat/9404013.DOI
  3. [3]M. Lüscher, Solution of the Dirac equation in lattice QCD using a domain decomposition method, Comput. Phys. Commun. 156, 209 (2004), arXiv:hep-lat/0310048.DOI
  4. [4]M. Lüscher, Local coherence and deflation of the low quark modes in lattice QCD, Journal of High Energy Physics 07, 081 (2007), arXiv:0706.2298 [hep-lat].DOI
  5. [5]A. Stathopoulos and K. Orginos, Computing and deflating eigenvalues while solving multiple right-hand side linear systems with an application to Quantum Chromodynamics, SIAM J. Sci. Comput. 32, 439 (2010), arXiv:0707.0131 [hep-lat].DOI
  6. [6]J. Brannick, R. C. Brower, M. A. Clark, J. C. Osborn, and C. Rebbi, Adaptive multigrid algorithm for lattice qcd, Physical Review Letters 100, 041601 (2008), arXiv:0707.4018 [hep-lat].DOI
  7. [7]R. Babich, J. Brannick, R. C. Brower, M. A. Clark, T. A. Manteuffel, S. F. McCormick, J. C. Osborn, and C. Rebbi, Adaptive multigrid algorithm for the lattice wilson-dirac operator, Physical Review Letters 105, 201602 (2010), arXiv:1005.3043 [hep-lat].DOI
  8. [8]A. Frommer, K. Kahl, S. Krieg, B. Leder, and M. Rottmann, Adaptive aggregation-based domain decomposition multigrid for the lattice wilson-dirac operator, SIAM Journal on Scientific Computing 36, A1581 (2014), arXiv:1303.1377 [hep-lat].arxiv.org/abs/1303.1377
  9. [9]T. Whyte, A. Stathopoulos, and E. Romero, Chiral rank-k truncations for the multigrid preconditioner of Wilson fermions in lattice QCD, PoS LATTICE2024, 060 (2025), arXiv:2502.03091 [hep-lat].arxiv.org/abs/2502.03091
  10. [10]T. Whyte, A. Stathopoulos, and E. Romero, Accelerating multigrid with streaming chiral SVD for Wilson fermions in lattice QCD (2025), arXiv:2505.14399 [hep-lat].arxiv.org/abs/2505.14399
  11. [11]M. A. Clark, R. Babich, K. Barros, R. C. Brower, and C. Rebbi, Solving lattice QCD systems of equations using mixed precision solvers on GPUs, Comput. Phys. Commun. 181, 1517 (2010), arXiv:0911.3191 [hep-lat].DOI
  12. [12]M. A. Clark, B. Joó, M. A. Strelchenko, M. Cheng, A. Gambhir, and R. C. Brower, Accelerating lattice QCD multigrid on GPUs using fine-grained parallelization, in SC16: International Conference for High Performance Computing, Networking, Storage and Analysis (2016) pp. 795–806, arXiv:1612.07873 [hep-lat].arxiv.org/abs/1612.07873
  13. [13]C. Lehner and T. Wettig, Gauge-equivariant neural networks as preconditioners in lattice qcd, Physical Review D 108, 034503 (2023), arXiv:2302.05419 [hep-lat].arxiv.org/abs/2302.05419
  14. [14]C. Lehner and T. Wettig, Gauge-equivariant pooling layers for preconditioners in lattice qcd, Physical Review D 110, 034517 (2024), arXiv:2304.10438 [hep-lat].arxiv.org/abs/2304.10438
  15. [15]S. Pfahler, D. Knüttel, C. Lehner, and T. Wettig, A novel gauge-equivariant neural-network architecture for preconditioners in lattice qcd, Proceedings of Science LAT-TICE2025, 027 (2026), arXiv:2602.23840 [hep-lat].DOI
  16. [16]M. Choi and H. Ohno, Learning low modes of the Wilson Dirac operator with gauge-equivariant networks (2026), lattice 2026 proceedings preprint, arXiv:2610.30982 [hep-lat].arxiv.org/abs/2610.30982
  17. [17]S. Cali, D. C. Hackett, Y. Lin, P. E. Shanahan, and B. Xiao, Neural-network preconditioners for solving the dirac equation in lattice gauge theory, Physical Review D 107, 034508 (2023), arXiv:2208.02728 [hep-lat].DOI
  18. [18]Y. Sun, S. Eswar, Y. Lin, W. Detmold, P. Shanahan, X. Li, Y. Liu, and P. Balaprakesh, Matrix-free neural preconditioner for the Dirac operator in lattice gauge theory (2025), accepted for publication in ACM Transactions on AI for Science; arXiv:2509.10378v2, arXiv:2509.10378 [hep-lat].arxiv.org/abs/2509.10378
  19. [19]B. Sheikholeslami and R. Wohlert, Improved continuum limit lattice action for QCD with Wilson fermions, Nuclear Physics B 259, 572 (1985).DOI
  20. [20]S. C. Eisenstat, H. C. Elman, and M. H. Schultz, Variational iterative methods for nonsymmetric systems of linear equations, SIAM Journal on Numerical Analysis 20, 345 (1983).DOI
  21. [21]C. Morningstar and M. Peardon, Analytic smearing of SU(3) link variables in lattice QCD, Physical Review D 69, 054501 (2004), arXiv:hep-lat/0311018 [hep-lat].DOI
  22. [22]Z.-C. Hu, B.-L. Hu, J.-H. Wang, M. Gong, G. Liu, L. Liu, P. Sun, W. Sun, W. Wang, Y.-B. Yang, and D.-J. Zhao (CLQCD), Quark masses and low-energy constants in the continuum from the tadpole-improved clover ensembles, Phys. Rev. D 109, 054507 (2024), arXiv:2310.00814 [hep-lat].arxiv.org/abs/2310.00814
  23. [23]Y. Saad, A flexible inner-outer preconditioned GMRES algorithm, SIAM Journal on Scientific Computing 14, 461 (1993).DOI
  24. [24]D. P. Kingma and M. Welling, Auto-encoding variational bayes, in International Conference on Learning Representations (2014) arXiv:1312.6114 [stat.ML].arxiv.org/abs/1312.6114
  25. [25]I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio, Generative adversarial nets, in Advances in Neural Information Processing Systems, Vol. 27 (2014) pp. 2672–2680, arXiv:1406.2661 [stat.ML].
  26. [26]A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser, and I. Polosukhin, Attention is all you need, in Advances in Neural Information Processing Systems, Vol. 30 (2017) pp. 5998–6008, arXiv:1706.03762 [cs.CL].arxiv.org/abs/1706.03762
  27. [27]A. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai, T. Unterthiner, M. Dehghani, M. Minderer, G. Heigold, S. Gelly, J. Uszkoreit, and N. Houlsby, An image is worth 16x16 words: Transformers for image recognition at scale, in International Conference on Learning Representations (2021) arXiv:2010.11929 [cs.CV].arxiv.org/abs/2010.11929
  28. [28]Y. Saad, Iterative Methods for Sparse Linear Systems, 2nd ed. (Society for Industrial and Applied Mathematics, Philadelphia, 2003).DOI
  29. [29]C. Lanczos, An iteration method for the solution of the eigenvalue problem of linear differential and integral operators, Journal of Research of the National Bureau of Standards 45, 255 (1950).DOI

Paper details

vlnc:W_pdr5kjck
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Not recorded for this paper

View statement
Looking for related papers…
Contents