[b,c,1]Giuseppe Clemente 11footnotetext: c is the current speaker affiliation

# Coupling Yang–Mills with Causal Dynamical Triangulations

Alessandro Candido  Massimo D’Elia  Federico Rottoli

###### Abstract

We discuss the algorithmic problem of minimal coupling gauge fields of the
Yang–Mills type to Quantum Gravity in the approach known as Causal Dynamical
Triangulations (CDT) as a step towards studying, ultimately, systems of
gravity coupled with bosonic and fermionic matter. We first describe the
algorithm for general dimensions and gauge groups and then focus on the
results obtained from simulations of 2d CDT coupled to gauge fields with U(1)
and SU(2) gauge groups, where we studied both observables related to gravity
and gauge fields, and compared them with analogous simulations in the static
flat case.

##  1 Introduction

The asymptotic safety scenario, envisioned by Weinberg in the seventies [1],
is one of the possible solutions to the problem of building a self-consistent
Quantum Theory of gravity. Grounded upon the Wilsonian approach to the
renormalization group, its key idea provides the possibility to renormalize a
theory around a non-perturbative (non-Gaussian) UV fixed point in the space of
parameters. This scenario cannot be explored using standard perturbative
techniques, which fail for gravity [2], but must be investigated using non-
perturbative techniques as functional renormalization group [3] or path
integral Monte Carlo methods. Our following discussion is specialized to the
latter class, in particular to the approach known as Causal Dynamical
Triangulations (CDT) [4, 5, 6, 7], where the path integral is a sum over
spacetime geometries approximated by simplicial manifolds in the so-called
Regge formalism [8]. What distinguishes CDT from the earlier Euclidean
Dynamical Triangulations approach is the presence of an additional condition
of global hyperbolicity by means of a space-time foliation [9], condition that
allows to consistently perform a Wick rotation from the Lorentzian to the
Euclidean signature and that seems crucial for the appearance of second-order
lines in the phase diagram [10, 11, 12, 13, 14, 15, 16, 17].

Beside pure-gauge gravity, it is worthwhile to investigate also the coupling
of matter and gauge fields to CDT for at least two reasons: on one hand, it
will provide a dictionary for matching numerical results with quantum
cosmological phenomenology, on the other hand, investigating the existence and
stability of the UV non-trivial fixed point under different combinations of
matter and gauge fields is crucial to characterize all possible theories in
the continuum.

In this proceeding, we briefly review the results obtained in [18], where we
discuss the coupling of either Abelian or non-Abelian gauge theories to CDT
and show numerical results for the gauge groups $U(1)$ and $SU(2)$. In Section
2 we describe the discretization of the action adopted; some details about the
algorithmic implementation of the Monte Carlo simulation are discussed in
Section 3, while in Section 4 we present some numerical results. Finally, in
Section 5 we discuss the results and future developments.

##  2 Minimal coupling of Yang-Mills theories to CDT

First of all, we briefly recall the continuum Yang-Mills action on a flat
(Euclidean) space

$S_{\text{YM}}=\frac{1}{4}\bigintssss\limits_{\mathcal{M}}\\!d^{d}x\;F^{a}_{\mu\nu}F^{a\mu\nu},$
(1)

where
$F^{a}_{\mu\nu}=\partial_{\mu}A^{a}_{\nu}-\partial_{\nu}A^{a}_{\mu}+gf^{abc}A^{b}_{\mu}A^{c}_{\nu}$,
and $A_{\mu}=A^{a}_{\mu}T^{a}$, with $T^{a}$ the generators of the Lie
algebra. The lattice discretization usually adopted for the theory in (1)
consists of associating gauge link variables $U_{\mu}(n)$, with values in the
gauge group $G$, to each edge $({\bf n},{\bf n}+\hat{\mu})$ of a flat
hypercubic lattice; these can be interpreted as elementary parallel
transporters linking adjacent sites. There is some freedom also in the choice
of a specific discretization for the action, the simplest one being the so-
called _plaquette_ (or Wilson) action:

$S_{\text{YM}}\equiv-\frac{2N}{g^{2}}\sum\limits_{\Box}\Big{[}\frac{1}{N}ReTr\Pi_{\Box}-1\Big{]}\,,$
(2)

where the sum extends over all possible plaquettes $\Box$ and $\Pi_{\Box}$ is
the oriented product of link variables around $\Box$; for the $U(1)$ gauge
theory, the factor $2N/g^{2}$ is replaced by $1/g^{2}$.

In order to minimally couple the Yang-Mills theory to gravity, it is important
to notice that the space of possible configurations for the composite system
is not a simple product space, because the space of gauge field configurations
depends on the underlying manifold on which it is defined. For a fixed
manifold $\mathcal{M}$, we abstractly denote by
$\mathcal{C}_{G}\big{(}\mathcal{M}\big{)}$ the space of all possible gauge
field configurations on $\mathcal{M}$. In terms of (causal) simplicial
manifolds $\mathcal{T}$ and gauge configurations
$\Phi\in\mathcal{C}_{G}\big{(}\mathcal{T}\big{)}$, we can then formally
express the Euclidean action for the composite gravity-gauge system as
$S[\mathcal{T},\Phi]=S_{CDT}[\mathcal{T}]+S_{\text{YM}}[\mathcal{T};\Phi]$,
where $S_{CDT}$ is the pure-gravitational part of the action, while
$S_{\text{YM}}$ represents the minimally coupled action of the field $\Phi$ in
the backgroud $\mathcal{T}$. For the gravitational part, the discretization
adopted in CDT is usually the Wick-rotated Regge action derived from the
continuum Einstein-Hilbert action $S_{EH}=\frac{1}{16\pi
G}\int\\!d^{d}x\sqrt{-\det(g_{\mu\nu})}(R-2\Lambda)$, where $\Lambda$ and $G$
are the cosmological and Newton constants respectively and $R$ is the scalar
curvature. Regarding the gauge fields, as in the flat case, different
discretization choices are possible; we opted for an analogue of the plaquette
action (2) with link variables associated to the edges of the graphs _dual_ to
triangulations (an example in the 2D case is shown in Figure 1).

