arXiv is now an independent nonprofit! Learn more
License: CC BY-NC-SA 4.0
arXiv:2111.00243v1 [cs.LG] 30 Oct 2021

The CAT SET on the MAT: Cross Attention for Set Matching in Bipartite Hypergraphs

Govind Sharma    Swyam Prakash Singh    V. Susheela Devi    M. Narasimha Murty Affiliation:  Affiliation: {govinds, swyamsingh, susheela, mnm}@iisc.ac.in Affiliation:  Affiliation: Department of Computer Science and Automation Affiliation: Indian Institute of Science, Bangalore Affiliation: Karnataka 560012, India
Abstract

Usual relations between entities could be captured using graphs; but those of a higher-order – more so between two different types of entities (which we term "left" and "right") – calls for a "bipartite hypergraph". For example, given a left set of symptoms and right set of diseases, the relation between a set subset of symptoms (that a patient experiences at a given point of time) and a subset of diseases (that he/she might be diagnosed with) could be well-represented using a bipartite hyperedge. The state-of-the-art in embedding nodes of a hypergraph is based on learning the self-attention structure between node-pairs from a hyperedge. In the present work, given a bipartite hypergraph, we aim at capturing relations between node pairs from the cross-product between the left and right hyperedges, and term it a "cross-attention" (CAT) based model. More precisely, we pose "bipartite hyperedge link prediction" as a set-matching (SETMAT) problem and propose a novel neural network architecture called CATSETMAT for the same. We perform extensive experiments on multiple bipartite hypergraph datasets to show the superior performance of CATSETMAT, which we compare with multiple techniques from the state-of-the-art. Our results also elucidate information flow in self- and cross-attention scenarios.

1 Introduction

Relations between two entities are easily captured by a graph [25, 26], wherein a collection of pairwise edges (either directed or undirected) encapsulates the relational structure (e.g., friendship relations between two people on a social network [32, 1]). Moreover, heterogeneous graphs [31, 37] are used to capture relationship structures between entities of multiple “types” (e.g., a bibliographic network [9] between nodes of type author, paper, venue, etc.). However, when the number of types is restricted to two (say, “left” and “right”), and relations exist only across (and not among) them, we resort to a bipartite graph [20] (e.g., an author-paper bibliography network).

Nevertheless, any such relation captured by a usual network — be it homogeneous, heterogeneous, or bipartite — is strictly restricted to a pair of entities. But relations in nature, more often than not, occur between more than two entities. For example, a co-authorship network (wherein usually, a relation is said to exist between a pair of authors who have co-authored at least one article) is, in fact, a network where possibly more than two authors (all those who have co-authored at least one article) can be connected via a single higher-order relation. A collection of such higher-order relations (hyperedges) is called a hypergraph [8, 6], and is used since using a graph for the job proves to be lossy [47]. Akin to graphs, hypergraphs too have their own heterogeneous versions (those that capture higher-order relations between nodes of different types), which have been used in the literature to capture relations of the type buyer-broker-seller [7], user-location [42], etc.

Figure 1: Example of a symptoms-diseases bipartite hypergraph with left and right node sets being those of symptoms 𝒮\mathcal{S} and diseases 𝒟\mathcal{D}. Higher-order bipartite relations could be interpreted as a single bipartite hyperedge (above) b=ff2𝒮𝒟b=f\cup f^{\prime}\in 2^{\mathcal{S}\cup\mathcal{D}} intersecting the node sets at ff and ff^{\prime}. Such a relation can also be viewed (below) as a set match (f,f)2𝒮×2𝒟(f,f^{\prime})\in 2^{\mathcal{S}}\times 2^{\mathcal{D}} which comes as a result of a set matching between symptoms and diseases.

While much has been done about such heterogeneous hypergraphs in the literature [12, 48], bipartite hypergraphs [49] — hypergraphs wherein each hyperedge is required to have at least one node from each one of two disjoint node-sets “left” and “right” — have seldom been talked about.

An example would be the symptoms-diseases bipartite hypergraph shown in Fig. 1, where given a (left) set 𝒮\mathcal{S} of symptoms and another (right) set 𝒟\mathcal{D} of diseases, every non-trivial diagnosis — one wherein the doctor identifies at least one symptom (i.e., f2𝒮f\in 2^{\mathcal{S}}\setminus\emptyset) in a patient and diagnoses him/her with at least one disease (i.e., f2𝒟f^{\prime}\in 2^{\mathcal{D}}\setminus\emptyset) — forms a bipartite hyperedge fff\cup f^{\prime}, and a collection \mathcal{B} of such hyperedges forms a bipartite hypergraph =(𝒮,𝒟,)\mathcal{H}=(\mathcal{S},\mathcal{D},\mathcal{B}). For the diagnosis ff denotes all the its symptoms and ff^{\prime} denotes all diseases that the patient is suffering from.

Existing models use a self-attention mechanism (Hyper-SAGNN) to predict a heterogeneous hyperedge, but miss the fact that the flow of information has to be across the right and left sets, and not among them individually. In this work we too aim to learn a neural network model for predicting relations, only in a bipartite hypergraph. Going by the symptoms and diseases example in Fig. 1, we need not model the existence of a set of symptoms or a set of diseases, but the existence of a relation between a set of symptoms and a set of diseases.

We repose hyperedge prediction as a set-matching (SETMAT) problem: given two set-of-sets, what pair of sets “match” with each other? In our case, the two sets would be the left and right hyperedges, and we call it a “match” if they are linked by a bipartite hyperedge.

The following is a list of all the contributions we make in this work:

  1. 1.

    This is the very first work on bipartite hypergraphs in machine learning, along with introduction of some novel datasets. Moreover, we introduce the problem of predicting higher-order bipartite relations in networks for the first time.

  2. 2.

    Elucidate the drawback of usual hyperedge embedding techniques for bipartite hyperedges via a alternating positive/negative set pairs based explanation.

  3. 3.

    Pose the above problem as a set-matching prediction problem and show theoretical equivalence of the same.

  4. 4.

    Formulate a cross-attention framework based neural network architecture to deal with the set-matching and hence the bipartite hyperedge prediction problem.

We make our code11 1 https://github.com/govindjsk/catsetmat and all our datasets publicly available online; please refer to Section B.1 for how to access the datasets.

2 Bipartite Hyperedge Prediction

2.1 Bipartite Hypergraphs

Given are two sets of disjoint nodes: left nodes 𝒱\mathcal{V} and right nodes 𝒱\mathcal{V}^{\prime}; a simple bipartite hypergraph is defined as sim=(𝒱,𝒱,)\mathcal{H}_{sim}=(\mathcal{V},\mathcal{V}^{\prime},\mathcal{B}), where 2𝒱𝒱\mathcal{B}\subseteq 2^{\mathcal{V}\cup\mathcal{V}^{\prime}} such that there is at least one node from each node set in the elements of \mathcal{B}. However, we proceed further and define a different kind of bipartite hypergraph: a per-fixed22 2 We call it “per-fixed” and not pre-fixed, since only left and right hyperedges are fixed. one wherein basically we fix the set of left and right hyperedges beforehand. Over the node sets 𝒱\mathcal{V} and 𝒱\mathcal{V}^{\prime}, the set 𝔽:=2𝒱\mathbb{F}:=2^{\mathcal{V}}\setminus\emptyset of potential left hyperedges and the set 𝔽:=2𝒱\mathbb{F}^{\prime}:=2^{\mathcal{V}^{\prime}}\setminus\emptyset of potential right hyperedges could be noted. Once we fix the set of actual left hyperedges to be 𝔽\mathcal{F}\subseteq\mathbb{F} and actual right hyperedges to be 𝔽\mathcal{F}^{\prime}\subseteq\mathbb{F}^{\prime}, we could define the set of potential bipartite hyperedges as:

𝔹(,):={fff,f}.\mathbb{B}(\mathcal{F},\mathcal{F}^{\prime}):=\{f\cup f^{\prime}\mid f\in\mathcal{F},f^{\prime}\in\mathcal{F}^{\prime}\}. (1)
Definition 1 (Per-fixed Bipartite Hypergraph).

A per-fixed bipartite hypergraph is an ordered set =(𝒱,𝒱,,,)\mathcal{H}=(\mathcal{V},\mathcal{V}^{\prime},\mathcal{F},\mathcal{F}^{\prime},\mathcal{B}) of left vertices 𝒱\mathcal{V}, right vertices 𝒱\mathcal{V}^{\prime}, fixed left hyperedges \mathcal{F}, fixed right hyperedges \mathcal{F}^{\prime}, and bipartite hyperedges 𝔹(,)\mathcal{B}\subseteq\mathbb{B}(\mathcal{F},\mathcal{F}^{\prime}). Furthermore, ^:=𝔹(,)\hat{\mathcal{B}}:=\mathbb{B}(\mathcal{F},\mathcal{F}^{\prime})\setminus\mathcal{B} denotes the set of all bipartite non-hyperedges.

A simple bipartite hypergraph is different from a usual (non-bipartite) hypergraph in that it has two disjoint sets of nodes (𝒱,𝒱\mathcal{V},\mathcal{V}^{\prime}) instead of one. On the other hand, a per-fixed bipartite hypergraph is different from the two, since we fix the sets of left and right hyperedges (,\mathcal{F},\mathcal{F}^{\prime}) beforehand, and are thence worried only about connections across them (as defined by \mathcal{B}). An important consequence of these facts is that we need not model the existence of the left or right hyperedges individually, but focus on the cross bipartite relations instead.

Observation 1.

Given a per-fixed bipartite hypergraph =(𝒱,𝒱,,,)\mathcal{H}=(\mathcal{V},\mathcal{V}^{\prime},\mathcal{F},\mathcal{F}^{\prime},\mathcal{B}), the triplet 𝒢:=(,,)\mathcal{G}:=(\mathcal{F},\mathcal{F}^{\prime},\mathcal{B}) forms a bipartite graph over node sets \mathcal{F} and \mathcal{F}^{\prime}. Also, the triplet sim:=(𝒱,𝒱,)\mathcal{H}_{sim}:=(\mathcal{V},\mathcal{V}^{\prime},\mathcal{B}) forms a simple bipartite hypergraph.

