# Tackling critical slowing down using global correction steps with
equivariant flows: the case of the Schwinger model

Jacob Finkenrath  Computation-based Science and Technology Research Center,
The Cyprus Institute, 20 Konstantinou Kavafi Str., 2121 Nicosia, Cyprus

###### Abstract

We propose a new method for simulating lattice gauge theories in the presence
of fermions. The method combines flow-based generative models for local gauge
field updates and hierarchical updates of the factorized fermion determinant.
The flow-based generative models are restricted to proposing updates to gauge-
fields within subdomains, thus keeping training times moderate while
increasing the global volume. We apply our method performs to the
2-dimensional (2D) Schwinger model with $N_{f}=2$ Wilson Dirac fermions and
show that no critical slowing down is observed in the sampling of topological
sectors up to $\beta=8.45$. Furthermore, we show that fluctuations can be
suppressed exponentially with the distance between active subdomains, allowing
us to achieve acceptance rates of up to $99\%$ for the outer-most
accept/reject step on lattices volumes of up to $V=128\times 128$.

Introduction. – Gauge field theories are solved non-perturbatively by defining
them on a discrete spacetime lattice and carrying out a numerical evaluation,
provided their infinite volume and zero lattice spacing limits are taken.
These limits require simulation at fine lattice spacing, in order to access
logarithmic corrections to discretization effects Husung  _et al._ (2021). For
example, in Quantum Chromodynamics (QCD), accessing quantities that can
connect to experiments in the precision frontier requires sub-percent accuracy
after combining statistical and systematic errors. Estimating reliably
systematic errors includes extrapolation to the continuum limit. This
systematic error is reduced by having lattice spacings smaller than 0.05 fm
that is typically the smallest lattices spacing accessible to current
simulations.

The Hybrid Monte Carlo (HMC) algorithm Duane  _et al._ (1987); Gottlieb  _et
al._ (1987) has played an essential role in allowing for large scale
simulations of lattice gauge theories. However, a major drawback is the so-
called critical slowing down observed in simulations as the lattice spacing
decreases. Critical slowing down is referred to as the exponential increase of
the computational cost required for HMC to explore topological sectors of the
theory as the lattice spacing is reduced Schaefer  _et al._ (2011), thus
resulting in a Markov Chain with long trajectories effectively that remain
(frozen) in the same topological sector.

In Ref. Luscher (2010), it was shown how constructing a map that can
trivialize a gauge-theory can be employed to solve topological freezing. A
recent development Kanwar  _et al._ (2020) was the application of a flow-based
generative model built of machine trainable affine coupling layers that can be
used to construct such a map showing how topological freezing is overcome as
criticality is approached. A major obstacle in such machine learning
approaches, however, is their scalability with the volume. Namely, while the
number of degrees of freedom of the theory increases linearly with the volume,
the trainable parameters and therefore the training time and memory
requirements of the coupling layers scale polynomially. Indeed, as the volume
is increased and more trainable parameters are introduced, convergence of the
optimizer becomes non-trivial and requires extensive fine-tuning or pre-
training techniques Del Debbio  _et al._ (2021).

In this work, we introduce a novel approach that exploits locality so that the
flow-based model proposes updates to subdomains of the lattice. Such
approaches have traditionally been key drivers in the simulation of lattice
gauge theories and lattice QCD in particular, allowing simulations at physical
quark masses. Recent examples are multi-grid approaches Frommer  _et al._
(2014); Lüscher (2004); Luscher (2007), efficient computation of the trace of
the inverse Dirac operator using hierarchical probing Stathopoulos  _et al._
(2013), and multi-level algorithms Cè  _et al._ (2017, 2016), The new approach
proposed here combines flow-based generative models for proposing gauge-filed
configurations Kanwar  _et al._ (2020) and hierarchical updating of the gauge-
fields for including the fermion determinant Finkenrath  _et al._ (2013). We
illustrate that applicability of this method in the case of the 2D Schwinger
model with two flavors of degenerate Wilson fermions ($N_{f}=2$). We show that
this approach mitigates critical slowing down but also keeps high acceptance
rates for volumes as large as 128$\times$128\. In Fig. 1, we demonstrate that
our method, denoted as “flowGC”, crucially increases the rate at which
topological sectors of the theory are explored at very fine lattice spacings
($\beta=8.45$) where HMC is effectively frozen.

Figure 1: Monte Carlo history of the topological charge at a coarse lattice
with $\beta=3$ (upper panel) and a fine lattice with $\beta=8.45$ (lower
panel) at a volume of $V=128\times 128$ generated using the HMC algorithm and
the flowGC method proposed.

Schwinger model – The Boltzmann factor of the discrete 2D Schwinger model can
be written as

$\rho(U)=\frac{1}{Z}\textrm{exp}\\{-\beta
S_{g}(U)+2\cdot\textrm{ln}\,\textrm{det}D(U)\\}~{}.$ (1)

For the ultra local pure gauge action, we employ the plaquette action $\beta
S_{g}=\beta\sum_{i=1}^{V}\textrm{Re}[P(x)]$, where $V=L\cdot L$ is the lattice
volume with lattice extent $L$ in each direction and $\beta$ is the gauge
coupling. The plaquette at point $x$ is given by
$P(x)=U^{\dagger}_{2}(x)U^{\dagger}_{1}(x+\hat{2})U_{2}(x+\hat{1})U^{\dagger}_{1}(x)$
with gauge links $U_{\nu}(x)\in U(1)$, which connects the point $x+\hat{\nu}$
with $x$. The plaquette is gauge invariant under an arbitrary gauge
transformation $U_{\nu}(x)\rightarrow g(x+\hat{\nu})U_{\nu}(x)g(x)$ with
$g(x)\in U(1)$. The topological charge takes integer values in the Schwinger
model and can be defined by $Q=1/(2\pi)\sum_{i=1}^{V}(\arg(P(x))$, where
$\arg(e^{i\theta})=\theta$. The fermion action is given by the determinant of
the Wilson Dirac operator $D(U)\in\mathbb{C}^{2V\times 2V}$, which can be
represented as a complex sparse matrix with a real determinant, see e.g. Ref.
Christian  _et al._ (2006).

Corrections via Metropolis accept/reject steps – Given a process $T_{0}(U\to
U^{\prime})$, which allows proposing a new sample $U^{\prime}$ starting from a
previous sample $U$ with known distribution $\tilde{\rho}(U^{\prime})$ and for
which detailed balance is satisfied, a set of configurations $\\{U\\}$
weighted with a fixed point distribution $\rho(U)$ can be generated via a
Markov chain. This is given by a combination of a proposal with a subsequent
Metropolis accept/reject step

$\begin{split}0)&\quad\text{Propose $U^{\prime}$ according to $T_{0}(U\to
U^{\prime})$}\\\ 1)&\quad P_{acc}(U\to
U^{\prime})=\text{min}\left[1,{\frac{\tilde{\rho}(U)\rho(U^{\prime})}{\rho(U)\tilde{\rho}(U^{\prime})}}\,\right].\end{split}$
(2)

Most Markov Chain Monte Carlo algorithms used for large scale simulations of
lattice gauge theories, such as the HMC algorithm, are based on this approach,
where the Metropolis accept/reject step works as a global correction (GC). In
general, the Boltzmann factor $\rho$ depends on extensive quantities, i.e. the
actions are extensive quantities, such as the corresponding variances scale
with the physical volume. Assuming that the ratio of distributions
$(\tilde{\rho}(U)\rho(U^{\prime}))/(\rho(U)\tilde{\rho}(U^{\prime}))$ is log-
normal distributed, then for the acceptance rate $P_{acc}$ of Eq. (2), it
follows that

$P_{acc}=\textrm{erfc}\\{\sqrt{\sigma^{2}(\Delta S)/8}\\}$ (3)

with the variance $\sigma^{2}(\Delta S)$, where $\Delta
S=\textrm{ln}\\{\rho(U^{\prime})\\}-\textrm{ln}\\{\rho(U)\\}+\textrm{ln}\\{\tilde{\rho}(U)\\}-\textrm{ln}\\{\tilde{\rho}(U^{\prime})\\}$
Knechtli and Wolff (2003). The extensive character of $\Delta S$ implies that
the acceptance rate drops exponentially as the volume increases. In order to
achieve high acceptance rates, it is necessary to minimize the variance
$\sigma^{2}(\Delta S)$, which can be done

  * 1.

by using correlations between $\rho$ and $\tilde{\rho}$

  * 2.

by reduction of the degrees of freedom of $\rho$ and $\tilde{\rho}$.

For HMC, case 1 above applies, namely the distance of $\rho$ and
$\tilde{\rho}$ of the distribution of the Shadow Hamiltonian Clark and Kennedy
(2007); Kennedy  _et al._ (2013), is minimized. A combination of both cases
leads to a generalization of the GC step of Eq. (2), which is achieved by
introducing a hierarchy of filter steps. If we factorize the target fixed
point distribution $\rho(U)$ into $n+1$ parts $P_{i}$ with

$\rho_{j}(U)=P_{0}(U,\\{\alpha^{(0)}\\})\,P_{1}(U,\\{\alpha^{(1)}\\})\,\dots
P_{j}(U,\\{\alpha^{(j)}\\})\,,$ (4)

where $j\leq n$, $\rho_{n}(U)\equiv\rho(U)$ and $\\{\alpha^{(j)}\\}$ are
arbitrary sets of parameters, then the GC step in Eq. (2) splits into $n$
successive steps, with the $j$th given by

$\displaystyle P^{j}_{acc}(U\to U^{\prime})=$
$\displaystyle\text{min}\left[1,\frac{\rho_{j-1}(U)\rho_{j}(U^{\prime})}{\rho_{j}(U)\rho_{j-1}(U^{\prime})}\right]$
$\displaystyle=$
$\displaystyle\text{min}\left[1,\frac{P_{j}(U^{\prime},\\{\alpha^{(j)}\\})}{P_{j}(U,\\{\alpha^{(j)}\\})}\right].$
(5)

Now we can introduce a hierarchy of nested accept/reject steps which can be
iterated to filter out local fluctuations effectively.

Flow-based generative models and trivializing maps – We employ gauge
equivariant maps ($m(U)$) as in Ref. Kanwar  _et al._ (2020), constructed by
combining coupling layers $m=\prod_{j}g_{j}$. The map is required to transform
gauge-fields from a trivialized phase of our gauge model with distribution
$\rho_{trivial}$ into a non-trivial distribution $\tilde{\rho}$, i.e.
$m(U):\,\rho_{trival}(U)\to\tilde{\rho}(U)$. Each coupling layer $g_{j}$
transforms a set of active gauge links using a set of gauge-invariant objects,
such as plaquettes. The maps can be represented by tunable convolutional
networks with few hidden layers Albergo  _et al._ (2019); Dinh  _et al._
(2017); Rezende and Mohamed (2016). Keeping track of the phase space
deformation, this transformation can be computationally simplified using
active, passive, and static masks, such that the Jacobian of the
transformation becomes triangular. This yields a tractable determinant of the
Jacobian of the transformation, which is needed to train the parameters of the
coupling layers.

Now, we can write the distribution of the generative model as Albergo  _et
al._ (2019); Kanwar  _et al._ (2020)

$\tilde{\rho}(U)=\rho_{trival}(m^{-1}(U))\prod_{j}\textrm{det}J(g_{j}^{-1}(\\{\alpha_{j}^{(0)}\\}))$
(6)

with the trivial distribution $\rho_{trivial}$ and the Jacobian
$J(g_{j}^{-1}(\\{\alpha_{j}^{(0)}\\}))$ of each coupling layer. The parameters
$\\{\alpha_{j}^{(0)}\\}$ are tunable weights in the coupling layers.

