Classifying and Understanding Financial Data
Using Graph Neural Network
Xiaoxiao Li1∗

Joao Saude 2

Prashant Reddy 2

Manuela Veloso2

1

2

Yale University
J.P.Morgan AI Research

Abstract
Real data collected from different applications usually do
not have a pre-defined data model or is not organized in a
pre-defined manner. Analyzing messy, unstructured data andextracting useful data information is difficult. For the datacollected in financial institutions, usually, it has additional
topological structures and is amenable to be represented asa graph. For example, social networks, communication networks, financial systems, and payments networks. The graphstructure can be built from the connection of each entity, suchas financial institutions, customers, or computing centers. We
consider how the different entity influences each other’s label through a label prediction problem based on the graphstructure. Given the structured data, Graph Neural Networks(GNNs) is a powerful tool that can mimic experts’ decision onnode labeling. GNNs combine node features through graphstructure by using a neural network to embed node information and pass it through edges in the graph. We want to identify the informative interaction in the input data used by the
GNN model to classify the node in the graph and examine if
the model works as we desire. However, due to the complex
data representation and non-linear transformations, explaining decisions made by GNNs is challenging. In this work, we
propose graph representation methods for finical transaction
data and new graph features’ explanation methods to identify the informative graph topology. We use four datasets (onesynthetic and three reals) to validate our methods. Our results
demonstrate that graph-structured representation help to analyze financial transaction data, and our explanation approach
can mimic patterns in human interpretation and disentangle
different features in the graphs.

1

Introduction

In recent years, with the rapid development of new technologies such as big data, cloud computing, and artificial
intelligence, these new technologies are deeply integrated
with financial services, releasing financial innovation vitality and application potential, which has greatly promoted
the financial industry. In this development process, big datatechnology is the most mature and widely used. However,∗This work was done at J.P.Morgan AI Research
Copyright c 2020, Association for the Advancement of Artificial
Intelligence (www.aaai.org). All rights reserved.

faced with such a vast information ocean, especially unstructured data information, how to store, query, analyze, mine,and utilize these massive information resources is particularly critical. Traditional relational databases are mainly oriented to transaction processing and data analysis applications. They are good at solving structured data management
problems. There are some inherent shortcomings in managing unstructured data, especially when dealing with massive
unstructured information. In response to the challenges of
unstructured data analysis, one strategy is transforming unstructured data to structured data, which will help similar
information labeling, retrieving, searching, and clustering,and it will help finance better serve the real economy andeffectively promote the overall development of the financial
industry.
Our contemporary society relies heavily in interpersonal/cultural relations (social networks), our economy isdensely connected and structured (commercial relations, financial transfers, supply/distribution chains), the geopolitical relations are also very structured (commercial and political unions), we also rely on transportation networks (roads,
railroads, maritime and flight connections), and our cybersystems are also structurally connected (computers networks, internet). Moreover, those complex network structures also appear in nature, on biological systems, like thebrain, vascular and nervous systems, and also on chemical systems, for instances atoms connections on molecules.
Nowadays, with modern technologies we collect data fromall the above systems and their relations since this data
is hugely structured and depends heavily on the relations
within the networks, it makes sense to represent the data asa graph, where nodes represent entities and the edges theconnections between them.
Artificial intelligence is becoming a new direction for
financial big data applications. Graph Neural Networks(GNNs) such as GCN (Kipf and Welling 2016), GraphSage(Hamilton, Ying, and Leskovec 2017), is a kind of deeplearning architectures that can handle graph-structured databy preserving the information structure of graphs. Our primary focus is the node labeling problem, such as fraud detection, credit issuing, customer targeting, social network
user classification, which can mimic experts’ decisions on

