symmetries on the most natural genuine local and line operators, but there is
a zoo of correlation functions that would be interesting to explore further,
such as the action on twist vortices and their junctions with Wilson and ’t
Hooft lines, and on non-genuine operators in the twisted sector. Similarly, it
would be interesting to study the impact of Dijkgraaf-Witten (in 3d) and theta
(in 4d) terms on the physics of extended operators — for instance, the twist
vortex will support dyonic degrees of freedom in the presence of a theta term
[63].

Finally, while we presented a minimal non-abelian generalization of the
Villain formulation, the techniques used in this paper are limited to
disconnected gauge groups which can be obtained by gauging outer automorphisms
of connected gauge groups. The question of how to construct a Villain-type
formulation of generic non-abelian gauge theories remains an open and
interesting problem (however see Ref. [93] for a recent proposal involving
ideas from higher category theory).

Acknowledgments

The author is grateful to M. Bullimore, N. Iqbal, M. Nguyen, T. Rudelius, T.
Sulejmanpasic, Z. Sun, and R. Thorngren for useful suggestions and
discussions, and to A. Cherman for comments on a draft. T.J. is supported by a
Julian Schwinger Fellowship from the Mani L. Bhaumik Institute for Theoretical
Physics at UCLA, and is grateful to Durham University and the Simons Center
for Geometry and Physics for hospitality during the completion of this work.

##  Appendix A Twisted Differentials and Cup Products

###  A.1 Twisted Differentials

It is convenient to label an $i$-chain using a root site $s$ and $i$
coordinates given in increasing order.

The ordinary differential acting on an $i$-cochain $X$ is defined as

$(dX)_{s,\,j_{1}\ldots
j_{i+1}}=(-1)^{i}\,\sum_{\begin{subarray}{c}k_{l}\in\\{j_{1},\ldots,j_{i+1}\\},\\\
k_{1}<\cdots<k_{i}\end{subarray}}\epsilon_{k_{1}\ldots
k_{i+1}}(X_{s+\hat{k}_{i+1},k_{1}\ldots k_{i}}-X_{s,k_{1}\ldots k_{i}})\,.$
(104)

If $X$ is $\mathsf{C}$ odd, the two sets of terms on the right hand side
transform under local charge conjugation gauge transformations at different
points. The $\mathsf{C}$-covariant, or $\mathsf{C}$-twisted differential is
defined by

$(d_{\mathsf{C}}X)_{s,\,j_{1}\ldots
j_{i+1}}=(-1)^{i}\,\sum_{\begin{subarray}{c}k_{l}\in\\{j_{1},\ldots,j_{i+1}\\},\\\
k_{1}<\cdots<k_{i}\end{subarray}}\epsilon_{k_{1}\ldots
k_{i+1}}(\mathsf{C}_{s,k_{i+1}}X_{s+\hat{k}_{i+1},k_{1}\ldots
k_{i}}-X_{s,k_{1}\ldots k_{i}})\,.$ (105)

It is easy to see from this definition that every term on the right hand side
transforms at the same point $s$, i.e. covariantly. See Fig. 18 for spelled
out examples in three dimensions.

Figure 18: Examples of twisted, or $\mathsf{C}$-covariant, exterior
derivatives on the lattice. The purple lines represent the charge conjugation
link field $\mathsf{C}$ — it should be visually clear that each term
transforms covariantly.

The twisted differential has a compact expression in terms of cup products,

$d_{\mathsf{C}}X=dX+(\mathsf{C}-\mathbbm{1})\cup X\,,$ (106)

where here $\mathbbm{1}$ is the 1-cochain equal to $+1$ for every positively
oriented link. More generally we will define $\mathbbm{1}$ to be the
$i$-cochain with this same property, with the degree of the cochain implicit.
Note that $\mathbbm{1}$ is flat, $d\mathbbm{1}=0$, and the 1-cochain
$\mathbbm{1}$ has the property that

$\mathbbm{1}\cup X-(-1)^{i}\,X\cup\mathbbm{1}=dX$ (107)

for any $i$-cochain $X$. We can then verify that Eq. (106) defines a suitable
covariant derivative by examining the gauge variation

$\begin{split}d_{\mathsf{C}}X\to
d_{\mathsf{G}\cup\mathsf{C}\cup\mathsf{G}}(\mathsf{G}\cup X)&=d(\mathsf{G}\cup
X)+(\mathsf{G}\cup\mathsf{C}\cup\mathsf{G}-\mathbbm{1})\cup\mathsf{G}\cup X\\\
&=d\mathsf{G}\cup X+\mathsf{G}\cup dX+\mathsf{G}\cup\mathsf{C}\cup
X-\mathbbm{1}\cup\mathsf{G}\cup X\\\ &=\mathsf{G}\cup
dX+\mathsf{G}\cup\mathsf{C}\cup X-\mathsf{G}\cup\mathbbm{1}\cup
X=\mathsf{G}\cup d_{\mathsf{C}}X\,,\end{split}$ (108)

where we used associativity of the cup product, the fact that
$\mathsf{G}\cup\mathsf{G}=\mathbbm{1}$, and Eq. (107). We note that the
following formula,

$(\mathsf{C}-\mathbbm{1})\cup(\mathsf{C}-\mathbbm{1})=\mathsf{C}\cup\mathsf{C}-(\mathbbm{1}\cup\mathsf{C}+\mathsf{C}\cup\mathbbm{1})+\mathbbm{1}\cup\mathbbm{1}=\mathsf{C}\cup\mathsf{C}-d\mathsf{C}\,,$
(109)

which was established using (107) and the fact that
$\mathbbm{1}\cup\mathbbm{1}=0$, can be used to show that the twisted
differential satisfies

$\begin{split}d_{\mathsf{C}}^{2}X=d^{2}X+d(\mathsf{C}-\mathbbm{1})\cup
X-(\mathsf{C}-\mathbbm{1})\cup dX+(\mathsf{C}-\mathbbm{1})\cup
dX+(\mathsf{C}-\mathbbm{1})\cup(\mathsf{C}-\mathbbm{1})\cup X\\\
=(\mathsf{C}\cup\mathsf{C})\cup X\,.\end{split}$ (110)

###  A.2 Twisted Cup Products

The ordinary cup product between an $p$-cochain $X$ and $q$-cochain $Y$ is

$(X\cup Y)_{s,j_{1}\ldots
j_{p+q}}=\sum_{\begin{subarray}{c}k_{l}\in\\{j_{1},\ldots,j_{p+q}\\},\\\
k_{1}<\cdots<k_{p},\\\
k_{p+1}<\cdots<k_{p+q}\end{subarray}}\epsilon_{k_{1}\ldots
k_{p+q}}\,X_{s,k_{1}\ldots
k_{p}}\,Y_{s+\hat{k}_{1}+\cdots+\hat{k}_{p},k_{p+1}\ldots k_{p+q}}\,.$ (111)

If both $X$ and $Y$ are $\mathsf{C}$ odd, this combination is not
$\mathsf{C}$-invariant since $X$ and $Y$ on the right hand side transform at
different sites. To remedy this, we connect the root site of $Y$ to the root
site of $X$ with a $\mathsf{C}$ Wilson line,

$\displaystyle(X\cup_{\mathsf{C}}Y)_{s,j_{1}\ldots
j_{p+q}}=\sum_{\begin{subarray}{c}k_{l}\in\\{j_{1},\ldots,j_{p+q}\\},\\\
k_{1}<\cdots<k_{p},\\\
k_{p+1}<\cdots<k_{p+q}\end{subarray}}\epsilon_{k_{1}\ldots k_{p+q}}\,$
$\displaystyle X_{s,k_{1}\ldots
k_{p}}\,\mathsf{C}_{s,k_{1}}\mathsf{C}_{s+\hat{k}_{1},k_{2}}\cdots$ (112)
$\displaystyle\mathsf{C}_{s+\hat{k}_{1}+\cdots+\hat{k}_{p-1},k_{p}}\,Y_{s+\hat{k}_{1}+\cdots+\hat{k}_{p},k_{p+1}\ldots
k_{p+q}}\,.$

In order to write down an action for $O(2)$ gauge theory in 3d and 4d, we in
particular need the following twisted cup product between a 3-cochain and
0-cochain,

$(d_{\mathsf{C}}n\cup_{\mathsf{C}}\sigma)_{x,123}=(d_{\mathsf{C}}n)_{x,123}\,\mathsf{C}_{x,1}\mathsf{C}_{x+\hat{1},2}\mathsf{C}_{x+\hat{1}+\hat{2},3}\,\sigma_{x+\hat{1}+\hat{2}+\hat{3}},$
(113)

and the twisted cup product between a 3-cochain and 1-cochain,

$(d_{\mathsf{C}}n\cup_{\mathsf{C}}\tilde{a})_{x,1234}=(d_{\mathsf{C}}n)_{x,123}\,\mathsf{C}_{x,1}\mathsf{C}_{x+\hat{1},2}\mathsf{C}_{x+\hat{1}+\hat{2},3}\,\tilde{a}_{x+\hat{1}+\hat{2}+\hat{3},4}\\\
-(d_{\mathsf{C}}n)_{x,124}\,\mathsf{C}_{x,1}\mathsf{C}_{x+\hat{1},2}\mathsf{C}_{x+\hat{1}+\hat{2},4}\,\tilde{a}_{x+\hat{1}+\hat{2}+\hat{4},3}\\\
-(d_{\mathsf{C}}n)_{x,234}\,\mathsf{C}_{x,2}\mathsf{C}_{x+\hat{2},3}\mathsf{C}_{x+\hat{2}+\hat{3},4}\,\tilde{a}_{x+\hat{2}+\hat{3}+\hat{4},1}\\\
+(d_{\mathsf{C}}n)_{x,134}\,\mathsf{C}_{x,1}\mathsf{C}_{x+\hat{1},3}\mathsf{C}_{x+\hat{1}+\hat{3},4}\,\tilde{a}_{x+\hat{1}+\hat{3}+\hat{4},1}\,.$
(114)

See Fig. 19 for more examples in 3d.

Figure 19: Examples of twisted, cup products on the cubic lattice between two
$\mathsf{C}$-odd cochains. The purple lines represent the charge conjugation
link field $\mathsf{C}$ — it should be visually clear that each term is
$\mathsf{C}$-invariant.

###  A.3 Cup Product Identities

The (untwisted) cup product obeys

$X\cup Y-(-1)^{pq}Y\cup
X=(-1)^{p+q+1}\left[d(X\cup_{1}Y)-dX\cup_{1}Y-(-1)^{p}\,X\cup_{1}dY\right]\,.$
(115)

Higher cup products on the hypercubic lattice were defined in Refs. [106, 85].
They obey a generalization of the above equation,

$X\cup_{i}Y-(-1)^{pq+i}Y\cup_{i}X=(-1)^{p+q+1+i}\left[d(X\cup_{i+1}Y)-dX\cup_{i+1}Y-(-1)^{p}\,X\cup_{i+1}dY\right]\,.$
(116)

The generalization to twisted higher cup products is straightforward, although
we do not need to use them in the current paper.

The cup product identities give rise to a useful formula involving integer
cochains. Let $X\in\mathcal{C}^{i}(\Lambda,\mathbb{Z})$. Then

$\begin{split}2X\cup_{i-1}X&=(-1)^{i}\left[d(X\cup_{i}X)-dX\cup_{i}X-(-1)^{i}X\cup_{i}dX\right]\,,\\\
dX\cup_{i+1}dX&=dX\cup_{i}X-(-1)^{i}X\cup_{i}dX\,,\end{split}$ (117)

hence

$d(X\cup_{i}X)=2(-1)^{i}(X\cup_{i-1}X+X\cup_{i}dX)+dX\cup_{i+1}dX\,.$ (118)

Now suppose $dX=0$ mod $2$, so that

$d(X\cup_{i}X)=2X\cup_{i-1}X\text{ mod }4\,.$ (119)

We can simplify this equation further by noting that
$(X\cup_{i}X)_{s,j_{1}\cdots j_{i}}=(X_{s,j_{1}\cdots j_{i}})^{2}$. Using the
fact that $a^{2}\text{ mod }4=a\text{ mod }2$ for any integer $a$, we have

$X\cup_{i}X\text{ mod }4=X\text{ mod }2.$ (120)

Then we find

$d\overline{X}=2X\cup_{i-1}X\text{ mod }4,$ (121)

which we used in Eq. (56) in the main text.

