# Generalized Groups and Module Groupoids

P. G. Romeo and Sneha K K  Dept. of Mathematics, Cochin University of Science
and Technology, Kochi, Kerala, INDIA.
$romeo_{-}parackal<EMAIL_ADDRESS>
###### Abstract.

In this paper we discuss generalized group, provides some interesting
examples. Further we introduce a generalized module as a module like structure
obtained from a generalized group and discuss some of its properties and we
also describes generalized module groupoids.

###### Key words and phrases:

Category, Functors, Groupoid, Generalized group, Generalized group groupoid
Generalized module, Generalized module groupoid.

###### 1991 Mathematics Subject Classification:

20M10

##  1\. Introduction

The generalized groups introduced by Molaei is an interesting generalization
of groups(cf.[3]). The identity element in a group is unique, but in a
generalized group there exists an identity forall each elements. Clearly every
group is a generalized group. A groupid is another generalization of a group
is a small category in which every morphism is invertible and was first
defined by Brandt in the year 1926. Groupoids are studied by many
Mathematicians with different objective. One of the different approach is the
structured groupoid which is obtained by adding another structure in such a
way that the added structure is compatible with the groupoid operation.

In this paper we introduce the module action on a generalized group and we
call the resulting structure as a generalized module. Then we discuss some
interesting examples and properties of generalized modules. Further,
analogoues to generalized group groupoid we describe the generalized module
groupoid over a ring and obtained a relation between category of generalized
module and category of generalized module groupoids.

##  2\. Preliminaries

In this section we briefly recall all basic definitions and the elementary
concepts needed in the sequel. In particular we recall the definitions of
categories, groupoids, generalized groups with examples and discuss some
intersetng properties of these structures.

######  Definition 1.

(cf.[1]) A Category ${\mathcal{C}}$ consists of the following data$:$

  1. (1)

A class called the class of vertices or objects $\nu{\mathcal{C}}.$

  2. (2)

A class of disjoint sets ${\mathcal{C}}(a,b)$ one for each pair
$(a,b)\in\nu{\mathcal{C}}\times\nu{\mathcal{C}}.$ An element
$f\in{\mathcal{C}}$ is called a morphism from $a$ to $b,$ written
$f:a\rightarrow b$ ; $a=dom\;f$ the domain of $f$ and $b=cod\;f$ called the
codomain of $f.$

  3. (3)

For $a,b,c,\in\nu{\mathcal{C}},$ a map

$\circ:{\mathcal{C}}(a,b)\times{\mathcal{C}}(b,c)\rightarrow{\mathcal{C}}(a,c)\,\,\text{given
by}\,\,(f,g)\mapsto f\circ g$

is the composition of morphisms in ${\mathcal{C}}.$

  4. (4)

for each $a\in\nu{\mathcal{C}}$, a unique $1_{a}\in{\mathcal{C}}(a,a)$ is the
identity morphism on $a.$

These must satisfy the following axioms:

  * •

(cat1) for
$f\in{\mathcal{C}}(a,b),g\in{\mathcal{C}}(b,c)\;and\;h\in{\mathcal{C}}(c,d),$
then

$f\circ(g\circ h)=(f\circ g)\circ h$

  * •

(cat 2) for each
$a\in\nu{\mathcal{C}},f\in{\mathcal{C}}\;(a,b)\;and\;g\in{\mathcal{C}}(c,a),$
then

$1_{a}\circ f=f\qquad and\qquad g\circ 1_{a}=g$

.

Clearly $\nu\mathcal{C}$ can be identify as a subclass of $\mathcal{C},$ and
with this identification it is possible to regard categories in terms of
morphisms alone. The category $\mathcal{C}$ is said to be small if the class
$\mathcal{C}$ is a set. A morphism $f\in\mathcal{C}(a,b)$ is said to be an
isomorphism if there exists $f^{-1}\in\mathcal{C}(b,a)$ such that
$ff^{-1}=1_{a}=e_{a},$ domain identity and $f^{-1}f=1_{b}=f_{b},$ range
identity.

######  Example 1.

A group $G$ can be regarded as category in the following way; define category
$\mathcal{C}$ with just one object say $\nu\mathcal{C}=G$ and morphisma
$\mathcal{C}=\\{g:g\in G\\}$ with composition in $\mathcal{C}$ is the binary
operation in $G.$ Identity element in the group will be the identity morphism
on the vertex $G.$

######  Definition 2.

A groupoid $\mathcal{G}=(\nu\mathcal{G},\mathcal{G})$ is a small category such
that for morphisms $f,g\in\mathcal{G}$ with $cod\,f=dom\,g$ then
$fg\in\mathcal{G}$ and every morphism is an isomorphism. A groupoid
$\mathcal{G}$ is said to be connected if for all
$a\in\nu\mathcal{G},\;\;\mathcal{G}(a,a)\neq\phi$

######  Example 2.

Every group can be regarded as a groupoid with only one object.

######  Example 3.

For a set $X$ the cartesian product $X\times X$ is a groupoid over $X$ with
morphisms are the elements in $X\times X$ with the composition
$(x,y)\cdot(u,v)$ exists only when $y=u$ and is given by $(x,y)(u,v)=(x,v).$
In particular $(x,x)$ is the unique left identity and $(y,y)$ is the unique
right identity.

######  Definition 3.

Given two categories $\mathcal{C}$ and $\mathcal{D},$ a functor
$F:\mathcal{C}\rightarrow\mathcal{D}$ consists of two functions: the object
function denoted by $\nu F$ which assigns to each object $a$ of $\mathcal{C},$
an object $\nu F(a)$ of the category $\mathcal{D}$ and a morphism function
which assigns to each morphism $f:a\rightarrow b$ of $\mathcal{C},$ a morphism
$F(f):F(a)\rightarrow F(b)$ in $\mathcal{D}$ satisfies the following

$F(1_{c})=1_{F(c)}\,\text{for
every}\,c\in\nu\mathcal{C},\,\,\text{and}\,\,F(fg)=F(f)F(g)$

whenever $fg$ is defined in $\mathcal{C}.$

We denote by $\bf{Gpd}$ the category of groupoids in which objects are the
groupoids and morphisms are the functors.

A semigroup is a pair $(S,\cdot)$ where $S$ is a nonempty set and $\cdot$ is
an associative binary operation on $S.$ A semigroup $S$ is said to be regular
if for each $x\in S$ there exists $x^{\prime}\in S$ such that
$xx^{\prime}x=x.$ An element $e$ of $S$ is said to be idempotent if $e^{2}=e.$
A band is a semigroup in which all elements are idempotents. Inverse semigroup
is a regular semigroup in which for each $x\in S$ there exists an unique $y\in
S$ such that $x=xyx$ and $y=yxy.$

###  2.1. Generalized Groups and Generalized group groupoids.

In the following we recall the definitions of generalized groups and describe
some of its properties.

######  Definition 4.

(cf.[3]) A generalized group $G$ is a non-empty set together with a binary
operation called multiplication subject to the set of rules given below:

  1. (1)

$(ab)c=a(bc)$ for all $a,\;b,\;c\;\;\in G$

  2. (2)

for each $a\in G$ there exists unique $e(a)\in G$ with $ae(a)=e(a)a=a$

  3. (3)

for each $a\in G$ there exists $a^{-1}\in G$ with $aa^{-1}=a^{-1}a=e(a)$

It is seen that for each element $a$ in a generalized group the inverse is
unique and both $a$ and $a^{-1}$ have the same identity. Every abelian
generalized group is a group.

######  Definition 5.

(cf.[3]) A generalized group $G$ is said to be normal generalized group if
$e(ab)=e(a)e(b)$for all elements $a,b\in G$

######  Definition 6.

(cf.[3]) A non-empty subset $H$ of a generalized group $G$ is a generalized
subgroup of $G$ if and only if for all $a,b\in H,\;\;ab^{-1}\in H.$

######  Theorem 1.

Rectangular band semigroup is a normal generalized group.

###### Proof.

A band $B$ is a regular semigroup in which every element is an idempotent. Let
$I,$ $\Lambda$ be non empty sets and $B=I\times\Lambda$ with multipication
defined by

$(i,\lambda)(j,\mu)=(i,\mu)\;\;for\;all\;\;(i,\lambda),(j,\mu)\in
I\times\Lambda$

is a semigroup and in which all elements are idempotents. Then $B$ is a
rectangular band.

For any $(i,\lambda),(j,\mu)\in B$

$(i,\lambda)(j,\mu)=(j,\mu)(i,\lambda)=(i,\lambda)\;\;gives$

$(j,\mu)=(i,\lambda)$

Thus we have $e(i,\lambda)=(i,\lambda)\;for\;all\;(i,\lambda)\in B$ and
$(i,\lambda)^{-1}=(i,\lambda).$
Moreover

$e((i,\lambda)(j,\mu))=e(i,\lambda)e(j,\lambda)$

hence $B$ is a normal generalized group. ∎

######  Example 4.

Let $G=(V(G),E(G))$ be a complete digraph without multiple edges, then each
edge can be uniquely identified with the starting and ending vertices. Let
$d(g)$ stands for the domain and $r(g)$ stands for the range of the edge $g.$
For any $f,g\in E(G)$ define the composition of $f\;and\;g$ as the unique edge
starting from the domain of $f$ and ending at the range of $g.$

$ie;\quad f\circ
g=h^{r(g)}_{d(f)}\;\;\;with\;\;d(h^{r(g)}_{d(f)})=d(f)\;\;and\;\;r(h^{r(g)}_{d(f)})=r(g).$

The composition $\circ$ is an associative binary operation. For, $f,g,h\in
E(G)$ with
$d(f)=v_{1}\;\;r(f)=v_{2},\,\,d(g)=u_{1},\;\;r(g)=u_{2},\,\,d(h)=w_{1}$ and
$r(h)=w_{2}$

$\begin{split}(f\circ g)\circ h&=(h^{u_{2}}_{v_{1}})\circ
h=h^{w_{2}}_{v_{1}}\\\ f\circ(g\circ
h)&=f\circ(h^{w_{2}}_{u_{1}})=h^{w_{2}}_{v_{1}}\\\ ie.,\,(f\circ g)\circ
h&=f\circ(g\circ h)\end{split}$

also for each edge $f,$

$f\circ f=f$

hence $e(f)=f^{-1}=f$. Thus the complete digraph is a generalized group.

######  Example 5.

$G=\Bigg{\\{}A=$$\begin{pmatrix}a&b&\\\ 0&0&\\\ \end{pmatrix}$ $:a\neq
0,\;\;a,\;b\;\in R\Bigg{\\}}$
Then, $G$ is a generalized group and for all $A\in G$,

$e(A)=$ $\begin{pmatrix}1&b/a&\\\ 0&0&\\\ \end{pmatrix}$ and $A^{-1}=$
$\begin{pmatrix}1/a&b/a^{2}&\\\ 0&0&\\\ \end{pmatrix}$

where $e(A)$ and $A^{-1}$ are the identity and the inverse of matrix $A$
respectively. Also $e(AB)=e(B)$ for all $A,B\in G$

######  Definition 7.

(cf.[3]) Let $G$ and $H$ be two generalized groups. A generalized group
homomorphism from $G$ to $H$ is a map $f:G\rightarrow H$ such that

$f(ab)=f(a)f(b)$

######  Theorem 2.

(cf.[3]) Let $f:G\rightarrow H$ be a homomorphism of generalized groups $G$
and $H.$ Then

  1. (1)

