betaFeedback

WorksComputer Science

LLM-Enhanced Heterogeneous Graph Learning with Business Semantics for Financial Fraud Detection

Abstract

Financial fraud detection increasingly relies on heterogeneous transaction graphs, in which entities such as cards and merchants play distinct business roles and the risk meaning of an attribute depends on the entity's role: a high transaction volume may be routine for a merchant but unusual for a card. Heterogeneous graph neural networks preserve typed entities and relations but typically treat these attributes as role-agnostic inputs and leave their business meaning implicit. Meanwhile, most existing methods integrating large language models (LLMs) with graphs focus on homogeneous graphs or heterogeneous graphs with naturally available textual attributes, leaving their use on transaction graphs with structured attributes underexplored. To address this issue, we propose SemHGT, an LLM-enhanced framework that interprets structured attributes according to entity roles and makes the business semantics explicit in three stages: (1) role-aware prompts elicit risk-related business descriptions from node attributes, and a text encoder maps them to semantic vectors that enrich node representations; (2) semantic similarity guides multi-round sampling of target-specific path instances under transaction-to-transaction schemas; (3) schema-level tokens that combine local path evidence with global neighbor summaries are processed together with the target transaction by a unified transformer. Across three benchmark datasets, SemHGT leads the evaluated baselines on most dataset–metric comparisons. Further analyses provide additional evidence for the effectiveness of SemHGT's design and clarify how its semantic modeling and evidence selection contribute to fraud detection. Code is available at https://anonymous.4open.science/r/SemHGT-528A/.

CCS Concepts

• Information systems → Data mining.

Introduction

Transactions arising from Web-based commerce are naturally represented as heterogeneous graphs [1, 17, 40]. A transaction can be linked to different kinds of entities, such as cards, accounts, merchants, devices, and locations, through relations with distinct meanings [1, 6, 40]. These typed entities and interactions provide complementary evidence for fraud detection: a target transaction may be suspicious because of the behavior of an associated entity [4] or because it participates in a repeated relational pattern [16]. By representing all entities with a single node type and all interactions with a single edge type, a homogeneous graph would obscure these roles and make it difficult to distinguish the evidence conveyed by different connections [12, 30].

Heterogeneous graph neural networks (HGNNs) offer a principled way to preserve this structure. Meta-path-based models aggregate information along predefined typed schemas [7, 30], while meta-path-free models use type- and relation-aware message passing [12, 26, 35]. More recent heterogeneous graph transformers further incorporate structural and relational encodings into attention [20, 23, 29]. Fraud-oriented graph neural networks (GNNs) address task-specific challenges by modeling temporal transaction behavior [31], mitigating neighborhood camouflage through label-aware neighbor selection [4], addressing class imbalance with label-balanced sampling [16], and capturing attribute-association patterns across graph neighborhoods [5]. Despite these advances, real-world financial fraud detection presents a distinct semantic challenge. Transaction networks involve entities with different business roles and their node attributes consist primarily of structured numerical and categorical fields rather than natural-language text. Interpreting these attributes requires accounting for the role of each entity: high transaction volume, for example, may reflect routine merchant activity but unusual behavior for a card. Such role-dependent risk implications are not explicit in the raw attributes.

Large language models (LLMs) have been used in graph learning to provide textual features and auxiliary semantic supervision [8, 11]. However, most existing LLM-enhanced graph methods focus on homogeneous graphs or heterogeneous graphs with naturally available textual attributes, leaving heterogeneous transaction graphs with predominantly structured attributes less explored. Recent fraud-detection studies employ graph-conditioned prompting [15] and LLM-guided contrastive objectives [25], but the use of role-aware business semantics in heterogeneous fraud detection remains limited. Such semantics can enrich node representations with risk-related information and guide target-specific sampling of local evidence under typed relations. Their joint use in these two stages remains underexplored. To address this gap, we propose the Semantics-enhanced Heterogeneous Graph Transformer (SemHGT), an LLM-enhanced framework for financial fraud detection over heterogeneous transaction graphs.

SemHGT follows three stages. First, role-aware prompts elicit risk-related business descriptions from node attributes, and a text encoder maps them to semantic vectors that enrich node representations. Second, semantic similarity guides multi-round sampling of target-specific path evidence under predefined transaction-to-transaction schemas. Third, for each schema, the sampled local evidence is combined with a global summary of the target’s transaction neighbors to form a schema-level token. A unified transformer processes these tokens together with a token for the target transaction to predict fraud.

The main contributions can be summarized as follows:

  • We explore the use of LLM-derived, role-aware business semantics to enhance heterogeneous graph learning for financial fraud detection.

  • We propose SemHGT, an LLM-enhanced heterogeneous graph transformer framework that makes role-aware business semantics explicit, using them to enrich node representations and guide target-conditioned path evidence selection for financial fraud detection.

  • We evaluate SemHGT on three benchmark datasets, where it leads the evaluated baselines on most dataset–metric comparisons. Further analyses provide evidence for the effectiveness of the design and clarify how semantic modeling and evidence selection contribute to fraud detection.

Related Work

GNNs for Financial Fraud Detection. Graph neural networks (GNNs) learn node representations by propagating and aggregating information over graph connections. Financial transaction graphs contain multiple entity and relation types, motivating heterogeneous graph neural networks (HGNNs) that preserve typed connectivity. Meta-path-based models aggregate information along predefined typed schemas: HAN [30] combines meta-path neighbors and schemas through hierarchical attention, while MAGNN [7] encodes intermediate entities within each path instance. Meta-path-free models instead parameterize message passing using node and relation types, as in R-GCN [26], HGT [12], and R-HGNN [35]. Further approaches, including SlotGAT [41], HINormer [23], and PHGT [20], explore slot-based aggregation, sampled structural contexts, and schema-aware tokens. Together, these methods offer increasingly expressive ways to encode heterogeneous structure.

GNNs for financial fraud detection further adapt graph learning to fraud-specific challenges. GTAN [31] captures temporal transaction behavior with gated temporal attention; CARE-GNN [4] uses label-aware neighbor selection to mitigate feature and relation camouflage; PC-GNN [16] addresses class imbalance through label-balanced subgraph construction and sampling; and GAAP [5] models attribute-association patterns across graph neighborhoods. While these methods exploit temporal, neighborhood, and attribute-association signals, they do not explicitly incorporate semantic information as a complementary signal for fraud detection.

Integrating LLMs with Graphs. Research integrating large language models (LLMs) with graphs follows two complementary directions. Graph-enhanced LLMs incorporate graph structure or neighborhood information into language-model inputs or training. THLM [42] uses topology-aware context-graph prediction during pre-training, while HiGPT [28] expresses heterogeneous graph tasks through graph instructions to support cross-graph transfer. For fraud detection, DGP [15] uses dual-granularity prompts to retain detailed information about the target while summarizing its graph neighborhood, making graph context available to an LLM-based classifier. However, the computational cost of LLM-based inference can limit the scalability of graph-enhanced LLMs, particularly in large-scale industrial applications.

LLM-enhanced GNNs use language-model outputs to provide features, auxiliary supervision, or data for a graph encoder. TAPE [11] converts LLM-generated explanations into features for GNNs on text-attributed graphs. Other approaches apply LLMs to heterogeneous graph learning by generating minority-class nodes and edges, as in LLM-HetGDT [22], or completing missing attributes before graph encoding, as in HINAC [24]. MH-LGC [25] uses LLM-guided contrastive learning in a multi-view hypergraph detector. Together, these studies use LLMs to provide graph features, graph-conditioned predictions, training signals, or additional graph data. Despite this progress, most existing LLM-enhanced graph methods target homogeneous graphs or heterogeneous graphs whose nodes already carry natural-language text. Still, financial fraud detection often involves heterogeneous transaction graphs whose node attributes consist primarily of structured numerical and categorical fields rather than natural-language text.

Method

Problem Formulation and Framework Overview

Let G=(V,E,T,R)\mathcal{G} = (\mathcal{V}, \mathcal{E}, \mathcal{T}, \mathcal{R}) denote a heterogeneous transaction graph, where V\mathcal{V} and E\mathcal{E} are its node and edge sets, and T\mathcal{T} and R\mathcal{R} are its node- and relation-type sets. Each node v∈Vv \in\mathcal{V} has type τ(v)∈T\tau(v) \in\mathcal{T} and structured attributes xv\mathbf{x}_v. Let Vtxn⊂V\mathcal{V}_{\mathrm{txn}} \subset\mathcal{V} be the transaction nodes. Given a target transaction i∈Vtxni \in\mathcal{V}_{\mathrm{txn}}, the task is to predict its binary fraud label yi∈{0,1}y_i \in\{0, 1\}, where 11 denotes fraud and 00 denotes benign.