Figure 1: Sketch of a plaquette on a section of a typical 2D CDT triangulation
with vertices (red dots) causally organized in “foliae” with Euclidean time
increasing vertically. For simplicity, we have considered a plaquette around a
vertex with zero curvature, i.e., $n_{b}=6$, but, in principle, any number of
links from $4$ to $\infty$ is allowed. Even if drawn differently, due to the
representation on a plane, all triangles in this and the following figures
should be considered equilateral. Taken from [18].

For any dimension $d$, the form of the plaquette action over a triangulation
$\mathcal{T}$ can be written as follows

$S_{\text{YM}}[\mathcal{T};\Phi]\equiv-\beta\\!\\!\\!\\!\sum\limits_{b\in\mathcal{T}^{(d-2)}}\\!\\!\frac{1}{n_{b}}\Big{[}\frac{1}{N}ReTr\Pi_{b}-1\Big{]},$
(3)

where the sum is over all $(d-2)$-simplexes of the triangulation
$\mathcal{T}^{(d-2)}$, $\Pi_{b}$ is the oriented product of link variables
around $b$ (i.e., the plaquette) and $n_{b}$ is the plaquette length, which,
in turn, is proportional to the area inside the plaquette. Notice that $\beta$
is proportional to $1/g^{2}$ with a non-universal factor depending on the
discretization and it would in general differ even in the flat case for
square, hexagonal or kagome lattices. More details on the choice of the dual
lattice instead of the direct one, and about the presence of the weight
$\frac{1}{n_{b}}$, can be found in the original paper [18].

##  3 Outline of the algorithm in 2D

While the expression stated above are valid in any dimension, here we briefly
describe the algorithmic setup by specializing the discussion to the 2D case.

The path-integral over configurations of the composite system can be computed
by a Monte Carlo sampling of the discretized distributions
$\exp(-S_{\text{CDT}}^{(\text{2D})}-S_{\text{YM}})$, where the Yang-Mills
action takes the form in eq. (3), while the CDT action in two dimensions is
simply [5]

$S_{\text{CDT}}^{(\text{2D})}[\mathcal{T}]=\lambda N_{2}[\mathcal{T}],$ (4)

where $N_{2}[\mathcal{T}]$ is the number of triangles in the triangulation
$\mathcal{T}$ (i.e., the total volume), and $\lambda$ is the only free
parameter, which is related to the cosmological constant.

In pure gravity CDT, simulations proceed by Metropolis–Hastings steps [19, 20]
which locally change the triangulations by keeping the causal structure
intact: the set of causal ergodic moves usually adopted in CDT are called
_Alexander moves_ [21, 22]. In two dimensions, these moves are the flip of a
time-like link, denoted by $(2,2)$, and the creation (or destruction) of a
vertex, denoted $(2,4)$ and $(4,2)$, where the notation follows the number of
triangles involved before and after the move; these are depicted in figures 2
and 3 for the underlying triangulation (red dots and grey lines). In the
composite gravity-gauge case, any change in the geometry
$\mathcal{T}\to\mathcal{T}^{\prime}$ would also affect also the space of gauge
configurations, in such a way that we need to define a map
$\mathcal{C}_{G}\big{(}\mathcal{T}\big{)}\to\mathcal{C}_{G}\big{(}\mathcal{T}^{\prime}\big{)}$
between spaces of possibly different numbers of dimensions. For example, in
the $(2,4)$ move (or its inverse), shown in figure 3, a plaquette is created
(or destroyed), and this fact reflects non-trivially on the detailed balance
condition. Also the $(2,2)$ move, depicted in figure 2, contributes with a
non-zero action variation because the $\frac{1}{n_{b}}$ term in equation (3)
changes for all of the four plaquettes involved.

Of course, for moves changing the triangulation, the map
$\mathcal{C}_{G}\big{(}\mathcal{T}\big{)}\to\mathcal{C}_{G}\big{(}\mathcal{T}^{\prime}\big{)}$
can be chosen arbitrarily, but, for performance reasons, it is useful to keep
the acceptance rate high enough by making only minimal local changes to the
gauge fields. Another tool, that proves to be quite useful in the detailed
balance analysis, is the freedom to gauge transform configurations within the
same gauge orbit: this way, it is possible to _gauge fix_ some link variables
to the group identity, greatly simplifying the expressions involved, as shown
in figures 2 and 3.

Finally, one has also to guarantee ergodicity within the space of gauge field
configurations $\mathcal{C}_{G}\big{(}\mathcal{T}\big{)}$ on a fixed
triangulation $\mathcal{T}$. This can be done in analogy to standard
Yang–Mills simulations, where one changes just the value of a link variable
usually via heat-bath sampling as in figure 4, recalling that staples can have
an arbitrary length in this case.

More details on the detailed balance analysis and the sampling strategy can be
found in the appendix of [18].

Figure 2: Sketch of a $(2,2)$ move. The edge dual to the flipped link is gauge
fixed to the identity. Notice that, even if the plaquettes involved
$\Pi_{1\leq i\leq 4}$ keep the same value after the move, their contribution
to the action does change because the coordination numbers of all the four
involved vertices change. Taken from [18]. Figure 3: Sketch of a $(2,4)$ move
and its inverse. The link variable $U^{\prime}$ (in blue) is the newly
extracted one. Taken from [18]. Figure 4: Sketch of a typical gauge move. The
initial and final state change only in the value of the link variable
associated to the edge $l$ (in blue) of the graph dual to the triangulation.
The staples $X^{(l)}_{b_{1}}$ and $X^{(l)}_{b_{2}}$ are built as product of
link variables oriented as indicated by the arrows (the orange paths). Taken
from [18].

##  4 Numerical Results