Minimizing directly the variance of the accept/reject step in (2) requires
pairs of configuration $U,\,U^{\prime}$, with $U$ distributed via $\rho(U)$,
which are apriory not available. It turns out that minimizing the difference
between $\tilde{\rho}$ and ${\rho}$ is sufficient and leads to the definition
of the loss-function as the Kullback-Leibler divergence

$\textrm{loss}(U)=\textrm{ln}(\tilde{\rho}(U))-\textrm{ln}({\rho(U)}),$ (7)

which can be now minimized by training through iteratively drawing random
samples with $\rho_{trivial}$ and adjusting the weights $\alpha_{i,j}^{(0)}$
in the coupling layers.

Domain decomposition of gauge equivariant flows in the 2D Schwinger model. –
In Refs. Kanwar  _et al._ (2020); Albergo  _et al._ (2021a), equivariant flows
were introduced for generating field configurations of the 2D pure-gauge
Schwinger model, demonstrating improved sampling of topological sectors at
large values of the coupling, namely $\beta$=7, where HMC fails. Suppressing
volume fluctuations within $\sigma^{2}(\textrm{loss})$, however, proved
challenging for lattices with $L>16$, which is the interesting case. We will
show that this can be addressed by splitting the accept/reject step in Eq.
((2)) using domain decomposition and, thus, limiting the dimension of
$\tilde{\rho}$ to the size of the domains. Because the pure gauge action is
ultra local, updates of links within domains can be carried out independently
of other domains if links that lie in or at the boundary of the domains are
kept constant. We employ equivariant flows that are trained to generate link
variables within the domain, given a fixed set of links connecting the
domains. To ensure ergoticity, we periodically shift the lattice by a random
translations $T_{\vec{x}}:\vec{x_{0}}\to\vec{x_{0}}+\vec{x}$, similar to Ref.
Luscher (2005). While the lattice action
$\langle\rho(U)\rangle=\langle\rho(T_{\vec{x}}(U))\rangle$ is invariant under
translation, the trained gauge equivariant map is apriori not
$\langle\tilde{\rho}(U)\rangle\neq\langle\tilde{\rho}(T_{\vec{x}}(U))\rangle$.
This means that after each shift, to calculate $\tilde{\rho}(U)$ we need to
apply the reverse map $m^{-1}:U\to U_{trivial}$ to obtain the prior
distribution. As an empirical check, we measure
$\langle\tilde{\rho}(U)\rangle$ as we vary the frequency by which we shift the
lattice, as shown in Fig. 2. We see that translations result in small
fluctuations of the resulting distribution, indicating that no violation in
translational invariance with statistical significance is observed.

To train the flow with fixed boundary conditions, we start from the software
and workflow that implements the periodic boundary conditions followed in Ref.
Albergo  _et al._ (2021a). Namely, we train a flow using periodic boundary
conditions for a lattice with dimensions $l\times l$, with $l$ being the
lattice extent of the domains, i.e. the global lattice is constructed from
$n\times n$ domains with $n=L/l$. The flow is then re-trained allowing only
the links which do not enter the plaquettes and span boundaries to be updated.
While training, the configurations in each batch use different boundary links
but are kept constant between training iterations or epochs of one era. For
each era, we re-generate boundary links using a flow trained with periodic
boundary conditions. We use a batch size of 4096 and 1000 epochs per era.
Indicatively, for $\beta=8.45$, training took about 14 hours on an NVIDIA V100
GPU, reaching an acceptance rate of 28% using $l=8$. With such a flow, trained
for local updates and to which we can add random translations with minor
effect on the resulting density, it is straightforward to generate ensembles
of larger lattices, as demonstrated in Fig. 1 for $L$=128. Note that in order
to change topological sectors, there is a lower bound on the physical domain
size, which for this case ($l/\sqrt{\beta}=8/\sqrt{8.45}$) is satisfied.

Figure 2: The flow distribution $\tilde{\rho}$ as a function of the number of
iterations between random shifts of the lattice. For comparison the result for
1 shift per iteration is drawn with the horizontal band.

Global correction steps using fermions. – Integration of the fermions in the
path integral yields the determinant of the Wilson Dirac operator as in Eq. 1,
a non-local operator. Nonetheless, the fermion action can be splitted in a way
that allows using Eq. (4) via a recursive Schur decomposition,

$\textrm{det}D(U)=\textrm{det}\,\mathcal{S}(U)\cdot\prod_{i}\textrm{det}\,D(U^{(1)}_{i})$
(8)

with the Schur complement that is defined on the even blocks,
$\mathcal{S}(U)=1-D^{-1}(U^{(1)}_{e,e})D(U^{(1)}_{e,o})D^{-1}(U^{(1)}_{o,o})D(U^{(1)}_{o,e})$
and the block Dirac operators $D(U^{(1)}_{i})$ defined on a block. The
superscript $(1)$ denotes the first level decomposition since the Schur
decomposition can be applied recursively to multiple levels. Here we only use
a single level. The decomposition effectively factorizes the long range modes,
which are captured by the Schur complement, from the short range modes,
captured by the block operators. Note that as in the gauge-field domain
decomposition, the block operators only depend on links within a domain, that
means they decouple exactly from each other. The procedure is perfectly suited
to be used in a hierarchy of accept/reject filtering steps because it
introduces additionally a computational cost ordering. The accept/reject steps
of the block operators can be done in parallel and can be iterated to filter
out larger local fluctuations of the determinant. In this work, the problem
sizes are sufficiently small for LU-decomposition to be used for the
determinant calculation. For systems with more degrees of freedom however,
such as in lattice QCD, the determinant ratio can be estimated stochastic, as
discussed in Ref. Finkenrath  _et al._ (2013).

The Schur complement $\mathcal{S}(U)$ contains the interactions between the
domains and, therefore, scales with the volume as an extensive quantity. The
acceptance rate of the global correction step, thus, decreases exponentially
with the volume. We mitigate this by introducing parameters to exploit
correlations between the different factors of the action. Namely, a shift in
the gauge coupling can be introduced between the pure-gauge action and the
determinant

$S(\beta,\Delta\beta)=(\beta+\Delta\beta)S_{g}+S_{f}$ (9)

with $S_{f}=-2\cdot\textrm{ln}\,\textrm{det}D(U)$. The variance of the action
is minimized when $\Delta\beta$ fulfills the relation

$\Delta\beta=-\textrm{cov}(S_{g},S_{f})/\sigma^{2}(S_{f}),$ (10)

with $\textrm{cov}(x,y)$ the covariance of $x$ and $y$. One way to use this
feature is, for example, to generate flow based updates of the domains using
$\beta+\Delta\beta$ as the coupling and reweighting back to the target
coupling $\beta$ during the accept/reject step of the global correction. In
our algorithm, which as will be explained includes four accept/reject steps,
we generalize this approach by allowing for a different $\Delta\beta$ at each
step Finkenrath  _et al._ (2013). Details of the steps and the values of
$\Delta\beta$ used are given in the Supplemental Material.

To further improve the global acceptance rate we note that domains decouple
effectively exponentially with their distance via
$\propto\textrm{exp}(-c_{0}\;m_{PS}\cdot|x-y|)$ and the effective decoupling
length, therefore, depends on the lowest physical mode, i.e. the pseudoscalar
mass $m_{PS}$ Luscher (2003); Cè  _et al._ (2017). We, thus, increase the
distance between domains being updated by generalizing the checkerboard
coloring of the blocks to four colors and only update domains of same color,
while all others are kept constant. In two dimensions this is possible if the
decomposition is such that it yields an even number of domains in each
direction. The global acceptance rate can now be further increased by
introducing an additional intermediate step, which includes corrections from
the eight blocks surrounding the block being updated, i.e. a $3L_{b}\times
3L_{b}$ operator, with the active $L_{b}\times L_{b}$ block located in the
center. We model the variance of the global GC step as

$\sigma^{2}(V,\beta,d,m_{PS})=\frac{A\cdot
V}{m_{PS}\beta^{3/2}}\cdot\textrm{exp}\\{-B\cdot d\;m_{PS}\\},$ (11)

where $d$ is the distance between active domains and find $A=0.0030(1)$ and
$B=2.4062(59)$. From now on, the method described will be referred to as a
5-level flowGC algorithm, which includes the following steps:

  * 0.

Flow proposal to generate 100 samples within each active block with $l=8$

  * 1.

Accept/reject step over the 100 samples using the pure gauge action of the
active blocks as target probability and keeping the final accepted
configuration. The acceptance rate is $P^{(1)}_{acc}\sim 0.25$.

  * 2.

Calculation of the determinant of the block operator $D(U_{j})$ with
$L_{b}=n\cdot l$ with $n\in 1,2,\ldots$ and accept/reject. Repeat, starting
from step 0. and repeat two to four times. The acceptance rate with $n=2$ is
$P_{acc}^{(2)}\sim 0.7$.

  * 3.

Calculation of the extended $3L_{b}\times 3L_{b}$ Dirac operator and
performance of an accept/reject step. Repeat, starting from step 0. twice. The
acceptance rate is $P_{acc}^{(3)}\sim 0.75$.

  * 4.

Calculation of Schur complement term performing a global accept/reject step
correcting to the target probability $\propto\textrm{exp}\\{-\beta
S_{g}+S_{f}\\}$.

The significance of including steps 2. and 3. should be stressed here, since
not including them results in an acceptance rate that quickly decreases with
increasing volume, as shown in Fig. 3. Note that for the 5-level flowGC
algorithm studied here, 15.6% of the gauge links are updated in each global
iteration step. When varying the block sizes of the fermion determinant
domains, $L_{b}$, the total ratio does not change since we keep the flow based
proposal fixed to $l=8$ blocks for the flow update in step 1. Therefore, the
improvement of the acceptance rate observed as we increase the domain block
sizes ($L_{b}=8$, $L_{b}=16$, and $L_{b}=32$ in Fig. 3) is due to the
increased distance between active domains and the effectiveness of the
filtering applied in step 3. From this analysis, we conclude that for a
lattice of size $L=128$ we can achieve $P_{acc}>0.97$ for distances $d\gtrsim
16$.

Figure 3: The variance of the global correction step as a function of the global volume ($V/\beta$) for $\beta=3$ (darker points) and $\beta=8.45$ (lighter points). We show the naive global correction step GC without hierarchical filtering of the block and extended block operator (diamonds), as well as for the 5-level flowGC algorithm with block distance $L_{b}=8$ (circles), with $L_{b}=16$ (stars), and with $L_{b}=32$ (square). Table 1: The coupling $\beta$ and bare fermion mass $m_{0}$ used for three representative $N_{f}=2$ ensembles of the total generated. We also show the measured plaquette ($P$) and topological charge ($Q^{2}$). For the ensembles with gauge couplings $\beta\in[1,\,6]$ we set the parameters as in Ref. Christian  _et al._ (2006), while for the finer lattice $\beta=8.45$ we refer to Ref. Albandea  _et al._ (2021). $\beta$ | $m_{0}$ | $am_{PS}$ | $P$ | $Q^{2}$
---|---|---|---|---
3.0 | -0.082626 | 0.2241(38) | 0.82705(12) | 67.6(112)
6.0 | -0.034249 | 0.1649(23) | 0.91659(10) | 24.3( 24)
8.45 |  0.0 | 0.1951(17) | 0.94084( 7) | 21.9( 25)

Markov Chain Monte Carlo simulations with dynamical fermions. – We generate
Markov chains with $\beta\in[1.0,\,8.45]$ and lattice sizes of
$L/\beta\in[22,\,74]$. The gauge coupling range spans from values where
topological sampling is possible using HMC ($\beta\in[1,\,4]$) to values where
with HMC we observe the onset of critical slowing down ($\beta\in[4,\,6]$) as
well as values of $\beta>6.00$, where the HMC algorithm effectively freezes.
In Table 1, we list the parameters and observables measured for three values
of $\beta$ that are representative of these three regions. To compare how well
the topological charge is sampled, we measured the so-called tunneling rate
per global acceptance step via

