  In this paper, we consider the community detection problem in signed
networks, where there are two types of edges: positive edges (friends) and
negative edges (enemies). One renowned theorem of signed networks, known as
Harary's theorem, states that structurally balanced signed networks are
clusterable. By viewing each cycle in a signed network as a parity-check
constraint, we show that the community detection problem in a signed network
with two communities is equivalent to the decoding problem for a parity-check
code. We also show how one can use two renowned decoding algorithms in error-
correcting codes for community detection in signed networks: the bit-flipping
algorithm, and the belief propagation algorithm. In addition to these two
algorithms, we also propose a new community detection algorithm, called the
Hamming distance algorithm, that performs community detection by finding a
codeword that minimizes the Hamming distance. We compare the performance of
these three algorithms by conducting various experiments with known ground
truth. Our experimental results show that our Hamming distance algorithm
outperforms the other two.