In this Section we report some of the numerical results obtained in [18] for
$U(1)$ and $SU(2)$ gauge theories minimally coupled to CDT in 2 dimensions.

Before showing the results, we briefly mention the parameters involved in the
discretization and the numerical setup: on the gravity side the bare coupling
$\lambda$ acts as a cosmological parameter in front of the total volume, since
the path-integral is weighted by $\exp(-\lambda V)$; in this respect,
$\lambda$ can be interpreted as a chemical potential coupled to the total
volume $V$: lowering its value results in an increase of the average volume
$\langle V\rangle$, up to a certain critical value $\lambda_{c}$ below which
the average volume is diverging. For two dimensional CDT, this treshold has
been computed exactly by analytical means and has the value
$\lambda_{c}^{(0)}=\log(2)\simeq 0.693147$ (see Refs. [23, 24, 5]). In
general, close to the critical point, we expect not only the average volume,
but also other observables to present a critical behavior which can be fitted
to a power law scaling of the form:

$f(\lambda)=\frac{A}{{(\lambda-\lambda_{c})}^{\alpha}},$ (5)

where $\alpha$ is the critical index associated to the observable. Another
parameter is the number of time slices $N_{t}$, which is fixed and constant
throughout the simulation (since it is kept unchanged by Alexander moves); we
fixed it in such a way that one could neglect finite size effects, which could
be assessed by measuring the two point correlations functions in the time
direction for either gravity or gauge related observables (these will be
introduced in the subsections). Furthermore, for simplicity, we chose the
topology of triangulations to be periodic in both the time and space
directions222Notice that Alexander moves also do not change the topology,
which is then constant during the entire simulation.. On the gauge field side,
the only parameter is inverse gauge coupling $\beta\propto 1/g^{2}$, defined
in eq. (3), so that for the composite gravity-gauge theory one expects in
general some dependence on $\beta$ of the critical value
$\lambda_{c}=\lambda_{c}(\beta)$, below which the average volume diverges.

###  4.1 Gravity related observables

To characterize the gravity part of the system, we have considered two
observables: the total volume of the triangulation $V\equiv N_{2}$ (i.e., the
total number of triangles) and the volume profiles, i.e., the number of
spatial links (spatial edges of the triangles) $V(t)\equiv N_{1s}(t)$ in each
slice, where $t$ labels the slice time333Actually, the total volume can be
computed from the volume profile due to simplicial constraints in 2D, so it
doesn’t carry new information with respect to the second one.. From the volume
profiles one can derive its associated two-point correlation function, defined
as

$C_{\text{Vprof.}}(\Delta t)\equiv\frac{\langle V(t)V(t+\Delta
t)\rangle-\langle V(t)\rangle\langle V(t+\Delta t)\rangle}{\langle
V(t)^{2}\rangle-\langle V(t)\rangle^{2}},$ (6)

which, at least for $\Delta t\ll N_{t}$, is expected to decay exponentially as
$\exp{\big{(}-\frac{\Delta t}{\xi_{\text{Vprof}}}\big{)}}$, where
$\xi_{\text{Vprof}}$ denotes the correlation length of volume profiles.

For $\beta=0$, the Yang-Mills part of the action does not contribute at all,
so the results for gravitational observables are expected to follow exactly
the same behavior as in the case without gauge fields,
$\lambda_{c}(0)=\log(2)$. For $\beta>0$, there is some effect of gauge fields
on the gravity side; for example, a fit of the correlation length of volume
profiles $\xi_{\text{Vprof}}$ to a shifted power-law behavior (eq. (5)) from
simulations with gauge group $U(1)$ at $\beta=1$ gives the estimate
$\lambda_{c}^{(G)}=0.6064(2),\ \nu=0.53(3)$ ($\chi^{2}/{\rm dof}=8.6/13$).

Figure 5: Critical points for the $U(1)$ and $SU(2)$ gauge theories minimally
coupled to two-dimensional CDT as a function of $\beta$. Taken from [18].

Notice that the critical value is shifted a slightly below the value of the
pure gravity theory $\lambda_{c}(0)=\log 2$: this is observed for a wide range
of $\beta$ considered, as shown in figure 5, where we report the quantity
$\log 2-\lambda_{c}^{(G)}(\beta)$ for the two gauge groups $G=U(1)$ and
$G=SU(2)$. Furthermore, for $\beta\lesssim 1$, the data follows quite well the
scaling $\lambda_{c}^{(G)}(\beta)=\log(2)-\beta/12$, which can be expected
from a strong coupling argument (see [18]).

Figure 6: Critical index $\nu$ for the correlation length of volume profiles
$\xi_{\text{Vprof.}}$ (see eq. (5)), plotted as a function of the bare gauge
coupling $\beta$. The horizontal bands represent the results of a fit to
constant values discussed in the text. Taken from [18].

Regarding the critical index $\nu$ (associated to $\xi_{\text{Vprof}}$),
figure 6 shows its value for both groups considered and for a wide range of
the gauge parameter $\beta$: it is interesting that $\nu$ appears to be
independent of $\beta$ in the whole range, suggesting that the only effects of
the gauge fields on gravity observables consist in a shift of $\lambda_{c}$,
which, being not observable, can be interpreted just as a reparametrization of
the bare cosmological parameter. On the basis of the apparent stability
observed, we have performed a fit of all determinations to a constant value,
obtaining $\nu=0.496(7)$ ($\chi^{2}/\textrm{dof}=9.1/9$), which is compatible
with the value expected in the pure gravity case ($\nu=\frac{1}{2}$) (see [23,
24, 5, 25]).

###  4.2 Gauge observables

Figure 7: Comparison of topological charge histories at $\beta=60$ and $70$
for the static (flat) and dynamic simulations at average volume $N_{2}=800$
and with $N_{t}=20$ slices. Taken from [18].

An interesting observable for the gauge part of geometries with toroidal
topology is the topological charge, which acts as a winding number for the
gauge field and is integer-valued only for the $U(1)$ gauge group. On a 2D
lattice, this can be discretized as