Figure 1: We can build graph structure for transaction system and try to understand what interaction patterns are informativefor fraud detection using GNN and explaination methods.
node labeling. GNNs are able to combine node features,connection patterns, and graph structure by using a neuralnetwork to embed the node information and pass it throughedges in the graph. However, due to the complex data representation and non-linear transformations performed on thedata, explaining decisions made by GNNs is a challenging
problem. One example about understanding fraud detection
from explaining GNN node classification decision is shownin Figure. 1. Therefore we want to identify the patterns in
the input data that were used by the GNN model to make adecision and examine if the model works as we desire.
Although deep learning model visualization techniques
have been developed in convolution neural network (CNN),
those methods are not directly applicable to explain
weighted graphs with node features for the classification
task. A few work have been down on explaining GNN((Pope et al. 2019; Baldassarre and Azizpour 2019; Ying etal. 2019; Yang et al. 2019)). However, to our best knowledge, no work has been done on explaining comprehensive
features (namely node feature, edge feature, and connecting patterns) in weighted graph, especially for node classification problem. Here we propose a few graph feature explanation methods to formulate financial data in based ongraph structure. We use three datasets (one synthetic andtwo real data) to validate our methods. Our results demonstrate that by using explanation approach, we can discover
the data patterns used for node classification correspond tohuman interpretation and those explanation methods can beused for understanding data, debugging GNN model and examine model decisions, and in other tasks.
Our contribution is summarized as follows:
1. We propose to transfer financial transaction data toweighted graph representation for further analysis anddata information understanding.
2. We propose to use GNN to analyze financial transaction
data, including fraud detection and account matching.

3. We provide the tools to interpret informative interactions
between entities for entity labeling in the structured-graphformat.
Paper structure: In section 2, we introduce Graph representation. Then in section 3, we walk through the operationsin GNN. In section 4, the formula of graph explanation is
described, and the corresponding methods are introduced.
In section 5, we propose the evaluation metrics and methods. The experiments and results are presented in section 6.
We conclude the paper in section 7.

2

Data Representation – Weighted Graph

For the financial data, which contains user and interaction
information, we can model each entity in the as a nodeand build the underlying connection between them using
based on their interaction. In this section, we introduce thenecessary notation and definitions. We denote a graph by
G = (V, E) where V is the set of nodes, E the set of edges
linking the nodes and X the set of nodes’ features. For every
pair of connected nodes, u, v ∈ V , we denote by evu ∈ R
the weight of the edge (v, u) ∈ E linking them. We denote
E[v, u] = evu , where E ∈ R|E| . For each node, u, we associate a d-dimensional vector of features, Xu ∈ Rd and denote the set of all features as X = {Xu : u ∈ V } ∈ (Rd )|V | .
Edge features contain important information aboutgraphs. For instances, the graph G may represent a banking system, where the nodes V represents different banks,
and the edges E are the transaction between them; or graph
G may represent a social network, where the nodes V represent different users, and the edges E is the contacting frequencies between the users. We consider a node classification task, where each node u is assigned a label yu ∈ IC ={0, . . . , C − 1}. In the financial application, the node classification problem can be fraud detection, new costumer discovery, account matching, and so on.

3

GNN Utilizing Edge Weight

Different from the state of art GNN architecture, i.e. graphconvolution networks (GCN) (Kipf and Welling 2016) andgraph attention networks (GAT) (Veličković and others
2018), some GNNs can exploit the edge information ongraph (Gong and Cheng 2019; Shang et al. 2018; Yang etal. 2019). Here, we consider weighted and directed graphs,
and develop the graph neural network that uses both nodes
and edges weights, where edge weights affect message aggregation. Not only our approach can handle directed andweighted graphs but also preserves edge information in the
propagation of GNNs. Preserving and using edges information is important in many real-world graphs such as banking
payment network, recommendation systems (that use social
network), and other systems that heavily rely on the topology of the connections. Since, apart from node (atomic)
features also attributes of edges (bonds) are important forpredicting local and global properties of graphs. Generally
speaking, GNNs inductively learn a node representation byrecursively aggregating and transforming the feature vectorsof its neighboring nodes. Following (Battaglia et al. 2018;
Zhang, Cui, and Zhu 2018; Zhou et al. 2018), a per-layer
update of the GNN in our setting involves these three computations, message passing Eq. (1), message aggregation Eq.
(2), and updating node representation Eq. (3), which can be
expressed as:
(l−1)
m(l)
, h(l−1), evu )
vu = MSG(hu
v

(1)

(l)
Mi = AGG({m(l)vu , evu } | v ∈ N (u)})(l)
hu = UPDATE(Mu(l) , h(l−1)
)
u

(2)
(3)

(l)