Note 1.

Henceforth, unless prefixed with the term “simple”, the phrase “bipartite hypergraph” would refer to a per-fixed bipartite hypergraph as per Definition 1.

2.2 The Bipartite Hyperedge Prediction Problem

In the present work, we have set out to solve the problem of bipartite hyperedge prediction (BHP), which we define as follows:

Definition 2 (Bipartite Hyperedge Prediction (BHP)).

Given =(𝒱,𝒱,,,)\mathcal{H}=(\mathcal{V},\mathcal{V}^{\prime},\mathcal{F},\mathcal{F}^{\prime},\mathcal{B}), learn a BHP predictor φ:𝔹(,)\varphi:\mathbb{B}(\mathcal{F},\mathcal{F}^{\prime})\rightarrow\mathbb{R} such that for f,f^f,\hat{f}\in\mathcal{F} and f,f^f^{\prime},\hat{f}^{\prime}\in\mathcal{F}^{\prime} and disjoint sets 𝒫\mathcal{P}\subseteq\mathcal{B} and 𝒩^\mathcal{N}\subseteq\hat{\mathcal{B}} (see Def. 1) denoting the positive and the negative class respectively, we have:

maxφ𝔹(,)Pr(φ(ff)>φ(f^f^)ff𝒫 and f^f^𝒩)\max_{\varphi\in\mathbb{R}^{\mathbb{B}(\mathcal{F},\mathcal{F}^{\prime})}}Pr(\varphi(f\cup f^{\prime})>\varphi(\hat{f}\cup\hat{f}^{\prime})\mid f\cup f^{\prime}\in\mathcal{P}\text{ and }\hat{f}\cup\hat{f}^{\prime}\in\mathcal{N}) (2)