$Q\equiv\frac{1}{2\pi}\sum_{b\in\mathcal{T}^{(0)}}\arg[Tr(\Pi_{b})],$ (7)

where $\Pi_{b}$ is the plaquette around the vertex $b$, and the argument
function $\arg z$ has image in the interval $(-\pi,\pi]$. From the
distribution of the topological charge, one can derive its cumulants, which
are related to the expansion of the free energy density $f$ of the gauge
theory in powers of the topological parameter $\theta$. In particular the
topological susceptibility, $\chi\equiv\langle Q^{2}\rangle/V$, fixes the
leading order quadratic dependence,
$f(\theta)=\chi\theta^{2}/2+O(\theta^{4})$.

A typical behavior of the topological charge for two values of $\beta$ ($60$
and $70$) is shown in Figure 7, where we also compare it with an analogous
simulation on an static flat hexagonal444We choose the hexagonal lattice
because it maps exactly to the graph dual to triangulated torus without
twists. lattice with the same total volume, where the infamous _topological
freezing_ [26, 27, 28, 29] at large $\beta$s is quite evident.

Figure 8: Comparison in topological susceptibilities for the static (flat) and
dynamic simulations at average volume $N_{2}=800$ and $N_{t}=20$ slices. Taken
from [18].

This mitigation to the topological freezing in the curved dynamical case,
allows us to obtain an accurate estimation of the susceptibility even at
values of $\beta$ difficult to reach in the static flat case, as shown in
figure 8; here, one can observe a slight difference between the case with and
without gravity, suggesting the presence of some physical effect of gravity on
the gauge fields. Furthermore, it is also possible to extrapolate (fitting at
$\beta>30$) the value of the susceptibility at $\beta\to\infty$, which turns
out to be $\beta\chi_{Q}=0.0758(14)$ with a reduced chi-squared
$\chi^{2}/\textrm{dof}=1.6/3$: this appears to be in agreement with the
analytical prediction for the flat continuum theory [30], which, taking into
account the additional factor 6 in our definition of $\beta$, is
$\beta\chi_{Q}=3/(4\pi^{2})$. However, the limit $\beta\to\infty$ is naiv̈e
and not sufficient in the investigation of the continuum limit of the
composite theory, which depends also on the $\lambda$ parameter. As briefly
mentioned in the conclusions, for a consistent continuum limit analysis, one
should introduce another independent scale besides the correlation length of
volume profiles. To this extent, we also considered the connected two point
correlation functions of torelonic profiles, defined as:

$C_{\text{tor}}(\Delta t)\equiv\frac{\langle Tr\Pi(t)Tr\Pi^{\dagger}(t+\Delta
t)\rangle-|\langle Tr\Pi(t)\rangle|^{2}}{\langle|Tr\Pi(t)|^{2}\rangle-|\langle
Tr\Pi(t)\rangle|^{2}}\,,$ (8)

from which one can extract as before the corresponding correlation length
$\xi_{\text{tor.}}$.

##  5 Discussion and Conclusions

We discussed the numerical implementation of compact gauge fields minimally
coupled to CDT as link variables attached to edges of the graphs dual to
triangulations. In our numerical analysis, we first studied gravity related
observables, namely the total volume and the volume profiles; while the
critical value of the bare cosmological coupling $\lambda$ is
$\lambda_{c}=\log(2)$ in the pure gravity case, the value of
$\lambda_{c}(\beta)$ found for the system coupled to gauge fields with a
finite bare gauge coupling $\beta$ seems to be shifted below $\log(2)$, and,
for small $\beta$, it follows quite well a strong coupling estimate. In
particular, the critical index $\nu$ associated with the correlation length of
volume profiles is found to be independent of $\beta$ within errors, and a fit
to a constant function gives the estimate $\nu=0.496(7)$, i.e. $\nu$ is
compatible with the analytical prediction obtained in the pure gravity theory.
These observations suggest that, besides an unobservable shift in its bare
parameter, gravity is not influenced by gauge fields; this could signal that
gauge fields may be actually integrated away in this case as it happens also
in other two dimensional contexts (see, e.g., the discussion in Refs. [31, 32,
33, 30]).

On the other hand, the gauge fields dynamics seems to be affected by the
coupling with gravity in a less trivial way. In the case of the $U(1)$ gauge
group in 2D, we can study the dependence of the free energy on the topological
parameter $\theta$ via measurements of the integer valued topological charge.
For generic gauge groups, an interesting quantity to measure is the torelon
correlator and its associated correlation length in slice time, which is
physically independent from the correlation length of volume profiles and
could therefore be used as a distinct length scale in the analysis of the
continuum limit.

Indeed, as future developments to this exploratory study, we plan to
investigate, in the region of the $\lambda-\beta$ plane close to the critical
line, the so-called curves of constant physics, along which the ratio between
the two types of correlation lengths is fixed to a value that, in principle,
could identify different physical theories in the continuum limit. Moreover,
in the future we also plan to consider higher dimensions and coupling
fermionic variables, both of which pose some algorithmic challenges.

## Acknowledgments

We thank Claudio Bonati, Paolo Rossi and Francesco Sanfilippo for useful
discussions. Numerical simulations have been performed on the MARCONI machine
at CINECA, based on the agreement between INFN and CINECA (under projects
INF19_npqcd and INF20_npqcd), and at the IT Center of the Pisa University.