##  Appendix B Gauge-Invariance of the $O(2)$ Wilson Line

Here we show that the $O(2)$ Wilson loop defined in Eq. (19) and reproduced
here for convenience,

$W_{q}(\gamma)\equiv P(\gamma)\sum_{\hat{\mathsf{g}}_{*}=\pm
1}\exp\left(iq\,\hat{\mathsf{g}}_{*}\sum_{\ell\in\gamma}\eta(\gamma_{\ell,*})\,a_{\ell}\right)\,.$
(122)

is gauge-invariant. First, as we described in the main text, it is clearly
invariant under $\mathbb{Z}_{2}\subset O(2)$ transformations. It is less
obvious that it is invariant under $U(1)\subset O(2)$ gauge transformations of
the form $a\to a+d_{\mathsf{c}}\lambda$. In the main text we showed that the
above operator does not depend on the specific choice of scaffolding paths
$\gamma_{\ell,*}$. Therefore, we are free to make a particular choice which
makes our analysis simpler. To do so we first label a curve $\gamma$ in terms
of a basepoint $*$ and an ordered set $(i_{1},\ldots,i_{L_{\gamma}})$ where
$i_{j}\in\\{\pm 1,\ldots,\pm d\\}$ and $L_{\gamma}$ is the length of $\gamma$.
Since $\gamma$ is closed, $\sum_{j}i_{j}=0$ modulo the number of sites
$L_{1},L_{2},\ldots,L_{d}$ of the torus. A change in basepoint can be absorbed
into a cyclic permutation of the indices $i_{j}$. In terms of this data, an
ordinary Wilson loop in $U(1)$ gauge theory can be expressed as the
exponential of

$\sum_{\ell\in\gamma}a_{\ell}=\sum_{j=1}^{L}a_{*+\sum_{t=1}^{j-1}\hat{i}_{t},i_{j}}.$
(123)

In the current context, we choose paths $\gamma_{\ell,*}$ to lie along
$\gamma$ such that

$\sum_{\ell\in\gamma}\eta(\gamma_{\ell,*})\,a_{\ell}=\sum_{j=1}^{L}\left(\prod_{k=1}^{j-1}\mathsf{c}_{*+\sum_{r=1}^{k-1}\hat{i}_{r},i_{k}}\right)a_{*+\sum_{t=1}^{j-1}\hat{i}_{t},i_{j}}\\\
=a_{*,i_{1}}+\mathsf{c}_{*,\hat{i}_{1}}a_{*+\hat{i}_{1},i_{2}}+\mathsf{c}_{*,\hat{i}_{1}}\mathsf{c}_{*+\hat{i}_{1},i_{2}}a_{*+\hat{i}_{1}+\hat{i}_{2},i_{3}}+\\\
\cdots+\mathsf{c}_{*,\hat{i}_{1}}\mathsf{c}_{*+\hat{i}_{1},i_{2}}\cdots\mathsf{c}_{*+\sum_{r=1}^{L-2}\hat{i}_{r},i_{L-1}}a_{*-\hat{i}_{L},i_{L}}\,.$
(124)

The variation of the above expression under $a\to a+d_{\mathsf{c}}\lambda$ is

$\sum_{j=1}^{L}\left(\prod_{k=1}^{j-1}\mathsf{c}_{*+\sum_{r=1}^{k-1}\hat{i}_{r},i_{k}}\right)\left(\mathsf{c}_{*+\sum_{t=1}^{j-1}\hat{i}_{t},i_{j}}\lambda_{*+\sum_{t=1}^{j}\hat{i}_{t}}-\lambda_{*+\sum_{t=1}^{j-1}\hat{i}_{t}}\right)\\\
=\sum_{j=1}^{L}\left[\left(\prod_{k=1}^{j}\mathsf{c}_{*+\sum_{r=1}^{k-1}\hat{i}_{r},i_{k}}\right)\lambda_{*+\sum_{t=1}^{j}\hat{i}_{t}}-\left(\prod_{k=1}^{j-1}\mathsf{c}_{*+\sum_{r=1}^{k-1}\hat{i}_{r},i_{k}}\right)\lambda_{*+\sum_{t=1}^{j-1}\hat{i}_{t}}\right]\,.$
(125)

Now we observe that all terms cancel in the sum over $j$ except two terms,
which reduce to

$\left(\prod_{k=1}^{L}\mathsf{c}_{*+\sum_{r=1}^{k-1}\hat{i}_{r},i_{k}}\right)\lambda_{*+\sum_{t=1}^{L}\hat{i}_{t}}-\lambda_{*}=(\eta(\gamma)-1)\lambda_{*}\,.$
(126)

using the fact that the curve is closed. This variation trivializes when
exponentiated and multiplied by $P(\gamma)$ as in the definition of the Wilson
loop in Eq. (19), verifying our claim.

##  Appendix C Orbifolding the Particle on a Circle

In this appendix we discuss the Villain discretization of the particle on a
circle with charge conjugation symmetry gauged, in other words a particle
moving on $S^{1}/\mathbb{Z}_{2}$ where the $\mathbb{Z}_{2}$ is a reflection
across a fixed axis. We start with the standard particle on a circle. The
ingredients in the Villain description are a real scalar
$\varphi\in\mathcal{C}^{0}(\Gamma,\mathbb{R})$, and associated integer Villain
field $w\in\mathcal{C}^{1}(\Gamma,\mathbb{Z})$, with gauge redundancy

$\varphi\to\varphi+2\pi r\,,\ w\to w+dr\,,$ (127)

with $r\in\mathcal{C}^{0}(\Gamma,\mathbb{Z})$. Both fields are odd under
charge conjugation, $\varphi\to\mathsf{G}\cup\varphi$ and $w\to\mathsf{G}\cup
w$, which we take to be a global symmetry for now. The Villain action in the
presence of charge conjugation backgrounds is

$S_{\text{p.o.c.}}(\mathsf{C})=\frac{\kappa}{2}\sum_{\text{links}}(d_{\mathsf{C}}\varphi-2\pi
w)^{2}+i\theta\sum_{\text{links}}w\,,$ (128)

where $\kappa\geq 0$ and $\theta\sim\theta+2\pi$ is a theta parameter
associated with the winding of the compact scalar (only $\theta=0,\pi$ respect
$\mathsf{C}$). This theory has a generalized mixed anomaly between the $U(1)$
global shift symmetry and the periodicity of the $\theta$ parameter [116, 117,
118]. This anomaly persists on the lattice and can be seen explicitly by
coupling to a gauge field $A\in\mathcal{C}^{1}(\Gamma,\mathbb{R})$ and compact
scalar $(\Sigma,\tilde{N})$ with $\Sigma\in\mathcal{C}^{0}(\Gamma,\mathbb{R})$
and $\tilde{N}\in\mathcal{C}^{1}(\Gamma,\mathbb{Z})$ and writing

$S_{\text{p.o.c.}}(\mathsf{C},A,\Sigma)=\frac{\kappa}{2}\sum_{\text{links}}(d_{\mathsf{C}}\varphi-A-2\pi
w)^{2}+i\theta\sum_{\text{links}}w+i\sum_{\text{links}}w\cup_{\mathsf{C}}\Sigma\\\
-i\sum_{\text{links}}\varphi\cup_{\mathsf{C}}(\tilde{N}-\frac{1}{2\pi}d_{\mathsf{C}}\Sigma)\,,$
(129)

where we take the backgrounds to be $\mathsf{C}$ odd $A\to\mathsf{G}\cup
A,\Sigma\to\mathsf{G}\cup\Sigma,\tilde{N}\to\mathsf{G}\cup\tilde{N}$ and the
remaining background gauge transformations act as

$\begin{split}A&\to A+d_{\mathsf{C}}\Lambda+2\pi M\,,\
\Sigma\to\Sigma+2\pi\tilde{M}\,,\
\tilde{N}\to\tilde{N}+d_{\mathsf{C}}\tilde{M}\,,\\\
\varphi&\to\varphi+\Lambda\,,\ w\to w-M\,,\end{split}$ (130)

where
$\Lambda\in\mathcal{C}^{0}(\Gamma,\mathbb{R}),M\in\mathcal{C}^{1}(\Gamma,\mathbb{Z}),\tilde{M}\in\mathcal{C}^{0}(\Gamma,\mathbb{Z})$.
Under this transformation the action shifts by

$\Delta
S_{\text{p.o.c.}}=-i\sum_{\text{links}}\Lambda\cup_{\mathsf{C}}(\tilde{N}-\frac{1}{2\pi}d_{\mathsf{C}}\Sigma)+M\cup_{\mathsf{C}}\Sigma\,,$
(131)

signaling an anomaly. In 3d $O(2)$ gauge theory we can use the orbifolded
particle on a circle to cancel the anomaly inflow onto the twist vortex
worldline, as discussed in Sec. 5.1.

Let us now take $\mathsf{c}$ to be a dynamical gauge field. We can solve this
theory exactly by rewriting the action in terms of an auxiliary field
$z\in\mathcal{C}^{0}(\Gamma,\mathbb{R})$,

$\frac{1}{2\kappa}\sum_{\text{sites}}z^{2}+i\sum_{\text{links}}z\cup_{\mathsf{c}}(d_{\mathsf{c}}\varphi-2\pi
w)+\theta w\,.$ (132)

Summing over $w$ sets $-2\pi z+\theta=2\pi\tilde{w}$, so the dual action
becomes

$\tilde{S}=\frac{1}{2\kappa(2\pi)^{2}}\sum_{\text{sites}}\left(\tilde{w}-\frac{\theta}{2\pi}\right)^{2}+i\sum_{\text{links}}d_{\mathsf{c}}\tilde{w}\cup_{\mathsf{c}}\varphi$
(133)

The equation of motion of $\varphi$ sets $d\tilde{w}=2c\cup\tilde{w}$. In
other words, $\tilde{w}$ is a constant except in the presence of a
$\mathsf{c}$ defect where it flips sign. On a spacetime circle of length $L$
with periodic boundary conditions there are two terms in the sum over
$\mathsf{c}$ — we either insert or don’t insert a single $\mathsf{c}$ defect.
The only configuration that contributes to the term with the defect is
$\tilde{w}=0$, and as a result the partition function is

$Z(\kappa,L,\theta)\sim\sum_{\tilde{w}\in\mathbb{Z}_{\geq
0}}e^{-\frac{L}{2(2\pi)^{2}\kappa}\left(\tilde{w}-\frac{\theta}{2\pi}\right)^{2}}\,.$
(134)

##  Appendix D Orbifolding the Compact Boson

The 2d compact boson has a symmetry- and anomaly-preserving Villain lattice
discretization [76, 77] whose ingredients are a pair of real scalars
$\varphi,\tilde{\varphi}\in\mathcal{C}^{0}(\Sigma,\mathbb{R})$, and an integer
Villain field $w\in\mathcal{C}^{1}(\Sigma,\mathbb{Z})$. Both scalars are
compact, with gauge redundancy

$\varphi\to\varphi+2\pi r\,,\ w\to
w+d_{\mathsf{C}}r\,,\tilde{\varphi}\to\tilde{\varphi}+2\pi\tilde{r}\,.$ (135)

with $r,\tilde{r}\in\mathcal{C}^{0}(\Sigma,\mathbb{Z})$. We write the action
in the presence of $\mathsf{C}$ backgrounds as

$S_{\text{c.b.}}(\mathsf{C})=\frac{\kappa}{2}\sum_{\text{links}}(d_{\mathsf{C}}\varphi-2\pi
w)^{2}+i\sum_{\text{plaq.}}d_{\mathsf{C}}w\cup_{\mathsf{C}}\tilde{\varphi}\,,\quad\kappa\geq
0\,.$ (136)

Coupling to background $U(1)$ gauge fields for the momentum and winding
symmetries, described by pairs $(A,N)$ and $(\tilde{A},\tilde{N})$ where
$A,\tilde{A}\in\mathcal{C}^{1}(\Sigma,\mathbb{R})$ and
$N,\tilde{N}\in\mathcal{C}^{2}(\Sigma,\mathbb{Z})$, we have

$S_{\text{c.b.}}(\mathsf{C},A,N,\tilde{A},\tilde{N})=\frac{\kappa}{2}\sum_{\text{links}}(d_{\mathsf{C}}\varphi-A-2\pi
w)^{2}+i\sum_{\text{plaq.}}(d_{\mathsf{C}}w+N)\cup_{\mathsf{C}}\tilde{\varphi}+i\sum_{\text{plaq.}}w\cup_{\mathsf{C}}\tilde{A}\\\
-i\sum_{\text{plaq.}}\varphi\cup_{\mathsf{C}}(\tilde{N}-\frac{1}{2\pi}d_{\mathsf{C}}\tilde{A})\,.$
(137)