where hu is the embedded representation of node u on thelayer l; evu is the weighted edge pointing from v to u; N (u)is u’s neighborhood from where it collects information to(0)
update its aggregated message Mi . Specifically, hu = xu(L)as initial, and hu is the final embedding for node u of an
L-layer GNN node classifier.
Here, following (Schlichtkrull et al. 2018), the GNN layerusing edge weight for filtering can be formed as the following steps:
(l−1)

m(l)
h(l−1)
vu = W1
v
X
(l)
(l−1)
M(l)
=
g(m
, evu )uvu , hu(message)(4)(aggregate)(5)(update)(6)v∈N (u)(l−1) (l−1)
hu+ M(l)h(l)u = σ(W0u )where N (u) denotes the set of neighbors of node u andevu denotes the directed edge from v to u, W denotes
the model’s parameters to be learned, and φ is any linear/nonlinear function that can be applied on neighbour(l)nodes’ feature embedding. We set h(l) ∈ Rd and d(l) isththe dimension of the l layer representation.
As the graph convolution operations in (Gong and Cheng2019), the edge feature matrices will be used as filters tomultiply the node feature matrix. To avoid increasing thescale of output features by multiplication, the edge featuresneed to be normalized, as in GAT (Veličković and others

2018) and GCN (Kipf and Welling 2016). Due to the aggregation mechanism,
we normalize the weights by in-degreePēvu = evu / v∈N (u) evu . Our method can deal with negative edges-weighted by re-normalizing them to a positive interval, for instances [0, 1], therefore in the following we use
only positive weighted edges and the edge weights are used
as message filtering ratio. Depending on the the problem:(l)• g can simply defined as: g = ēvu mvu ; or(l)

• g can be a gate function, such as a rnn-type block of mvu ,
(l)
(l−1)
i.e. g = GRU (ēvu mvu , hu ).

4Explaining Informative Component ofGraph Structures Data

Relational structures in graphs often contain crucial information for node classification, such as graph’s topology andinformation flow (i.e., direction and amplitude). Therefore,knowing which edges contribute the most to the information
flow towards or from a node is essential to understand andinterpret the node classification evidence.
We tackle the weighted graph feature explanation problem as a two-stage pipeline. First, we train a node classification function, in this case, a GNN. The GNN inputs
are a graph G = (V, E), its associated nodes’ features, X,
and its true nodes’ labels Y . We represent this classifier asΦ : G 7→ (u 7→ yu ), where yu ∈ IC . One advantage
of GNNs is the preservation of the information flow acrossnodes as well as the data structure. Furthermore, it is invariant to permutations on the ordering. Hence it keeps therelational inductive biases of the input data (see (Battaglia etal. 2018)). Second, given the node classification model andnode’s true label, the explanation part provides a subgraphand a subset of features retrieved from the k-hop neighborhood of each node u, for k ∈ N and u ∈ V . The subgraph,along with the subset of features, is the minimal set of information and information flow across neighbor nodes of u,that the GNN uses to compute the node’s label. We define
GS = (VS , ES ) to be a subgraph of G, where GS ⊆ G, if
VS ⊆ V and ES ⊆ E. Consider the classification yu ∈ IC
of node u, then Informative Components Detection computes a subgraph, GS , containing u, that aims to explain theclassification task by looking at the edge connectivity patterns ES and their connecting nodes VS . This provides insights on the characteristics of the graph that contribute to
the node’s label.

4.1

Maximal Mutual Information (MMI) Mask

Due to the properties of the GNN, (5), we only need toconsider the graph structure used in aggregation, i.e., thecomputational graph w.r.t. node u is defined as Gc (u) containing N 0 nodes, where N 0 ≤ N . The node feature set
associated with the Gc (u) is Xc (u) = {xv |v ∈ Vc (u)}.
For node u, the label prediction of GNN Φ is given byŷu = Φ(Gc (u), Xc (u)), which can be interpreted as a distribution PΦ (Y |Gc , Xc ) mapping by GNN. Our goal is to
identity a subgraph GS ⊆ Gc (u) (and its associated features XS = {xw |w ∈ VS }, or a subset of them) which the
GNN uses to predict u’s label.