Let S={r1,…,rR}\mathcal{S} = \{r_1, \ldots, r_R\} be the predefined transaction-to-transaction path schemas. As shown in Figure 1, SemHGT follows three stages: it first enhances typed node representations with role-aware business semantics, then samples and encodes target-specific path evidence under each schema, and finally fuses each local path summary with the global summary of the target’s transaction neighbors to form one schema-level token. A transformer processes these tokens together with a token representing the target transaction.

Role-Aware Semantic Enhancement

LLM-Based Description Generation. The risk implications of an attribute depend on the entity’s business role. We therefore use a role-aware prompt Φτ(v)\Phi_{\tau(v)} to interpret the attributes of node vv in light of corresponding reference statistics. The language model generates a risk-related business description, which a frozen text encoder maps to a normalized semantic vector:

dv=LLM⁡Φτ(v)(xv),sv=Enc⁡(dv)∥Enc⁡(dv)∥2.(1)d_v = \operatorname{LLM}_{\Phi_{\tau(v)}}(x_v), \qquad s_v = \frac{\operatorname{Enc}(d_v)}{\lVert\operatorname{Enc}(d_v) \rVert_2}. \tag*{(1)}

The complete prompt templates are provided in Appendix § 10.

Semantic Node Enhancement. For each node type, separate projections map the raw attributes and semantic vector to a common dd-dimensional space, yielding raw-feature representation rvr_v and semantic representation qvq_v:

rv=fτ(v)raw(xv),qv=fτ(v)sem(sv).(2)r_v = f^{\mathrm{raw}}_{\tau(v)}(x_v), \qquad q_v = f^{\mathrm{sem}}_{\tau(v)}(s_v). \tag*{(2)}

We use a feature-wise gate to inject semantic information without discarding the structured representation:

gv=σ(Wτ(v)g[rv∥qv]+bτ(v)g),hv=LN⁡(rv+αgv⊙qv).(3)g_v = \sigma\left(W^g_{\tau(v)}[r_v \mathbin{\|} q_v] + b^g_{\tau(v)}\right), \qquad h_v = \operatorname{LN}(r_v + \alpha g_v \odot q_v). \tag*{(3)}

Here, Wτ(v)gW^g_{\tau(v)} and bτ(v)gb^g_{\tau(v)} are type-specific learnable parameters, σ\sigma is the sigmoid function, and α\alpha is a learnable scalar. The gate controls the semantic contribution to the raw-feature representation, producing the enhanced representation hvh_v used in path sampling and token construction.

Semantic-Guided Local Evidence Construction

Semantic-Guided Path Sampling. For schema r∈Sr \in\mathcal{S}, a path instance is an ordered typed sequence

ξ=(u,a1,…,am,v),r(ξ)=r,(4)\xi= (u, a_1, \ldots, a_m, v), \qquad r(\xi) = r, \tag*{(4)}

where u,v∈Vtxnu,v \in\mathcal{V}_{\mathrm{txn}} are the endpoint transactions and a1,…,ama_1,\ldots,a_m are the intermediate nodes along schema rr. For example, TT–WW–TT denotes two transaction nodes (TT) connected through a wallet node (WW).

Starting from target ii, the sampler expands for a fixed number of rounds. For a frontier transaction uu and a candidate endpoint transaction vv, it scores the candidate by

qi(u,v)=λsuTsv+(1−λ)siTsv.(5)q_i(u,v) = \lambda s_u^{\mathsf{T}}s_v + (1-\lambda)s_i^{\mathsf{T}}s_v. \tag*{(5)}

Here, λ∈[0,1]\lambda\in[0,1] controls the relative weight of similarity to the current frontier transaction uu and the target transaction ii, with weights λ\lambda and 1−λ1-\lambda, respectively. Since the semantic vectors are normalized, both similarities are cosine similarities. Candidates are ranked independently per schema, and at most krk_r path instances are retained for schema rr in each sampling round, subject to its candidate cap and the shared context budget. The retained set for target ii and schema rr, denoted by Ξir\Xi_i^r, accumulates the selected paths across rounds. Selected paths are added atomically, preserving their intermediate nodes under the node budget.

Each round expands from the transaction endpoints reached in the previous round, allowing the sampled evidence to span multiple relations, such as TT–Card–TT–Merchant–TT.

Local Path Encoding and Pooling. To summarize the sampled local evidence, each retained instance ξ=(u,a1,…,am,v)\xi=(u,a_1,\ldots,a_m,v) is encoded in typed order by a GRU [2]:

ui,ξ=GRU⁡(hu,ha1,…,hv)last.(6)\mathbf{u}_{i,\xi} = \operatorname{GRU}(h_u,h_{a_1},\ldots,h_v)_{\mathrm{last}}. \tag*{(6)}

The final GRU state ui,ξ\mathbf{u}_{i,\xi} represents the path. For each schema, target-conditioned attention weights and pools the retained path states:

ai,ξ=(Wpui,ξ)T(Whhi)da,ωi,ξ=softmax⁡ξ∈Ξir(ai,ξ),(7)a_{i,\xi} = \frac{(W_p\mathbf{u}_{i,\xi})^{\mathsf{T}}(W_hh_i)}{\sqrt{d_a}}, \qquad\omega_{i,\xi} = \operatorname{softmax}_{\xi\in\Xi_i^r}(a_{i,\xi}), \tag*{(7)}
pi,r=∑ξ∈Ξirωi,ξui,ξ.(8)\mathbf{p}_{i,r} = \sum_{\xi\in\Xi_i^r}\omega_{i,\xi}\mathbf{u}_{i,\xi}. \tag*{(8)}

Here, WpW_p and WhW_h project into a dad_a-dimensional attention space, ai,ξa_{i,\xi} is the path–target score, ωi,ξ\omega_{i,\xi} is its within-schema normalized weight, and pi,r\mathbf{p}_{i,r} is the pooled local summary for schema rr.

Schema-Token Construction and Prediction

Global Neighbor Summary. For each schema rr, let Nr(i)\mathcal{N}_r(i) contain the transaction neighbors of target ii in the observable graph induced by rr. We summarize this neighborhood by averaging their enhanced representations:

ci,r=Mean⁡{hj:j∈Nr(i)},ti,r(0)=frel(ci,r)+er.(9)\mathbf{c}_{i,r} = \operatorname{Mean}\{h_j : j \in\mathcal{N}_r(i)\}, \qquad\mathbf{t}_{i,r}^{(0)} = f_{\mathrm{rel}}(\mathbf{c}_{i,r}) + \mathbf{e}_r. \tag*{(9)}

The learned projection frelf_{\mathrm{rel}} maps the schema mean to the relation-token space, and the learned schema embedding er\mathbf{e}_r gives the initial token ti,r(0)\mathbf{t}_{i,r}^{(0)} its schema identity.

Local–Global Fusion. The pooled local path summary is fused only with the token of its own schema using a feature-wise gated residual:

γi,r=σ(Wγ[ti,r(0)∥p~i,r]+bγ),ti,r=ti,r(0)+γi,r⊙p~i,r.(10)\gamma_{i,r} = \sigma\left(W_\gamma[\mathbf{t}_{i,r}^{(0)} \mathbin{\|} \widetilde{\mathbf{p}}_{i,r}] + \mathbf{b}_\gamma\right), \qquad\mathbf{t}_{i,r} = \mathbf{t}_{i,r}^{(0)} + \gamma_{i,r} \odot\widetilde{\mathbf{p}}_{i,r}. \tag*{(10)}

Here, p~i,r=fadapt(pi,r)\widetilde{\mathbf{p}}_{i,r}=f_{\mathrm{adapt}}(\mathbf{p}_{i,r}) is the projected local summary; WγW_\gamma and bγ\mathbf{b}_\gamma are learnable gate parameters; and γi,r\gamma_{i,r} controls its contribution. The resulting ti,r\mathbf{t}_{i,r} is the final schema-level token.

Token Sequence and Prediction. We construct the root token as ti,0=froot(hi)+e0\mathbf{t}_{i,0}=f_{\mathrm{root}}(h_i)+\mathbf{e}_0, where frootf_{\mathrm{root}} is a learned projection and e0\mathbf{e}_0 is a learned root identity embedding. The initial transformer input contains this root token and one schema-level token for every enabled schema:

Xi(0)=[ti,0;ti,1;…;ti,R],{r1,…,rR}=S.(11)X_i^{(0)} = [\mathbf{t}_{i,0};\mathbf{t}_{i,1};\ldots;\mathbf{t}_{i,R}], \qquad\{r_1,\ldots,r_R\}=\mathcal{S}. \tag*{(11)}

A transformer encoder [29] processes the sequence, and the final state of the target token, ziz_i, is used for classification:

ℓi=fcls(zi),p^i=softmax⁡(ℓi)1.(12)\ell_i = f_{\mathrm{cls}}(z_i), \qquad\widehat{p}_i = \operatorname{softmax}(\ell_i)_1. \tag*{(12)}