All fields are $\mathsf{C}$ odd, $(A,N)\to(\mathsf{G}\cup A,\mathsf{G}\cup
N)$,
$(\tilde{A},\tilde{N})\to(\mathsf{G}\cup\tilde{A},\mathsf{G}\cup\tilde{N})$,
and

$\begin{split}A&\to A+d_{\mathsf{C}}\Lambda+2\pi M\,,\ N\to
N+d_{\mathsf{C}}M\,,\\\
\tilde{A}&\to\tilde{A}+d_{\mathsf{C}}\tilde{\Lambda}+2\pi\tilde{M}\,,\
\tilde{N}\to\tilde{N}+d_{\mathsf{C}}\tilde{M}\,,\\\
\varphi&\to\varphi+\Lambda\,,\ w\to w-M\,,\
\tilde{\varphi}\to\tilde{\varphi}+\tilde{\Lambda}\,,\end{split}$ (138)

where
$\Lambda,\tilde{\Lambda}\in\mathcal{C}^{0}(\Gamma,\mathbb{R}),M,\tilde{M}\in\mathcal{C}^{1}(\Gamma,\mathbb{Z})$.
The anomaly is

$\Delta
S_{\text{c.b.}}=-i\sum_{\text{plaq.}}\Lambda\cup_{\mathsf{C}}(\tilde{N}-\frac{1}{2\pi}d_{\mathsf{C}}\tilde{A})-N\cup_{\mathsf{C}}\tilde{\Lambda}+M\cup_{\mathsf{C}}(\tilde{A}+d_{\mathsf{C}}\tilde{\Lambda})\,.$
(139)

This gauge variation matches the anomaly inflow onto the twist vortex
worldsheet in 4d $O(2)$ gauge theory, see Sec. 5.2.

If we now make $\mathsf{c}$ a dynamical field, we have

$S_{\text{orbifold}}=\frac{\kappa}{2}\sum_{\text{links}}(d_{\mathsf{c}}\varphi-2\pi
w)^{2}+i\sum_{\text{plaq.}}d_{\mathsf{C}}w\cup_{\mathsf{c}}\tilde{\varphi}+i\pi\sum_{\text{plaq.}}dc\cup
v\,.$ (140)

This breaks the invertible momentum and winding symmetries down to their
$\mathbb{Z}_{2}$ subgroups. The analog of the higher-group structure
encountered in $O(2)$ gauge theory now becomes a standard group extension,
i.e. $\mathbb{Z}_{2,m}^{(0)}\times\mathbb{Z}_{2,w}^{(0)}$ gets extended to
$D_{8}$. As described in Ref. [98], this is captured by the twisted cocycle
condition

$dB_{v}=B_{m}\cup B_{w}$ (141)

which is the analog of Eq. (51). Moreover, this $D_{8}$ symmetry is anomaly-
free (as explained in Appendix A.2 of Ref. [98]), much like the 2-group in
$O(2)$ gauge theory in three dimensions.

It is amusing to note that the local twist vortex operator $e^{i\pi v}$ is not
gauge-invariant. Instead, the action transforms by a shift

$i\sum_{\text{plaq.}}d_{\mathsf{c}}^{2}r\cup_{\mathsf{c}}\tilde{\varphi}=-2i\sum_{\text{plaq.}}\overline{dc}\cup
r\cup\tilde{\varphi}\,.$ (142)

To deal with this, we can stack a ‘0d field theory’ to the twist vortex which
constrains $\tilde{\varphi}$ to be an integer multiple of $\pi$ at the
location of the insertion,

$T(s)=e^{i\pi
v_{s}}\,\delta(\tilde{\varphi}_{s}\in\pi\mathbb{Z})=\sum_{h\in\mathbb{Z}}e^{i\pi
v_{s}}e^{2ih\tilde{\varphi}_{s}}\,.$ (143)

The orbifold at a generic radius also has continuous non-invertible symmetries
which are the analogs of the non-invertible electric and magnetic symmetries
discussed in the main text. In particular, we can apply the construction from
Section 2.1 to write down the symmetry operators

$\begin{split}U_{\theta}(\tilde{\gamma})&=P(\tilde{\gamma}^{\vee})\sum_{\hat{\mathsf{g}}_{*}=\pm
1}\prod_{\ell\in\star[\tilde{\gamma}]}\exp\left[-\frac{\kappa}{2}(d_{\mathsf{c}}\varphi-\hat{\mathsf{g}}_{*}\eta(\gamma_{\ell,*})\theta\star[\tilde{\gamma}]-2\pi
w)_{\ell}^{2}+\frac{\kappa}{2}(d_{\mathsf{c}}\varphi-2\pi
w)_{\ell}^{2}\right]\,,\\\
V_{\alpha}(\gamma)&=P(\gamma)\sum_{\hat{\mathsf{g}}_{*}=\pm
1}\exp\left(i\hat{\mathsf{g}}_{*}\alpha\sum_{\ell\in\gamma}\eta(\gamma_{\ell,*})w_{\ell}\right)\,,\end{split}$
(144)

for the non-invertible momentum and winding symmetries.

##  Appendix E $O(2)$ vs. $Pin^{-}(2)$

In this Appendix we describe the global symmetries of, and relationships
between, pure gauge theories with gauge groups
$O(2)=U(1)\rtimes\mathbb{Z}_{2},U(1)\rtimes\mathbb{Z}_{4}$, and
$Pin^{-}(2)=\frac{U(1)\rtimes\mathbb{Z}_{4}}{\mathbb{Z}_{2}}$.272727We thank
T. Rudelius for helpful discussions regarding the contents of this section.
Each of these theories can be connected by generalized gauging of global
symmetries, in a way which is summarized in Fig. 20.

Let us describe first in words how to get $Pin^{-}(2)$ gauge theory, keeping
track of the (invertible) global symmetries. We start with $U(1)$ gauge theory
enriched with a $\mathbb{Z}_{4}^{(0)}$ 0-form global symmetry whose
$\mathbb{Z}_{2}$ subgroup acts trivially. In other words, we have
codimension-1 operators $\mathsf{C}$ with $\mathbb{Z}_{4}$ fusion rules, such
that $\mathsf{C}$ acts like charge conjugation on the $U(1)$ gauge theory and
$\mathsf{C}^{2}$ has a trivial action. We then proceed to gauge
$\mathbb{Z}_{4}^{(0)}$ to obtain $U(1)\rtimes\mathbb{Z}_{4}$ gauge theory. The
$U(1)^{(1)}_{e}$ and $U(1)^{(d-3)}_{m}$ symmetries of $U(1)$ gauge theory are
broken to the $\mathbb{Z}_{2,e}^{(1)}$ and $\mathbb{Z}_{2,m}^{(d-3)}$
subgroups which commute with the $\mathbb{Z}_{4}$ action. The electric and
magnetic symmetries are involved in a non-trivial higher-group with the dual
$\mathbb{Z}_{4,v}^{(d-2)}$ symmetry obtained from gauging. Furthermore, we
have a $\mathbb{Z}_{2,c}^{(1)}$ 1-form symmetry from the fact that we gauged a
non-effectively acting $\mathbb{Z}_{2}\subset\mathbb{Z}_{4}$.

Figure 20: Interrelations between $U(1),U(1)\rtimes\mathbb{Z}_{4},O(2),$ and
$Pin^{-}(2)$ gauge theories via generalized gauging of discrete higher-form
symmetries. The group-like, invertible symmetries are distinct for each choice
of gauge group. Note that in general, these equivalence hold only up to a
rescaling of the $U(1)$ gauge coupling $\beta$. The notation
$\widehat{\times}$ indicates a higher-group.

We now contemplate gauging various symmetries. Clearly if we gauge
$\mathbb{Z}_{4,v}^{(d-2)}$ we return back to the $U(1)$ gauge theory. It is
more interesting to consider gauging different subgroups of the
$\mathbb{Z}_{2,e}^{(1)}\times\mathbb{Z}_{2,c}^{(1)}$ 1-form ‘electric’
symmetry.

  1. 1.

If we gauge $\mathbb{Z}_{2,e}^{(1)}$, this effectively rescales the electric
gauge field by $a\to a/2$. This does two things. First, $\mathbb{Z}_{4}$
shifts of the electric gauge field now become $\mathbb{Z}_{2}$ shifts which
commute with charge conjugation, so we retain a $\mathbb{Z}_{2,e}^{(1)}$
symmetry. Second, we get a dual $\mathbb{Z}_{2}$ $(d-3)$-form symmetry from
gauging which acts on the magnetic gauge field. So we end up with the same
symmetries we started with — in other words, up to a rescaling of the gauge
coupling, the $U(1)\rtimes\mathbb{Z}_{4}$ theory is self-dual under gauging
$\mathbb{Z}_{2,e}^{(1)}$.

  2. 2.

If we gauge $\mathbb{Z}_{2,c}^{(1)}$ we obtain
$U(1)\rtimes\mathbb{Z}_{2}=O(2)$. Indeed, this gauging breaks
$\mathbb{Z}_{4,v}^{(d-2)}\to\mathbb{Z}_{2,v}^{(d-2)}$ due to the mixed anomaly
between $\mathbb{Z}_{4,v}^{(d-2)}$ and $\mathbb{Z}_{2,c}^{(1)}$. There is no
dual symmetry from gauging, because $\mathbb{Z}_{2,c}^{(1)}$ itself came from
gauging a non-effectively-acting symmetry (the would-be charged object under
the dual symmetry lives at the boundary of the codimension-2
$\mathbb{Z}_{2,c}^{(1)}$ symmetry operator, but no such boundary exists
because the symmetry operator is charged under $\mathbb{Z}_{2,v}^{(d-2)}$). We
are left with the symmetries discussed in detail in the main text.

  3. 3.

If we gauge the diagonal
$\mathbb{Z}_{2,d}^{(1)}\subset\mathbb{Z}_{2,e}^{(1)}\times\mathbb{Z}_{2,c}^{(1)}$
we obtain $\frac{U(1)\rtimes\mathbb{Z}_{4}}{\mathbb{Z}_{2}}=Pin^{-}(2)$ gauge
theory. As in the case above, this breaks
$\mathbb{Z}_{4,v}^{(d-2)}\to\mathbb{Z}_{2,v}^{(d-2)}$, and again there is no
dual magnetic symmetry from gauging since there is no gauge-invariant
codimension-3 operator for the dual symmetry to act on. Since there is no
magnetic symmetry, there is also no higher-group. The invertible symmetry is
simply $\mathbb{Z}_{2}^{(1)}\times\mathbb{Z}_{2,v}^{(d-2)}$.

We now turn to the lattice for a concrete realization of the above discussion.
We work in 4d, and start with $U(1)\rtimes\mathbb{Z}_{4}$ gauge theory,

$S_{U(1)\rtimes\mathbb{Z}_{4}}=\frac{\beta}{2}\sum_{\text{plaq.}}(d_{\mathsf{c}^{2}}a-2\pi
n)^{2}+i\sum_{\text{hyper-
cu.}}(d_{\mathsf{c}^{2}}n)\cup_{\mathsf{c}^{2}}\tilde{a}+\frac{i\pi}{2}\sum_{\text{hyper-
cu.}}dc\cup v\,.$ (145)

Here $\mathsf{c}=e^{\frac{2\pi
i}{4}c}\in\mathcal{C}^{1}(\Lambda,\mathbb{Z}_{4})$ and what appears above is
the charge-2 covariant derivative,
$d_{\mathsf{c}^{2}}a=da+(\mathsf{c}^{2}-\mathbbm{1})\cup
a=da-2\overline{c}\cup a$. The $\mathbb{Z}_{4}$ gauge transformations act as

$a\to\mathsf{g}^{2}\cup a\,,\ n\to\mathsf{g}^{2}\cup n\,,\
\tilde{a}\to\mathsf{g}^{2}\cup\tilde{a}\,,\ c\to c+dg\,,$ (146)

where $\mathsf{g}=e^{\frac{2\pi
i}{4}g}\in\mathcal{C}^{0}(\Lambda,\mathbb{Z}_{4})$. There are further gauge
redundancies