$T(Q)=\langle|Q_{i}-Q_{i+1}|\rangle.$ (12)

We choose this quantity rather than the auto-correlation time to compare the
topological sampling behavior of the different algorithms, since it increases
with the lattice extent $L/\sqrt{\beta}$. It is also easier to estimate for
cases with few changes in the topological charge, namely for HMC when
$\beta=8.45$. For the HMC, $Q_{i}$ are separated by one molecular dynamics
update with the acceptance rate tuned to $P_{acc}>90\%$, while for the 5-level
flowGC we separate with one global correction step and use a gauge flow with
$l=8$ domains, meaning at most 15.6% of the links are updated per step. As
shown in Fig. 4, the tunneling rate for the 5-level flowGC algorithm remains
constant over the $\beta$ values simulated, and is consistent with the rate
achieved by HMC at $\beta=3.0$. HMC appears to be more favorable for the cases
$\beta<2$, however only by a factor of at most two, while the 5-level flowGC
achieves over two orders of magnitude better tunneling rate for $\beta>6$.

Figure 4: Tunneling rate of the topological charge per update versus the
inverse coupling for the 5-level flowGC algorithm (circles) with $l=8$ flow
proposals and $L_{b}=16$ and the HMC algorithm (squares). We normalize the
tunneling rate with the volume and scale with $\sqrt{\beta}$ to derive a
dimensionless quantity.

Conclusion. – We present a novel algorithm for effectively simulating lattice
gauge theories with fermions. The algorithm comprises of gauge equivariant
flows for updating sub-domains of the global lattice combined with
hierarchical blocking of the fermion determinant followed by a global
correction step. We derive a 5-level flowGC algorithm, which is shown to
overcome critical slowing down in the Schwinger model with two degenerate
flavors of fermions. In addition, domain decomposition allows scaling to large
lattice sizes illustrating the effectiveness of the algorithm by simulating up
to $128\times 128$ lattices. The variance of the global correction step is
found to decrease exponentially with the distance $d$ between active blocks,
i.e. $\sigma^{2}\propto V/(m_{PS}\beta^{3/2})\cdot\textrm{exp}(-2d\cdot
m_{PS})$, with $m_{PS}$ the pseudoscalar mass. Such a dependence with $d$
enables us to tune the block sizes $L_{b}$ for a given minimum distance $d$.
We demonstrate the approach by comparing the tunneling rate of the topological
charge achieved by our method and HMC and show that the 5-level flowGC
algorithms achieves orders of magnitude higher tunneling rate at $\beta=8.45$
where HMC freezes.

The 5-level flowCG algorithm can be extended to 4D and gauge theories of
larger gauge groups, such as lattice QCD. However, a number of additional
challenges may need to be addressed, such as a possible deterioration of the
acceptance rate due to the larger block sizes Finkenrath  _et al._ (2013) that
may be needed for decoupling domains in simulations with physical quark
masses. Including the block determinant into the training, as in Ref. Albergo
_et al._ (2021b) could address this issue. Furthermore, the algorithm can be
made more efficient when combined with HMC, similar what is discussed in Ref.
Albandea  _et al._ (2021). It may be possible, if topological freezing is
resolved, to restore the sampling rate as expected from the Langevin class of
algorithms, which might increases with the inverse lattice spacing squared
$a^{-2}$ Baulieu and Zwanziger (2000); Luscher and Schaefer (2011).

###### Acknowledgements.

Acknowledgments. The author acknowledges Giannis Koutsou for careful reading
the manuscript and detailed discussions. J.F. received financial support by
the PRACE Sixth Implementation Phase (PRACE-6IP) program (grant agreement No.
823767) and by the EuroHPC-JU project EuroCC (grant agreement No. 951740) of
the European Commission. Parts of the runs were performed on the Cyclone
machine hosted at the HPC National Competence Center of Cyprus at the Cyprus
Institute.

## References

  * Husung  _et al._ (2021) Nikolai Husung, Peter Marquard, and Rainer Sommer, “The asymptotic approach to the continuum of lattice QCD spectral observables,” (2021), arXiv:2111.02347 [hep-lat] .
  * Duane  _et al._ (1987) S. Duane, A. D. Kennedy, B. J. Pendleton, and D. Roweth, “Hybrid Monte Carlo,” Phys. Lett. B 195, 216–222 (1987).
  * Gottlieb  _et al._ (1987) Steven A. Gottlieb, W. Liu, D. Toussaint, R. L. Renken, and R. L. Sugar, “Hybrid Molecular Dynamics Algorithms for the Numerical Simulation of Quantum Chromodynamics,” Phys. Rev. D 35, 2531–2542 (1987).
  * Schaefer  _et al._ (2011) Stefan Schaefer, Rainer Sommer, and Francesco Virotta (ALPHA), “Critical slowing down and error analysis in lattice QCD simulations,” Nucl. Phys. B 845, 93–119 (2011), arXiv:1009.5228 [hep-lat] .
  * Luscher (2010) Martin Luscher, “Trivializing maps, the Wilson flow and the HMC algorithm,” Commun. Math. Phys. 293, 899–919 (2010), arXiv:0907.5491 [hep-lat] .
  * Kanwar  _et al._ (2020) Gurtej Kanwar, Michael S. Albergo, Denis Boyda, Kyle Cranmer, Daniel C. Hackett, Sébastien Racanière, Danilo Jimenez Rezende, and Phiala E. Shanahan, “Equivariant flow-based sampling for lattice gauge theory,” Phys. Rev. Lett. 125, 121601 (2020), arXiv:2003.06413 [hep-lat] .
  * Del Debbio  _et al._ (2021) Luigi Del Debbio, Joe Marsh Rossney, and Michael Wilson, “Efficient modeling of trivializing maps for lattice $\phi$4 theory using normalizing flows: A first look at scalability,” Phys. Rev. D 104, 094507 (2021), arXiv:2105.12481 [hep-lat] .
  * Frommer  _et al._ (2014) Andreas Frommer, Karsten Kahl, Stefan Krieg, Björn Leder, and Matthias Rottmann, “Adaptive Aggregation Based Domain Decomposition Multigrid for the Lattice Wilson Dirac Operator,” SIAM J. Sci. Comput. 36, A1581–A1608 (2014), arXiv:1303.1377 [hep-lat] .
  * Lüscher (2004) Martin Lüscher, “Solution of the dirac equation in lattice qcd using a domain decomposition method,” Computer Physics Communications 156, 209–220 (2004).
  * Luscher (2007) Martin Luscher, “Local coherence and deflation of the low quark modes in lattice QCD,” JHEP 07, 081 (2007), arXiv:0706.2298 [hep-lat] .
  * Stathopoulos  _et al._ (2013) Andreas Stathopoulos, Jesse Laeuchli, and Kostas Orginos, “Hierarchical probing for estimating the trace of the matrix inverse on toroidal lattices,” (2013), arXiv:1302.4018 [hep-lat] .
  * Cè  _et al._ (2017) Marco Cè, Leonardo Giusti, and Stefan Schaefer, “A local factorization of the fermion determinant in lattice QCD,” Phys. Rev. D 95, 034503 (2017), arXiv:1609.02419 [hep-lat] .
  * Cè  _et al._ (2016) Marco Cè, Leonardo Giusti, and Stefan Schaefer, “Domain decomposition, multi-level integration and exponential noise reduction in lattice QCD,” Phys. Rev. D 93, 094507 (2016), arXiv:1601.04587 [hep-lat] .
  * Finkenrath  _et al._ (2013) Jacob Finkenrath, Francesco Knechtli, and Bjorn Leder, “Fermions as Global Correction: the QCD Case,” Comput. Phys. Commun. 184, 1522–1534 (2013), arXiv:1204.1306 [hep-lat] .
  * Christian  _et al._ (2006) N. Christian, K. Jansen, K. Nagai, and B. Pollakowski, “Scaling test of fermion actions in the Schwinger model,” Nucl. Phys. B 739, 60–84 (2006), arXiv:hep-lat/0510047 .
  * Knechtli and Wolff (2003) Francesco Knechtli and Ulli Wolff (Alpha), “Dynamical fermions as a global correction,” Nucl. Phys. B 663, 3–32 (2003), arXiv:hep-lat/0303001 .
  * Clark and Kennedy (2007) M. A. Clark and A. D. Kennedy, “Asymptotics of Fixed Point Distributions for Inexact Monte Carlo Algorithms,” Phys. Rev. D 76, 074508 (2007), arXiv:0705.2014 [hep-lat] .
  * Kennedy  _et al._ (2013) A. D. Kennedy, P. J. Silva, and M. A. Clark, “Shadow Hamiltonians, Poisson Brackets, and Gauge Theories,” Phys. Rev. D 87, 034511 (2013), arXiv:1210.6600 [hep-lat] .
  * Albergo  _et al._ (2019) M. S. Albergo, G. Kanwar, and P. E. Shanahan, “Flow-based generative models for Markov chain Monte Carlo in lattice field theory,” Phys. Rev. D 100, 034515 (2019), arXiv:1904.12072 [hep-lat] .
  * Dinh  _et al._ (2017) Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio, “Density estimation using real nvp,” (2017), arXiv:1605.08803 [cs.LG] .
  * Rezende and Mohamed (2016) Danilo Jimenez Rezende and Shakir Mohamed, “Variational inference with normalizing flows,” (2016), arXiv:1505.05770 [stat.ML] .
  * Albergo  _et al._ (2021a) Michael S. Albergo, Denis Boyda, Daniel C. Hackett, Gurtej Kanwar, Kyle Cranmer, Sébastien Racanière, Danilo Jimenez Rezende, and Phiala E. Shanahan, “Introduction to Normalizing Flows for Lattice Field Theory,” (2021a), arXiv:2101.08176 [hep-lat] .
  * Luscher (2005) Martin Luscher, “Schwarz-preconditioned HMC algorithm for two-flavour lattice QCD,” Comput. Phys. Commun. 165, 199–220 (2005), arXiv:hep-lat/0409106 .
  * Luscher (2003) Martin Luscher, “Lattice QCD and the Schwarz alternating procedure,” JHEP 05, 052 (2003), arXiv:hep-lat/0304007 .
  * Albandea  _et al._ (2021) David Albandea, Pilar Hernández, Alberto Ramos, and Fernando Romero-López, “Topological sampling through windings,” Eur. Phys. J. C 81, 873 (2021), arXiv:2106.14234 [hep-lat] .
  * Albergo  _et al._ (2021b) Michael S. Albergo, Gurtej Kanwar, Sébastien Racanière, Danilo J. Rezende, Julian M. Urban, Denis Boyda, Kyle Cranmer, Daniel C. Hackett, and Phiala E. Shanahan, “Flow-based sampling for fermionic lattice field theories,” (2021b), arXiv:2106.05934 [hep-lat] .
  * Baulieu and Zwanziger (2000) Laurent Baulieu and Daniel Zwanziger, “QCD(4) from a five-dimensional point of view,” Nucl. Phys. B 581, 604–640 (2000), arXiv:hep-th/9909006 .
  * Luscher and Schaefer (2011) Martin Luscher and Stefan Schaefer, “Non-renormalizability of the HMC algorithm,” JHEP 04, 104 (2011), arXiv:1103.1810 [hep-lat] .
  * Boyda  _et al._ (2021) Denis Boyda, Gurtej Kanwar, Sébastien Racanière, Danilo Jimenez Rezende, Michael S. Albergo, Kyle Cranmer, Daniel C. Hackett, and Phiala E. Shanahan, “Sampling using $SU(N)$ gauge equivariant flows,” Phys. Rev. D 103, 074504 (2021), arXiv:2008.05456 [hep-lat] .