## References

  * [1] S. Weinberg, _General Relativity, an Einstein Centenary Survey_ , ch.16 Cambridge Univ. Press (1979).
  * [2] M. H. Goroff and A. Sagnotti, Phys. Lett. B 160, 81-86 (1985)
  * [3] M. Reuter and F. Saueressig, New J. Phys. 14, 055022 (2012)
  * [4] J. Ambjorn, J. Jurkiewicz and R. Loll, _A Nonperturbative Lorentzian path integral for gravity_ , _Phys. Rev. Lett._ 85 (2000) 924 [arXiv:hep-th/0002050 [hep-th]].
  * [5] J. Ambjorn, A. Goerlich, J. Jurkiewicz and R. Loll, _Nonperturbative Quantum Gravity_ , _Phys. Rept._ 519 (2012) 127 [arXiv:1203.3591 [hep-th]].
  * [6] R. Loll, _Quantum Gravity from Causal Dynamical Triangulations: A Review_ , _Class. Quant. Grav._ 37 (2020) 013002 [arXiv:1905.08669 [hep-th]].
  * [7] J. Ambjorn, J. Jurkiewicz and R. Loll, _Dynamically triangulating Lorentzian quantum gravity_ , _Nucl. Phys. B_ 610 (2001) 347 [arXiv:hep-th/0105267 [hep-th]].
  * [8] T. Regge, _General Relativity Without Coordinates_ , _Nuovo Cim._ 19 (1961) 558.
  * [9] E. Minguzzi and M. Sanchez, _The Causal hierarchy of spacetimes_ , [arXiv:gr-qc/0609119 [gr-qc]].
  * [10] J. Ambjorn, S. Jordan, J. Jurkiewicz and R. Loll, _A Second-order phase transition in CDT_ , _Phys. Rev. Lett._ 107 (2011) 211303 [arXiv:1108.3932 [hep-th]].
  * [11] J. Ambjorn, S. Jordan, J. Jurkiewicz and R. Loll, _Second- and First-Order Phase Transitions in CDT_ , _Phys. Rev. D_ 85 (2012) 124044 [arXiv:1205.1229 [hep-th]].
  * [12] J. Ambjørn, J. Gizbert-Studnicki, A. Görlich, J. Jurkiewicz, N. Klitgaard and R. Loll, _Characteristics of the new phase in CDT_ , _Eur. Phys. J. C_ 77 (2017) 152 [arXiv:1610.05245 [hep-th]].
  * [13] J. Ambjorn, D. Coumbe, J. Gizbert-Studnicki, A. Gorlich and J. Jurkiewicz, _New higher-order transition in causal dynamical triangulations_ , _Phys. Rev. D_ 95 (2017) 124029 [arXiv:1704.04373 [hep-lat]].
  * [14] J. Ambjørn, J. Gizbert-Studnicki, A. Görlich, K. Grosvenor and J. Jurkiewicz, _Four-dimensional CDT with toroidal topology_ , _Nucl. Phys. B_ 922 (2017) 226 [arXiv:1705.07653 [hep-th]].
  * [15] J. Ambjørn, J. Gizbert-Studnicki, A. Görlich, J. Jurkiewicz and D. Németh, _The phase structure of Causal Dynamical Triangulations with toroidal spatial topology_ , _JHEP_ 06 (2018) 111 [arXiv:1802.10434 [hep-th]].
  * [16] G. Clemente and M. D’Elia, _Spectrum of the Laplace-Beltrami operator and the phase structure of causal dynamical triangulations_ , _Phys. Rev. D_ 97 (2018) 124022 [arXiv:1804.02294 [hep-th]].
  * [17] G. Clemente, M. D’Elia and A. Ferraro, _Running scales in causal dynamical triangulations_ , _Phys. Rev. D_ 99 (2019) 114506 [arXiv:1903.00430 [hep-th]].
  * [18] A. Candido, G. Clemente, M. D’Elia and F. Rottoli, JHEP 04, 184 (2021) [arXiv:2010.15714 [hep-lat]].
  * [19] N. Metropolis, A. W. Rosenbluth, M. N. Rosenbluth, A. H. Teller and E. Teller, _Equation of state calculations by fast computing machines_ , _J. Chem. Phys._ 21 (1953) 1087
  * [20] W. K. Hastings, _Monte Carlo Sampling Methods Using Markov Chains and Their Applications_ , _Biometrika_ 57 (1970) 97
  * [21] J.W. Alexander, _The combinatorial theory of complexes_ , _Ann. Mat._ 31 (1931) 292.
  * [22] J. Ambjørn, J. Jurkiewicz and R. Loll, _Lorentzian and Euclidean Quantum Gravity — Analytical and Numerical Results_ , _NATO Sci. Ser. C_ 556 (2000) 381 [arXiv:hep-th/0001124 [hep-th]].
  * [23] J. Ambjorn and R. Loll, _Nonperturbative Lorentzian quantum gravity, causality and topology change_ , _Nucl. Phys. B_ 536 (1998) 407 [arXiv:hep-th/9805108 [hep-th]].
  * [24] J. Ambjorn, R. Loll, J. L. Nielsen and J. Rolf, _Euclidean and Lorentzian quantum gravity: Lessons from two-dimensions_ , _Chaos Solitons Fractals_ 10 (1999) 177 [arXiv:hep-th/9806241 [hep-th]].
  * [25] S. Zohren, [arXiv:hep-th/0609177 [hep-th]].
  * [26] B. Alles, G. Boyd, M. D’Elia, A. Di Giacomo and E. Vicari, _Hybrid Monte Carlo and topological modes of full QCD_ , _Phys. Lett. B_ 389 (1996) 107 [arXiv:hep-lat/9607049 [hep-lat]].
  * [27] L. Del Debbio, G. M. Manca and E. Vicari, _Critical slowing down of topological modes_ , _Phys. Lett. B_ 594 (2004) 315 [arXiv:hep-lat/0403001 [hep-lat]].
  * [28] M. Luscher and S. Schaefer, _Lattice QCD without topology barriers_ , _JHEP_ 07 (2011) 036 [arXiv:1105.4749 [hep-lat]].
  * [29] C. Bonati and M. D’Elia, _Topological critical slowing down: variations on a toy model_ , _Phys. Rev. E_ 98 (2018) 013308 [arXiv:1709.10034 [hep-lat]].
  * [30] C. Bonati and P. Rossi, _Topological susceptibility of two-dimensional $U(N)$ gauge theories_, _Phys. Rev. D_ 99 (2019) 054503 [arXiv:1901.09830 [hep-lat]].
  * [31] J. Ambjorn and A. Ipsen, _Phys.Rev.D_ 88 (2013) 6 [arXiv:1305.3148 [hep-th]].
  * [32] J. Ambjorn, K. N. Anagnostopoulos and J. Jurkiewicz, _Abelian gauge fields coupled to simplicial quantum gravity_ , _JHEP_ 08 (1999) 016 [arXiv:hep-lat/9907027 [hep-lat]].
  * [33] C. Cao, M. van Caspel and A. R. Zhitnitsky, _Topological Casimir effect in Maxwell Electrodynamics on a Compact Manifold_ , _Phys. Rev. D_ 87 (2013) 105012 [arXiv:1301.1706 [hep-th]].