$a\to a+d_{\mathsf{c}^{2}}\lambda+2\pi m\,,\ n\to n+d_{\mathsf{c}^{2}}m\,,\
\tilde{a}\to\tilde{a}+d_{\mathsf{c}^{2}}\tilde{\lambda}+2\pi\tilde{m}\,,\ v\to
v+dt\,,$ (147)

with $\lambda,\tilde{\lambda}\in\mathcal{C}^{0}(\Lambda,\mathbb{R})$,
$m,\tilde{m}\in\mathcal{C}^{1}(\Lambda,\mathbb{Z})$, and
$t\in\mathcal{C}^{1}(\Lambda,\mathbb{Z}_{4})$. This theory has a
$\mathbb{Z}_{2,e}^{(1)}\times\mathbb{Z}_{2,c}^{(1)}$ 1-form electric symmetry,
where the factors act as $a\to a+\pi V$ and $c\to c+2U$. There is also a
$\mathbb{Z}_{2,m}^{(1)}$ magnetic symmetry taking $a\to a+\pi\tilde{V}$, and a
$\mathbb{Z}_{4,v}^{(2)}$ generated by the $\mathsf{c}$ Wilson line $\eta$. As
in the $O(2)$ case we have a 3-group captured by the twisted cocycle condition

$dB_{v}=2B_{e}\cup B_{m}\text{ mod }4\,.$ (148)

If we gauge $\mathbb{Z}_{4,v}^{(2)}$, we add the coupling

$\frac{i\pi}{2}\sum_{\text{hyper-cu.}}(c\cup b_{v}+u\cup db_{v})\,,\quad
b_{v}\in\mathcal{C}^{3}(\Lambda,\mathbb{Z}_{4})\,,\
u\in\mathcal{C}^{0}(\Lambda,\mathbb{Z}_{4})$ (149)

and summing over $b_{v}$ sets $c=du$ to be pure gauge, leaving us with $U(1)$
gauge theory. If we gauge $\mathbb{Z}_{2,c}^{(1)}$ we effectively replace
$\mathsf{c}^{2}\to\mathsf{c}$ where $\mathsf{c}$ is a $\mathbb{Z}_{2}$ rather
than $\mathbb{Z}_{4}$ gauge field. This lands us on the $O(2)$ theory. If we
gauge $\mathbb{Z}_{2,e}^{(1)}$, we minimally substitute $n\to
n+\frac{1}{2}b_{e}$ with $b_{e}\in\mathcal{C}^{1}(\Lambda,\mathbb{Z}_{2})$
constraint to be a flat $\mathbb{Z}_{2}$ gauge field by a Lagrange multiplier
$u\in\mathcal{C}^{1}(\Lambda,\mathbb{Z}_{2})$,

$S_{Pin^{-}(2)}=\frac{\beta}{2}\sum_{\text{plaq.}}(d_{\mathsf{c}^{2}}a-\pi
b_{e}-2\pi n)^{2}+i\sum_{\text{hyper-
cu.}}\left(d_{\mathsf{c}^{2}}n+\frac{1}{2}d_{\mathsf{c}^{2}}b_{e}\right)\cup_{\mathsf{c}^{2}}\tilde{a}\\\
+\frac{i\pi}{2}\sum_{\text{hyper-cu.}}dc\cup v+i\pi\sum_{\text{hyper-
cu.}}db_{e}\cup u\,.$ (150)

For the action to be invariant under $\tilde{a}\to\tilde{a}+2\pi\tilde{m}$, we
must assign $u\to u+\tilde{m}$. This allows us to define a gauge-invariant,
‘fractional’ ’t Hooft line which is schematically
$e^{\frac{i}{2}\sum_{\gamma}\tilde{a}+i\pi\sum_{\gamma}u}$. This line is the
charged object under the dual magnetic symmetry. To compare to our starting
point, we can rename $\hat{n}=b_{e}+2n$, $a=\frac{1}{2}\hat{a}$, and
$\tilde{a}+2\pi u=2\hat{\tilde{a}}$. The action becomes Eq. (145) with hatted
variables and a rescaled gauge coupling $\hat{\beta}=\frac{1}{4}\beta$. Hence
we return back to $U(1)\rtimes\mathbb{Z}_{4}$ but with a rescaled coupling.

Finally, if gauge the diagonal
$\mathbb{Z}_{2,d}\subset\mathbb{Z}_{2,e}^{(1)}\times\mathbb{Z}_{2,c}^{(1)}$,
we get $Pin^{-}(2)=\frac{U(1)\rtimes\mathbb{Z}_{4}}{\mathbb{Z}_{2}}$. We can
write the action as

$S_{Pin^{-}(2)}=\frac{\beta}{2}\sum_{\text{plaq.}}(d_{\mathsf{c}^{2}}a-\pi
b_{d}-2\pi n)^{2}+i\sum_{\text{hyper-
cu.}}\left(d_{\mathsf{c}^{2}}n+\frac{1}{2}d_{\mathsf{c}^{2}}b_{d}\right)\cup_{\mathsf{c}^{2}}\tilde{a}\\\
+\frac{i\pi}{2}\sum_{\text{hyper-cu.}}(dc-2b_{d})\cup(v-du)\,,$ (151)

where $b\in\mathcal{C}^{2}(\Lambda,\mathbb{Z}_{2})$ and
$u\in\mathcal{C}^{1}(\Lambda,\mathbb{Z}_{2})$ is a Lagrange multiplier setting
$b$ to be a flat $\mathbb{Z}_{2}$ gauge field. The gauge redundancies now
involve

$a\to a+\pi v_{d}\,,\ n\to n-\overline{c}\cup v_{d}\,,\ c\to
c+2v_{d}\,,b_{d}\to b_{d}+dv_{d}\,,\ $ (152)

as well as

$\tilde{a}\to\tilde{a}+2\pi\tilde{m}\,,\ v\to v+dt\,,\ u\to u+\tilde{m}+t\,.$
(153)

To rewrite the action in a more familiar form we again define
$\hat{n}=b_{d}+2n$, $a=\frac{1}{2}\hat{a}$, and $\tilde{a}+2\pi
u=2\hat{\tilde{a}}$. The action becomes

$S_{Pin^{-}(2)}=\frac{\hat{\beta}}{2}\sum_{\text{plaq.}}(d_{\mathsf{c}^{2}}\hat{a}-2\pi\hat{n})^{2}+i\sum_{\text{hyper-
cu.}}\left(d_{\mathsf{c}^{2}}\hat{n}\right)\cup_{\mathsf{c}^{2}}\hat{\tilde{a}}+\frac{i\pi}{2}\sum_{\text{hyper-
cu.}}(dc-2\hat{n})\cup v\,,$ (154)

where $\hat{\beta}=\frac{1}{4}\beta$. This resembles $O(2)$ gauge theory
except that integrating out $v$ gives the constraint

$dc=2\hat{n}\text{ mod }4.$ (155)

The gauge transformation properties are also intertwined relative to the
$O(2)$ case,

$\hat{a}\to\hat{a}+2\pi m\,,\ \hat{n}\to\hat{n}+d_{\mathsf{c}^{2}}m\,,\ c\to
c+2m\,,\ \hat{\tilde{a}}\to\hat{\tilde{a}}+2\pi\tilde{m}+\pi t,\ v\to v+dt\,.$
(156)

One can see that the genuine ’t Hooft lines in the theory are still of the
form $e^{2i\sum_{\gamma}\hat{\tilde{a}}}$, while the ‘fractional’ ’t Hooft
lines must be attached to surfaces built from $v$, of the form
$e^{i\sum_{\partial\sigma}\hat{\tilde{a}}+i\pi\sum_{\sigma}v}$. We therefore
_do not_ have a dual magnetic symmetry. This can also be seen from the
constraint in Eq. (155), since the mod-2 magnetic charge

$e^{i\pi\sum_{p\in S}\hat{n}_{p}}=e^{\frac{i\pi}{2}\sum_{p\in S}(dc)_{p}}=1$
(157)

is always trivial.

The $Pin^{-}(2)$ theory does have a residual electric symmetry, generated by
the charge-2 twist vortex. While the minimal twist vortex
$e^{\frac{i\pi}{2}\sum_{\Gamma}v}$ sets
$dc=\star[\Gamma^{\vee}]+2\hat{n}\text{ mod }4$ and requires worldvolume
degrees of freedom, the charge-2 twist vortex preserves flatness mod 2 which
keeps the action gauge invariant. Moreover, this charge-2 twist vortex is
topological, and generates the residual $\mathbb{Z}_{2}^{(1)}$ symmetry that
acts on the gauge-invariant combination

$W_{1/2}(\gamma)e^{-i\frac{\pi}{2}\sum_{\gamma}c}\,.$ (158)

Finally, the theory also has a $\mathbb{Z}_{2,v}^{(2)}$ symmetry generated by
$e^{i\pi\sum_{\gamma}c}$ which counts twist vortices mod 2.

We can also move between the $Pin^{-}(2)$ and $O(2)$ theories via generalized
gauging. Starting with $Pin^{-}(2)$, we simply gauge the residual
$\mathbb{Z}_{2}^{(1)}$ symmetry to get $O(2)$. Going in the other direction is
more subtle — we have to gauge the magnetic $\mathbb{Z}_{2,m}^{(d-3)}$
symmetry with a particular fractionalization class activated by
$\mathbb{Z}_{2,v}^{(d-2)}$, namely $B_{v}=\frac{1}{2}dB_{m}$. This amounts to
gauging the magnetic symmetry by adding the terms

$i\pi\sum_{\text{hyper-cu.}}n\cup b_{m}+\frac{i\pi}{2}\sum_{\text{hyper-
cu.}}c\cup db_{m}+i\pi\sum_{\text{hyper-cu.}}h\cup db_{m}\\\
=\frac{i\pi}{2}\sum_{\text{hyper-cu.}}(d(c+2h)-2n)\cup(b_{m}+2v)\,,$ (159)

with $h\in\mathcal{C}^{1}(\Lambda,\mathbb{Z}_{2})$ and
$b_{m}\in\mathcal{C}^{2}(\Lambda,\mathbb{Z}_{2})$. Note that the combination
$\hat{c}=c+2h$ combines to an element of
$\mathcal{C}^{2}(\Lambda,\mathbb{Z}_{4})$, so we have effectively extended the
gauge field from $\mathbb{Z}_{2}\to\mathbb{Z}_{4}$. Defining
$\hat{v}=b_{m}+2v$, the action becomes equivalent to Eq. (154).