Supplemental Material: Details on runs with global fermionic correction steps

Figure 5: The schema illustrates the different levels of the 5 level flowGC
algorithm.

Details on runs with 5 level flowGC algorithm. –  For the global correction
step algorithm driven by the gauge equivariant flow the target Boltzmann
weight is given by

$P(U)=Z^{-1}\left(\prod_{j}^{N_{f}}\textrm{det}D_{j}(U)\right)e^{-\beta
S_{g}(U)}$ (13)

with the partition sum $Z$, which we will drop from now on. Now, using domain
decomposition we can split the action into

$\begin{split}\rho(U)=&\quad
P^{(4)}\cdot\prod_{j=1}^{N_{b}}\left(P^{(3)}_{j}P^{(2)}_{j}\prod_{k=1}^{N_{l}}P^{(1)}_{k,j}\right)\\\
=&\quad\textrm{det}\,D^{2}(U)\cdot\textrm{exp}\\{-\beta
S_{g}(U)\\}\end{split}$ (14)

where the parts $P^{(3)}_{j},P^{(2)}_{j},P^{(1)}_{k,j}$ does not include links
of other active domains $i$ with $i\neq j$.

Now, we can introduce a 5 level hierarchical filter step with the
distributions

$\begin{split}0)&\quad\tilde{\rho}=\rho_{trival}(m^{-1}(U_{l}^{(k,j)}))\prod_{i=0}^{N_{coupling}}\textrm{det}J(g_{i}^{-1}(\\{\alpha_{i}^{(0)}\\}))\\\
1)&\quad
P^{(1)}_{k,j}=\textrm{exp}\left\\{-\left(\beta-\sum_{i=2}^{N_{lvl}}\delta\beta_{i}^{(1)}\right)S_{g}(U_{l}^{(k,j)})\right\\}\\\
2)&\quad
P^{(2)}_{j}=\textrm{exp}\left\\{2\left(1-\sum_{i=3}^{N_{lvl}}\delta\beta_{i}^{(2)}\right)\cdot\textrm{ln}\,\textrm{det}\,D_{b}(U_{L_{b}}^{(j)})-\delta\beta_{2}^{(1)}\sum_{k=1}^{N_{l}}S_{g}(U_{l}^{(k,j)})\right\\}\\\
3)&\quad
P^{(3)}_{j}=\textrm{exp}\left\\{-\delta\beta_{4}^{(3)}\cdot\textrm{ln}\,\textrm{det}\,D_{3b}(U_{3L_{b}}^{(j)})+\delta\beta_{3}^{(2)}\cdot\textrm{ln}\,\textrm{det}\,D_{b}(U_{L_{b}}^{(j)})-\delta\beta_{3}^{(1)}\sum_{k=1}^{N_{l}}S_{g}(U_{L_{b}}^{(k,j)})\right\\}\\\
4)&\quad
P^{(4)}=\textrm{exp}\left\\{2\cdot\textrm{ln}\,\textrm{det}\,S(U)+\sum_{j=1}^{N_{b}}\left[\delta\beta_{4}^{(3)}\textrm{ln}\,\textrm{det}\,D_{3b}(U_{3L_{b}}^{(j)})+\delta\beta_{4}^{(2)}\textrm{ln}\,\textrm{det}\,D_{b}(U_{L_{b}}^{(j)})-\delta\beta_{4}^{(1)}\sum_{k=1}^{N_{l}}S_{g}(U_{L_{b}}^{(k,j)})\right]\right\\}\end{split}$
(15)

with $N_{lvl}$ the number of levels, $N_{l}$ the number of subdomains within a
block of length $L_{b}$ and $N_{b}$ the number of active blocks. Step 0) to 3)
can be performed for each block $j$ or $k$ independently while only step 4)
includes global correlations. Note that if $L_{b}>8$ the domain $L_{b}\times
L_{b}$ is further decomposed into $l\times l$ subdomains with $l=8$. Step 0)
and 1) is then performed on each subdomain $k$ individual. Each step can be
iterated as illustrated in Fig. 5.

Parameter tuning. – Now, the parameters $\delta\beta_{i}^{(j)}$ can be tuned
by minimizing the variance of the higher level accept/reject steps utilizing
the co-variance between the different action parts, see also Ref. Finkenrath
_et al._ (2013). We can write the action of the $i$th level step as

$S_{i}(U)=\sum_{j=0}^{i}\beta_{i}^{(j)}S^{(j)}(U),\qquad\quad i=1,2,\ldots,n$
(16)

with the difference of the actions

$\Delta_{i}=S_{i}(U^{\prime})-S_{i}(U).$ (17)

Now, we can introduce a cost-ordered hierarchy, where the more expensive,
larger term, such as the Schur complements do not enter the low level
accept–reject steps. This implies $\beta_{i}^{(j)}=0$ for $i<j$. Moreover, the
additional parameters have to sum up to the target parameters, namely
$\sum_{i=1}^{n}\beta_{i}^{(j)}=\beta^{(j)}$.

Now, minimizing the variance starting from the top level leads to a coupled
linear systems which can be exactly solved. The system of linear equations is
given in the order $i=n,n-1,\ldots,1$ by

$2C^{(jj)}\beta_{i}^{(j)}+\sum_{\underset{k\neq
j}{k=0}}^{i}C^{(jk)}\beta_{i}^{(k)}=-C^{(ji)}\beta_{i}^{(i)},\quad
j=0,\cdots,i-1$ (18)

with the co-variance
$C^{jk}=\langle\Delta^{(j)}\Delta^{(k)}\rangle-\langle\Delta^{(j)}\rangle\langle\Delta^{(k)}\rangle$
of the difference $\Delta^{(j)}=S^{(j)}(U^{\prime})-S^{(j)}(U)$. Implying the
constrain $\beta_{i}^{(i)}=\beta^{(i)}-\sum_{j=i+1}^{n}\beta_{j}^{(i)}$ the
linear equation system eq. (18) can be solved, resulting into
$\beta_{i}^{(0)},\ldots,\beta_{i}^{i-1}$. We present in table 2 the optimal
parameters for the runs with $d=16$ and $L=128$ at the three different gauge
couplings $\beta=3.0,6.0,8.45$ with Wilson mass parameters
$m_{0}=-0.082626,-0.034249,0.0$, respectively. The parameters nicely
illustrate the correlations between the different parts of the fermion action,
i.e. roughly the full contribution of $\textrm{log}\,P^{(2)}_{j}$ is
compensated within $\textrm{log}\,P^{(3)}_{j}$ and similar for
$\sum_{j}\textrm{log}\,P^{(3)}_{j}$ within $\textrm{log}\,P^{(4)}$. In
general, by including fermions the gauge coupling of the pure gauge proposal
shifts towards larger values. That is expected, i.e. first contribution of the
so-called hopping parameter expansion of the determinant of $D$ comes with a
positive contribution of $S_{g}$.

Figure 6: The fit shows the dependence of the variance of the global
correction steps, within the 5 level flowGC algorithm on the distance between
active blocks $d/\sqrt{\beta}$, on the pseudoscalar meson mass
$m_{PS}\sqrt{\beta}$ and the volume $V/\beta$. The runs with different
distances, denoted as -d are performed at parameters listed in Tab. 1 while
runs with different pseudoscalar masses are denoted by -m and performed at
constant $d=16$ and lattice extend $L=64$ at the three different $\beta$
values.

Dependencies of the variance. – To estimate dependencies of the variance in
the final global correction step of the 5 level flowGC we generated a set of
35 simulations at different gauge couplings $\beta=3.0,6.0,8.45$, different
volumes with $L=64,96,128$, different distances $d=8,16,32$ and various
pseudoscalar masses between $am_{PS}\in[0.12,\;0.73]$ using $l=8$ gauge flow
updates. We found

$\sigma^{2}=A\cdot\frac{V}{m_{PS}\beta^{3/2}}\;\cdot\textrm{exp}\\{-B\cdot
d\,m_{PS}\\}$ (19)

with $A=0.0030(1)$ and $B=2.4062(59)$. The dependence is depict in Fig. 6 for
the distance $d$ and the pseudoscalar mass $m_{PS}$, while the dependence on
the volume $V$ and gauge coupling $\beta$ is shown in Fig. 3. The fit in
$d\cdot m_{PS}$ with $\chi^{2}/dof=21$ captures the overall dependence quite
well. Note that, although we employ flow updates of domain with $l=8$, for
smaller pseudoscalar masses as well as for smaller $\beta$ the acceptance rate
of the lower filter might drop such that the overall updated fraction of the
gauge links can drop under 15.6%. This leads to a smaller variance
$\sigma^{2}$, which is the case for most of the $\beta=3.0$ runs. This makes
it difficult to estimate the direct pseudoscalar mass dependence, i.e. if we
optimize the leading $am_{PS}$ dependence of $\sigma^{2}$ via the minimal
$\chi^{2}$, we find $\sigma^{2}\propto 1/(m_{PS}\sqrt{\beta})^{x}$ with
$x=1.2$.

Note that the exponential suppression with the distance of the global filter
step, lead to an exponential increase of the fourth filter step. However,
because the corresponding term only contains contribution from a single active
domain, this can be mitigated via additional iterations on the last filter
level.

$\beta$ | 3.0 | 6.0 | 8.45
---|---|---|---
5 level flowGC with $d=16$:
Level 4 |  |  |
with $\sigma^{2}$ | 0.0052 | 0.0369 | 0.0046
and $P_{acc}$ | 0.9713 | 0.9235 | 0.9727
$\delta\beta_{4}^{(3)}$ | -2.0037 | -2.0182 | -2.0087
$\delta\beta_{4}^{(2)}$ | 1.0027 | 1.0061 | 1.0083
$\delta\beta_{4}^{(1)}$ | -0.0003 | 0.0008 | 0.0004
Level 3 | $n_{1}=2$ |  |
with $\sigma^{2}$ | 0.6688 | 0.6190 | 0.1546
and $P_{acc}$ | 0.6826 | 0.6940 | 0.8441
$\delta\beta_{3}^{(2)}$ | -1.1730 | -1.3635 | -1.3534
$\delta\beta_{3}^{(1)}$ | -0.0006 | 0.0149 | 0.0125
Level 2 | $n_{2}=4$ |  |
with $\sigma^{2}$ | 1.4384 | 0.8325 | 0.1857
and $P_{acc}$ | 0.5487 | 0.6482 | 0.8294
$\delta\beta_{2}^{(1)}$ | -0.2482 | -0.3082 | -0.2863
Level 1 | $n_{1}=100$ |  |
with $P_{acc}$ | 0.5669 | 0.2501 | 0.2794
2 level GC:
with $\sigma^{2}$ | 12.3774 | 9.7119 | 3.7260
and $P_{acc}$ | 0.0786 | 0.1192 | 0.3345
Table 2: The table shows the parameter which minimize the variance of each
filter step. The parameter used for the runs with coupling constant
$\beta=3.0,\,6.0,\,8.45$ using a lattice extend of $L=128$ with a distance
$d=16$ between active domains, by keeping the domain size at a similar size
$L_{b}=16$. For comparison numbers of a two level global correction step are
included, which is driven by an HMC update and a global correction step
without hierarchical filter steps.

Remarks on cost scaling. – The computational cost of the flowGC algorithm
during the Monte Carlo sampling depends mainly on the acceptance rate and the
calculation of the determinant ratios. Towards larger lattices, higher
dimensions and gauge theories of larger gauge groups, such as lattice QCD, the
calculation of the determinants ratios requires alternative methods. A
possible way out is based on stochastic estimation which can be used within
the hierarchical filter steps, as discussed in Ref. Finkenrath  _et al._
(2013). The stochastic noise scales, similar to the exact weight, with the
volume.