It is to be noted that Definition 2 considers a per-fixed bipartite hypergraph and one could also define the BHP problem for a simple bipartite hypergraph (let’s call it simple-BHP) as well. The only difference between BHP and simple-BHP would be that while for the former, the set of possible left- and right-hyperedges is fixed even before the problem is defined, for the latter, any possible left- or right-hyperedge could be chosen as arbitrary subset choices from the respective node sets. Nevertheless, the difference shows up only for bipartite non-hyperedges: for simple-BHP, we have 𝔹(𝔽,𝔽)\mathcal{B}\subseteq\mathbb{B}(\mathbb{F},\mathbb{F}^{\prime}) and ^:=𝔹(𝔽,𝔽)\hat{\mathcal{B}}:=\mathbb{B}(\mathbb{F},\mathbb{F}^{\prime})\setminus\mathcal{B}, but for per-fixed BHP (as per Definition 2, the set of observed left hyperedges and right hyperedges are fixed to 𝔽\mathcal{F}\subseteq\mathbb{F} and 𝔽\mathcal{F}^{\prime}\subseteq\mathbb{F}^{\prime} respectively, and then hyperedges and non-hypergedges are defined as 𝔹(,)\mathcal{B}\subseteq\mathbb{B}(\mathcal{F},\mathcal{F}^{\prime}) and ^:=𝔹(,)\hat{\mathcal{B}}:=\mathbb{B}(\mathcal{F},\mathcal{F}^{\prime})\setminus\mathcal{B}. We will see how existing hyperege prediction algorithms apply only to simple-BHP and fail to cater the per-fixed BHP problem.

3 Bipartite Hyperedge Set Matching Prediction (BHSMP)

3.1 Set Matching (SETMAT)

Definition 3 (Set Matching).

Given two sets-of-sets 𝒳\mathcal{X} and 𝒴\mathcal{Y}, a set matching is defined as a relation 𝒳×𝒴\mathcal{M}\subseteq\mathcal{X}\times\mathcal{Y} that matches a set element X𝒳X\in\mathcal{X} to another set element Y𝒴Y\in\mathcal{Y}. Every (X,Y)(X,Y)\in\mathcal{M} is called a set match (or match for short). Naturally, the set ^:=𝒳×𝒴\hat{\mathcal{M}}:=\mathcal{X}\times\mathcal{Y}\setminus\mathcal{M} refers to the corresponding set anti-matching and an element (X^,Y^)^(\hat{X},\hat{Y})\in\hat{\mathcal{M}} is called a set anti-match (or anti-match or non-match for short).

Definition 4 (Set Matching Predicton (SMP)).

Given two sets-of-sets 𝒳\mathcal{X} and 𝒴\mathcal{Y}, and a set matching 𝒳×𝒴\mathcal{M}\subseteq\mathcal{X}\times\mathcal{Y}, the set matching prediction problem learns an SMP predictor μ:𝒳×𝒴\mu:\mathcal{X}\times\mathcal{Y}\rightarrow\mathbb{R} such that for X,X^𝒳X,\hat{X}\in\mathcal{X} and Y,Y^𝒴Y,\hat{Y}\in\mathcal{Y}, we have:

(X,Y) and (X^,Y^)^μ(X,Y)μ(X^,Y^).(X,Y)\in\mathcal{M}\text{ and }(\hat{X},\hat{Y})\in\hat{\mathcal{M}}\implies\mu(X,Y)\geq\mu(\hat{X},\hat{Y}). (3)
Lemma 1.

Every bipartite hypergraph is a set-matching over its left and right hyperedges.33 3 Proof in Appendix A.1.

3.2 BHP as SMP

Lemma 2.

The BHP problem for a bipartite hypergraph can be solved by an SMP predictor for its equivalent set-matching.44 4 Proof in Appendix A.2.

The foregoing lemma states an important result: that we could solve the BHP problem using SMP. Since we have an equivalent set matching for a given hypergraph, and that we could solve the BHCP problem using SMP, let us define a new problem called the Bipartite Hyperedge Set Matching Prediction (BHSMP) problem as follows:

Definition 5 (Bipartite Hyperedge Set Matching Prediction (BHSMP)).

Given a bipartite hypergraph =(𝒱,𝒱,,,)\mathcal{H}=(\mathcal{V},\mathcal{V}^{\prime},\mathcal{F},\mathcal{F}^{\prime},\mathcal{B}), a BHSMP predictor is simply defined as an SMP predictor for the equivalent set matching.

4 The Cross Attention (CAT) Framework

4.1 The Problem with usual Self-Attention

Currently, the best known model to predict hyperedges is that of Hyper-SAGNN [45] (Figure 2), which uses (1) a self-attention framework to model information flow between nodes of a hyperedge, and (2) a static-vs-dynamic comparative technique to learn hyperedge formation. But the main reason why it does not deem fit for the bipartite hyperedge scenario is that it captures information flow between all the nodes of a usual (non-bipartite) hyperedge. And for a per-fixed bipartite hypergraph, the difference is subtler: “pay heed to the cross-connections, not the self-connections.” In other words, one need not model the occurrence of individual left and right hyperedges, and instead focus on the connection between them. That is, we need not predict left and right hyperedges individually, but only predict the connections between them, since the former is already fixed to be \mathcal{F} and \mathcal{F}^{\prime}. For the symptoms-diseases case, the reason why Hyper-SAGNN does not apply to the BHP prediction problem is that we are interested in modeling/predicting new diagnoses involving observed symptom-sets and disease-sets. Paying simultaneous attention to symptoms, diseases and their connections (diagnoses) leads to a learning process that oscillates between the positive and negative classes. More about this would be discussed in Section 8.3.

4.2 Usual Hyper-SAGNN based Self-Attention

Refer to caption
Figure 2: The Hyper-SAGNN architecture from Zhang, et al. [45]. The vectors x1,x2,,xk\vec{x}_{1},\vec{x}_{2},\ldots,\vec{x}_{k} denote kk nodes from a (non-bipartite) hyperedge. We extend this idea to three architectures for bipartite hypergraphs (Figure 3).

Let us see what effect applying Hyper-SAGNN has on a bipartite hyperedge. Consider a bipartite hypergraph =(𝒱,𝒱,,,)\mathcal{H}=(\mathcal{V},\mathcal{V}^{\prime},\mathcal{F},\mathcal{F}^{\prime},\mathcal{B}). Now, let us take two sets f:={u1,u2,,uk}𝒱f:=\{u_{1},u_{2},\ldots,u_{k}\}\subseteq\mathcal{V} and f:={u1,u2,,uk}𝒱f^{\prime}:=\{u^{\prime}_{1},u^{\prime}_{2},\ldots,u^{\prime}_{k^{\prime}}\}\subseteq\mathcal{V}^{\prime} that are “observed” to be hyperedges. Also given are the embeddings of each node: 𝐱i,𝐱id\mathbf{x}_{i},\mathbf{x}^{\prime}_{i^{\prime}}\in\mathbb{R}^{d} for nodes uiu_{i} and uiu^{\prime}_{i^{\prime}} respectively (1ik1\leq i\leq k, 1ik1\leq i^{\prime}\leq k^{\prime}). If 𝐖Q,𝐖Kd×dK\mathbf{W}_{Q},\mathbf{W}_{K}\in\mathbb{R}^{d\times d_{K}}, and 𝐖Vd×dV\mathbf{W}_{V}\in\mathbb{R}^{d\times d_{V}} denote weight matrices for the self-attention framework of Hyper-SAGNN, we have for the potential (k+k)(k+k^{\prime})-sized hyperedge ff={u1,u2,,uk,u1,u2,,uk}f\cup f^{\prime}=\{u_{1},u_{2},\ldots,u_{k},u^{\prime}_{1},u^{\prime}_{2},\ldots,u^{\prime}_{k^{\prime}}\},

aij=\displaystyle a_{ij}= (𝐖QT𝐱i)T(𝐖KT𝐱j),andaij=(𝐖QT𝐱i)T(𝐖KT𝐱j),\displaystyle(\mathbf{W}^{T}_{Q}\mathbf{x}_{i})^{T}(\mathbf{W}^{T}_{K}\mathbf{x}_{j}),~\text{and}~a^{\prime}_{i^{\prime}j^{\prime}}=(\mathbf{W}^{T}_{Q}\mathbf{x}^{\prime}_{i^{\prime}})^{T}(\mathbf{W}^{T}_{K}\mathbf{x}^{\prime}_{j^{\prime}}), (𝒱\mathcal{V} to 𝒱\mathcal{V} and 𝒱\mathcal{V}^{\prime} to 𝒱\mathcal{V}^{\prime}) (4)
bij=\displaystyle b_{ij^{\prime}}= (𝐖QT𝐱i)T(𝐖KT𝐱j),andcij=(𝐖QT𝐱i)T(𝐖KT𝐱j)\displaystyle(\mathbf{W}^{T}_{Q}\mathbf{x}_{i})^{T}(\mathbf{W}^{T}_{K}\mathbf{x}^{\prime}_{j^{\prime}}),~\text{and}~c_{i^{\prime}j}=(\mathbf{W}^{T}_{Q}\mathbf{x}^{\prime}_{i^{\prime}})^{T}(\mathbf{W}^{T}_{K}\mathbf{x}_{j}) (𝒱\mathcal{V} to 𝒱\mathcal{V}^{\prime} and 𝒱\mathcal{V}^{\prime} to 𝒱\mathcal{V}) (5)

where 1i,jk1\leq i,j\leq k and 1i,jk1\leq i^{\prime},j^{\prime}\leq k^{\prime}. These values are then normalized using the softmax function as follows:

αij=exp(aij)zi,αij=exp(aij)zi,βij=exp(bij)zi,γij=exp(cij)zi,\alpha_{ij}=\frac{\exp(a_{ij})}{z_{i}},~\alpha^{\prime}_{i^{\prime}j^{\prime}}=\frac{\exp(a^{\prime}_{i^{\prime}j^{\prime}})}{z^{\prime}_{i^{\prime}}},~\beta_{ij^{\prime}}=\frac{\exp(b_{ij^{\prime}})}{z_{i}},~\gamma_{i^{\prime}j}=\frac{\exp(c_{i^{\prime}j})}{z^{\prime}_{i^{\prime}}}, (6)

where zi:=(t=1kexp(ait)+t=1kexp(bit))z_{i}:=\left(\displaystyle\sum_{t=1}^{k}{\exp(a_{it})}+\sum_{t=1}^{k^{\prime}}{\exp(b_{it})}\right) and zi:=(t=1kexp(ait)+t=1kexp(cit))z^{\prime}_{i^{\prime}}:=\left(\displaystyle\sum_{t=1}^{k^{\prime}}{\exp(a^{\prime}_{i^{\prime}t})}+\sum_{t=1}^{k}{\exp(c_{i^{\prime}t})}\right).

The dynamic embeddings of the hyperedge nodes would then be:

𝐝i:=\displaystyle\mathbf{d}_{i}:= tanh(l=1kαit𝐖VT𝐱t+l=1kαit𝐖VT𝐱t),\displaystyle\tanh\left(\sum_{l=1}^{k}{\alpha_{it}\mathbf{W}_{V}^{T}\mathbf{x}_{t}}+\sum_{l=1}^{k^{\prime}}{\alpha^{\prime}_{it}\mathbf{W}_{V}^{T}\mathbf{x}^{\prime}_{t}}\right), (7)
𝐝i:=\displaystyle\mathbf{d}^{\prime}_{i^{\prime}}:= tanh(t=1kβit𝐖VT𝐱t+t=1kβit𝐖VT𝐱t)\displaystyle\tanh\left(\sum_{t=1}^{k}{\beta_{i^{\prime}t}\mathbf{W}_{V}^{T}\mathbf{x}_{t}}+\sum_{t=1}^{k^{\prime}}{\beta^{\prime}_{i^{\prime}t}\mathbf{W}_{V}^{T}\mathbf{x}^{\prime}_{t}}\right) (8)

4.3 Cross-Attention for Bipartite Hypergraphs

Going by the cross-attention paradigm, we introduce three extra attention parameters, amounting to parameters 𝐖Q,𝐖K,𝐖Q,𝐖Kd×dK\mathbf{W}_{Q},\mathbf{W}_{K},\mathbf{W}^{\prime}_{Q},\mathbf{W}^{\prime}_{K}\in\mathbb{R}^{d\times d_{K}} and 𝐖V,𝐖Vd×dV\mathbf{W}_{V},\mathbf{W}^{\prime}_{V}\in\mathbb{R}^{d\times d_{V}}. We redefine bb, cc, β\beta, and γ\gamma for 1ik1\leq i\leq k and 1ik1\leq i^{\prime}\leq k^{\prime} as follows:

bii=\displaystyle b_{ii^{\prime}}= (𝐖QT𝐱i)T(𝐖KT𝐱i),andβii=exp(bii)/t=1kexp(bit),\displaystyle(\mathbf{W}^{T}_{Q}\mathbf{x}_{i})^{T}(\mathbf{W}^{\prime T}_{K}\mathbf{x}^{\prime}_{i^{\prime}}),~\text{and}~\beta_{ii^{\prime}}={\exp(b_{ii^{\prime}})}\left/{\displaystyle\sum_{t=1}^{k^{\prime}}{\exp(b_{it})}}\right., (9)
cii=\displaystyle c_{i^{\prime}i}= (𝐖QT𝐱i)T(𝐖KT𝐱i),andγii=exp(cii)/t=1kexp(cit).\displaystyle(\mathbf{W}^{\prime T}_{Q}\mathbf{x}^{\prime}_{i^{\prime}})^{T}(\mathbf{W}^{T}_{K}\mathbf{x}_{i}),~\text{and}~\gamma_{i^{\prime}i}={\exp(c_{i^{\prime}i})}\left/{\displaystyle\sum_{t=1}^{k}{\exp(c_{i^{\prime}t})}}\right.. (10)

Now, the cross-attention dynamic embedding of the left and right hyperedge nodes would then be:

𝜹i:=tanh(t=1kβit𝐖VT𝐱t),𝜹i:=tanh(t=1kγit𝐖VT𝐱t).\bm{\delta}_{i}:=\tanh\left(\sum_{t=1}^{k^{\prime}}{\beta_{it}\mathbf{W}_{V}^{\prime T}\mathbf{x}^{\prime}_{t}}\right),\bm{\delta}^{\prime}_{i^{\prime}}:=\tanh\left(\sum_{t=1}^{k}{\gamma_{i^{\prime}t}\mathbf{W}_{V}^{T}\mathbf{x}_{t}}\right). (11)

Finally, we have new embeddings 𝜹1,𝜹2,,𝜹k\bm{\delta}_{1},\bm{\delta}_{2},\ldots,\bm{\delta}_{k} of left nodes and 𝜹1,𝜹2,,𝜹k\bm{\delta}^{\prime}_{1},\bm{\delta}^{\prime}_{2},\ldots,\bm{\delta}^{\prime}_{k^{\prime}} of right nodes, all dVd_{V}-dimensional vectors.

5 The CATSETMAT Architecture

(a) CATSETMAT-X

(b) CATSETMAT-SX

(c) CATSETMAT-SXS
Figure 3: Neural network architectures of the three variants of the CATSETMAT algorithm that we propose. (a) Only one cross-attention layer (X). (b) An additional pair of self-attention layers (S) before cross-attention (SX). (c) Another additional pair of self-attention layers after cross-attention (SXS).

Akin to Hyper-SAGNN (Figure 2), we define a neural network architecture called CATSETMAT (Cross ATtention for SET MATching) that has both self- as well as cross-attention layers. CATSETMAT uses structures defined in Section 4.3 that are derived from the self-attention layers in Hyper-SAGNN. A detailed network architecture is depicted in Figure 3, with three of its variants: one with no self-attention, and the others with one and two extra pairs of the same. And as explained before, we use the architecture to solve the set matching prediction (SMP) problem which in turn solves the bipartite hyperedge prediction (BHP) problem – a problem we had termed bipartite hyperedge set matching prediction (BHSMP).

Basically, it commences with the vector representations of two sets of hyperedges – one left ({𝐱1,𝐱2,,𝐱k}\{\mathbf{x}_{1},\mathbf{x}_{2},\ldots,\mathbf{x}_{k}\}), and the other right ({𝐱1,𝐱2,,𝐱k}\{\mathbf{x}^{\prime}_{1},\mathbf{x}^{\prime}_{2},\ldots,\mathbf{x}^{\prime}_{k^{\prime}}\}). These inputs are fed into two Hyper-SAGNN-like self-attention (SAT) blocks SAT and SAT separately, which have their respective parameter sets 𝐖Q(SAT),𝐖K(SAT),𝐖V(SAT)\mathbf{W}^{(\textsl{{SAT}})}_{Q},\mathbf{W}^{(\textsl{{SAT}})}_{K},\mathbf{W}^{(\textsl{{SAT}})}_{V} and 𝐖Q(SAT),𝐖K(SAT),𝐖V(SAT)\mathbf{W}^{(\textsl{{SAT}${}^{\prime}$})}_{Q},\mathbf{W}^{(\textsl{{SAT}${}^{\prime}$})}_{K},\mathbf{W}^{(\textsl{{SAT}${}^{\prime}$})}_{V}). The SAT-blocks give out revised embeddings 𝐲1,𝐲2,,𝐲k\mathbf{y}_{1},\mathbf{y}_{2},\ldots,\mathbf{y}_{k} and 𝐲1,𝐲2,,𝐲k\mathbf{y}^{\prime}_{1},\mathbf{y}^{\prime}_{2},\ldots,\mathbf{y}^{\prime}_{k^{\prime}}. Although this applies one round of attention to each of the left and right hyperedges, no information about the cross-connections between them have been learned by our model.

