Skip to main content
Log in

Reciprocity in directed hypergraphs: measures, findings, and generators

  • Published:
Data Mining and Knowledge Discovery Aims and scope Submit manuscript

Abstract

Group interactions are prevalent in a variety of areas. Many of them, including email exchanges, chemical reactions, and bitcoin transactions, are directional, and thus they are naturally modeled as directed hypergraphs, where each hyperarc consists of the set of source nodes and the set of destination nodes. For directed graphs, which are a special case of directed hypergraphs, reciprocity has played a key role as a fundamental graph statistic in revealing organizing principles of graphs and in solving graph learning tasks. For general directed hypergraphs, however, even no systematic measure of reciprocity has been developed. In this work, we investigate the reciprocity of 11 real-world hypergraphs. To this end, we first introduce eight axioms that any reasonable measure of reciprocity should satisfy. Second, we propose HyperRec, a family of principled measures of hypergraph reciprocity that satisfy all the axioms. Third, we develop FastHyperRec, a fast and exact algorithm for computing the measures. Fourth, using them, we examine 11 real-world hypergraphs and discover patterns that distinguish them from random hypergraphs. Lastly, we propose ReDi, an intuitive generative model for directed hypergraphs exhibiting the patterns.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7

Similar content being viewed by others

Notes

  1. This work is an extended version of Kim et al. (2022), which was presented at the 22nd IEEE International Conference on Data Mining (ICDM 2022). In the extended version, we introduce several theoretical extensions: (a) generalized versions of the axioms in Sect. :3.1 and a proof of Theorem 1 for the generalized versions (Appendix 1), (b) seven baseline hypergraph reciprocity measures (Sect. 3.3), (c) a proof that none of the baseline measures satisfies all the axioms (Appendix 2), and (d) proofs of Theorem 2 and Corollary 1 (Appendix 1). In addition, we conduct additional experiments regarding (a) the efficiency of FastHyperRec (Fig. 4 and Table 3 in Sect. 3.4), (b) the statistical significance of Observation 1 (Table 8 in Sect. 4.2), (c) the robustness of HyperRec with respect to the choice of \(\alpha\) (Tables 7 and 9 in Sect. 4.2), and (d) the verification of Observation 2 in 12 more real and synthetic hypergraphs (Fig. 5 in Sect. 4.2 and Fig. 7 in Sect. 5.2). At last, we provide one additional reciprocal pattern in real-world hypergraph (Observation 3: Fig. 6 in Sect. 4.2) and verify whether ReDi can reproduce this pattern.

  2. Note that all arcs in \(R_{i}\) are used in computing the reciprocity of \(e_{i}\), and thus it does not correspond to a search space.

  3. Note that, to improve legibility, we remove data points that lie outside the interquartile range (i.e., \([Q_{1} - 1.5(Q_{3} - Q_{1}), Q_{3} + 1.5(Q_{3} - Q_{1})]\), where \(Q_{3}\) and \(Q_{1}\) denote the third and first quantile of the corresponding distribution) from the box plots.

  4. The search space of \(\beta _{1}\) is (a) \([0.05, 0.1, \ldots , 0.6]\) for the small datasets where \(|V \vert \le 10^{4}\), and (b) \([0.001, 0.0015, \ldots ,0.005]\) for the dense large datasets where \(|V \vert > 10^{4}\) and \({|E \vert }/{|V \vert } \ge 3\), and (c) \([0.01, 0.02, \ldots 0.15]\) for the other sparse large datasets. The search space of \(\beta _{2}\) is fixed to \(\in [0.1, 0.1, \ldots , 0.5]\) for all datasets.

  5. As bitcoin transactions are made among randomly chosen accounts, the repetition of (partial) group interactions is rarely observed. Due to this intrinsic characteristic of the datasets, we use the degrees of individual nodes instead of the degrees of groups when ReDi and the baseline model are given the statistics from bitcoin datasets. The same strategy is also used for the baseline model when the input statistics are from the q &a server dataset. Without the strategy, the baseline model takes more than 12 hours.

  6. Note that \((1+\frac{1}{x})^{x}\) is a well-known increasing function whose limit as \(x\rightarrow \infty\) is e. Thus, \(\log (1+\frac{1}{x})^{x}=x\log (1+\frac{1}{x})\) is also an increasing function, and since \(x'=1/x\) is decreasing at \(x>0\), \(x'\log (1+\frac{1}{x'})=\frac{1}{x}\log (1+x)\) is decreasing at \(x>0\).

  7. We use the venues listed at Wikipedia (2022).

References

Download references

Funding

This work was supported by National Research Foundation of Korea (NRF) grant funded by the Korea government (MSIT) (No. NRF-2020R1C1C1008296) and Institute of Information & Communications Technology Planning & Evaluation (IITP) grant funded by the Korea government (MSIT) (No. 2022-0-00871, Development of AI Autonomy and Knowledge Enhancement for AI Agent Collaboration) (No. 2019-0-00075, Artificial Intelligence Graduate School Program (KAIST)).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Kijung Shin.

Ethics declarations

Conflict of interest

The authors have no relevant financial or non-financial interests to disclose.

Additional information

Responsible editor: Tim Weninger.

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendices

Appendix 1: Proof of Theorems

In this section, we provide proofs of theorems in the main paper. We first introduce some preliminaries of proofs and then prove why HyperRec, the proposed family of reciprocity measures, satisfies all of Axioms 1–8. Then, we prove the exactness of FastHyperRec and the related complexity reduction techniques.

1.1 Preliminaries of Proofs

In this subsection, we first give the general form of our proposed measure. Then, we introduce several important characteristics of Jensen–Shannon Divergence (JSD) (Lin 1991), which plays a key role in our proofs. After that, we examine how these concepts are applied to our measure. Basic symbols used for hypergraphs and arcs are defined in Sect. 2.1.

HyperRec, the proposed reciprocity measure for an arc \(e_{i}\) and for a hypergraph G is defined as

$$\begin{aligned} r(e_{i}) := \max _{R_{i} \subseteq E , R_{i} \ne \emptyset }{\left( \frac{1}{|R_{i} \vert }\right) ^{\alpha } \left( 1 - \frac{\sum _{v_{h} \in H_{i}} {\mathcal{L}}(p_{h} , p^{*}_{h})}{|H_{i} \vert \cdot {\mathcal{L}}_{max}} \right) }, \end{aligned}$$
(12)
$$\begin{aligned} r(G) := \frac{1}{|E \vert }\sum _{i=1}^{|E \vert } r(e_{i}), \end{aligned}$$
(13)

where \({\mathcal{L}}(p_{h}, p^{*}_{h})\) denotes Jensen-Shannon Divergence (Lin 1991) between a transition probability distribution \(p_{h}\) and the optimal transition probability distribution \(p^{*}_{h}\).

For a target arc \(e_{j}\) with an arbitrary non-empty reciprocal set \(R_{j}\), the transition probability is defined as

$$\begin{aligned} p_{h}(v) = {\left\{ \begin{array}{ll} \frac{\sum _{e_{k} \in R_{j}} \left( \frac{{\textbf{1}}[v_{h} \in T_{k} , v \in H_{k}]}{|H_{k} \vert }\right) }{\sum _{e_{k} \in R_{j}} ({\textbf{1}}[v_{h} \in T_{k}])} &{} \text{if }v_h \in \bigcup _{e_{k} \in R_{j}}T_{k}, \\ 1 &{} \text{if }v = v_{sink}\text{ and }v_h \notin \bigcup _{e_{k} \in R_{j}}T_{k}, \\ 0 &{} \text{otherwise,} \end{array}\right. } \end{aligned}$$

where \({\textbf{1}}[\text{TRUE}]=1\), and \({\textbf{1}}[\text{FALSE}]=0\).

In Lemma 1, we provide several theoretical properties of JSD that are used for our proofs. Note that a general form of \(\textrm{JSD} ({P}\Vert {Q})\) is defined as

$$\begin{aligned} {\mathcal{L}}(P,Q)=\sum _{i=1}^{n} \ell (p_{i},q_{i}), \end{aligned}$$
(14)

where

$$\begin{aligned} \ell (p_{i},q_{i}) = {\frac{p_i}{2} \log {\frac{2p_i}{p_i + q_i}} + \frac{q_i}{2} \log {\frac{2q_i}{p_i + q_i}}}. \end{aligned}$$
(15)

Lemma 1

(Basic Properties of Jensen-Shannon Divergence). The Jensen-Shannon Divergence (JSD) has the following properties:

  • A-I. For any two discrete probability distributions P and Q, \(0 \le \textrm{JSD} ({P}\Vert {Q}) \le \log 2\) holds.

  • A-II. For two discrete probability distributions P and Q where their non-zero-probability domains do not overlap (i.e., \(p_{i}q_{i} = 0, \ \forall i = \{1, \ldots ,|V \vert \}\)), \(\textrm{JSD} ({P}\Vert {Q})\) is maximized, and the maximum value is \(\log {2}\).

  • A-III. Consider two discrete probability distributions P and Q. If there exists a value where both P and Q have non-zero probability, \(\textrm{JSD} ({P}\Vert {Q}) < \log {2}\) holds.

Proof

  • (Proof of A-I) Refer to Lin (1991) for a proof of A-I.

  • (Proof of A-II) Let \({\mathcal{X}}_{p}\) be the domain where P has non-zero probability, and let \({\mathcal{X}}_{q}\) be the domain where Q has non-zero probability. Since \({\mathcal{X}}_{p}\) and \({\mathcal{X}}_{q}\) do not overlap, Eq. (14) is rewritten as

    $$\begin{aligned} {\mathcal{L}}(P,Q) = \sum _{i\in {\mathcal{X}}_{p}}\frac{p_{i}}{2}\log 2 + \sum _{i\in {\mathcal{X}}_{q}}\frac{q_{i}}{2}\log 2 = \frac{\log 2}{2}\left( \sum _{i \in {\mathcal{X}}_{p}}p_{i} + \sum _{i \in {\mathcal{X}}_{q}}q_{i} \right) = \log 2. \end{aligned}$$
  • (Proof of A-III) Let k be a point where \(p_{k}q_{k} \ne 0\) holds. Then, Eq. (14) is rewritten as

    $$\begin{aligned} {\mathcal{L}}(P,Q) \ \le \sum _{i\in {\mathcal{X}}_{p}\setminus k}\frac{p_{i}}{2}\log 2 + \sum _{i\in {\mathcal{X}}_{q}\setminus k}\frac{q_{i}}{2}\log 2 + \left( {\frac{p_k}{2} \log {\frac{2p_k}{p_k + q_k}} + \frac{q_k}{2} \log {\frac{2q_k}{p_k + q_k}}}\right) . \end{aligned}$$
    (16)

    The below inequality implies that Eq. (16) is smaller than \(\log 2\).

    $$\begin{aligned}{} & {} \left( {\frac{p_k}{2} \log {2} + \frac{q_k}{2} \log {2}}\right) - \left( {\frac{p_k}{2} \log {\frac{2p_k}{p_k + q_k}} + \frac{q_k}{2} \log {\frac{2q_k}{p_k + q_k}}}\right)> 0\\{} & {} \quad \equiv {\frac{p_k}{2} \log {\left( 1 + \frac{q_k}{p_k}\right) } + \frac{q_k}{2} \log {\left( 1 + \frac{p_k}{q_k}\right) }}> 0 \quad (\because p_{k},q_{k} > 0). \end{aligned}$$

    Since \(\log (x)>0\) holds for any \(x>1\), the last inequality holds. Thus, we can conclude that \(\textrm{JSD} ({P}\Vert {Q}) < \log 2\) holds in this case.

\(\square\)

In Lemma 2, we provide several basic properties of HyperRec, our proposed measure of reciprocity in hypergraphs.

Lemma 2

(Basic Properties of HyperRec). HyperRec (i.e., defining \(r(e_i, R_i)\) as in Eq. (5)) has the following properties:

  • A-IV. If a target arc’s head set and the tail sets of its reciprocal arcs do not overlap, the target arc’s reciprocity becomes zero. Formally,

    $$\begin{aligned} \text{If } H_{i} \cap \bigcup _{e_{k} \in R_{i}} T_{k} = \emptyset \quad \text{ then } \quad r(e_{i}, R_{i}) = 0. \end{aligned}$$
  • A-V. If a target arc’s tail set and the head sets of its reciprocal arcs do not overlap, the target arc’s reciprocity becomes zero. Formally,

    $$\begin{aligned} \text{If } T_{i} \cap \bigcup _{e_{k} \in R_{i}} H_{k} = \emptyset \quad \text{ then } \quad r(e_{i}, R_{i}) = 0. \end{aligned}$$
  • A-VI. If (a) a target arc’s head set and the tail sets of its reciprocal arcs overlap and (b) the target arc’s tail set and the head sets of its reciprocal arcs overlap, then the target arc’s reciprocity is greater than zero. Formally,

    $$\begin{aligned} \text{If } \sum _{e_{k} \in R_{i}}|H_{i} \cap T_{k}\vert \cdot |T_i \cap H_{k} \vert \ge 1 \quad \text{ then } \quad r(e_{i}, R_{i}) > 0. \end{aligned}$$

Proof

Below, we use \({\mathcal{L}}_{max}\) to denote the maximum value of JSD, which is \(\log 2\).

  • (Proof of A-IV) For this case, as mentioned in Sect. 3.2, the probability mass is non-zero only at \(v_{sink}\). On the other hand, the optimal transition probability \(p^{*}\) is non-zero only at each \(v \in T_{i}\). Since \(v_{sink} \not \in T_{i}\), the non-zero-probability domains of the transition probability and the optimal transition probability do not overlap, and by A-II, the probabilistic distance between them is maximized. This happens for all \(v \in H_{i}\). Therefore,

    $$\begin{aligned} r(e_i , R_i)&= \left( \frac{1}{|R_{i} \vert } \right) ^\alpha \left( 1 - \frac{\sum _{v_h \in H_i} {\mathcal{L}}_{max}}{|H_i \vert \cdot {\mathcal{L}}_{max} }\right) \\&= \left( \frac{1}{|R_{i} \vert } \right) ^\alpha \left( 1 - \frac{|H_{i} \vert \cdot {\mathcal{L}}_{max}}{|H_i \vert \cdot {\mathcal{L}}_{max} }\right) = \left( \frac{1}{|R_{i} \vert } \right) ^\alpha \times 0 = 0. \end{aligned}$$
  • (Proof of A-V) As in A-IV, the non-zero probability domains of the transition probability and the optimal transition probability do not overlap since \(T_{i} \cap \bigcup _{e_{k} \in R_{i}} H_{k} = \emptyset\). Again, the probabilistic distance is maximized. This happens for all \(H_{i}\), i.e.,

    $$\begin{aligned} r(e_i , R_i)&= \left( \frac{1}{|R_{i} \vert } \right) ^\alpha \left( 1 - \frac{\sum _{v_h \in H_i} {\mathcal{L}}_{max}}{|H_i \vert \cdot {\mathcal{L}}_{max} }\right) \\&= \left( \frac{1}{|R_{i} \vert } \right) ^\alpha \left( 1 - \frac{|H_{i} \vert \cdot {\mathcal{L}}_{max}}{|H_i \vert \cdot {\mathcal{L}}_{max} }\right) = 0 \end{aligned}$$
  • (Proof of A-VI) According to the statement, there exists at least one reciprocal arc \(e_{k}\) whose (a) tail set overlaps with the target arc’s head set (i.e., \(|T_{k} \cap H_{i} \vert \ge 1\)) and (b) head set overlaps with the target arc’s tail set (i.e., \(|H_{k} \cap T_{i} \vert \ge 1\)). Thus, for \(v_{h} \in H_{i} \cap T_{k}\), \(p_{h}\) and \(p^{*}_{h}\) share non-zero probability domains, which implies \({\mathcal{L}}(p_{h}, p^{*}_{h}) < \log {2}\) by A-III. Hence, we can derive the following inequality:

    $$\begin{aligned} r(e_i , R_i)&= \left( \frac{1}{|R_{i} \vert } \right) ^\alpha \left( 1 - \frac{\sum _{v_h \in H_i} {\mathcal{L}}(p_{h} , p^{*}_{h})}{|H_i \vert \cdot {\mathcal{L}}_{max} }\right) \\&> \left( \frac{1}{|R_{i} \vert } \right) ^\alpha \left( 1 - \frac{|H_{i} \vert \cdot {\mathcal{L}}_{max}}{|H_i \vert \cdot {\mathcal{L}}_{max} }\right) = 0. \end{aligned}$$

\(\square\)

1.2 Proof of Theorem 1

In this section, we show that the proposed measure HyperRec satisfies all the generalized axioms. For a proof of Generalized Axiom 1, we simply show that the former’s reciprocity gets zero (i.e., \(r(e_{i}, R_{i}) = 0\)), while the latter’s reciprocity gets a positive value (i.e., \(r(e_{j}, R_{j}) > 0\)). For proofs of Generalized Axioms 2–4, we first show how the formal statement of each axiom can be written in terms of the probabilistic distance. Then, we derive a less reciprocal case has a higher probabilistic distance between the transition probability and the optimal transition probability for every head set node of a target arc.

1.2.1 Proof of the Fact that HyperRec Satisfies Axiom 1

Through an example, Axiom 1 states that an arc that has at least one inversely-overlapping arc should be more reciprocal than an arc without any inversely-overlapping arc. The generalized statement of Axiom 1 is formalized in Generalized Axiom 1.

Proposition 1.

HyperRec (i.e., defining \(r(e_i, R_i)\) as in Eq. (5)) satisfies Generalized Axiom 1.

Proof

We first show that \(r(e_{i}, R_{i}) = 0\). The suggested condition (\(\forall e'_{i} \in R_{i}: \min (\vert H_{i} \cap T'_{i}\vert , \vert T_{i} \cap H'_{i}\vert ) = 0\)) implies that every reciprocal arc \(e'_{i} \in R_{i}\) lies in one of the following cases (for simplicity, we refer to \(e'_{i} \in R_{i}\) as a non-influential arc if \(e'_{i}\) does not contribute to making the non-zero probability domains of the transition probability that overlap with that of the optimal transition probability): (1) When \((H_{i} \cap T'_{i} = \emptyset ) \wedge (T_{i} \cap H'_{i} \ne \emptyset )\) holds, as shown in the proof of A-IV, \(e'_{i}\) is non-influential. (2) When \((H_{i} \cap T'_{i} \ne \emptyset ) \wedge (T_{i} \cap H'_{i} = \emptyset )\) holds, as shown in the proof of A-V, \(e'_{i}\) is non-influential. (3) When \((H_{i} \cap T'_{i} = \emptyset ) \wedge (T_{i} \cap H'_{i} = \emptyset )\) holds, as shown in the proof of A-II and A-V, \(e'_{i}\) is non-influential. That is, all reciprocal hyperarcs in \(R_{i}\) are non-influential, and by A-II, the distance between the transition probability and the optimal transition probability is maximized. This happens for all \(v \in H_{i}\). Therefore,

$$\begin{aligned} r(e_i , R_i)&= \left( \frac{1}{|R_{i} \vert } \right) ^\alpha \left( 1 - \frac{\sum _{v_h \in H_i} {\mathcal{L}}_{max}}{|H_i \vert \cdot {\mathcal{L}}_{max} }\right) \\&= \left( \frac{1}{|R_{i} \vert } \right) ^\alpha \left( 1 - \frac{|H_{i} \vert \cdot {\mathcal{L}}_{max}}{|H_i \vert \cdot {\mathcal{L}}_{max} }\right) = \left( \frac{1}{|R_{i} \vert } \right) ^\alpha \times 0 = 0. \end{aligned}$$

We now show that \(r(e_{j}, R_{j}) > 0\) holds. The suggested condition (\(\exists e'_{i} \in R_{i}: \min (\vert H_{i} \cap T'_{i}\vert , \vert T_{i} \cap H'_{i}\vert ) \ge 1\)) is equivalent to the condition of A-VI. Thus, by A-VI, the inequality \(r(e_{j}, R_{j}) > 0\) holds. Since \(r(e_{i}, R_{i}) = 0\) and \(r(e_{j}, R_{j}) > 0\), the following inequality holds: \(r(e_{i}, R_{i}) < r(e_{j}, R_{j})\). \(\square\)

1.2.2 Proof of the Fact that HyperRec Satisfies Axiom 2

Through an example, Axiom 2 states that an arc that inversely overlaps with reciprocal arcs to a greater extent should be more reciprocal. In addition, Axiom 2 is divided into two cases, which are formalized in Generalized Axiom 2A and 2B respectively.

Proposition 2A.

HyperRec (i.e., defining \(r(e_i, R_i)\) as in Eq. (5)) satisfies Generalized Axiom 2A.

Proof

Since \(|R_{i} \vert = |R_{j} \vert = 1\), the cardinality penalty terms on both sides can be discarded, i.e.,

$$\begin{aligned} r(e_{i} , R_{j}) = \left( \frac{1}{|R_{i} \vert }\right) ^{\alpha } \left( 1 - \frac{\sum _{v_{i} \in H_{i}} \mathcal{L}(p_{h} , p^{*}_{h})}{|H_{i} \vert \cdot \mathcal{L}_{max}} \right) = 1 - \frac{\sum _{v_{i} \in H_{i}} \mathcal{L}(p_{h} , p^{*}_{h})}{|H_{i} \vert \cdot \mathcal{L}_{max}}. \end{aligned}$$

Since \(|H_{i} \vert = |H_{j} \vert\), the main inequality is rewritten as

$$\begin{aligned}&r(e_i , R_i) < r(e_j , R_j) \nonumber \\&\quad \equiv \sum _{v_h \in H_i} \mathcal{L}(p_{h} , p^{*}_{h}) > \sum _{v_h \in H_j} \mathcal{L}(p_{h} , p^{*}_{h}). \end{aligned}$$
(17)

Each head set can be divided into two parts: \(H_{k} {\setminus } T'_{k} \ \text{and} \ H_{k} \cap T'_{k}, \ \forall k = i, j\). For \(H_{k} {\setminus } T'_{k}\), as described in A-IV, the probabilistic distance is maximized to \(\mathcal{L}_{max} = \log {2}\). For \(H_{k} \cap T'_{k}\), by using the fact that \(T_{k} \cap H'_{k} \ne \emptyset\), \(\forall k = i,j\), we can derive \(\mathcal{L}(p_{h}, p^{*}_{h}) < \log {2}\) holds, \(\forall v_{h} \in H_{k} \cap T'_{k}\), \(\forall k=i,j\) by A-VI. One more notable fact is that, since there is a single reciprocal arc for the target arc, \(\mathcal{L}(p_{h}, p^{*}_{h})\) is the same for every \(v_{h} \in H_{k} \cap T'_{k}\). Here, let \(\bar{p}_{k}, \forall k = i,j\) be the transition probability distribution regarding the target arc \(e_{k}\) and its reciprocal set \(R_{k}\). We rewrite the inequality (17)

$$\begin{aligned}&\sum _{v_h \in H_i} \mathcal{L}(p_{h} , p^{*}_{h})> \sum _{v_h \in H_j} \mathcal{L}(p_{h} , p^{*}_{h}) \\&\quad \equiv |H_{i} \setminus T'_{i} \vert \times \log {2} + |H_{i} \cap T'_{i}\vert \times \mathcal{L}(\bar{p}_{i} , \bar{p}^{*}_{i}) > |H_{j} \setminus T'_{j} \vert \times \log {2} + |H_{j} \cap T'_{j} \vert \times \mathcal{L}(\bar{p}_{j} , \bar{p}^{*}_{j}). \end{aligned}$$

Below, we show that this inequality holds for Case (i) and then Case (ii).

\({{{\textbf{Case}}}\,(i)}:\) For Case (i), we first show that the inequality (17) is equivalent to \(\mathcal{L}(\bar{p}_{i}, \bar{p}^{*}_{i}) > \mathcal{L}(\bar{p}_{j}, \bar{p}^{*}_{j})\). The intersection of the target arc’s head set and the reciprocal arc’s tail set is larger for \(e_{j}\) than for \(e_{i}\). Thus, the following inequality hold:

$$\begin{aligned} |H_{i} \setminus T'_{i} \vert \times \log {2} + |H_{i} \cap T'_{i} \vert \times \mathcal{L}(\bar{p}_{i} , \bar{p}^{*}_{i}) \ge |H_{j} \setminus T'_{j} \vert \times \log {2} + |H_{j} \cap T'_{j} \vert \times \mathcal{L}(\bar{p}_{i} , \bar{p}^{*}_{i}). \end{aligned}$$

Therefore, Eq. (17) is implied by

$$\begin{aligned}&|H_{j} \setminus T'_{j} \vert \times \log {2} + |H_{j} \cap T'_{j} \vert \times \mathcal{L}(\bar{p}_{i} , \bar{p}^{*}_{i})> |H_{j} \setminus T'_{j} \vert \times \log {2} + |H_{j} \cap T'_{j} \vert \times \mathcal{L}(\bar{p}_{j} , \bar{p}^{*}_{j}) \\&\quad \equiv |H_{j} \cap T'_{j} \vert \times \mathcal{L}(\bar{p}_{i} , \bar{p}^{*}_{i})> |H_{j} \cap T'_{j} \vert \times \mathcal{L}(\bar{p}_{j} , \bar{p}^{*}_{j}) \\&\quad \equiv \mathcal{L}(\bar{p}_{i} , \bar{p}^{*}_{i}) > \mathcal{L}(\bar{p}_{j} , \bar{p}^{*}_{j}). \end{aligned}$$

Now, we show that \(\mathcal{L}(\bar{p}_{i}, \bar{p}^{*}_{i}) > \mathcal{L}(\bar{p}_{j}, \bar{p}^{*}_{j})\) holds. To this end, denote the size of the intersection regions as \(F_{1} = |T_{i} \cap H'_{i} \vert \ < \ F_{2} = |T_{j} \cap H'_{j} \vert\). We can decompose the domain of \(v \in V\) into four parts as

$$\begin{aligned} T_{k} \cap H'_{k}, \quad T_{k} \setminus H'_{k}, \quad H'_{k} \setminus T_{k}, \ \text{and} \ V \setminus \{H'_{k} \cup T_{k}\}, \quad \forall k = i,j \end{aligned}$$

For the last part, both the transition probability and the optimal transition probability of it have zero mass, i.e., \(p_{h}(v) = p^{*}_{h}(v) = 0\), which results in no penalty. We only need to consider the first three parts for comparison. Here, the probabilistic distance can be explicitly written as

$$\begin{aligned} \mathcal{L}(\bar{p}_{i}, \bar{p}^{*}_{i})&= F_{1} \times \ell \left( \frac{1}{T}, \frac{1}{A}\right) + (A - F_{1} )\times \frac{1}{2A} \log {2} + (T - F_{1})\times \frac{1}{2T} \log {2}, \\ \mathcal{L}(\bar{p}_{j}, \bar{p}^{*}_{j})&= F_{2}\times \ell \left( \frac{1}{T}, \frac{1}{A}\right) + (A - F_{2} )\times \frac{1}{2A} \log {2} + (T - F_{2} )\times \frac{1}{2T} \log {2}, \end{aligned}$$

where \(\ell\) denotes a single-element comparison of \(\textrm{JSD} ({P}\Vert {Q})\) in Eq. (15). Let \(A = |H'_{i} \vert = |H'_{j} \vert\) and \(T = |T_{i} \vert = |T_{j} \vert\). Then, we can rewrite \(\mathcal{L}(\bar{p}_{i}, \bar{p}^{*}_{i}) - \mathcal{L}(\bar{p}_{j}, \bar{p}^{*}_{j}) > 0\) as

$$\begin{aligned}&\mathcal{L}(\bar{p}_{i} , \bar{p}^{*}_{i}) - \mathcal{L}(\bar{p}_{j} , \bar{p}^{*}_{j})> 0 \\&\quad \equiv ( F_{1} - F_{2})\times \ell \left( \frac{1}{T}, \frac{1}{A}\right) + ( F_{2} - F_{1} )\times \left( \frac{1}{2A} + \frac{1}{2T}\right) \log {2}> 0 \\&\quad \equiv ( F_{2} - F_{1} ) \times \left( \frac{1}{2A}\log 2 + \frac{1}{2T}\log 2 - \ell \left( \frac{1}{T}, \frac{1}{A}\right) \right)> 0 \\&\quad \equiv \left( \frac{1}{2A}\log 2 - \frac{1}{2A} \log {\frac{2T}{A+T}} + \frac{1}{2T}\log 2 - \frac{1}{2T} \log {\frac{2A}{A+T}} \right)> 0 \quad \because F_{2} - F_{1}> 0 \\&\quad \equiv \frac{1}{2A}\log {\frac{A + T}{T}} + \frac{1}{2T}\log {\frac{A + T}{A}} > 0 \end{aligned}$$

The inequality holds since \(\log (x)>0\) holds for any \(x>1\). Hence, we show \(\mathcal{L}(\bar{p}_{i}, \bar{p}^{*}_{i}) > \mathcal{L}(\bar{p}_{j}, \bar{p}^{*}_{j})\) and thus the inequality (17) hold for Case (i).

\({{{\textbf{Case}}}\,(ii)}:\) For Case (ii), we first show that the inequality (17) is equivalent to \(\mathcal{L}(\bar{p}_{i}, \bar{p}^{*}_{i}) \ge \mathcal{L}(\bar{p}_{j}, \bar{p}^{*}_{j})\). The inequality can be rewritten as

$$\begin{aligned}&(|H_{i}\vert - |H_{i} \cap T'_{i}\vert ) \times \log 2 + |H_{i} \cap T'_{i}\vert \times \mathcal{L}(\bar{p}_{i} , \bar{p}^{*}_{i}) \\&\quad> (|H_{j}\vert - |H_{j} \cap T'_{j}\vert ) \times \log 2 + |H_{j} \cap T'_{j}\vert \times \mathcal{L}(\bar{p}_{j} , \bar{p}^{*}_{j}) \\&\quad \equiv |H_{i} \cap T'_{i}\vert \times (\mathcal{L}(\bar{p}_{i} , \bar{p}^{*}_{i}) - \log 2)> |H_{j} \cap T'_{j}\vert \times (\mathcal{L}(\bar{p}_{j} , \bar{p}^{*}_{j}) - \log 2) \\&\quad \equiv \frac{|H_{j} \cap T'_{j}\vert }{|H_{i} \cap T'_{i} \vert }> \frac{\log 2 - \mathcal{L}(\bar{p}_{i} , \bar{p}^{*}_{i})}{\log 2 - \mathcal{L}(\bar{p}_{j} , \bar{p}^{*}_{j})} \\&\quad \because |H_{j} \cap T'_{j}\vert , |H_{j} \cap T'_{j}\vert> 0 \text{ and } \log 2 > \mathcal{L}(\bar{p}_{i} , \bar{p}^{*}_{i}), \mathcal{L}(\bar{p}_{j} , \bar{p}^{*}_{j}). \end{aligned}$$

By the condition of the axiom, the intersection of the target arc’s head set and the reciprocal arc’s tail set is larger than for \(e_{j}\) than for \(e_{i}\), and thus \(\frac{|H_{j} \cap T'_{j}\vert }{|H_{i} \cap T'_{i} \vert } > 1\) holds. Thus, Eq. (17) is implied by \(\frac{\log 2 - \mathcal{L}(\bar{p}_{i}, \bar{p}^{*}_{i})}{\log 2 - \mathcal{L}(\bar{p}_{j}, \bar{p}^{*}_{j})} \le 1\), which is equivalent to \(\mathcal{L}(\bar{p}_{i}, \bar{p}^{*}_{i}) \ge \mathcal{L}(\bar{p}_{j}, \bar{p}^{*}_{j})\), holds. Now we show that \(\mathcal{L}(\bar{p}_{i}, \bar{p}^{*}_{i}) \ge \mathcal{L}(\bar{p}_{j}, \bar{p}^{*}_{j})\) holds, which is rewritten as

$$\begin{aligned}&\mathcal{L}(p_{h, i} , p^{*}_{h, i}) - \mathcal{L}(p_{h, j} , p^{*}_{h, j}) \ge 0 \\&\quad \equiv ( F_{1} - F_{2})\times \ell \left( \frac{1}{T}, \frac{1}{A}\right) + ( F_{2} - F_{1} )\times \left( \frac{1}{2A} + \frac{1}{2T}\right) \log {2} \ge 0 \\&\quad \equiv ( F_{2} - F_{1} ) \times \left( \frac{1}{2A}\log 2 + \frac{1}{2T}\log 2 - \ell \left( \frac{1}{T}, \frac{1}{A}\right) \right) \ge 0 \end{aligned}$$

Note that, unlike Case (i), where \(F_{1} < F_{2}\) holds, \(F_{1} \le F_{2}\) holds for Case (ii). If \(F_{2} = F_{1}\), then ths LHS above becomes 0, and thus above inequality holds. If \(F_{2} > F_{1}\),

$$\begin{aligned}&( F_{2} - F_{1} ) \times \left( \frac{1}{2A}\log 2 + \frac{1}{2T}\log 2 - \ell \left( \frac{1}{T}, \frac{1}{A}\right) \right) \ge 0 \\&\quad \equiv \left( \frac{1}{2A}\log 2 - \frac{1}{2A} \log {\frac{2T}{A+T}} + \frac{1}{2T}\log 2 - \frac{1}{2T} \log {\frac{2A}{A+T}} \right)> 0 \quad \because F_{2} - F_{1}> 0 \\&\quad \equiv \frac{1}{2A}\log {\frac{A + T}{T}} + \frac{1}{2T}\log {\frac{A + T}{A}} > 0. \end{aligned}$$

The inequality holds since \(\log (x)>0\) holds for any \(x>1\). Hence, we show \(\mathcal{L}(\bar{p}_{i}, \bar{p}^{*}_{i}) \ge \mathcal{L}(\bar{p}_{j}, \bar{p}^{*}_{j})\) and thus the inequality (17) hold for Case (ii). \(\square\)

Proposition 2B.

HyperRec (i.e., defining \(r(e_i, R_i)\) as in Eq. (5)) satisfies Generalized Axiom 2B.

Proof

Since \(|R_{i} \vert = |R_{j} \vert = 1\), the cardinality penalty terms can be ignored. The overall inequality is re-written as

$$\begin{aligned}&r(e_{i} , R_{i})< r(e_{j} , R_{j}) \\&\equiv 1 - \frac{\sum _{v_{i} \in H_{i}} {\mathcal{L}}(p_{h} , p^{*}_{h})}{|H_{i} \vert \cdot {\mathcal{L}}_{max}}< 1 - \frac{\sum _{v_{j} \in H_{j}} {\mathcal{L}}(p_{h} , p^{*}_{h})}{|H_{j} \vert \cdot {\mathcal{L}}_{max}} \\&\equiv \frac{\sum _{v_{j} \in H_{j}} {\mathcal{L}}(p_{h} , p^{*}_{h})}{|H_{j} \vert \cdot {\mathcal{L}}_{max}} < \frac{\sum _{v_{i} \in H_{i}} {\mathcal{L}}(p_{h} , p^{*}_{h})}{|H_{i} \vert \cdot {\mathcal{L}}_{max}} \end{aligned}$$

As in the previous proof, \(|H_{i} \vert = |H_{j} \vert\), and \({\mathcal{L}}(p_{h}, p^{*}_{h})\) is identical for every \(v_{h} \in H_{k} \cap T'_{k}\). Let \({\bar{p}}_{k}, \forall k = i,j\) be the transition probability distribution regarding the target arc \(e_{k}\) and its reciprocal set \(R_{k}\). Here, \(|H_{i} \cap T'_{i} \vert = |H_{j} \cap T'_{j} \vert\), \(|T'_{i} \vert = |T'_{j} \vert\), and the number of target arc’s head set nodes \(v_{h}\) that satisfy \({\mathcal{L}}(p_{h}, p^{*}_{h}) < \log {2}\) is identical for both cases. Thus, the above inequality is re-written as

$$\begin{aligned}&\frac{\sum _{v_{j} \in H_{j}} {\mathcal{L}}(p_{h} , p^{*}_{h})}{|H_{j} \vert \cdot {\mathcal{L}}_{max}}< \frac{\sum _{v_{i} \in H_{i}} {\mathcal{L}}(p_{h} , p^{*}_{h})}{|H_{i} \vert \cdot {\mathcal{L}}_{max}} \\&\equiv {|H_{j} \cap T'_{j} \vert \times {\mathcal{L}}({\bar{p}}_{j}, {\bar{p}}^{*}_{j})}< {|H_{i} \cap T'_{i} \vert \times {\mathcal{L}}({\bar{p}}_{i}, {\bar{p}}^{*}_{i})} \\&\equiv {\mathcal{L}}({\bar{p}}_{j}, {\bar{p}}^{*}_{j}) < {\mathcal{L}}({\bar{p}}_{i}, {\bar{p}}^{*}_{i}). \end{aligned}$$

Now, we only need to show that the probabilistic distance between transition probability and the optimal transition probability is greater in \(e_{i}\) than in \(e_{j}\). Let \(A = |H'_{i} \vert \ > \ B = |H'_{j} \vert\). We can decompose the domain of \(v \in V\) into four parts as

$$\begin{aligned} T_{k} \cap H'_{k}, \quad T_{k} \setminus H'_{k}, \quad H'_{k} \setminus T_{k}, \text{ and } V \setminus \{H'_{k} \cup T_{k}\}, \quad \forall k = i,j \end{aligned}$$

Here, \(\textrm{JSD} ({P}\Vert {Q})\) in the second and fourth parts is identical for both cases. That is, we only need to compare the probabilistic distances that are related to the first and third parts of the above four domains. That is,

$$\begin{aligned}&{\mathcal{L}}({\bar{p}}_{j}, {\bar{p}}^{*}_{j})< {\mathcal{L}}({\bar{p}}_{i}, {\bar{p}}^{*}_{i}) \\&\quad \equiv F \times \ell \left( \frac{1}{B}, \frac{1}{T}\right) + \frac{B - F}{2B}\log {2} < F \times \ell \left( \frac{1}{A}, \frac{1}{T}\right) + \frac{A - F}{2A}\log {2}, \end{aligned}$$

where \(F = |H'_{i} \cap T_{i} \vert = |H'_{j} \cap T_{j} \vert\) and \(T = |T_{i} \vert =|T_{j} \vert\). Note that \(A > B\). Overall inequality is rewritten as

$$\begin{aligned}&{\mathcal{L}}({\bar{p}}_{j}, {\bar{p}}^{*}_{j}) < {\mathcal{L}}({\bar{p}}_{i}, {\bar{p}}^{*}_{i}) \\&\quad \equiv \frac{F}{2}\left( \frac{1}{B} - \frac{1}{A}\right) \log {2} > F \times \left( \ell \left( \frac{1}{B}, \frac{1}{T}\right) - \ell \left( \frac{1}{A}, \frac{1}{T}\right) \right) \end{aligned}$$

To simplify the equation, we unfold \(\ell (p,q)\) as

$$\begin{aligned}&\frac{F}{2}\left( \frac{1}{B} - \frac{1}{A}\right) \log {2}> F \times \left( \ell \left( \frac{1}{B}, \frac{1}{T}\right) - \ell \left( \frac{1}{A}, \frac{1}{T}\right) \right) \\&\quad \equiv \frac{1}{2}\left( \frac{1}{B} - \frac{1}{A}\right) \log {2}> \frac{1}{2T} \log {\frac{2B}{B+T}} + \frac{1}{2B} \log {\frac{2T}{B+T}} - \frac{1}{2T} \log {\frac{2A}{A+T}} - \frac{1}{2A} \log {\frac{2T}{A+T}} \\&\quad \equiv \left( \frac{1}{B} - \frac{1}{A}\right) \log {2}> \frac{1}{T} \log {\frac{2B}{B+T}} + \frac{1}{B} \log {\frac{2T}{B+T}} - \frac{1}{T} \log {\frac{2A}{A+T}} - \frac{1}{A} \log {\frac{2T}{A+T}} \\&\quad \equiv 0> \frac{1}{T} \log {\frac{B}{B+T}} + \frac{1}{B} \log {\frac{T}{B+T}} - \frac{1}{T} \log {\frac{A}{A+T}} - \frac{1}{A} \log {\frac{T}{A+T}} \\&\quad \because \text{pull 2 inside each log term out} \\&\quad \equiv 0> \frac{1}{T} \log {\frac{B(A+T)}{A(B+T)}} - \frac{1}{B} \log {\frac{B + T}{T}} + \frac{1}{A} \log {\frac{A + T}{T}} \\&\quad \equiv 0 > \log {\frac{AB + BT}{AB + AT}} + \frac{T}{A} \log {\left( 1 + \frac{A}{T}\right) } - \frac{T}{B} \log {\left( 1 +\frac{B}{T}\right) } \quad \because \hbox { multiply both sides by}\ T \end{aligned}$$

We show that the last inequality holds by splitting it into two parts: \(\log {\frac{AB + BT}{AB + AT}} < 0\) and \(\frac{T}{A} \log {(1 + \frac{A}{T})} - \frac{T}{B} \log {( 1 +\frac{B}{T})} < 0\). The first part is trivial since \(B < A\) implies

$$\begin{aligned} \frac{AB + BT}{AB + AT} < 1. \end{aligned}$$

In the second part, each term is in the form of \(f(x) = \frac{1}{x}\log {(1 + x)}\). Since f(x) is decreasing at \(x>0\),Footnote 6\(A > B\) implies

$$\begin{aligned} \frac{T}{A} \log {\left( 1 + \frac{A}{T}\right) } - \frac{T}{B} \log {\left( 1 +\frac{B}{T}\right) } < 0. \end{aligned}$$

\(\square\)

1.2.3 Proof of the Fact that HyperRec Satisfies Axiom 3

Through an example, Axiom 3 states that when two arcs inversely overlap equally with their reciprocal sets, an arc with a single reciprocal arc is more reciprocal than one with multiple reciprocal arcs. Axiom 3 is split into two cases and each case is formalized in Generalized Axioms 3A and 3B respectively, where an arc with a single reciprocal arc and an arc with exactly two reciprocal arcs are compared. In Remark 1, we further generalize them to encompass a comparison of the former and an arc with two or more reciprocal arcs and provide a proof sketch to show that these extended statements hold true for our proposed measure.

Proposition 3A.

HyperRec (i.e., defining \(r(e_i, R_i)\) as in Eq. (5)) satisfies Generalized Axiom 3A.

Proof

Since the sizes of the reciprocal sets differ, the cardinality penalty term should be considered. Here, \(r(e_{i}, R_{i})\) and \(r(e_{j}, R_{j})\) is rewritten as

$$\begin{aligned} r(e_{i} , R_{i})&= \left( \frac{1}{2}\right) ^{\alpha } \left( 1 - \frac{\sum _{v_{h} \in H_{i}} {\mathcal{L}}(p_{h}, p_{h}^{*})}{|H_{i} \vert \cdot {\mathcal{L}}_{max}}\right) , \\ r(e_{j} , R_{j})&= \left( 1 - \frac{\sum _{v_{h} \in H_{j}} {\mathcal{L}}(p_{h}, p_{h}^{*})}{|H_{j} \vert \cdot {\mathcal{L}}_{max}}\right) . \end{aligned}$$

Since \(\alpha > 0\), \(r(e_{i}, R_{i}) < r(e_{j}, R_{j})\) is implied by

$$\begin{aligned} \left( 1 - \frac{\sum _{v_{h} \in H_{i}} {\mathcal{L}}(p_{h}, p_{h}^{*})}{|H_{i} \vert \cdot {\mathcal{L}}_{max}}\right) \le \left( 1 - \frac{\sum _{v_{h} \in H_{j}} {\mathcal{L}}(p_{h}, p_{h}^{*})}{|H_{j} \vert \cdot {\mathcal{L}}_{max}}\right) . \end{aligned}$$

Since \(|H_{i} \vert = |H_{j} \vert\), the inequality is rewritten as

$$\begin{aligned}&\left( 1 - \frac{\sum _{v_{h} \in H_{i}} {\mathcal{L}}(p_{h}, p_{h}^{*})}{|H_{i} \vert \cdot {\mathcal{L}}_{max}}\right) \le \left( 1 - \frac{\sum _{v_{h} \in H_{j}} {\mathcal{L}}(p_{h}, p_{h}^{*})}{|H_{j} \vert \cdot {\mathcal{L}}_{max}}\right) \nonumber \\&\quad \equiv \frac{\sum _{v_{h} \in H_{j}} {\mathcal{L}}(p_{h}, p_{h}^{*})}{|H_{j} \vert \cdot {\mathcal{L}}_{max}} \le \frac{\sum _{v_{h} \in H_{i}} {\mathcal{L}}(p_{h}, p_{h}^{*})}{|H_{i} \vert \cdot {\mathcal{L}}_{max}} \nonumber \\&\quad \equiv \sum _{v_{h} \in H_{j}} {\mathcal{L}}(p_{h}, p_{h}^{*}) \le \sum _{v_{h} \in H_{i}} {\mathcal{L}}(p_{h}, p_{h}^{*}). \end{aligned}$$
(18)

For the target arc \(e_{i}\), since \(T'_{i1} = T'_{i2}\), \(p_{h}\) for every \(v_{h} \in H_{i}\) has the same distribution. For the target arc \(e_{j}\), since there is only one single reciprocal arc, \(p_{h}\) for every \(v_{h} \in H_{i}\) has the same distribution. Let \({\bar{p}}_{k}, \forall k = i,j\) be the transition probability distribution regarding the target arc \(e_{k}\) and its reciprocal set \(R_{k}\). Here, the inequality (18) is rewritten as

$$\begin{aligned}&\sum _{v_{h} \in H_{j}} {\mathcal{L}}(p_{h}, p_{h}^{*}) \le \sum _{v_{h} \in H_{i}} {\mathcal{L}}(p_{h}, p_{h}^{*}) \\&\quad \equiv |H_{j} \cap T'_{j} \vert \times {\mathcal{L}}({\bar{p}}_{j}, {\bar{p}}^{*}_{j}) \le |H_{i} \cap T'_{i1} \vert \times {\mathcal{L}}({\bar{p}}_{i}, {\bar{p}}^{*}_{i}) \end{aligned}$$

Since \(e'_{i1} \subseteq _{(R)} e_{i}, \ e'_{i2} \subseteq _{(R)} e_{i}, \ e'_{j} \subseteq _{(R)} e_{j}\), and \(|T'_{j} \vert = |T'_{i1} \vert\), the last inequality is rewritten as

$$\begin{aligned}&|H_{j} \cap T'_{j} \vert \times {\mathcal{L}}({\bar{p}}_{j}, {\bar{p}}^{*}_{j}) \le |H_{i} \cap T'_{i1} \vert \times {\mathcal{L}}({\bar{p}}_{i}, {\bar{p}}^{*}_{i}) \\&\quad \equiv |T'_{j} \vert \times {\mathcal{L}}({\bar{p}}_{j}, {\bar{p}}^{*}_{j}) \le |T'_{i1} \vert \times {\mathcal{L}}({\bar{p}}_{i}, {\bar{p}}^{*}_{i}) \\&\quad \equiv {\mathcal{L}}({\bar{p}}_{j}, {\bar{p}}^{*}_{j}) \le {\mathcal{L}}({\bar{p}}_{i}, {\bar{p}}^{*}_{i}). \end{aligned}$$

The proof can be done by showing the last inequality, \({\mathcal{L}}({\bar{p}}_{j}, {\bar{p}}^{*}_{j}) \le {\mathcal{L}}({\bar{p}}_{i}, {\bar{p}}^{*}_{i})\).

In order to show \({\mathcal{L}}({\bar{p}}_{j}, {\bar{p}}^{*}_{j}) \le {\mathcal{L}}({\bar{p}}_{i}, {\bar{p}}^{*}_{i})\), we should take a close look at the transition probability in \(e_{i}\). Since the head sets of the two reciprocal arcs do not overlap, the transition probability is

$$\begin{aligned} p_{h, i}(v) = {\left\{ \begin{array}{ll} \frac{1}{2|H'_{i1} \vert } &{} \text{if }v \in H'_{i1} \\ \frac{1}{2|H'_{i2} \vert } &{} \text{if }v \in H'_{i2} \\ 0 &{} \text{otherwise.} \\ \end{array}\right. } \end{aligned}$$

Since \(e'_{i1} \subseteq _{(R)} e_{i}, \ e'_{i2} \subseteq _{(R)} e_{i}\), and \(e'_{j} \subseteq _{(R)} e_{j}\), the domain of \(v\in V\) can be divided into

$$\begin{aligned}&H'_{i1}, \quad H'_{i2}, \quad T_{i}\setminus \{H'_{i1} \cup H'_{i2}\}, \text{ and } V \setminus T_{i}, \quad \text{for } e_{i}, \\&H'_{j}, \quad T_{j} \setminus H'_{j}, \text{ and } V \setminus T_{j}, \quad \text{for }e_{j}. \end{aligned}$$

Since \(|T_{i} \vert = |T_{j} \vert\), the probability mass for the last part is identical for both cases. Let \(A = |H_{j} \vert\), \(B = |H_{i1} \vert\), and \(T = |T_{i} \vert = |T_{j} \vert\). Since \(H'_{i1}, H'_{i2} \subseteq T_{i}\), \(H'_{j} \subseteq T_{j}\), \(H'_{i1} \cap H'_{i2} = \emptyset\), and \(|(H'_{i1} \cup H'_{i2}) \cap T_{i} \vert = |H'_{j}\cap T_{j} \vert\), \(|H_{i1} \vert + |H_{i2} \vert = |H_{j} \vert\) holds. Then, based on the above fact, we rewrite \({\mathcal{L}}({\bar{p}}_{j}, {\bar{p}}_{j}^{*}) \le {\mathcal{L}}({\bar{p}}_{i}, {\bar{p}}_{i}^{*})\) as

$$\begin{aligned}&{\mathcal{L}}({\bar{p}}_{j}, {\bar{p}}_{j}^{*}) \le {\mathcal{L}}({\bar{p}}_{i}, {\bar{p}}_{i}^{*}) \nonumber \\&\quad \equiv A\times \ell \left( \frac{1}{T}, \frac{1}{A}\right) + \frac{T - A}{2T}\log {2} \nonumber \\&\quad \le B\times \ell \left( \frac{1}{T}, \frac{1}{2B}\right) + (A-B)\times \ell \left( \frac{1}{T}, \frac{1}{2(A-B)}\right) + \frac{T - B - (A - B)}{2T} \log {2} \nonumber \\&\quad \equiv A\times \ell \left( \frac{1}{T}, \frac{1}{A}\right) \le B\times \ell \left( \frac{1}{T}, \frac{1}{2B}\right) + (A - B)\times \ell \left( \frac{1}{T}, \frac{1}{2(A-B)}\right) \nonumber \\&\quad \equiv \frac{A}{2T}\log {\frac{2A}{A + T}} + \frac{A}{2A}\log {\frac{2T}{A + T}} \nonumber \\&\quad \le \frac{B}{2T}\log {\frac{4B}{2B + T}} + \frac{B}{4B}\log {\frac{2T}{2B + T}} \nonumber \\&\qquad +\frac{(A-B)}{2T}\log {\frac{4(A-B)}{2(A-B) + T}} + \frac{(A-B)}{4(A-B)}\log {\frac{2T}{2(A-B) + T}}, \quad \because \hbox { unfold}\ \ell (p,q) \nonumber \\&\quad \equiv \frac{A}{2T}\log {\frac{A}{A + T}} + \frac{A}{2A}\log {\frac{T}{A + T}} \nonumber \\&\quad \le \frac{B}{2T}\log {\frac{2B}{2B + T}} + \frac{B}{4B}\log {\frac{T}{2B + T}} \nonumber \\&\qquad + \frac{(A-B)}{2T}\log {\frac{2(A-B)}{2(A-B) + T}} + \frac{(A-B)}{4(A-B)}\log {\frac{T}{2(A-B) + T}}, \end{aligned}$$
(19)

where for the last equivalence, we subtract \(\left( \frac{A}{2T} + \frac{1}{2} \right) \log {2} = \left( \frac{A}{2T} + \frac{A}{2A} \right) \log {2} = \left( \frac{B}{2T} + \frac{B}{4B} + \frac{A-B}{2T} + \frac{B-A}{4(B-A)}\right) \log {2}\) from both sides. We show the last inequality by dividing it into two and proving each. If the following two inequality holds, the proof is done.

$$\begin{aligned} \frac{A}{2T}\log {\frac{A}{A + T}}&\le \frac{B}{2T}\log {\frac{2B}{2B + T}} + \frac{(A-B)}{2T}\log {\frac{2(A-B)}{2(A-B) + T}}, \end{aligned}$$
(20)
$$\begin{aligned} \frac{1}{2}\log {\frac{T}{A + T}}&\le \frac{1}{4}\log {\frac{T}{2B + T}} + \frac{1}{4}\log {\frac{T}{2(A-B) + T}}. \end{aligned}$$
(21)

We first show the inequality (20). By multiplying by 2T both sides, we get

$$\begin{aligned}&\frac{A}{2T}\log {\frac{A}{A + T}} \le \frac{B}{2T}\log {\frac{2B}{2B + T}} + \frac{(A-B)}{2T}\log {\frac{2(A-B)}{2(A-B) + T}} \nonumber \\&\quad \equiv A\log {\frac{A}{A + T}} \le B\log {\frac{2B}{2B + T}} + (A-B)\log {\frac{2(A-B)}{2(A-B) + T}} \end{aligned}$$
(22)

Here, we prove this inequality by using the functional form of \(f(B) = B\log {\frac{2B}{2B + T}} + (A-B)\log {\frac{2(A-B)}{2(A-B) + T}}\) where \(0< B < A\). Its derivative is

$$\begin{aligned} \frac{\partial f(B)}{\partial B}&= \log {(2B)} - \log {(2B + T)} + B\left( \frac{2}{2B} - \frac{2}{2B + T}\right) \\&\qquad - \log {(2(A-B))} + \log {(2(A-B) + T)} - (A-B)\left( \frac{2}{2(A-B)} - \frac{2}{2(A-B) + T}\right) . \\&\quad = \log {(2B)} - \log {(2B + T)} - \frac{2B}{2B + T} \\&\qquad - \log {(2(A-B))} + \log {(2(A-B) + T)} + \frac{2(A-B)}{2(A-B) + T} \\&\quad = \log {\frac{2B}{2B+T}} - \frac{2B}{2B + T} - \log {\frac{2(A-B)}{2(A-B) + T}} + \frac{2(A-B)}{2(A-B) + T}. \end{aligned}$$

Thus, \(\frac{\partial f(B)}{\partial B} = \log {x} - x - (\log {y} - y)\) for \(x = \frac{2B}{2B+T}\) and \(y = \frac{2(A-B)}{2(A-B) + T}\), which satisfy \(0<x,y<1\), and it has the following properties:

  • If we plug in \(B = \frac{A}{2}\), \(f'(B) = 0\) holds,

  • \(\log {x} - x\) is an increasing function at \(0< x < 1\),

  • If \(0< B < \frac{A}{2}\), then \((\log {y}) - y > (\log {x}) - x\), which implies \(f'(B) < 0\),

  • If \(\frac{A}{2}< B < A\), then \((\log {x}) - x > (\log {y}) - y\), which implies \(f'(B) > 0\).

From these properties, we can derive

$$\begin{aligned} f'(B) {\left\{ \begin{array}{ll}< 0 &{} \text{if }0< B< \frac{A}{2} \\ = 0 &{} \text{if }B = \frac{A}{2} \\ > 0 &{} \text{if }\frac{A}{2}< B < A. \end{array}\right. } \end{aligned}$$

Hence, when \(0<B<A\), f(B) has its minimum value at \(B=A/2\), and therefore the inequality (22), which is equivalent to the inequality (20), holds. Now we show the inequality (21), which is rewritten as

$$\begin{aligned}&\frac{1}{2}\log {\frac{T}{A + T}} \le \frac{1}{4}\log {\frac{T}{2B + T}} + \frac{1}{4}\log {\frac{T}{2(A-B) + T}} \\&\quad \equiv \frac{1}{4}\log {\frac{T^{2}}{(A + T)(A+T)}} \le \frac{1}{4}\log {\frac{T^{2}}{(2B + T)(2(A-B) + T)}}, \\&\quad \equiv (2B + T)(2(A-B) + T) \le (A + T)(A + T) \\&\quad = 4B(A-B) + 2AT + T^{2} \le A^{2} + 2AT + T^{2} \\&\quad \equiv A^{2} - 4AB + 4B^{2} = (A-2B)^{2} \ge 0. \end{aligned}$$

The last inequality trivially holds. \(\square\)

Proposition 3B.

HyperRec (i.e., defining \(r(e_i, R_i)\) as in Eq. (5)) satisfies Generalized Axiom 3B.

Proof

By following the proof of Proposition 3A, we can show that \(r(e_i \, R_i) < r(e_j \, R_j)\) is implied by

$$\begin{aligned} \sum _{v_{h} \in H_{i}} {\mathcal{L}}(p_{h}, p_{h}^{*}) \le \sum _{v_{h} \in H_{j}} {\mathcal{L}}(p_{h}, p_{h}^{*}). \end{aligned}$$

Since \(T'_{i1} \cap T'_{i2} = \emptyset\) and \(H'_{i1} = H'_{i2}\), the transition probability for every \(v_{h} \in H_{i} \cap \{T'_{i1} \cup T'_{i2}\}\) is identical for \(e_{i}\). This is also true for \(e_{j}\), whose reciprocal set has only one arc. Let \({\bar{p}}_{k}, \forall k = i,j\) be the transition probability distribution regarding the target arc \(e_{k}\) and its reciprocal set \(R_{k}\). Since \(|H_{i} \cap \{T'_{i1} \cup T'_{i2}\} \vert = |H_{j} \cap T'_{j} \vert\), the above inequality is rewritten as

$$\begin{aligned} {\mathcal{L}}({\bar{p}}_{i}, {\bar{p}}_{i}^{*}) \le {\mathcal{L}}({\bar{p}}_{j}, {\bar{p}}_{j}^{*}). \end{aligned}$$

Since \(e'_{i1} \subseteq _{(R)} e_{i}\), \(e'_{i2} \subseteq _{(R)} e_{i}\), \(e'_{j} \subseteq _{(R)} e_{j}\), and \(|H'_{i1} \vert = |H'_{j} \vert\), the probabilistic distances for \(e_{i}\) and \(e_{j}\) are identical. That is,

$$\begin{aligned} {\mathcal{L}}({\bar{p}}_{i}, {\bar{p}}_{i}^{*}) = {\mathcal{L}}({\bar{p}}_{j}, {\bar{p}}_{j}^{*}), \end{aligned}$$
(23)

and thus \({\mathcal{L}}({\bar{p}}_{i}, {\bar{p}}_{i}^{*}) \le {\mathcal{L}}({\bar{p}}_{j}, {\bar{p}}_{j}^{*})\) also holds. \(\square\)

Remark 1

(Extension of Propositions 3A and 3B to Multiple Hyperarc Cases). Although the statement of Proposition 3A presents a case with a single arc in \(R_{i}\) and two arcs in \(R_{j}\), it can be further generalized: a single arc in \(R_{i}\) and \(K \ge 2\) hyperarcs in \(R_{j}\) under the following conditions, which are equivalent to the current conditions for \(K=2\): (1) the head sets of the arcs in \(R_{i}\) are disjoint and their tail sets are identical, (2) all arcs in \(R_{i}\) satisfy the condition of \(\subseteq _{(R)}\), and (3) the coverage of \(T_{i}\) by the head sets of the arcs in \(R_{i}\) is of the same size as the coverage of \(T_{j}\) by the head set of the arc in \(R_{j}\).

We provide a proof sketch to demonstrate the validity of HyperRec in this generalized setting. As in the proof of Proposition 3A, it suffices to show that Eq. (24) holds, which generalizes Eq. (19),

$$\begin{aligned} A\times \ell \left( \frac{1}{T}, \frac{1}{A}\right) \le B_{1}\ell \left( \frac{1}{T}, \frac{1}{KB_{1}} \right) + \cdots + B_{K}\ell \left( \frac{1}{T}, \frac{1}{KB_{K}} \right) , \end{aligned}$$
(24)

where \(A = \sum _{i=1}^{K}B_{i}\). Considering that the Jensen-Shannon Divergence (JSD) is an average of two KL-divergence terms, which is a well-known convex function when one probability distribution is fixed (1/T in our case), we can derive that each term \(\ell\) in Eq. (24) is also a convex function.

From this fact, we can apply Jensen’s Inequality, which states: \(f(a_{1}x_{1} + \cdots + a_{K}x_{K}) \le a_{1}f(x_{1}) + \cdots + a_{K}f(x_{K})\) holds for a convex function f and non-negative coefficients \(a_{1},\ldots , a_{K}\) where \(\sum _{i=1}^{K} a_{i} = 1\). By considering the fact that \(\ell (\frac{1}{T}, x)\) is a convex function with respect to x, we derive Eq. (25) by setting \(a_{i} = B_{i}/A\) and \(x_{i} = 1/(KB_{i})\).

$$\begin{aligned} \, \ell \left( \frac{1}{T}, \frac{1}{A}\right)&= \ell \left( \frac{1}{T}, \frac{K}{AK}\right) = \ell \left( \frac{1}{T}, \frac{1}{KB_{1}} \times \frac{B_{1}}{A} + \cdots \frac{1}{KB_{K}} \times \frac{B_{K}}{A}\right) \nonumber \\&\le \frac{B_{1}}{A} \ell \left( \frac{1}{T}, \frac{1}{KB_{1}}\right) + \cdots \frac{B_{K}}{A} \ell \left( \frac{1}{T}, \frac{1}{KB_{K}}\right) . \end{aligned}$$
(25)

Multiplying both sides of Eq. (25) by A implies Eq. (24), which is the result we aim to show.

Similarly, we can further generalize Proposition 3B to case with a single arc in \(R_{i}\) and \(K \ge 2\) arcs in \(R_{j}\) under the following conditions, which are equivalent to the current conditions when \(K=2\): (1) the tail sets of the arcs in \(R_{i}\) are disjoint and their head sets are identical, (2) all arcs in \(R_{i}\) satisfy the condition of \(\subseteq _{(R)}\), and (3) the coverage of \(H_{i}\) by the tail sets of the arcs in \(R_{i}\) is of the same size as the coverage of \(H_{j}\) by the tail set of the arc in \(R_{j}\). The proof provided for Proposition 3B can be directly applied in this generalized setting to show the validity of HyperRec.

1.2.4 Proof of the Fact that HyperRec Satisfies Axiom 4

Through an example, Axiom 4 states that an arc whose reciprocal arcs are equally reciprocal to all nodes in the arc is more reciprocal than one with reciprocal arcs biased towards a subset of nodes in the arc. The generalized statement of Axiom 4 is formalized in Generalized Axiom 4.

Proposition 4.

HyperRec (i.e., defining \(r(e_i, R_i)\) as in Eq. (5)) satisfies Generalized Axiom 4.

Proof

By the definition, the inequality is rewritten as

$$\begin{aligned}&r(e_i , R_i)< r(e_j , R_j) \\&\quad = \left( \frac{1}{|R_{i} \vert } \right) ^\alpha \left( 1 - \frac{\sum _{v_h \in H_i} {\mathcal{L}}(p_{h}, p_{h}^{*})}{|H_i \vert \cdot {\mathcal{L}}_{max} }\right) < \left( \frac{1}{|R_{j} \vert } \right) ^\alpha \left( 1 - \frac{\sum _{v_h \in H_j} {\mathcal{L}}(p_{h}, p_{h}^{*})}{|H_j \vert \cdot {\mathcal{L}}_{max} }\right) . \end{aligned}$$

Let \({\bar{p}}_{k}, \forall k = i,j\) be the transition probability distribution regarding the target arc \(e_{k}\) and its reciprocal set \(R_{k}\) which does not rely on the starting node \(v_{h}\). The above inequality is rewritten as

$$\begin{aligned}&r(e_i , R_i)< r(e_j , R_j) \\&\quad \equiv \left( 1 - \frac{\sum _{v_h \in H_i} {\mathcal{L}}(p_{h}, p_{h}^{*})}{|H_i \vert \cdot {\mathcal{L}}_{max} }\right)< \left( 1 - \frac{\sum _{v_h \in H_j} {\mathcal{L}}(p_{h}, p_{h}^{*})}{|H_j \vert \cdot {\mathcal{L}}_{max} }\right) \quad \because |R_{i} \vert = |R_{j} \vert \\&\quad \equiv \sum _{v_h \in H_j}{\mathcal{L}}(p_{h}, p_{h}^{*})< \sum _{v_h \in H_i}{\mathcal{L}}(p_{h}, p_{h}^{*}) \quad \because |H_{i} \vert = |H_{j} \vert \\&\quad \equiv {\mathcal{L}}({\bar{p}}_{j}, {\bar{p}}_{j}^{*}) < {\mathcal{L}}({\bar{p}}_{i}, {\bar{p}}_{i}^{*}). \quad \because T'_{i} = H_{i} \text{ and } T'_{j} = H_{j} \end{aligned}$$

Here, we prove the last inequality by showing that, in the above setting, (a) \(R_{j}\) minimizes the distance (i.e., \({\mathcal{L}}(p_{h, j}, p_{h, j}^{*}) \equiv {\mathcal{L}}({\bar{p}}_{j}, {\bar{p}}_{j}^{*})\)), and (b) the distance is inevitably larger in all other cases. By the assumptions, for the target arc \(e_j\), the corresponding reciprocal arcs have a head set of size 2, and the number of reciprocal arcs equals the number of tail nodes (i.e., \(|R_{j} \vert = |T_{j} \vert\)). In addition, the head set of every reciprocal arc is a subset of the tail set \(T_{j}\) of \(e_j\) and \(T'_{j} = H_{j}\). Thus, Eq. (3), which is about \(e_{j}\), implies that every node \(v \in T_{j}\) in the tail set is included in two of the head sets of the reciprocal arcs. Because of these facts, the transition probability can be written as

$$\begin{aligned} p_{h, j}(v) = {\left\{ \begin{array}{ll} \frac{1}{2|T_{j} \vert } + \frac{1}{2|T_{j} \vert } = \frac{1}{|T_{j} \vert } &{} \text{if }v \in T_{j}, \\ 0 &{} \text{otherwise,} \end{array}\right. } \end{aligned}$$

Note that this is identical to the optimal transition probability.

Now, consider the case of \(e_{i}\). Here, due to Eq. (2), the transition probability cannot be uniform as in the case of \(e_{j}\). Assume a node \(v'_{i1} \in T_{i}\) belongs to reciprocal arcs’ head sets \(K \ne 2\) times. Then, the transition probability assigned to \(v'_{i1}\) is \(p(v'_{i1}) = \frac{1}{2|T_{i} \vert } \times K \ne \frac{1}{|T_{i} \vert }\). This result indicates that the transition probability of \(e_{i}\) is not the only optimal one. Thus, the following inequality holds:

$$\begin{aligned} {\mathcal{L}}({\bar{p}}_{j}, {\bar{p}}^{*}_{j}) < {\mathcal{L}}({\bar{p}}_{i}, {\bar{p}}^{*}_{i}). \end{aligned}$$

\(\square\)

1.2.5 Proof of the Fact that HyperRec Satisfies Axioms 5-8

Proposition 5.

HyperRec (i.e., defining \(r(e_i, R_i)\) as in Eq. (5)) satisfies Axiom  5.

Proof

This can be shown by using the known range of the probabilistic distance \({\mathcal{L}}(p,q)\) as follows:

$$\begin{aligned}&0 \le \sum _{v_{h} \in H_{i}}\frac{{\mathcal{L}}(p_{h},p^{*}_{h})}{{\mathcal{L}}_{max}} \le |H_{i} \vert \quad (\because 0 \le {\mathcal{L}}(p,q) \le {\mathcal{L}}_{max}, \forall p,q) \\&\quad \equiv 0 \le \frac{\sum _{v_{h} \in H_{i}} {\mathcal{L}}(p_{h},p^{*}_{h})}{|H_{i} \vert \cdot {\mathcal{L}}_{max}} \le 1 \\&\quad \equiv 0 \le 1 - \frac{\sum _{v_{h} \in H_{i}} {\mathcal{L}}(p_{h},p^{*}_{h})}{|H_{i} \vert \cdot {\mathcal{L}}_{max}} \le 1 \\&\quad \equiv 0 \le \left( \frac{1}{|R_{i} \vert } \right) ^\alpha \left( 1 - \frac{\sum _{v_h \in H_i} {\mathcal{L}}(p_{h}, p_{h}^{*})}{|H_i \vert \cdot {\mathcal{L}}_{max} }\right) \le 1 \quad (\because \alpha > 0) \end{aligned}$$

\(\square\)

Proposition 6.

HyperRec (i.e., defining r(G) as in Eq. (1)) satisfies Axiom  6.

Proof

Recall that the hypergraph level reciprocity of HyperRec is defined as

$$\begin{aligned} r(G) = \frac{1}{|E \vert } \sum _{i=1}^{|E \vert }r(e_{i}, R_{i}) \end{aligned}$$

By the assumption, the size of every arc’s head set is 1, and thus each \(r(e_{i}, R_{i})\) is rewritten as

$$\begin{aligned} r(e_{i}) = \max _{R_{i} \subseteq E, R_i\ne \emptyset } \left( \frac{1}{|R_{i} \vert }\right) ^{\alpha } \left( 1 - \frac{{\mathcal{L}}{(p_{h}, p^{*}_{h})}}{{\mathcal{L}}_{max}}\right) , \end{aligned}$$

where \(\{v_{h}\} = H_{i}\). Here, the optimal transition probability is

$$\begin{aligned} p^{*}_{h}(v) = {\left\{ \begin{array}{ll} 1 &{} \text{if }\{v\} = T_{i}, \\ 0 &{} \text{otherwise.} \end{array}\right. } \end{aligned}$$

For a case where the perfectly reciprocal opponent \(e'_i= \langle H'_{i} = T_{i}, T'_{i} = H_{i} \rangle\) of \(e_i\) exists (i.e., \(e'_{i} \in E\)), \(R_i=\{e'_i\}\) maximizes \(\left( \frac{1}{|R_{i} \vert }\right) ^{\alpha } \left( 1 - \frac{{\mathcal{L}}{(p_{h}, p^{*}_{h})}}{{\mathcal{L}}_{max}}\right)\) since it minimizes both \(|R_{i} \vert\) (to 1) and \({\mathcal{L}}{(p_{h}, p^{*}_{h})}\) (to 0). Thus, \(r(e_{i})\) becomes 1.

For a case where the perfectly reciprocal opponent \(e'_i= \langle H'_{i} = T_{i}, T'_{i} = H_{i} \rangle\) of \(e_i\) does not exist (i.e., \(e'_{i} \notin E\)). Then, for each arc \(e_k\) in the reciprocal set \(R_i\), since \(|H_{i} \vert =|T_{i} \vert =|H_{k} \vert =|T_{k} \vert =1\), \(H_{i}\cap T_{k}=\emptyset\) or \(T_{i}\cap H_{k}=\emptyset\) should hold. Thus, there is no transition possibility from any node in \(\in H_{i}\) to any node in \(T_{i}\), and as a result, \(p_h(v)=0\), \(\forall v_h\in H_{i}\), \(\forall v\in T_{i}\). Hence, for every \(R_{i}\subseteq E\), by A-II, \({\mathcal{L}}{(p_{h}, p^{*}_{h})}={\mathcal{L}}_{max}\), and thus \(r(e_i)=0\).

If we consider both cases together, \(r(e_{i})\) becomes an indicator function that gives 1, if there exists the perfectly reciprocal opponent, and 0, otherwise. Formally,

$$\begin{aligned} r(G)&= \frac{1}{|E \vert } \sum _{i = 1}^{|E \vert } r(e_{i}) \\&= \frac{1}{|E \vert } \sum _{i = 1}^{|E \vert } \mathbbm {1} (\exists e'_{i}\in E \text{ such that } H'_{i} = T_{i} \text{ and } T'_{i} = H_{i}), \end{aligned}$$

where \(\mathbbm {1}(\text{TRUE}) = 1\) and \(\mathbbm {1}(\text{FALSE}) = 0\); and this is identical to the digraph reciprocity measure (Newman et al. 2002; Garlaschelli and Loffredo 2004), i.e., \({|E^{\leftrightarrow } \vert }/{|E \vert }\). \(\square\)

Proposition 7.

HyperRec (i.e., defining r(G) as in Eq. (1)) satisfies Axiom  7.

Proof

Recall that the hypergraph-level reciprocity of HyperRec is defined as

$$\begin{aligned} r(G) = \frac{1}{|E \vert } \sum _{i=1}^{|E \vert } r(e_{i})= \frac{1}{|E \vert } \sum _{i=1}^{|E \vert } \max _{R_{i}\subseteq E,R_{i} \ne \emptyset } r(e_{i}, R_{i}). \end{aligned}$$

By Axiom 5, \(0\le r(e_{i} \, R_{i})\le 1\) for any \(e_{i}\) and \(R_{i}\). This implies \(0 \le \sum _{i=1}^{|E \vert } r(e_{i}) \le |E \vert\), which is equivalent to \(0 \le r(G)=\frac{1}{|E \vert } \sum _{i=1}^{|E \vert } r(e_{i}) \le 1\). \(\square\)

Proposition 8.

HyperRec (i.e., defining r(G) as in Eq. (1)) satisfies Axiom  8.

Proof

We first show that the maximum value of HyperRec is attainable under the given condition of Axiom  8. From an arbitrary hypergraph G, let \(E'=\{e_{i} \in E: \langle T_{i}, H_{i}\rangle \notin E \}\) be the set of arcs whose perfectly reciprocal opponents do not exist in G. Let \(E^{add} = \bigcup _{e_{ki} \in E^{'}} {\langle T_{i}, H_{i} \rangle }\) be the set of perfectly reciprocal opponents of the arcs in \(E'\). If we add \(E^{add}\) to G, which gives \(G^{+}=(V,E^{+}=E \cup E^{add})\), then for each arc \(e_i\in E^{+}\), the perfectly reciprocal opponent \(e'_i= \langle H'_{i} = T_{i}, T'_{i} = H_{i} \rangle\) of \(e_i\) exists (i.e., \(e'_{i} \in E^{+}\)), and thus

$$\begin{aligned} r(e_{i})=r(e_{i},\{e'_i\})&= \left( 1 - \frac{\sum _{v_h \in H_i} {\mathcal{L}}(p_{h}, p_{h}^{*})}{|H_i \vert \cdot {\mathcal{L}}_{max} }\right) \\&= \left( 1 - \frac{0 + \cdots + 0}{|H_i \vert \cdot {\mathcal{L}}_{max}}\right) \quad (\because p_{h} = p^{*}_{h}) \\&= 1, \end{aligned}$$

which implies that \(r(G^{+})=\frac{1}{|E^+ \vert } \sum _{i = 1}^{|E^+ \vert } r(e_{i})=1\).

We now show that the minimum value of HyperRec is attainable under the given condition of Axiom  8. From an arbitrary hypergraph \(G=(V,E)\), let \(E^{-} = \{e_{i}\}\) be a hyperarc set that contains any single hyperarc \(e_{i} \in E\). For a hypergraph \(G^{-} = (V, E^{-})\), the only possible choice of \(R_{i}\) is \(R_{i} = \{e_{i}\}\) since \(R_{i}\) should be a non-empty set and there exists only a single hyperarc \(e_{i}\) in \(G^{-}\), and thus

$$\begin{aligned} r(e_{i})=r(e_{i},\{e_i\})&= \left( 1 - \frac{\sum _{v_h \in H_i} {\mathcal{L}}(p_{h}, p_{h}^{*})}{|H_i \vert \cdot {\mathcal{L}}_{max} }\right) \\&= \left( 1 - \frac{\vert H_{i}\vert \cdot {\mathcal{L}}_{max}}{\vert H_{i}\vert \cdot {\mathcal{L}}_{max}}\right) \quad (\because {{\textbf{A-IV}}} \text{ and }{{\textbf{A-V}}}) \\&= 0, \end{aligned}$$

which implies that \(r(G^{-}) = r(e_{i}) = 0.\)\(\square\)

1.3 Proof of Theorem 2

Proof

Refer to Sect. 3.4 for the definition of \(\Phi _{i}(\langle H'_{i}, T'_{i}\rangle )\). Given a target arc \(e_{i}\), let \(e_{a}\) and \(e_{b}\) be two arcs in a set \(\Phi _{i}(\langle H'_{i}, T'_{i}\rangle )\) where \(A=|H_a \vert \le B=|H_b\vert\). Consider an arbitrary reciprocal set \(R_{i}\subseteq E\). We use \(p_{(i, a, h)}\) to denote the probability distribution at each node \(v_{h} \in H'_{i}\) when the reciprocal set is \(R_{i} \cup \{e_{a}\}\). Then, probabilistic distance between \(p_{(i, a, h)}\) and \(p^{*}_{h}\) is rewritten as

$$\begin{aligned}{} {} {\mathcal{L}}(p_{(i, a, h)}, p^{*}_{h}) &= \sum _{v \in T'_{i}} \ell \left( \frac{1}{|T_{i} \vert }, \frac{Kq_{(i, h)}(v)}{K+1} + \frac{1}{A(K+1)}\right) + \sum _{v \in T_{i} \setminus T'_{i}} \ell \left( \frac{1}{ \vert T_{i} \vert }, \frac{Kq_{(i, h)}(v)}{K+1}\right) \nonumber \\{} & {} \quad + \sum _{v \in (\bigcup _{e_{k} \in E'_{(i,h)}} H_{k}) \setminus T_{i}} \frac{Kq_{(i,h)}(v)}{2(K+1)}\log 2 + \sum _{v \in H_{a} \setminus T_{i}} \frac{1}{2A(K+1)}\log 2 , \end{aligned}$$
(26)

where \(E'_{(i, h)} = \{e_{k} \in R_{i}:v_{h} \in T_{k}\}\), \(K = |E'_{i,h} \vert\), and \(q_{(i, h)}\) is the probability distribution at each node \(v_{h} \in H'_{i}\) when the reciprocal set is \(R_{i}\). It should be noticed that the definition of \(H'_{i}\) and \(T'_{i}\), \(H'_{i} = T_{a} \cap H_{i} = T_{b} \cap H_{i}\) and \(T'_{i} = H_{a} \cap T_{i} = H_{b} \cap T_{i}\) hold. In the same way, we define \(p_{(i,b,h)}\) is as the probabilistic distribution at each node \(v_{h} \in H'_{i}\) when \(R_{i} \cup \{e_{b}\}\) is the reciprocal set. Then, \({\mathcal{L}}(p_{(i, b, h)}, p^{*}_{h})\) can be rewritten as in Eq. (26).

We prove the theorem by showing that \({\mathcal{L}}(p_{(i, a, h)}, p^{*}_{h}) \le {\mathcal{L}}(p_{(i, b, h)}, p^{*}_{h})\) holds for every \(v_h\in H'_{i}=H_{i} \cap T_{a} = H_{i} \cap T_{b}\). Note that the second and third terms of the RHS do not depend on \(e_{a}\) and \(e_{b}\), and they are identical in \({\mathcal{L}}(p_{(i, a, h)}, p^{*}_{h})\) and \({\mathcal{L}}(p_{(i, b, h)}, p^{*}_{h})\). Thus, we rewrite \({\mathcal{L}}(p_{(i, a, h)}, p^{*}_{h}) \le {\mathcal{L}}(p_{(i, b, h)}, p^{*}_{h})\) as

$$\begin{aligned}&{\mathcal{L}}(p_{(i, a, h)}, p^{*}_{h}) \le {\mathcal{L}}(p_{(i, b, h)}, p^{*}_{h}) \\&\quad \equiv \sum _{v \in T'_{i}} \ell \left( \frac{1}{|T_{i} \vert }, \frac{Kq_{(i, h)}(v)}{K+1} + \frac{1}{A(K+1)}\right) + \sum _{v \in H_{a} \setminus T_{i}} \frac{1}{2A(K+1)}\log 2 \\&\quad \le \sum _{v \in T'_{i}} \ell \left( \frac{1}{|T_{i} \vert }, \frac{Kq_{(i, h)}(v)}{K+1} + \frac{1}{B(K+1)}\right) + \sum _{v \in H_{b} \setminus T_{i}} \frac{1}{2B(K+1)}\log 2. \end{aligned}$$

For simplicity, let \(|T_{i} \vert = T\) abd \(|T'_{i} \vert = F\). Then, the above inequality is rewritten as

$$\begin{aligned}&\sum _{v \in T'_{i}} \ell \left( \frac{1}{T}, \frac{Kq_{(i, h)}(v)}{K+1} + \frac{1}{A(K+1)}\right) - \ell \left( \frac{1}{T}, \frac{Kq_{(i, h)}(v)}{K+1} + \frac{1}{B(K+1)}\right) \nonumber \\&\quad \le \frac{B - F}{2B(K+1)}\log 2 - \frac{A - F}{2A(K+1)}\log 2\,. \end{aligned}$$
(27)

Let \(v' = {{\,\textrm{argmax}\,}}_{v \in T'_{i}} \ell (\frac{1}{T}, \frac{Kq_{(i, h)}(v)}{K+1} + \frac{1}{A(K+1)}) - \ell (\frac{1}{T}, \frac{Kq_{(i, h)}(v)}{K+1} + \frac{1}{B(K+1)})\), and let \(p'=q_{(i,h)}(v')\). Then, the following inequality holds:

$$\begin{aligned}&\sum _{v \in T'_{i}} \ell \left( \frac{1}{T}, \frac{Kq_{(i, h)}(v)}{K+1} + \frac{1}{A(K+1)}\right) - \ell \left( \frac{1}{T}, \frac{Kq_{(i, h)}(v)}{K+1} + \frac{1}{B(K+1)}\right) \\&\quad \le F \times \left( \ell \left( \frac{1}{T}, \frac{Kp'}{K+1} + \frac{1}{A(K+1)}\right) - \ell \left( \frac{1}{T}, \frac{Kp'}{K+1} + \frac{1}{B(K+1)}\right) \right) \end{aligned}$$

Thus, the inequality (27) is implied by

$$\begin{aligned}&F \times \left( \ell \left( \frac{1}{T}, \frac{Kp'}{K+1} + \frac{1}{A(K+1)}\right) - \ell \left( \frac{1}{T}, \frac{Kp'}{K+1} + \frac{1}{B(K+1)}\right) \right) \nonumber \\&\quad \le \frac{F}{2A(K+1)}\log 2 - \frac{F}{2B(K+1)}\log 2 \,. \end{aligned}$$
(28)

By unfolding \(\ell\) in the LHS and dividing both sides by F, the inequality (28) is rewritten as

$$\begin{aligned}&\frac{1}{2(K+1)}\left( \frac{1}{A} - \frac{1}{B}\right) \log 2 \\&\quad \ge \frac{1}{2T}\log \left( \frac{\frac{2}{T}}{\frac{1}{T} + \frac{Kp'}{K+1} + \frac{1}{A(K+1)}}\right) + \frac{1}{2}\left( \frac{Kp'}{K+1} + \frac{1}{A(K+1)}\right) \log \left( \frac{2\left( \frac{Kp'}{K+1} + \frac{1}{A(K+1)}\right) }{\frac{1}{T} + \frac{Kp'}{K+1} + \frac{1}{A(K+1)}}\right) \\&\qquad -\frac{1}{2T}\log \left( \frac{\frac{2}{T}}{\frac{1}{T} + \frac{Kp'}{K+1} + \frac{1}{B(K+1)}}\right) - \frac{1}{2}\left( \frac{Kp'}{K+1} + \frac{1}{B(K+1)}\right) \log \left( \frac{2\left( \frac{Kp'}{K+1} + \frac{1}{B(K+1)}\right) }{\frac{1}{T} + \frac{Kp'}{K+1} + \frac{1}{B(K+1)}}\right) \\&\quad \equiv \frac{1}{(K+1)}\left( \frac{1}{A} - \frac{1}{B}\right) \log 2 - \frac{1}{(K+1)}\left( \frac{1}{A} - \frac{1}{B}\right) \log 2 \\&\quad \ge \frac{1}{T}\log \left( \frac{\frac{1}{T}}{\frac{1}{T} + P' + \frac{1}{A(K+1)}}\right) + \left( P' + \frac{1}{A(K+1)}\right) \log \left( \frac{P' + \frac{1}{A(K+1)}}{\frac{1}{T} + P' + \frac{1}{A(K+1)}}\right) \\&\qquad -\frac{1}{T}\log \left( \frac{\frac{1}{T}}{\frac{1}{T} + P' + \frac{1}{B(K+1)}}\right) - \left( P' + \frac{1}{B(K+1)}\right) \log \left( \frac{P' + \frac{1}{B(K+1)}}{\frac{1}{T} + P' + \frac{1}{B(K+1)}}\right) , \end{aligned}$$

where \(P = \frac{Kp'}{K+1}\). Let \(P_{A} = P' + \frac{1}{A(K+1)}\) and \(P_{B} = P' + \frac{1}{B(K+1)}\), where \(P_{A} \ge P_{B}\). Then, by cancelling out all identical terms, the above inequality is simplified as

$$\begin{aligned}0 &\ge \frac{1}{T}\log \left( \frac{\frac{1}{T}}{\frac{1}{T} + P_{A}}\right) - \frac{1}{T}\log \left( \frac{\frac{1}{T}}{\frac{1}{T} + P_{B}}\right) \\&\quad + P_{A} \log \left( \frac{P_{A}}{\frac{1}{T} + P_{A}}\right) - P_{B} \log \left( \frac{P_{B}}{\frac{1}{T} + P_{B}}\right) \\&\quad \equiv 0 \ge \frac{1}{T}\log \left( \frac{\frac{1}{T} + P_{B}}{\frac{1}{T} + P_{A}}\right) + P_{B} \log \left( \frac{\frac{1}{T} + P_{B}}{P_{B}}\right) - P_{A} \log \left( \frac{\frac{1}{T} + P_{A}}{P_{A}}\right) \end{aligned}$$

If we multiply by T both sides, this inequality is implied by the two following inequalities:

$$\begin{aligned}{} & {} \log \left( \frac{\frac{1}{T} + P_{B}}{\frac{1}{T} + P_{A}}\right) \le 0, \end{aligned}$$
(29)
$$\begin{aligned}{} & {} \log \left( \frac{\left( 1 + \frac{1}{TP_{B}}\right) ^{TP_{B}}}{\left( 1 + \frac{1}{TP_{A}}\right) ^{TP_{A}}}\right) \le 0. \end{aligned}$$
(30)

The inequality (29) is trivial since \(P_{A} \ge P_{B}\). For the inequality (30), the numerator and the denominator are in the form of \(f(n) = (1+\frac{1}{n})^{n}\), which is a non-decreasing function. Thus, the denominator is always greater than or equal to the numerator, thus satisfying the inequality. \(\square\)

1.4 Proof of Corollary 1

Proof

Since HyperRec measures a weighted average of the probabilistic distances that are defined for each head set node of the target arc, we consider each head set node \(v_h\in H_i\) of the target arc \(e_i\). Since the tail set size of every arc is identical to 1 (i.e., \(|T_{i} \vert = 1\)), there exists at most one arc in \(\Psi _{i}\) that covers a specific node \(v_{h}\) in the head set \(H_i\) of the target arc, i.e., \(\forall v_h \in H_i\),

$$\begin{aligned} |\{e_{k} \in \Psi _{i} : v_{h} \in T_{k}\} \vert \le 1, \end{aligned}$$
(31)

Let \(v'\) be the target arc’s tail set node, i.e., \(T_{i}=\{v'\}\). Then, by the definition of \(\Psi _{i}\), \(v'\) is included in the head set of every \(e_{k} \in \Psi _{i}\), i.e., \(\forall e_{k} \in \Psi _{i}\),

$$\begin{aligned} v'\in H_{k}. \end{aligned}$$
(32)

Equations (31) and (32) imply that, \(\forall e_{k} \in R_{i} \subseteq \Psi _{i}\), Eq. (33) holds.

$$\begin{aligned} \textrm{JSD} ({p_{h}}\Vert {p^{*}_{h}})= \ell \left( 1,\frac{1}{|H_{k} \vert }\right) +\sum _{v\in H_{k}\setminus \{v'\}}\ell (0,\frac{1}{|H_{k}\vert }). \end{aligned}$$
(33)

Let \(A = |H_{k1} \vert\) and \(B = |H_{k2} \vert\). Then, \(\forall e'_{h1},e'_{h2} \in R_{i} \subseteq \Psi _{i} \text{ s.t. } |H'_{h1} \vert \le |H'_{h2} \vert\),

$$\begin{aligned}&\textrm{JSD} ({p_{h1}}\Vert {p^{*}_{h1}}) \le \textrm{JSD} ({p_{h2}}\Vert {p^{*}_{h2}}) \end{aligned}$$
(34)
$$\begin{aligned}&\equiv \ell \left( 1,\frac{1}{|H_{k1} \vert }\right) +\sum _{v\in H_{k1}\setminus \{v'\}}\ell \left( 0,\frac{1}{|H_{k1}\vert }\right) \le \ell \left( 1,\frac{1}{|H_{k2} \vert }\right) +\sum _{v\in H_{k2}\setminus \{v'\}}\ell \left( 0,\frac{1}{|H_{k2}\vert }\right) \nonumber \\&\equiv \frac{1}{2A}\log \left( \frac{2}{1 + A}\right) + \frac{1}{2}\log \left( \frac{2A}{1 + A}\right) + \frac{A-1}{2A} \log 2 \nonumber \\&\le \frac{1}{2B}\log \left( \frac{2}{1 + B}\right) + \frac{1}{2}\log \left( \frac{2B}{1 + B}\right) + \frac{B-1}{2B} \log 2 \nonumber \\&\equiv \log \left( \frac{A(B+1)}{B(A+1)}\right) + \left( \frac{1}{A} - \frac{1}{B}\right) \log 2 + \log \left( (1 + B)^{\frac{1}{B}}\right) - \log \left( (1 + A)^{\frac{1}{A}}\right) \le \left( \frac{1}{A} - \frac{1}{B}\right) \log 2 \nonumber \\&\equiv \log \left( \frac{A(B+1)}{B(A+1)}\right) + \log \left( \frac{(1 + B)^{\frac{1}{B}}}{(1 + A)^{\frac{1}{A}}}\right) \le 0, \, \end{aligned}$$
(35)

We prove the inequality (34) by showing that both first and second terms of the LHS of the inequality (35) are smaller than or equal to 0. Since \(A \le B\), it is trivial that the first term is smaller than or equal to 0. The second term has a functional form of \(\log (f(x)/f(x'))\) where f(x) is a non-increasing function and \(x\le x'\), and thus the second term is also smaller than or equal to 0.

In addition, let \(e'_{h} \in \Psi _{i}\) be the only arc where \(T'_{h}=\{v_{h}\}\). Then, the probabilistic distance at a each head set node \(v_{h}\) depends on whether \(e'_{h}\) is in any reciprocal set \(R_i\subseteq \Psi _{i}\) as follows:

$$\begin{aligned} {\mathcal{L}}(p_{h}, p_{h}^{*}) = {\left\{ \begin{array}{ll} {\textrm{JSD} ({p'_{h}}\Vert {p_{h}^{*}})} &{} \text{if }e'_{h} \in R_{i} \\ {\mathcal{L}}_{max} &{} \text{otherwise,} \\ \end{array}\right. } \end{aligned}$$
(36)

where \(p'_{h}\) is the probability distribution at \(v_h\) when the reciprocal set \(R_i=\{e'_h\}\), \(p^{*}_{h}\) is the optimal probability distribution at a node \(v_{h} \in H_{i}\).

By Eqs. (31) and (36), for any \(R'_{i} = \{e'_{h1}, \ldots , e'_{hk}\}\subseteq \Psi _{i}\), Eq. (37) holds.

$$\begin{aligned} r(e_{i}, R'_{i}) = \left( \frac{1}{k}\right) ^{\alpha } \left( 1 - \frac{\textrm{JSD} ({p'_{h1}}\Vert {p^{*}_{h1}}) + \cdots + \textrm{JSD} ({p'_{hk}}\Vert {p^{*}_{hk}}) + (|H_{i} \vert - k) \times {\mathcal{L}}_{max}}{|H_{i} \vert \times {\mathcal{L}}_{max}} \right) , \end{aligned}$$
(37)

where \(T'_{hj}=\{v_{hj}\}\) for every \(j\in \{1,\ldots , k\}\). In addition, Eq. (37) and the inequality (34) imply that drawing k reciprocal arcs from \(\Psi _{i}\) in ascending order of their head set size achieves the maximum reciprocity for fixed k. Let \(\Gamma _{i,k}\) be such a reciprocal set. Formally, if we let \(\Gamma _{i, k}\) be a subset of \(\Psi _{i}\) such that \(|\Gamma _{i,k} \vert = k \text{ and }|H_{s} \vert \le |H_{t} \vert , \ \forall e_{s} \in \Gamma _{i, k}, \ \forall e_{t} \in \{\Psi _{i} {\setminus } \Gamma _{i, k}\}\), then \({{\,\textrm{argmax}\,}}_{R_{i} \subseteq \Psi _{i} s.t. |R_{i} \vert = k} r(e_i,R_i) = \Gamma _{i, k}\) holds. \(\square\)

Appendix 2: Limitations of baseline measures

In this section, we show why several baseline measures fail in satisfying some of Axiom 1–8. Below, We use \(G_{i}=(V_{i},E_{i})\) and \(G_{j}=(V_{j},E_{j})\) to denote the hypergraphs on the left side and the right side, respectively, of each subfigure of Fig. 2.

Table 10 Violation of Axiom 3.

1.1 Violations of Axiom 3

We show how several baseline measures violate Axiom 3. In Fig. 2d, e, \(r(e_{i}, R_{i}) < r(e_{j}, R_{j})\) should hold in order to satisfy Axiom 3. However, we numerically verify that \(r(e_{i}, R_{i}) = r(e_{j}, R_{j})\) hold for some baseline measures, which violates Axiom 3.

B1. Pearcy et al. (2014): They use clique expansion, which transforms every hyperedge of a hypergraph to a clique of a pairwise graph (e.g., \(\langle \{v_{1} \}, \{v_{2}, v_{3} \} \rangle \rightarrow \{\langle \{v_{1}\}, \{v_{2}\}\rangle , \langle \{v_{1}\}, \{v_{3}\}\rangle \}\)). Through this process, the original hypergraph is transformed into a weighted digraph (see Sect. 2.2). Since Pearcy et al. (2014) do not propose any arc-level reciprocity, we compare its hypergraph-level reciprocity for counterexamples regarding Axiom 3. That is, we compare \(r(G_{i})\) and \(r(G_{j})\) in Fig. 2d, e. As reported in Table 10, \(r(G_{i}) = r(G_{j}) = 0.2093\) and \(r(G_{i}) = r(G_{j}) = 0.2093\) hold in Fig. 2d, e, respectively, violating Axiom 3.

B2. Ratio of covered pairs: We compare the ratio of covered pairs (B2), which is arc-level reciprocity, in Fig. 2d, e. As reported in Table 10, \(r(e_{i}, R_{i}=\{e'_{i1},e'_{i2}\}) = r(e_{j}, R_{j} = \{e'_{j}\}) = 0.5625\) and \(r(e_{i}, R_{i}) = r(e_{j}, R_{j}) = 0.5625\) hold in Fig. 2d in Fig. 2e, respectively, which violates Axiom 3.

B5. HyperRec w/o size penalty: As reported in Table 10, \(r(e_{i}, R_{i}=\{e'_{i1},e'_{i2}) = r(e_{j}, R_{j} = \{e'_{j}\}) = 0.6446\) holds in Fig. 2e, which violates Axiom 3.

Table 11 Violation of Axiom 4.

1.2 Violations of Axiom 4

We show how several baseline measures violate Axiom 4. In Fig. 2f, \(r(e_{i}, R_{i}) < r(e_{j}, R_{j})\) should hold in order to satisfy Axiom 4. However, we numerically verify that \(r(e_{i}, R_{i}) = r(e_{j}, R_{j})\) hold for some baseline measures, which violates Axiom 4.

B2. Ratio of covered pairs: As reported in Table 11, \(r(e_{i}, R_{i}=(E_{i}{\setminus } \{e_{i}\}) = r(e_{j}, R_{j}=E_{j}{\setminus } \{e_{j}\}) = 1.00\) holds in Fig. 2f, which violates Axiom 4.

B3. Penalized ratio of covered pairs: As reported in Table 11, \(r(e_{i}, R_{i}=(E_{i}{\setminus } \{e_{i}\}) = r(e_{j}, R_{j}=E_{j}{\setminus } \{e_{j}\}) = 0.25\) holds in Fig. 2f, which violates Axiom 4.

1.3 Violations of Axiom 5

B4. HyperRec w/o normalization: In order to satisfy Axiom 5, reciprocity should always lie in a fixed finite range. Here, we demonstrate that (B4) violates Axiom 5 by showing that its reciprocity value can become infinite. Recall that (B4) is defined as

$$\begin{aligned} r(e_{i}, R_{i}) = \left( \frac{1}{|R_{i} \vert } \right) ^\alpha \left( |H_{i} \vert - \frac{\sum _{v_h \in H_i} {\mathcal{L}}(p_{h}, p_{h}^{*})}{{\mathcal{L}}_{max} }\right) . \end{aligned}$$
(38)

Consider a case where \(R_{i}=\{e'_{i}=\langle T_{i}, H_{i}\rangle \}\). Then, for each \(v_{h} \in H_{i}\), \({\mathcal{L}}(p_{h}, p^{*}_{h})=0\) holds. In turn, Eq. (38) becomes \(r(e_{i},R_{i})=\vert H_{i}\vert\). In this case, as \(\vert H_{i}\vert\) approaches infinity, \(r(e_{i},R_{i})\) also becomes infinite. Since the value of (B4) does not lie in a fixed finite range, (B4) violates Axiom 5.

Fig. 8
figure 8

A counterexample that shows that some baseline measures fail to satisfy Axiom 6

1.4 Violations of Axiom 6

B1. Pearcy et al. (2014): Consider the digraph in Fig. 8 The digraph reciprocity of the digraph is \(r(G) = \frac{2}{3}\) since \(E = \{ e_{1},e_{2},e_{3} \}\), and \(E^{\leftrightarrow } = \{e_{1}, e_{2}\}\). In this case, however, the clique-expanded adjacency matrices of the digraph and the perfectly reciprocal hypergraph are

$$\begin{aligned} {\bar{A}} = \begin{pmatrix} 0 &{} 1 &{} 1\\ 1 &{} 0 &{} 0\\ 0 &{} 0 &{} 0 \end{pmatrix} \quad \text{ and }\quad \bar{A'} = \begin{pmatrix} 0 &{} 1 &{} 1\\ 1 &{} 0 &{} 0\\ 1 &{} 0 &{} 0 \end{pmatrix}. \end{aligned}$$

Thus, according to the definition in Pearcy et al. (2014), the reciprocity becomes \(\frac{2}{4} = 0.5\) because \(tr({\bar{A}}^{2}) = 2\) and \(tr(\bar{A'}^{2}) = 4\). Since \(\frac{2}{4} \ne \frac{2}{3}\), (Pearcy et al. 2014) (B1) violates Axiom 6.

B6. HyperRec with all arcs as reciprocal set: According to Axiom 6, a hypergraph reciprocity value should equal 2/3 \(\approx\) 0.6667 in Fig. 8. If we let \(\alpha = 1\), then the overall hypergraph-level reciprocity (r(G)) based on HyperRec with all arcs as the reciprocal set (B6) is

$$\begin{aligned}{} & {} r(e_{1}, \{e_{2}, e_{3}\}) = 0.5, \quad r(e_{2}, \{e_{1}, e_{3}\}) = 0.3444, \ \ \text{and} \ \ r(e_{3}, \{e_{1}, e_{2}\}) = 0 \\{} & {} r(G) = \frac{r(e_{1}, \{e_{2}, e_{3}\}) + r(e_{2}, \{e_{1}, e_{3}\}) + r(e_{3}, \{e_{1}, e_{2}\})}{3} \\{} & {} \qquad = \frac{0.5 + 0.3444 + 0}{3} = 0.2815 \ne 0.6667 \end{aligned}$$

which violates Axiom 6.

1.5 Violations of Axiom 8

B6. HyperRec with all the arcs as reciprocal set: Even when there exists the perfect reciprocal opponent of a specific arc, the transition probability cannot be identical to the optimal transition probability if there exists another inversely overlapping arc (see the target arc \(e_{2}\)’s case in Fig. 8).


B7. HyperRec with inversely overlapping arcs as reciprocal set: As in the previous case, if there exist multiple inversely overlapping arcs, all of them are included in the reciprocal set. As a result, for such arcs, the cardinality penalty term gets smaller than 1 (i.e., \((1/|R_{i} \vert )^{\alpha } < 1\)), resulting in \(r(e_{i}, R_{i}) < 1\). Consequently, the overall hypergraph reciprocity becomes smaller than 1.

Appendix 3: Data description

In this section, we provide the sources of the considered datasets and describe how we preprocess them.

1.1 Metabolic datasets

We use two metabolic hypergraphs, iAF1260b and iJO1366, which are provided by Yadati et al. (2020). They are provided in the form of directed hypergraphs, and they do not require any pre-processing. We remove one hyperarc from each dataset since their head set or tail set is abnormally large. Specifically, the size of their head sets is greater than 20, while the second largest one is 8. Each node corresponds to a gene, and each hyperarc indicates a metabolic reaction among them. Specifically, a hyperarc \(e_{i}\) indicates that a reaction among the genes in the tail set \(T_{i}\) results in the genes in the head set \(H_{i}\).

1.2 Email datasets

We use two email hypergraphs, email-enron and email-eu. The Email-enron dataset is provided by Chodrow and Mellor (2020). We consider each email as a single hyperarc. Specifically, the head set is composed of the receiver(s) and cc-ed user(s), and the tail set is composed of the sender. The Email-eu dataset is from SNAP (Leskovec and Krevl 2014). The original dataset is a dynamic graph where each temporal edge from a node u to a node v at time t indicates that u sent an email to v at time t. The edges with the same source node and timestamp are replaced by a hyperarc, where the tail set consists only of the source node and the head set is the set of destination nodes of the edges. Note that every hyperarc in these datasets has a unit tail set, i.e., \(|T_{i} \vert = 1, \forall i = \{1, \ldots , |E \vert \}\).

1.3 Citation datasets

We use two citation hypergraphs, citation-data mining and citation-software, which we create from pairwise citation networks, as suggested by Yadati et al. (2021). Nodes are the authors of publications. Assume that a paper A, which is co-authored by \(\{v_{1}, v_{2}, v_{3}\}\), cited another paper B, which is co-authored by \(\{v_{4}, v_{5}\}\). Then, this citation leads to a hyperarc where the head set is \(\{v_{4}, v_{5}\}\) and the tail set is \(\{v_{1}, v_{2}, v_{3}\}\). As pairwise citation networks, we use subsets of a DBLP citation dataset (Sinha et al. 2015). The subsets consist of papers published in the venues of data mining and software engineering, respectively.Footnote 7 In addition, we filter out all papers co-authored by more than 10 authors to minimize the impact of such outliers.

1.4 Question answering datasets

We use two question answering hypergraphs, qna-math and qna-server. We create directed hypergraphs from the log data of a question answering site, stack exchange, provided at Archive (2022). Among various domains, we choose math-overflow, which covers mathematical questions, and server-fault, which treats server related issues. The original log data contains the posts of the site, and one questioner and one or more answerers are involved with each post. We ignore all posts without any answerer. We treat each user as a node, and we treat each post as a hyperarc. For each hyperarc, the questioner of the corresponding post composes the head set, and the answerer(s) compose the tail set. Note that every hyperarc in these datasets has a unit head set, i.e., 1 \(|H_{i} \vert = 1, \forall i = \{1, \ldots , |E \vert \}\).

1.5 Bitcoin transaction dataset

We use three bitcoin transaction hypergraphs, bitcoin-2014, bitcoin-2015, and bitcoin-2016. The original datasets are provided by Wu et al. (2021), and they contain first 1,500,000 transactions in 11/2014, 06/2015, and 01/2016, respectively. We model each account as a node, and we model each transaction as a hyperarc. As multiple accounts can be involved in a single transaction, the accounts from which the coins are sent compose the tail set, and the accounts to which the coins sent compose the head set. We remove all transactions where the head set and the tail set are exactly the same.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Kim, S., Choe, M., Yoo, J. et al. Reciprocity in directed hypergraphs: measures, findings, and generators. Data Min Knowl Disc 37, 2330–2388 (2023). https://doi.org/10.1007/s10618-023-00955-3

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10618-023-00955-3

Keywords

Navigation