Using ideas from Information theory (Cover and Thomas2012) and following GNNExplainer (Ying et al. 2019), theinformative explainable subgraph and nodes features subset
are chosen to maximize the mutual information (MI):max I(Y, (GS , XS )) = H(Y |G, X)−H(Y |GS , XS ). (7)GS

Since the trained GNN node classifier Φ is fixed, the H(Y )term of Eq.(7) is constant. As a result, it is equivalent tominimize the conditional entropy H(Y |GS , XS ):−EY |GS ,XS [log PΦ (Y |GS , XS )].

(8)

Therefore, the explanation to the graph components withprediction power w.r.t node u’s prediction ŷu is a subgraph
GS and its associated feature set XS , that minimize (8).
Thus, the objective of the explanation is to pick the top informative edges and its connecting neighbours, which form
a subgraph, for predicting u’s label. Because, some edges
in u’s computational graph Gc (u) might form importantmessage-passing (5) pathways, which allow useful node information to be propagated across Gc (u) and aggregated atu for prediction; while some edges in Gc (u) might not be
informative for prediction. Instead of directly optimize GS
in (8), since there are exponentially many discrete structures
GS ⊆ Gc (u) containing N 0 nodes, the GNNExplainer (Ying
N 0 ×N 0[0, 1] on the binary
et al. 2019) optimizes a mask Msym
adjacent matrix, which allows gradient descent to be performed on GS .
If we use the edge weights for node embedding, the connection can be treated as binary and fit into the original
GNNExplainer. However, if we use edge weights as filtering, the mask should affect filtering and normalization. We
extend the original GNNExplainer method by consideringedge weights and improving the method by adding extra regularization. Unlike GNNExplainer, where there are no constraints on the mask value, we add constraints to the valuelearned by the maskX
Mvw evw = 1, Mvw ≥ 0, for (v, w) ∈ Ec (u), (9)w