# Applying Spatiotemporal Attention to Identify Distracted and Drowsy Driving
with Vision Transformers

Samay Lakhani
Jericho High School
99 Cedar Swamp Rd, Jericho, NY 11753
<EMAIL_ADDRESS>
###### Abstract

A 20% rise in car crashes in 2021 compared to 2020 has been observed as a
result of increased distraction and drowsiness. Drowsy and distracted driving
are the cause of 45% of all car crashes. As a means to decrease drowsy and
distracted driving, detection methods using computer vision can be designed to
be low-cost, accurate, and minimally invasive. This work investigated the use
of the vision transformer to outperform state-of-the-art accuracy from
3D-CNNs. Two separate transformers were trained for drowsiness and
distractedness. The drowsy video transformer model was trained on the National
Tsing-Hua University Drowsy Driving Dataset (NTHU-DDD) with a Video Swin
Transformer model for 10 epochs on two classes - drowsy and non-drowsy
simulated over 10.5 hours. The distracted video transformer was trained on the
Driver Monitoring Dataset (DMD) with Video Swin Transformer for 50 epochs over
9 distraction-related classes. The accuracy of the drowsiness model reached
44% and a high loss value on the test set, indicating overfitting and poor
model performance. Overfitting indicates limited training data and applied
model architecture lacked quantifiable parameters to learn. The distracted
model outperformed state-of-the-art models on DMD reaching 97.5%, indicating
that with sufficient data and a strong architecture, transformers are suitable
for unfit driving detection. Future research should use newer and stronger
models such as TokenLearner to achieve higher accuracy and efficiency, merge
existing datasets to expand to detecting drunk driving and road rage to create
a comprehensive solution to prevent traffic crashes, and deploying a
functioning prototype to revolutionize the automotive safety industry.

##  1 Introduction

In 2021, there was a 20% increase in traffic crashes compared to 2020[1].
Following the onset of the COVID-19 pandemic, the lines between work, school,
and home have been blurred. Increased reliance on electronic systems for
communications has created a heavy impact on driving crashes and fatalities.

Possible solutions to detecting unfit driving have been implemented including
applying EEGs, alcohol monitors, and lane detection systems. However, these
are either invasive, expensive, or not scalable to detect all kinds of unfit
driving, or some combination of the three[13, 9, 15]. For example, an alcohol
monitor cannot identify if the driver is drowsy. Another solution that has
gained popularity is computer vision, which is increasingly used by car
manufacturers such as Toyota, Subaru, and Tesla [18].

Computer vision involves monitoring the driver’s movements and analyzing the
vision data with machine learning. The two main approaches can be categorized
into explicit and implicit methods that monitor specific human features like
PERCLOS, EAR, and human pose tracking [8, 23, 5].

Since all the features are hand-engineered, implicit methods reach high
accuracy, but lack scalability to more than one category of unfit driving
(i.e. drowsy or distracted driving). Implicit methods involve 3D CNNs and
video classifiers. Video classifiers implicitly learn the features involved
with each category of unfit driving. This method can scale to several
categories (i.e. drowsy and distracted), but investigations due to a lack of
data that spans several categories. Implicit methods lack accuracy compared to
explicit methods[21]. Since each method exclusively is scalable or accurate,
there are no comprehensive solutions to solving unfit driving yet. A new
architecture, the vision transformer, may serve as a solution.

$Attention(Q,K,V)=softmax(\frac{QK^{T}}{\sqrt{d_{k}}})V$ (1)

Introduced in 2017, the transformer mechanism is revolutionizing natural
language processing and computer vision [19]. Transformers rely on
“attention,” (Equation 1) a mechanism for assigning different importance to
segments of the input data. In other words, it “pays attention” to the most
important part of the data. The transformer relies on the Query ($Q$), Key
($K$), and Value ($V$) vectors to compute attention.

Transformers are now the model of choice for high-parameter language models
such as BERT, GPT-3, Megatron-Turing NLG for their scalability of parameters
with respect to performance [6, 3, 17]. Following success in NLP, transformers
were applied to computer vision. Applying transformers to vision tasks is a
challenging task as images contain a greater amount of raw data in pixels
compared to language tasks, requiring scaling of the transformer. The first
major success with transformers in vision tasks was ViT, which – instead of
applying attention to pixels – applied attention to non-overlapping patches of
the image [7]. This method reached competitive accuracy with CNNs on ImageNet.

Convolutional neural networks (CNNs) suffered from diminishing returns with an
increase in parameters, and new works built on non-overlapping methods [2],
implementing more complex processing operations. A notable example is Swin
Transformer. Swin Transformer relies on shifted windows for a more rich
understanding of the data[11]. Video Swin Transformer expanded this operation
to videos with tubelet embeddings and using 3D windows. Swin and its video
counterpart – Video Swin Transformer – reach among the top accuracies for
computer vision tasks for ImageNet and Kinetics-400, respectively,
outperforming ViT[12]. Although vision transformers have promising results for
computer vision, they have never been applied for unfit driving. This
experiment details a) the application of two transformer architectures applied
to drowsy and distracted driving to understand if vision transformers can
compete – or outperform – 3D CNNs to create a comprehensive and accurate
solution to unfit driving and b) an efficient transformer for implementation
in a mobile device or embedded system, like a Jetson Nano.