## References

  * [1] S. Gukov and A. Kapustin, “Topological Quantum Field Theory, Nonlocal Operators, and Gapped Phases of Gauge Theories,” arXiv:1307.4793 [hep-th].
  * [2] A. Kapustin and R. Thorngren, “Topological Field Theory on a Lattice, Discrete Theta-Angles and Confinement,” Adv. Theor. Math. Phys. 18 no. 5, (2014) 1233–1247, arXiv:1308.2926 [hep-th].
  * [3] A. Kapustin and R. Thorngren, “Higher symmetry and gapped phases of gauge theories,” arXiv:1309.4721 [hep-th].
  * [4] A. Kapustin and N. Seiberg, “Coupling a QFT to a TQFT and Duality,” JHEP 04 (2014) 001, arXiv:1401.0740 [hep-th].
  * [5] D. Gaiotto, A. Kapustin, N. Seiberg, and B. Willett, “Generalized Global Symmetries,” JHEP 02 (2015) 172, arXiv:1412.5148 [hep-th].
  * [6] F. Wegner, “Duality in Generalized Ising Models and Phase Transitions Without Local Order Parameters,” J. Math. Phys. 12 (1971) 2259–2272.
  * [7] K. G. Wilson, “Confinement of Quarks,” Phys. Rev. D 10 (1974) 2445–2459.
  * [8] E. H. Fradkin and S. H. Shenker, “Phase Diagrams of Lattice Gauge Theories with Higgs Fields,” Phys. Rev. D 19 (1979) 3682–3697.
  * [9] G. Mack and V. B. Petkova, “Z2 Monopoles in the Standard SU(2) Lattice Gauge Theory Model,” Z. Phys. C 12 (1982) 177.
  * [10] J. Polchinski, “ORDER PARAMETERS IN A MODIFIED LATTICE GAUGE THEORY,” Phys. Rev. D 25 (1982) 3325.
  * [11] J. Greensite, “Confinement from Center Vortices: A review of old and new results,” EPJ Web Conf. 137 (2017) 01009, arXiv:1610.06221 [hep-lat].
  * [12] E. Sharpe, “Notes on generalized global symmetries in QFT,” Fortsch. Phys. 63 (2015) 659–682, arXiv:1508.04770 [hep-th].
  * [13] C. Cordova, T. T. Dumitrescu, K. Intriligator, and S.-H. Shao, “Snowmass White Paper: Generalized Symmetries in Quantum Field Theory and Beyond,” in 2022 Snowmass Summer Study.  5, 2022.  arXiv:2205.09545 [hep-th].
  * [14] J. McGreevy, “Generalized Symmetries in Condensed Matter,” arXiv:2204.03045 [cond-mat.str-el].
  * [15] T. D. Brennan and S. Hong, “Introduction to generalized global symmetries in qft and particle physics,” arXiv:2306.00912 [hep-ph].
  * [16] S. Schafer-Nameki, “ICTP lectures on (non-)invertible generalized symmetries,” Phys. Rept. 1063 (2024) 1–55, arXiv:2305.18296 [hep-th].
  * [17] R. Luo, Q.-R. Wang, and Y.-N. Wang, “Lecture notes on generalized symmetries and applications,” arXiv:2307.09215 [hep-th].
  * [18] L. Bhardwaj, L. E. Bottini, L. Fraser-Taliente, L. Gladden, D. S. W. Gould, A. Platschorre, and H. Tillim, “Lectures on generalized symmetries,” Phys. Rept. 1051 (2024) 1–87, arXiv:2307.07547 [hep-th].
  * [19] S.-H. Shao, “What’s Done Cannot Be Undone: TASI Lectures on Non-Invertible Symmetries,” arXiv:2308.00747 [hep-th].
  * [20] D. Aasen, R. S. K. Mong, and P. Fendley, “Topological Defects on the Lattice I: The Ising model,” J. Phys. A 49 no. 35, (2016) 354001, arXiv:1601.07185 [cond-mat.stat-mech].
  * [21] D. Aasen, P. Fendley, and R. S. Mong, “Topological Defects on the Lattice: Dualities and Degeneracies,” arXiv:2008.08598 [cond-mat.stat-mech].
  * [22] M. Koide, Y. Nagoya, and S. Yamaguchi, “Non-invertible topological defects in 4-dimensional $\mathbb{Z}_{2}$ pure lattice gauge theory,” PTEP 2022 no. 1, (2022) 013B03, arXiv:2109.05992 [hep-th].
  * [23] M. Nguyen, Y. Tanizaki, and M. Ünsal, “Semi-Abelian gauge theories, non-invertible symmetries, and string tensions beyond $N$-ality,” JHEP 03 (2021) 238, arXiv:2101.02227 [hep-th].
  * [24] M. Nguyen, Y. Tanizaki, and M. Ünsal, “Noninvertible 1-form symmetry and Casimir scaling in 2D Yang-Mills theory,” Phys. Rev. D 104 no. 6, (2021) 065003, arXiv:2104.01824 [hep-th].
  * [25] A. Cherman, T. Jacobson, and M. Neuzil, “Universal Deformations,” SciPost Phys. 12 no. 4, (2022) 116, arXiv:2111.00078 [hep-th].
  * [26] Y. Choi, C. Cordova, P.-S. Hsin, H. T. Lam, and S.-H. Shao, “Noninvertible duality defects in 3+1 dimensions,” Phys. Rev. D 105 no. 12, (2022) 125016, arXiv:2111.01139 [hep-th].
  * [27] Y. Hayashi and Y. Tanizaki, “Non-invertible self-duality defects of Cardy-Rabinovici model and mixed gravitational anomaly,” JHEP 08 (2022) 036, arXiv:2204.07440 [hep-th].
  * [28] A. Cherman, T. Jacobson, and M. Neuzil, “1-form symmetry versus large N QCD,” JHEP 02 (2023) 192, arXiv:2209.00027 [hep-th].
  * [29] A. Apte, C. Cordova, and H. T. Lam, “Obstructions to gapped phases from noninvertible symmetries,” Phys. Rev. B 108 no. 4, (2023) 045134, arXiv:2212.14605 [hep-th].
  * [30] N. Kan, O. Morikawa, Y. Nagoya, and H. Wada, “Higher-group structure in lattice Abelian gauge theory under instanton-sum modification,” Eur. Phys. J. C 83 no. 6, (2023) 481, arXiv:2302.13466 [hep-th]. [Erratum: Eur.Phys.J.C 84, 22 (2024)].
  * [31] M. Abe, O. Morikawa, S. Onoda, H. Suzuki, and Y. Tanizaki, “Topology of $SU(N)$ lattice gauge theories coupled with $\mathbb{Z}_{N}$$2$-form gauge fields,” arXiv:2303.10977 [hep-lat].
  * [32] K. Inamura and K. Ohmori, “Fusion Surface Models: 2+1d Lattice Models from Fusion 2-Categories,” arXiv:2305.05774 [cond-mat.str-el].
  * [33] C. Cordova, P.-S. Hsin, and C. Zhang, “Anomalies of Non-Invertible Symmetries in (3+1)d,” arXiv:2308.11706 [hep-th].
  * [34] D. Berenstein and P. N. T. Lloyd, “One dimensional Staggered Bosons, Clock models and their non-invertible symmetries,” arXiv:2311.00057 [hep-th].
  * [35] E. Berkowitz, A. Cherman, and T. Jacobson, “Exact lattice chiral symmetry in 2d gauge theory,” arXiv:2310.17539 [hep-lat].
  * [36] Y. Honda, O. Morikawa, S. Onoda, and H. Suzuki, “Lattice realization of the axial $U(1)$ non-invertible symmetry,” arXiv:2401.01331 [hep-lat].
  * [37] K. Inamura, “On lattice models of gapped phases with fusion category symmetries,” JHEP 03 (2022) 036, arXiv:2110.12882 [cond-mat.str-el].
  * [38] M. Barkeshli, Y.-A. Chen, S.-J. Huang, R. Kobayashi, N. Tantivasadakarn, and G. Zhu, “Codimension-2 defects and higher symmetries in (3+1)D topological phases,” SciPost Phys. 14 no. 4, (2023) 065, arXiv:2208.07367 [cond-mat.str-el].
  * [39] M. Barkeshli, P.-S. Hsin, and R. Kobayashi, “Higher-group symmetry of (3+1)D fermionic $\mathbb{Z}_{2}$ gauge theory: logical CCZ, CS, and T gates from higher symmetry,” arXiv:2311.05674 [cond-mat.str-el].
  * [40] M. Barkeshli, Y.-A. Chen, P.-S. Hsin, and R. Kobayashi, “Higher-group symmetry in finite gauge theory and stabilizer codes,” arXiv:2211.11764 [cond-mat.str-el].
  * [41] H. Moradi, O. M. Aksoy, J. H. Bardarson, and A. Tiwari, “Symmetry fractionalization, mixed-anomalies and dualities in quantum spin models with generalized symmetries,” arXiv:2307.01266 [cond-mat.str-el].
  * [42] N. Seiberg and S.-H. Shao, “Majorana chain and Ising model – (non-invertible) translations, anomalies, and emanant symmetries,” SciPost Phys. 16 (2024) 064, arXiv:2307.02534 [cond-mat.str-el].
  * [43] S. Seifnashri, “Lieb-Schultz-Mattis anomalies as obstructions to gauging (non-on-site) symmetries,” SciPost Phys. 16 no. 4, (2024) 098, arXiv:2308.05151 [cond-mat.str-el].
  * [44] N. Seiberg, S. Seifnashri, and S.-H. Shao, “Non-invertible symmetries and LSM-type constraints on a tensor product Hilbert space,” arXiv:2401.12281 [cond-mat.str-el].
  * [45] S. Seifnashri and S.-H. Shao, “Cluster state as a non-invertible symmetry protected topological phase,” arXiv:2404.01369 [cond-mat.str-el].
  * [46] C. Delcamp and A. Tiwari, “Higher categorical symmetries and gauging in two-dimensional spin systems,” SciPost Phys. 16 no. 4, (2024) 110, arXiv:2301.01259 [hep-th].
  * [47] C. Fechisin, N. Tantivasadakarn, and V. V. Albert, “Non-invertible symmetry-protected topological order in a group-based cluster state,” arXiv:2312.09272 [cond-mat.str-el].
  * [48] M. Sinha, F. Yan, L. Grans-Samuelsson, A. Roy, and H. Saleur, “Lattice Realizations of Topological Defects in the critical (1+1)-d Three-State Potts Model,” arXiv:2310.19703 [hep-th].
  * [49] D.-C. Lu, Z. Sun, and Y.-Z. You, “Realizing triality and $p$-ality by lattice twisted gauging in (1+1)d quantum spin systems,” arXiv:2405.14939 [cond-mat.str-el].
  * [50] L. Bhardwaj, L. E. Bottini, S. Schafer-Nameki, and A. Tiwari, “Illustrating the Categorical Landau Paradigm in Lattice Models,” arXiv:2405.05302 [cond-mat.str-el].
  * [51] L. Bhardwaj, L. E. Bottini, S. Schafer-Nameki, and A. Tiwari, “Lattice Models for Phases and Transitions with Non-Invertible Symmetries,” arXiv:2405.05964 [cond-mat.str-el].
  * [52] A. Chatterjee, O. M. Aksoy, and X.-G. Wen, “Quantum Phases and Transitions in Spin Chains with Non-Invertible Symmetries,” arXiv:2405.05331 [cond-mat.str-el].
  * [53] Y. Choi, Y. Sanghavi, S.-H. Shao, and Y. Zheng, “Non-invertible and higher-form symmetries in 2+1d lattice gauge theories,” arXiv:2405.13105 [cond-mat.str-el].
  * [54] P.-S. Hsin, R. Kobayashi, and C. Zhang, “Fractionalization of Coset Non-Invertible Symmetry and Exotic Hall Conductance,” arXiv:2405.20401 [cond-mat.str-el].
  * [55] W. Cao, L. Li, and M. Yamazaki, “Generating Lattice Non-invertible Symmetries,” arXiv:2406.05454 [cond-mat.str-el].
  * [56] K. Roumpedakis, S. Seifnashri, and S.-H. Shao, “Higher Gauging and Non-invertible Condensation Defects,” arXiv:2204.02407 [hep-th].
  * [57] J. E. Kiskis, “Disconnected Gauge Groups and the Global Violation of Charge Conservation,” Phys. Rev. D 17 (1978) 3196.
  * [58] A. S. Schwarz, “FIELD THEORIES WITH NO LOCAL CONSERVATION OF THE ELECTRIC CHARGE,” Nucl. Phys. B 208 (1982) 141–158.
  * [59] M. G. Alford, J. March-Russell, and F. Wilczek, “Discrete Quantum Hair on Black Holes and the Nonabelian Aharonov-Bohm Effect,” Nucl. Phys. B 337 (1990) 695–708.
  * [60] M. G. Alford, K. Benson, S. R. Coleman, J. March-Russell, and F. Wilczek, “The Interactions and Excitations of Nonabelian Vortices,” Phys. Rev. Lett. 64 (1990) 1632. [Erratum: Phys.Rev.Lett. 65, 668 (1990)].
  * [61] M. G. Alford, K. Benson, S. R. Coleman, J. March-Russell, and F. Wilczek, “Zero modes of nonabelian vortices,” Nucl. Phys. B 349 (1991) 414–438.
  * [62] J. Preskill and L. M. Krauss, “Local discrete symmetry and quantum mechanical hair,” Nucl. Phys. B341 (1990) 50–100.
  * [63] M. Bucher, H.-K. Lo, and J. Preskill, “Topological approach to Alice electrodynamics,” Nucl. Phys. B 386 (1992) 3–26, arXiv:hep-th/9112039.
  * [64] M. Bucher, K.-M. Lee, and J. Preskill, “On detecting discrete Cheshire charge,” Nucl. Phys. B 386 (1992) 27–42, arXiv:hep-th/9112040.
  * [65] M. G. Alford, K.-M. Lee, J. March-Russell, and J. Preskill, “Quantum field theory of nonAbelian strings and vortices,” Nucl. Phys. B 384 (1992) 251–317, arXiv:hep-th/9112038.
  * [66] M. Barkeshli and X.-G. Wen, “U(1) x U(1) x Z(2) Chern-Simons Theory and Z(4) Parafermion Fractional Quantum Hall States,” Phys. Rev. B 81 (2010) 045323, arXiv:0909.4882 [cond-mat.str-el].
  * [67] J. C. Y. Teo, T. L. Hughes, and E. Fradkin, “Theory of Twist Liquids: Gauging an Anyonic Symmetry,” Annals Phys. 360 (2015) 349–445, arXiv:1503.06812 [cond-mat.str-el].
  * [68] P. C. Argyres and M. Martone, “4d $\mathcal{N}$ =2 theories with disconnected gauge groups,” JHEP 03 (2017) 145, arXiv:1611.08602 [hep-th].
  * [69] C. Cordova, P.-S. Hsin, and N. Seiberg, “Global Symmetries, Counterterms, and Duality in Chern-Simons Matter Theories with Orthogonal Gauge Groups,” SciPost Phys. 4 no. 4, (2018) 021, arXiv:1711.10008 [hep-th].
  * [70] A. Bourget, A. Pini, and D. Rodríguez-Gómez, “Gauge theories from principally extended disconnected gauge groups,” Nucl. Phys. B 940 (2019) 351–376, arXiv:1804.01108 [hep-th].
  * [71] B. Henning, X. Lu, T. Melia, and H. Murayama, “Outer automorphism anomalies,” JHEP 02 (2022) 094, arXiv:2111.04728 [hep-th].
  * [72] B. Heidenreich, J. McNamara, M. Montero, M. Reece, T. Rudelius, and I. Valenzuela, “Non-invertible global symmetries and completeness of the spectrum,” JHEP 09 (2021) 203, arXiv:2104.07036 [hep-th].
  * [73] L. Bhardwaj and D. S. W. Gould, “Disconnected 0-form and 2-group symmetries,” JHEP 07 (2023) 098, arXiv:2206.01287 [hep-th].
  * [74] G. Arias-Tamargo and M. De Marco, “Disconnected gauge groups in the infrared,” arXiv:2312.13360 [hep-th].
  * [75] J. Villain, “Theory of one- and two-dimensional magnets with an easy magnetization plane. ii. the planar, classical, two-dimensional magnet,” J. Phys. France 36 no. 6, (1975) 581–590.
  * [76] T. Sulejmanpasic and C. Gattringer, “Abelian gauge theories on the lattice: $\theta$-terms and compact gauge theory with(out) monopoles,” Nucl. Phys. B943 (2019) 114616, arXiv:1901.02637 [hep-lat].
  * [77] P. Gorantla, H. T. Lam, N. Seiberg, and S.-H. Shao, “A modified Villain formulation of fractons and other exotic theories,” J. Math. Phys. 62 no. 10, (2021) 102301, arXiv:2103.01257 [cond-mat.str-el].
  * [78] J.-Y. Chen, “Abelian Topological Order on Lattice Enriched with Electromagnetic Background,” Commun. Math. Phys. 381 no. 1, (2021) 293–377, arXiv:1902.06756 [cond-mat.str-el].
  * [79] P. Gorantla, H. T. Lam, N. Seiberg, and S.-H. Shao, “Low-energy limit of some exotic lattice theories and UV/IR mixing,” Phys. Rev. B 104 no. 23, (2021) 235116, arXiv:2108.00020 [cond-mat.str-el].
  * [80] P. Gorantla, H. T. Lam, N. Seiberg, and S.-H. Shao, “Global dipole symmetry, compact Lifshitz theory, tensor gauge theory, and fractons,” Phys. Rev. B 106 no. 4, (2022) 045112, arXiv:2201.10589 [cond-mat.str-el].
  * [81] P. Gorantla, H. T. Lam, N. Seiberg, and S.-H. Shao, “(2+1)-dimensional compact Lifshitz theory, tensor gauge theory, and fractons,” Phys. Rev. B 108 no. 7, (2023) 075106, arXiv:2209.10030 [cond-mat.str-el].
  * [82] M. Anosova, C. Gattringer”, N. Iqbal, and T. Sulejmanpasic, “Numerical simulation of self-dual U(1) lattice field theory with electric and magnetic matter,” PoS LATTICE2021 (2022) 386, arXiv:2111.02033 [hep-lat].
  * [83] M. Anosova, C. Gattringer, N. Iqbal, and T. Sulejmanpasic, “Phase structure of self-dual lattice gauge theories in 4d,” JHEP 06 (2022) 149, arXiv:2203.14774 [hep-th].
  * [84] M. Anosova, C. Gattringer, and T. Sulejmanpasic, “Self-dual U(1) lattice field theory with a $\theta$-term,” JHEP 04 (2022) 120, arXiv:2201.09468 [hep-lat].
  * [85] T. Jacobson and T. Sulejmanpasic, “Modified Villain formulation of Abelian Chern-Simons theory,” Phys. Rev. D 107 no. 12, (2023) 125017, arXiv:2303.06160 [hep-th].
  * [86] A. Cherman, T. Jacobson, S. Sen, and L. G. Yaffe, “Line operators, vortex statistics, and Higgs versus confinement dynamics,” arXiv:2401.17489 [hep-th].
  * [87] L. Fazza and T. Sulejmanpasic, “Lattice Quantum Villain Hamiltonians: Compact scalars, $U(1)$ gauge theories, fracton models and Quantum Ising model dualities,” arXiv:2211.13047 [hep-th].
  * [88] M. Yoneda, “Equivalence of the modified Villain formulation and the dual Hamiltonian method in the duality of the XY-plaquette model,” arXiv:2211.01632 [hep-th].
  * [89] M. Cheng and N. Seiberg, “Lieb-Schultz-Mattis, Luttinger, and ’t Hooft – anomaly matching in lattice systems,” arXiv:2211.12543 [cond-mat.str-el].
  * [90] R. Thorngren, T. Rakovszky, R. Verresen, and A. Vishwanath, “Higgs Condensates are Symmetry-Protected Topological Phases: II. $U(1)$ Gauge Theory and Superconductors,” arXiv:2303.08136 [cond-mat.str-el].
  * [91] T. Jacobson and T. Sulejmanpasic, “Canonical quantization of lattice Chern-Simons theory,” arXiv:2401.09597 [hep-th].
  * [92] M. Nguyen, T. Sulejmanpasic, and M. Ünsal, “Phases of theories with $\mathbb{Z}_{N}$ 1-form symmetry and the roles of center vortices and magnetic monopoles,” arXiv:2401.04800 [hep-th].
  * [93] J.-Y. Chen, “Instanton Density Operator in Lattice QCD from Higher Category Theory,” arXiv:2406.06673 [hep-lat].
  * [94] P.-S. Hsin and A. Turzillo, “Symmetry-enriched quantum spin liquids in (3 + 1)$d$,” JHEP 09 (2020) 022, arXiv:1904.11550 [cond-mat.str-el].
  * [95] D. V. Else and C. Nayak, “Cheshire charge in (3+1)-dimensional topological phases,” Phys. Rev. B 96 no. 4, (2017) 045136, arXiv:1702.02148 [cond-mat.str-el].
  * [96] D. Gaiotto and T. Johnson-Freyd, “Condensations in higher categories,” arXiv:1905.09566 [math.CT].
  * [97] N. Tantivasadakarn and X. Chen, “String operators for Cheshire strings in topological phases,” arXiv:2307.03180 [cond-mat.str-el].
  * [98] R. Thorngren and Y. Wang, “Fusion Category Symmetry II: Categoriosities at $c$ = 1 and Beyond,” arXiv:2106.12577 [hep-th].
  * [99] E. Sharpe, “Topological operators, noninvertible symmetries and decomposition,” arXiv:2108.13423 [hep-th].
  * [100] L. Bhardwaj, L. E. Bottini, S. Schafer-Nameki, and A. Tiwari, “Non-invertible higher-categorical symmetries,” SciPost Phys. 14 no. 1, (2023) 007, arXiv:2204.06564 [hep-th].
  * [101] G. Arias-Tamargo and D. Rodriguez-Gomez, “Non-invertible symmetries from discrete gauging and completeness of the spectrum,” JHEP 04 (2023) 093, arXiv:2204.07523 [hep-th].
  * [102] A. Antinucci, G. Galati, and G. Rizi, “On continuous 2-category symmetries and Yang-Mills theory,” JHEP 12 (2022) 061, arXiv:2206.05646 [hep-th].
  * [103] J. A. Damia, R. Argurio, and S. Chaudhuri, “When the moduli space is an orbifold: spontaneous breaking of continuous non-invertible symmetries,” JHEP 03 (2024) 042, arXiv:2309.06491 [hep-th].
  * [104] M. Gutperle, Y.-Y. Li, D. Rathore, and K. Roumpedakis, “Non-invertible symmetries in $S_{N}$ orbifold CFTs and holography,” arXiv:2405.15693 [hep-th].
  * [105] D. M. Hofman and S. Vitouladitis, “Generalised symmetries and state-operator correspondence for nonlocal operators,” arXiv:2406.02662 [hep-th].
  * [106] Y.-A. Chen and S. Tata, “Higher cup products on hypercubic lattices: application to lattice models of topological phases,” arXiv:2106.05274 [cond-mat.str-el].
  * [107] F. Benini, C. Cordova, and P.-S. Hsin, “On 2-Group Global Symmetries and Their Anomalies,” arXiv:1803.09336 [hep-th].
  * [108] F. A. Bais and J. C. Romers, “Anyonic order parameters for discrete gauge theories on the lattice,” Annals Phys. 324 (2009) 1168–1175, arXiv:0812.2256 [cond-mat.mes-hall].
  * [109] Y. Choi, C. Cordova, P.-S. Hsin, H. T. Lam, and S.-H. Shao, “Non-invertible Condensation, Duality, and Triality Defects in 3+1 Dimensions,” arXiv:2204.09025 [hep-th].
  * [110] Y. Tachikawa, “On gauging finite subgroups,” SciPost Phys. 8 no. 1, (2020) 015, arXiv:1712.09542 [hep-th].
  * [111] C. Gattringer, D. Göschl, and T. Sulejmanpasic, “Dual simulation of the 2d U(1) gauge Higgs model at topological angle $\theta=\pi\,$: Critical endpoint behavior,” Nucl. Phys. B935 (2018) 344–364, arXiv:1807.07793 [hep-lat].
  * [112] Y. D. Mercado, C. Gattringer, and A. Schmidt, “Surface worm algorithm for abelian gauge?higgs systems on the lattice,” Computer Physics Communications 184 no. 6, (June, 2013) 1535?1546. http://dx.doi.org/10.1016/j.cpc.2013.02.001.
  * [113] C. Córdova, T. T. Dumitrescu, and K. Intriligator, “Exploring 2-Group global symmetries,” arXiv:1802.04790 [hep-th].
  * [114] C. G. Callan, Jr. and J. A. Harvey, “Anomalies and Fermion Zero Modes on Strings and Domain Walls,” Nucl. Phys. B250 (1985) 427–436.
  * [115] J. Kaidi, K. Ohmori, and Y. Zheng, “Symmetry TFTs for Non-Invertible Defects,” arXiv:2209.11062 [hep-th].
  * [116] D. Gaiotto, A. Kapustin, Z. Komargodski, and N. Seiberg, “Theta, time reversal, and temperature,” JHEP 05 (2017) 091, arXiv:1703.00501 [hep-th].
  * [117] Y. Kikuchi and Y. Tanizaki, “Global inconsistency, ’t Hooft anomaly, and level crossing in quantum mechanics,” Prog. Theor. Exp. Phys. 2017 (2017) 113B05, arXiv:1708.01962 [hep-th].
  * [118] C. Córdova, D. S. Freed, H. T. Lam, and N. Seiberg, “Anomalies in the Space of Coupling Constants and Their Dynamical Applications I,” SciPost Phys. 8 no. 1, (2020) 001, arXiv:1905.09315 [hep-th].
  * [119] C.-M. Chang, Y.-H. Lin, S.-H. Shao, Y. Wang, and X. Yin, “Topological Defect Lines and Renormalization Group Flows in Two Dimensions,” JHEP 01 (2019) 026, arXiv:1802.04445 [hep-th].
  * [120] T. Rudelius and S.-H. Shao, “Topological Operators and Completeness of Spectrum in Discrete Gauge Theories,” JHEP 12 (2020) 172, arXiv:2006.10052 [hep-th].
  * [121] A. H. Guth, “Existence proof of a nonconfining phase in four-dimensional u(1) lattice gauge theory,” Phys. Rev. D 21 (Apr, 1980) 2291–2307. https://link.aps.org/doi/10.1103/PhysRevD.21.2291.
  * [122] G. Arnold, B. Bunk, T. Lippert, and K. Schilling, “Compact QED under scrutiny: It’s first order,” Nucl. Phys. B Proc. Suppl. 119 (2003) 864–866, arXiv:hep-lat/0210010.
  * [123] A. Cherman and T. Jacobson, “Emergent 1-form symmetries,” arXiv:2304.13751 [hep-th].
  * [124] M. Creutz, L. Jacobs, and C. Rebbi, “Experiments with a gauge-invariant ising system,” Phys. Rev. Lett. 42 (May, 1979) 1390–1393. https://link.aps.org/doi/10.1103/PhysRevLett.42.1390.
  * [125] M. Creutz, L. Jacobs, and C. Rebbi, “Monte carlo study of abelian lattice gauge theories,” Phys. Rev. D 20 (Oct, 1979) 1915–1922. https://link.aps.org/doi/10.1103/PhysRevD.20.1915.
  * [126] R. Thorngren and Y. Wang, “Fusion category symmetry. Part I. Anomaly in-flow and gapped phases,” JHEP 04 (2024) 132, arXiv:1912.02817 [hep-th].
  * [127] J. Kaidi, E. Nardoni, G. Zafrir, and Y. Zheng, “Symmetry TFTs and anomalies of non-invertible symmetries,” JHEP 10 (2023) 053, arXiv:2301.07112 [hep-th].
  * [128] C. Zhang and C. Córdova, “Anomalies of $(1+1)D$ categorical symmetries,” arXiv:2304.01262 [cond-mat.str-el].
  * [129] Y. Choi, B. C. Rayhaun, Y. Sanghavi, and S.-H. Shao, “Remarks on boundaries, anomalies, and noninvertible symmetries,” Phys. Rev. D 108 no. 12, (2023) 125005, arXiv:2305.09713 [hep-th].
  * [130] A. Antinucci, F. Benini, C. Copetti, G. Galati, and G. Rizi, “Anomalies of non-invertible self-duality symmetries: fractionalization and gauging,” arXiv:2308.11707 [hep-th].
  * [131] C. Cordova and D. García-Sepúlveda, “Non-Invertible Anyon Condensation and Level-Rank Dualities,” arXiv:2312.16317 [hep-th].