The classifier fclsf_{\mathrm{cls}} maps the final root state to class logits ℓi\ell_i; p^i\widehat{p}_i is the predicted fraud probability.

Image not extracted

Figure 1. Overview of SemHGT. Role-aware business semantics enhance node representations and guide target-conditioned path sampling. For each schema, SemHGT fuses the sampled local path summary with the average representation of the target’s transaction neighbors under that schema to construct a schema-level token. A unified transformer jointly processes the target token and all schema-level tokens for fraud prediction.

Image not extracted

Figure 2. Global and local context for a target transaction. Global context averages the transaction neighbors under each schema, while local context captures the selected target-relevant path evidence.

Algorithm 1 summarizes target-wise inference, from semantic enhancement and iterative path sampling to schema-token construction and fraud prediction.

Training Objective. The node projections, semantic gates, path encoder, relation adapter, transformer, and classifier are trained jointly, while the language model and text encoder remain frozen.

We optimize weighted cross-entropy over the labeled training transactions Vtrain\mathcal{V}_{\mathrm{train}}:

L=−1∣Vtrain∣∑i∈Vtrainwyilog⁡(softmax⁡(ℓi)yi)(13)\mathcal{L}=-\frac{1}{|\mathcal{V}_{\mathrm{train}}|}\sum_{i\in\mathcal{V}_{\mathrm{train}}}w_{y_i}\log\left(\operatorname{softmax}(\ell_i)_{y_i}\right) \tag*{(13)}

where wyiw_{y_i} is the loss weight for class yiy_i.

Target-wise Computational Complexity

For a target transaction ii, let CiC_i be the number of candidate paths scored across schemas and sampling rounds, and let Ξi=⋃r∈SΞir\Xi_i=\bigcup_{r\in\mathcal{S}}\Xi_i^r be the retained paths, with Pi=∣Ξi∣P_i=|\Xi_i|. Their average node count is mˉi=Pi−1∑ξ∈Ξi∣ξ∣\bar{m}_i=P_i^{-1}\sum_{\xi\in\Xi_i}|\xi|; for a path ξ=(u,a1,…,am,v)\xi=(u,a_1,\ldots,a_m,v), ∣ξ∣=m+2|\xi|=m+2. Let Di=∑r∈S∣Nr(i)∣D_i=\sum_{r\in\mathcal{S}}|\mathcal{N}_r(i)| be the total number of schema-specific transaction neighbors used in the global summaries. Scoring candidates costs O(Cids)O(C_i d_s), encoding the retained paths with the GRU costs O(Pimˉid2)O(P_i\bar{m}_i d^2), and aggregating global neighbors costs O(Did)O(D_i d). Thus, for fixed sampling rounds, schemas, and model dimensions, the leading target-dependent computation is

Ti=O(Cids+Pimˉid2+Did)(14)T_i=O(C_i d_s+P_i\bar{m}_i d^2+D_i d) \tag*{(14)}

where dsd_s is the semantic-vector dimension and dd is the hidden dimension. The transformer processes a fixed-length sequence of the target token and schema tokens, so its cost does not grow with the number of sampled paths.

Algorithm 1 Target-wise Inference in SemHGT

Require: Graph GG, target transaction ii, schemas S\mathcal{S}, and sampling rounds LL

Ensure: p^i\hat{p}_i

1: Obtain enhanced node representations hvh_v (Eq. (3))

2: Initialize Fi←{i}\mathcal{F}_i \leftarrow\{i\} and Ξir←∅\Xi_i^r \leftarrow\varnothing for all r∈Sr \in\mathcal{S}

3: for ℓ=1,…,L\ell= 1, \ldots, L do

4: Sample schema-consistent paths from Fi\mathcal{F}_i and score endpoints with qi(u,v)q_i(u,v) (Eq. (5))

5: Retain top-ranked paths under schema caps and context budget; update Ξir\Xi_i^r and Fi\mathcal{F}_i

6: end for

7: for all r∈Sr \in\mathcal{S} do

8: Encode each retained path ξ=(u,a1,…,v)\xi= (u,a_1,\ldots,v) with a GRU ui,ξ←GRU⁡(hu,ha1,…,hv)last, ξ∈Ξiru_{i,\xi} \leftarrow\operatorname{GRU}(h_u,h_{a_1},\ldots,h_v)_{\mathrm{last}},\ \xi\in\Xi_i^r (Eq. (6))

9: Pool path vectors with target-conditioned weights: pi,r←∑ξ∈Ξirωi,ξui,ξp_{i,r} \leftarrow\sum_{\xi\in\Xi_i^r} \omega_{i,\xi}u_{i,\xi} (Eqs. (7)–(8))

10: Form an initial schema token from the global neighbor summary (Eq. (9)) and fuse local evidence: ti,r←ti,r′+γi,r⊙fadapt(pi,r)t_{i,r} \leftarrow t_{i,r}^{\prime} + \gamma_{i,r} \odot f_{\mathrm{adapt}}(p_{i,r}) (Eq. (10))

11: end for

12: Form Xi(0)X_i^{(0)} from the root and schema tokens (Eq. (11))

13: Obtain the final target-token representation: zi←[transformer⁡(Xi(0))]0z_i \leftarrow[\operatorname{transformer}(X_i^{(0)})]_0

14: Compute p^i←softmax⁡(fcls(zi))1\hat{p}_i \leftarrow\operatorname{softmax}(f_{\mathrm{cls}}(z_i))_1

15: return p^i\hat{p}_i

Experiments

Experimental Setup

Datasets. We evaluate SemHGT on CreditCard, BankTrans, and Elliptic++. CreditCard and BankTrans are the heterogeneous financial fraud datasets constructed in FinFraudBench [1], while Elliptic++ is a transaction-and-wallet benchmark [6]. Each task is binary classification over transaction nodes. CreditCard and Elliptic++ are split chronologically into training, validation, and test periods in an approximate 6:1:3 ratio under an inductive protocol [10], whereas BankTrans uses a label-stratified 1:1:8 split under a transductive protocol [14]. In BankTrans, validation and test features and topology are available as unlabeled context during training, while their labels remain withheld. CreditCard and Elliptic++ are evaluated inductively on separate graph components for each temporal split, with no cross-split edges; both use the same split-aware policy for label-blind reference statistics. Table 1 summarizes graph sizes, transaction-label composition, and metapath schemas; further graph and split details appear in Appendix § 9.

DatasetNodesEdgesMetapaths
CreditCard# node types: 6<br># nodes: 1,860,300<br>Transaction: 1,852,394<br>Fraud: 9,651 (0.52%)<br>Customer: 2,817<br>Card: 2,817<br>Merchant: 2,079<br>Category: 42<br>Location: 151# edge types: 14<br># edges: 185,205,308TT–Customer–TT<br>TT–Card–TT<br>TT–Merchant–TT<br>TT–Category–TT<br>TT–Location–TT
BankTrans# node types: 6<br># nodes: 8,987,098<br>Transaction: 8,914,963<br>Fraud: 133,332 (0.15%)<br>Customer: 1,219<br>Card: 4,070<br>Merchant: 66,537<br>Category: 109<br>Location: 200# edge types: 14<br># edges: 89,227,542TT–Customer–TT<br>TT–Card–TT<br>TT–Merchant–TT<br>TT–Category–TT<br>TT–Location–TT
Elliptic++# node types: 2<br># nodes: 110,857<br>Transaction: 46,564<br>Fraud: 4,545 (9.76%)<br>Wallet: 64,293# edge types: 8<br># edges: 402,882TT–TT<br>TT–WW–TT<br>TT–WW–TT–WW–TT<br>TT–WW–WW–TT

Table 1. Statistics of the experimental graph views.

The main results use all transactions in each test split. The ablation study also uses the full CreditCard test split; all other analytical experiments use fixed, class-balanced subsets of their corresponding test sets. Appendix § 9.§ 3 reports the subset sizes and class counts.

Evaluation Metrics. We report Macro-F1, Fraud-F1, area under the precision–recall curve (AUPRC), and area under the receiver operating characteristic curve (AUROC). Macro-F1 averages the F1 scores of the benign and fraud classes equally, while Fraud-F1 focuses on precision and recall for the fraud class at the validation-selected threshold. AUPRC summarizes the precision–recall trade-off across thresholds and is informative under class imbalance [3]. AUROC measures how well the model ranks fraudulent transactions above benign ones across thresholds, complementing the threshold-dependent F1 measures.

Implementation Details. We use Qwen3-8B [32] to generate risk-related business descriptions and a frozen MPNet encoder [27] to map them to semantic vectors. The encoder produces 768-dimensional vectors, which are projected to 128 dimensions. The prediction transformer has two layers, four attention heads, a 128-dimensional hidden state, a feed-forward width of 256, and dropout 0.2. We train all datasets with AdamW [18] and weight decay 10−410^{-4}. Table 2 summarizes the epoch budgets, batch sizes, and learning rates.

