DLGNet: Hyperedge Classification through Directed Line Graphs for Chemical Reactions
(2410.06969v1)
Published 9 Oct 2024 in cs.LG and cs.AI
Abstract: Graphs and hypergraphs provide powerful abstractions for modeling interactions among a set of entities of interest and have been attracting a growing interest in the literature thanks to many successful applications in several fields. In particular, they are rapidly expanding in domains such as chemistry and biology, especially in the areas of drug discovery and molecule generation. One of the areas witnessing the fasted growth is the chemical reactions field, where chemical reactions can be naturally encoded as directed hyperedges of a hypergraph. In this paper, we address the chemical reaction classification problem by introducing the notation of a Directed Line Graph (DGL) associated with a given directed hypergraph. On top of it, we build the Directed Line Graph Network (DLGNet), the first spectral-based Graph Neural Network (GNN) expressly designed to operate on a hypergraph via its DLG transformation. The foundation of DLGNet is a novel Hermitian matrix, the Directed Line Graph Laplacian, which compactly encodes the directionality of the interactions taking place within the directed hyperedges of the hypergraph thanks to the DLG representation. The Directed Line Graph Laplacian enjoys many desirable properties, including admitting an eigenvalue decomposition and being positive semidefinite, which make it well-suited for its adoption within a spectral-based GNN. Through extensive experiments on chemical reaction datasets, we show that DGLNet significantly outperforms the existing approaches, achieving on a collection of real-world datasets an average relative-percentage-difference improvement of 33.01%, with a maximum improvement of 37.71%.
Collections
Sign up for free to add this paper to one or more collections.
The paper introduces DLGNet, a spectral Graph Neural Network designed for hyperedge classification using a novel Directed Line Graph representation.
DLGNet utilizes complex-valued edge weights within its Directed Line Graph to capture and leverage the directional information present in directed hypergraphs.
Experimental results demonstrate that DLGNet significantly outperforms existing methods across chemical reaction datasets, highlighting the value of modeling directionality.
The paper introduces Directed Line Graph Network (DLGNet), a spectral-based Graph Neural Network (GNN) designed for hyperedge classification in directed hypergraphs, with a specific application to chemical reaction classification.
The authors define the concept of a Directed Line Graph (DLG) associated with a directed hypergraph H. In this DLG(%%%%1%%%%), vertices represent the hyperedges of H, and edges connect vertices if their corresponding hyperedges in H share at least one vertex. Complex-valued edge weights in DLG(H) encode the directionality of interactions within H.
Key contributions include:
A formal definition of a directed line graph associated with a directed hypergraph H, denoted as DLG(H).
The Directed Line Graph Laplacian LN, a Hermitian matrix capturing both directed and undirected relationships between hyperedges in a directed hypergraph via its DLG. The paper proves that LN possesses spectral properties such as being positive semidefinite.
DLGNet, a spectral-based GNN designed to operate on directed line graphs, convolving hyperedge features.
The paper defines an undirected hypergraph as an ordered pair H=(V,E), with n:=∣V∣ and m:=∣E∣, where V is the set of vertices and E⊆2V∖{} is the set of hyperedges. The hyperedges' weights are stored in the diagonal matrix W∈Rm×m, where we is the weight of hyperedge e∈E. The vertex degree du and hyperedge degree δe are defined as du:=∑e∈E:u∈e∣we∣ for u∈V, and δe:=∣e∣ for e∈E, stored in diagonal matrices Dv∈Rn×n and De∈Rm×m. For 2-uniform hypergraphs, the adjacency matrix A∈Rn×n is defined such that Auv=we for each e={u,v}∈E and Auv=0 otherwise. Directed hypergraph H is defined as a hypergraph where each hyperedge e∈E is partitioned in a head set H(e) and a tail set T(e).
The relationship between vertices and hyperedges in a undirected hypergraph H is classically represented via an incidence matrix B of size ∣V∣×∣E∣, where
Bve={1amp;if v∈e0amp;otherwisev∈V,e∈E.From the incidence matrixB, one can derive the Signless Laplacian MatrixQas well as its normalized versionQN:Q:=BWB<sup>⊤andQN</sup>:=DvBWDe<sup>−1</sup>B<sup>⊤</sup>Dv,
where W,De,Dv are the diagonal matrices defined above.
The Laplacian for a general undirected hypergraph is defined as:
Δ:=I−QN.
Given a Laplacian matrix L of a hypergraph H that admits an eigenvalue decomposition L=UΛU∗, where U∈Cn×n represents the eigenvectors, U∗ is its conjugate transpose, and Λ∈Rn×n is the diagonal matrix containing the eigenvalues, the convolution y⊛x between x and another graph signal y∈Cn is defined in the frequency space as y⊛x=Udiag(U∗y)U∗x.
The adjacency matrix of L(H) is defined as:
A(L(H)):=Q−WDe,
where Q:=B⊤B is the Signless Laplacian of L(H). The normalized Signless Laplacian QN and the normalized Laplacian LN are defined as:
The complex-valued incidence matrix B preserves the directionality of H:
Bve:={1amp;if v∈H(e),−iamp;if v∈T(e),0amp;otherwise.v∈V,e∈E.The adjacency matrix is computed as:A(DLG(H))=WB<sup>∗</sup>BW−WDe.
The normalized Signless Laplacian $\mathbb{\vec{Q}_{N}$ and the normalized Laplacian $\mathbb{\vec{L}_N$ of DLG are:
$\mathbb{\vec{Q}_{N} := {\vec{D}_e} {W} \vec{B}^* \vec{D}_v^{-1} \vec{B} {W} {\vec{D}_e}$ and $\mathbb{\vec{L}_N := I - \mathbb{\vec{Q}_{N}}$.
The scalar form of LN(ij) for a pair of hyperedges i,j∈E is:
$\mathbb{\vec L}<em>N(ij)=
\left{
\begin{array}{lr}
\displaystyle
1 - \sum</em>{
u \in i}\frac{w_i}{d_u\delta_i}& i = j\
\displaystyle
\left(-\hspace{-.4cm}\sum_{\substack{%i,j \in E: \
u \in H(i) \cap H(j) \ \vee u \in T(i) \cap T(j)} \hspace{-.5cm}\frac{w_i} {w_j}{d_u} -
i
\left(\sum_{\substack{%i, j \in E:\
u \in H(i) \cap T(j)}%\ \wedge u \in T(j)}
\hspace{-.3cm}\frac{w_i} {w_j}{d_u} -
\sum_{\substack{%i,j \in E:\
u \in T(i) \cap H(j)} %\ \wedge u \in H(j)}
\hspace{-.3cm}\frac{w_i} {w_j}{d_u}\right)\right) \frac{1}{\delta_i} \frac{1}{\delta_j} & i \neq j
\end{array}
\right.$The Euclidean norm induced byL<em>Nof a complex-valued signalx=a+ib∈C<sup>nreads:21</sup>∑</em>u∈Vd(u)1i,j∈E∑w(i)(((δ(i)ai−δ(j)aj)<sup>2</sup>+(δ(i)bi−δ(j)bj)<sup>2)</sup>1<em>u∈H(i)∩H(j)∨u∈T(i)∩T(j)+((δ(i)ai−δ(j)bj)<sup>2</sup>+(δ(j)aj+δ(i)bi)<sup>2)</sup>1</em>u∈H(i)∩T(j)+((δ(i)ai+δ(j)bj)<sup>2</sup>+(δ(j)aj−δ(i)bi)<sup>2)</sup>1u∈T(i)∩H(j))w(j).
The convolution operator is defined as Y^x=θ0I+θ1LN.
Given X∈Cm×c0 as a c0-dimensional graph signal, the feature matrix for the vertices of DGL(H) is defined as X=B∗X′, where X′∈Cn×c0 is the feature matrix of the nodes of H.
The convolution is computed as:
Z(X)=ϕ(IXΘ0+LNXΘ1),
where ϕ is a complex ReLU activation function, and Θ0,Θ1∈Cc0×c are learnable parameters.
The paper presents experiments conducted on three real-world chemical reaction datasets: {\tt Dataset-1} (50K reactions from USPTO granted patents), {\tt Dataset-2} (5300 reactions from five different sources), and {\tt Dataset-3} (649 competitive reactions extracted from \cite{von2020thousands}). Node features are based on Morgan Fingerprints (MFs).
The results demonstrate that DLGNet outperforms existing methods, achieving an average relative percentage difference improvement of 33.01\% over the second-best method across three real-world datasets. Specifically, DLGNet achieves the best improvement on {\tt Dataset-3}, with an average RPD improvement of approximately 37.71\% and an average additive improvement of 31.65 percentage points.
An ablation paper demonstrates the importance of directionality, showing that DLGNet consistently outperforms its undirected counterpart.