Thus the computational cost for a gauge theory in $D$ dimensions is given by

$\begin{split}\textrm{cost}\propto&\left(c_{3d}\frac{N_{b}\cdot n_{3}\cdot
V_{3d}}{a^{D}}+c_{gl}\frac{V_{gl}}{a^{D}}\right)\,\cdot\\\ &\quad
1/\textrm{erfc}\left\\{\left[\frac{A^{\prime}\cdot
V}{8m_{PS}a^{D+1}}e^{-B^{\prime}\cdot
d\,m_{PS}}\right]^{1/2}\right\\}\end{split}$ (20)

with $N_{b}$ the number of active domains, $n_{3}$ the number of update
iteration of filter step at level 3, with $V_{3d}/a^{D}$ the volume of the
extended block operator, which filter out the long range fluctuations of the
active blocks and $V_{gl}/a^{D}$ the global volume. The coefficients
$A^{\prime}$ and $B^{\prime}$ are model dependent and the factors $c_{3d}$ and
$c_{gl}$ are relative cost factors, e.g. includes the total number of
inversions needed for the stochastic determinant estimation. For high
acceptance the computational cost is likely to be dominated by the extended
block operator with $V_{3d}/a^{D}$ if large distances $d$ are neccessary to
compensate small pseudoscalar masses. Note that it is possible to introduce
additional filter levels via recursive Schur decomposition, if the
corresponding acceptance rate drops.

Figure 7: The figure shows the comparison of the training effectiveness using
the standard masks compared to the optimised version, with diagonal shifted
masks. Left panel shows the plaquette average of each batch after one epoch,
while the right panel depict the minimization of the loss function in
dependence of the training time in case of periodic boundary condition.

Remarks on masks in gauge invariant flows. – The flow maps are constructed of
coupling layers, which maps the links towards the target distribution. For
simplified computation of the Jacobian, only a couple of links are updated in
each transformation. Here, we use plaquettes as the gauge invariant objects
Kanwar  _et al._ (2020); Albergo  _et al._ (2021a); Boyda  _et al._ (2021).
Using gauge invariant objects results then into three different subsets or
masks within the coupling layers, namely

  * •

frozen, which are used for updating

  * •

active, which are getting updated

  * •

passive, which are updated passively.

Within the original proposal Albergo  _et al._ (2021a), the lattice were
divided vertical into columns, starting with a passive column, followed by an
active and two frozen columns, as illustrated within the left panel of Fig. 8.
Now, the links laying between the passive and active columns can be updated
based on the trainable coupling layers with input from the frozen links.

After an update step, the maps are rotated and the links in opposite direction
are updated. This is iterated until all links are updated, which need an
application of 8 coupling layers in two dimensions.

We increased convergence by shifting the masks diagonal, as illustrated on
right panel in Fig. 8. This increases overlap with frozen plaquettes in case
of a kernel size of 3 for the employed convolutional networks within the
coupling layers and results into faster convergence at similar training time,
as shown in Fig. 7. For the training, we increased the number of layers to 64
while keeping other parameter, such as the hidden layers $(8,8)$ or the
convolutional kernels size $3$ similar to the original default values, see
Ref. Albergo  _et al._ (2021a).

Figure 8:  The figure shows the mask setup used in the gauge equivariant
flows. The original approachAlbergo  _et al._ (2021a) is shown in the left
panel, while faster convergence can be achieved with the diagonal shifted
approach (right panel).


# One for All: An End-to-End Compact Solution for Hand Gesture Recognition

Monu Verma  Computer Science and Engineering
Malaviya National Institute of Technology
Jaipur, India, 302017
Email<EMAIL_ADDRESS>Ayushi Gupta  olx people, Bangalore,
Karnataka, 560034
Email<EMAIL_ADDRESS>Santosh K. Vipparthi  Computer Science and
Engineering
Malaviya National Institute of Technology
Jaipur, India, 302017
Email<EMAIL_ADDRESS>
###### Abstract

The HGR is a quite challenging task as its performance is influenced by
various aspects such as illumination variations, cluttered backgrounds,
spontaneous capture, etc. The conventional CNN networks for HGR are following
two stage pipeline to deal with the various challenges: complex signs,
illumination variations, complex and cluttered backgrounds. The existing
approaches needs expert expertise as well as auxiliary computation at stage 1
to remove the complexities from the input images. Therefore, in this paper, we
proposes an novel end-to-end compact CNN framework: fine grained feature
attentive network for hand gesture recognition (Fit-Hand) to solve the
challenges as discussed above. The pipeline of the proposed architecture
consists of two main units: FineFeat module and dilated convolutional (Conv)
layer. The FineFeat module extracts fine grained feature maps by employing
attention mechanism over multi-scale receptive fields. The attention mechanism
is introduced to capture effective features by enlarging the average behaviour
of multi-scale responses. Moreover, dilated convolution provides global
features of hand gestures through a larger receptive field. In addition,
integrated layer is also utilized to combine the features of FineFeat module
and dilated layer which enhances the discriminability of the network by
capturing complementary context information of hand postures. The
effectiveness of Fit-Hand is evaluated by using subject dependent (SD) and
subject independent (SI) validation setup over seven benchmark datasets:
MUGD-I, MUGD-II, MUGD-III, MUGD-IV, MUGD-V, Finger Spelling and OUHANDS,
respectively. Furthermore, to investigate the deep insights of the proposed
Fit-Hand framework, we performed ten ablation study

Figure 1: Architectural comparison between existing (a) [1, 2] -(b) [3, 4] two
stage network and proposed one for all: an end-to-end solution for HGR. The
visual representation implies the proposed frameworks efficacy to handle the
all kind of challenges: complex signs, illumination variations, complex and
cluttered backgrounds. While existing HGR frameworks aids extra computation to
deal with the complex backgrounds. Figure 2: Architecture of the proposed Fit-
Hand.

##  I Introduction

Hand gestures represent specific finger and hand movements that depict a
particular message in non-verbal communication. Gestures also reinforce verbal
communication by conveying human’s intentions in certain conversations. Hand
gesture recognition is perceptual computing that allows machines to identify
hand gestures and execute the relevant action. The current situation of
coronavirus (COVID19) pandemic outbreak has caused sudden need of HGR in
various domains such as: consumer electronics market, transit sector, gaming,
touch-less smartphones, defence, home automation, robotics, automated sign
language translation etc. Thus, there is a need to amalgamate the HGR with AI
to design and develop custom-made touch-less interface to carry out daily
activities while maintaining physical distance. Thus, a robust HGR system is
needed that can work efficiently on memory-limited devices for real-life
applications.

The HGR methods can be divided into two broad categories: sensor and vision-
based techniques. Sensor based techniques [5, 6] used gloves and other
electronic devices to measure the joint angles position of the fingers,
position of the hands to extract the features of hands. Although, glove-based
techniques have sufficient cues to identify hand gestures, but gloves with
wires and sensors are too expensive and makes people uncomfortable to wear.
However, vision-based techniques can analyze hand gestures in a non-intrusive
manner without any involvement of gloves and electromagnetic devices.
Moreover, vision-based techniques are divided into two categories: 3D hand and
appearance-based model. 3D hand-based models [7, 8] represent hand structure
by defining geometrical shapes of hands as joint angles of wrist, joints of
fingers, space between fingers etc. In appearance-based methods, texture
features are extracted from visual appearance of hands. Appearance-based
methods further can be split into two groups: pre-designed and learning based.
Pre-designed based models encoded hand structure by imposing handcrafted
feature descriptors. Pre-designed feature descriptor [9, 10] has got promising
results in field of computer vision. However, these approaches fail to derive
efficient feature in real time scenarios with variant challenges as noise,
complex background conditions, low resolution and initial contour sequences.
Whereas, learning based approaches capture specific features of hand gestures
by updating filter weights gradually.

Recently, convolutional neural networks (CNN) have shown tremendous
performance in different computer vision fields like object detection, man
pose estimation, anomaly detection, face verification, emotion recognition and
many more. There are many deep CNN models postulated in literature such as
Inception V3 [11], ResNet [12], ResNet Inc [13], DenseNet [14], Mobilenet
[15], Mobilenet V2 [16] and NasMobileNet [17] etc. Even in HGR field, CNN
based approaches [18, 19, 20, 21] also have been shown impressive performance.
These CNN based HGR frameworks are followed two-stage pipeline. Where, in
first stage they have utilized handcrafted techniques to computes optical flow
or heat maps. Whereas in second stage, CNN architectures are used for feature
extraction and classification. Two-stage framework based approaches have gain
impressive attention and successfully resolved the problem of multi-view,
noise, low resolution etc. However, the performance of the these two stage
models is limited by the pre-design techniques that are strongly dependent on
prior expertise. To overcome the limitation of two-stage frameworks, advanced
CNN based approaches [18, 19, 20] have been introduced for hand gesture
recognition without including any pre-designed feature extraction method.
However, most of the advanced CNN models are designed to solve specific
problems like [18] works for black and white hand posture images, [19, 20]
color images. Thus above mentioned work is not proving generic solution for
all types of hand gesture images. Moreover, existing approaches were evaluated
over subject dependent setup and have been gained high accuracy. However, they
perform poorly when evaluated for unseen subjects’ hand gestures (subject
independent setup). The existing CNN networks also need huge computation with
large parameters and incapable to work on handheld and portable devices.

Inspired with the above challenges, in this paper, one for all: an end-to-end
compact network: fine grained feature attentive network for hand gesture
recognition is introduced. The Fit-Hand model consist of two units: FineFeat
module and dilated Conv layer to extract the effective fine features and
abstract features, respectively. Furthermore, to learn the complementary
information, resultant feature maps of FineFeat and dilated layer are combined
by utilizing integrated layer. Complementary features allows network to learn
both micro and high level features, which makes Fit-Hand a robust method to
deal with black and white (segmented) as well as color full complex background
hand gesture images. The proposed Fit-Hand also reduce the complexity of the
HGR model by eliminating the need of hand segmentation. The visual
demonstration of the comparison between state-of-the-art two-stage approaches
and proposed one for all: FitHand framework is presented in Fig. 1. The main
contribution of the proposed network is summarized as follows.

  1. 1.

We proposed a light weighted end-to-end fine grained feature attentive network
for hand gesture recognition as one solution for different challenges.

  2. 2.

A FineFeat module is proposed to extract abstract and detailed variation of
the hand postures by utilizing both global and local receptive field
information.

  3. 3.

A novel attention mechanism is introduced to preserve effective edge
information by utilizing averaging behavior of multi-scale receptive
responses.

  4. 4.

The dilated Conv layer is used to extract high-level feature of the hand-
posture and improves the discriminability of the Fit-Hand.

  5. 5.

Effectiveness of proposed Fit-Hand is validated on seven benchmark datasets:
MUGD-I, MUGD-II, MUGD-III, MUGD-IV, MUGD-V, Finger Spelling (ASL), OUHANDS,
with subject dependent and subject independent evaluation strategies.

##  II Related work

