  Hypergraphs naturally represent group interactions, which are omnipresent in
many domains: collaborations of researchers, co-purchases of items, joint
interactions of proteins, to name a few. In this work, we propose tools for
answering the following questions in a systematic manner: (Q1) what are
structural design principles of real-world hypergraphs? (Q2) how can we compare
local structures of hypergraphs of different sizes? (Q3) how can we identify
domains which hypergraphs are from? We first define hypergraph motifs
(h-motifs), which describe the connectivity patterns of three connected
hyperedges. Then, we define the significance of each h-motif in a hypergraph as
its occurrences relative to those in properly randomized hypergraphs. Lastly,
we define the characteristic profile (CP) as the vector of the normalized
significance of every h-motif. Regarding Q1, we find that h-motifs' occurrences
in 11 real-world hypergraphs from 5 domains are clearly distinguished from
those of randomized hypergraphs. In addition, we demonstrate that CPs capture
local structural patterns unique to each domain, and thus comparing CPs of
hypergraphs addresses Q2 and Q3. Our algorithmic contribution is to propose
MoCHy, a family of parallel algorithms for counting h-motifs' occurrences in a
hypergraph. We theoretically analyze their speed and accuracy, and we show
empirically that the advanced approximate version MoCHy-A+ is up to 25X more
accurate and 32X faster than the basic approximate and exact versions,
respectively.