# PAANet: Progressive Alternating Attention for Automatic Medical Image
Segmentation

Abhishek Srivastava1, Sukalpa Chanda2, Debesh Jha34, Michael A. Riegler34,
Pål Halvorsen35, Dag Johansen4, Umapada Pal1  1Indian Statistical Institute,
Kolkata, India 2Østfold University College, Norway 3SimulaMet, Norway
4UiT The Arctic University of Norway, Norway 5Oslo Metropolitan University,
Norway
Email<EMAIL_ADDRESS>
###### Abstract

Medical image segmentation can provide detailed information for clinical
analysis which can be useful for scenarios where the detailed location of a
finding is important. Knowing the location of a disease can play a vital role
in treatment and decision-making. Convolutional neural network (CNN) based
encoder-decoder techniques have advanced the performance of automated medical
image segmentation systems. Several such CNN-based methodologies utilize
techniques such as spatial- and channel-wise attention to enhance performance.
Another technique that has drawn attention in recent years is residual dense
blocks (RDBs). The successive convolutional layers in densely connected blocks
are capable of extracting diverse features with varied receptive fields and
thus, enhancing performance. However, consecutive stacked convolutional
operators may not necessarily generate features that facilitate the
identification of the target structures. In this paper, we propose a
progressive alternating attention network (PAANet). We develop progressive
alternating attention dense (PAAD) blocks, which construct a guiding attention
map (GAM) after every convolutional layer in the dense blocks using features
from all scales. The GAM allows the following layers in the dense blocks to
focus on the spatial locations relevant to the target region. Every alternate
PAAD block inverts the GAM to generate a reverse attention map which guides
ensuing layers to extract boundary and edge-related information, refining the
segmentation process. Our experiments on three different biomedical image
segmentation datasets exhibit that our PAANet achieves favorable performance
when compared to other state-of-the-art methods.