$f(e(a))=e(f(a))$ is an identity element in $H$ for all $a\in G$

  2. (2)

$f(a^{-1})=f(a)^{-1}$

  3. (3)

if $K$ is a generalized subgroup of $G$ then $f(K)$ is a generalized subgroup
of $H.$

Generalized groups and their homomorphisms form a category and is denoted by
$GG$

######  Definition 8.

(cf.[2]) A generalized group groupoid $\mathcal{G}$ is a groupoid
$(\nu\mathcal{G},\mathcal{G})$ endowed with the structure of generalized group
such that the following maps

  1. (1)

$+:G\times G\rightarrow G,\;\;(f,g)\rightarrow f+g,$

  2. (2)

$u:G\rightarrow G,\;\;f\rightarrow-f,$

  3. (3)

$e:G\rightarrow G,\;\;f\rightarrow e(f),$

are functorial.

Since $+$ is a functorial we have

$\begin{split}(f\circ g)+(h\circ k)&=+(f\circ g,h\circ k)\\\
&=+[(f,h)\circ(g,k)]\\\ &=+(f,h)\circ+(g,k)\\\ &=(f+h)\circ(g+k)\\\ (f\circ
g)+(h\circ k)&=(f+h)\circ(g+k)\end{split}$

thus the interchange law

$(f\circ g)+(h\circ k)=(f+h)\circ(g+k)$

exists between groupoid composition and generalized group operation.

In other words, a generalized group groupoid is a groupoid endowed with a
structure of generalized group such that the structure maps of groupoid are
generalized group homomorphisms.

######  Example 6.

Let $G$ be a generalized group. Then $G\times G$ is a generalized group
groupoid with object set $G$. For each morphism $(x,y)\in G\times G$ the
identity arrow of $(x,y)$ is $(e(x),e(y))$ and the inverse is $(-x,-y)$ and
the interchange law also holds. For,

$\begin{split}[(f,g)\circ(g,h)]+[(f^{\prime},g^{\prime})\circ(g^{\prime},h^{\prime})]&=(f,h)+(f^{\prime},h^{\prime})\\\
&=(f+f^{\prime},h+h^{\prime})\\\
[(f,g)+(f^{\prime},g^{\prime})]\circ[(g,h)+(g^{\prime},h^{\prime})]&=(f+f^{\prime},g+g^{\prime})\circ(g+g^{\prime},h+h^{\prime})\\\
&=(f+f^{\prime},h+h^{\prime})\\\
[(f,g)\circ(g,h)]+[(f^{\prime},g^{\prime})\circ(g^{\prime},h^{\prime})]&=[(f,g)+(f^{\prime},g^{\prime})]\circ[(g,h)+(g^{\prime},h^{\prime})]\end{split}$

###  2.2. Generalized Groups from a connected groupoid.

We proceed to describe the generalized group obtained from a connected
groupoid. Let $\mathcal{G}$ be a connected groupoid with $\mathcal{G}(a,b)$
contains exactly one morphism for all $a,\;b\;\in\mathcal{G}.$ Define a binary
operation which is deoted by $+$ on $\mathcal{G}.$ For, let
$f\in\mathcal{G}(a,b)$ and $g\in\mathcal{G}(c,d)$

$f+g=f\circ k_{bc}\circ g$

where $\circ$ is the composition in the groupoid and $k_{bc}$ is the unique
morphism in $\mathcal{G}(b,c)$. Then $\mathcal{G}$ is a generalized group,
since

  1. (1)

The operation $"+"$ is associative.
for $f\in\mathcal{G}(a,b)\;g\in\mathcal{G}(c,d)\;h\in\mathcal{G}(i,j)$