Figure 1:  Difference in processing methods for convolutional neural networks
and transformer. CNNs extract edges while the transformer extracts the most
important spatial information from the input data.

##  2 Methodology

Two experiments were performed to evaluate the accuracy of vision transformers
for distracted and drowsy on pre-existing datasets. The first experiment
focused on drowsy driving, and the second focused on distracted driving. The
model tested in both experiments was a Video Swin Transformer architecture
adapting the main features from [12].

Efficiency was considered in model hyperparameters to achieve the second
engineering goal of implementation in mobile devices.

###  2.1 Experiment 1. Drowsy Driving

For drowsy driving, a Video Swin Transformer architecture from [12] was
adapted for video classification and used to evaluate the performance of
transformers for unfit driving.

The input data was first passed to a CNN feature map extractor to extract a
1024-dimensional vector. The CNN feature extractor serves to reduce the
computational cost by reducing the size of the input data. Then, the feature
map is passed through an embedding layer that encodes per-pixel
understandings. The embeddings are passed through the transformer encoder
closely following [12] transformer architecture. Next is 1D max pooling, a
dense layer with 0.5 dropout, then a final output softmax layer for
classification.

The data used for the first experiment was the National Tsing Hua University
Drowsy Driving Dataset (NTHU-DDD) . NTHU-DDD is an existing and open benchmark
video dataset for drowsy driving with 9.5 hours of footage in diverse
environments. The footage was recorded of 18 subjects driving in combinations
of glasses, sunglasses, dark, and light environments. A sequence length of 30
frames was extracted per training sample. An 80/20 train/test split was used.

The model was trained on a Google Colaboratory notebook for 10 epochs with a
Tesla K80 GPU.

Figure 2:  Illustration of the vision transformer architecture adapted from
[7] inferencing on spatiotemporal data to output a prediction of drowsy/alert.
The multi-head attention encoder in the transformer encoder allows for
transformers to “pay attention” to only the most important features and reach
higher accuracies than those of 3D CNNs.

###  2.2 Experiment 2. Distracted Driving

For distracted driving, the Video Swin Transformer architecture was applied to
understand the impact of a larger model size. Compared to Experiment I, Video
Swin Transformer requires 22 more GFLOPS than ViT. Video Swin Transformer was
used as it achieves higher accuracy than a vanilla transformer on benchmark
datasets.

The input data is tokenized with a tubelet embedding, extracting T (frames) x
H (height) x W (width) x C (color channels) patches. Shifted windows are
extracted from the video in 3-dimensional rectangular prisms from the video.
The windows are shifted and sometimes overlap to create residual connections
between spatial and temporal regions. These residual connections do not exist
in ViT as all patches are extracted uniformly. Each 2x4x4x3 patch was
tokenized to produce a 96-dimensional feature. To preserve temporal
information, dimension T is not reduced, extracted, or compressed in any way.
Patch merging is applied to reduce spatial information 2x, passed through
layer normalization, and multi-head self-attention (MSA) is performed.

The data used for the second experiment was the Driver Monitoring Dataset
(DMD) [14]. DMD is an ongoing dataset project, focusing on distraction-related
categories such as texting, calling, and adjusting the radio. It is an
existing and open benchmark video dataset for distracted driving with 40.75
hours of footage in diverse environments. The footage was recorded of 10
subjects driving in car simulators and closed parking lots. A sequence length
of 30 frames was extracted per training sample, following methods from
previous literature [21]. An 80/20 train/test split was used.

The model was trained with a Tesla T4 GPU considering the higher computational
cost compared to Experiment I because of the larger architecture.

The accuracy of the model is defined by the number of correct predictions
divided by the number of total predictions. Once trained, the accuracy of the
models on the testing dataset was compared to previous literature with 3D CNNs
for drowsy driving and distracted driving which currently reach 75.4% and
97.2% respectively [14, 21][19-20]

##  3 Results

Experiment I reaches a peak accuracy of 67% before reaching a final accuracy
of 44% with the vanilla transformer. The model is compared to the previous
state-of-the-art accuracy on NTHU-DDD, which reached 75.4% accuracy (Figure
3A). The training loss is consistently lower than the test loss, indicating
overfitting (Figure 3B).

Figure 3:  Training accuracy of the vision transformer on NTHU-DDD compared to
the previous state-of-the-art with a CNN-based architecture from [21] Figure
4:  Training and validation cross-entropy loss over 10 epochs for detecting
drowsy driving on NTHU-DDD with Video Swin Transformer.

Experiment II compares the test accuracy to the previous state- of-the-art
accuracy achieved with a 3D CNN from [4]. [4] reach 97.2% accuracy while the
vision transformer experiment reaches 97.5% accuracy (Figure 4A). The test
loss descends consistently compared to training loss, indicating the
transformer did not overfit. Based on these results, a new state-of-the-art
accuracy was achieved on DMD, outperforming all previous works with 3D CNNs.

Figure 5:  Training accuracy of the Video Swin Transformer on DMD compared to
the previous state-of-the-art [4] with a CNN-based architecture

##  4 Conclusion

To the best of the author’s knowledge, no experiments have been conducted
applying transformers to unfit driving. In this experiment, vision
transformers are evaluated for application to unfit driving as a potential
solution in the future. By outperforming 3D CNNs for distracted driving,
transformers are promising.

Future investigations should look to expand on the size and scope of the
drowsy driving dataset to reach acceptable accuracy for drowsy driving. Future
datasets should consider adding more categories to a singular, comprehensive
dataset that includes drunk driving and road rage to train a more
comprehensive model for unfit driving. To improve accuracy, future
investigations should look to increase the number of parameters, add more data
through augmentations and transformations, and use newer architectures like
TokenLearner, Swin Transformer V2, and Microsoft’s Florence [16, 10, 22].
Future investigations should also look to deploy the model weights to an
embedded system such as a mobile device. By 2026, government regulation may
mandate DMS in new cars, and this study provides new roadways and methods to
explore to revolutionize the automotive industry and save millions of lives
[20].

