Skip to content

An Machine Learning Approach to Mobius Accelerated Domain Wall Fermion

Jiqun Tu edited this page Jan 26, 2022 · 2 revisions

In section 3.3 of arXiv:2104.05615 an idea is introduced to realize the M"obius Accelerated Domain Wall Fermion (MADWF, arXiv:1111.5059) in a machine learning (ML) way. MADWF is the idea to use a M"obius operator with reduced Ls that is close to the original operator to speed up inversions. The original implementation of MADWF is based on the domain wall - overlap transformation to transform between different Ls. In principle for the purpose of searching for an preconditioner for CG we can use the same trick, but the application of MADWF will not be fast enough due to the multiple inversions involved.

Instead we apply a simple transfer matrix to transform between different Ls. For the preconditioning inversion, the rhs is first transformed to reduced Ls, after which a inversion is performed. The solution, which lives in the reduce Ls space, is transformed back into the original Ls space with the very same transfer matrix. The transfer matrix can be obtained by training with a straight forward loss function.

QUDA has introduced the idea of accelerator: something that accelerates solvers, and MADWF is now an available accelerator. Namely the MADWF accelerator accelerates the inversion by performing it in a space with reduce Ls, which is essentially a two-grid algorithm. To use the MADWF accelerator, set --precon-accelerator-type madwf together with the corresponding parameters for MADWF:

 --precon-accelerator-type madwf
 --madwf-diagonal-suppressor 0.850 \
 --madwf-ls 4 \
 --madwf-null-miniter 100 \
 --madwf-null-tol 1e-6 \
 --madwf-train-maxiter 600 \
 --madwf-param-load true \
 --madwf-param-save false \
 --madwf-param-infile ${QUDA_RESOURCE_PATH} \
 --madwf-param-outfile ${QUDA_RESOURCE_PATH}

or formally

    /** The type of accelerator type to use for preconditioner */
    QudaAcceleratorType accelerator_type_precondition;

    /**
     * The following parameters are the ones used to perform the adaptive MADWF in MSPCG
     * See section 3.3 of [arXiv:2104.05615]
     */

    /** The diagonal constant to suppress the low modes when performing 5D transfer */
    double madwf_diagonal_suppressor;

    /** The target MADWF Ls to be used in the accelerator */
    int madwf_ls;

    /** The minimum number of iterations after which to generate the null vectors for MADWF */
    int madwf_null_miniter;

    /** The maximum tolerance after which to generate the null vectors for MADWF */
    double madwf_null_tol;

    /** The maximum number of iterations for the training iterations */
    int madwf_train_maxiter;

    /** Whether to load the MADWF parameters from the file system */
    QudaBoolean madwf_param_load;

    /** Whether to save the MADWF parameters to the file system */
    QudaBoolean madwf_param_save;

    /** Path to load from the file system */
    char madwf_param_infile[256];

    /** Path to save to the file system */
    char madwf_param_outfile[256];

When madwf_param_load is set to false, the MADWF parameters (the transfer matrix) will be trained automatically; otherwise QUDA looks for the parameter file in the directory specified by madwf_param_infile. When madwf_param_save is set to true, the trained MADWF parameters will be saved to the directory specified by madwf_param_outfile

Clone this wiki locally