Graph transformer helps detect credit card fraud using transaction connections

Temporal Heterogeneous Graph Transformer for Credit Card Fraud Detection

Machine LearningArtificial Intelligence

Summary

Credit card fraud detection usually looks at transaction details as separate data points, but sometimes the connections between repeated transaction features can also help spot fraud. The authors created a system called THGT-FD that treats each transaction as a collection of related tokens, including time information, and uses a transformer model to analyze how these tokens interact. They tested this approach on a large fraud dataset and found that including relation tokens improved fraud risk ranking, even though the model hasn’t yet used past transaction histories for individual entities. This suggests that looking at relationships inside transaction data can provide extra signals to detect fraud.

credit card fraud detectiontransformerheterogeneous graphtransaction tokensrelation tokensTime2Vec encodingfraud risk rankingAUC-ROCgradient boosting

Authors

Qinwen Yan

Abstract

Credit card fraud detection typically relies on tabular features, while repeated attributes can also provide useful relational signals. This paper proposes THGT-FD, a Temporal Heterogeneous Graph Transformer for Fraud Detection. Each transaction is represented using one transaction token and six types of relation tokens and incorporates Time2Vec encoding into the transaction representation. A Transformer learns the interactions among these tokens within each individual transaction and then outputs a fraud probability. Experiments were conducted on 150,000 transactions sampled from the IEEE-CIS Fraud Detection dataset and chronologically partitioned according to TransactionDT. On the test set, THGT-FD achieved an AUC-ROC of 0.8536, an average precision of 0.4164, and a Recall@5% of 0.4708. The class-weighted histogram-based gradient-boosting baseline achieved an AUC-ROC of 0.8722. The results indicate that relation tokens provide useful information for fraud-risk ranking, although the current model does not yet incorporate entity-level historical aggregation.