Here is where the cross-attention (CAT) block – CAT – comes into picture, not-to-mention, with its own set of parameters 𝐖Q(CAT)\mathbf{W}^{(\textsl{{CAT}})}_{Q}, 𝐖K(CAT)\mathbf{W}^{(\textsl{{CAT}})}_{K}, 𝐖V(CAT)\mathbf{W}^{(\textsl{{CAT}})}_{V}, 𝐖Q(CAT)\mathbf{W}^{\prime(\textsl{{CAT}})}_{Q}, 𝐖K(CAT)\mathbf{W}^{\prime(\textsl{{CAT}})}_{K}, 𝐖V(CAT)\mathbf{W}^{\prime(\textsl{{CAT}})}_{V}. The CAT block takes the revised embeddings through equations 911 and returns fresh embedding vectors 𝜹1,𝜹2,,𝜹k\bm{\delta}_{1},\bm{\delta}_{2},\ldots,\bm{\delta}_{k} and 𝜹1,𝜹2,,𝜹k\bm{\delta}^{\prime}_{1},\bm{\delta}^{\prime}_{2},\ldots,\bm{\delta}^{\prime}_{k^{\prime}} – vectors we call dynamic embeddings, just as Zhang, et al. [45] do for Hyper-SAGNN. In parallel is a layer of static-weights 𝐖s,𝐖sd×ds\mathbf{W}_{s},\mathbf{W}^{\prime}_{s}\in\mathbb{R}^{d\times d_{s}} that simply transforms the original left vectors 𝐱i\mathbf{x}_{i} and right vectors 𝐱i\mathbf{x}^{\prime}_{i^{\prime}} into static embeddings 𝐬1,𝐬2,,𝐬k\mathbf{s}_{1},\mathbf{s}_{2},\ldots,\mathbf{s}_{k} and 𝐬1,𝐬2,,𝐬k\mathbf{s}^{\prime}_{1},\mathbf{s}^{\prime}_{2},\ldots,\mathbf{s}^{\prime}_{k^{\prime}} defined by 𝐬i:=tanh(𝐖sT𝐱i)\mathbf{s}_{i}:=\tanh\left(\mathbf{W}_{s}^{T}\mathbf{x}_{i}\right) and 𝐬i:=tanh(𝐖sT𝐱i)\mathbf{s}^{\prime}_{i^{\prime}}:=\tanh\left(\mathbf{W}^{\prime T}_{s}\mathbf{x}^{\prime}_{i^{\prime}}\right) respectively, where 1ik1\leq i\leq k and 1ik1\leq i^{\prime}\leq k^{\prime}. Following Zhang et al. [45], we compare the static and dynamic embeddings using the Hadamard square operator, resulting in vectors Δ1,Δ2,,Δk\Delta_{1},\Delta_{2},\ldots,\Delta_{k} and Δ1,Δ2,,Δk\Delta^{\prime}_{1},\Delta^{\prime}_{2},\ldots,\Delta^{\prime}_{k^{\prime}} defined as Δi:=(𝜹i𝐬i)2\Delta_{i}:=(\bm{\delta}_{i}-\mathbf{s}_{i})^{\circ 2} and Δi:=(𝜹i𝐬i)2\Delta^{\prime}_{i^{\prime}}:=(\bm{\delta}^{\prime}_{i^{\prime}}-\mathbf{s}^{\prime}_{i^{\prime}})^{\circ 2}. Finally, two positional feed-forward layers [45] FFkkFF_{k\rightarrow k} and FFkkFF_{k^{\prime}\rightarrow k^{\prime}} followed by a consolidating layer FF(k+k1)FF_{(k+k^{\prime}\rightarrow 1)} computes the probability pp that the set of nodes match or not.

5.1 Variants of CATSETMAT

We use altogether three variants of CATSETMAT: CATSETMAT-X (only CAT), CATSETMAT-SX (a pair of SAT followed by a CAT), and CATSETMAT-SXS (CATSETMAT-SX with another pair of SAT modules following CAT). Architecture diagrams for all the three variants have been shown in Figure 3.

6 Related Work

As far as usual hypergraphs are concerned, they have not been studied as much as graphs (some earlier works are are [47, 22, 7]). Of some recent approaches [5, 33, 44, 3, 10, 17, 18, 28, 41, 40, 4, 45] for hyperedge prediction and hypergraph embedding, the most recent one, viz., Hyper-SAGNN [45] performs the best. It uses a self-attention based model wherein each hyperedge is handled separately. Our approach is strongly based on theirs, and the whole concept of cross-attention (and a combination thereof with self-attention) extends their framework to set matching as well.

It is to be noted that left and right hyperedges in a bipartite hypergraph are basically sets of nodes; hence machine learning techniques to handle sets become relevant here. Deep set embedding calls for permutation-invariant neural networks, and there has been a considerable amount of work on this topic [35, 43, 36, 21, 46, 24, 38], of which we use FSPool [46], a sort-pooling based technique, as one of our baselines. Moreover, deep set-to-set matching has been performed on image data [29], but it does not apply to our problem since it uses a single universal set, as opposed to two disjoint ones in the case of a bipartite hypergraph.

Bipartite networks are so essential that Guillaume et al. [13] have argued for an underlying bipartite structure in all networks. Of late, neural network techniques for usual graphs have become widely recognized [11, 19, 14, 34] (ref. Wu et al. [39] for a survey). But the same is not true for deep bipartite networks. The CATSETMAT architecture we propose inherits attention from GAT [34] and weakly relates to BGNN [15]. Furthermore, to the best of our knowledge, there is no work that explores a bipartite hypergraph from the perspective of network science, and all of them [49, 2, 16] belong to the domain of discrete mathematics.

Table 1: The list of bipartite hypergraph datasets used in this work, along with their vital statistics: # left nodes |𝒱||\mathcal{V}|, # right nodes |𝒱||\mathcal{V}^{\prime}|, # left hyperedges |||\mathcal{F}|, # right hyperedges |||\mathcal{F}^{\prime}|, and # bipartite hyperedges |||\mathcal{B}|.
Dataset Left nodes (𝒱\mathcal{V}) Right nodes (𝒱\mathcal{V}^{\prime}) |𝒱||\mathcal{V}| |𝒱||\mathcal{V}^{\prime}| |||\mathcal{B}| |||\mathcal{F}| |||\mathcal{F}^{\prime}|
tmdb-cc Cast (actors) Crew (other members) 4,556 3,802 2,825 2,824 2,744
tmdb-ck Cast (actors) Plot keywords 3,156 1,256 2,669 2,656 2,621
mag-acm-ak Authors Keywords 1,059 2,338 1,388 847 1,379

Refer to caption

(a) mag-acm-ak

Refer to caption

(b) tmdb-cc

Refer to caption

(c) tmdb-ck
Figure 4: Size distributions of the left and right hyperedges in the bipartite hypergraph for the threedatasets. On X-axis is the size of the left hyperedges, and on Y-axis, that of right hyperedges.

7 Experiments

We perform bipartite hyperedge prediction experiments on some real-world datasets. Apart from the baselines described in Section 7.1, we use three versions of CATSETMAT: CATSETMAT-X (only CAT), CATSETMAT-SX (a pair of SAT followed by a CAT), and CATSETMAT-SXS (CATSETMAT-SX with another pair of SAT modules following CAT). Refer Table 1 for details about datasets and Figure 4 for distribution of bipartite hyperedge sizes therein. Details about data preparation and other reproducibility details could be found in Appendix B.

7.1 Baselines

As discussed in Section 6, we prepare four classes of baselines: node2vec-based, bipartite-graph-based, set-embedding-based and hyperedge-prediction-based, each of which has been described below.

  1. 1.

    node2vec-based:
    n2v-cross-mean, n2v-full-mean, n2v-cross-min, n2v-full-min. More details could be found in Appendix B.3.1.

  2. 2.

    Bipartite-graph-based: Since our hypergraph could be interpreted as a bipartite “graph” (Observation 1), we prepare some baselines on bipartite versions of two popular link prediction algorithms [23]: Common Neighbor (CN) [26] and Adamic Adar (AA) [1]. Please refer to Appendix B.3.2 for more details on how these features are computed for a bipartite hypergraph.

  3. 3.

    Set-embedding-based (FSPool): For this, we first convert the node embeddings obtained from node2vec [11] (with dimension 1616, since it showed best results) of each of the left and right hyperedges into set-embeddings using FSPool [46], and then learn a simple classifier.

  4. 4.

    Hyperedge-prediction-based (Hyper-SAGNN): We use the existing best performing algorithm Hyper-SAGNN [45] for hyperedge prediction, wherein we interpret our bipartite hypergraph as a usual one as per Observation 1. We use the same experiment settings as Zhang et al. [45] and their architecture as shown in Figure 2.

8 Results and Discussion

Table 2: Results (%AUC) for the bipartite hyperedge prediction problem
Algorithm tmdb-cc tmdb-ck mag-acm-ak
bipartite-AA-min 43.9987±0.978743.9987\pm 0.9787 37.6217±1.268637.6217\pm 1.2686 49.9388±1.191349.9388\pm 1.1913
bipartite-CN-min 43.8015±0.961343.8015\pm 0.9613 37.5078±1.258937.5078\pm 1.2589 49.8958±1.174349.8958\pm 1.1743
bipartite-AA-max 53.0463±0.458153.0463\pm 0.4581 49.4547±0.588749.4547\pm 0.5887 63.5835±0.531463.5835\pm 0.5314
bipartite-CN-max 52.5955±0.497152.5955\pm 0.4971 49.3627±0.569749.3627\pm 0.5697 62.0365±0.609962.0365\pm 0.6099
bipartite-AA-avg 54.6746±0.904254.6746\pm 0.9042 46.9037±0.763046.9037\pm 0.7630 64.5778±1.6425\mathit{64.5778\pm 1.6425}
bipartite-CN-avg 54.0634±0.938854.0634\pm 0.9388 46.7163±0.749846.7163\pm 0.7498 63.3550±1.734063.3550\pm 1.7340
n2v-cross-mean 77.4467±1.183877.4467\pm 1.1838 63.5867±0.4989\mathit{63.5867\pm 0.4989} 59.2567±2.026659.2567\pm 2.0266
n2v-full-mean 77.6833±1.5083\mathit{77.6833\pm 1.5083} 62.8900±0.160662.8900\pm 0.1606 59.0933±2.225759.0933\pm 2.2257
n2v-cross-min 52.4433±1.532052.4433\pm 1.5320 51.9333±1.277751.9333\pm 1.2777 32.8867±1.158532.8867\pm 1.1585
n2v-full-min 53.9433±1.040453.9433\pm 1.0404 52.8267±1.152152.8267\pm 1.1521 31.7933±1.637631.7933\pm 1.6376
FSPool 63.8305±0.831563.8305\pm 0.8315 50.2596±1.365350.2596\pm 1.3653 63.4810±1.643863.4810\pm 1.6438
Hyper-SAGNN 55.6071±2.978455.6071\pm 2.9784 47.0969±1.349747.0969\pm 1.3497 63.0752±13.019763.0752\pm 13.0197
CATSETMAT-X 83.2761±2.231583.2761\pm 2.2315 74.6650±2.152574.6650\pm 2.1525 67.6457±3.012967.6457\pm 3.0129
CATSETMAT-SX 86.5461±3.393786.5461\pm 3.3937 84.0697±0.9814\mathbf{84.0697\pm 0.9814} 76.6221±0.9676\mathbf{76.6221\pm 0.9676}
CATSETMAT-SXS 88.2177±0.8268\mathbf{88.2177\pm 0.8268} 81.9037±2.334881.9037\pm 2.3348 75.6302±3.083375.6302\pm 3.0833

