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 , dimensionless bare valence mass , and clover coefficient , let denote the Wilson–Clover Dirac operator [19], with its dependence on implicit. A lattice with extents in lattice units has sites. The quark fields have complex components, accounting for spin, color, and position. The source and propagator column , where denotes the complex numbers, satisfy
At the GCR iteration , the field has an unknown error satisfying
where is the residual. A preconditioner supplies a trial correction that approximates this error. GCR uses and its Dirac image to construct a search direction and update by minimizing the original residual [20]. Both learned maps remain fixed during a solve. We use for the Euclidean norm over all field components, for the Hermitian adjoint, and for the identity on an -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 be an input quark field and a fine-lattice site. The displacement is zero or one lattice spacing in either direction along a lattice axis. The color transporter brings to , and a learned matrix mixes its spin components. The map is
Here denotes the direct product of the spin and color. The transporters are matrices in the special unitary color group , constructed from stout-smeared links [21]; backward paths use adjoint links, and the on-site transporter is . Parallel transport ensures that transforms as a quark field.
All sites share the nine spin matrices , giving complex parameters. Training uses random quark fields , with probe index . The training input is and the target is , so the training loss is
After training, the same spin matrices can be reused on another configuration.
PTC supplies . Let denote the complete baseline correction, including any relaxation. We investigate three variants of PTC. “PTC first” applies before :
“PTC last” applies after :
“PTC residual” applies to the residual left by the complete correction :
Note that “PTC residual” adds one application of per preconditioner call, while “PTC first” and “PTC last” do not. In the construction of below, its input is denoted by .
CNN-like correction in the local block basis
The reference represents a correction with a small set of full-lattice templates. We first prepare candidate quark fields. Starting from random fields , with candidate index , Richardson steps give
where is the fixed preparation step size. Alternatively, Lanczos iteration prepares the eigenvectors of with the smallest eigenvalues, namely the right singular vectors of with the smallest singular values. Either construction gives a candidate matrix whose columns are complete candidate quark fields. The preparation length 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 blocks, with each of them having 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 local vectors per block, giving block coefficients. The subscript 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 . Then reconstructs a quark field from block coefficients, while extracts those coefficients by projection. Local orthonormality gives . These maps are rebuilt on every target gauge configuration.
The reference further compresses the block representation. Let be the numerical rank of . The matrix contains an orthonormal basis for its retained column space:
Here orth discards numerically dependent directions and orthonormalizes the retained columns. Reconstructing these columns gives the template matrix
Thus contains complete candidate quark fields, each with components. The projected Dirac matrix is
For input , the vector of global template weights is found by a direct solve of
where is a prescribed real shift to regularize potential singularities in . The first quark-field correction is then
The subscript identifies the contribution from the block representation. The shifted matrix is factored once per target configuration. For , every call solves a 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 , with coefficients on block . The displacement is zero or one block in either direction along a lattice axis. Nine shared matrices define by
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 complex parameters, shared by all blocks. Its output has coefficients even though its parameter count is independent of volume. Expanding back to the fine lattice gives
Equation (16) replaces Eqs. (13) and (14); applying requires neither a projected solve nor the global templates , .
After either first correction, the remaining input is
Five Richardson steps approximately solve for its remaining correction. With , define the quark fields by
where counts these steps and is their fixed step size. Write for the resulting relaxation map. The complete baseline returns
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 . GCR receives , or the corresponding combined correction from Sec. II A.
Training determines before the propagator solves. For each residual recorded in an earlier GCR iteration, we obtain target block-correction coefficients by approximately solving
Equation (20) uses the same projected Dirac construction as Eqs. (12)–(14), but in the full block basis rather than the compressed template basis , to generate training targets for . Thus acts on block coefficients, whereas acts on global weights. The target fine-lattice correction is ; during a propagator solve, the network supplies the coefficients instead. For 64 training pairs , indexed by , we minimize
Here controls the penalty on large matrix entries, and the Frobenius norm 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 and are rebuilt for the target gauge field.

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 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
Learning changes the trial correction, while the original Dirac equation fixes the accepted propagator.
Numerical Setup and Analysis
Gauge ensembles, templates, and training
| Ensemble | Ensemble type | Volume | |
| C12P29 | TITLC + TITLS | 6.2 | |
| C24P29 | TITLC + TITLS | 6.2 | |
| F32P30 | TITLC + TITLS | 6.4 | |
| TITLC + TITLS | 6.2 | ||
| TITLC + TITLS | 6.4 | ||
| TITLC + TITLS | 6.6 | ||
| TITLC + TITLS | 6.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 counts lattice sites. The gauge coupling parameter 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 , , or , where is the configuration number. For the A ensembles, , , , and denote , respectively. The block-basis and composition tests use and , with additional C24P29 tests at . Standalone PTC transfer on C24P29 uses and . 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 [21]. We train the layer in Eq. (3) with the loss in Eq. (4), using adaptive moment estimation (Adam) at learning rate for 900 steps. The transferred models are trained on , , and . The first uses and ; the third uses and . Local controls use the same optimization settings on , , , and . 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 at 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 count outer GCR iterations and count Dirac applications per preconditioner call. At restart length 50, the estimate per solve is
The ceiling 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 for either the reference or CNN-like correction and for relaxation alone. Standalone PTC [Eq. (3)] has . PTC first and last [Eqs. (5) and (6)] preserve these counts; PTC residual [Eq. (7)] adds one Dirac application per call.
Let be the preparation cost and the iteration count for source . For source solves, the total estimated work is
Preparing relaxed candidates [Eq. (9)] costs Dirac applications; assembling the projected matrix [Eq. (12)] costs . Each Lanczos application of 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
Here and 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, , and the stout-smearing settings of § 2 A. In Figure 2, transferred weights and local controls give similar iteration reductions across the tested and values. Reductions generally grow toward criticality within each mass pair.

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 , grouped by . 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 ; 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 . PTC weights trained on cfg2000C12 and cfg4050C24, both at , 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 Richardson steps [Eq. (9)] on C12P29, or from 32 Lanczos vectors on C24P29. All solves in Figure 3 satisfy Eq. (22).

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 block bases generated with 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 . 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.