DatasetMax epochs (patience)Batch sizeLearning rate
CreditCard40 (10)25610−310^{-3} (constant)
BankTrans50 (10)12810−4→10−510^{-4} \to10^{-5} (cosine)
Elliptic++40 (10)1283×10−43 \times10^{-4} (constant)

Table 2. Core dataset-specific training settings; early-stopping patience is shown in parentheses.

The local path schemas are dataset-specific. CreditCard and BankTrans use five schemas: TT–Customer–TT (same customer), TT–Card–TT (same card), TT–Merchant–TT (same merchant), TT–Category–TT (same category), and TT–Location–TT (same location). Elliptic++ uses four schemas: TT–TT (direct transaction link), TT–WW–TT (transactions sharing a wallet), TT–WW–TT (transactions connected through two intermediate wallets), and TT–WW–WW–WW–TT (transactions connected through three intermediate wallets). For each schema, the global component averages the representations of its transaction neighbors; the sampled local path summary is then fused into the corresponding schema-level token.

MethodCreditCard Macro-F1CreditCard Fraud-F1CreditCard AUPRCCreditCard AUROCBankTrans Macro-F1BankTrans Fraud-F1BankTrans AUPRCBankTrans AUROCElliptic++ Macro-F1Elliptic++ Fraud-F1Elliptic++ AUPRCElliptic++ AUROC
MLP72.41±0.1572.41 \pm0.1544.99±0.3144.99 \pm0.3140.83±0.2440.83 \pm0.2494.29±0.1494.29 \pm0.1454.47±0.6754.47 \pm0.679.17±1.419.17 \pm1.413.76±0.023.76 \pm0.0292.75±0.0292.75 \pm0.0279.10±0.6179.10 \pm0.6160.31±1.2060.31 \pm1.2059.57±0.5959.57 \pm0.5984.49±0.4184.49 \pm0.41
SlotGAT [41]76.62±0.4776.62 \pm0.4753.43±0.9353.43 \pm0.9347.68±1.0147.68 \pm1.0194.46±0.5194.46 \pm0.5186.64±0.6186.64 \pm0.6173.32±1.2173.32 \pm1.2167.95±1.8367.95 \pm1.8396.82±0.1196.82 \pm0.1174.25±3.1574.25 \pm3.1551.08±6.0651.08 \pm6.0649.82±7.3549.82 \pm7.3586.20±2.2386.20 \pm2.23
SimpleHGN [21]63.31±0.8963.31 \pm0.8926.89±1.7826.89 \pm1.7814.75±0.4014.75 \pm0.4084.80±0.1484.80 \pm0.1483.93±0.6583.93 \pm0.6567.92±1.2967.92 \pm1.2955.35±6.3755.35 \pm6.3796.02±0.2096.02 \pm0.2074.29±0.4974.29 \pm0.4951.55±0.9151.55 \pm0.9152.30±0.7452.30 \pm0.7487.56±0.3587.56 \pm0.35
FastGTN [37]73.91±0.3473.91 \pm0.3448.02±0.6848.02 \pm0.6847.72±0.7047.72 \pm0.7093.76±0.1293.76 \pm0.1257.31±1.5957.31 \pm1.5914.84±3.0614.84 \pm3.066.45±1.596.45 \pm1.5994.76±0.4094.76 \pm0.4077.23±0.4177.23 \pm0.4156.56±0.8056.56 \pm0.8060.20±0.7760.20 \pm0.7784.99±0.3484.99 \pm0.34
HAN [30]83.34±0.8883.34 \pm0.8866.81±1.7566.81 \pm1.7570.29±1.7270.29 \pm1.7296.97±0.3496.97 \pm0.3480.25±0.4280.25 \pm0.4260.55±0.8460.55 \pm0.8454.74±2.4754.74 \pm2.4794.35±0.4194.35 \pm0.4171.71±0.2271.71 \pm0.2247.58±0.4247.58 \pm0.4255.34±1.3755.34 \pm1.3785.30±0.2185.30 \pm0.21
SeHGNN [33]81.36±0.7581.36 \pm0.7562.86±1.5062.86 \pm1.5063.73±1.4163.73 \pm1.4197.04±0.1097.04 \pm0.1082.31±0.7482.31 \pm0.7464.67±1.4764.67 \pm1.4763.97±0.5363.97 \pm0.5395.86±0.2595.86 \pm0.2574.99±0.6674.99 \pm0.6652.83±1.1752.83 \pm1.1757.94±1.8957.94 \pm1.8986.52±0.6586.52 \pm0.65
R-GCN [26]77.11±1.4077.11 \pm1.4054.40±2.7954.40 \pm2.7955.28±2.2855.28 \pm2.2895.65±0.5695.65 \pm0.5687.30±0.2587.30 \pm0.2574.64±0.5074.64 \pm0.5069.95±2.0069.95 \pm2.0096.54±0.1096.54 \pm0.1061.86±0.7661.86 \pm0.7633.72±0.9833.72 \pm0.9859.87±1.8059.87 \pm1.8085.74±0.8185.74 \pm0.81
GCN [14]80.34±0.2080.34 \pm0.2060.80±0.4160.80 \pm0.4159.55±0.9059.55 \pm0.9095.03±0.1595.03 \pm0.1568.33±0.7768.33 \pm0.7736.75±1.5336.75 \pm1.5330.41±2.2830.41 \pm2.2896.11±0.0696.11 \pm0.0677.09±0.0877.09 \pm0.0856.51±0.0956.51 \pm0.0958.51±0.8458.51 \pm0.8485.99±0.7185.99 \pm0.71
R-HGNN [35]79.37±0.2379.37 \pm0.2358.90±0.4558.90 \pm0.4559.09±0.4859.09 \pm0.4895.12±0.8295.12 \pm0.8286.12±1.4086.12 \pm1.4072.29±2.8072.29 \pm2.8068.14±6.3768.14 \pm6.3796.90±0.0496.90 \pm0.0474.08±0.9274.08 \pm0.9250.97±1.7150.97 \pm1.7152.68±1.5452.68 \pm1.5487.20±0.4987.20 \pm0.49
HeSRN [19]52.62±3.1652.62 \pm3.168.02±3.978.02 \pm3.9714.78±8.1714.78 \pm8.1788.61±5.1388.61 \pm5.1382.38±5.4082.38 \pm5.4064.81±10.7964.81 \pm10.7959.03±12.6159.03 \pm12.6195.67±0.8695.67 \pm0.8670.30±0.2170.30 \pm0.2144.73±0.4344.73 \pm0.4343.04±3.0843.04 \pm3.0886.26±0.3386.26 \pm0.33
NARS [34]78.73±0.2778.73 \pm0.2757.61±0.5257.61 \pm0.5259.10±0.1959.10 \pm0.1993.33±0.4293.33 \pm0.4275.58±0.5275.58 \pm0.5251.23±1.0451.23 \pm1.0444.06±1.5744.06 \pm1.5797.00±0.1597.00 \pm0.1580.11±0.2880.11 \pm0.2862.30±0.5062.30 \pm0.5062.15±0.7762.15 \pm0.7786.26±0.2086.26 \pm0.20
LSPI [39]56.05±1.1956.05 \pm1.1912.29±2.3912.29 \pm2.3925.25±24.9425.25 \pm24.9472.51±25.3072.51 \pm25.3087.50±0.3587.50 \pm0.3575.03±0.7075.03 \pm0.7074.71±0.6074.71 \pm0.6096.90±0.4496.90 \pm0.4470.77±1.3970.77 \pm1.3944.82±2.8444.82 \pm2.8448.60±1.9648.60 \pm1.9686.90±0.0786.90 \pm0.07
HetTree [9]63.11±1.2563.11 \pm1.2526.38±2.4926.38 \pm2.4952.46±3.4152.46 \pm3.4192.14±0.9992.14 \pm0.9985.31±0.8485.31 \pm0.8470.65±1.6770.65 \pm1.6765.09±5.4065.09 \pm5.4096.79±0.2296.79 \pm0.2274.45±0.4674.45 \pm0.4651.62±0.8551.62 \pm0.8549.73±1.8849.73 \pm1.8885.84±0.1185.84 \pm0.11
MLED [13]65.79±0.4265.79 \pm0.4231.86±0.8431.86 \pm0.8414.25±0.9614.25 \pm0.9684.72±0.3684.72 \pm0.3677.72±2.1277.72 \pm2.1255.49±4.2455.49 \pm4.2454.13±6.1954.13 \pm6.1996.40±0.3796.40 \pm0.3772.77±1.1172.77 \pm1.1149.51±1.8549.51 \pm1.8559.06±0.9759.06 \pm0.9786.73±0.0286.73 \pm0.02
HetGNN [38]66.90±6.0166.90 \pm6.0134.29±11.7234.29 \pm11.7244.19±2.2844.19 \pm2.2896.10±2.3496.10 \pm2.3486.73±0.4586.73 \pm0.4573.50±0.8973.50 \pm0.8961.76±0.0361.76 \pm0.0396.87±0.2596.87 \pm0.2575.19±0.6875.19 \pm0.6853.29±1.3353.29 \pm1.3352.15±1.9552.15 \pm1.9587.13±0.3587.13 \pm0.35
GTN [36]68.90±8.2668.90 \pm8.2637.96±16.5037.96 \pm16.5052.59±3.3752.59 \pm3.3795.50±1.1195.50 \pm1.1187.81±0.5787.81 \pm0.5775.65±1.1475.65 \pm1.1473.45±1.7373.45 \pm1.7397.37±0.2197.37 \pm0.2176.88±1.9576.88 \pm1.9555.94±3.7555.94 \pm3.7558.52±3.7158.52 \pm3.7188.73±0.9888.73 \pm0.98
HGT [12]65.49±0.9365.49 \pm0.9331.30±1.8531.30 \pm1.8513.79±1.3213.79 \pm1.3284.18±0.7584.18 \pm0.7578.45±1.7978.45 \pm1.7956.95±3.5756.95 \pm3.5756.01±1.4456.01 \pm1.4497.30±0.1097.30 \pm0.1076.56±0.0876.56 \pm0.0855.64±0.1155.64 \pm0.1155.96±1.9455.96 \pm1.9486.34±0.8786.34 \pm0.87
GAAP [5]80.40±0.5080.40 \pm0.5060.93±0.9960.93 \pm0.9962.04±1.0162.04 \pm1.0197.82±0.1497.82 \pm0.1473.85±1.8473.85 \pm1.8447.77±3.6747.77 \pm3.6739.38±4.4839.38 \pm4.4896.83±0.2296.83 \pm0.2278.11±0.7378.11 \pm0.7358.24±1.4258.24 \pm1.4262.84±0.3262.84 \pm0.3284.96±0.4484.96 \pm0.44
SemHGT85.89±0.7085.89 \pm0.7071.89±1.3871.89 \pm1.3877.53±0.9877.53 \pm0.9898.46±0.2098.46 \pm0.2090.35±0.0990.35 \pm0.0980.72±0.1980.72 \pm0.1978.08±0.2478.08 \pm0.2496.86±0.4396.86 \pm0.4383.49±0.2783.49 \pm0.2768.77±0.5268.77 \pm0.5269.23±1.1469.23 \pm1.1490.00±0.7290.00 \pm0.72