and perform a projected gradient decent optimization.
Therefore, rather than optimizing a relaxed adjacency matrix in GNNExplainer, we optimize a mask M ∈ [0, 1]Q
on weighted edges, supposing there are Q edges in Gc (u).
Then EcM = Ec M, where is element-wise multiplication of two matrix. The masked edge EcM is subject to theconstraint that EcM [v, w] ≤ Ec [v, w], ∀(v, w ∈ Ec (u). Thenthe objective function can be written as:
min −
M

C
X

I[y = c] log PΦ (Y |Gc = (Vc , EcM), Xc ).

c=1

(10)
In GNNExplainer, the top k edges may not form a connectedcomponent including the node (say u) under prediction i.
Hence, we added the entropy of the (Ec M)vu for every node v pointing to node u’ as a regularization term,

Algorithm 1 Optimize mask for weighted graph
Input: 1. Gc (u), computation graph of node u; 2. Pretrained GNN model Φ; 3. yu , node u’s real label; 4. M,
learn-able mask; 5. K, number of optimization iterations; 6.
L, number of layers of GNN.
1: M ← randomize parameters . initialize, M ∈ [0, 1]Q(0)
2: hv ← xv , for v ∈ Gc (u)3: for k = 1 to K dovw evw )4:
Mvw ← Pexp(M. renormalize maskv exp(Mvw evw )5:for l = 1 to L do(l)(l−1) (l−1)
6:mvu ← W1hv
. message
P
(l)
(l)
(l−1)
7:
Mu ← v g(Mvu mvu , hu ) . aggregate
(l)
(l−1)
(l)
8:
hu ← σ(W0 hu+ Mu ). update9:
end for(L)10:ŷu ← softmax(hu ). predict on masked graph11:
loss ← crossentropy(yu , ŷu ) + regularizations
12:
M ← optimizer(loss, M). update mask
13: end for
Return: M
to ensure that at least one edge connected to node u is selected. After mask M is learned, we use a threshold to remove small Ec M and isolated nodes. Our proposed optimization methods to optimize M maximizing mutual information (equation (7)) under above constrains is shown in
Algorithm 1.

4.2

Guided Gradient (GGD) Salience

Guided gradient-based explanation methods(Simonyan,
Vedaldi, and Zisserman 2013) is perhaps the most straightforward and easiest approach. By simply calculate the differentiate of the output with respect to the model input then apply norm, a score can be obtained. The gradient-based scorecan be used to indicate the relative importance of the input
feature, since it represent the change in input space whichcorresponds to the maximizing positive rate of change in themodel output. Since egde weights have performed as filtering in GNN, we can obtain the edge mask as
Egvu= ReLU(∂ ŷuc
)
∂evu

(11)

where c ∈ {1, . . . , C} is the correct class of node u, andyuu is the score for class c before softmax layer. where xv isnode v’s feature. Here, we select the edges whose g E is in
the top k largest ones and their connecting nodes. The advantage of contrastive gradient salience method is easy to compute. However, it was argued that recently that it generally
perform worse than newer techniques ((Zhang et al. 2018;
Selvaraju et al. 2017)).

4.3

Edge Weighted Graph Attention (E-GAT)The Graph Attention Layer takes a set of node features
(l−1)
(l−1)
(l−1)
H(l−1) = {h1, h2, · · · , hN }, xi ∈ RF as in(l)
(l)
(l)
(l)
put, and maps them to H(l) = {h1 , h2 , · · · , hN }, hi ∈(l)
Rd . The idea is to compute an embedded representation

of each node v ∈ V , by aggregating its 1-hop neighbor(l−1)
hood nodes {hv, ∀v ∈ N (u)} following a self-attention(l)(l)
mechanism Att: Rd × Rd → R (Veličković and others 2018). Different from the original (Veličković and others 2018), we leverage the edge weights of the underlying
graph. The modified attention αvu ∈ R can be expressed asa single feed-forward layer of xv and xw with edge weight
evu :
(l−1)
αwv
= Att(Wa h(l−1), Wa h(l−1))
wv= LeakyReLU((a)

|

(12)

[Wa h(l−1)
kWa h(l−1)])ewv ,wv
(13)

where α is the attention weight on v → u and indicatesthe importance of node j’s features to node i. It allows every node to attend all the other nodes on the graph based on
their node features, weighted by the underlying connectivity.
(l)
(l−1)
The Wa ∈ Rd ×d
is a learnable linear transformationthat maps each node’s feature vector from dimension d(l−1)
to the embedded dimension d(l) . The attention mechanism
Att is implemented by a nodal attributes learning vector(l)a ∈ R2d and LeakyRelu with input slope = 0.2. For explanation purpose, in order to make coefficients comparable
cross different edges, we normalized the weights across thesource nodes:
αvw
α̃vw = P(14)w∈N (v) αvw
where T (v) is the target nodes set where v points to. Then,
there will be an attention embedding layer before graph convolutional layer:
X
(l−1)
h(l)
α̃vw
Wa h(l−1)
.
(15)
v =
w
w∈N (v)

Then we average the attention over the layers.

4.4

Culturing Node Class Sensitivity

For each node u, we computed the sensitivity of labeling it
as class i ∈ {0, . . . , C − 1} with respect to all nodes in thecomputational graph v, w ∈ Vc (u) \ u∂ ŷ C∂ ŷ 1
ReLU (k ∂xuv k) . . . ReLU (k ∂xuv k)


..
..
..
,

(16)
.
.
.


1
C
∂ ŷu
∂ ŷu
Relu(k ∂xw k) . . . ReLU (k ∂xw k)

ground truth for the explanation. In order to evaluate the results, we propose the evaluation metrics for quantitatively
measuring the explanation results and propose the correlation methods to validate if edge connection patter or nodefeature is the crucial factor for classification. We define
metrics consistency, contrastivity and sparsity (Here, definition of contrastivity andsparsity are different from theones in(Pope et al. 2019)) to measure informative component detection results. Firstly, To measure the similarity between graphs, we introduce graph edit distance (GED) (AbuAisheh et al. 2015), which is a graph similarity measure
analogous to Levenshtein distance for strings. It is definedas minimum cost of edit path (sequence of node and edge
edit operations) transforming graph G1 to graph isomorphic
to G2. In case the structure is isomorphic but edge weights
are different. If GED=0, Jensen-Shannon Divergence (JSD)(Nielsen 2010), is added on GED to further compare the two
isomorphic subgraphs. Specifically, we design consistency
as the GED between the informative subgraphs of the nodein the same class, as whether the informative components
detected for the node in the same class are consist; and design contrastivity as the GED across the informative subgraphs of the node in the same class, as and whether the
informative components detected for the node in the different class
P are contrastive; Sparsity is defined as the density ofmask evw ∈Gc (u) Υvw /Q, Υ ∈ {M, g E }, as the density ofcomponent edge importance weights.

6

Experiments

Note that, the color codes for all the figures below follow theon denoted in Figure 2. The red node is the node we try toclassify and explain.

6.1

Synthetic Data

Data Following (Ying et al. 2019), we generated a
Barabási–Albert (BA) graph with 15 nodes and attached 10
five-node house-structure graph motifs are attached to random nodes, ended with 65 nodes in Figure 2. We createda small graph for visualization purpose. However, the experiment results held for large graphs. Several natural andhuman-made systems, including the Internet, citation networks, social networks, and banking payment system can bethen we clustered each row vector of the previous matrix, toobtain the set of neighbour nodes that have same contribution pattern to classify node u to each of class i ∈ IC .
This method can be used to validate if the nodes on informative subgraph have the same node feature sensitivity.
Also, it can show the similarity between the neighbors in
Gc .

5

Evaluation Metrics and Methods

For synthetic data, we can compare explanation with data
generation rules. However, for real data, we do not have

Figure 2: Synthetic BA-house graph data and corresponding edge weights, each BA node belongs to class ”0,” andeach ”house” shape node belongs labeled ”1-3” based on its
motif. The node orders are denoted.

on 2-D space by T-SNE (Maaten and Hinton 2008) in Figure
4 (a) ), since they were most sensitive to predicting node 20
to class 1, which matched the informative components (4(b)) shown in main paper. The other clusters grouped thenodes in Gc (u) by their saliency sensitive to a certain classin {0, 2, 3}.
This method can be used to validate if the nodes on informative subgraph have the same node feature sensitivity.
Also, it can show the similarity between the neighbors in
Gc .