The results for hyperedge prediction on a few datasets have been listed in Table 2, where each baseline class (see Section 7.1) has been separated by a horizontal line. For each algorithm, and each dataset, we report the %AUC test scores for the SMBHP problem (see Definition 5). In each case, we see that our algorithm CATSETMAT performs the best unanimously. More observations are described in the following sections (Sections 8.18.2). An explanation of the poor performance of some state-of-the-art algorithms has been provided in Section 8.3.

8.1 Baselines

Although bipartite link prediction algorithms (bipartite-AA-minbipartite-CN-avg) perform poorly with AUCs ranging from 434355%55\% and 373750%50\% for the first two datasets, for mag-acm-ak, some of them perform considerably better with AUCs going up to 64.5%64.5\% as well. These algorithms heavily depend on the interconnectivity between the left and right hyperedges, and it seems to be the best in the mag-acm-ak dataset. The next set of algorithms – the four node2vec-based ones – perform much better than the foregoing group, but still lag behind CATSETMAT by huge margins. Surprisingly, the bipartite graph based algorithms outperform the node2vec ones for the last dataset. This only shows that performances vary dramatically from dataset to dataset.

The next two algorithms – FSPool and Hyper-SAGNN, though being cutting-edge deep learning approaches in their respective fields (viz., set and hyperedge embeddings respectively), fail to capture the desired bipartite hypergraph structure. The main reason for this, as has been explained in Section 8.3, is that they struggle to learn a consistent representation of nodes since the same set of nodes get involved in bipartite hyperedges (positive class) as well as bipartite non-hyperedges (negative class) simultaneously. Moreover, Hyper-SAGNN also shows quite a high amount of deviation (13%13\%; as per Table 2), which is undesirable of any machine learning algorithm. But this only shows the huge dependence of Hyper-SAGNN on the data preparation process (i.e., negative-sampling and train-test split) that we perform five times. More about this has been discussed in Section 8.3, where we use the learning curves (Figures 5 and 6) to compare FSPool’s and Hyper-SAGNN’s respective behaviour w.r.t. CATSETMAT.

Refer to caption

(a) tmdb-cc

Refer to caption

(b) tmdb-ck

Refer to caption

(c) mag-acm-ak
Figure 5: AUC learning curves for FSPool on all datasets.

Refer to caption

(a) tmdb-cc

Refer to caption

(b) tmdb-ck

Refer to caption

(c) mag-acm-ak
Figure 6: AUC learning curves for Hyper-SAGNN (the “sum” variant from [45]) on each dataset.

8.2 CATSETMAT

Finally, the last three algorithms – the ones we have proposed as part of this work – are the best performing ones among the lot. For tmdb-cc, we see that our best method is 13.56%13.56\% better than the group-wise next best (i.e., n2v-full-mean), which has an AUC of only 77.68%77.68\%. Another of our methods (CATSETMAT-SXS) performs the best for tmdb-ck, with a much higher improvement of 33.06%33.06\% as compared to n2v-cross-mean, the group-wise next best. For both these datasets, we obtain quite high AUC values of around 848488%88\%, but the same is not true for mag-acm-ak, for which the best performance is limited to 76.62%76.62\%, albeit given by our algorithm CATSETMAT-SX. Although this is a much lower score as compared to the other two datasets, but it is 18.65%18.65\% higher than bipartite-AA-avg, which is the best performing baseline. Barring our algorithms CATSETMAT-X, CATSETMAT-SX, and CATSETMAT-SXS, no other algorithm consistently performs well on all the three datasets. While at least one dataset deemed problematic for each of the baselines, these three algorithms remained consistent for all datasets. Moreover, no baseline touched the 80%80\% AUC mark except the CATSETMAT-based algorithms. We credit this success to the cross-attention paradigm, which focuses on the cross-links more than on the left and right hyperedges, thereby avoiding the positive-negative dilemma as explained in Section 8.3, where we make use of Figure 7 to explain the better performance of our algorithm.

Refer to caption

(a) tmdb-cc

Refer to caption

(b) tmdb-ck

Refer to caption

(c) mag-acm-ak
Figure 7: Comparison of AUC learning curves for all variants of CATSETMAT on all datasets.

Although the CAT module (see Figure 3) is our main contribution in this work, adding more SAT layers is expected to model the individual left- and right-hyperedges as well, since it might capture some inner domain-specific relational structure in each of them. We can clearly see this effect being illustrated in Table 2, wherein adding only one pair of SAT modules before CAT (in CATSETMAT-SX) boosts the performances of a purely CAT-based algorithm CATSETMAT-X by upto 3.92%3.92\%, 12.59%12.59\%, and 13.27%13.27\% for the three datasets respectively. While the addition of another pair of SAT modules (CATSETMAT-SXS) shows the potential of improving the AUC performance by an additional 1.93%1.93\% for tmdb-cc, but same is not true for the tmdb-ck and mag-acm-ak, where the performance instead drops by 2.57%2.57\% and 1.31%1.31\% respectively. This effect could be attributed to over-fitting due to an increase in model parameters. As a result of this, we conclude that addition of more number of SAT modules would not further boost the performance, and so, it should be limited to a single pair of SAT modules before CAT, as done in CATSETMAT-SX. The difference is also clear from the learning curves in Figure 7, where the relative epoch-by-epoch performance of each variant could be observed.

8.3 The Positive-Negative Dilemma

It is clear that our algorithm works well, and hence the baselines fail to capture the “bipartiteness” for hyperlink prediction. Figures 56, and 7 depict the AUC learning curves for FSPool, Hyper-SAGNN, and CATSETMAT respectively on the three datasets. We could see that unlike CATSETMAT, the baselines FSPool and Hyper-SAGNN do not seem to converge, and keep oscillating around an AUC of 50%.

We reason for this behavior as follows. A careful look at the definition of a per-fixed bipartite hypergraph (Definition 1) would reveal a straightforward yet important fact: that left and right sets of hyperedges are fixed in advance. What makes this factor interesting is another definition: that of bipartite non-hyperedges (again, Definition 1) or the negative class, which ensures that each negative sample would be formed from the same fixed left and right hyperedges that formed samples from the positive class. What is striking to observe is that there is nothing that stops a left hyperedge ff that involves in forming a positive sample from getting involved in forming a negative sample as well. The same could also be said for a right hyperedge ff^{\prime}. As a result, we observe that the positive and the negative samples are built from mostly (if not entirely) the same left and right hyperedges.

When an algorithm that treats the entire hyperedge fff\cup f^{\prime} as a whole is deployed to embed it, it keeps getting confused, as to how to train the parameters to account for both classes simultaneously. Thus, it does not settle for a stable output for both ff as well as ff^{\prime}, owing to ff and ff^{\prime}’s simultaneous association with both the classes. This is what algorithms like Hyper-SAGNN and FSPool suffer from, when it comes to a per-fixed bipartite hypergraph.

8.4 An Additional Experiment to Understand the Positive-Negative Dilemma

The attention parameters 𝐖Q\mathbf{W}_{Q}, 𝐖K\mathbf{W}_{K}, and 𝐖V\mathbf{W}_{V} that the Hyper-SAGNN formulation uses keep getting modified as per the positive and negative class labels, and since in our case, the bipartite hyperedges and bipartite non-hyperedges both use the same set of left and right hyperedges (owing to them being fixed), we perform an experiment that undoes this effect. For this, we change our negative sampling method to a “sized-random” [27] technique and use the following, we essentially change the “per-fixed” hypergraph (from Definition 1) to a “simple” hypergraph.

The exact procedure is as follows: Given a hypergraph =(𝒱,𝒱,,,)\mathcal{H}=(\mathcal{V},\mathcal{V}^{\prime},\mathcal{F},\mathcal{F}^{\prime},\mathcal{B}):

Refer to caption

(a) mag-acm-ak (non-per-fixed)

Refer to caption

(b) tmdb-cc (non-per-fixed)
Figure 8: AUC learning curves for Hyper-SAGNN with sized-random negative sampling [27] on non-per-fixed variants of two of our datasets (refer to Section 8.4 for the exact procedure).
  1. 1.

    Initialize ^={}\hat{\mathcal{B}}=\{\}, the set of bipartite non-hyperedges.

  2. 2.

    Pick a hyperedge b=ffb=f\cup f^{\prime}\in\mathcal{B}

  3. 3.

    Pick a random set f^𝒱\hat{f}\subseteq\mathcal{V} of left nodes such that |f^|=|f||\hat{f}|=|f|, and a random set f^𝒱\hat{f}^{\prime}\subseteq\mathcal{V} of right nodes such that |f^|=|f||\hat{f}^{\prime}|=|f^{\prime}|. Define b^:=f^f^\hat{b}:=\hat{f}\cup\hat{f}^{\prime}.

  4. 4.

    If b^^\hat{b}\in\mathcal{B}\cup\hat{\mathcal{B}}, repeat Step 3. Else, add the new bipartite non-hyperedge bb to ^\hat{\mathcal{B}}.

  5. 5.

    Repeat steps 2–4 until |^|=5|||\hat{\mathcal{B}}|=5\cdot|\mathcal{B}|.