Table 3. Main fraud-detection results on CreditCard, BankTrans, and Elliptic++. For each dataset, the table reports Macro-F1, Fraud-F1, AUPRC, and AUROC. All values are percentages, shown as mean ±\pm standard deviation across three runs. The best result in each metric column is boldfaced and shaded, and the second-best is underlined.

Baselines. The 18 baselines in Table 3 cover several modeling paradigms. MLP uses transaction attributes without graph propagation, and GCN [14] represents homogeneous graph learning. The heterogeneous graph baselines include relation- and type-aware models such as R-GCN, HAN, GTN, FastGTN, HGT, HetGNN, SimpleHGN, SeHGNN, R-HGNN, and NARS [12, 21, 26, 30, 33, 34, 35, 36, 37, 38]. We also compare with fraud-oriented graph methods, including SlotGAT, HeSRN, LSPI, HetTree, MLED, and GAAP [5, 9, 13, 19, 39, 41].

We train and evaluate the models using three random seeds. The language model and text encoder remain frozen. Training labels alone are used for optimization. We select checkpoints by corrected validation AUPRC and calibrate the F1 threshold on validation data; final metrics are computed over every test transaction, with test labels used only for this evaluation. We report the mean and sample standard deviation across seeds. Appendix A provides the per-schema sampling budgets, validation protocol, and model-training configuration.

Main Results

Table 3 compares SemHGT with the evaluated baselines on CreditCard, BankTrans, and Elliptic++. SemHGT leads all four metrics on CreditCard and Elliptic++. On BankTrans, it achieves the strongest Macro-F1, Fraud-F1, and AUPRC, while GTN attains a higher AUROC (97.37 versus 96.86).

The margins over the strongest baseline further show gains across multiple aspects of detection. On CreditCard, SemHGT improves Macro-F1, Fraud-F1, AUPRC, and AUROC by 2.55, 5.08, 7.24, and 0.64 percentage points, respectively. The corresponding gains on BankTrans are 2.54, 5.07, and 3.37 points for Macro-F1, Fraud-F1, and AUPRC; on Elliptic++, they are 3.38, 6.47, 6.39, and 1.27 points across the four metrics. The consistent gains in Fraud-F1 and

AUPRC provide complementary evidence: Fraud-F1 reflects the precision–recall balance for fraudulent transactions at the validation-calibrated threshold, while AUPRC summarizes this trade-off across thresholds. Their joint improvement therefore indicates gains both at the selected operating point and in ranking fraud cases, which is particularly relevant under class imbalance. Taken together, these results support the effectiveness of SemHGT for heterogeneous financial fraud detection.

Ablation Study

We run six controlled ablations on the full CreditCard test split to isolate the local and global components of the schema tokens and the two semantic enhancements. Let XX denote schema-level tokens built solely from sampled local path evidence, and YY denote schema-level tokens built from the average representations of transaction neighbors under each schema. We compare XX, YY, X+YX+Y, X+Y+aX+Y+a, X+Y+bX+Y+b, and the full configuration X+Y+a+bX+Y+a+b, where aa enables business-semantic node enhancement and bb enables semantic-similarity guidance during local path sampling. When bb is disabled, paths are sampled uniformly with the same schemas and sampling budget. Figure 3 reports Macro-F1 and Fraud-F1 for all six settings, enabling comparison of component effects.

Image not extracted

Figure 3. Ablation results on the full CreditCard test split for Macro-F1 and Fraud-F1 across six configurations combining local path evidence (X), global neighbor summaries (Y), and semantic enhancements. Dashed lines mark the X-only baseline, and annotations report the absolute percentage-point changes from this baseline for each configuration.

YY alone outperforms XX on both metrics, and combining the global and local components improves further. Adding either node-semantic enhancement or semantic-guided local path sampling to X+YX+Y yields additional gains, with the latter producing the larger improvement of the two. The full configuration achieves the highest scores, 87.53 Macro-F1 and 75.16 Fraud-F1, improving over XX by 17.29 and 34.38 percentage points, respectively.

YY summarizes schema-specific transaction-neighbor context, while XX retains selected typed-path evidence. The semantic modules act at different stages: aa enriches node representations, whereas bb guides target-specific path selection. The full configuration’s best scores support combining both semantic enhancements with local and global relational evidence.

Hyperparameter Sensitivity

We study four sampling parameters on the fixed, class-balanced CreditCard and Elliptic++ test subsets described above. The candidate-pool size controls how many path candidates are considered per schema, the context-node cap limits the total nodes retained in the sampled context, and the schema-quota multiplier scales the path quota for each schema. The semantic-score weight λ\lambda balances candidate similarity to the current frontier and to the target transaction. Figure 4 reports Macro-F1 and AUPRC for each setting.

Image not extracted

Figure 4. Hyperparameter sensitivity on the fixed, class-balanced test subsets of CreditCard (top) and Elliptic++ (bottom). From left to right, the columns vary candidate-pool size, context-node cap, schema-quota multiplier, and semantic-score weight λ\lambda. Orange circles show Macro-F1 (left axis), and blue triangles show AUPRC (right axis). Vertical dashed lines mark the reference setting for each parameter, while horizontal dashed lines indicate the corresponding metric scores.

Increasing the candidate-pool size from 4 to 24 produces an overall rise in Macro-F1 on both datasets, although the intermediate settings are not strictly monotonic. AUPRC responds differently: it changes only modestly on CreditCard and peaks at an intermediate pool size on Elliptic++. Thus, a broader candidate pool can improve classification performance, but its effect is not uniform across ranking metrics.

The context-node cap and schema-quota multiplier also yield non-monotonic responses. Increasing either budget does not consistently improve Macro-F1 or AUPRC, and the more favorable settings differ across datasets and metrics. A possible explanation is a coverage–relevance trade-off: relaxing these constraints expands the available local evidence, but the additional nodes or paths may be less informative and introduce noise. Sampling performance therefore depends not only on the total evidence budget, but also on its allocation across schemas for each target transaction.

The semantic-score weight λ\lambda balances similarity to the current frontier and the target transaction in Eq. (5). On the plotted sweep, the intermediate settings (λ∈{0.2,0.5,0.7}\lambda\in\{0.2, 0.5, 0.7\}) yield higher AUPRC than both endpoints (λ=0\lambda= 0 and 11) on both datasets. At λ=0.5\lambda= 0.5, for example, AUPRC reaches 98.565% on CreditCard and 90.954% on Elliptic++, compared with 98.427%/98.436% and 90.598%/90.787% at λ=0/1\lambda= 0/1, respectively. This pattern supports combining target and frontier semantic similarities rather than relying exclusively on either. Macro-F1 is less consistent: among the plotted settings, λ=0\lambda= 0 performs best on CreditCard and λ=1\lambda= 1 on Elliptic++, so the advantage of intermediate weights is clearest for AUPRC.