$\begin{split}(f+g)+h&=(f\circ k_{bc}\circ g)+h\\\ &=(f\circ k_{bc}\circ
g)\circ(k_{di}\circ h)\\\ &=fk_{bc}gk_{di}h\\\ f+(g+h)&=f+(g\circ k_{di}\circ
h)\\\ &=(f\circ(k_{bc})\circ(g\circ k_{di}\circ h)\\\
&=fk_{bc}gk_{di}h\end{split}$

$ie;$ $(f+g)+h=f+(g+h)$ and $+$ is an associative binary opration.

  2. (2)

for each $f\in\mathcal{G}$

$f+f=f\circ f^{-1}\circ f=f$

hence $e(f)=-f=f$
Thus the groupoid $\mathcal{G}$ together with the operation $+,$ forms a
generalized group and is denoted by $\mathcal{G}^{*}.$ More over this
generalized group $\mathcal{G}^{*}$ is normal, since $e(f+g)=f+g=e(f)+e(g)$

Now we extend this construction of a generalized group in to an arbitrary
connected groupoid. We start with a connected groupid $\mathcal{G}$ with
partial composition $\circ.$ Choose a morphism from each homset
$\mathcal{G}(a,b)$ and is denote by $h_{ab}$ in such a way that
$h_{ba}={h_{ab}}^{-1}$ and $h_{a}=1_{a}.$ Define an addition $+$ on
$\mathcal{G}$ for $f\in\mathcal{G}(a,b),g\in\mathcal{G}(c,d)$ as follows

$f+g=f\circ h_{bc}\circ g.$

Clerarly $+$ is an associative binary operation on $\mathcal{G}$ and for each
$f\in\mathcal{G}(a,b)$

$\begin{split}f+h_{ab}&=f\circ h_{ba}\circ h_{ab}\\\
&=f\circ{h_{ab}}^{-1}\circ h_{ab}\\\ &=f\circ 1_{b}\\\ &=f\\\
h_{ab}+f&=h_{ab}\circ h_{ba}\circ f\\\ &=h_{ab}\circ{h_{ab}}^{-1}\circ f\\\
&=1_{a}\circ f\\\ &=f\\\ \end{split}$

$f+h_{ab}=h_{ab}+f=f\;\;and\;\;e(f)=h_{ab}\;\;\forall\;\;f\in\mathcal{G}$

$\begin{split}f+(h_{ab}f^{-1}h_{ab})&=f\circ 1_{b}\circ f^{-1}\circ h_{ab}\\\
&=h_{ab}\\\ (h_{ab}f^{-1}h_{ab})+f&=h_{ab}\circ f^{-1}\circ 1_{a}\circ f\\\
&=h_{ab}\end{split}$

$f+(h_{ab}f^{-1}h_{ab})=(h_{ab}f^{-1}h_{ab})+f=h_{ab}=e(f)$
$-f=h_{ab}f^{-1}h_{ab}$

Thus the connected groupoid $\mathcal{G}$ is a generalized group with respect
to the addition we defined above.

Next we recall the generalized rings which was introduced by Molaei.

######  Definition 9.

(cf.[4]) A generalized ring $R$ is a nonempty set $R$ with two different
operations adition and multiplication denoted by
$`+`\;and\;`\times`$respectively in which $(R,+)$ is a generalized group and
satisfies the following conditions.

  1. (1)

multiplication is an associative binary operation.

  2. (2)

for all $x,\;y,\;z\;\in R\quad x(y+z)=xy+xz$ and $(x+y)z=xz+yz$

Note that in a generalized ring $R,$ $e(ab)=e(a)e(b)$ for all $a,b\;\in R.$

######  Example 7.

$\mathbb{R^{2}}$ with the operations $(a,b)+(c,d)=(a,d)$ and
$(a,b)(c,d)=(ac,bd)$ is a generalized ring.

##  3\. Generalized modules

Let $M$ be a generalized group and $R$ be a ring, in the following we proceed
to define a generalized module using the generalized group $M$.

######  Definition 10.

Let $R$ be a ring with unity. A generalized group $M$ is said to be (left)
generalized $R$ module if for each element $r$ in $R$ and each $m$ in $M$ we
have a product $rm$ in $M$ such that for $r,s\in\;R\;\;and\;\;m,n\in M$

  1. (1)

(r+s)m = rm+sm

  2. (2)

r(m+n) = rm+ rn

  3. (3)

r(sm) = (rs)m

  4. (4)

$re(m)=e(m)$ for all $r\in R$ and $m\in M$

  5. (5)

1.m = m

######  Proposition 1.

Let $M$ be an $R-$ module then $M\times M$ is a generalized $R$ module with
the operations

$(x,y)+(m,n)=(x,y+n)$ $r(x,y)=(x,ry)$

and for each $x\in M$ the subset $M_{x}=\\{(x,y):y\in M\\}$ is an $R$ module.

###### Proof.

It can be seen that $(M,+)$ is a generalized group in which for all $(m,n)\in
M,\;\;e(m,n)=(m,0)$ and $(m,n)^{-1}=(m,-n).$ To show that $M$ is a generalized
$R$ module consider $r,s\in R$ and $(x,y),(m,n)\in M\times M,$

  1. (1)

$\begin{split}(r+s)(x,y)&=(x,(r+s)y)\\\ &=(x,ry+rs)\end{split}$
$\begin{split}r(x,y)+s(x,y)&=(x,ry)+(x,rs)\\\ &=(x,ry+rs)\end{split}$

$ie;\;\;\;\;\;(r+s)(x,y)=r(x,y)+s(x,y)$ axiom(1)is satisfied

  2. (2)

$\begin{split}r[(x,y)+(m,n)]&=r[(x,y+n)]\\\ &=(x,r(y+n))\\\
&=(x,ry+rn)\end{split}$ $\begin{split}r(x,y)+r(m,n)&=(x,ry)+(m,rn)\\\
&=(x,ry+rn)\end{split}$

hence $r[(x,y)+(m,n)]=r(x,y)+r(m,n)$ axiom(2)is satisfied

  3. (3)

$\begin{split}rs(x,y)&=(x,rsy)\\\ &=(x,r(sy))\\\ &=r(x,sy)\\\
&=r(s(x,y))\end{split}$

$rs(x,y)=r(s(x,y))$ axiom(3)is satisfied

  4. (4)

$\begin{split}re(x,y)&=r(x,0)\\\ &=(x,r0)\\\ &=(x,0)\\\ &=e(x,y)\end{split}$

$re(x,y)=e(x,y)$ axiom(4)is satisfied

  5. (5)

$1\cdot(x,y)=(x,y)\quad\forall(x,y)\in M$

To show that for each $x\in M$ the subset $M_{x}=\\{(x,y):y\in M\\}$ is an $R$
module it is enough to show that $M_{x}$ is an abelian group and the scalar
multipication is closed. Let $m+n=(x,y)$ and $n=(x,z)$ be elements in $M_{x}$
then

$m+n=(x,y)+(x,z)=(x,y+z)$

and

$n+m=(x,z)+(x,y)=(x,z+y)=(x,y+z)$

Therefore

$m+n=n+m$

and $+$ is a commutative binary operation on $M_{x}.$ Forevery $m\in M_{x}$
$(x,y)+(x,0)=(x,0)+(x,y)=(x,y)$ and $(x,y)^{-1}=(x,-y).$ Thus $M_{x}$ is an
abelian subgroup of$M$ and for any $r\in R\;\;\;r(x,y)=(x,ry)\in M_{x}.$ Hence
$M_{x}$ is a $R$ module. ∎

Thus we have the following example for a generalized $\mathbb{R}$ module.

######  Example 8.

Consider $M=\mathbb{R}\times\mathbb{R}$ with the following operations

$(x,y)+(m,n)=(x,y+n)$ $r(x,y)=(x,ry)$

is a generalized $R$ module.

######  Theorem 3.

If $M$ is a generalized $R$ module then

  1. (1)

$e(rm)=re(m)$ for all $r\in R,\;m\in M$

  2. (2)

$(rm)^{-1}=r(m^{-1})$

###### Proof.

Let $r\in R$ and $m\in M$,

  1. (1)

$rm+re(m)=r(m+e(m))=rm$

$re(m)+rm=r(e(m)+m)=rm$

Hence $e(rm)=re(m)$

  2. (2)

$rm+rm^{-1}=r(m+m^{-1})=re(m)$ $rm^{-1}+rm=r(m^{-1}+m)=re(m)$

∎

######  Definition 11.

Let $M$ and $N$ be two generalized $R-$modules. A function $f:M\rightarrow N$
is called generalized module homomorphism if

$f(m+n)\;=f(m)+f(n)\;\;for\;all\;m,\;n\in M$ $f(rm)=rf(m)\;\;for\;all\;r\in
R,\;m\in M$

######  Definition 12.

Let $M$ be a generalized $R$ module and $N\subset M$ is said to be generalized
submodule of $M$ if $N$ is a generalized subgroup of $G$ and for each $r\in
R\;and\;m\in N$ $rm\in N$

######  Proposition 2.

Let $M$ be a generalized $R$-module which is also a normal generalized group.
Then the set of identity elements in $M$ is a submodule of $M$ and we call it
the zero submodule or trivial submodule.

###### Proof.

We denote the set of identity elements in $M$ by

$e(M)=\\{e(x)\;:\;x\in M\\}$

First we show that $e(M)$ is a generalized subgroup of $M.$ For $m,\;n\;\in
e(M)$ there exists $x,\;y\;\;\in M$ such that $m=e(x)$ and $n=e(y).$

$mn^{-1}=e(x)e(y)^{-1}=e(x)e(y)=e(xy)$

hence $xy^{-1}\in e(M)$ and $e(M)$ is a generalized subgroup of $M.$
Ler $r$ be an element in the ring $R$ and

$rm=re(x)=e(x)$

hence $rm\in M$ for all $r\in R$ and $m\in M.$ Thus set of identitt elements
of $M$ form a generalized submodule of $M.$ ∎

Every nonzero generalized module $M$ contains at least one submodule $M$
itself.

######  Theorem 4.

Let $R$ is a ring and $M$ and $N$ are normal generalized $R$ modules. If
$f:M\rightarrow N$ is a generalized $R-$ module homomorphism, then

$kerf=\\{x:x\in M,\;f(x)\in e(N)\\}$

where $e(N)$ denotes the set of identities elements of $N,$ is a submodule of
$M$ and $Imf=\\{f(x):\;\;x\in M\\}$ is a submodule of $N.$

###### Proof.

Let $M$ and $N$ be a generalized modules over a ring $R$ and $f$ is a
homomorphism between $M$ and $N.$ To show that $kerf$ is a submodule of $M$ it
is suffices to prove that it is a generalized subgroup of $M$ and is closed
under scalar multipication.
Let $x,y\in kerf$ then $f(x)=e(n)\;and\;f(y)=e(n^{\prime})$ for some
$n,\;n^{\prime}\in N$ Now consider;

$\begin{split}f(xy^{-1})&=f(x)f(y^{-1})\\\ &=f(x)(f(y))^{-1}\\\
&=e(n)e(n^{\prime})^{-1}\\\ &=e(n)e(n^{\prime})\\\
&=e(nn^{\prime})\end{split}$

hence $xy^{-1}\in kerf$ and $kerf$ is a generalized subgroup of $M.$
for any $r\in R$

$\begin{split}f(rx)&=rf(x)\\\ &=re(n)\\\ &=e(n)\\\ rx\in
kerf\;for\;each\;\;r\in R.\end{split}$

Therefore $kerf$ is a submodule of $M$ for every $m\in M.$
Similarly we can prove that $Imf$ is a submodule of $N.$ For; let $x,y\in Imf$
then there exists $m,n,\in M$ such that $f(m)=x$ and $f(n)=y.$ Now consider,

$\begin{split}xy^{-1}&=f(m)f(n)^{-1}\\\ &=f(m)f(n^{-1})\\\ &=f(mn^{-1})\\\
and\;\;mn^{-1}\in M\;\;hence\;\;xy^{-1}\in Imf.\end{split}$

Hence $Imf$ is a generalized subgroup of $N$ and for any $r\in R,$

$\begin{split}rx&=rf(m)\\\ &=f(rm),\;\;rm\in M\end{split}$

Hence $rx\in Imf$ for any $r\in R$ and $x\in M.$ Therefore $Imf$ is a
generalized submodule of $N.$ ∎

######  Theorem 5.

If $M$ is a generalized $R$-module and if there exists $x\in M$ such that
$M=Rx$ then $M$ is a module over $R$

###### Proof.

First we show that $M$ is an abelian group with respect to the generalized
group operation. For any $m,\;n\;\in M$ there exists $r,\;s\;\in R$

such that

$m=rx\quad and\quad n=sx$

Consider

$rx+sx=(r+s)x=(s+r)x=sx+rx$ $ie;\;\;\;m+n=n+m\;\;\;for\;all\;\;m,n\in M.$

Hence $M$ is an abelian generalized group hence is an abelian group.
Therefore $M$ is a $R-$ module. ∎

######  Note 6.

The generalized modules and their homomorphisms form a category in which
objects are the generalized modules and morphisms are their homomorphisms
denoted by $\mathcal{GM}.$

######  Result 7.

If $M$ and $N$ be two generalized modules over a ring $R$ then their cartesian
product $M\times N$ defined by

$M\times N=\\{(m,n):\;\;m\in M,\;\;n\in N\\}$

is a generalized module over $R$ with respect to the component wise
operations. $ie;$ for any $(m,n),\;(x,y)\;\in M\times N$ and $r\in R$ the
addition and scalar multipication is given by

$(m,n)+(x,y)=(m+x,n+y)$ $r(m,n)=(rm,rn)$

######  Definition 13.

A groupoid $\mathcal{G}$ is a generalized module groupoid over $R$ if it has a
generalized module structure over $R$ and it satisfies the following
conditions.

  1. (1)

$\mathcal{G}$ is a generalized group groupoid.

  2. (2)

For each $r\in R$ the mapping

$\eta_{r}:\mathcal{G}\rightarrow\mathcal{G}$

defined by $\eta_{r}(g)=rg$ is a functor on $\mathcal{G}$.
$ie;$ for any composable morphisms in $\mathcal{G}$ and any $r\in R$ we should
have

$\quad r(g\circ h)=rg\circ rh.$

######  Example 9.

Let $M$ be a generalized module over a ring $R.$ Then $M\times M$ is a
generalized module groupoid over $R$ with object set $M.$ It follows from the
example(6) that $M\times M$ with operation $(x,y)+(m,n)=(x+m,y+n)$ is a
generalized group groupoid. The cartesian product of two generalized modules
are again a generalized module. To show that $M\times M$ is a generalized
module groupoid over $R$ it is enough to prove that for any $r\in R$ the map
$\eta_{r}:M\times M\rightarrow M\times M$ defined by $\eta_{r}(x,y)=(rx,ry)$
is a functor. For, let $x$ be any object in the category $M\times M$ then

$\eta_{r}(1_{x})=\eta_{r}(x,x)=(rx,rx)=1_{\eta_{r}(x)}.$

Consider two composable morphisms $(x,y),(y,z)$ in $M\times M$ then

$\begin{split}\eta_{r}[(x,y)\circ(y,z)]&=\eta_{r}[(x,z)]\\\ &=(rx,rz)\\\
\eta_{r}(x,y)\circ\eta_{r}(y,z)&=(rx,ry)\circ(ry,rz)\\\ &=(rx,rz)\\\
\eta_{r}[(x,y)\circ(y,z)]&=\eta_{r}(x,y)\circ\eta_{r}(y,z)\end{split}$

hence $M\times M$ is a generalized module groupoid over $R.$

######  Definition 14.

Let $M$ and $N$ be two generalized module groupoids over a ring $R.$ A
homomorphism $f:M\rightarrow N$ of generalized module groupoids is a functor
of underlying groupoids preserving generalized module structure.

Note That the generalized module groupoids and their homomorphisms form a
category denoted by $\mathcal{G}\mathcal{M}\mathcal{G}$

######  Proposition 3.

There is a functor from the category $\mathcal{G}\mathcal{M}$ of generalized
modules to the category $\mathcal{G}\mathcal{M}\mathcal{G}$ of generalized
module groupoid

###### Proof.

Let $M$ be a generalized module over a ring $R.$ Then it can be seen that
cartesian product $M\times M$ is a generalized module groupoid over $R.$ If
$f:M_{1}\rightarrow M_{2}$ is a homomorphism of generalized modules then
define $F:\mathcal{G}\mathcal{M}\rightarrow\mathcal{G}\mathcal{M}\mathcal{G}$
by

$F(M)=M\times M$

and

$F(f):M_{1}\times M_{1}\rightarrow M_{2}\times M_{2}$ $F(f)(m,n)=(f(m),f(n))$

and it can be seen that $F(f)$ is a functor between $M_{1}\times M_{1}$ and
$M_{2}\times M_{2}$ so that $F(f)$ is a morphism in the category of
generalized module groupoid. Now we prove that $F$ is a functor between the
category of generalized modules and the generalized module groupoids. For; let
for any vertex $M\in\mathcal{G}\mathcal{M}$ we have,

$F(1_{M})(m,n)=(m,n)$ $F(1_{M})=1_{F(M)}$

let $f:M\rightarrow N$ and $g:N\rightarrow P$ be two composable homomorphisms
in $\mathcal{GM}$ then

$\begin{split}F(fg)(m,n)&=(fg(m),fg(n))\\\ &=((g(f(m)),g(f(n)))\\\
F(f)F(g)(m,n)&=F(g)(F(f)(m,n))\\\ &=F(g)(f(m),f(n))\\\ &=(g(f(m)),g(f(n)))\\\
F(fg)(m,n)&=F(f)F(g)(m,n)\;\;\forall(m,n)\in M\times M\\\
Hence\;\;\;F(fg)=F(f)F(g)\end{split}$

∎

######  Proposition 4.

Let $\\{M_{i}\;\;i\in I\\}$ be a family of generalized $R$ module groupoids.
Then $M=(\nu M,M)$ where $\nu M=\prod\nu M_{i}$ and $M=\prod M_{i}$ is a
generalized $R$ module groupoid.

###### Proof.

$\prod\nu M_{i}$ has elements $(m_{i})_{i\in I}$ where $m_{i}\in\nu M_{i}$ and
morphisms $(f_{i})_{i\in I}$ from $dom\,f_{i}$ to $cod\,f_{i}$ in $M_{i}$. The
composition of morphisms is

$(f_{i})_{i\in I}\cdot(g_{i})_{i\in I}=(f_{i}\cdot g_{i})_{i\in I}$

whenever $f_{i}$ and $g_{i}$ re composable morphisms in $M_{i}$. Since each
$M_{i}$ is a groupoid each morphism $f_{i}$ admits an inverse $f_{i}^{-1}$,
thus the product $M=(\prod\nu M_{i},\prod M_{i}),\,i\in I$ is a groupoid.
Moreover the product $M=\prod M_{i}$ has a structure of generalized module
with respect to component wise operations

$(f_{i})_{i\in I}+(g_{i})_{i\in I}=(f_{i}+g_{i})_{i\in
I}\;\;and\;\;r(f_{i})_{i\in I}=(rf_{i})_{i\in I}$

thus $M$ is a generalized group groupoid. It remains to show that the map
$\eta_{r}:M\rightarrow M$ by

$\eta_{r}(m_{i})_{i\in I}=(rm_{i})_{i\in I}$

is a functor on $M.$ For each $(x_{i})_{i\in I}\in\nu M$ consider

$\begin{split}\eta_{r}(1_{(m_{i})})_{i\in I}&=(r1_{(m_{i})})_{i\in I}\\\
&=(1_{(rm_{i})})_{i\in
I}\;\;\;\;(each\;M_{i}\;is\;a\;generalized\;module\;groupid)\\\
&=1_{\eta_{r}(m_{i})_{i\in I}}\end{split}$

let $(m_{i})_{i\in I},(n_{i})_{i\in I}$ are two composable morpisms in $M,$
then

$\begin{split}\eta_{r}((m_{i})_{i\in I}\circ(n_{i})_{i\in I})&=r((m_{i})_{i\in
I}\circ(n_{i})_{i\in I})\\\ &=r(m_{i}\circ n_{i})_{i\in I}\\\ &=(r(m_{i}\circ
n_{i})_{i\in I})\\\ &=(rm_{i}\circ rn_{i})_{i\in I}\\\ &=(rm_{i})_{i\in
I}\circ(rn_{i})_{i\in I}\\\ \eta_{r}(m_{i})_{i\in I}\circ\eta_{r}(n_{i})_{i\in
I}&=(rm_{i})_{i\in I}\circ(rn_{i})_{i\in I}\\\ \eta_{r}((m_{i})_{i\in
I}\circ(n_{i})_{i\in I})&=\eta_{r}(m_{i})_{i\in I}\circ\eta_{r}(n_{i})_{i\in
I}\end{split}$

∎

## References

  * [1] K.S.S. Nambooripad, Theory of Regular Semigroups, Sayahna Foundation Trivandrum, 2018.
  * [2] M.H. Gürsoy, H. Aslan, I. Icen, Generalized crossed modules and group-groupoids, DOI: 10.3906/mat-1602-63, Turkish J. Math., 2017.
  * [3] M. R. Molaei, Generalized groups, Bul. Inst. Politeh. Iasi. Sect. I. Mat. Mec. Teor. Fiz. 49 (1999), 21–24.
  * [4] M. R. Molaei, Generalized rings, Ital. J. Pure Appl. Math. 12 (2003), 105–111.
  * [5] Mustafa Habil Gursoy: Generalized ring groupoids Annals of the University of Craiova, Mathematics and Computer Science Series .
  * [6] Saunders Mac Lane: Categories for the Working Mathematician, Second edition, 0-387-9803-8, Springer-Verlag New york, Berlin Heidelberg Inc., 1998\.


11institutetext: University of California, Irvine22institutetext: SLAC
National Accelerator Laboratory33institutetext: Kavli Institute for Paritcle
Astrophysics and Cosmology44institutetext: Vatican Observatory55institutetext:
Lawrence Berkeley National Laboratory66institutetext: University of
Liverpool77institutetext: STFC Rutherford Appleton Laboratory88institutetext:
National Energy Research Scientific Computing Center (NERSC)99institutetext:
Fermi National Accelerator Laboratory1010institutetext: Laboratório de
Instrumentação e Física Experimental de Partículas (LIP)1111institutetext:
Oakridge National Laboratory1212institutetext: University of
Toronto1313institutetext: INFN Pisa1414institutetext: Brookhaven National
Laboratory1515institutetext: CERN1616institutetext: SUNY
Albany1717institutetext: University of Oregon1818institutetext: Rice
Universityaainstitutetext: FASER Collaborationbbinstitutetext: ATLAS
Collaborationccinstitutetext: LZ Collaborationddinstitutetext: Fermi-LAT
Collaborationeeinstitutetext: H1 Collaborationffinstitutetext: T2K
Collaborationgginstitutetext: SBND Collaborationhhinstitutetext: DESI
Collaborationiiinstitutetext: MicroBooNE Collaborationjjinstitutetext:
COHERENT Collaborationkkinstitutetext: SuperCDMS Collaborationllinstitutetext:
CMS Collaborationmminstitutetext: Mu2e Collaborationnninstitutetext: HEP
Software Foundationooinstitutetext: Geant4 Collaborationppinstitutetext: Muon
g-2 Collaborationqqinstitutetext: MINERvA Collaborationrrinstitutetext: Xenon
Collaboration

# Software and Computing for Small HEP Experiments111Authors have listed their
experimental affiliations to illustrate the diversity of experiments
represented here, but the opinions, findings, and conclusion or
recommendations expressed in the paper are those of the authors and do not
necessarily reflect the view of their collaborations.

Dave Casper (editor) 2,3,4,c,d Maria Elena Monzani (editor) 5,b,e Benjamin
Nachman (editor) 6,7,f,g Costas Andreopoulos 5,h Stephen Bailey 5,8 Deborah
Bard 5,8 Wahid Bhimji 9,i Giuseppe Cerati 10 Grigorios Chachamis 11,j Jacob
Daughhetee 12,k Miriam Diamond 9,l V. Daniel Elvira 2,3,c Alden Fan 9,m,n,o
Krzysztof Genser 13,p Paolo Girotti 5,c Scott Kravitz 9,m Robert Kutschke 14
Vincent R. Pascuzzi 9,q Gabriel N. Perdue 9,i Erica Snider 9,n Elizabeth
Sexton-Kennedy 15,b,n Graeme Andrew Stewart 16,c Matthew Szydagis 17,a,b Eric
Torrence 18,r Christopher Tunnell<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>
###### Abstract

This white paper briefly summarized key conclusions of the recent US Community
Study on the Future of Particle Physics (Snowmass 2021) workshop on Software
and Computing for Small High Energy Physics Experiments.

Submitted to the Proceedings of the US Community Study

on the Future of Particle Physics (Snowmass 2021)

##  1 Introduction

This white paper summarizes the discussion from a dedicated Snowmass workshop
on Software and Computing for Small High Energy Physics (HEP) Experiments
(https://indico.physics.lbl.gov/event/1756). The mandate for the workshop was:

  * •

Identify unique computational challenges of the ‘small’ experiment community.

  * •

Gather input about what is needed in terms of computation for these
experiments to be successful.

  * •

Connect members of the ‘small’ experiment community to the computational
frontier in Snowmass and encourage participation in topical groups.

  * •

Foster the development and re-use of open-source software, building on the
work of the HEP Software Foundation (HSF) and other collaborative efforts
within the community.

In order to be inclusive, we did not impose a definition of ‘small’ and have
asked experiments to self-select. The workshop was organized into two days: a
first day for perspectives from representative experiments and a second day
about computational tools. In particular, on the first day, we heard from
CERN-based experiment FASER Feng:2017uoz , Fermilab-based experiments
MicroBooNE MicroBooNE:2016pwy  and g-2 Muong-2:2015xgu , and non-CERN/FNAL
experiments LUX-ZEPLIN (LZ) LZ:2019sgr , COHERENT COHERENT:2018gft , and DESI
DESI:2019jxc . These experiments covered all of the HEP frontiers. On the
second day, there were speakers covering the HSF, High Performance Computing
(HPC), event processing frameworks, reconstruction frameworks, event
generators, detector simulations, and machine learning. The slides contain a
wealth of information about each of these topics and are preserved at the
indico link above. The goal of this white paper is to describe some of the key
takeaway points from the presentations and discussions. If the entire workshop
had to be summarized in one phrase, it would be222Quoted from E. Snider’s
presentation.

$\displaystyle\textbf{small experiment}\neq\textbf{small data volume or small
computing problem!}$

##  2 Key Observations and Recommendations

Below is a summary of important points discussed at the workshop; key
recommendations are offset in bold. The four subsections below are in no
particular order.

###  2.1 High Performance Computing Centers

Increasingly, small experiments need to rely on HPC resources for a
significant fraction of their computing budget. At the workshop, we heard
about challenges by experiments in porting to HPC resources and about
challenges from HPC center staff about accommodating small experiment users.

From the perspective of an HPC center, ‘small’ experiments look very similar
to ‘large’ experiments. They have similar scales in terms of compute hours,
storage used and number of users, and they all need peripheral services such
as databases and workflow controls, as well as allocations on the big systems.
For an HPC center, this means both ‘small’ and ‘large’ experiments present the
same demands on resources. What distinguishes ‘small’ experiments is that many
of the common issues faced by all experiment teams working at HPC centers are
exacerbated by the lack of human resources available to work on these issues.
It is vital that science teams and HPC centers partner to address these
challenges. These issues fall into roughly three areas:

  * •

Getting codes running on new architectures

  * •

Adapting to HPC center policy

  * •

Tools that are easy to stand up and maintain

####  2.1.1 Key challenge: Porting workflows to new architectures

The DOE Office of Advanced Scientific Computing Research (ASCR) operates three
computing and one networking user facilities. All have a joint mission to
advance both science and the state of the art in computing. ASCR facilities
engage with vendors years in advance of a system’s delivery, to ensure that
production systems push the limits of existing technology. There are three key
drivers in this advancement that pose a challenge to scientific workflow
design:

  * •

Energy efficiency. Scientific computing needs are ever-increasing, but there
is a limit to the amount of power and cooling we can safely bring into a
building. Energy efficient architectures are here to stay, including
specialized devices that perform specific calculations at ultra-high
efficiency (e.g., for AI/ML).

  * •

New storage technologies. Object stores are increasingly prevalent, and
massively parallel file systems do not always respond well to data-intensive
workloads.

  * •

Peripheral services. We are seeing an increasing use and reliance on
containers, scalable databases, and interfaces to other computing sites (e.g.,
local clusters, the cloud).

A pressing question for both experiment teams and HPC center staff is how to
optimize the entire end-to-end workflow, not just individual applications. The
NESAP program at NERSC (the National Energy Science Research Computing center)
partners with application development teams and vendors to port and optimize
codes to new architectures and platforms. Lessons learned from this process
are shared with the wider NERSC community via documentation and training.
NESAP is evolving with the types of systems we deploy, and will need to
support workflow optimisation in the future.

Programs like NESAP are extremely valuable to small experiments and we
advocate for a continuation and/or expansion of this program. However, we also
heard about difficulties in recruiting NESAP postdocs. This is discussed in
more detail in Sec. 2.6.

####  2.1.2 Key challenge: Policy optimization

Some of the biggest challenges faced by users of HPC centers are due to
security and policy concerns, rather than technical barriers. Supporting the
needs of experiment workflows has pushed NERSC to change policies around (for
example) near-realtime access to systems, and support for federated ID.

In addition, NERSC has recognised that some workflows highly value continued
access to NERSC services - for example, if an experiment is operating 24/7.
Through careful planning and investment, we are now able to keep most
infrastructure up during outages using generators and new system software
capabilities for rolling upgrades. We are also supporting research in several
projects to support more portable cross-facility workflows alcc .

####  2.1.3 Key challenge: Scaling user support

NERSC is increasingly supporting more users and projects from experiment
facilities (including other DOE user facilities). HPC centers are facing a sea
change in the number and type of users they support - without any change in
the number of staff available to support them. This challenge requires a new
approach to user support, to make it easier for users to develop and adapt
their workflows without direct support from NERSC staff. If done successfully,
this will also make it easier for ‘small’ experiments to adapt to HPC centers.

The LBNL Superfacility Project superfacility  was designed to leverage and
integrate work being done across NERSC, ESnet and research divisions at LBNL
to provide a coordinated and coherent approach to supporting experimental
science at DOE facilities. The principles behind the project were to provide
an integrated, scalable and sustainable framework for experiment science,
working closely with a range of science teams to get the design right and
using existing, industry standard and open source tools wherever possible.
This 3-year Project was completed at the end of 2021, having achieved its aim,
although work continues very actively on Superfacility topics. NERSC is now
able to support automated pipelines that analyze data from remote facilities
at large scale, without routine human intervention, using capabilities such as
near-realtime computing, dynamic networking, API-driven automation, HPC-scale
notebooks with Jupyter jupyter , state of the art data management tools,
federated ID and container-based peripheral services.

###  2.2 Requirements beyond FLOPS, bytes, and bandwidth

Classic high performance computing (HPC) centers have traditionally focused on
maximizing the number of floating point operations per second (FLOPS)
delivered to massively parallel programs, coupled with large bandwidth to disk
and tape storage. Small experiments often have requirements that go beyond
just FLOPS, bytes, and bandwidth, e.g. databases, data access portals, I/O
robustness, complex workflows with many interdependent smaller jobs,
collaboration accounts accessible by multiple users to coordinate data
processing, queue waittime, and jupyter notebook servers. High uptime, low
mean time to failure (MTTF), and access to realtime and interactive computing
resources are particularly important for the effective use of computing
centers by smaller experiments. Supporting these requirements takes tangible
specific effort from the computing centers, and tangible specific effort from
the experiments to adapt. As such, HPC centers need dedicated support for non-
HPC workloads with appropriate metrics for evaluating success, e.g. minimizing
MTTF and providing interactive access, and not just FLOPS delivered.
Similarly, experiments need dedicated support to adapt and maintain their
workflows to take full advantage of the opportunities at HPC centers.

###  2.3 Software Challenges

High Energy Physics has a vast investment in software estimated to be greater
than 50M lines of C++ code. It is a critical part of our physics production
pipeline, from triggering and simulation all the way to analysis and final
plots. This legacy represents a huge investment over the years. It requires
ongoing support in human effort to adapt to changing computing technologies.
As shown in figure 1, improved single-threaded performance will not come from
the hardware. Computing gains come from increasing concurrency in the code,
especially at HPC centers. Concurrent programming skills must be learned and
not all experimenters want to invest in becoming proficient in concurrent
programming. There is no longer a large supply of graduate students and
postdocs, the historical sources of experiment software, that can write or
even maintain codes for these complicated architectures. This hits smaller
experiments especially hard, because there may not be a critical mass of
people with the critical skills needed. See Sec. 2.6 for suggestions on how to
address personnel needs. Efforts to share code developed by the large
experiments should be funded to have broader impact for the community, and
thereby maximize return on those investments. This means adding time for
documentation, training, and outreach. Whenever possible the code should be
open sourced.

Figure 1: Microprocessors reach the power wall limit circa 2010

###  2.4 Support for Common Tools

A reoccurring theme in nearly all of the experiment vignettes was the need for
common tools. A distinguishing feature of small experiments compared to large
ones is that they often do not have many, many or, in some cases, any
dedicated software and computing experts. This means that there is limited/no
resources to develop new data acquisition, simulation and reconstruction tools
from scratch as large experiments are often able to do. Some small experiments
benefit from shared expertise with large experiments, especially those located
at CERN and FNAL. Yet many small experiments do not have such natural overlap,
and they are left with few avenues to obtain the resources necessary to
develop their required suite of tools.

In some cases, larger experiments have (at least partially) abstracted and
open-sourced their software in a way that it can be re-used by small
experiments. Two great examples of this are the software packages ACTS
Ai:2021ghi  and LArSoft Snider:2017wjd  (https://larsoft.org) as well as the
event processing frameworks Gaudi Barrand:2001ny , Art Green:2012gv  and
Stitched (https://github.com/cms-sw/Stitched), an abstraction of the CMSSW
frameworkJones:2006 ; Jones:2014 ; Jones:2015 ; Jones:2017 ; Bocci:2020 ).
ACTS (A Common Tracking Software) is a package for tracking at collider
experiments, initially based on ATLAS code. It provides experiment-independent
implementations of track and vertex reconstruction algorithms which are
available for usage by any experiment once their geometry and material
description is implemented in ACTS. Successful examples include ATLAS, FASER,
sPHENIX, Belle-II. LArSoft is a shared base of simulation, reconstruction, and
analysis software across liquid argon time projection chamber (LArTPC)
neutrino experiments. LArSoft is currently used by all Fermilab-based LArTPC
experiments, including DUNE and smaller-scale experiments (SBN, MicroBooNE,
LArIAT, ArgoNeuT). Both ACTS and LArSoft provide ready-to-use software
solutions as well as a platform for R&D work spanning usage of AI methods,
algorithm parallelization, and deployment at HPC, which can significantly
reduce the required workload for smaller experiments.

However, some open source tools still require significant adaptation or
development and thus require experiment-independent support. The best example
of this is the widely-used detector simulation software Geant4 GEANT4:2002zbu
; Allison:2006ve ; Allison:2016lfl . Even for large experiments, significant
resources are required to integrate Geant4 into the detector-specific setup.
Many small experiments have physics needs beyond those covered by large
experiments and additional development is necessary. Some of this is happening
organically (e.g. NEST nest  for direct dark matter detection), but this is
not always the case. To strengthen the partnership between the Geant4
Collaboration and the experiments, Geant4 has recently introduced a “Geant4
contributor” status, which should facilitate a faster inclusion of codes
developed by the experiments, benefiting the entire community.

In the US, the HEP support for Geant4 comes from the computing operations
budgets of large experiments and intensity frontier operations at Fermilab.
This leads to a stove-piping of Geant4 support such that issues specific to
those experiments are addressed because they are needed for the operation of
the experiment. Other experiments that use Geant4 are left out in the cold. In
addition, Geant4’s common software, such as physics models, no longer receives
any US maintenance funding. The physics Generators used in the field (eg.
Pythia, GENIE, Madgraph, Sherpa) also suffer from lack of stable funding in a
similar way. This is not sustainable for the long term viability of small
experiments. Long term, experiment-agnostic Geant4 support is critical for the
success of small experiments. At the workshop, we also heard that many small
experiments do not update Geant4 versions frequently (or ever!), and so they
are unable to take advantage of new developments, whereas maintaining many old
versions by the Geant4 collaboration is unsustainable. This means that small
experiments often use no longer supported Geant4 versions and miss out on
recent physics developments and computational innovations, such as multi-
threading or the ongoing integration with Graphical Processing Units (GPUs).

###  2.5 Data Storage and Preservation

Data preservation is necessary for scientific repeatability, while helping
maximize the “return on investment” of our experiments. Re-analysis of data is
of particular interest, as advances in analysis methods and physics models
become available such as more detailed simulations and new applications of
machine learning. Well-understood datasets are often the best source of
training for young physicists, and open-access datasets support outreach
efforts by targeting both data literacy and science skills. In addition,
standardized, trusted data repositories are critical for developing and
testing new machine-learning algorithms Dua:2019 . Encouraging the experiments
to make their data publicly available will lead to a richer ecosystem of
available datasets, and help with long-term preservation of data and
experimental knowledge. Most important is the publication of data following
the end of an experiment. One way of ensuring data are usable for post-
experiment use is to periodically release data throughout the lifetime of the
experiment. Another model is to internally future-proof data formats and
analysis software to always be able to analyze older datasets. In both cases,
person-power is required for an effective implementation.

Computing clusters do not typically guarantee hosting for significant lengths
of time, nor do they have mechanisms to easily share these data with the
public. However, services for long-term data and software preservation
(https://heasarc.gsfc.nasa.gov and https://lambda.gsfc.nasa.gov) have been
used for decades in astronomy, and the HEP community has become quite familiar
with them. Ensuring data usability long after the end of an experiment is not
quite as simple as “dumping everything” in a publicly available repository.
Detailed detector information is needed, as well as access to metadata such as
slow-control and calibration databases. Moreover, community standards
specifying data format and interfaces must be agreed upon. Finally, prototype
analysis codes must be published with the datasets, further lowering the
barrier to data access and ensuring that the data is analyzed correctly. It
has become more commonplace in our community to take advantage of general
purpose data and code services like Zenodo (https://www.zenodo.org), which
provide most of the infrastructure required for effective data preservation.

###  2.6 Computing Personnel

The general challenge of maintaining software and computing talent is
exacerbated in small experiments by the lack of long term, permanent positions
within the experiments. Many of the software tasks are carried about by young
collaborators and there is significant turnover from year to year. A special
case is an experiment that is both small and far from data, for which it is
common that the community of junior people working on software is not large
enough to be self-sustaining. This problem can be partly mitigated by
increased use of common tools but that does not address the task of developing
experiment specific configurations, customizations and glueware.

It is therefore essential that there is funding for permanent software and
computing experts. The careers of these researchers should be evaluated
appropriately with rewards to efficiency, stability, and robustness. A more
transparent approach to software development and data sharing would go a long
way towards improving the career prospects of software and computing experts,
as it would allow individuals to claim credit for their work and be evaluated
appropriately. There is little funding for software maintenance, even though
this is critical. One possibility is the creation of research software
engineer (RSE) positions that have long term funding independent of
experiments, but for the support of existing and planned experiments. Another
area of opportunity is the increase of joint particle physics and data science
appointments at universities, which have become marginally more common over
the last decade. We also need to increase the community investment in general
software literacy of physicists, through (continuing) education initiatives
and collaborations with industry, national labs and academia.

The diversity issues pervasive in HEP are exacerbated in the computing domain
due to the (perceived) technical nature of the work, and we must ensure that
faculty, staff, and trainee positions are viable career options for a diverse
group of people. Our workforce development efforts should explicitly include
equity, and recognize that diversity is foundational to our success, as it
demonstrably increases the creativity of solutions and variety of approaches.
Diversifying the computational workforce will require efforts to diversify
physics in general, and to leverage our partnership with the astronomy and
industry communities, who have made substantial efforts in this direction over
the last decade. This remains a challenging problem, but not insurmountable,
as STEM identity formation for underrepresented minorities has become a
priority in a variety of educational settings, from early childhood to higher
education STEM-diversity .

## Acknowledgments

We thank the participants of the Software and Computing for Small HEP
Experiments workshop https://indico.physics.lbl.gov/event/1756 for many useful
discussions.

This work was supported by the US Department of Energy, Office of Science,
under contract numbers DE-AC02-76SF00515 (SLAC) and DE-AC02-05CH11231 (LBNL),
and by the Fermi National Accelerator Laboratory, managed and operated by
Fermi Research Alliance, LLC under Contract DE-AC02-07CH11359 with the US
Department of Energy. GC acknowledges support by the Fundação para a Ciência e
a Tecnologia (Portugal) under project CERN/FIS-PAR/0024/2019 and contract
’Investigador auxiliar FCT - Individual Call/03216/2017’ and from the European
Union’s Horizon 2020 research and innovation programme under grant agreement
No. 824093.

## References

  * (1) J. L. Feng, I. Galon, F. Kling and S. Trojanowski, _ForwArd Search ExpeRiment at the LHC_ , _Phys. Rev. D_ 97 (2018) 035001, [1708.09389].
  * (2) MicroBooNE collaboration, R. Acciarri et al., _Design and Construction of the MicroBooNE Detector_ , _JINST_ 12 (2017) P02017, [1612.05824].
  * (3) Muon g-2 collaboration, J. Grange et al., _Muon (g-2) Technical Design Report_ , 1501.06858.
  * (4) LZ collaboration, D. S. Akerib et al., _The LUX-ZEPLIN (LZ) Experiment_ , _Nucl. Instrum. Meth. A_ 953 (2020) 163047, [1910.09124].
  * (5) COHERENT collaboration, D. Akimov et al., _COHERENT 2018 at the Spallation Neutron Source_ , 1803.09183.
  * (6) DESI collaboration, M. E. Levi et al., _The Dark Energy Spectroscopic Instrument (DESI)_ , 1907.10688.
  * (7) K. B. Antypas, D. J. Bard, J. P. Blaschke, R. Shane Canon, B. Enders, M. A. Shankar et al., _Enabling discovery data science through cross-facility workflows_ , in _2021 IEEE International Conference on Big Data (Big Data)_ , pp. 3671–3680, 2021, DOI.
  * (8) B. Enders, D. Bard, C. Snavely, L. Gerhardt, J. Lee, B. Totzke et al., _Cross-facility science with the superfacility project at lbnl_ , in _2020 IEEE/ACM 2nd Annual Workshop on Extreme-scale Experiment-in-the-Loop Computing (XLOOP)_ , pp. 1–7, 2020, DOI.
  * (9) R. Thomas and S. Cholia, _Interactive supercomputing with jupyter_ , _Computing in Science Engineering_ 23 (2021) 93–98.
  * (10) X. Ai et al., _A Common Tracking Software Project_ , 2106.13593.
  * (11) E. L. Snider and G. Petrillo, _LArSoft: Toolkit for Simulation, Reconstruction and Analysis of Liquid Argon TPC Neutrino Detectors_ , _J. Phys. Conf. Ser._ 898 (2017) 042057.
  * (12) G. Barrand et al., _GAUDI - A software architecture and framework for building HEP data processing applications_ , _Comput. Phys. Commun._ 140 (2001) 45–55.
  * (13) C. Green, J. Kowalkowski, M. Paterno, M. Fischler, L. Garren and Q. Lu, _The Art Framework_ , _J. Phys. Conf. Ser._ 396 (2012) 022020.
  * (14) C. Jones, M. Paterno, J. Kowalkowski, L. Sexton-Kennedy and W. Tanenbaum, _The new cms event data model and framework_ , _Proceedings for Computing in High-Energy Physics (CHEP’06), Mumbai, India_ 13 (2006) .
  * (15) C. D. Jones and E. Sexton-Kennedy, _Stitched Together: Transitioning CMS to a Hierarchical Threaded Framework_ , _J. Phys. Conf. Ser._ 513 (2014) 022034.
  * (16) CMS collaboration, C. D. Jones, L. Contreras, P. Gartung, D. Hufnagel and L. Sexton-Kennedy, _Using the CMS Threaded Framework In A Production Environment_ , _J. Phys. Conf. Ser._ 664 (2015) 072026.
  * (17) CMS collaboration, C. D. Jones, _CMS event processing multi-core efficiency status_ , _J. Phys. Conf. Ser._ 898 (2017) 042008.
  * (18) A. Bocci, D. Dagenhart, V. Innocente, C. Jones, M. Kortelainen, F. Pantaleo et al., _Bringing heterogeneity to the CMS software framework_ , _EPJ Web Conf._ 245 (2020) 05009, [2004.04334].
  * (19) GEANT4 collaboration, S. Agostinelli et al., _GEANT4–a simulation toolkit_ , _Nucl. Instrum. Meth. A_ 506 (2003) 250–303.
  * (20) GEANT4 collaboration, J. Allison et al., _Geant4 developments and applications_ , _IEEE Trans. Nucl. Sci._ 53 (2006) 270.
  * (21) GEANT4 collaboration, J. Allison et al., _Recent developments in Geant4_ , _Nucl. Instrum. Meth. A_ 835 (2016) 186–225.
  * (22) M. Szydagis, N. Barry, K. Kazkaz, J. Mock, D. Stolp, M. Sweany et al., _Nest: a comprehensive model for scintillation yield in liquid xenon_ , _Journal of Instrumentation_ 6 (Oct, 2011) P10002–P10002.
  * (23) D. Dua and C. Graff, _UCI machine learning repository_ , 2017.
  * (24) A. Singer, G. Montgomery and S. Schmoll, _How to foster the formation of stem identity: studying diversity in an authentic learning environment_ , _International Journal of STEM Education_ 7 (12, 2020) .


4.86 2.23 - - - - - $10^{-1}$ 0.5 710 2.23 5.05 2.50 1.0 649 2.12 4.77 2.37 -
- - - - $10^{0}$ 0.5 3030 2.17 3.15 2.26 1.0 2053 2.33 4.62 2.55 - - - - -
$10^{1}$ 0.5 7423 2.46 4.54 2.66 1.0 6447 2.60 4.50 2.79 - - - - -

##  Appendix C EHT 230 GHz Polarization Constraints

In this section, we present tables of the 230 GHz polarimetric quantities -
$|m|_{\rm net}$, $|v|_{\rm net}$, and $\langle|m|\rangle$ \- that are used as
constraints in the EHT model scoring analysis in EHT Collaboration et al.
(2021b). We present these quantities for both he M87* constant $\beta_{\rm
e0}$ jet models and the Sgr A* RIAF models. For M87*, we present pass/fail
values based on whether all three quantities satisfy the EHT constraints from
M87* within 1.5$\sigma$. For Sgr A*, we do not present a Pass/Fail value,
since we explore a more limited parameter space and because our preliminary
data constraints on the resolved polarization $\langle|m|\rangle$ from Johnson
et al. (2015) will soon be supplemented with a detailed analysis from resolved
2017 EHT Sgr A* images. Table 4 presents the 230 GHz polarimetric quantities
for the M87* jet model, and Table 5 present the 230 GHz polarimetric
quantities for the Sgr A* RIAF.

Table 4:  Table of 230 GHz polarimetric quantities
$\left(|m|_{\mathrm{net}},\langle|m|\rangle,|v_{\mathrm{net}}|\right)$ for
different M87* constant $\beta_{\rm e0}$ jet models. We also present an
overall pass/rail score (P/F) based on whether all three quantities satisfy
EHT 2017 constraints on the quantities within $1.5\sigma$ (note that none of
the quantities fall within the $1\sigma$ range given in the constraint table
from EHT Collaboration et al. (2021b)). In each section of five rows, we fix
the value of the positron fraction $f_{\rm pos}$ and vary the electron
distribution spectral slope $p\in\\{2.5,2.8,3.0,3.2,3.5\\}.$ The three
sections of five columns each contains data for different values of
$\beta_{\rm e0}\in\\{10^{-6},10^{-4},10^{-2}\\}$.

$f_{\mathrm{pos}}$ $p$ $\beta_{\mathrm{e0}}$ $|m|_{\mathrm{net}}$
$\langle|m|\rangle$ $|v_{\mathrm{net}}|$ Score $\beta_{\mathrm{e0}}$
$|m|_{\mathrm{net}}$ $\langle|m|\rangle$ $|v_{\mathrm{net}}|$ Score
$\beta_{\mathrm{e0}}$ $|m|_{\mathrm{net}}$ $\langle|m|\rangle$
$|v_{\mathrm{net}}|$ Score 0.0 2.5 $10^{-6}$ 0.29 0.41 0.016 F $10^{-4}$ 0.19
0.30 0.016 F $10^{-2}$ 0.12 0.19 0.015 F 0.0 2.8 $10^{-6}$ 0.26 0.38 0.016 F
$10^{-4}$ 0.16 0.25 0.017 F $10^{-2}$ 0.08 0.14 0.012 F 0.0 3.0 $10^{-6}$ 0.25
0.36 0.017 F $10^{-4}$ 0.15 0.22 0.016 F $10^{-2}$ 0.06 0.1 0.011 F 0.0 3.2
$10^{-6}$ 0.25 0.36 0.017 F $10^{-4}$ 0.13 0.20 0.014 F $10^{-2}$ 0.05 0.079
0.01 F 0.0 3.5 $10^{-6}$ 0.23 0.33 0.017 F $10^{-4}$ 0.1 0.15 0.014 F
$10^{-2}$ 0.032 0.054 0.008 P 0.01 2.5 $10^{-6}$ 0.29 0.41 0.016 F $10^{-4}$
0.191 0.302 0.016 F $10^{-2}$ 0.117 0.195 0.015 F 0.01 2.8 $10^{-6}$ 0.267
0.379 0.016 F $10^{-4}$ 0.163 0.253 0.017 F $10^{-2}$ 0.087 0.141 0.012 F 0.01
3.0 $10^{-6}$ 0.25 0.359 0.016 F $10^{-4}$ 0.148 0.22 0.016 F $10^{-2}$ 0.067
0.099 0.011 F 0.01 3.2 $10^{-6}$ 0.258 0.360 0.017 F $10^{-4}$ 0.134 0.202
0.014 F $10^{-2}$ 0.053 0.079 0.01 F 0.01 3.5 $10^{-6}$ 0.234 0.327 0.017 F
$10^{-4}$ 0.101 0.156 0.014 F $10^{-2}$ 0.034 0.055 0.009 P 0.1 2.5 $10^{-6}$
0.296 0.413 0.015 F $10^{-4}$ 0.193 0.319 0.015 F $10^{-2}$ 0.131 0.221 0.016
F 0.1 2.8 $10^{-6}$ 0.271 0.387 0.0145 F $10^{-4}$ 0.175 0.266 0.016 F
$10^{-2}$ 0.094 0.147 0.014 F 0.1 3.0 $10^{-6}$ 0.259 0.371 0.016 F $10^{-4}$
0.153 0.233 0.017 F $10^{-2}$ 0.074 0.112 0.012 F 0.1 3.2 $10^{-6}$ 0.262
0.372 0.017 F $10^{-4}$ 0.146 0.217 0.015 F $10^{-2}$ 0.054 0.087 0.012 F 0.1
3.5 $10^{-6}$ 0.244 0.342 0.019 F $10^{-4}$ 0.106 0.171 0.015 F $10^{-2}$
0.036 0.061 0.011 P 0.5 2.5 $10^{-6}$ 0.31 0.44 0.015 F $10^{-4}$ 0.23 0.389
0.018 F $10^{-2}$ 0.158 0.291 0.017 F 0.5 2.8 $10^{-6}$ 0.30 0.42 0.015 F
$10^{-4}$ 0.201 0.340 0.018 F $10^{-2}$ 0.131 0.219 0.019 F 0.5 3.0 $10^{-6}$
0.30 0.411 0.015 F $10^{-4}$ 0.183 0.308 0.021 F $10^{-2}$ 0.093 0.172 0.021 F
0.5 3.2 $10^{-6}$ 0.315 0.424 0.017 F $10^{-4}$ 0.19 0.296 0.023 F $10^{-2}$
0.096 0.149 0.023 F 0.5 3.5 $10^{-6}$ 0.30 0.406 0.021 F $10^{-4}$ 0.165 0.254
0.026 F $10^{-2}$ 0.06 0.099 0.026 F 1.0 2.5 $10^{-6}$ 0.31 0.464 0.015 F
$10^{-4}$ 0.25 0.479 0.029 F $10^{-2}$ 0.21 0.503 0.047 F 1.0 2.8 $10^{-6}$
0.307 0.448 0.014 F $10^{-4}$ 0.24 0.458 0.027 F $10^{-2}$ 0.19 0.48 0.038 F
1.0 3.0 $10^{-6}$ 0.313 0.44 0.012 F $10^{-4}$ 0.23 0.44 0.027 F $10^{-2}$
0.18 0.467 0.04 F 1.0 3.2 $10^{-6}$ 0.338 0.459 0.011 F $10^{-4}$ 0.25 0.44
0.028 F $10^{-2}$ 0.195 0.46 0.053 F 1.0 3.5 $10^{-6}$ 0.33 0.447 0.011 F
$10^{-4}$ 0.27 0.427 0.028 F $10^{-2}$ 0.2 0.44 0.071 F

Table 5: Table of 230 GHz polarimetric quantities
$\left(|m|_{\mathrm{net}},\langle|m|\rangle,|v_{\mathrm{net}}|\right)$ for
different Sgr A* RIAF models. In each block of 4 rows/5 columns, we fix the
positron fraction $f_{\mathrm{pos}}\in\\{0.0,0.01,0.1\\}$ and vary the
plasma-$\beta\in\\{10^{-2},10^{-1},1,10\\}$. All other parameters are fixed to
their values from Broderick et al. (2016).

$\beta$ $f_{\mathrm{pos}}$ $|m|_{\mathrm{net}}$ $\langle|m|\rangle$
$|v_{\mathrm{net}}|$ $f_{\mathrm{pos}}$ $|m|_{\mathrm{net}}$
$\langle|m|\rangle$ $|v_{\mathrm{net}}|$ $f_{\mathrm{pos}}$
$|m|_{\mathrm{net}}$ $\langle|m|\rangle$ $|v_{\mathrm{net}}|$ $10^{-2}$ 0.0
0.20 0.41 0.009 0.01 0.2 0.41 0.010 0.1 0.20 0.41 0.01 $10^{-1}$ 0.0 0.19 0.40
0.019 0.01 0.18 0.40 0.019 0.1 0.18 0.40 0.019 $10^{0}$ 0.0 0.18 0.39 0.032
0.01 0.18 0.39 0.032 0.1 0.18 0.39 0.033 $10^{1}$ 0.0 0.22 0.37 0.047 0.01
0.22 0.37 0.048 0.1 0.21 0.37 0.051 $10^{-2}$ 0.5 0.2 0.40 0.015 1.0 0.20 0.40
0.017 - - - - $10^{-1}$ 0.5 0.18 0.40 0.023 1.0 0.19 0.39 0.027 - - - -
$10^{0}$ 0.5 0.17 0.36 0.045 1.0 0.18 0.37 0.041 - - - - $10^{1}$ 0.5 0.17
0.37 0.054 1.0 0.17 0.36 0.058 - - - -

Figure 8: Stokes Map for M87* jet model with $\beta_{\mathrm{e0}}=10^{-2}$ and
for $p\in\\{2.5,3.0,3.5\\}$. We have chosen $f_{\mathrm{pos}}=0.01$. To
facilitate the comparison between different models, we have chosen the same
color bars for different models. All of the images are blurred with a fiducial
EHT beam of $20\mu$as. Figure 9:  Polarized spectral decomposition for M87*
jet models with electron spectral index $p\in\\{2.5,3.0,3.5\\}$ and positron-
to-electron ratio $f_{\mathrm{pos}}\in\\{0.0,0.1,1.0\\}$. We fix
$\beta_{\mathrm{e0}}=10^{-2}$.

##  Appendix D Additional model exploration for M87* constant $\beta_{\rm e0}$
jet model

Here we study the impact of changing the non-thermal index $p$ and the
electron-to-magnetic pressure ratio $\beta_{\rm e0}$ on the Stokes maps and
polarized SEDs from the M87* jet model. In Fig. 8, we show images at a fixed
value of $\beta_{\rm e0}=10^{-2}$ and $f_{\rm pos}=10^{-2}$ and vary
$p\in{2.5,3.0,3.5}$. We show that increasing $p$ diminished the total linear
and circular polarized intensity at 230 GHz. In Figure 9, we present the total
intensity SED and spectra of $|m|_{\rm net}$ and $|v|_{\rm net}$ when we vary
the lepton spectral index and the positron fraction $(p,f_{\mathrm{pos}})$ in
the range, $p\in\\{2.5,3.0,3.5\\}$ and $f_{\mathrm{pos}}\in\\{0.0,0.5,1.0\\}$
while fixing $\beta_{\mathrm{e0}}=10^{-2}$. It is evident that the total
intensity Stokes $I$ SED is relatively insensitive to the positron fraction
but it is highly sensitive to the electron spectral index $p$, as we would
expect. Only $p=3.0$ fits the near-infrared data points in the M87* SED well.
However, we have chosen $p=3.5$ as our fiducial M87* model because lower
values of $p$ dramatically overproduce the observed linear and circular
polarization (seen in the center and middle panels). In the linear
polarization fraction $|m|$, the impact of different positron fractions
$f_{\mathrm{pos}}$ is evident in lower frequencies $\nu/\mathrm{Hz}\leq
10^{12}$; in particular, at $f_{\rm pos}=1$, all values of $p$ produce strong
linear polarization fractions $\sim 30-40$%. Finally, the spectrum of circular
polarization $|v|$ shows a very distinctive dependence on the positron
fraction $f_{\mathrm{pos}}$. At high frequencies $>10^{13}$Hz, increasing the
positron fraction suppresses the Stokes V emission, as Faraday conversion is
inefficient. However, near the 230 GHz spectral peak, the Stokes $V$ emission
is dominated by Faraday conversion, and increasing the positron content
increases the total flux density in the submm.

Figure 10: Stokes maps for M87* jet models with
$\beta_{\mathrm{e0}}=(10^{-6},10^{-4},10^{-2})$, fixing $p=3.5$ and $f_{\rm
pos}=0.01$. All of the images are blurred with a fiducial EHT beam of
$20\mu$as. Figure 11:  Polarized spectral decomposition for M87* jet models
when varying $\beta_{\mathrm{e0}}\in\\{10^{-6},10^{-4},10^{-2}\\}$ and
$f_{\mathrm{pos}}\in\\{0.0,0.1,1.0\\}$. We vary fix the electron distribution
index $p=3.5$.

In Fig. 10, we present Stokes maps varying
$\beta_{\mathrm{e0}}\in\\{10^{-6},10^{-4},10^{-2}\\}$ while holding fixed
$p=3.2$ and $f_{\mathrm{pos}}=0.01$. We see that by increasing the electron
pressure through increasing $\beta_{\mathrm{e0}}$, we decrease the polarized
brightness in $Q$ and $U$. This arises because increasing $\beta_{\rm e0}$
increases the efficiency of Faraday rotation, as we can see by noticing more
scrambling in the EVPA patterns as we proceed from the top to bottom in Fig.
10. In Fig. 11, we show Stokes $I$ SEDs and polarization fraction spectra when
varying $\beta_{\rm e0}$. The $\beta_{\mathrm{e0}}=10^{-6},10^{-4}$ models
tend to be more sensitive to $\beta_{\mathrm{e0}}$ than to positron content,
with an X-ray excess (relative to the observed value) occurring for the lower
value and the better fit to the $I$ spectrum occurring for the higher values.
The polarized decomposition in Fig. 11, shows a pronounced effect for circular
polarization, which may serve as a crucial observational discriminant with
higher positron fraction drastically reducing the high frequency slope. This
is because Faraday conversion becomes less efficient at higher frequencies
(note Faraday conversion is always efficient at the peak even when
$f_{\mathrm{pos}}=1$).

In Figure 11, we present the spectrum for
$(\beta_{\mathrm{e0}},f_{\mathrm{pos}})$ in the range,
$\beta_{\mathrm{e0}}\in\\{10^{-6},10^{-4},10^{-2}\\}$ and
$f_{\mathrm{pos}}\in\\{0.0,0.5,1.0\\}$ keeping $p=3.5$ fixed. It is evident
that while the Stokes $I$ SED for different models is similar at lower
frequencies where self-absorption dominates the spectral slope, smaller values
of $\beta_{\rm e0}$ shift the position of the synchrotron peak and the
position of the spectral cutoff at high $\nu$ to larger values. Models with
larger $\beta_{\rm e0}$ (weaker magnetic fields), have their synchrotron
emission peak at lower frequencies and also have a cutoff in the power-law
slope from optically thin emission at lower frequencies (note that the upper
Lorentz factor $\gamma_{\rm max}$ is fixed in all models). In the linearly
polarized spectrum, the magnitude of the high frequency, near-infrared
fractional linear polarization is constant with different $\beta_{\rm e0}$,
but at submm and radio frequencies, models with larger $\beta_{\rm e0}$ values
are less polarized. Once again, increasing $f_{\rm pos}$ increases the linear
polarization fraction at all values of $\beta_{\rm e0}$ as a result of the
suppression of Faraday rotation with increasing positron content (e.g.
Jiménez-Rosales & Dexter, 2018). Particularly for low $\beta_{\rm e0}$ at high
frequencies in Stokes $I$ or $m$, it is easier to distinguish models based on
$p$ or $\beta_{e0}$ than with positron fraction $f_{\mathrm{pos}}$, but at
lower sub-mm and radio frequencies, $f_{\mathrm{pos}}$ has the dominant
effect. The spectrum of the circular polarization behaves similarly as in
Figure 9. The circular polarization fraction $|V|$ diminishes with higher
positron fraction as the Faraday conversion becomes less efficient at high
frequencies and since the intrinsic production of Stokes $|V|$ is suppressed
due to the presence of positrons in the emitting plasma. However, Faraday
conversion is always efficient at the peak even when $f_{\mathrm{pos}}=1$ and
the pair plasma models have the highest degree of circular polarization at
submm wavelengths as their Faraday conversion coefficients are enhanced.

##  Appendix E Impact of Faraday Rotation and conversion

In this Appendix, we demonstrate the dominant role of Faraday rotation and
conversion in determining the submm linear and circular polarization structure
of our models. In Figure 12, we present images of our fiducial model (varying
the positron fraction $f_{\rm pos}$ in each row) with both Faraday conversion
and rotation manually set to zero in our radiative transfer. Comparing to
Figures 1 and 1, we find the most significant changes in the model images when
turning on and off Faraday effects are:

$\bullet$ With Faraday rotation turned off, the linear polarization EVPA
pattern at all values of $f_{\rm pos}$ is entirely azimuthal (and the Stokes
$Q$ and $U$ patterns are completely quadrupolar). This is because in the
absence of Faraday effects, the EVPA orientation is only set by the field
orientation in the emission region, which in our models near the horizon is
predominantly poloidal. Faraday rotation scrambles the EVPA pattern,
depolarizing the image on EHT scales and distorting the underlying azimuthal
pattern that is the imprint of the jet launching field structure in this
model.

$\bullet$ With Faraday conversion turned off, the circular polarization $V$
diminishes with increasing $f_{\rm pos}$ and completely disappears when
$f_{\mathrm{pos}}\to 1$. Circular polarization at $230$GHz in these models is
predominantly due to Faraday conversion. With Faraday conversion present, a
large positron fraction actually enhances the total degree of circular
polarization.

Figure 12: Stokes maps for M87* jet models were we fix
$\beta_{\mathrm{e0}}=10^{-2}$ and $p$ = 3.5. From top to bottom, we vary the
fraction of positrons $f_{\rm pos}\in\\{0,0.01,0.1,1\\}$. Here we have turned
off the Faraday rotation and Faraday conversion coefficients in performing
radiative transfer.All of the images are blurred with a fiducial EHT beam of
$20\mu$as.


# Unsupervised Inference of Data-Driven Discourse Structures
using a Tree Auto-Encoder

Patrick Huber and Giuseppe Carenini
Department of Computer Science
University of British Columbia
Vancouver, BC, Canada, V6T 1Z4
{huberpat<EMAIL_ADDRESS>
##  1 Introduction

Discourse Parsing is a key NLP task for processing multi-sentential natural
language. Most research in the area thereby focuses on one of the two main
discourse theories – RST Mann and Thompson (1988) or PDTB Prasad et al.
(2008). While these discourse theories are of great value for the field of
discourse parsing and have been guiding its progress ever since, there are two
major problems when data is annotated according to those theories: (1) Due to
the inherently ambiguous nature of natural language, the inter-annotator
agreement when following the annotation guidelines is relatively low Carlson
et al. (2003) and (2) The annotation process itself is expensive and tedious,
limiting the size of available gold-standard datasets.

With a growing need for robust and general discourse structures in many
downstream tasks and real-world applications (e.g. Gerani et al. (2014); Nejat
et al. (2017); Ji and Smith (2017)), the current lack of high-quality, high-
quantity discourse trees poses a severe shortcoming.

Figure 1: T-AE (Tree Auto-Encoder) topology for unsupervised discourse
parsing. Dashed components represent actions outside the computational path
chosen. Inputs and outputs are dense encodings, $\widehat{EDU}_{x}$ represents
reconstruction of spans, red = model inputs/outputs, blue = TreeLSTM cells,
green = discrete structure selector as in Choi et al. (2018), yellow = hidden
subtree encodings, orange = hidden state of the complete document.

Fortunately, there are more data-driven alternatives to infer discourse
structures. For example, the recently proposed MEGA-DT treebank Huber and
Carenini (2019), whose discourse structures and nuclearity attributes are
automatically inferred from large-scale sentiment datasets, reaching state-of-
the-art performance on the inter-domain discourse parsing task. Similarly,
another approach by Liu et al. (2019) infers latent discourse trees from the
downstream summarization task using a transformer model. Outside the area of
discourse parsing, syntactic trees have previously been inferred according to
several diverse strategies, e.g. Socher et al. (2011); Yogatama et al. (2016);
Choi et al. (2018); Maillard et al. (2019). In general, the approaches
mentioned above have been shown to capture valuable information. Some models
outperform baselines trained on human datasets (see Huber and Carenini
(2019)), others are proven to enhance diverse downstream tasks Liu et al.
(2019); Choi et al. (2018). However, despite these initial successes, one
limitation that all aforementioned models share is the task-specificity,
oftentimes only capturing downstream task-related components and potentially
compromising the generality of the resulting trees, as for instance shown for
the model using summarization data Liu et al. (2019) in Ferracane et al.
(2019).

In order the alleviate the limitation described above, we propose a new
strategy to generate tree structures in a task-agnostic, unsupervised fashion
by extending a latent tree induction framework Choi et al. (2018) with an
auto-encoding objective. The proposed approach can be applied to any tree-
structured objective, such as syntactic parsing, discourse parsing and others.
However, due to the especially difficult annotation process to generate
discoursetrees, we initially intend to develop such method to complement task-
specific models in generating much larger and more diverse discourse
treebanks.

##  2 Unsupervised Tree Auto-Encoder

Our intuition for the tree auto-encoder comes from previous work, indicating
that with available gold-standard trees, the programming-language translation
task can learn valid projections in a tree-to-tree style neural network Chen
et al. (2018). Furthermore, variational auto-encoders have been shown
effective for the difficult task of grammar induction Kusner et al. (2017).
Generally speaking, our new model is similar in spirit to the commonly used
sequence-to-sequence (seq2seq) architecture Sutskever et al. (2014), which has
also been interpreted as a sequential auto-encoder Li et al. (2015). However,
our approach generalizes on the seq2seq model, which represents a special
(left-branching) case of a general, tree-structured auto-encoder. While the
sequential structure of a document is naturally given by the order of words,
Elementary Discourse Units (EDUs) or sentences, we face the additional
difficulty to infer a valid tree structure alongside the hidden states. To
generate discrete tree structures during training, we make use of the Gumbel-
Softmax decision framework Jang et al. (2016).

As presented in Figure 1, the structure of our novel T-AE (Tree Auto-Encoder)
model comprises of an encoder and decoder component. The steps performed by
the encoder are akin with the approach described in Choi et al. (2018) and we
direct readers to their paper for more information. Given the dense hidden
state of the complete document (orange in Fig. 1), Choi et al. (2018) add a
multi-layer-perceptron (MLP) to predict the document-level sentiment. As a
result, the obtained tree structures are mostly task-dependent Williams et al.
(2018). With the goal to generate task-independent, more general structures,
we replace the task-dependant MLP layer with our auto-encoder objective to
reconstruct the original tree leaves (EDUs in our case). The decoder component
is implemented as an inverse Tree-LSTM, recursively splitting hidden states
into left and right components by applying two independent LSTM modules,
guided by the predicted tree structure of the Gumbel-Softmax. This computation
is recursively applied top-down until the original number of EDUs is reached.
The EDU encodings reconstructed by the decoder are then compared with the
initial EDU encodings, derived from the average GloVe embeddings of words
within the EDUs. The Mean-Squared-Error (MSE) loss is computed and back-
propagated to enhance the hidden states (orange/yellow in Fig. 1) and
structure prediction (green in Fig. 1) of the model. To disentangle the
optimization of the structure and hidden states, we apply a phased approach.
This way, the hidden states are recalculated based on the last epoch’s
structure prediction and vice-versa, creating a conditional back-propagation
loop with a single objective in each pass over the data. We tie the decoder
tree structure to the predicted encoder tree to ensure consistent compression
and reconstruction, enhancing the ability to predict the leaf node encodings.
We are currently developing and testing T-AE, with Figure 2 showing outputs of
two independent model-runs trained on the Yelp’13 review corpus Tang et al.
(2015), compared on a randomly selected (short) example from RST-DT.

Figure 2: Discourse trees for document wsj_1395.
(a) Gold-tree, (b)/(c) T-AE outputs. Red nodes indicate deviations from the
gold-tree.

## References

  * Carlson et al. (2003) Lynn Carlson, Daniel Marcu, and Mary Ellen Okurowski. 2003.  Building a discourse-tagged corpus in the framework of rhetorical structure theory.  In _Current and new directions in discourse and dialogue_ , pages 85–112. Springer.
  * Chen et al. (2018) Xinyun Chen, Chang Liu, and Dawn Song. 2018.  Tree-to-tree neural networks for program translation.  In _Advances in neural information processing systems_ , pages 2547–2557.
  * Choi et al. (2018) Jihun Choi, Kang Min Yoo, and Sang-goo Lee. 2018.  Learning to compose task-specific tree structures.  In _Thirty-Second AAAI Conference on Artificial Intelligence_.
  * Ferracane et al. (2019) Elisa Ferracane, Greg Durrett, Junyi Jessy Li, and Katrin Erk. 2019.  Evaluating discourse in structured text representations.  _arXiv preprint arXiv:1906.01472_.
  * Gerani et al. (2014) Shima Gerani, Yashar Mehdad, Giuseppe Carenini, Raymond T Ng, and Bita Nejat. 2014\.  Abstractive summarization of product reviews using discourse structure.  In _Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP)_ , pages 1602–1613.
  * Huber and Carenini (2019) Patrick Huber and Giuseppe Carenini. 2019.  Predicting discourse structure using distant supervision from sentiment.  In _Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP)_ , pages 2306–2316.
  * Jang et al. (2016) Eric Jang, Shixiang Gu, and Ben Poole. 2016.  Categorical reparameterization with gumbel-softmax.  _arXiv preprint arXiv:1611.01144_.
  * Ji and Smith (2017) Yangfeng Ji and Noah A Smith. 2017.  Neural discourse structure for text categorization.  In _Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pages 996–1005.
  * Kusner et al. (2017) Matt J Kusner, Brooks Paige, and José Miguel Hernández-Lobato. 2017.  Grammar variational autoencoder.  _arXiv preprint arXiv:1703.01925_.
  * Li et al. (2015) Jiwei Li, Minh-Thang Luong, and Dan Jurafsky. 2015.  A hierarchical neural autoencoder for paragraphs and documents.  _arXiv preprint arXiv:1506.01057_.
  * Liu et al. (2019) Yang Liu, Ivan Titov, and Mirella Lapata. 2019.  Single document summarization as tree induction.  In _Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)_ , pages 1745–1755.
  * Maillard et al. (2019) Jean Maillard, Stephen Clark, and Dani Yogatama. 2019.  Jointly learning sentence embeddings and syntax with unsupervised tree-lstms.  _Natural Language Engineering_ , 25(4):433–449.
  * Mann and Thompson (1988) William C Mann and Sandra A Thompson. 1988.  Rhetorical structure theory: Toward a functional theory of text organization.  _Text-Interdisciplinary Journal for the Study of Discourse_ , 8(3):243–281.
  * Nejat et al. (2017) Bita Nejat, Giuseppe Carenini, and Raymond Ng. 2017.  Exploring joint neural model for sentence level discourse parsing and sentiment analysis.  In _Proceedings of the 18th Annual SIGdial Meeting on Discourse and Dialogue_ , pages 289–298.
  * Prasad et al. (2008) Rashmi Prasad, Nikhil Dinesh, Alan Lee, Eleni Miltsakaki, Livio Robaldo, Aravind Joshi, and Bonnie Webber. 2008.  The penn discourse treebank 2.0.  _LREC_.
  * Socher et al. (2011) Richard Socher, Jeffrey Pennington, Eric H Huang, Andrew Y Ng, and Christopher D Manning. 2011.  Semi-supervised recursive autoencoders for predicting sentiment distributions.  In _Proceedings of the 2011 conference on empirical methods in natural language processing_ , pages 151–161.
  * Sutskever et al. (2014) Ilya Sutskever, Oriol Vinyals, and Quoc V Le. 2014.  Sequence to sequence learning with neural networks.  In _Advances in neural information processing systems_ , pages 3104–3112.
  * Tang et al. (2015) Duyu Tang, Bing Qin, and Ting Liu. 2015.  Document modeling with gated recurrent neural network for sentiment classification.  In _Proceedings of the 2015 conference on empirical methods in natural language processing_ , pages 1422–1432.
  * Williams et al. (2018) Adina Williams, Andrew Drozdov*, and Samuel R Bowman. 2018.  Do latent tree learning models identify meaningful structure in sentences?  _Transactions of the Association for Computational Linguistics_ , 6:253–267.
  * Yogatama et al. (2016) Dani Yogatama, Phil Blunsom, Chris Dyer, Edward Grefenstette, and Wang Ling. 2016\.  Learning to compose words into sentences with reinforcement learning.  _arXiv preprint arXiv:1611.09100_.