  Anomaly detection algorithms are a valuable tool in network science for
identifying unusual patterns in a network. These algorithms have numerous
practical applications, including detecting fraud, identifying network security
threats, and uncovering significant interactions within a dataset. In this
project, we propose a probabilistic generative approach that incorporates
community membership and reciprocity as key factors driving regular behavior in
a network, which can be used to identify potential anomalies that deviate from
expected patterns. We model pairs of edges in a network with exact two-edge
joint distributions. As a result, our approach captures the exact relationship
between pairs of edges and provides a more comprehensive view of social
networks. Additionally, our study highlights the role of reciprocity in network
analysis and can inform the design of future models and algorithms. We also
develop an efficient algorithmic implementation that takes advantage of the
sparsity of the network.