###### Index Terms:

Medical image segmentation, convolutional neural network, attention, polyp,
instruments, skin lesion, nuclie

††publicationid: pubid: 978-1-6654-0810-3/21/$31.00 © 2021 IEEE

##  I Introduction

Medical image segmentation based on deep learning methods have garnered a lot
of attention during the past few years. In this context, to generate
segmentation datasets, manual annotation of images to identify and locate the
region-of-interest is a time consuming task. The accuracy of such annotation
depends upon the expertise of the medical professionals making it prone to
undesired oversights. Convolutional Neural Network (CNN) based techniques for
delineation of desired anatomical regions from medical images have been proven
to be effective. Methods like U-Net [1], U-Net++ [2], ResUNet++ [3],
DoubleUNet [4] PraNet [5], and Attention U-Net [6] have served as baseline
approaches achieving good segmentation performance. Attention mechanisms have
served as an integral component in such methods. Attention U-Net uses the deep
features from lower levels of the decoder to generate spatial attention maps,
which are in turn used to prune irrelevant features from skip-connections.
ResUNet++ [3] used the squeeze and excitation block [7] to model inter-
dependencies between the channels to suppress irrelevant and enhance relevant
channels. FED-Net [8] introduced feature fusion blocks which applied a
combination of spatial- and channel-wise attention to increase the network’s
segmentation ability. Different combinations of channel and spatial attention
at various stages of the encoder-decoder structure have also been used in
FocusNet [9] and MSRF-Net [10]. PNS-Net [11] designed a self-attention
mechanism for video polyp segmentation to utilize both temporal and spatial
features. PraNet [5] used reverse attention by generating an initial global
guiding map which was later used for mining boundary cues. Another familiar
technique for image segmentation in both medical imaging and natural computer
vision is residual dense blocks (RDBs) [12, 13, 14, 15]. The main advantage
offered by RDBs is the combination of features obtained by both high- and low-
receptive fields. These advantages motivated many works to incorporate RDBs in
encoder-decoder based architectures [16, 17, 18]. An important aspect of RDBs
is that multiple convolutional layers with a smaller number of output channels
are stacked on top of each other. This allows to progressively increase the
receptive field while maintaining relevant low-level features. However, the
feature maps produced by such consecutive convolutional layers rely on the
gradients received by the successive decoder layers for capturing the region
of interest. Providing additional intermediate supervision for each
convolutional layer within an RDB may help in generation of meaningful and
informative features.

Figure 1: The architecture of our Progressive Alternative Attention Dense
(PAAD) block Figure 2: Overview of the complete PAANet architecture.

In this work, we introduce a novel progressive alternating attention dense
block (PAAD). After each convolutional layer in the dense block, a mini-
decoder is used to generate a guiding attention map (GAM). The successive
layers utilize this segmentation map to prune features impertinent to
identifying the region of interest. Additionally, we use reverse attention in
every alternative PAAD block which allows layers to further mine peripheral
features allowing the network to accurately capture the variation in shape and
size of the region of interest. Since the GAM is created after every
convolutional layer of the PAAD blocks, they are updated progressively which
further refine the quality of feature maps, prune irrelevant features, and
allow the later convolutional layers to produce only meaningful features. We
validate our method on three different biomedical datasets: Data Science Bowl
(DSB) 2018 [19], ISIC 2018 skin lesion segmentation [20, 21], and Kvasir-
Instruments [22].

##  II Method

In this section, we elaborate upon the encoder PAAD block used in our PAANet.
The architecture of our progressive alternating attention network (PAANet) is
illustrated in Figure 2. The input image is encoded using ResNet-50 pretrained
on ImageNet [23], which has served as a standard backbone for medical image
segmentation models. Let all features from different levels of the encoder be
denoted as $E_{v}$, where $v\in{1,2,3,4}$.

###  II-A Progressive Alternating Attention Dense Blocks

Each feature set from the encoder blocks is fed into the PAAD blocks. Equation
1 describes how the feature maps are generated for each convolutional layer
within PAAD blocks:

$F_{v}^{c}=Con(P_{v}^{c-1}\oplus P_{v}^{c-2}\cdots\oplus P_{v}^{0})$ (1)

Here, $F_{v}^{c}$ denotes the features generated by the layer number $c$ for
the $v^{\prime}th$ resolution scale, $\oplus$ represents the concatenation
operator, and $Con$ represents a $3\times 3$ convolutional operator.
$P_{v}^{0}$ is initially set to $E_{v}$. The architecture of the PAAD block is
shown in Figure 1. For clarity, we have only selected two feature streams with
distinct resolution in the figure to represent the operations and the feature
flow within the PAAD block.

####  II-A1 Mini-Decoder

We elaborate upon the mechanism of our Mini-Decoder block (see Figure 1) in
Equation 2:

$G^{c}=\sigma(Con(F_{1}^{c}\oplus F_{2}^{c}\oplus F_{3}^{c}\oplus F_{4}^{c}))$
(2)

For all scales, $F_{v}^{c}$ is upscaled to the size of the ground truth map.
They are concatenated before being processed by a convolutional layer with
kernel size $3\times 3$. Finally, a sigmoid function is used to transform the
feature maps within the range of [0,1]. The guiding segmentation map is
supervised using the ground truth.

####  II-A2 Progressive Alternating Attention

In this stage, the feature maps generated by the layer $c$ in the PAAD block
are multiplied by the guidance map $G$ as described in Equation 3:

$P_{v}^{c}=F_{v}^{c}\otimes G_{v}^{c}$ (3)

The guidance maps is downscaled appropriately to the spatial dimensions of the
$v$’th scale. In the first PAAD block, we use spatial attention to allow
convolutional layers to progressively prune irrelevant features while focusing
on the region of interest as deemed by the guidance maps. In the next PAAD
block, the GAM is inverted as $G_{v}^{c}=1-G_{v}^{c}$, to allow all layers of
the PAAD to extract further boundary and edge information which may have been
omitted in the first PAAD block. This results in further refining the feature
maps and restricting the flow of extraneous features. We maintain informative
deep level and shallow level features throughout the process, consequently,
improving accuracy of our proposed PAANet. Further, skip connections are added
from the input to improve gradient flow.

###  II-B Decoder

The final output from the PAAD is denoted as $P_{v}$. The output from each
decoder level is upscaled to the spatial resolution dimensions of the next
decoder level as shown in Equation 4. The skip-connections from the
corresponding scale is concatenated to the upscaled features before being
fused using a $3\times 3$ convolutional layer.

$P_{v}=Con(Upscale(P_{v-1})\otimes P_{v})$ (4)

Here, $Upscale$ represents a strided $4\times 4$ transposed convolution layer.
Each $P_{v}$ where $v\in{2,3,4}$ is upscaled to the spatial resolution of the
ground truth and deeply supervised. Combination of equally weighted
intersection over union loss and binary-cross entropy loss is used for
supervision

##  III Experiments and Results

To conduct experiments and determine the effectiveness of our method, we
choose three different biomedical image segmentation datasets as the use case.
These three different datasets have different types of segmentation masks. At
first, we experimented with the 2018 Data Science Bowl (DSB) Challenge dataset
[19] which contains 670 segmented nuclei images. The nuclei images found in
DSB 2018 were captured under varying conditions like different cell sizes,
magnification, and imaging modality. This variation within the distribution
makes the segmentation of nuclei images a challenging problem. Next, we
experimented using the ISIC-2018 Challenge [20, 21] dataset, which is a skin
segmentation dataset. Skin lesion segmentation assists in melanoma detection,
melanoma being the most severe form of skin cancer, warrants an automatic skin
lesion segmentation system. Therefore, developing automated systems could be
helpful in the clinic. Our third dataset used in the experiments was the
Kvasir-Instruments [22] dataset which is a diagnostic and therapeutic tool
segmentation dataset in gastrointestinal endoscopy. Tool segmentation in
gastrointestinal images allows tracking of instruments used during endoscopy
and could assist robotic and non-robotic surgeries. Developing such an
automated segmentation system might help in complex real-time surgeries inside
the gastrointestinal tract.