With recent advent of technologies CNN based approaches has gained good
achievements in hand gesture recognition. Jose et al. [22] designed two
different CNN frameworks based on LeNET architecture [23] to extract the
prominent features of hand gesture structures. Further, Oyebade et al. [2]
applied CNN network with auto-encoder to represents the features of hand
gestures. Sérgio et al. [24] designed a feature fusion-based convolutional
neural network (FFCNN) that incorporated auxiliary features extracted by gabor
with CNN network. Moreover, Dadashzadeh et al. [25] proposed a two stage
fusion network named as HGR Net. Where, in first stage, hand regions are
detected by applying pixel-level semantic segmentation and second-stage
network comprises two-stream CNN to determine the label of hand gesture.
Furthermore, multi-task information sharing based approaches [26, 27] has been
introduced for hand pose estimation. They extract the features of hands by
decomposing them into sub-task through 2D and 3D- heat maps. Mohanty et al.
[20] proposed a deep learning model named as DeepGestures for static hand
gesture recognition. The DeepGestures model have been designed to handle the
various challenges like variation in hand sizes, spatial location variations
in the image and complex clutter background. Neethu et al. [28] introduced a
CNN based hand gesture detection and recognition framework. Where, first they
utilized mask images for hand region extraction and then segment fingers of
images from the image though CNN. Further, the adaptive histogram equalization
technique is used for image enhancement. Finally, the segmented fingers are
fed to CNN model for hand gesture classification. Zhan et al. [18] introduced
a CNN model to solve the black and white hand gestures. Furthermore Islam et
al. [29] utilized augmentation techniques and increase the hand gesture data
sample to enhance the performance of CNN network. Adithya et al. [19]
introduce a CNN model for static hand gesture recognition without including
any segmentation technique.

##  III Proposed Method

Various researchers have exploit the learning capabilities of the pre-trained
models [30, 31] for HGR. Some of the existing approaches [32, 33] have taken
advantages of pre-designed feature descriptors and aid in CNN models to boost
their performance. While, some of the CNN networks have been deigned to learn
the features for specific hand postures. Furthermore, some other HGR
approaches have achieve good results, but require huge computation cost. All
above explained aspects limit the performance of HGR in practical scenarios.
This motivated us to design a generic and portable end-to-end CNN model for
HGR which does not have dependency on neither pre-designed descriptors nor
pre-trained weights. The detailed architecture of the proposed network is
demonstrating in Fig. 2.

Primarily network employ two consecutive Conv layers with $3\times 3$ sized
filters to extract variation patterns of hand poses. Let $I\left(l,m\right)$
be an input image and $\eta_{S}^{u,v,d}\left(o\right)$ represents Conv
function, where $S$ implies for stride, $d$ is depth, $u$ and $v$ represent
the size of filter. Then response features $R_{f}$ of first two layers are
calculated by Eq 1.

$R_{f}=\eta_{2}^{3,3,32}\left\\{\eta_{2}^{3,3,32}\left\\{I\left(l,m\right)\right\\}\right\\}$
(1)

Further resultant feature maps are simultaneously forwarded to fine feature
extraction (FineFeat) module and dilated Conv layer to preserve contextual
information of hand postures.

####  III-1 Fine Feature Extraction Module

The aim of designing FineFeat module is to preserve fine grained edge
information for discriminative feature representation of hand postures. The
FineFeat module mainly comprises of three laterally connected multi-scale Conv
of size $3\times 3$, $5\times 5$ and $7\times 7$ with minimal parameters as
show in Fig. 2. The multi-scale filters are liable to capture scale invariant
features with multi-scale receptive fields. Further, attention block is
employed to fetch only effective edges and neglects others by establishing
averaging concept over response multi-receptive fields. Response of FineFeat
$\left(Im_{f}^{d}\right)$ module is calculated by using Eq. 2.

$Im_{f}^{d}=\delta\left\\{\eta_{1}^{7\times 7\times
d}\left(R_{f}\right),\eta_{1}^{5\times 5\times
d}\left(R_{f}\right),\eta_{1}^{3\times 3\times d}\left(R_{f}\right)\right\\}$
(2)

where, $d$ represents depth of the Conv. Filters. attention block
$\delta\left(o\right)$ is calculated by using Eq.
$\left(\ref{eq:3}-\ref{eq:5}\right)$.

$\delta\left(f_{1},f_{2},f_{3}\right)=\varphi\left(f_{1},f_{2},f_{3}\right)+min\left(\gamma\left(f_{1},f_{2},f_{3}\right)\right)$
(3)
$\gamma\left(f_{1},f_{2},f_{3}\right)=\left|\varphi\left(f_{1},f_{2},f_{3}\right)-\left(f_{1},f_{2},f_{3}\right)\right|$
(4)
$\varphi\left(f_{1},f_{2},f_{3}\right)=\frac{1}{2}\left(max\left(f_{1},f_{2},f_{3}\right)+min\left(f_{1},f_{2},f_{3}\right)\right)$
(5)

where, $f_{1},f_{2},f_{3}$ are implies Conv layer holding multi-scale filters
of size $3\times 3$, $5\times 5$ and $7\times 7$ respectively.

####  III-2 Dilated Convolution layer

The dilated Conv layer [34] is embedded in FitHand network to extract global
spatial features of hand gestures by refining inputs in high resolution.
Dilated Conv layer allows to conserve more comprehensive context knowledge
from input with reducing trainable parameters. Kernel size of dilated Conv is
calculated by using Eq. 6.

$R_{i}=i+\left(i-1\right)\left(D-1\right)$ (6)

Where, $i$ is the kernel size and $D$ represent the dilation rate. For Fit-
Hand, we have used the 2 dilation. Moreover, Fit-Hand utilized the integrated
layer [12] to accumulate preserved feature maps of FineFeat module and dilated
Conv layer. Integrated layer captures distinctive edge features and enhances
robustness of Fit-Hand to define the disparities between different types of
hand gestures problems. Final out-come of Fit-Hand can be computed by using
Eq. $\left(\ref{eq:7}-\ref{eq:9}\right)$.

$H_{f}=FC\left[\eta_{2}^{3\times 3\times
128}\left(LRN\left\\{Im_{f}^{96}\left(\chi_{1}\right)+Dil_{2}^{3\times 3\times
96}\left(\chi_{1}\right)\right\\}\right)\right]$ (7)
$\chi_{1}=LRN\left\\{Im_{f}^{64}\left(\chi_{2}\right)+Dil_{2}^{3\times 3\times
64}\left(\chi_{2}\right)\right\\}$ (8)
$\chi_{2}=LRN\left\\{Im_{f}^{32}\left(R_{f}\right)+Dil_{2}^{3\times 3\times
32}\left(R_{f}\right)\right\\}$ (9)

where, $Dil_{S}^{u\times v\times d}$ dilated convolution function, where $S$
implies for stride, $d$ is depth, $u$ and $v$ represent the size of filter.
LRN and FC implies for local response normalization and fully connected layer.

Since resultant responses are carrying different scale information, local
response normalization (LRN) and L2 normalization is used to normalize them.
Therefore, these normalization techniques help to reduce the over-fitting and
improve the prediction of the network.

TABLE I: Recognition Accuracy on MUGD, Finger Spelling, OUHANDS in SD and SI setups.Here, Fing. Spell, IncV3 and ResNet Inc, stands for finger spelling, inception V3 and resnet inception, respectively. Method | SD | SI
---|---|---
MUGD | Fing. Spell. | MUGD | Fing. Spell. | OUHANDS
I | II | III | IV | V | I | II | V
IncV3 [11] CVPR (2016) | 18.0 | 23.5 | 11.5 | 15.0 | 12.0 | 51.5 | 8.05 | 8.80 | 3.38 | 25.5 | 34.8
ResNet50 [12] CVPR (2016) | 82.8 | 89.2 | 78.6 | 83.2 | 70.2 | 95.0 | 66.2 | 75.8 | 37.7 | 49.8 | 63.4
DeepGestures [20] CVIP (2016) | 69.3 | 83.0 | 81.8 | 80.6 | 56.4 | 87.2 | 54.0 | 75.0 | 37.2 | 46.5 | 46.3
ResNetInc [13] AAAI (2017) | 45.0 | 50.6 | 39.2 | 40.0 | 36.2 | 69.6 | 56.7 | 33.6 | 3.33 | 22.8 | 35.2
Dense121 [14] CVPR(2017) | 82.0 | 87.5 | 72.0 | 77.5 | 72.1 | 95.0 | 64.7 | 69.2 | 33.8 | 55.7 | 64.9
MobileNet [15] (2017) | 72.6 | 81.4 | 66.0 | 69.8 | 68.4 | 94.8 | 56.2 | 67.7 | 39.4 | 51.0 | 59.0
DeepHand [20] Neu. Comp. (2017) | N/A | N/A | N/A | N/A | N/A | 91.33 | N/A | N/A | N/A | N/A | N/A
MobileV2 [16] CVPR (2018) | 50.6 | 52.2 | 38.2 | 32.8 | 42.6 | 84.8 | 38.9 | 37.2 | 20.0 | 45.4 | 53.0
NASMob [17] CVPR (2018) | 21.5 | 21.5 | 18.5 | 19.5 | 15.5 | 68.5 | 3.33 | 3.60 | 2.27 | 37.8 | 37.9
HandShape [4] ICCCV (2018) | N/A | N/A | N/A | N/A | N/A | 90.60 | N/A | N/A | N/A | N/A | N/A
HandGes [18] IRI (2019) | 6.2 | 6.4 | 3.0 | 3.4 | 3.2 | 34.75 | 10.0 | 12.0 | 6.0 | 22.4 | 23.0
DeepConv [19] PCS-Elsevier (2020) | 71.2 | 80.4 | 74.8 | 86.4 | 63.4 | 96.0 | 54.7 | 69.0 | 35.1 | 43.5 | 56.0
DDaNet [3] IEEE-Acc. (2020) | N/A | N/A | N/A | N/A | N/A | 94.10 | N/A | N/A | N/A | N/A | N/A
Fit-Hand | 85.2 | 91.6 | 98.6 | 98.8 | 72.2 | 95.8 | 67.0 | 79.2 | 40.0 |  58.8 | 65.0

###  III-A Comparative Study with Existing Approaches

The existing CNN networks: VGGNet [35] and ResNet [12] gain impressive results
by using the sequential coupling behavior of Conv layers. However, in a deep
dense network, linearly connected Conv layers may drop some salient features
due to recurrence of cross-correlation, which has an important role to define
a gesture class. Moreover, deep networks are failing to achieve good
performance over smaller sized datasets [36]. To resolve this problem, we
proposed a light-weighted end–to-end shallow network which is more appropriate
in HGR systems. In addition, most of the challenging hand gesture datasets are
captured with complex and cluttered backgrounds. Existing approaches needs
hand segmentation to remove the complex background. Although, in literature
various hand segmentation techniques like hand shape, skin, color segmentation
etc. were proposed for hand segmentation. However, the same segmentation
technique is not work with all types of backgrounds and limits the practical
usability of the HGR. The proposed Fit-Hand utilized the integration layer to
collect the complementary context features from FineFeat module and dilated
Conv layer. FineFeat module provides fine grained features with the help of
attention mechanism, which is able to capture effective edge information.
While, dilated Conv layer generates global representation of hand gestures.
Therefore, complementary features of FineFeat and dilated layer boosts the
robustness of Fit-Hand to extract edges of hand postures and surpass the
background information. Thus, the proposed Fit-Hand does not need hand
segmentation. Also, Fit-Hand can easily learn the features from segmented or
black and white hand gesture images. There, we conclude that Fit-Hand is a
generic HGR framework that is capable to learn features in practical
scenarios.

Figure 3: Sample images of different challenges as complex finger gestures,
cluttered backgrounds, segmented gestures etc. in datasets: (a) MUGD, (b)
Finger Spelling (ASL) and (c) OUHANDS, respectively.

Fit-Hand incorporated a novel attention block, which has capability to extract
only effective edges from the multi-scaled feature responses. Whereas,
existing module inception layer [13] simply concatenates previously extracted
scale variant feature maps and let the neural network to learn relevant
weights at the time of training. Thus, inception layer increases the
complexity of network. Furthermore, Fit-Hand exploits the effectiveness of the
dilated Conv layer and preserved the global context features of hand gestures.

