{'fraction_non_alphanumeric': 0.05158497211623129, 'fraction_numerical': 0.011813912533020252, 'mean_word_length': 3.8268106959447494, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Graph Zeta Function in the Bethe Free Energy and Loopy Belief Propagation

We propose a new approach to the analysis of Loopy Belief Propagation (LBP) by establishing a formula that connects the Hessian of the Bethe free energy with the edge zeta function. The formula has a number of theoretical implications on LBP. It is applied to give a sufficient condition that the Hessian of the Bethe free energy is positive definite, which shows non-convexity for graphs with multiple cycles. The formula clarifies the relation between the local stability of a fixed point of LBP and local minima of the Bethe free energy. We also propose a new approach to the uniqueness of LBP fixed point, and show various conditions of uniqueness.


Introduction
Pearl's belief propagation [1] provides an efficient method for exact computation in the inference with probabilistic models associated to trees. As an extension to general graphs allowing cycles, Loopy Belief Propagation (LBP) algorithm [2] has been proposed, showing successful performance in various problems such as computer vision and error correcting codes.
One of the interesting theoretical aspects of LBP is its connection with the Bethe free energy [3]. It is known, for example, the fixed points of LBP correspond to the stationary points of the Bethe free energy. Nonetheless, many of the properties of LBP such as exactness, convergence and stability are still unclear, and further theoretical understanding is needed. This paper theoretically analyzes LBP by establishing a formula asserting that the determinant of the Hessian of the Bethe free energy equals the reciprocal of the edge zeta function up to a positive factor. This formula derives a variety of results on the properties of LBP such as stability and uniqueness, since the zeta function has a direct link with the dynamics of LBP as we show.
The first application of the formula is the condition for the positive definiteness of the Hessian of the Bethe free energy. The Bethe free energy is not necessarily convex, which causes unfavorable behaviors of LBP such as oscillation and multiple fixed points. Thus, clarifying the region where the Hessian is positive definite is an importance problem. Unlike the previous approaches which consider the global structure of the Bethe free energy such as [4,5], we focus the local structure. Namely, we provide a simple sufficient condition that determines the positive definite region: if all the correlation coefficients of the pseudomarginals are smaller than a value given by a characteristic of the graph, the Hessian is positive definite. Additionally, we show that the Hessian always has a negative eigenvalue around the boundary of the domain if the graph has at least two cycles.
Second, we clarify a relation between the local stability of a LBP fixed point and the local structure of the Bethe free energy. Such a relation is not necessarily obvious, since LBP is not the gradient descent of the Bethe free energy. In this line of studies, Heskes [6] shows that a locally stable fixed point of LBP is a local minimum of the Bethe free energy. It is thus interesting to ask which local minima of the Bethe free energy are stable or unstable fixed points of LBP. We answer this question by elucidating the conditions of the local stability of LBP and the positive definiteness of the Bethe free energy in terms of the eigenvalues of a matrix, which appears in the graph zeta function.
Finally, we discuss the uniqueness of LBP fixed point by developing a differential topological result on the Bethe free energy. The result shows that the determinant of the Hessian at the fixed points, which appears in the formula of zeta function, must satisfy a strong constraint. As a consequence, in addition to the known result on the one-cycle case, we show that the LBP fixed point is unique for any unattractive connected graph with two cycles without restricting the strength of interactions.

Loopy belief propagation algorithm and the Bethe free energy
Throughout this paper, G = (V, E) is a connected undirected graph with V the vertices and E the undirected edges. The cardinality of V and E are denoted by N and M respectively.
In this article we focus on binary variables, i.e., x i ∈ {±1}. Suppose that the probability distribution over the set of variables x = (x i ) i∈V is given by the following factorization form with respect to G: where Z is a normalization constant and ψ ij and ψ i are positive functions given by In various applications, the computation of marginal distributions p i (x i ) := x\{xi} p(x) and is required though the exact computation is intractable for large graphs. If the graph is a tree, they are efficiently computed by Pearl's belief propagation algorithm [1]. Even if the graph has cycles, it is empirically known that the direct application of this algorithm, called Loopy Belief Propagation (LBP), often gives good approximation.
LBP is a message passing algorithm. For each directed edge, a message vector µ i→j (x j ) is assigned and initialized arbitrarily. The update rule of messages is given by where N i is the neighborhood of i ∈ V . The order of edges in the update is arbitrary. In this paper we consider parallel update, that is, all edges are updated simultaneously. If the messages converge to a fixed point {µ ∞ i→j }, the approximations of p i (x i ) and p ij (x i , x j ) are calculated by the beliefs, with normalization xi b i (x i ) = 1 and xi,xj b ij (x i , x j ) = 1. From (2) and (3), the constraints We introduce the Bethe free energy as a tractable approximation of the Gibbs free energy. The exact distribution (1) is characterized by a variational problem p(x) = argminp F Gibbs (p), where the minimum is taken over all probability distributions on (x i ) i∈V and F Gibbs (p) is the Gibbs free energy defined by F Gibbs (p) = KL(p||p) − log Z. Here KL(p||p) = p log(p/p) is the Kullback-Leibler divergence fromp to p. Note that F Gibbs (p) is a convex function ofp.
In the Bethe approximation, we confine the above minimization to the distribution of the form satisfying these constraints is called pseudomarginals. For computational tractability, we modify the Gibbs free energy to the objective function called Bethe free energy: The domain of the objective function F is the set of pseudomarginals. The function F does not necessarily have a unique minimum. The outcome of this modified variational problem is the same as that of LBP [3]. To put it more precisely, There is a one-to-one correspondence between the set of stationary points of the Bethe free energy and the set of fixed points of LBP.
It is more convenient if we work with minimal parameters, mean m i = E bi [x i ] and correlation Then we have an effective parametrization of pseudomarginals: The Bethe free energy (4) is rewritten as where η(x) := x log x. The domain of F is written as The Hessian of F , which consists of the second derivatives with respect to {m i , χ ij }, is a square matrix of size N + M and denoted by ∇ 2 F . This is considered to be a matrix-valued function on L(G). Note that, from (6), ∇ 2 F does not depend on J ij and h i .

Zeta function and Ihara's formula
For each undirected edge of G, we make a pair of oppositely directed edges, which form a set of directed edges E. Thus | E| = 2M . For each directed edge e ∈ E, o(e) ∈ V is the origin of e and t(e) ∈ V is the terminus of e. For e ∈ E, the inverse edge is denoted byē, and the corresponding undirected edge by [e] = [ē] ∈ E.
A closed geodesic in G is a sequence (e 1 , . . . , e k ) of directed edges such that t(e i ) = o(e i+1 ) and e i =ē i+1 for i ∈ Z/kZ. Two closed geodesics are said to be equivalent if one is obtained by cyclic permutation of the other. An equivalent class of closed geodesics is called a prime cycle if it is not a repeated concatenation of a shorter closed geodesic. Let P be the set of prime cycles of G. For given weights u = (u e ) e∈ E , the edge zeta function [7,8] is defined by (1 − g(p)) −1 , g(p) := u e1 · · · u e k for p = (e 1 , . . . , e k ), where u e ∈ C is assumed to be sufficiently small for convergence. This is an analogue of the Riemann zeta function which is represented by the product over all the prime numbers. Example 1. If G is a tree, which has no prime cycles, ζ G (u) = 1. It is known that the edge zeta function has the following simple determinant formula, which gives analytical continuation to the whole C 2M . Let C( E) be the set of functions on the directed edges. We define a matrix on C( E), which is determined by the graph G, by where U is a diagonal matrix defined by U e,e ′ := u e δ e,e ′ .
We need to show another determinant formula of the edge zeta function, which is used in the proof of Theorem 3. We leave the proof of Theorem 2 to the supplementary material. Theorem 2 (Multivariable version of Ihara's formula). Let C(V ) be the set of functions on V . We define two linear operators on C(V ) by If we set u e = u for all e ∈ E , the edge zeta function is called the Ihara zeta function [9] and denoted by ζ G (u). In this single variable case, Theorem 2 is reduced to Ihara's formula [10]: where D is the degree matrix and A is the adjacency matrix defined by

Main formula
Theorem 3 (Main Formula). The following equality holds at any point of L(G): where b ij and b i are given by (5) and Proof. (The detail of the computation is given in the supplementary material.) From (6), it is easy to see that the (E,E)-block of the Hessian is a diagonal matrix given by Using this diagonal block, we erase (V,E)-block and (E,V)-block of the Hessian. In other words, we choose a square matrix X such that det X = 1 and After the computation given in the supplementary material, we see that From For the left equality, Theorem 2 is used.
Theorem 3 shows that the determinant of the Hessian of the Bethe free energy is essentially equal to det(I −UM), the reciprocal of the edge zeta function. Since the matrix UM has a direct connection with LBP as seen in section 5, the above formula derives many consequences shown in the rest of the paper.

Application to positive definiteness conditions
The convexity of the Bethe free energy is an important issue, as it guarantees uniqueness of the fixed point. Pakzad et al [11] and Heskes [5] derive sufficient conditions of convexity and show that the Bethe free energy is convex for trees and graphs with one cycle. In this section, instead of such global structure, we shall focus the local structure of the Bethe free energy as an application of the main formula.
For given square matrix X, Spec(X) ⊂ C denotes the set of eigenvalues (spectra), and ρ(X) the spectral radius of a matrix X, i.e., the maximum of the modulus of the eigenvalues. Theorem 4. Let M be the matrix given by (7). For given {m i , χ ij } ∈ L(G), U is defined by (13).
From Theorem 3, det(∇ 2 F (t)) = 0 holds on this interval. Using (14) and Since the eigenvalues of ∇ 2 F (t) are real and continuous with respect t, the eigenvalues of ∇ 2 F (1) must be positive reals.
We define the symmetrization of u i→j and u j→i by Thus, u i→j u j→i = β i→j β j→i . Since β i→j = β j→i , we sometimes abbreviate β i→j as β ij . From the final expression, we see that |β ij | < 1. Define diagonal matrices Z and B by (Z) e,e ′ := δ e,e ′ (1 − m 2 t(e) ) 1/2 and (B) e,e ′ := δ e,e ′ β e respectively. Then we have The following corollary gives a more explicit condition of the region where the Hessian is positive definite in terms of the correlation coefficients of the pseudomarginals.

Corollary 1. Let α be the Perron Frobenius eigenvalue of M and define
As is seen from (11), α −1 is the distance from the origin to the nearest pole of Ihara's zeta ζ G (u). From example 1, we see that ζ G (u) = 1 for a tree G and ζ CN (u) = (1 − u N ) −2 for a 1-cycle graph C N . Therefore α −1 is ∞ and 1 respectively. In these cases, L α −1 (G) = L(G) and F is a strictly convex function on L(G), because |β e | < 1 always holds. This reproduces the results shown in [11]. In general, using Theorem 8.
Theorem 3 is also useful to show non-convexity.
where κ(G) is the number of spanning trees in G. In particular, F is never convex on L(G) for any connected graph with at least two linearly independent cycles, i.e. M − N ≥ 1.
Proof. The equation (16) is obtained by Hashimoto's theorem [13], which gives the u → 1 limit of the Ihara zeta function. (See supplementary material for the detail.) If M − N ≥ 1, the right hand side of (16) is negative. As approaches to {m i = 0, χ ij = 1} ∈ L(G), the determinant of the Hessian diverges to −∞. Therefore the Hessian is not positive definite near the point.
Summarizing the results in this section, we conclude that F is convex on L(G) if and only if G is a tree or a graph with one cycle. To the best of our knowledge, this is the first proof of this fact.

Application to stability analysis
In this section we discuss the local stability of LBP and the local structure of the Bethe free energy around a LBP fixed point. Heskes [6] shows that a locally stable fixed point of sufficiently damped LBP is a local minima of the Bethe free energy. The converse is not necessarily true in general, and we will elucidate the gap between these two properties.
First, we regard the LBP update as a dynamical system. Since the model is binary, each message µ i→j (x j ) is parametrized by one parameter, say η i→j . The state of LBP algorithm is expressed by η = (η e ) e∈ E ∈ C( E), and the update rule (2) is identified with a transform T on C( E), A fixed point η ∞ is called locally stable if LBP starting with a point sufficiently close to η ∞ converges to η ∞ . The local stability is determined by the linearizion T ′ around the fixed point. As is discussed in [14], η ∞ is locally stable if and only if Spec To suppress oscillatory behaviors of LBP, damping of update T ǫ := (1 − ǫ)T + ǫI is sometimes useful, where 0 ≤ ǫ < 1 is a damping strength and I is the identity. A fixed point is locally stable with some damping if and only if Spec There are many representations of the linearization (derivative) of LBP update (see [14,15]), we choose a good coordinate following Furtlehner et al [16]. In section 4 of [16], they transform messages as µ i→j → µ i→j /µ ∞ i→j and functions as It is now clear that the condition for positive definiteness, local stability of damped LBP and local stability of undamped LBP are given in terms of the set of eigenvalues, C \ R ≥1 , {λ ∈ C|Reλ < 1} and {λ ∈ C||λ| < 1} respectively. A locally stable fixed point of sufficiently damped LBP is a local minimum of the Bethe free energy, because {λ ∈ C|Reλ < 1} is included in C \ R ≥1 . This reproduces Heskes's result [6]. Moreover, we see the gap between the locally stable fixed points with some damping and the local minima of the Bethe free energy: if Spec(T ′ (η ∞ )) is included in C \ R ≥1 but not in {λ ∈ C|Reλ < 1}, the fixed point is a local minimum of the Bethe free energy though it is not a locally stable fixed point of LBP with any damping.
It is interesting to ask under which condition a local minimum of the Bethe free energy is a stable fixed point of (damped) LBP. While we do not know a complete answer, for an attractive model, which is defined by J ij ≥ 0, the following theorem implies that if a stable fixed point becomes unstable by changing J ij and h i , the corresponding local minimum also disappears.

Theorem 6. Let us consider continuously parametrized attractive models
For given t, run LBP algorithm and find a (stable) fixed point. If we continuously change t and see the LBP fixed point becomes unstable across t = t 0 , then the corresponding local minimum of the Bethe free energy becomes a saddle point across t = t 0 .
for some θ i and θ j . From J ij ≥ 0, we have Cov bij [x i , x j ] = χ ij − m i m j ≥ 0, and thus u i→j ≥ 0. When the LBP fixed point becomes unstable, the Perron Frobenius eigenvalue of UM goes over 1, which means det(I − UM) crosses 0. From Theorem 3 we see that det(∇ 2 F ) becomes positive to negative at t = t 0 .
Theorem 6 extends Theorem 2 of [14], which discusses only the case of vanishing local fields h i = 0 and the trivial fixed point (i.e. m i = 0).

Application to uniqueness of LBP fixed point
The uniqueness of LBP fixed point is a concern of many studies, because the property guarantees that LBP finds the global minimum of the Bethe free energy if it converges. The major approaches to the uniqueness is to consider equivalent minimax problem [5], contraction property of LBP dynamics [17,18], and to use the theory of Gibbs measure [19]. We will propose a different, differential topological approach to this problem.
In our approach, in combination with Theorem 3, the following theorem is the basic apparatus.
We call each summand, which is +1 or −1, the index of F at q.
Note that the set (∇F ) −1 (0), which is the stationary points of the Bethe free energy, coincides with the fixed points of LBP. The above theorem asserts that the sum of indexes of all the fixed points must be one. As a consequence, the number of the fixed points of LBP is always odd. Note also that the index is a local quantity, while the assertion expresses the global structure of the function F . Sketch of proof. Define a map Φ : L(G) → R N +M by Φ := ∇F + h J . Note that Φ does not depend on h and J as seen from (6). Then it is enough to prove because Φ −1 (0) has a unique element {m i = 0, χ ij = 0}, at which ∇ 2 F is positive definite, and the right hand side of (45) is equal to one. Define a sequence of manifolds {C n } by C n := {q ∈ L(G)| ij∈E xi,xj − log b ij ≤ n}, which increasingly converges to L(G). Take K > 0 and ǫ > 0 is the closed ball of radius K at the origin. Let Π ǫ : R N +M → B 0 (K) be a smooth map that is the identity on B 0 (K −ǫ), monotonically increasing on x , and Π ǫ (x) = K x x for x ≥ K. We obtain a mapΦ := Π ǫ • Φ : C n0 → B 0 (K) such that Φ(∂C n0 ) ⊂ ∂B 0 (K). Applying Lemma 2 yields (45).
If we can guarantee that the index of every fixed point is +1 in advance of running LBP, we conclude that fixed point of LBP is unique. We have the following a priori information for β. Lemma 3. Let β ij be given by (15) at any fixed point of LBP. Then |β ij | ≤ tanh(|J ij |) and sgn(β ij ) = sgn(J ij ) hold.
Proof. From (3), we see that b ij (x i , x j ) ∝ exp(J ij x i x j + θ i x i + θ j x j ) for some θ i and θ j . With (15) and straightforward computation, we obtain β ij = sinh(2J ij )(cosh(2θ i ) + cosh(2J ij )) −1/2 (cosh(2θ j )+cosh(2J ij )) −1/2 . The bound is attained when θ i = 0 and θ j = 0. From Theorem 7 and Lemma 3, we can immediately obtain the uniqueness condition in [18], though the stronger contractive property is proved under the same condition in [18].   In the proof of the above corollary, we only used the bound of modulus. In the following case of Corollary 4, we can utilize the information of signs. To state the corollary, we need a terminology.
Since an equivalent model is obtained by gauge transformation x i → x i s i , the uniqueness property of LBP for equivalent models is unchanged.

Corollary 4. If the number of linearly independent cycle of G is two (i.e. M − N + 1 = 2), and the interaction is not equivalent to attractive model, then the LBP fixed point is unique.
The proof is shown in the supplementary material. We give an example to illustrate the outline.
In other cases, we can reduce to the graphĜ or the graphs in figure 3 similarly (see the supplementary material).
For attractive models, the fixed point of the LBP is not necessarily unique.
For graphs with multiple cycles, all the existing results on uniqueness make assumptions that upperbound |J ij | essentially. In contrast, Corollary 4 applies to arbitrary strength of interactions if the graph has two cycles and the interactions are not attractive. It is noteworthy that, from Corollary 2, the Bethe free energy is non-convex in the situation of Corollary 4, while the fixed point is unique.

Concluding remarks
For binary pairwise models, we show the connection between the edge zeta function and the Bethe free energy in Theorem 3, in the proof of which the multi-variable version of Ihara's formula (Theorem 2) is essential. After the initial submission of this paper, we found that Theorem 3 is extended to a more general class of models including multinomial models and Gaussian models represented by arbitrary factor graphs. We will discuss the extended formula and its applications in a future paper. Some recent researches on LBP have suggested the importance of zeta function. In the context of the LDPC code, which is an important application of LBP, Koetter et al [21,22] show the connection between pseudo-codewords and the edge zeta function. On the LBP for the Gaussian graphical model, Johnson et al [23] give zeta-like product formula of the partition function. While these are not directly related to our work, pursuing covered connections is an interesting future research topic. We see that M = OT * − ι, because Finally, we check that T * (I + Uι) −1 UO =Â −D. The matrix (I + Uι) −1 is a block diagonal matrix with (e,ē) block

Supplementary Material for "Graph Zeta Function in the Bethe Free Energy and
For f ∈ C(V ), we have

B Proof of Theorem 3 B.1 Explicit formula of derivatives of the Bethe free energy
In the proof of Theorem 3, the graph G = (V, E) is assumed to be a simple graph, i.e., there is no multiple edges and loop-edge For the proof, we need explicit expressions of the second derivatives of the Bethe free energy. We list them below.
The first derivatives of the Bethe Free Energy are The second derivatives of the Bethe Free Energy are We use notations t ij := 1 4 xi,xj Note that r ij = r ji and t ij = t ji , but s ij = s ji in general.

B.2 Detailed proof of Theorem 3
Proof. First, note that the Hessian of the Bethe free energy is a square matrix of size N + M : Recall that N is the number of vertices and M is the number of undirected edges.
Using this diagonal block, we erase (V,E)-block and (E,V)-block of the Hessian. Thus, we obtain a square matrix X such that det X = 1 and

Applying an identity
for each edge, we have otherwise.
The elements of Y are represented in terms of {m i , χ ij } as follows: and, for adjacent i and j.
Step2: Computation of I N +D −Â From the definition (13) of u j→i , we see that . Therefore, the diagonal element is , and for adjacent i and j, .
Combining the results of step 1 and 2, we have Step3: Final step We see that From (27) to (28), we used the edge zeta version of Ihara's formula (Theorem 2).
Furthermore, with a straightforward computation we see that

C Proof of Corollary 2
Here, we prove the limit formula in Corollary 2.
Proof. We can easily check that u i→j (t) = t, On the final equality, we used Hashimoto's formula: We refer to [13,25,26] for this formula.

D Transformation of messages and proof of Theorem 5 D.1 Transformation of messages
First, we make an easy observation on the LBP update. Proposition 1. Let {π i→j } be any set of messages. We define a transformation from messages We also define transformation from functions {ψ ij , ψ i } to functions {ψ ij ,ψ i } bỹ Then the update is equivalent toμ Proof. The equivalence of (33) and (34) is easily checked by (30), (31), and (32).
Symbolically, Proposition 1 implies that where Π is the transformation of the messages by π i→j , T is the LBP update with {ψ ij , ψ i }, and T is the LBP update with {ψ ij ,ψ i } . Differentiation of this relation gives the transformation of the linearization matrix.
If we choose {π i→j } as π i→j (x j ) = µ ∞ i→j (x j ), then (30), (31) and (32) becomes This is the transformation used in the paper.

D.2 Proof of Theorem 5
Proof. Let {µ ∞ i→j (x j )} be the set of messages at the fixed point and let Π be the transformation of messages defined by the fixed point messages. We parameterize the messages by η t i→j = µ t i→j (+)/µ t i→j (−). It is enough to prove the assertion after the transformation and in this parameterization, because these operations cause similar linearization matrices.
After the transformation, the LBP update is given in terms ofη as follows: . Figure 4: The sum of indexes is one. Figure 5: The sum of indexes is still one.

E Idea and proof of Theorem 7 E.1 Idea of Theorem 7
In Theorem 7, we show that the sum of indexes is equal to one. This is not so special. The simplest example that illustrate the idea of the theorem is sketched in figure 4. For each stationary point, plus or minus sign is assigned depending on the sign of the second derivative. When we deform the function, the sum is still equal to one as long as the outward gradients are positive at the boundaries.

E.2 Proof of Lemma 1
Proof. First, note that it is enough to prove the assertion when h i = 0 and J ij = 0.
We prove by contradiction. Assume that ∇F (q n ) → ∞. Then, there exists R > 0 such that ∇F (q n ) ≤ R for infinitely many n. Let B 0 (R) be the closed ball of radius R centered at the origin. Taking subsequences, if necessary, we can assume that because of the compactness of B 0 (R). Let b i (x i ) be the pseudomarginals corresponding to q n . Since q n → q * ∈ ∂L(G), there exist ij ∈ E, x i and x j such that Without loss of generality, we assume that x i = +1 and x j = +1. From (39), we have Therefore b In this situation, the following claim holds. holds.
Before the proof of this claim, we prove Theorem 7 under the claim.
From (43) and (44), it is easy to see that Φ(q) = 0 ⇔ q = {m i = 0, χ ij = 0}. At this point, we can easily check that ∇Φ = ∇ 2 F is a positive definite matrix. Therefore the right hand side of (45) is equal to one. The left hand side of (45) is equal to the left hand side of (??), because q ∈ Φ −1 ( h J ) ⇔ ∇F (q) = 0. Then the assertion of Theorem 7 is proved.
Proof of the claim. First, we prove that Φ −1 ( h J ) = (∇F ) −1 (0) is a finite set. If not, we can choose a sequence {q n } of distinct points from this set. Let L(G) be the closure of L(G). Since L(G) is compact, we can choose a subsequence that converges to some point q * ∈ L(G). From Lemma 1, q * ∈ L(G) and ∇F (q * ) = 0 hold. By the assumption in Theorem 7, we have det ∇ 2 F (q * ) = 0. This implies that ∇F (q) = 0 in some neighborhood of q * . This is a contradiction because q n → q * .
Then, the assertion of the claim is proved.

F Proof of Corollary 4 F.1 Detailed proof of Example 2
In this subsection we prove the assertion of Corollary 4 for the graph of Example 2, which is displayed in figure 6. The + and − signs represent that of two body interactions. (1 −β e1βe2 −β e1βe3 −β e2βe3 + 2β e1βe2βe3 ).

F.2 Other cases
There are two operations on graphs that do not change the set of prime cycles. The first one is adding or removing a vertex of degree two on any edge. The second one is adding or removing an edge with a vertex of degree one. With these two operations, all graphs that have two linearly independent cycles are reduced to three types of graphs. The first type is in figure 7. The other types are in figure  8.
Up to equivalence of interactions, all types of signs of two body interactions are listed in figure 9 except for the attractive case. We check the uniqueness for each case in order.