Figure 4. GCR iteration reduction ratio, defined in Eq. (25), for three PTC placements on . 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 .
Figure 5 compares the PTC–CNN-like combinations on C12P29. Target bases use either 32 random candidates after 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)].

Figure 5. GCR iteration reduction ratio, defined in Eq. (25), for three PTC placements combined with the CNN-like correction on cfg2000C 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 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 .
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 acts on fine-lattice quark fields with 144 shared complex parameters. The block map 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.

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 and a dimensionless bare valence mass . The Wilson–Clover Dirac operator is denoted by [19]. For lattice extents in lattice units, the number of sites is . A quark field has four spin and three color components at every site, giving complex components. On C12P29, for example, and . The Dirac matrix therefore has 663552 rows and columns. We use its sparse lattice action in an iterative solve.
For a source field , the desired quark field satisfies
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 . We describe these operations in their execution order. Throughout, denotes the Hermitian adjoint and the identity matrix on 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 be the number of candidate fields, normally . The inexpensive construction starts from independent complex Gaussian quark fields , with . Applying steps of homogeneous relaxation with fixed step size gives
For this Richardson relaxation, we select the fixed step size with reference to the discussion of Richardson iteration in Ref. [28]. The principal inexpensive-template comparison uses ; other preparation lengths are specified with their numerical tests. The preparation step count 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 . These are the right singular vectors of with the smallest singular values. The normal operator acts on a quark field as , 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 , where 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 sites. The block lattice has extents and contains blocks. Each block contains spin–color components.
On each block, restrict the first 16 candidate columns to its sites. Perform a QR factorization of the resulting matrix, meaning a factorization into a matrix with orthonormal columns and an upper-triangular matrix; the implementation uses no column pivoting. Retain its first 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 coefficients per block, hence
coefficients in total. The subscript in labels the block representation rather than color. On C12P29, and .
Extend each retained local vector by zero outside its own block and collect these vectors as the columns of . Multiplication by reconstructs a quark field from its block coefficients. Its Hermitian adjoint extracts the coefficients of a fine-lattice field by projection. Local orthonormality gives . 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:
Here selects the numerical rank and orthonormalizes the retained columns. Let be their number, normally . Then contains global patterns of block coefficients. Reconstruct them on the fine lattice:
The columns of are the template quark fields, with . On C12P29 with , is 27648 × 32 and 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 to each template and project the result back onto the templates to obtain
This matrix describes the action of between the retained global templates. Its assembly requires applications of . With a prescribed real shift , the matrix is nonsingular in our tests. We factor it once and reuse the factorization for all source solves. Forming , and assembling this shifted matrix are needed by the reference correction. The learned block replacement below acts directly in the basis and does not require this further compression to 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 be an input quark field and a fine-lattice site. Here denotes the zero displacement or one fine-lattice spacing in either direction along an axis.
Before combining the fields, the color transporter , where is the special unitary group of degree three, brings the field at to . A learned matrix mixes its four spin components. The resulting map is
where denotes the tensor product of the spin and color actions. The transporters use stout-smeared links [21], with adjoint links for backward transport and for the on-site term. Parallel transport ensures that transforms as a quark field under a gauge transformation.
The nine spin matrices are shared by all sites, giving complex parameters. The color transporters are supplied by the gauge field. Training uses random probe fields : the input is , the target is , and the spin matrices are fitted to make close to . After training, applying requires color transport and spin mixing but no application of . 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 be an input quark field. Its projection has coefficients on block . Let denote the zero displacement or one block in either direction along each of the four axes. Assign one learned matrix to each of these nine displacements. The CNN-like map is
Each matrix mixes the eight coefficients from one input block. Adding the nine contributions gives eight proposed correction coefficients on block . All blocks share the same nine matrices, so this is a single CNN-like linear layer on the block lattice, with 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 coefficients, one set of eight for every block.
To determine these matrices, we use residuals recorded at different iterations of earlier GCR solves on the training gauge field. Their projections are the training inputs. Target correction coefficients are obtained by an approximate GCR solve in the full block space:
The operator is , and is the target fine-lattice correction. This is a projected Dirac solve in the full block basis , whereas the reference uses the compressed templates and global weights. A regularized complex least-squares fit chooses the nine matrices so that approximates . 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 and 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 . At iteration , define the residual of the current approximation by
The unknown error is . Subtracting the approximate equation from Eq. (26) shows that it satisfies
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 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 denote the field passed into the baseline correction:
All operations inside this call use . In particular, when PTC preprocessing is enabled, both the first correction and the subsequent relaxation are driven by . The residual of the original equation used by GCR remains from Eq. (35).
Compute the first correction
Reference correction. Project onto the global templates and solve for their weights :
using the prepared factorization, and reconstruct the first quark-field correction:
The subscript labels this template or block contribution. The field has components; only its global weights were determined by the small solve. For , this is the solve in the reference method. Without the shift, the small solve imposes , the usual Galerkin condition. With the prescribed shift, this becomes . The shift changes the small system, while the original propagator equation remains .
Learned replacement. In this branch, project the input to , apply to obtain block-correction coefficients, and reconstruct the fine-lattice field:
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 . 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
Without PTC preprocessing, this is the residual of the still uncorrected error, . With PTC preprocessing, it is the remainder of the auxiliary input inside the preconditioner.
Use five Richardson relaxation steps to construct a further correction. Let be the accumulated relaxation field after steps, and let be the fixed step size. Starting from , iterate
Denote the resulting five-step map by , so that . The trial field returned to GCR is the sum of the first correction and the relaxation correction:
This order lets the prepared representation supply one part of the correction and relaxation address the remaining input with inexpensive applications of . Write for the complete correction, whether its first step uses the global templates or the CNN-like map . For relaxation alone, acts directly on . Without PTC preprocessing, ; for PTC first,
Standalone PTC returns , without a block correction or relaxation. Section E3 defines the other placements of .
Update the propagator and test the original equation
GCR computes and orthogonalizes it against the Dirac images of the retained search directions in the current restart cycle. Applying the same linear combinations to gives the search direction . Its Dirac image is therefore orthogonal to those retained images. Let denote the Euclidean norm over all field components. For nonzero , GCR minimizes the residual along by choosing the step coefficient :
The propagator approximation is then updated by
The corresponding residual is . Thus GCR chooses the contribution of the proposed field using the original residual , including when the preconditioner was fed .
We recompute the true residual from the original Dirac action and accept a source solve at the tolerance used in the numerical tests:
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 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 to the trial correction , 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 matrices keep the learned parameter count at 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 . Standalone PTC instead returns 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 complex random probe fields , with probe index , in each optimization step. The input–target pair is , and the normalized loss is
The transporters use one stout-smearing step with parameter . The transfer models are trained for 900 steps with adaptive moment estimation (Adam) and learning rate . After training, only the target gauge links change when these weights are transferred.
For the block map, the 64 training pairs are , where indexes the pairs, is a residual recorded in an earlier GCR solve, and is an approximate solution of Eq. (34). The regularized least-squares loss is
Here is the regularization strength, and the Frobenius norm 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 and are reconstructed for each target configuration.
Basis regularization and source solves
The global orthonormalization uses a relative numerical-rank threshold of , normally retaining templates. Candidate preparation applies no intermediate normalization or global reorthogonalization. The relaxation step sizes obey . The real shift in Eq. (38) is
where 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 .
Alternative placements of PTC
Let denote the complete baseline correction, including the five Richardson steps when a template or block correction is used. PTC first returns , as in Eq. (44). PTC last applies after the baseline:
For PTC residual, apply to the residual left after the complete baseline correction:
Here is formed after the complete baseline, including relaxation; in Eq. (41) is formed after only the first template or block correction. Computing 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]T. A. DeGrand and P. Rossi, Conditioning techniques for dynamical fermions, Comput. Phys. Commun. 60, 211 (1990).DOI
- [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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]B. Sheikholeslami and R. Wohlert, Improved continuum limit lattice action for QCD with Wilson fermions, Nuclear Physics B 259, 572 (1985).DOI
- [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]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]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]Y. Saad, A flexible inner-outer preconditioned GMRES algorithm, SIAM Journal on Scientific Computing 14, 461 (1993).DOI
- [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]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]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]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]Y. Saad, Iterative Methods for Sparse Linear Systems, 2nd ed. (Society for Industrial and Applied Mathematics, Philadelphia, 2003).DOI
- [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