Figure 3: Informative Components. Row a)-c), w = 0.1.
Row a) is for the node in class one not connecting to class
0 nodes using MMI mask. Row b) is for the node in classone connecting to class 0 nodes using MMI mask. Row c) isfor the node in class one connecting to class 0 nodes using
GGD. Row d) is for the node in class one connecting to class
0 nodes using E-GAT. Row e) is for the node in class one
connecting to class 0 nodes using MMI mask, but w = 2.
Table 1: Saliency component compared with ’house’ shape(Measuring on all the nodes in class 1 with w = 0.1)
MethodMMI mask GGD E-GAT
AUC

0.932

0.899

0.667

thought to be approximately a BA graph, which certainlycontains few nodes (hubs) with unusually high degree and a
big number of nodes poorly connected. The edges connecting with different node pairs were assigned different weights
denoted in Figure 2 as well, where w was an edge weight wewill discuss later. Then, we added noise to synthetic data by
uniformly randomly adding 0.1N edges, where N was thenumber of nodes in the graph. In order to constrain the nodelabel is determined by motif only, all the node feature xi wasdesigned the 2-D node attributes with the same constant.
(l)

GNN Training We use g = ēvu mvu in Eq. (4). The
parameters setting are input dim = 2, hidden dim = 8,
num layers = 3 and epoch =300. We randomly split 60%of the nodes for training and the rest for testing.
Results GNN achieved 100% and 96.7% accuracy on
training and testing dataset correspondingly. We performed
informative component detection (kept top 6 edges) andcompare them with human interpretation – the ’house
shape,’ which can be used as a reality check (Table 1). In
Figure 3, we showed the explanation results of the node in
the same place but has different topology structure (row a &b) and compared how eight weights affected the results (rowa & e). We also showed the results generated by different
methods (row a & c & d).
We showed a clustering results of node 20 on SynComp in
Figure 4. Node 21 − 24 were clustered together (visualized

Figure 4: Node class sensitivities clustering (a) and comparing with informative subgraph (b). Node orders are denoted
as numbers and node labels are denoted as colors.

6.2

Bitcoin OTC Data

Bitcoin is a cryptocurrency that is used for trading anonymously. There is counterparty risk due to anonymity. We
use Bitcoin dataset ((Kumar et al. 2018)) collecting in one
month, where Bitcoin users rate the level of trust to the users
they made transactions to. The rating scales are from -10 to+10 (except for 0). According to OTC’s guideline, the higher
the rating, the more trustworthy. We labeled the users whose
rating score had at list one negative score as risky; the users
whose more than half received ratings were greater than one
as trustworthy users; the users who did not receive any rating scores as an unknown group; and the rest of the users
were assigned to the neural group. We chose the rating network data at a time point, which contained 1447 users, 5739
rating records. We renormalized the edge weights to [0, 1]
by ẽij = eij /20 + 1/2. Then we trained a GNN on 90%
unknown, neutral and trustworthy node, 20% risky node,
those nodes only, and perform classification on the rest of
the nodes. We chose g as a GRU gate and the other settings are setting are hidden dim = 32, num layers = 3 andFigure 5: Informative subgraph detected by MMI mask
(showing the original rating scores on the edges).

Figure 6: Examples of informative components for account matching.
epoch =1000. Learning rate was initialized as 0.1, and decreased half per 100 epochs. We achieved accuracy 0.730 on
the training dataset and 0.632 on the testing dataset. Finally,
we showed the explanation result using MMI mask since it
is more interpretable (see Figure 5) and compared them withpossible human reasoning ones. The pattern of the informative component of the risky node contains negative rating;the major ratings to a trustworthy node are greater than 1;
and for the neutral node, it received lots of rating score 1.
The informative components match the rules of how we label the nodes.

6.3

Bank Transaction Data - Account Matching

We use a database of 1000 international payment transaction records, that involve four parties, the originating (ORG)
account, the sending (SND) bank, the receiving (RCV)bank and the beneficiary (BEN) account. Each party plays
a role in the transaction, and the set of possible roles is
I4 = {ORG, SND, RCV, BEN}. The task is to classify eachnode as being either an account (ORG or BEN) or a bank
(SNF or RCV), since the input graph data is noisy. For this,
we build a transaction graph using the payment data, nodes
are accounts of banks; the transactions between the nodes
are the directed edges in the graph; and transaction amounts
are the edge features. Furthermore, each node is associatedwith categorical features (’party ID type’ and ’country’).
We used one hot encoding to convert the node features to
10 × 1 vectors, and edge features were normalized to [0, 1].
We labeled 10% of the data and trained a GNN to classify
each account as a bank and costumer account. We use thesame GNN architecture as described in synthetic data experiments, and use Adam optimization method with fixed learning rate 0.01 and trained the model for 100 epochs until convergence. The accuracy of node classification task achieved
is 100%. Using our explanation algorithm, we present a visualization of the informative components detected for eachaccount type - costumer account or bank account in Figure
6.
For the above two real datasets, we measured consistency, contrastivity, and sparsity by selecting the top 4 edges.
Since when attention layer was added in GNN, we could
not achieve good classification results in the real datasets,
we only applied MMI mask and GGD methods for informative components detection in the real data. The measurement of MMI mask and GGD methods are listed in Table 2.
The higher contrastility values compared with consistency
value, shows GNN replied on data topolgy information for
node classification and nodes in the same class have similar

Table 2: Evaluate informative components(Average on all the correctly classified nodes )DatasetConsistency Contrastivity Sparsity
BitCoin
1.79
3.23
0.126
MMI Account
1.25
1.93
0.021
Bitcoin
2.17
2.90
0.124
1.44
1.89
0.095
GGD Accounttopology structure. Low spasity values indicate the informative components have high information entropy, showing thepotential of the explanation methods to extract informative
patterns from the financial data.

7

Conclusion

In this work, we formulate the transaction data in financial
system as a weighted directed graph. We apply explanation
methods on weighted graph in GNN node classification task,
which can provide subjective and comprehensive explanations of data interaction patterns used in GNN. We also propose evaluation metrics and methods to validate the explanation results. The explanations may benefit debugging, feature engineering, informing human decision-making, building trust, etc. Our future work will include extending the
explanation to graphs with multi-dimensional edge featuresand explaining different graph learning tasks, such as link
prediction and graph classification.

References
Abu-Aisheh, Z.; Raveaux, R.; Ramel, J.-Y.; and Martineau,
P. 2015. An exact graph edit distance algorithm for solving
pattern recognition problems.
Baldassarre, F., and Azizpour, H. 2019. Explainability techniques for graph convolutional networks. arXiv preprint
arXiv:1905.13686.
Battaglia, P. W.; Hamrick, J. B.; Bapst, V.; SanchezGonzalez, A.; Zambaldi, V.; Malinowski, M.; Tacchetti, A.;
Raposo, D.; Santoro, A.; Faulkner, R.; et al. 2018. Relational inductive biases, deep learning, and graph networks.
arXiv preprint arXiv:1806.01261.
Cover, T. M., and Thomas, J. A. 2012. Elements of information theory. John Wiley & Sons.
Gong, L., and Cheng, Q. 2019. Exploiting edge features
for graph neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 9211–
9219.

Hamilton, W.; Ying, Z.; and Leskovec, J. 2017. Inductive
representation learning on large graphs. In Advances in Neural Information Processing Systems, 1024–1034.
Kipf, T. N., and Welling, M. 2016. Semi-supervised classification with graph convolutional networks. arXiv preprint
arXiv:1609.02907.
Kumar, S.; Hooi, B.; Makhija, D.; Kumar, M.; Faloutsos, C.;
and Subrahmanian, V. 2018. Rev2: Fraudulent user prediction in rating platforms. In Proceedings of the Eleventh ACM
International Conference on Web Search and Data Mining,
333–341. ACM.
Maaten, L. v. d., and Hinton, G. 2008. Visualizing data using
t-sne. Journal of machine learning research 9(Nov):2579–
2605.
Nielsen, F. 2010. A family of statistical symmetric divergences based on jensen’s inequality. arXiv preprint
arXiv:1009.4004.
Pope, P. E.; Kolouri, S.; Rostami, M.; Martin, C. E.; andHoffmann, H. 2019. Explainability methods for graph convolutional neural networks. In Proceedings of the IEEE
Conference on Computer Vision and Pattern Recognition,
10772–10781.
Schlichtkrull, M.; Kipf, T. N.; Bloem, P.; Van Den Berg, R.;
Titov, I.; and Welling, M. 2018. Modeling relational datawith graph convolutional networks. In European Semantic
Web Conference, 593–607. Springer.
Selvaraju, R. R.; Cogswell, M.; Das, A.; Vedantam, R.;
Parikh, D.; and Batra, D. 2017. Grad-cam: Visual explanations from deep networks via gradient-based localization. In
Proceedings of the IEEE International Conference on Computer Vision, 618–626.
Shang, C.; Liu, Q.; Chen, K.-S.; Sun, J.; Lu, J.; Yi, J.; andBi, J. 2018. Edge attention-based multi-relational graphconvolutional networks. arXiv preprint arXiv:1802.04944.
Simonyan, K.; Vedaldi, A.; and Zisserman, A. 2013. Deep
inside convolutional networks: Visualising image classification models and saliency maps.
Veličković, P., et al. 2018. Graph attention networks. In
ICLR.
Yang, H.; Li, X.; Wu, Y.; Li, S.; Lu, S.; Duncan, J. S.; Gee,
J. C.; and Gu, S. 2019. Interpretable multimodality embedding of cerebral cortex using attention graph network for
identifying bipolar disorder. MICCAI 671339.
Ying, R.; Bourgeois, D.; You, J.; Zitnik, M.; and Leskovec,
J. 2019. Gnn explainer: A tool for post-hoc explanation ofgraph neural networks. arXiv preprint arXiv:1903.03894.
Zhang, J.; Bargal, S. A.; Lin, Z.; Brandt, J.; Shen, X.; andSclaroff, S. 2018. Top-down neural attention by excitation backprop. International Journal of Computer Vision
126(10):1084–1102.
Zhang, Z.; Cui, P.; and Zhu, W. 2018. Deep learning ongraphs: A survey.
Zhou, J.; Cui, G.; Zhang, Z.; Yang, C.; Liu, Z.; Wang, L.; Li,C.; and Sun, M. 2018. Graph neural networks: A review ofmethods and applications.