Figure 4: The graphical plot representing the comparative analysis between
existing: IncV3, ResNet50, DeepGestures, ResNetInc, Dense121, MobileNet,
MobileV2, NASMob, HandGes, DeepConv and proposed: Fit-Hand in-terms of
F1-Score over (a) MUGD-I, (b) MUGD-II, (c) MUGD-III, (d) MUGD-IV, (e) OUHANDS,
(f) MUGD-V and (g) Finger Spelling (ASL) datasets for SD and SI experimental
settings, respectively.

Moreover, Fit-Hand embedded Conv layer with stride 2, to down-sample input
size instead max pooling to preserve minute variation information. Max pooling
executed max function to scale down the input size, which eliminates the
minute edge features. Sometimes, small variations in a gesture may change the
interpretation of its class, thus micro level edge variation representation is
also playing a significant role to define a gesture. In literature some
studies [37, 38] have validated that Conv with stride instead of pooling adds
inter-feature dependencies and improves the learnability of neurons.

##  IV Experimental Setup and Analysis

In this section, we examined the proposed network for HGR on seven benchmark
databasesdatasets: massey university gesture dataset part-I (MUGD-I), MUGD-II,
MUGD-III, MUGD-IV, MUGD-V [39], Finger Spelling (American Sign Language) [40]
and OUHANDs [41]. The quantitative and graphical results in terms of
recognition accuracy and F1-Score is verified with the state-of-the-art
methods for HGR. The qualitative results are demonstrated to visualise the
effectiveness of Fit-Hand as compare to existing HGR approaches. Further, ten
supplementary experiments are conducted for ablation study to validate the
effectiveness of each module in the proposed method on OUHANDS. Furthermore,
complexity analysis between proposed and state-of-the art models is
represented to validate the potability of the Fit-Hand.

###  IV-A Implementation details

All experiments of Fit-Hand are conducted using Keras open-source deep-
learning library with the Tensor flow in the backend. The cross-entropy is
used as the cost function and the SGD optimizer is used for optimization. The
Fit-Hand is trained with learning rate 0.0001 for all experiments. The input
image size has been fixed with $256\times 256$ for training and inference of
the model. The Nvidia GeForce RTX 2080 GPU with Xeon processor, 16-core CPU,
and 11 GB RAM under Cuda 10.0. on Tensorflow-GPU 2.0.0 is used for the
experiments.

Moreover, to examine the effectiveness of the proposed Framework, we have
compared our results with other state-of-the-art approaches. The researchers
have took up various dataset selection procedures and experimental settings.
Therefore, it is hard to make valid comparison between the various published
results. To ensure fair comparison of HGR networks: DeepGestures, DeepConv and
HandGes, we have implemented the all of them according to our experimental
setups. In addition for general networks: Inception V3, ResNet50,
ResNetInception, DenseNet, MobileNdet, MobileNetV2, NASMobileNet, we have fine
tuned pre-trained weights with our experimental hyper-parameters over 10
epochs.

Figure 5: The qualitative comparison between the feature maps generated by
state-of-the-art HGR network: DeepGestures, HandGes, DeepConv and proposed
Fit-Hand, over six different gestures.

As all versions of MUGD datatses are limited in number, and deep Convolutional
neural networks require a large database to learn the most significant
features, the datasets are augmented offline to enhance the generalization of
the model and prevent over-fitting. The following transformations are applied
for data augmentation: rotation in between [$-45^{\circ}$, $45^{\circ}$] with
increment of $15^{\circ}$, horizontal flip and histogram equalization.
Finally, one image instance is converted into 10 images.

###  IV-B Experimental Setup

In literature most of the researchers utilized N-fold cross validation scheme
for evaluation. In N-fold cross validation, datasets are divided into random N
folds, Where N-1 folds are used for training purpose and one fold is used for
inference. The same procedure is followed for each fold and average of all
folds are considered as final results. However, N-fold cross validation
strategy is a subject dependent evaluation due to random division of folds and
not ensure the performance of models for unseen data. Therefore, these
approaches have been gained high accuracy for seen data samples. However, they
perform poorly when evaluated for unseen subjects’ hand gestures (subject
independent setup) and not suitable for real time data validation. Thus, for
fair performance of the Fit-Hand we have adopted two validation schemes:
subject- dependent and -independent. In subject dependent (SD), datasets are
randomly partitioned into 80:20 ration such that 80$\%$ dataset is processed
for training and 20$\%$ for testing set. While, in subject independent (SI),
three subjects’ hand gestures are used in training and remaining hand gestures
are used for inference for MUGD-I, MUGD-II and Finger Spelling datasets. For
MUGD-V hand gesture, one subject is included in training set and other one
used for testing purpose. The data division for SI is done purely in mutually
exclusive manner. Moreover, OUHANDS dataset contains two parts: training and
testing set with 2000 and 1000 images, respectively.

###  IV-C Quantitative Analysis

This section demonstrates the effectiveness of proposed network over all
datasets: MUGD, Finger Spelling and OUHANDS, in terms of recognition accuracy
over two experimental setups: SD and SI respectively. Comparative analysis of
existing and Fit-Hand is tabulated in Table I. Specifically, Fit-Hand achieved
15.9%, 8.6%, 16.8%, 18.2%, 15.8% and 14%, 11.2%, 23.8%, 12.4%, 8.8% more
accuracy as compared to DeepGestures and DeepConv HGR models over MUGD dataset
for part I-V in SD setup, respectively. Similarly, in SI setup, Fit-Hand
gained 13%, 4.2%, 2.8%, 12.3%, 18.7% and 12.3%, 10.2%, 4.9%, 15.3%, 9% more
accuracy as compare to DeepGestures and DeepConv models for MUGD-I, MUGD-II,
MUGD-V, Finger Spelling and OUHANDS datasets. Moreover, performance of Fit-
Hand in terms of F1-Score are graphically demonstrated in Fig. 4. From the
Table I and Fig. 4 results it is clear that all HGR methods: proposed as well
as state-of-the-art generates high results in subject dependent setup as
compare to subject independent. Moreover, the proposed FitHand outperformed
the two-stage networks; DeepHand, HandShape and DDaNet with 4.45%, 5.2% and
1.7% high accuracy over ASL finger spelling dataset. From the results, it is
validated that proposed framework is robust to all kind of challenges presents
in the HGR, which reflect the efficacy of the model to real-life applications.
Also from the results, it is proven that subject independent validation
strategy is more significant as compare to subject dependent to examined the
performance of any CNN model. In addition some methods like Inception V3,
NasMobile and HandGes are under-fitted and not suitable for small size
datasets.

Figure 6: Different structures of FineFeat module for ablation study a)
FineFeat with concatenation (FineFeat$\\_$Cat), b) FineFeat with concatenation
and Sigmoid (fineFeat$\\_$CatSig), c) FineFeat with average (FineFeat$\\_$Avg)
and d) FineFeat with deep median (FineFeat$\\_$DpMed).

###  IV-D Qualitative Analysis

This section elaborates the effectiveness of Fit-Hand through the visual
representation of neurons. Fig. 5 depicted response maps of two different
gestures captured at first Conv layer of ResNet-50, ResNet-Inc, MobileNet,
MobileNet V2 and Fit-Hand. To represent the significance of all response maps,
we have calculated mean response for each network. From the figure it is clear
that Fit-Hand extracts more fine edge variations and highlighted regions like
figure lines, palm lines, thumb articulates etc, which plays a significant
role to define distinctiveness between hand postures. From above, it is clear
that Fit-Hand has capability to preserve prominent features of hand gestures.
Therefore, we can conclude that Fit-Hand has preserved more relevant feature
responses to outperform the existing CNN based networks ResNet50, Res-Net-Inc,
MobileNet and MobileNet V2 for different hand postures.

###  IV-E Ablation Study

In order to investigate the deep insights of Fit-HandeNet, we have conducted
ten more ablation experiments for detail study as represented in Table II over
OUHANDS Dataset. This section fully explores the contribution of each module
(FineFeat module, dilation layer, L2-Normalization, loss function and
attention block) of the net-work in terms of performance and network
complexity.

TABLE II: Ablation results in terms of accuracy and complexity.Here, Param, Acc, M, S and MB stands for parameters, accuracy, millions, seconds and megabytes. Method | Acc. |  | #Param
---
(M)
| #Mem.
---
(MB)
#Time (S)
Fit-Hand_WImp | 61.7 | 0.5 | 3.3 | 1.08
Fit-Hand_WDil | 60.9 | 1.4 | 11.9 | 2.32
Fit-Hand_WL | 47.3 | 1.8 | 12.9 | 3.26
Fit-Hand_2Stack | 51.7 | 1.0 | 6.5 | .82
Fit-Hand_4Stack | 62.0 | 3.4 | 27.1 | 5.07
Fit-Hand_Kul | 61.7 | 1.8 | 12.9 | 2.75
FineFeat_Cat | 57.9 | 1.6 | 13.3 | 2.58
FineFeat_CatSig | 60.1 | 1.6 | 13.3 | 2.66
FineFeat_Avg | 58.6 | 1.5 | 12.9 | 2.63
FineFeat_DpMed | 58.3 | 1.6 | 16.0 | 30.8
Fit-Hand | 65.0 | 1.8 | 12.9 | 4.00

Specifically, to validate the importance of FineFeat module and dilated layer
in Fit-Hand, we have evaluated results for Fit-Hand without FineFeat module
(Fit-Hand$\\_$WImp) and Fit-Hand without dilated layer (Fit-Hand$\\_$WDil).
From the Table II, it is clear that both FineFeat module and dilated layer
play a significant role in Fit-Hand and improve the performance of the
network. To analyze the role of L2 normalization, results are evaluated by
dropping L2 normalization (Fit-Hand$\\_$WL). Evaluated results in Table II,
validated the effect of L2 normalization with high performance.

To investigate that how three stacks of FineFeat modules help to learn the
adequate information in Fit-Hand, we have performed two supplementary
experiments with 2 FineFeat module (2 stacked) and Fit-Hand with 4 FineFeat
module (4 Stacked). From the results tabulated in Table II, it is concluded
that, proposed Fit-Hand outperforms other dept combinations of FineFeat
module. Moreover, to validate the effectiveness of cross-entropy loss
function, we have computed results for Fit-Hand by replacing cross-entropy by
Kullback Leibler Divergence Loss (Fit-Hand$\\_$Kul). Computed results
confirmed that cross-entropy loss function is most suitable for hand gestures
classification in Fit-Hand.

Furthermore, to examine the performance of attention block, we have
implemented four different FineFeat modules by replacing pivot with a)
concatenation (FineFeat$\\_$Cat), b) concatenation with sigmoid
(FineFeat$\\_$CatSig) , c) average (FineFeat$\\_$Avg) and d) deep median
(FineFeat$\\_$DpMed), as shown in Fig. 6. From Table II, it is evident that
proposed FineFeat module with attention block outperforms all other
combinations of the FineFeat module.

TABLE III: Complexity analysis comparison between existing and proposed Fit-Hand network.Here, M, K, MB, KB and S represents millions, thousands, megabytes, kilobytes and seconds, respectively. Method | #Param | #Mem. | #Time (S)
---|---|---|---
IncV3 [11] | 22M | 179.3MB | 17.64
ResNet50 [12] | 31M | 208.4MB | 18.17
DeepGestures [20] | 10K | 128KB | 0.48
ResNetInc [13] | 4M | 40.5MB | 60.93
Dense121 [14] | 7.5M | 61.3MB | 24.34
Mobile [15] | 5M | 36.5MB | 8.26
MobileV2 [16] | 3.5M | 24.4MB | 15.26
NASMob [17] | 4.7M | 41.7MB | 45.65
HandGes [18] | 16K | 252KB | 0.67
DeepConv [19] | 1M | 1.32MB | 1.00
Fit-Hand | 1.8M | 12.9MB | 4.00

###  IV-F Complexity Analysis