Performing Hyper-SAGNN on this simpler hypergraph, surprisingly enough, makes the result totally different! Hyper-SAGNN now reports a test AUC of a whopping 98%98\% (see Figure 8) on mag-acm-ak, a dataset that was the toughest to handle as per Table 2. It is also advisable to see how well the learning curve boosts-up with this version of the data. It is clear from the foregoing arguments that there exists a positive-negative dilemma in usual hyperedge embedding approaches as far as bipartite hypergraphs are concerned. The unusually higher variance of 13%13\% observed in Table 2 for Hyper-SAGNN on mag-acm-ak could be easily attributed to this dilemma.

9 Conclusion and Future Work

A bipartite hypergraph is a peculiar data structure almost never studied in network analysis. We formalize almost all notions of this structure with standard notations used for graphs and usual hypergraphs, and introduce the bipartite hyperedge prediction problem. However, since we were able to establish an equivalence between this problem and set-matching, we could propose a solution for the latter and use it for the former. We could successfully posit that focusing on cross-attention plays a significant role in capturing bipartite relations well. An important insight that we were able establish was the existence of a positive-negative dilemma in existing cutting-edge algorithms like Hyper-SAGNN designed for the very job of hyperedge prediction.

The behavior of bipartite hypergraphs is close to unknown among researchers. We try to shed some light on one aspect of their application on a problem having real-world implications – the hyperedge prediction problem. But a lot of problems remain unanswered. Also, a variety of higher-order relations still remain to be modeled: e.g., a kk-partite hypergraph. Another huge area that needs attention is the preparation and analysis of more and more bipartite hypergraph real-world datasets. We leave these problems as future work.

Broader Impact (As required by NeurIPS)

The focus of our research is a special higher-order structure that shows up in the real-world more often than expected. Co-morbidity, drug-abuse warning, complex chemical reactions, etc. all involve a higher-order bipartite relational structure. Not-to-mention, other areas such as entertainment, meta-research, fashion-technology, etc. also exhibit bipartite higher-order relationships. Never in the past have these hypergraphs been analyzed with the lens of applicability, let alone from the perspective of machine learning. Our work is the first of the hopefully many forthcoming pieces of research that explore bipartite hypergraphs in such detail. Long have networks been modeled as standard pairwise-edged graphs; the interest in higher-order relations is increasing rapidly, which would call for such research areas to be explored for novel applications of the same.

References

  • [1] Lada A Adamic and Eytan Adar. Friends and neighbors on the web. Social networks, 25(3):211–230, 2003.
  • [2] Chidambaram Annamalai. Finding perfect matchings in bipartite hypergraphs. In Proceedings of the twenty-seventh annual ACM-SIAM symposium on Discrete algorithms, pages 1814–1823. SIAM, 2016.
  • [3] Song Bai, Feihu Zhang, and Philip HS Torr. Hypergraph convolution and hypergraph attention. arXiv preprint arXiv:1901.08150, 2019.
  • [4] Sambaran Bandyopadhyay, Kishalay Das, and M Narasimha Murty. Line hypergraph convolution network: Applying graph convolution for hypergraphs. arXiv preprint arXiv:2002.03392, 2020.
  • [5] Austin R Benson, Rediet Abebe, Michael T Schaub, Ali Jadbabaie, and Jon Kleinberg. Simplicial closure and higher-order link prediction. Proceedings of the National Academy of Sciences, 115(48):E11221–E11230, 2018.
  • [6] C. Berge and E. Minieka. Graphs and Hypergraphs. Graphs and Hypergraphs. North-Holland Publishing Company, 1973.
  • [7] Phillip Bonacich, Annie Cody Holdren, and Michael Johnston. Hyper-edges and multidimensional centrality. Social networks, 26(3):189–203, 2004.
  • [8] Alain Bretto. Hypergraph theory: An introduction. Mathematical Engineering. Cham: Springer, 2013.
  • [9] Hongbo Deng, Jiawei Han, Michael R Lyu, and Irwin King. Modeling and exploiting heterogeneous bibliographic networks for expertise ranking. In Proceedings of the 12th ACM/IEEE-CS joint conference on Digital Libraries, pages 71–80, 2012.
  • [10] Yifan Feng, Haoxuan You, Zizhao Zhang, Rongrong Ji, and Yue Gao. Hypergraph neural networks. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 3558–3565, 2019.
  • [11] Aditya Grover and Jure Leskovec. node2vec: Scalable feature learning for networks. In Proceedings of the 22nd ACM SIGKDD international conference on Knowledge discovery and data mining, pages 855–864, 2016.
  • [12] Huan Gui, Jialu Liu, Fangbo Tao, Meng Jiang, Brandon Norick, and Jiawei Han. Large-scale embedding learning in heterogeneous event data. In 2016 IEEE 16th International Conference on Data Mining (ICDM), pages 907–912. IEEE, 2016.
  • [13] Jean-Loup Guillaume and Matthieu Latapy. Bipartite structure of all complex networks. Information processing letters, 90(5):215–221, 2004.
  • [14] Will Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In Advances in neural information processing systems, pages 1024–1034, 2017.
  • [15] Chaoyang He, Tian Xie, Yu Rong, Wenbing Huang, Yanfang Li, Junzhou Huang, Xiang Ren, and Cyrus Shahabi. Bipartite graph neural networks for efficient node representation learning. arXiv preprint arXiv:1906.11994, 2019.
  • [16] Olga Heismann. The hypergraph assignment problem. PhD thesis, Technische Universitaet Berlin, 2014.
  • [17] Jie Huang, Chuan Chen, Fanghua Ye, Jiajing Wu, Zibin Zheng, and Guohui Ling. Hyper2vec: Biased random walk for hyper-network embedding. In International Conference on Database Systems for Advanced Applications, pages 273–277. Springer, 2019.
  • [18] Jianwen Jiang, Yuxuan Wei, Yifan Feng, Jingxuan Cao, and Yue Gao. Dynamic hypergraph neural networks. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence (IJCAI), pages 2635–2641, 2019.
  • [19] Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016.
  • [20] Maksim Kitsak, Fragkiskos Papadopoulos, and Dmitri Krioukov. Latent geometry of bipartite networks. Physical Review E, 95(3):032309, 2017.
  • [21] Juho Lee, Yoonho Lee, Jungtaek Kim, Adam Kosiorek, Seungjin Choi, and Yee Whye Teh. Set transformer: A framework for attention-based permutation-invariant neural networks. In International Conference on Machine Learning, pages 3744–3753, 2019.
  • [22] Dong Li, Zhiming Xu, Sheng Li, and Xin Sun. Link prediction in social networks based on hypergraph. In Proceedings of the 22nd International Conference on World Wide Web, pages 41–42, 2013.
  • [23] David Liben-Nowell and Jon Kleinberg. The link-prediction problem for social networks. Journal of the American society for information science and technology, 58(7):1019–1031, 2007.
  • [24] Changping Meng, Jiasen Yang, Bruno Ribeiro, and Jennifer Neville. Hats: A hierarchical sequence-attention framework for inductive set-of-sets embeddings. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 783–792, 2019.
  • [25] Mark Ed Newman, Albert-László Ed Barabási, and Duncan J Watts. The structure and dynamics of networks. Princeton university press, 2006.
  • [26] Mark EJ Newman. The structure and function of complex networks. SIAM review, 45(2):167–256, 2003.
  • [27] Prasanna Patil, Govind Sharma, and M Narasimha Murty. Negative sampling for hyperlink prediction in networks. In Pacific-Asia Conference on Knowledge Discovery and Data Mining, pages 607–619. Springer, 2020.
  • [28] Josh Payne. Deep hyperedges: A framework for transductive and inductive learning on hypergraphs. arXiv preprint arXiv:1910.02633, 2019.
  • [29] Yuki Saito, Takuma Nakamura, Hirotaka Hachiya, and Kenji Fukumizu. Deep set-to-set matching and learning. arXiv preprint arXiv:1910.09972, 2019.
  • [30] Arnab Sinha, Zhihong Shen, Yang Song, Hao Ma, Darrin Eide, Bo-June Hsu, and Kuansan Wang. An Overview of Microsoft Academic Service (MAS) and Applications. In Proceedings of the 24th International Conference on World Wide Web (WWW), pages 243–246, 2015.
  • [31] Yizhou Sun and Jiawei Han. Mining heterogeneous information networks: principles and methodologies. Synthesis Lectures on Data Mining and Knowledge Discovery, 3(2):1–159, 2012.
  • [32] Amanda L Traud, Peter J Mucha, and Mason A Porter. Social structure of facebook networks. Physica A: Statistical Mechanics and its Applications, 391(16):4165–4180, 2012.
  • [33] Ke Tu, Peng Cui, Xiao Wang, Fei Wang, and Wenwu Zhu. Structural deep embedding for hyper-networks. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018.
  • [34] Petar Veličković, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua Bengio. Graph attention networks. arXiv preprint arXiv:1710.10903, 2017.
  • [35] Oriol Vinyals, Samy Bengio, and Manjunath Kudlur. Order matters: Sequence to sequence for sets. arXiv preprint arXiv:1511.06391, 2015.
  • [36] Edward Wagstaff, Fabian Fuchs, Martin Engelcke, Ingmar Posner, and Michael A. Osborne. On the limitations of representing functions on sets. In Kamalika Chaudhuri and Ruslan Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 6487–6494, Long Beach, California, USA, 09–15 Jun 2019. PMLR.
  • [37] Yueyang Wang, Ziheng Duan, Binbing Liao, Fei Wu, and Yueting Zhuang. Heterogeneous attributed network embedding with graph convolutional networks. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 10061–10062, 2019.
  • [38] Chris Wendler, Markus Püschel, and Dan Alistarh. Powerset convolutional neural networks. In Advances in Neural Information Processing Systems, pages 927–938, 2019.
  • [39] Zonghan Wu, Shirui Pan, Fengwen Chen, Guodong Long, Chengqi Zhang, and S Yu Philip. A comprehensive survey on graph neural networks. IEEE Transactions on Neural Networks and Learning Systems, 2020.
  • [40] Naganand Yadati, Madhav Nimishakavi, Prateek Yadav, Vikram Nitin, Anand Louis, and Partha Talukdar. Hypergcn: A new method for training graph convolutional networks on hypergraphs. In Advances in Neural Information Processing Systems, pages 1509–1520, 2019.
  • [41] Naganand Yadati, Vikram Nitin, Madhav Nimishakavi, Prateek Yadav, Anand Louis, and Partha Talukdar. Link prediction in hypergraphs using graph convolutional networks. OpenReview, 2019.
  • [42] Dingqi Yang, Bingqing Qu, Jie Yang, and Philippe Cudre-Mauroux. Revisiting user mobility and social relationships in lbsns: A hypergraph embedding approach. In The World Wide Web Conference, pages 2147–2157, 2019.
  • [43] Manzil Zaheer, Satwik Kottur, Siamak Ravanbakhsh, Barnabas Poczos, Russ R Salakhutdinov, and Alexander J Smola. Deep sets. In Advances in neural information processing systems, pages 3391–3401, 2017.
  • [44] Muhan Zhang, Zhicheng Cui, Shali Jiang, and Yixin Chen. Beyond link prediction: Predicting hyperlinks in adjacency space. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018.
  • [45] Ruochi Zhang, Yuesong Zou, and Jian Ma. Hyper-sagnn: a self-attention based graph neural network for hypergraphs. arXiv preprint arXiv:1911.02613, 2020.
  • [46] Yan Zhang, Jonathon Hare, and Adam Prügel-Bennett. Fspool: Learning set representations with featurewise sort pooling. arXiv preprint arXiv:1906.02795, 2019.
  • [47] Dengyong Zhou, Jiayuan Huang, and Bernhard Schölkopf. Learning with hypergraphs: Clustering, classification, and embedding. In Advances in neural information processing systems, pages 1601–1608, 2007.
  • [48] Yu Zhu, Ziyu Guan, Shulong Tan, Haifeng Liu, Deng Cai, and Xiaofei He. Heterogeneous hypergraph embedding for document recommendation. Neurocomputing, 216:150–162, 2016.
  • [49] Inna Zverovich and Igor Zverovich. Bipartite bihypergraphs: a survey and new results. Discrete mathematics, 306(8-9):801–811, 2006.