TABLE I: Results on the 2018 Data Science Bowl Method | DSC | mIoU | Recall | Precision
---|---|---|---|---
U-Net [1] | 0.9080 | 0.8314 | 0.9029 | 0.9130
U-Net++ [2] | 0.7705 | 0.5265 | 0.7159 | 0.6657
ResUNet++ [3] | 0.9098 | 0.8370 | 0.9169 | 0.9057
Deeplabv3+ (Xception) [24] | 0.8857 | 0.8367 | 0.9141 | 0.9081
Deeplabv3+ (Mobilenet) [24] | 0.8239 | 0.7402 | 0.8896 | 0.8151
HRNetV2-W18-Smallv2 [25] | 0.8495 | 0.7585 | 0.8640 | 0.8398
HRNetV2-W48 [25] | 0.8488 | 0.7588 | 0.8359 | 0.8913
ColonSegNet [26] | 0.9197 | 0.8466 | 0.9153 | 0.9312
ResUNet++ + CRF [27] | 0.7806 | 0.7322 | 0.7534 | 0.6308
PraNet [5] | 0.8751 | 0.7868 | 0.9182 | 0.8438
MSRF-Net [10] | 0.9224 | 0.8534 | 0.9402 | 0.9022
PAANet(Ours) | 0.9244 | 0.8627 | 0.9319 | 0.9208
TABLE II: Results on the ISIC-2018 skin lesion segmentation challenge Method | DSC | mIoU | Recall | Precision
---|---|---|---|---
U-Net [1] | 0.8554 | 0.7847 | 0.8204 | 0.9474
U-Net++ [2] | 0.8094 | 0.7288 | 0.7866 | 0.9084
ResUNet++ [3] | 0.8557 | 0.8135 | 0.8801 | 0.8676
Deeplabv3+ (Xception) [24] | 0.8772 | 0.8128 | 0.8681 | 0.9272
Deeplabv3+ (Mobilenet) [24] | 0.8781 | 0.8236 | 0.8830 | 0.9244
HRNetV2-W18-Smallv2 [25] | 0.8561 | 0.7821 | 0.8556 | 0.8974
HRNetV2-W48 [25] | 0.8667 | 0.8109 | 0.8584 | 0.9155
ResUNet++ + CRF [27] | 0.8688 | 0.8209 | 0.8826 | 0.8736
MSRF-Net [10] | 0.8824 | 0.8373 | 0.8893 | 0.9348
PAANet (Ours) | 0.8912 | 0.8219 | 0.9019 | 0.9054
TABLE III: Results on the Kvasir-Instruments Method | DSC | mIoU | Recall | Precision
---|---|---|---|---
U-Net [1] | 0.9158 | 0.8578 | 0.9487 | 0.8998
U-Net++ [2] | 0.8808 | 0.8453 | 0.8623 | 0.9173
HRNetV2-W18-Smallv2 [25] | 0.9272 | 0.8822 | 0.9244 | 0.9438
HRNetV2-W48 [25] | 0.9306 | 0.8867 | 0.9294 | 0.9429
Deeplabv3+ (Xception) [24] | 0.8998 | 0.8615 | 0.9012 | 0.9272
Deeplabv3+ (Mobilenet) [24] | 0.9079 | 0.8635 | 0.9075 | 0.9468
ColonSegNet [26] | 0.9201 | 0.8820 | 0.9169 | 0.9317
MSRF-Net [10] | 0.9379 | 0.8990 | 0.9661 | 0.9283
PAANet(Ours) | 0.9495 | 0.9160 | 0.9475 | 0.9571

In our experiment, we have used Adam optimizer with a learning rate of $1e-4$.
All models were trained for 30 epochs with a batch size of 8. The DSB and
ISIC-2018 datasets were divided into training, validation, and testing splits
which contains 80%, 10%, and 10% of the data, respectively. For Kvasir-
Instruments, we follow the official train-test split provided by the dataset
provider. We have compared our work with state-of-the-art (SOTA) medical image
segmentation methods such as U-Net [1],U-Net++ [2], “ResUNet++ + CRF [27]”.
Further comparisons were made with standard semantic segmentation methods like
HR-Net [25] and Deeplabv3+ [24].

Figure 3: Qualitative results of our proposed PAANet.

Table I reports the results obtained by our PAANet, and we can observe that
our PAANet achieves a dice coefficient (DSC) of 0.9244 and mean intersection
over union (mIoU) of 0.8627, outperforming SOTA methods in all the metrics.
From Table II, we can observe that PAANet reports a DSC of 0.8912 and recall
of 0.9019, outperforming the second best MSRF-Net by 0.88% in terms of DSC and
1.26% in terms of recall. In Table III, it can be noted that PAANet attains an
improvement of 1.16% in DSC and 1.70% in mIoU over the second best performing
MSRF-Net. The qualitative results of our approach can be observed in Figure 3.
From the qualitative results, it can be observed that the output segmentation
masks produced by PAANet is similar to the ground truth. Overall, the
progressive alternating attention mechanism used to control and limit the
features contributed by convolutional layers in residual dense blocks enhances
the segmentation ability of our PAANet. The consecutive GAMs which are
progressively updated enables the generation of feature maps germane to the
region-of-interest and subsequent mining of boundary cues generates detailed
and spatially accurate segmentation maps.

## Conclusion

In this work, we proposed PAANet which employs a novel progressive alternating
attention dense block. The PAAD uses an attention mechanism which
alternatively applies spatial attention and reverses spatial attention to
guide the features contributed by the convolutional layers in the dense block.
The attention maps enable layers to focus on the spatial locations pertinent
to the target structure. The reverse attention guides the layers to capture
the boundary and edge information which further refines the features and
allows the generation of finer and spatially precise segmentation maps.
Experiments performed on three biomedical image segmentation datasets
validated our approach and can be seen as new benchmarks. Our future work will
comprise of modifying our PAANet for medical image classification.

## Acknowledgment

The computations in this paper were performed on equipment provided by the
Experimental Infrastructure for Exploration of Exascale Computing (eX³), which
is financially supported by the Research Council of Norway under contract
270053.

## References

  * [1] O. Ronneberger, P. Fischer, and T. Brox, “U-Net: convolutional networks for biomedical image segmentation,” in _Proc. of Internat. Confer. on Med. Ima. Compu. Comput.-Assis. Interven._ , 2015, pp. 234–241.
  * [2] Z. Zhou, M. M. R. Siddiquee, N. Tajbakhsh, and J. Liang, “UNet++: Redesigning skip connections to exploit multiscale features in image segmentation,” _IEEE Trans. Med. Imag._ , vol. 39, no. 6, pp. 1856–1867, 2019.
  * [3] D. Jha, P. H. Smedsrud, M. A. Riegler, D. Johansen, T. De Lange, P. Halvorsen, and H. D. Johansen, “ResUNet++: An advanced architecture for medical image segmentation,” in _Proc. of Internat. Sympos. Multime._ , 2019, pp. 225–230.
  * [4] D. Jha, M. A. Riegler, D. Johansen, P. Halvorsen, and H. D. Johansen, “DoubleU-Net: A Deep Convolutional Neural Network for Medical Image Segmentation,” in _Proc. of Internat. Sympo. Comp.-Bas. Med. Syst._ , 2020\.
  * [5] D.-P. Fan _et al._ , “PraNet: parallel reverse attention network for polyp segmentation,” in _Proc. of Internat. Confer. on Med. Ima. Compu. Comput.-Assis. Interven._ , 2020, pp. 263–273.
  * [6] O. Oktay _et al._ , “Attention U-Net: learning where to look for the pancreas,” _arXiv preprint arXiv:1804.03999_ , 2018.
  * [7] J. Hu, L. Shen, and G. Sun, “Squeeze-and-excitation networks,” in _Proc. of Comput. Vis. and Patt. Recogn._ , 2018, pp. 7132–7141.
  * [8] X. Chen, R. Zhang, and P. Yan, “Feature fusion encoder decoder network for automatic liver lesion segmentation,” in _Proc. of internat. sympos. biomed. imag._ , 2019, pp. 430–433.
  * [9] C. Kaul, S. Manandhar, and N. Pears, “Focusnet: An attention-based fully convolutional network for medical image segmentation,” in _Proc. of Internat. Sympo. on Biomed. Imag._ , 2019, pp. 455–458.
  * [10] A. Srivastava _et al._ , “Msrf-net: A multi-scale residual fusion network for biomedical image segmentation,” _arXiv preprint arXiv:2105.07451_ , 2021\.
  * [11] G.-P. Ji, Y.-C. Chou, D.-P. Fan, G. Chen, H. Fu, D. Jha, and L. Shao, “Progressively normalized self-attention network for video polyp segmentation,” _arXiv preprint arXiv:2105.08468_ , 2021.
  * [12] Y. Zhang, Y. Tian, Y. Kong, B. Zhong, and Y. Fu, “Residual dense network for image super-resolution,” in _Proc. of Comput. Vis. and Patt. Recogn._ , 2018\.
  * [13] Z. Zhang, Q. Liu, and Y. Wang, “Road extraction by deep residual U-Net,” _IEEE Geosci. and Remo. Sens. Lett._ , vol. 15, no. 5, pp. 749–753, 2018\.
  * [14] J. Dolz, K. Gopinath, J. Yuan, H. Lombaert, C. Desrosiers, and I. B. Ayed, “Hyperdense-net: a hyper-densely connected cnn for multi-modal image segmentation,” _IEEE Trans. Med. Imag._ , vol. 38, no. 5, pp. 1116–1126, 2018.
  * [15] N. Ibtehaz and M. S. Rahman, “Multiresunet: Rethinking the u-net architecture for multimodal biomedical image segmentation,” _Neur. Networ._ , vol. 121, pp. 74–87, 2020.
  * [16] X. o. Yang, “Road Detection via Deep Residual Dense U-Net,” in _Pro. of Internat. Joi. Conf. on Neu. Netwo._ , 2019, pp. 1–7.
  * [17] P. L. K. Ding, Z. Li, Y. Zhou, and B. Li, “Deep residual dense U-Net for resolution enhancement in accelerated MRI acquisition,” in _Proc. of Medi. Imag. 2019: Ima. Proce._ , vol. 10949, 2019, p. 109490F.
  * [18] A. Srivastava, N. Sharma, S. Gupta, and S. Chandra, “Residual dense u-net for segmentation of lung ct images infected with covid-19,” in _International Advanced Computing Conference_ , 2020, pp. 17–30.
  * [19] J. C. Caicedo _et al._ , “Nucleus segmentation across imaging experiments: the 2018 data science bowl,” _Nat. Meth._ , vol. 16, no. 12, pp. 1247–1253, 2019.
  * [20] N. C. Codella _et al._ , “Skin lesion analysis toward melanoma detection: A challenge at the 2017 international symposium on biomedical imaging (isbi), hosted by the international skin imaging collaboration (isic),” in _Proc. of Internat. Sympo. on Biomed. Imag._ , 2018, pp. 168–172.
  * [21] P. Tschandl, C. Rosendahl, and H. Kittler, “The ham10000 dataset, a large collection of multi-source dermatoscopic images of common pigmented skin lesions,” _Scienti. Da._ , vol. 5, p. 180161, 2018.
  * [22] D. Jha _et al._ , “Kvasir-instrument: Diagnostic and therapeutic tool segmentation dataset in gastrointestinal endoscopy,” in _International Conference on Multimedia Modeling_ , 2021, pp. 218–229.
  * [23] J. Deng _et al._ , “ImageNet: a large-scale hierarchical image database,” in _Proc. of Comput. Vis. and Patt. Recogn._ , 2009, pp. 248–255.
  * [24] L.-C. Chen, Y. Zhu, G. Papandreou, F. Schroff, and H. Adam, “Encoder-decoder with atrous separable convolution for semantic image segmentation,” in _Proc. of the Europ. conf. comput. vis._ , 2018, pp. 801–818.
  * [25] J. Wang _et al._ , “Deep high-resolution representation learning for visual recognition,” _IEEE trans. patt. analy. mach._ , 2020.
  * [26] D. Jha, S. Ali, N. K. Tomar, H. D. Johansen, D. Johansen, J. Rittscher, M. A. Riegler, and P. Halvorsen, “Real-Time Polyp Detection, Localisation and Segmentation in Colonoscopy Using Deep Learning,” _IEEE Acc._ , 2021.
  * [27] D. Jha, P. H. Smedsrud, D. Johansen, T. de Lange, H. D. Johansen, P. Halvorsen, and M. A. Riegler, “A comprehensive study on colorectal polyp segmentation with ResUNet++, conditional random field and test-time augmentation,” _IEEE J. Biomed. Health Inform_ , 2021.

  *[DSC]: dice coefficient
  *[mIoU]: mean intersection over union