This section provides a comparative analysis of the computational complexity
between the existing and proposed network. The total number of parameters,
memory space and testing time involved in each network are tabulated in Table
III. The proposed Fit-Hand has very lesser number of parameters 1.8M as
compared to other state-of-the-art models like: Inception V3: 22M, ResNet50:
31M, ResNetInception: 4M, DenseNet 121: 7.5M, MobileNet: 5M, MobileNet V2:
3.5M and NASNet Mobile: 4.7M. Moreover, Fit-Hand trainable model captures
smaller memory storage as compared to others. Fit-Hand query response time is
also very less as compare to existing approaches. However, from the Table III,
it is also observable that complexity of some existing HGR models
[[19][20][18]] is less as compared to proposed FitHand. However, it is clear
from Table I that, these approaches are not providing generic solution as they
failed to maintain good performance for all datasets. Therefore, on the basis
of experimental and computational complexity results, we conclude that the
proposed FitHand framework is a portable and generic solution for the
different hand gestures.

##  V Conclusion

We proposed an one for all: end-to-end compact solution named as Fit-Hand:
fine grained feature attentive network for HGR, which is responsible to
identify distinct classes of hand gestures. Fit-Hand contains two main blocks:
FineFeat module and dilated Conv layer. FineFeat module conserves features of
minute as well as major edge variation regions and further employ a attention
block that has ability to fetch only pertinent features. Similarly, dilated
layer is incorporated to capture global features. Further, Integrated layer
added feature map of both blocks and enhance the learnability of Fit-Hand.
Cohesively both layers allow Fit-Hand to learn the imperative features of hand
postures and define disparities between them. Furthermore, variants of Fit-
Hand were evaluated to verify the effectiveness of proposed Fit-Hand.

## References

  * [1] H.-Y. Chung, Y.-L. Chung, and W.-F. Tsai, “An efficient hand gesture recognition system based on deep cnn,” in _2019 IEEE International Conference on Industrial Technology (ICIT)_. IEEE, 2019, pp. 853–858.
  * [2] O. K. Oyedotun and A. Khashman, “Deep learning in vision-based static hand gesture recognition,” _Neural Computing and Applications_ , vol. 28, no. 12, pp. 3941–3951, 2017.
  * [3] S.-H. Yang, W.-R. Chen, W.-J. Huang, and Y.-P. Chen, “Ddanet: Dual-path depth-aware attention network for fingerspelling recognition using rgb-d images,” _IEEE Access_ , 2020.
  * [4] A. Rakowski and L. Wandzik, “Hand shape recognition using very deep convolutional neural networks,” in _Proceedings of the 2018 International Conference on Control and Computer Vision_ , 2018, pp. 8–12.
  * [5] D. J. Sturman and D. Zeltzer, “A survey of glove-based input,” _IEEE Computer graphics and Applications_ , vol. 14, no. 1, pp. 30–39, 1994.
  * [6] L. Santos, N. Carbonaro, A. Tognetti, J. L. González, E. De la Fuente, J. C. Fraile, and J. Pérez-Turiel, “Dynamic gesture recognition using a smart glove in hand-assisted laparoscopic surgery,” _Technologies_ , vol. 6, no. 1, p. 8, 2018.
  * [7] J. M. Rehg and T. Kanade, “Visual tracking of high dof articulated structures: an application to human hand tracking,” in _European conference on computer vision_. Springer, 1994, pp. 35–46.
  * [8] T. Heap and D. Hogg, “Towards 3d hand tracking using a deformable model,” in _Proceedings of the Second International Conference on Automatic Face and Gesture Recognition_. Ieee, 1996, pp. 140–145.
  * [9] P. K. Pisharady, P. Vadakkepat, and A. P. Loh, “Attention based detection and recognition of hand postures against complex backgrounds,” _International Journal of Computer Vision_ , vol. 101, no. 3, pp. 403–419, 2013.
  * [10] M. Jasim and M. Hasanuzzaman, “Sign language interpretation using linear discriminant analysis and local binary patterns,” in _2014 International Conference on Informatics, Electronics & Vision (ICIEV)_. IEEE, 2014, pp. 1–5.
  * [11] C. Szegedy, V. Vanhoucke, S. Ioffe, J. Shlens, and Z. Wojna, “Rethinking the inception architecture for computer vision,” in _Proceedings of the IEEE conference on computer vision and pattern recognition_ , 2016, pp. 2818–2826.
  * [12] K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition,” in _Proceedings of the IEEE conference on computer vision and pattern recognition_ , 2016, pp. 770–778.
  * [13] C. Szegedy, S. Ioffe, V. Vanhoucke, and A. Alemi, “Inception-v4, inception-resnet and the impact of residual connections on learning,” _arXiv preprint arXiv:1602.07261_ , 2016.
  * [14] G. Huang, Z. Liu, L. Van Der Maaten, and K. Q. Weinberger, “Densely connected convolutional networks,” in _Proceedings of the IEEE conference on computer vision and pattern recognition_ , 2017, pp. 4700–4708.
  * [15] A. G. Howard, M. Zhu, B. Chen, D. Kalenichenko, W. Wang, T. Weyand, M. Andreetto, and H. Adam, “Mobilenets: Efficient convolutional neural networks for mobile vision applications,” _arXiv preprint arXiv:1704.04861_ , 2017.
  * [16] M. Sandler, A. Howard, M. Zhu, A. Zhmoginov, and L.-C. Chen, “Mobilenetv2: Inverted residuals and linear bottlenecks,” in _Proceedings of the IEEE conference on computer vision and pattern recognition_ , 2018, pp. 4510–4520.
  * [17] B. Zoph, V. Vasudevan, J. Shlens, and Q. V. Le, “Learning transferable architectures for scalable image recognition,” in _Proceedings of the IEEE conference on computer vision and pattern recognition_ , 2018, pp. 8697–8710.
  * [18] F. Zhan, “Hand gesture recognition with convolution neural networks,” in _2019 IEEE 20th International Conference on Information Reuse and Integration for Data Science (IRI)_. IEEE, 2019, pp. 295–298.
  * [19] V. Adithya and R. Rajesh, “A deep convolutional neural network approach for static hand gesture recognition,” _Procedia Computer Science_ , vol. 171, pp. 2353–2361, 2020.
  * [20] A. Mohanty, S. S. Rambhatla, and R. R. Sahay, “Deep gesture: static hand gesture recognition using cnn,” in _Proceedings of International Conference on Computer Vision and Image Processing_. Springer, 2017, pp. 449–461.
  * [21] S. W. Yahaya, A. Lotfi, M. Mahmud, P. Machado, and N. Kubota, “Gesture recognition intermediary robot for abnormality detection in human activities,” in _2019 IEEE Symposium Series on Computational Intelligence (SSCI)_. IEEE, 2019, pp. 1415–1421.
  * [22] C. J. L. Flores, A. G. Cutipa, and R. L. Enciso, “Application of convolutional neural networks for static hand gestures recognition under different invariant features,” in _2017 IEEE XXIV International Conference on Electronics, Electrical Engineering and Computing (INTERCON)_. IEEE, 2017, pp. 1–4.
  * [23] Y. LeCun _et al._ , “Lenet-5, convolutional neural networks,” _URL: http://yann. lecun. com/exdb/lenet_ , vol. 20, no. 5, p. 14, 2015.
  * [24] S. F. Chevtchenko, R. F. Vale, V. Macario, and F. R. Cordeiro, “A convolutional neural network with feature fusion for real-time hand posture recognition,” _Applied Soft Computing_ , vol. 73, pp. 748–766, 2018.
  * [25] A. Dadashzadeh, A. T. Targhi, M. Tahmasbi, and M. Mirmehdi, “Hgr-net: a fusion network for hand gesture segmentation and recognition,” _IET Computer Vision_ , vol. 13, no. 8, pp. 700–707, 2019.
  * [26] X. Nie, J. Feng, and S. Yan, “Mutual learning to adapt for joint human parsing and pose estimation,” in _Proceedings of the European Conference on Computer Vision (ECCV)_ , 2018, pp. 502–517.
  * [27] K. Du, X. Lin, Y. Sun, and X. Ma, “Crossinfonet: Multi-task information sharing based hand pose estimation,” in _Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition_ , 2019, pp. 9896–9905.
  * [28] P. Neethu, R. Suguna, and D. Sathish, “An efficient method for human hand gesture detection and recognition using deep learning convolutional neural networks,” _Soft Computing_ , pp. 1–10, 2020.
  * [29] M. Z. Islam, M. S. Hossain, R. ul Islam, and K. Andersson, “Static hand gesture recognition using convolutional neural network with data augmentation,” in _2019 Joint 8th International Conference on Informatics, Electronics & Vision (ICIEV) and 2019 3rd International Conference on Imaging, Vision & Pattern Recognition (icIVPR)_. IEEE, 2019, pp. 324–329.
  * [30] U. Côté-Allard, C. L. Fall, A. Drouin, A. Campeau-Lecours, C. Gosselin, K. Glette, F. Laviolette, and B. Gosselin, “Deep learning for electromyographic hand gesture signal classification using transfer learning,” _IEEE Transactions on Neural Systems and Rehabilitation Engineering_ , vol. 27, no. 4, pp. 760–771, 2019.
  * [31] U. Cote-Allard, C. L. Fall, A. Campeau-Lecours, C. Gosselin, F. Laviolette, and B. Gosselin, “Transfer learning for semg hand gestures recognition using convolutional neural networks,” in _2017 IEEE International Conference on Systems, Man, and Cybernetics (SMC)_. IEEE, 2017, pp. 1663–1668.
  * [32] H.-I. Lin, M.-H. Hsu, and W.-K. Chen, “Human hand gesture recognition using a convolution neural network,” in _2014 IEEE International Conference on Automation Science and Engineering (CASE)_. IEEE, 2014, pp. 1038–1043.
  * [33] B. Liao, J. Li, Z. Ju, and G. Ouyang, “Hand gesture recognition with generalized hough transform and dc-cnn using realsense,” in _2018 Eighth International Conference on Information Science and Technology (ICIST)_. IEEE, 2018, pp. 84–90.
  * [34] F. Yu and V. Koltun, “Multi-scale context aggregation by dilated convolutions,” _arXiv preprint arXiv:1511.07122_ , 2015.
  * [35] K. Simonyan and A. Zisserman, “Very deep convolutional networks for large-scale image recognition,” _arXiv preprint arXiv:1409.1556_ , 2014.
  * [36] A. Schindler, T. Lidy, and A. Rauber, “Comparing shallow versus deep neural network architectures for automatic music genre classification.” in _FMT_ , 2016, pp. 17–21.
  * [37] M. Verma, S. K. Vipparthi, G. Singh, and S. Murala, “Learnet: Dynamic imaging network for micro expression recognition,” _IEEE Transactions on Image Processing_ , vol. 29, pp. 1618–1627, 2019.
  * [38] M. Verma, S. K. Vipparthi, and G. Singh, “Hinet: Hybrid inherited feature learning network for facial expression recognition,” _IEEE Letters of the Computer Society_ , vol. 2, no. 4, pp. 36–39, 2019.
  * [39] A. Barczak, N. Reyes, M. Abastillas, A. Piccio, and T. Susnjak, “A new 2d static hand gesture colour image dataset for asl gestures,” 2011.
  * [40] N. Pugeault and R. Bowden, “Spelling it out: Real-time asl fingerspelling recognition,” in _2011 IEEE International conference on computer vision workshops (ICCV workshops)_. IEEE, 2011, pp. 1114–1119.
  * [41] M. Matilainen, P. Sangi, J. Holappa, and O. Silvén, “Ouhands database for hand detection and pose recognition,” in _2016 Sixth International Conference on Image Processing Theory, Tools and Applications (IPTA)_. IEEE, 2016, pp. 1–5.