DEDGAT: Dual Embedding of Directed Graph Attention Networks for Detecting Financial Risk

Jiafu Wu, Mufeng Yao, Dong Wu, Mingmin Chi, Baokun Wang, Ruofan Wu, Xin Fu, Changhua Meng, Weiqiang Wang

TL;DR

Standard Graph Attention Networks (GATs) suffer from a severe "directional bias" when applied to directed financial networks, heavily prioritizing incoming transactions over outgoing ones. To fix this, the authors introduce DGAT and DEDGAT, novel architectures that separate in-degree and out-degree attention mechanisms and assign dual embeddings to each node, leading to state-of-the-art performance in financial fraud and money laundering detection.

What Problem Does This Paper Address?

In financial risk control, data is inherently directed: money flows from Account A to Account B. A merchant or user node acts as both a receiver (revenue) and a sender (expenses), and both behaviors are critical for identifying anomalies like fraud or money laundering.

However, popular Graph Neural Networks (GNNs) and Graph Attention Networks (GATs) are primarily designed for undirected graphs. When applied to directed graphs, they exhibit a massive directional bias. Standard GATs heavily favor in-degree information (incoming edges) while neglecting out-degree information (outgoing edges). This blind spot prevents models from fully exploiting the rich structural context of transaction networks, limiting their accuracy in real-world financial risk scenarios.

Methods

The authors tackle directional bias by proposing two architectures:

  1. DGAT (Directed Graph ATtention network): Instead of aggregating all neighbors uniformly, DGAT explicitly splits the feature aggregation process into two parallel streams: one for inner neighbors (in-degree) and one for outer neighbors (out-degree). It calculates separate attention weights for each direction before combining them.
  2. DEDGAT (Dual Embedding DGAT): Recognizing that a node's behavior as a sender might look completely different from its behavior as a receiver, DEDGAT takes separation a step further. It assigns two distinct embeddings to every single node: an in-degree representation ($t_i$) and an out-degree representation ($s_i$). These dual embeddings are used independently to calculate incoming and outgoing attention weights, allowing the model to capture decoupled behavioral patterns.
Different Aggregation processes between GAT, DGAT, and DEDGAT.

Datasets

The models were evaluated on three large-scale directed graph datasets for financial risk control:

  • Elliptic: An open-source dataset used to detect money laundering in Bitcoin transactions (203,769 nodes, 234,355 edges).
  • Ant: A massive, self-collected dataset from Ant Group focused on detecting financial fraud from transfer records (1,296,486 nodes, 1,785,844 edges).
  • DGraphFin: An open-source financial network dataset for fraud detection based on social and deployment relationships (3,700,550 nodes, 4,300,999 edges).

Key Insights and Ideas

  • Quantifying the Bias: Using GNNExplainer to evaluate edge importance, the authors discovered that standard GAT considers incoming edges to be 1.73 times more important than outgoing edges. This confirms that standard attention mechanisms effectively ignore half of the graph's directional context.
  • Nodes Wear Two Hats: A single feature vector is insufficient for directed graphs. By splitting a node into two virtual entities (a sender and a receiver) via dual embeddings, the network learns a much more granular representation of financial behavior.
  • Industrial Scalability: To prove the practical viability of DEDGAT, the authors implemented it on Ant Group's AGL (Ant Graph Machine Learning) framework. The system successfully trained a 2-layer GAT on an industrial graph containing billions of nodes and hundreds of billions of edges in just 14 hours.

Key Results

DEDGAT consistently achieved state-of-the-art performance across all benchmarks, outperforming standard GCN, GAT, GraphSage, and specialized directed graph models like DGCN and MagNet.

Node Classification Performance (AUC): * Elliptic: DEDGAT reached 96.18% (compared to GAT's 95.06%). * Ant: DEDGAT reached 98.16% (compared to GAT's 97.43%). * DGraphFin: DEDGAT reached 81.37% (compared to GAT's 76.24%).

Qualitatively, the dual-embedding approach completely eliminated directional bias. As shown in the paper's post-hoc analysis, DGAT and DEDGAT achieve a near-perfect 50/50 balance in the importance metrics of incoming vs. outgoing edges.

Figure 4: The proportion of in-degree and out-degree edge weights when their importance scores are larger than 0.5. The proportion of the in-degree edge weights of GAT is 1.73 times than that of the out-degree ones, while the proportion of the two directional edge weights in the proposed DGAT and DEDGAT is almost the same.

Limitations and Future Work

The authors focus exclusively on node classification within financial risk frameworks. While they demonstrate excellent scalability on massive graphs, they do not explicitly discuss how DEDGAT handles highly dynamic or time-evolving graphs—a common trait in real-time fraud detection where transaction patterns change rapidly. Future work could also explore extending this dual-embedding approach to edge-level tasks (like link prediction) or testing its efficacy on non-financial directed domains, such as web page ranking or citation networks.

Summary updated

BibTeX
@misc{wu2023dedgat,
  author = {Jiafu Wu and Mufeng Yao and Dong Wu and Mingmin Chi and Baokun Wang and Ruofan Wu and Xin Fu and Changhua Meng and Weiqiang Wang},
  title = {{DEDGAT: Dual Embedding of Directed Graph Attention Networks for Detecting Financial Risk}},
  year = {2023},
  eprint = {2303.03933},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2303.03933},
}
Figure