Sensitivity to Semantic Misalignment

To measure sensitivity to node–semantic alignment, we interpolate each node’s semantic vector with that of a randomly permuted node of the same type. For node vv, the perturbed vector is

s~v(δ)=(1−δ)sv+δsπτ(v),δ∈[0,1],(15)\widetilde{s}_v(\delta) = (1-\delta)s_v + \delta s_{\pi_{\tau(v)}}, \quad\delta\in[0,1], \tag*{(15)}

where πτ(v)\pi_{\tau(v)} denotes a permutation within node type. The same permutation is used for all values of δ\delta and is independent of fraud labels. For each setting, we train and evaluate the model using the perturbed vectors for both semantic node enhancement and semantic-guided path sampling; checkpoint selection and threshold calibration follow the validation protocol. The analysis uses the fixed, class-balanced CreditCard and Elliptic++ test subsets.

Figure 5 and Table 4 show that both metrics decline as δ\delta increases, indicating that performance benefits from preserving the alignment between each node and its own risk-related business semantics. The decrease is modest on CreditCard and more pronounced on Elliptic++, where Macro-F1 falls from 78.80% to 70.17% and Fraud-F1 from 74.64% to 62.22% between the two endpoints.

Image not extracted

Figure 5. Sensitivity to within-type semantic mismatch on the balanced CreditCard and Elliptic++ test subsets. The mismatch strength δ\delta controls the interpolation between each node’s semantic vector and that of a randomly permuted node of the same type. Lines show Macro-F1 and Fraud-F1 as semantic alignment decreases.

DatasetMetricδ=0\delta= 0δ=0.25\delta= 0.25δ=0.50\delta= 0.50δ=0.75\delta= 0.75δ=1\delta= 1
CreditCardMacro-F188.1087.8387.5887.2487.02
CreditCardFraud-F186.7386.3986.0985.6585.38
Elliptic++Macro-F178.8078.2477.2874.5470.17
Elliptic++Fraud-F174.6473.8172.5068.6262.22

Table 4. Macro-F1 and Fraud-F1 scores (%) under within-type semantic mismatch on the balanced CreditCard and Elliptic++ test subsets. δ\delta interpolates each node’s semantic vector with a same-type permuted vector, from original alignment (δ=0\delta= 0) to the permuted vector (δ=1\delta= 1).

Fraud-Label Composition of Sampled Evidence

We examine whether semantic-guided sampling changes the fraud-label composition of local evidence. For each target and schema, we measure the fraction of fraud-labelled terminal transaction nodes among the retained paths, excluding the target itself and duplicate endpoints within each sampling repeat. Semantic-guided and uniform sampling use the same schemas, candidate pools, path quotas, and context budgets; labels are used only to form the balanced target subsets and to analyze endpoints after sampling, never to compute sampling scores.

Figure 6 shows a consistent class-conditional pattern. For benign targets, semantic-guided sampling yields lower fraud-endpoint rates than uniform sampling for all five CreditCard schemas and four of the five BankTrans schemas. For the same-location schema on BankTrans, the two rates are very close. For fraudulent targets, semantic-guided sampling yields higher fraud-endpoint rates across all five schemas on both datasets. The size of this increase varies by schema: it is largest for same-category endpoints on CreditCard (+1.959 percentage points) and same-merchant endpoints on BankTrans (+6.046 points). Overall, the pattern is consistent with semantic guidance shifting the sampled evidence toward endpoints whose fraud-label composition aligns with the target class, while the endpoint labels themselves are not used by the sampler.

Image not extracted

Figure 6. Fraud-label composition of sampled terminal transaction endpoints. Panels show benign and fraudulent targets; colors distinguish datasets, shades distinguish sampling strategies, and annotations report semantic-minus-uniform differences (percentage points).

Ethical Use of Data and Informed Consent

This study uses the publicly released CreditCard and BankTrans datasets from FinFraudBench [1] and the Elliptic++ dataset [6]. Our experiments are a secondary analysis of these existing transaction-graph data; we collected no new data and did not recruit or contact individuals.

Conclusion and Future Work

We presented SemHGT, an LLM-enhanced framework that makes role-aware business semantics explicit in heterogeneous transaction graphs. Its first stage generates risk-related business descriptions and encodes them as semantic vectors to enrich node representations; these vectors also guide target-specific sampling of typed path evidence. The sampled local evidence is then combined with global schema-neighbor context into schema-level tokens for transformer-based fraud prediction. Across CreditCard, BankTrans, and Elliptic++, SemHGT leads the evaluated baselines on most dataset–metric comparisons. Further analyses provide evidence for the effectiveness of the design and clarify how semantic modeling and evidence selection contribute to fraud detection. These findings support the value of combining role-aware semantics with relational evidence for financial fraud detection on heterogeneous transaction graphs.

Future work can investigate ways to reduce reliance on manually specified schemas, including methods that integrate role-aware business semantics into meta-path-free heterogeneous graph models for financial fraud detection. Another direction is to adapt semantic representations to fraud-detection objectives and evolving transaction behavior.

References

Extended Experimental Details

Graph Views and Split Protocols

Table 5 gives the transaction counts and class composition for the dataset splits described in § 4.1.

DatasetSplitTransactionsFraudNon-fraud
CreditCardTrain1,111,4366,4011,105,035
Validation185,2401,105184,135
Test555,7182,145553,573
BankTransTrain891,4961,333890,163
Validation891,4961,333890,163
Test7,131,97110,6667,121,305
Elliptic++Train28,9383,40225,536
Validation4,0052753,730
Test13,62186812,753

Table 5. Transaction-label counts for each data split.

Validation and Full-Test Evaluation

For validation, we retain all fraud transactions and subsample non-fraud transactions (Table 6). We weight each sampled negative by the full-to-sampled negative-count ratio when computing AUPRC and AUROC. Checkpoint selection and F1-threshold calibration use validation labels; final metrics use the complete test split.

DatasetFull validationSubset (fraud / non-fraud)Neg. weight
CreditCard185,2402,210 (1,105 / 1,105)166.6380
BankTrans891,49622,661 (1,333 / 21,328)41.7368
Elliptic++4,005550 (275 / 275)13.5636

Table 6. Validation subsets used for checkpoint selection and threshold calibration.

Balanced Test Subsets for Analytical Experiments

Except for ablation, analytical experiments use the fixed, class-balanced test subsets in Table 7.

DatasetNon-fraudFraudTotal
CreditCard2,1452,1454,290
BankTrans1,0001,0002,000
Elliptic++8688681,736

Table 7. Class-balanced test subsets used in analytical experiments other than ablation.

Schema-Specific Sampling Budgets

Table 8 lists per-schema path quotas and maximum context sizes. Sampling expands the transaction frontier for up to two rounds; the context cap counts typed intermediate entities.

Fraud-Label Composition of Sampled Evidence

Table 9 reports fraud rates among unique terminal transaction endpoints, excluding the target, for semantic-guided and uniform sampling on the balanced subsets in Table 7. Endpoint labels are used only for this post-sampling analysis.

DatasetSchemaPer-round path quota krk_rMax. context nodes
CreditCardTT–Customer–TT8112
TT–Card–TT8
TT–Merchant–TT8
TT–Category–TT1
TT–Location–TT1
BankTransTT–Customer–TT8128
TT–Card–TT8
TT–Merchant–TT8
TT–Category–TT4
TT–Location–TT4
Elliptic++TT–TT8160
TT–WW–TT8
TT–WW–WW–TT4
TT–WW–WW–WW–TT4

Table 8. Local path schemas and sampling budgets. TT denotes a transaction; WW denotes a wallet.

Target labelSchemaSemanticUniformΔsem−unif\Delta_{\mathrm{sem-unif}}
CreditCard
Benignsame customer0.1790.371−0.192
Benignsame card0.1730.371−0.198
Benignsame merchant0.2070.386−0.179
Benignsame category0.2450.379−0.135
Benignsame location0.1930.423−0.230
Fraudulentsame customer4.8543.803+1.051
Fraudulentsame card5.0503.829+1.221
Fraudulentsame merchant1.4390.594+0.845
Fraudulentsame category2.5560.597+1.959
Fraudulentsame location1.5240.442+1.082
BankTrans
Benignsame customer0.0840.137−0.054
Benignsame card0.0740.147−0.072
Benignsame merchant0.0560.148−0.092
Benignsame category0.0620.143−0.080
Benignsame location0.1300.121+0.009
Fraudulentsame customer1.8750.229+1.646
Fraudulentsame card3.6630.431+3.232
Fraudulentsame merchant10.6264.580+6.046
Fraudulentsame category5.9621.223+4.738
Fraudulentsame location6.8056.305+0.500