Appendix A Proofs

A.1 Proof of Lemma 1

Proof.

Given a bipartite hypergraph =(𝒱,𝒱,,,)\mathcal{H}=(\mathcal{V},\mathcal{V}^{\prime},\mathcal{F},\mathcal{F}^{\prime},\mathcal{B}), consider \mathcal{F} and \mathcal{F}^{\prime} as two sets-of-sets. Now consider the following claim:

  • Claim: Sets 𝔹(,)\mathbb{B}(\mathcal{F},\mathcal{F}^{\prime}) (see Definition 1) and ×\mathcal{F}\times\mathcal{F}^{\prime} are equivalent.

    Proof of Claim.

    The map σ:𝔹(,)×\sigma:\mathbb{B}(\mathcal{F},\mathcal{F}^{\prime})\rightarrow\mathcal{F}\times\mathcal{F}^{\prime} defined by x(x𝒱,x𝒱)x\mapsto(x\cap\mathcal{V},x\cap\mathcal{V}^{\prime}) is bijective since its inverse σ1\sigma^{-1} is defined by (x,y)xy(x,y)\mapsto x\cup y. Hence, the claim. ∎

Using the same bijective map in the Proof of Claim above, we have:

b,f:=b𝒱 and f:=b𝒱\forall b\in\mathcal{B},~\exists f:=b\cap\mathcal{V}\in\mathcal{F}\text{ and }~\exists f^{\prime}:=b\cap\mathcal{V}^{\prime}\in\mathcal{F}^{\prime}

Hence the relation:

():={(b𝒱,b𝒱)b}×\mathcal{M}(\mathcal{H}):=\{(b\cap\mathcal{V},b\cap\mathcal{V}^{\prime})\mid b\in\mathcal{B}\}\subseteq\mathcal{F}\times\mathcal{F}^{\prime}

is a set matching over sets-of-sets \mathcal{F} and \mathcal{F}^{\prime} as per Definition 3. ∎

A.2 Proof of Lemma 2

Proof.

Given =(𝒱,𝒱,,,)\mathcal{H}=(\mathcal{V},\mathcal{V}^{\prime},\mathcal{F},\mathcal{F}^{\prime},\mathcal{B}), fix 𝒫\mathcal{P}\subseteq\mathcal{B} and 𝒩^\mathcal{N}\subseteq\hat{\mathcal{B}} as positive and negative classes respectively. Consider hyperedges f,f^f,\hat{f}\in\mathcal{F}, f,f^f^{\prime},\hat{f}^{\prime}\in\mathcal{F}^{\prime} be such that ff𝒫f\cup f^{\prime}\in\mathcal{P} and f^f^𝒩\hat{f}\cup\hat{f}^{\prime}\in\mathcal{N}.

Now, consider \mathcal{H}’s equivalent matching ()\mathcal{M}(\mathcal{H}) and learn an SMP predictor μ:×\mu:\mathcal{F}\times\mathcal{F}^{\prime}\rightarrow\mathbb{R}. Then, we have (f,f)()(f,f^{\prime})\in\mathcal{M}(\mathcal{H}) and (f^,f^)^()(\hat{f},\hat{f}^{\prime})\in\hat{\mathcal{M}}(\mathcal{H}). Hence, from eq. (3) in Definition 4, we have μ(f,f)μ(f^,f^)\mu(f,f^{\prime})\geq\mu(\hat{f},\hat{f}^{\prime}). Now, if we define a derived BHP predictor φ:𝔹(,)\varphi:\mathbb{B}(\mathcal{F},\mathcal{F}^{\prime})\rightarrow\mathbb{R} as bμ(b𝒱,b𝒱)b\mapsto\mu(b\cap\mathcal{V},b\cap\mathcal{V}^{\prime}), we get:

φ(ff)\displaystyle\varphi(f\cup f^{\prime}) =μ((ff)𝒱,(ff)𝒱)=μ(f,f)\displaystyle=\mu((f\cup f^{\prime})\cap\mathcal{V},(f\cup f^{\prime})\cap\mathcal{V}^{\prime})=\mu(f,f^{\prime})
μ(f^,f^)=μ((f^f^)𝒱,(f^f^)𝒱)=φ(f^f^)\displaystyle\geq\mu(\hat{f},\hat{f}^{\prime})=\mu((\hat{f}\cup\hat{f}^{\prime})\cap\mathcal{V},(\hat{f}\cup\hat{f}^{\prime})\cap\mathcal{V}^{\prime})=\varphi(\hat{f}\cup\hat{f}^{\prime})
φ(ff)\displaystyle\implies\varphi(f\cup f^{\prime}) φ(f^f^).\displaystyle\geq\varphi(\hat{f}\cup\hat{f}^{\prime}).

Hence, since ff, ff^{\prime}, f^\hat{f}, f^\hat{f}^{\prime} were arbitrarily selected as per 𝒫\mathcal{P} and 𝒩\mathcal{N}, the foregoing arguments make φ\varphi satisfy the BHP condition given in eq. (2) from Definition 2. ∎

Appendix B Details on Experiments

B.1 Data Description

All datasets we have prepared are available on the following link:

https://www.dropbox.com/s/cxykmi37695jlcw/catsetmat_data.zip?dl=0

Let us discuss the datasets one by one.

B.1.1 TMDB Cast-Crew (tmdb-cc)