## References

  * [1] National Highway Traffic Safety Administration.  Number 813199 in Traffic Safety Facts. Oct 2021.
  * [2] Gaudenz Boesch.  Vision transformers (vit) in image recognition - 2022 guide, Mar 2022\.
  * [3] Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei.  Language models are few-shot learners.  (arXiv:2005.14165), Jul 2020.  arXiv:2005.14165 [cs].
  * [4] Paola Canas, Juan Ortega, Marcos Nieto, and Oihana Otaegui.  Detection of distraction-related actions on dmd: An image and a video-based approach comparison.  pages 458–465, 01 2021.
  * [5] Mert Cetinkaya and Tankut Acarman.  Driver activity recognition using deep learning and human pose estimation.  In 2021 International Conference on INnovations in Intelligent SysTems and Applications (INISTA), pages 1–5, 2021.
  * [6] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova.  Bert: Pre-training of deep bidirectional transformers for language understanding.  (arXiv:1810.04805), May 2019.  arXiv:1810.04805 [cs].
  * [7] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby.  An image is worth 16x16 words: Transformers for image recognition at scale.  (arXiv:2010.11929), Jun 2021.  arXiv:2010.11929 [cs].
  * [8] Anjith George and Aurobinda Routray.  Design and implementation of real-time algorithms for eye tracking and perclos measurement for on board estimation of alertness of drivers.  (arXiv:1505.06162), May 2015.  arXiv:1505.06162 [cs].
  * [9] Baichen Li, Scott R. Downen, Quan Dong, Nam Tran, Maxine LeSaux, Andrew C. Meltzer, and Zhenyu Li.  A discreet wearable iot sensor for continuous transdermal alcohol monitoring – challenges and opportunities.  (arXiv:1911.05824), Nov 2019.  arXiv:1911.05824 [physics, q-bio].
  * [10] Ze Liu, Han Hu, Yutong Lin, Zhuliang Yao, Zhenda Xie, Yixuan Wei, Jia Ning, Yue Cao, Zheng Zhang, Li Dong, Furu Wei, and Baining Guo.  Swin transformer v2: Scaling up capacity and resolution.  (arXiv:2111.09883), Apr 2022.  arXiv:2111.09883 [cs].
  * [11] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo.  Swin transformer: Hierarchical vision transformer using shifted windows.  (arXiv:2103.14030), Aug 2021.  arXiv:2103.14030 [cs].
  * [12] Ze Liu, Jia Ning, Yue Cao, Yixuan Wei, Zheng Zhang, Stephen Lin, and Han Hu.  Video swin transformer.  (arXiv:2106.13230), Jun 2021.  arXiv:2106.13230 [cs].
  * [13] Zahra Mardi, Seyedeh Naghmeh Miri Ashtiani, and Mohammad Mikaili.  Eeg-based drowsiness detection for safe driving using chaotic features and statistical tests.  Journal of Medical Signals and Sensors, 1(2):130–137, May 2011\.
  * [14] Juan Diego Ortega, Neslihan Kose, Paola Canas, Min-An Chao, Alexander Unnervik, Marcos Nieto, Oihana Otaegui, and Luis Salgado.  DMD: A Large-Scale Multi-Modal Driver Monitoring Dataset for Attention and Alertness Analysis, volume 12538, page 387–405.  2020\.  arXiv:2008.12085 [cs, eess].
  * [15] Luis Riera, Koray Ozcan, Jennifer Merickel, Mathew Rizzo, Soumik Sarkar, and Anuj Sharma.  Driver behavior analysis using lane departure detection under challenging conditions.  (arXiv:1906.00093), May 2019.  arXiv:1906.00093 [cs].
  * [16] Michael S. Ryoo, AJ Piergiovanni, Anurag Arnab, Mostafa Dehghani, and Anelia Angelova.  Tokenlearner: What can 8 learned tokens do for images and videos?  2021\.
  * [17] Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper, and Bryan Catanzaro.  Megatron-lm: Training multi-billion parameter language models using model parallelism.  (arXiv:1909.08053), Mar 2020.  arXiv:1909.08053 [cs].
  * [18] Twitter, Instagram, Email, and Facebook.  The (near) future of driving: Cars that watch you watch them steer, Apr 2021.
  * [19] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin.  Attention is all you need.  (arXiv:1706.03762), Dec 2017.  arXiv:1706.03762 [cs].
  * [20] Neil Vigdor.  Drunken-driving warning systems would be required for new cars under u.s. bill.  The New York Times, Nov 2021.
  * [21] Jasper S. Wijnands, Jason Thompson, Kerry A. Nice, Gideon D. P. A. Aschwanden, and Mark Stevenson.  Real-time monitoring of driver drowsiness on mobile platforms using 3d neural networks.  Neural Computing and Applications, 32(13):9731–9743, Jul 2020\.
  * [22] Lu Yuan, Dongdong Chen, Yi-Ling Chen, Noel Codella, Xiyang Dai, Jianfeng Gao, Houdong Hu, Xuedong Huang, Boxin Li, Chunyuan Li, Ce Liu, Mengchen Liu, Zicheng Liu, Yumao Lu, Yu Shi, Lijuan Wang, Jianfeng Wang, Bin Xiao, Zhen Xiao, Jianwei Yang, Michael Zeng, Luowei Zhou, and Pengchuan Zhang.  Florence: A new foundation model for computer vision.  (arXiv:2111.11432), Nov 2021.  arXiv:2111.11432 [cs].
  * [23] Muhammad Fawwaz Yusri, Patrick Mangat, and Oliver Wasenmuller.  Detection of driver drowsiness by calculating the speed of eye blinking.  (arXiv:2110.11223), Oct 2021.  arXiv:2110.11223 [cs].