Table 9. Fraud-endpoint rates for semantic-guided and uniform sampling. Rates are percentages; Δ\Delta is semantic minus uniform in percentage points.

CreditCard Risk-Semantic Prompt Templates

The CreditCard prompts pair a shared system message with a node-type-specific instruction for each of the six node types.

Shared System Message

Image not extracted

Figure 1 (PDF p. 12).

System message

You are a financial graph semantic analyst supporting transaction fraud-risk modeling. Return exactly one line in this format and no other text: Business risk level: <low|moderate|high>. Evidence: <one complete factual sentence of at most 32 English words>. Choose the level only from supplied attributes and supplied reference ranges. When available, the evidence should cover two or three complementary observable fields, such as amount or aggregate, decoded category, time, geography, or behavior. Do not compare with percentiles or ranges unless the comparison is explicitly and unambiguously supported. Do not state a fraud or benign label, use labels, data splits, entity identifiers, causal claims, or invented facts.

:::

Node-type-specific User Instructions

Transaction Describe the payment event only from its supplied amount, local timestamp or weekend context, customer-versus-merchant distance, coordinates, and local population. Treat a large amount or long distance as context only, never as a label.

Customer Describe the customer activity profile using age, home geography, transaction count, total and typical spend, spend variability, activity duration, and card, merchant, and category diversity. Use relative ranges when supplied.

Card Describe the card usage profile using transaction volume, total, typical, variable, maximum and minimum spend, active duration, billing state, and merchant/category diversity. State relative exposure only when supported by the reference range.

Merchant Describe the merchant context using business category, transaction scale, typical and variable amount, customer/card reach, and state diversity. Do not use the merchant name as evidence.

Category Describe the business-category context using transaction scale, amount profile, merchant coverage, and card/customer reach relative to category-level reference ranges.

Location Describe the geographic activity context using transaction scale, amount profile, customer/card/merchant reach, and population context relative to location-level ranges.

The selected instruction is paired with the shared system message, and filtered node attributes are supplied as name–value lines. When available, prompts also include label-blind reference bands and summary statistics. Permitted fields and reference statistics depend on node type; CreditCard uses training-only statistics for training nodes, training-plus-validation statistics for validation nodes, and training-plus-test statistics for test nodes.