We take a subset of movies from The Movie Database (TMDB; https://www.themoviedb.org/) available as a Kaggle (https://www.kaggle.com/) dataset named TMDB 5000 Movie Dataset (https://www.kaggle.com/tmdb/tmdb-movie-metadata). The node sets considered here are those of movie-actors and the movie-crew (set of other important people involved in a movie, such as directors, producers, etc.). Every bipartite hyperedge contains a set of actors (the cast; the left nodes) and a set of crew-members (the right nodes) who participated in at least one movie.

B.1.2 TMDb Cast-Keywords (tmdb-ck)

TMDB also gives information about plot keywords that hint at the content of a movie. A bipartite hyperedge would contain a set of actors (the cast; the left nodes) and a set of keywords (the right nodes) related to least one movie.

B.1.3 MAG ACM Authors-Keywords (mag-acm-ak)

This is a bibliographic network from Microsoft Academic Graph (MAG[30], from which we choose those publications that appeared in conferences and journals associated with Association for Computing Machinery (ACM; https://www.acm.org/). The two node sets used are those of authors (the left node set) and (research-based) keywords (the right node set), and each bipartite hyperedge contains a set of co-authors and a set of keywords at least one of their papers has been tagged with.

Note: The raw data for MAG is not available directly and it’s a long process to collect portions of it. However, there used to be an online source that had official links to download the whole MAG dataset. We have an earlier version of the data downloaded with us, and this processing was made on that dataset. Nevertheless, the prepared data directly consumable by our code is available via the Dropbox link given earlier.

B.2 Data Preparation

B.2.1 Processing Data

We start with a raw dataset consisting of multiple entities, of which we choose two. Then we fetch bipartite hyperedges, which are merely events occurring at a given point of time (e.g., a movie getting released, or a paper getting published, etc.); this gives us sets of higher-order co-occurrences of the two entities we chose. Next, we apply a couple of filters to refine the data:

  1. 1.

    Time filter: We filter the data into events occurring at time t[tmin,tmax]t\in[t_{min},t_{max}].

  2. 2.

    Occurrence frequency filter: We only keep those nodes in the node-sets 𝒱\mathcal{V} and 𝒱\mathcal{V}^{\prime} that have their occurrence count within a particular range [omin,omax][o_{min},o_{max}].

  3. 3.

    Size filter: We only keep those bipartite hyperedges fff\cup f^{\prime} that have left and right hyperedge sizes (individually) in the range |f|,|f|[smin,smax]|f|,|f^{\prime}|\in[s_{min},s_{max}].

Please note that the filters are applied sequentially, and the prepared data is stored as a two-column (left hyperedge, right hyperedge) CSV file.

B.2.2 Negative Sampling

For the BHP problem, each bipartite hyperedge fff\cup f^{\prime}\in\mathcal{B} is considered to be a positive example (𝒫\in\mathcal{P}), and each non-hyperedge ff^:=𝔹(,)f\cup f^{\prime}\in\hat{\mathcal{B}}:=\mathbb{B}(\mathcal{F},\mathcal{F}^{\prime})\setminus\mathcal{B}, a negative class sample. But since the negative patterns are too many, we avoid the problem of class imbalance by negative class sampling. For this, we first pick two random hyperedges: one from left, f{f}\in\mathcal{F} and the other from right, f{f}^{\prime}\in\mathcal{F}^{\prime}, and tag the pair as a negative class pattern (𝒩\in\mathcal{N}) if they aren’t connected via a bipartite hyperedge (i.e., if ff{f}\cup{f}^{\prime}\notin\mathcal{B}). We use a negative-to-positive ratio of 5:15{:}1.

B.2.3 Train-Test Split

We split the bipartite hyperedges and sampled bipartite non-hyperedges (sampled as mentioned in Section B.2.2 above) into train and test data using a 80:2080{:}20 train-test split ratio. For mag-acm-ak, we create validation data as well, using 60:20:2060{:}20{:}20 as train-validation-test proportions, and perform hyperparameter tuning on the validation data, as described in Section B.4.2. For each dataset-algorithm combination, we perform five experiments, performing a separate split and a separate negative sampling for each. This also introduces a standard deviation in our results, which we report in the main paper.

B.3 Baselines

Barring the “node2vec-based” and the “bipartite-graph-based” baselines, we have explained all baselines in the main paper. Here is a detailed description of how both of them were created.

B.3.1 Node2vec-based

For these set of baselines, we convert the bipartite hypergraph into a usual graph by expanding each bipartite hyperedge b=ffb=f\cup f^{\prime}\in\mathcal{B} into a set of three types of edges:

  • Cross-edges ×(b):=f×f\mathcal{E}_{\times}(b):=f\times f^{\prime}

  • Left self-edges (b):={ef:|e|=2}\mathcal{E}_{\circ}(b):=\{e\subseteq f:|e|=2\}

  • Right self-edges (b):={ef:|e|=2}\mathcal{E}_{\circ}^{\prime}(b):=\{e\subseteq f^{\prime}:|e|=2\}

Next, we embed each node vv into its node2vec [11] features X(v)X(v) and find cosine similarity between the incident nodes of each edge. Finally, we either take a mean or a min of that score and call it a prediction score. We use the same settings used in Hyper-SAGNN [45] for their node2vec based baselines.

  1. 1.

    n2v-cross-mean: For node2vec-cross-mean, we take (v,v)×(b)(v,v^{\prime})\in\mathcal{E}_{\times}(b) and define the score to be:

    n2vcross,mean(b):=1|×(b)|(v,v)×(b)X(v)TX(v).n2v_{cross,mean}(b):=\frac{1}{|\mathcal{E}_{\times}(b)|}\sum_{(v,v^{\prime})\in\mathcal{E}_{\times}(b)}{\!\!\!\!\!\!\!\!\!X(v)^{T}X(v^{\prime})}. (12)
  2. 2.

    n2v-full-mean:

    n2vfull,mean(b):=1|(b)|(u,v)(b)X(u)TX(v),n2v_{full,mean}(b):=\frac{1}{|\mathcal{E}(b)|}\sum_{(u,v)\in\mathcal{E}(b)}{\!\!\!\!\!\!\!X(u)^{T}X(v)}, (13)

    where (b):=×(b)(b)(b)\mathcal{E}(b):=\mathcal{E}_{\times}(b)\cup\mathcal{E}_{\circ}(b)\cup\mathcal{E}_{\circ}^{\prime}(b) denotes the full set of edges.

  3. 3.

    n2v-cross-min:

    n2vcross,min(b):=min(v,v)×(b)X(v)TX(v).n2v_{cross,min}(b):=\min_{(v,v^{\prime})\in\mathcal{E}_{\times}(b)}{\!\!\!\!\!\!X(v)^{T}X(v^{\prime})}. (14)
  4. 4.

    n2v-full-min:

    n2vfull,min(b):=min(u,v)(b)X(u)TX(v).n2v_{full,min}(b):=\min_{(u,v)\in\mathcal{E}(b)}{\!\!\!\!\!X(u)^{T}X(v)}. (15)

B.3.2 Bipartite-graph-based

To create these baselines, we first convert our bipartite hypergraph =(𝒱,𝒱,,,)\mathcal{H}=(\mathcal{V},\mathcal{V}^{\prime},\mathcal{F},\mathcal{F}^{\prime},\mathcal{B}) into an induced bipartite graph 𝒢=(𝒱,𝒱,)\mathcal{G}=(\mathcal{V},\mathcal{V}^{\prime},\mathcal{E}) by defining \mathcal{E} as:

:={(v,v)𝒱×𝒱b s.t. {v,v}b},\mathcal{E}:=\{(v,v^{\prime})\in\mathcal{V}\times\mathcal{V}^{\prime}\mid\exists b\in\mathcal{B}\text{ s.t. }\{v,v^{\prime}\}\subseteq b\},

and then compute the bipartite versions of the Common Neighbor (CN) and the Adamic Adar (AA) scores as follows:

CN(v,v)=LCN(v,v)+RCN(v,v)2,andAA(v,v)=LAA(v,v)+RAA(v,v)2,CN(v,v^{\prime})=\frac{LCN(v,v^{\prime})+RCN(v,v^{\prime})}{2},~\text{and}~AA(v,v^{\prime})=\frac{LAA(v,v^{\prime})+RAA(v,v^{\prime})}{2},

where “L” and “R” stand for left and right scores respectively. If Γ\Gamma denotes the neighbors of a node (or union of neighbors of a set of nodes), we can define the individual scores as (note that left nodes have neighbors in the right and vice-versa):

LCN(v,v)=|(Γ(Γ(v)){v})(Γ(v){v})|LCN^{\prime}(v,v^{\prime})=|(\Gamma(\Gamma(v))\setminus\{v\})\cap(\Gamma(v^{\prime})\setminus\{v\})|
RCN(v,v)=|(Γ(Γ(v)){v})(Γ(v){v})|RCN(v,v^{\prime})=|(\Gamma(\Gamma(v^{\prime}))\setminus\{v^{\prime}\})\cap(\Gamma(v)\setminus\{v^{\prime}\})|
LAA(v,v)=w(Γ(Γ(v)){v})(Γ(v){v})1log(1+|Γ(w)|)LAA^{\prime}(v,v^{\prime})=\sum_{w\in(\Gamma(\Gamma(v))\setminus\{v\})\cap(\Gamma(v^{\prime})\setminus\{v\})}{\frac{1}{\log(1+|\Gamma(w)|)}}
RAA(v,v)=w(Γ(Γ(v)){v})(Γ(v){v})1log(1+|Γ(w|)RAA(v,v^{\prime})=\sum_{w^{\prime}\in(\Gamma(\Gamma(v^{\prime}))\setminus\{v^{\prime}\})\cap(\Gamma(v)\setminus\{v^{\prime}\})}{\frac{1}{\log(1+|\Gamma(w^{\prime}|)}}

We thus have CNCN and AAAA scores for each left-right vertex pair. Using this, we find the similarity scores for a left-right hyperedge pair (f,f)(f,f^{\prime}) as:

Algo(f,f)=Aggregate({Algo(v,v)(v,v)f×f}), and\textsc{Algo}(f,f^{\prime})=\textsc{Aggregate}(\{\textsc{Algo}(v,v^{\prime})\mid(v,v^{\prime})\in f\times f^{\prime}\}),\text{ and}

where we use three choices for the Aggregate function and two for Algo, thereby forming the six baselines:

  1. 1.

    bipartite-AA-min: Aggregate=Minimum; Algo=AA

  2. 2.

    bipartite-CN-min: Aggregate=Minimum; Algo=CN

  3. 3.

    bipartite-AA-max: Aggregate=Maximum; Algo=AA

  4. 4.

    bipartite-CN-max: Aggregate=Maximum; Algo=CN

  5. 5.

    bipartite-AA-avg: Aggregate=Average; Algo=AA

  6. 6.

    bipartite-CN-avg: Aggregate=Average; Algo=CN

B.4 Hyperparameter Settings

B.4.1 Baselines

There are no parameters for CN and AA scores for the bipartite graph based baselines. For the node2vec-based baselines, we use embedding dimension as 6464, and other node2vec parameters are taken from Hyper-SAGNN. For FSPool and HyperSAGNN, we take the latent dimension as 1616 and other parameters are as per Hyper-SAGNN. We tried this with other dimensions as well, but the best results were on this configuration.

B.4.2 Hyperparameter tuning for CATSETMAT

We fix some hyperparameters as per Hyper-SAGNN, and for the embedding dimension and the learning rate, we perform a hyperparameter tuning, as shown in Figure 9, and then pick them to be 1616 and 0.0010.001 respectively. We use the Adam optimization algorithm for our tasks. The initial embeddings that we use in our model are from node2vec (an alternating random walk on nodes and hyperedges respectively), just as Hyper-SAGNN does.

Figure 9: Tuning two hyperparameters on the dataset mag-acm-ak for CATSETMAT: node2vec dimension dimdim and learning rate lrlr.