Source-linked AI summary
Dual-Scale Relational Graph Transformers for Ecosystem-Aware Fraud Detection
Mohsen Nayebi Kerdabadi, Xinrou Li, Yao Xiao, Zijun Yao, Xin Sun
TL;DR
ATO detection must balance fraud recovery with friction for legitimate customers, yet existing approaches do not jointly represent local relational structure and evolving ecosystem context. HERMES combines a temporally safe local graph transformer with non-anticipative ecosystem context and adaptive class prototypes. On more than 130 million high-risk sessions, it improves on production in customer friction and fraud recall.
Problem
ATO detection must account jointly for local session relationships and changing ecosystem conditions, while operating with delayed fraud labels and avoiding information unavailable at scoring time.
Source: §1 · pp. 1–2Method
Results
44.44% relative reduction in customer friction and 24.66% relative improvement in fraud recall over production on more than 130 million high-risk sessions.
Source: §6 · p. 9Takeaways & Limitations
Ablation and temporal analyses show complementary gains from local and global components and robust performance across evolving fraud conditions.
Source: §6 · p. 9The local graph uses only predecessor sessions with earlier timestamps, and label-dependent features additionally require labels to be observable by scoring time.
Source: §2.1 · p. 3, §2.2 · p. 3
Abstract
from arXiv · showhide
Account takeover (ATO) fraud is a growing threat to digital banking, requiring effective detection while minimizing friction for legitimate customers. Production systems predominantly rely on tabular models that score sessions in isolation, discarding the relational structure of the underlying interaction network. Although graph-based models exploit relationships among sessions and network entities, they primarily reason over local neighborhoods and therefore capture only part of the problem: fraud risk depends jointly on the local relational structure surrounding a session and the evolving global state of the fraud ecosystem. We present HERMES (HEterogeneous Relational Micro--macro graph transformer Encoder for high-risk Sessions), a dual-scale architecture that jointly models these complementary scales of information. Micro-GT captures local heterogeneous graph structure through structured, relation-aware attention over a temporally safe session neighborhood. Complementing this local representation, Macro-GT models ecosystem-level context using non-anticipative climate tokens that summarize fraud dynamics, platform shifts, and infrastructure reuse, together with adaptive class prototypes that track representative fraud and benign session patterns over time. Evaluated on more than 130 million high-risk transaction sessions from a leading U.S. financial institution, HERMES consistently outperforms production and strong graph-based baselines, achieving a 44.44% relative reduction in customer friction and a 24.66% relative improvement in fraud recall over the production system. Ablation and temporal-stability analyses further demonstrate complementary gains from local relational modeling and global ecosystem context across changing fraud regimes.
1 Introduction
ATO detection must balance recovering fraud against friction for legitimate customers, while accounting for both a session’s local relational neighborhood and the changing fraud ecosystem. HERMES combines these scales and outperforms production and graph-based baselines in a production-scale evaluation.
1 Introduction
- ATO detection must improve fraud recovery while minimizing unnecessary friction for legitimate customers.Increasing fraud recovery can require challenging more legitimate customers, degrading their experience.Source: §1 · p. 1
- Fraud risk depends jointly on a session’s local relational structure and the evolving global ecosystem, under delayed labels and severe class imbalance.The system must use only information available when the session is scored.Source: §1 · p. 2
- Production tabular systems score sessions largely in isolation, while graph models mainly capture local neighborhoods and lack a unified mechanism for evolving ecosystem context.Conventional message passing can also blur relation semantics and struggle to preserve multi-hop dependencies.Source: §1 · p. 2
- HERMES jointly models local relational structure and global ecosystem context with Micro-GT and Macro-GT.Micro-GT uses structured relation-aware attention over temporally safe neighborhoods; Macro-GT uses non-anticipative climate tokens and adaptive class prototypes.Source: §1 · p. 2
- 44.44% relative reduction in customer friction at fixed fraud recall and 24.66% relative improvement in fraud recall at a fixed flag rate versus production; HERMES was evaluated on more than 130 million sessions.The evaluation also reports consistent outperformance over strong graph-based baselines.Source: §1 · p. 2
2 Problem Formulation
The formulation represents high-risk sessions and their delayed labels, builds a temporally ordered heterogeneous graph from shared identifiers, and restricts features and global context to information available at scoring time.
2.1 Heterogeneous Temporal Session Graph
- A session v has features x_v, occurrence time τ(v), and binary fraud label y_v, observable only after label lag ℓ.The session set S comprises high-risk digital transaction sessions.Source: §2.1 · p. 3
- For each relation type r—account, device, or network—the predecessor set retains up to K most recent sessions sharing the target’s identifier within recency window T.Candidates satisfy τ(v) − T ≤ τ(u) < τ(v).Source: §2.1 · p. 3
- Each shared identifier is represented by a time-conditioned node encoding its state at the target session’s scoring time.The identifier representation can evolve as historical activity becomes available.Source: §2.1 · p. 3
- Recursively expanding predecessors for H session hops forms the target’s local computation graph, with each expansion requiring τ(u) < τ(v).This temporal ordering excludes future-session information.Source: §2.1 · p. 3
2.2 Temporally-Safe Node Representation
- Structural predecessors may be included before their labels are observable, but label-dependent features require τ(u) + ℓ ≤ τ(v).Identifier-node features also use only information available at the destination timestamp.Source: §2.2 · p. 3
2.3 Task Definition
- The prediction task uses serve-time features X(v₀) from the local graph and global ecosystem context Cτ(v₀) available at the target’s scoring time.The estimate is the probability that target session v₀ is fraudulent.Source: §2.3 · p. 3
- Local and global inputs are restricted to information available at τ(v₀) during training, evaluation, and production inference.Source: §2.3 · p. 3
3 Method
Hermes jointly represents each target session through its local temporal relational graph and the ecosystem context available at scoring time, then fuses the representations for fraud prediction. Its method combines structured local attention with ecosystem climate tokens and adaptive class prototypes.
3 Method
- Hermes fuses local relational and ecosystem-context representations through a learned projection for end-to-end session-level fraud prediction.The architecture combines target-conditioned temporal graph context with ecosystem context available at scoring time.Source: §3 · p. 3
3.1 Local Graph Tokenization
- Micro-GT tokenizes the target, sampled hop-1 and hop-2 predecessors, and target-adjacent time-conditioned identifier states using feature, type, hop, temporal, and structural encodings.The two-hop graph uses padded predecessor slots; target-adjacent identifiers are explicitly tokenized.Source: §3.1 · p. 4
3.2 Micro-GT: Local Relational Transformer
- Micro-GT applies four sequential structured attention masks to preserve relation-specific interactions and model higher-order paths before seed-conditioned pooling produces its local representation.The passes progress from identity-self to relation-group, chain, and full-context attention.Source: §3.2 · p. 5
3.3 Macro-GT: Ecosystem Context Transformer
- Macro-GT attends over non-anticipative climate tokens summarizing fraud activity, platform behavior and shifts, anomalies, ecosystem topology, and risk regime, alongside target and identifier representations.Label-dependent climate statistics use only sessions whose labels are observable by the date being summarized.Source: §3.3 · p. 6
3.3.1 Adaptive Class Prototypes
- Separate adaptive prototype sets provide representative fraud and benign patterns, with sessions assigned to the nearest prototype of their own class and assigned prototypes updated by exponential moving average.Unassigned prototypes are reinitialized from class-matched batch embeddings after a fixed patience threshold.Source: §3.3.1 · pp. 6–7
3.4 Training Objective
- A learned projection combines the micro and macro embeddings, and a two-layer MLP produces the fraud logit, with training using class-reweighted binary cross-entropy.Prototype updates occur after each gradient step and outside the backward pass.Source: §3.4 · p. 7
4 Experiments
Experiments evaluate HERMES on a chronological, highly imbalanced dataset of more than 130 million high-risk sessions, then compare it with production and graph-based baselines. HERMES leads on reported metrics and outperforms baselines across four held-out months.
4.1 Dataset and Evaluation Protocol
- The chronological evaluation uses over 130 million sessions from one U.S. financial institution, with a four-month test set and a two-month validation set.Fraud is under 0.1% of sessions; models obey serve-time and label-maturity constraints.Source: §4.1 · p. 7
4.2 Results
- HERMES achieves 85.12% overall AUC, a 44.44% relative reduction in FR@50R, and a 24.66% relative improvement in R@5FR versus production.The comparison covers overall performance and component ablations.Source: Table 1 · p. 8, §4.2 · p. 8
- Adding Micro-GT, relational masks, climate tokens, and adaptive prototypes incrementally improves reported performance over the ATLAS starting point.Climate tokens improve P2 AUC to 81.06% and reduce FR@50R to 5.519%; the completed model achieves the best reported metrics.Source: §4.2 · p. 8
4.3 Temporal Stability
- Across four consecutive held-out test months, HERMES consistently outperforms all baselines, with no later-month degradation relative to graph-based models.The passage attributes stable gains across changing fraud activity to the combination of local relational modeling and global ecosystem context.Source: §4.3 · p. 8, Figure 4 · p. 9
5 Related Work
Prior work addresses ATO friction and changing attacker behavior, while fraud research uses relational and temporal graph methods. HERMES combines structured local session relationships with ecosystem-level context and adaptive prototypes.
5 Related Work
- ATO research includes risk-aware login challenges and a concept-drift-sensitive detection strategy for evolving attacker behavior.The cited examples study Google and the mobile.de marketplace, respectively.Source: §5 · p. 9
- Fraud models use transaction networks, heterogeneous or temporal graphs, edge-aware attention, and relational tokenization with local subgraph attention and global centroids.The passage describes work including TitAnt, xFraud, GTAN, FraudGT, and RelGT.Source: §5 · p. 9
- HERMES builds on relational tokenization while adding temporally structured local attention, non-anticipative ecosystem context, and adaptive fraud and benign prototypes for ATO detection.ATLAS is identified as the closest ATO-specific comparison, using a time-respecting session graph, GraphSAGE, and serve-time-safe label propagation.Source: §5 · p. 9
6 Conclusion
The conclusion presents HERMES as a dual-scale ATO detector combining local relational modeling with global ecosystem context. Its reported evaluation and analyses show strong performance and complementary gains across evolving fraud conditions.
6 Conclusion
- HERMES combines Micro-GT’s heterogeneous multi-hop interactions with Macro-GT’s non-anticipative climate signals and adaptive class prototypes.On more than 130 million high-risk sessions, it achieves 85.12% ROC-AUC, a 44.44% relative reduction in customer friction, and a 24.66% relative improvement in fraud recall over production.Source: §6 · p. 9
- Ablation and temporal analyses show complementary gains from local and global components and robust performance across evolving fraud conditions.Source: §6 · p. 9
A.1 Token Feature Definitions
The appendix defines notation used for numerical stability, labels, timing, and session identifiers.
A.1 Token Feature Definitions
- Appendix notation defines ϵ as a stability constant, clip as a bounded clamp, y_u as the fraud label, τ(u) as timestamp, ℓ as label lag, and shorthand identifiers.It also defines t0 as the dataset start date and id_r(u) as the identifier of type r associated with session u.Source: §A.1 · p. 11
A.2 Label-Propagated (LP) Features
For each session, the label-propagated features use direct predecessors whose adjudicated labels are available at score time. Four aggregate statistics are prepended to the session features, including a count of fraudulent predecessors.
A.2 Label-Propagated (LP) Features
- The predecessor set includes direct predecessors with adjudicated labels available at score time.Source: §A.2 · p. 11
- Four aggregate statistics are prepended to each session’s feature vector as label-propagated features.The passage identifies the fraudulent-predecessor count as one of the statistics.Source: §A.2 · p. 11
- One aggregate statistic counts fraudulent predecessors.Source: §A.2 · p. 11
A.3 Identifier Token Features
Identifier token features represent each relation-and-identifier state using information available at time t, based on sessions observed through that identifier before t and a lag-safe subset.
A.3 Identifier Token Features
- Each time-conditioned identifier state carries a 25-dimensional feature vector representing information available for that identifier at time t.Source: §A.3 · p. 11
- The identifier history includes sessions observed through that identifier before time t.Source: §A.3 · p. 11
- The feature definitions use a lag-safe subset of the history, with the identifier index suppressed for readability.Source: §A.3 · p. 11
A.4 Fraud rates (lag-safe, 4 features):
The appendix specifies lag-safe identifier and cross-identifier session features, alongside daily ecosystem climate tokens computed from sessions preceding each date.
A.4 Fraud rates (lag-safe, 4 features):
- The listed lag-safe features are absolute fraud and clean counts (2 features) and fraud-linked co-identifier counts (4 features); session volume (4 features) and maturity (2 features) are labeled no lag.Source: §A.4 · pp. 11–12
- Co-identifier diversity features count distinct co-occurring identifiers across the two other identifier types in 7-, 30-, and 90-day windows.Together, these yield six features.Source: §A.4 · p. 12
A.5 Cross-Identifier Session Features
- Each session receives seven cross-identifier features that capture pairwise relational risk signals across identifier types using sessions sharing both identifiers before time t.Source: §A.5 · p. 12
A.6 Ecosystem Climate Token Features
- Climate tokens are precomputed daily from sessions in windows preceding each date, with a lag-safe subset defined for label-dependent statistics.Source: §A.6 · p. 12
- Ecosystem climate tokens cover risk regime (7 features), global fraud climate (12), platform-specific climate (10 each), cross-platform shift (5), velocity and anomaly (7), and ecosystem topology (10).Source: §A.6 · pp. 13–14