References

  1. [1]Yixuan Chen, Hongyu Zhan, Jie Sheng, Weiyu Han, Shuai Chen, Tianyi Zhang, Xiao Tan, and Jun Xia. 2026. FinFraudBench: A Heterogeneous Graph Benchmark for Financial Fraud Detection. arXiv preprint arXiv:2608.15177 (2026).arxiv.org/abs/2608.15177
  2. [2]Kyunghyun Cho, Bart van Merriënboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. 2014. Learning Phrase Representations using RNN Encoder–Decoder for Statistical Machine Translation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), Alessandro Moschitti, Bo Pang, and Walter Daelemans (Eds.). Association for Computational Linguistics, Doha, Qatar, 1724–1734. doi:10.3115/v1/D14-1179DOI
  3. [3]Jesse Davis and Mark Goadrich. 2006. The relationship between Precision-Recall and ROC curves. In Proceedings of the 23rd International Conference on Machine Learning (Pittsburgh, Pennsylvania, USA) (ICML ’06). Association for Computing Machinery, New York, NY, USA, 233–240. doi:10.1145/1143844.1143874DOI
  4. [4]Yingtong Dou, Zhiwei Liu, Li Sun, Yutong Deng, Hao Peng, and Philip S. Yu. 2020. Enhancing Graph Neural Networks-based Fraud Detectors against Camouflaged Fraudsters. In Proceedings of the 29th ACM International Conference on Information & Knowledge Management (Virtual Event, Ireland) (CIKM ’20). Association for Computing Machinery, New York, NY, USA, 315–324. doi:10.1145/3340531.3411903
  5. [5]Mingjiang Duan, Da He, Tongya Zheng, Lingxiang Jia, Mingli Song, Xinyu Wang, and Zunlei Feng. 2025. Global attribute-association pattern aggregation for graph fraud detection. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 39. 1616–11624.DOI
  6. [6]Youssef Elmougy and Ling Liu. 2023. Demystifying Fraudulent Transactions and Illicit Nodes in the Bitcoin Network for Financial Forensics. In Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining (Long Beach, CA, USA) (KDD ’23). Association for Computing Machinery, New York, NY, USA, 3979–3990. doi:10.1145/3580305.3599803DOI
  7. [7]Xinyu Fu, Jian Zhang, Ziqiao Meng, and Irwin King. 2020. Magnn: Metapath aggregated graph neural network for heterogeneous graph embedding. In Proceedings of the web conference 2020. 2331–2341.
  8. [8]Hang Gao, Chenhao Zhang, Fengge Wu, Changwen Zheng, Junsuo Zhao, and Huaping Liu. 2025. Bootstrapping heterogeneous graph representation learning via large language models: A generalized approach. In Proceedings of the aaai conference on artificial intelligence, Vol. 39. 16717–16726.arxiv.org/abs/2412.08038
  9. [9]Mingyu Guan, Jack W Stokes, Qinlong Luo, Fuchen Liu, Purvanshi Mehta, Elnaz Nouri, and Taesoo Kim. 2025. Heterogeneous graph neural network on semantic tree. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 39. 16924–16932.
  10. [10]Will Hamilton, Zhitao Ying, and Jure Leskovec. 2017. Inductive Representation Learning on Large Graphs. In Advances in Neural Information Processing Systems, I. Guyon, U. Von Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett (Eds.), Vol. 30. Curran Associates, Inc. https://proceedings.neurips.cc/paper_files/paper/2017/file/5dd9db5e033da9c6fb5ba83c7a7ebea9-Paper.pdf
  11. [11]Xiaoxin He, Xavier Bresson, Thomas Laurent, Adam Perold, Yann Le-Cun, and Bryan Hooi. 2024. Harnessing Explanations: LLM-to-LM Interpreter for Enhanced Text-Attributed Graph Representation Learning. In International Conference on Learning Representations, B. Kim, Y. Yue, S. Chaudhuri, K. Fragiadaki, M. Khan, and Y. Sun (Eds.), Vol. 2024. 5711–5732. https://proceedings.iclr.cc/paper_files/paper/2024/file/1766d75b077b66457040e4661771aec5-Paper-Conference.pdfarxiv.org/abs/2305.19523
  12. [12]Ziniu Hu, Yuxiao Dong, Kuansan Wang, and Yizhou Sun. 2020. Heterogeneous graph transformer. In Proceedings of the web conference 2020. 2704–2710.
  13. [13]Tairan Huang, Yili Wang, Qiutong Li, Changlong He, and Jiangliang Gao. 2025. Can LLMs Find Fraudsters? Multi-level MLM Enhanced Graph Fraud Detection. In Proceedings of the 33rd ACM International Conference on Multimedia (Dublin, Ireland) (MM ’25). Association for Computing Machinery, New York, NY, USA, 1530–1538. doi:10.1145/3746027.3755245
  14. [14]Thomas N Kipf and Max Welling. 2016. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907 (2016).arxiv.org/abs/1609.02907
  15. [15]Yuan Li, Jun Hu, Bryan Hooi, Hengsheng He, and Cheng Chen. 2026. Dgp: A dual-granularity prompting framework for fraud detection with graph-enhanced llms. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 40. 15171–15179.
  16. [16]Yang Liu, Xiao Ao, Zidi Qin, Jianfeng Chi, Jinghua Feng, Hao Yang, and Qing He. 2021. Pick and Choose: A GNN-based Imbalanced Learning Approach for Fraud Detection. In Proceedings of the Web Conference 2021 (Ljubljana, Slovenia) (WWW ’21). Association for Computing Machinery, New York, NY, USA, 3168–3177. doi:10.1145/3442381.3449989DOI
  17. [17]Ziqi Liu, Chaochao Chen, Xinxing Yang, Jun Zhou, Xiaolong Li, and Le Song. 2018. Heterogeneous Graph Neural Networks for Malicious Account Detection. In Proceedings of the 27th ACM International Conference on Information and Knowledge Management (Torino, Italy) (CIKM ’18). Association for Computing Machinery, New York, NY, USA, 2077–2085. doi:10.1145/3269206.3272010DOI
  18. [18]Ilya Loshchilov and Frank Hutter. 2017. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101 (2017).
  19. [19]Yifan Lu, Ziyun Zou, Belal Aslsinglawi, Islam Al-Qudah, Izzat Alsmadi, Feilong Tang, Pengfei Jiao, Shoaib Jameel, and Imran Razzak. 2025. HeSRN: Representation Learning On Heterogeneous Graphs via Slot-Aware Retentive Network. arXiv preprint arXiv:2510.09767 (2025).arxiv.org/abs/2510.09767
  20. [20]Zhiyuan Lu, Yuan Fang, Cheng Yang, and Chuan Shi. 2024. Heterogeneous graph transformer with poly-tokenization. In Proceedings of the Thirty-Third International Joint Conference on Artificial Intelligence (Jeju, Korea) (IJCAI ’24). Article 247, 9 pages. doi:10.24963/ijcai.2024/247
  21. [21]Qingsong Lv, Ming Ding, Qiang Liu, Yuxiang Chen, Wenzheng Feng, Siming He, Chang Zhou, Jiangguo Jiang, Yuxiao Dong, and Jie Tang. 2021. Are we really making much progress? Revisiting, benchmarking and refining heterogeneous graph neural networks. In Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining (Virtual Event, Singapore) (KDD ’21). Association for Computing Machinery, New York, NY, USA, 1150–1160. doi:10.1145/3447548.3467350
  22. [22]Tianyi Ma, Yiyue Qian, Zehong Wang, Zheyuan Zhang, Chuxu Zhang, and Yanfang Ye. 2025. LLM-Empowered Class Imbalanced Graph Prompt Learning for Online Drug Trafficking Detection. In Findings of the Association for Computational Linguistics: ACL 2025, Wanxiang Che, Joyce Nabende, Ekaterina Shutova, and Mohammad Taher Pilehvar (Eds.). Association for Computational Linguistics, Vienna, Austria, 14095–14114. doi:10.18653/v1/2025.findings-acl.725DOI
  23. [23]Qiheng Mao, Zemin Liu, Chenghao Liu, and Jianliang Sun. 2023. HORNner: Representation Learning On Heterogeneous Information Networks with Graph Transformer. In Proceedings of the ACM Web Conference 2023 (Austin, TX, USA) (WWW ’23). Association for Computing Machinery, New York, NY, USA, 599–610. doi:10.1145/3543507.3583493DOI
  24. [24]Hao Ou, Jie Sun, Bing Wei, Jiarui Hu, ShaoHua Dong, and Jiahui Zhang. 2026. HINAC: LLM-enhanced heterogeneous graph attribute completion with heterogeneity-distribution-aware graph transformer. (2026).DOI
  25. [25]Rui Ou, Kun Zhu, Nana Zhang, Jiangtong Li, Chaochao Chen, Yuhua Xu, and Changjun Jiang. 2026. Targeting borderline fraudsters: multi-view hypergraph fraud detection with LLM-guided contrastive learning. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 40. 15991–15999.
  26. [26]Michael Schilchthcrull, Thomas N. Kipf, Peter Bloem, Rianne van den Berg, Ivan Titov, and Max Welling. 2019. Recurrent Data with Graph Convolutional Networks. In The Semantic Web, Aldo Gangemi, Roberto Navigli, Maria-Esther Vidal, Pascal Hitzler, Raphaël Troncy, Laura Hollink, Anna Noyda, and Mehrwish Alam (Eds.). Springer International Publishing, Cham, 593–607.
  27. [27]Kaitao Song, Xu Tan, Tao Qin, Jianfeng Lu, and Tie-Yan Liu. 2020. MP-Net: Masked and Permuted Pre-training for Language Understanding. In Advances in Neural Information Processing Systems, I. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin (Eds.), Vol. 33. Curran Associates, Inc., 16857–16867. https://proceedings.neurips.cc/paper_files/paper/2020/file/c3a690be93aa602ee2dc0ccab5b7b67e-Paper.pdf
  28. [28]Jiabin Tang, Yuhao Yang, Wei Wei, Lei Shi, Long Xia, Dawei Yin, and Chao Huang. 2024. HiGPT: Heterogeneous Graph Language Model. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining (Barcelona, Spain) (KDD ’24). Association for Computing Machinery, New York, NY, USA, 2842–2853. doi:10.1145/3637528.3671987DOI
  29. [29]Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017. Attention is All you Need. In Advances in Neural Information Processing Systems, I. Guyon, U. Von Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett (Eds.), Vol. 30. Curran Associates, Inc. https://proceedings.neurips.cc/paper_files/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf
  30. [30]Xiao Wang, Houye Ji, Chuan Shi, Bai Wang, Yanfang Ye, Peng Cui, and Philip S Yu. 2019. Heterogeneous graph attention network. In The world wide web conference. 2022–2032.
  31. [31]Sheng Xiang, Mingzhi Zhu, Dawei Cheng, Enxia Li, Ruihui Zhao, Yi Ouyang, Ling Chen, and Yefeng Zheng. 2023. Semi-supervised credit card fraud detection via attribute-driven graph representation. In Proceedings of the AAAI conference on artificial intelligence, Vol. 37. 14557–14565.DOI
  32. [32]An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Chenggen Huang, Chenxu Lv, et al. 2025. Qwen3 technical report. arXiv preprint arXiv:2505.09388 (2025).arxiv.org/abs/2505.09388
  33. [33]Xiaocheng Yang, Mingyu Yan, Shirui Pan, Xiaochun Ye, and Dongrui Fan. 2023. Simple and efficient heterogeneous graph neural network. In Proceedings of the AAAI conference on artificial intelligence, Vol. 37. 10816–10824.arxiv.org/abs/2207.02547
  34. [34]Lingfan Yu, Jiajun Sheng, Jinyang Li, and Adam Lerer. 2020. Scalable graph neural networks for heterogeneous graphs. arXiv preprint arXiv:2011.09679 (2020).
  35. [35]Le Yu, Leilei Sun, Bowen Du, Chuanrun Liu, Weifeng Lv, and Hui Xiong. 2023. Heterogeneous Graph Representation Learning With Relation Awareness. IEEE Transactions on Knowledge and Data Engineering 35, 6 (2023), 5935–5947. doi:10.1109/TKDE.2022.3160208
  36. [36]Seongjun Yun, Minbyul Jeong, Raehyun Kim, Jaewoo Kang, and Hyunwoo J Kim. 2019. Graph Transformer Networks. In Advances in Neural Information Processing Systems, H. Wallach, H. Larochelle, A. Beygelzimer, F. d’Alché-Buc, E. Fox, and R. Garnett (Eds.), Vol. 32. Curran Associates, Inc. https://proceedings.neurips.cc/paper_files/paper/2019/file/9d63484abb477c97640154d40595a3bb-Paper.pdf
  37. [37]Seongjun Yun, Minbyul Jeong, Sungdong Yoo, Seungjun Lee, Sean S. Yi, Raehyun Kim, Jaewoo Kang, and Hyunwoo J. Kim. 2022. Graph Transformer Networks: Learning meta-path graphs to improve GNNs. Neural Networks 153 (2022), 104–119. doi:10.1016/j.neunet.2022.05.026DOI
  38. [38]Chuxu Zhang, Dongjin Song, Chao Huang, Ananthram Swami, and Nitesh V. Chawla. 2019. Heterogeneous Graph Neural Network. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining (Anchorage, AK, USA) (KDD ’19). Association for Computing Machinery, New York, NY, USA, 793–803. doi:10.1145/3292500.3330961DOI
  39. [39]Yufei Zhao, Shiduo Wang, and Hua Duan. 2025. LSPI: Heterogeneous graph neural network classification aggregation algorithm based on size neighbor path identification. Applied Soft Computing 171 (2025), 112656.arxiv.org/abs/2405.18933
  40. [40]Qiwei Zhang, Yang Liu, Xiang Ao, Binhu Hu, Jianghua Feng, Jiayu Tang, and Qing He. 2020. Financial Defaulter Detection on Online Credit Payment via Multi-view Attributed Heterogeneous Information Network. In Proceedings of The Web Conference 2020 (Taipei, Taiwan) (WWW ’20). Association for Computing Machinery, New York, NY, USA, 785–795. doi:10.1145/3366423.3380159
  41. [41]Jiang Zhou, Jieming Shi, Renchi Yang, Yuanhang Zou, and Qing Li. 2023. SlotGAT: Slot-based Message Passing for Heterogeneous Graphs. In Proceedings of the 40th International Conference on Machine Learning (Proceedings of Machine Learning Research, Vol. 202), Andreas Krause, Emma Brunskill, Kyounghyun Cho, Barbara Engelhardt, Sivan Sabato, and Jonathan Scarlett (Eds.). PMLR, 42644–42657. https://proceedings.mlr.press/v202/zhou23j.html
  42. [42]Tao Zou, Le Yu, Yifei Huang, Leilei Sun, and Bowen Du. 2023. Pretraining Language Models with Text-Attributed Heterogeneous Graphs. In Findings of the Association for Computational Linguistics: EMNLP 2023, Houda Bouamor, Juan Pino, and Kalika Bali (Eds.). Association for Computational Linguistics, Singapore, 10316–10333. doi:10.18653/v1/2023.findings-emnlp.692DOI

Paper details

vlnc:W_czqe3n48
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents