TEMPORAL GRAPH NEURAL NETWORKS FOR SEQUENTIAL ANOMALY DETECTION IN REAL-TIME E-COMMERCE STREAMS
Volume 2, Issue 1, Pp 37-47, 2025
DOI: https://doi.org/10.61784/asat3015
Author(s)
Sophia Walker, Luis Alvarez*
Affiliation(s)
Department of Computer Science, Rice University, Houston, USA.
Corresponding Author
Luis Alvarez
ABSTRACT
The exponential growth of e-commerce transactions has created an urgent need for sophisticated anomaly detection systems capable of identifying fraudulent activities, system malfunctions, and unusual behavioral patterns in real-time data streams. Traditional anomaly detection approaches fail to capture the complex interdependencies between entities and the temporal evolution of their relationships within e-commerce ecosystems. This paper presents a novel framework that integrates Temporal Graph Neural Networks (TGNNs) with advanced graph representation learning techniques to address sequential anomaly detection in real-time e-commerce environments. Our approach leverages the structural modeling capabilities of Graph Neural Networks (GNNs) while incorporating temporal dynamics through specialized attention mechanisms and incremental learning strategies. The framework employs a multi-scale graph construction process that captures both local neighborhood structures and global network patterns, enabling the identification of anomalous nodes and subgraphs that deviate from established community structures. We introduce an adaptive random walk strategy inspired by Node2Vec that balances breadth-first and depth-first exploration to capture diverse types of anomalous patterns across different temporal scales. Comprehensive evaluation on three large-scale e-commerce datasets demonstrates significant performance improvements, with our method achieving 17.2% enhancement in F1-score and 14.6% improvement in Area Under Curve (AUC) compared to state-of-the-art approaches, while maintaining sub-second inference times suitable for real-time deployment.
KEYWORDS
Temporal Graph Neural Networks; Sequential anomaly detection; E-commerce security; Graph representation learning; Real-time systems; Community detection
CITE THIS PAPER
Sophia Walker, Luis Alvarez. Temporal graph neural networks for sequential anomaly detection in real-time e-commerce streams. Journal of Trends in Applied Science and Advanced Technologies. 2025, 2(1): 37-47. DOI: https://doi.org/10.61784/asat3015.
REFERENCES
[1] Sharma R, Srivastva S, Fatima S. E-Commerce and Digital Transformation: Trends, Challenges, and Implications. Int. J. Multidiscip. Res. (IJFMR), 2023(5): 1-9.
[2] Mai N T, Cao W, Liu W. Interpretable Knowledge Tracing via Transformer-Bayesian Hybrid Networks: Learning Temporal Dependencies and Causal Structures in Educational Data. Applied Sciences, 2025, 15(17): 9605.
[3] Mai N T, Cao W, Wang Y. The Global Belonging Support Framework: Enhancing Equity and Access for International Graduate Students. Journal of International Students, 2025, 15(9): 141-160.
[4] Xu Y, Sun S, Zhang H, et al. Time-Aware Graph Embedding: A Temporal Smoothness and Task-Oriented Approach. ACM Transactions on Knowledge Discovery from Data (TKDD), 2021, 16(3): 1-23.
[5] Cao W, Mai N T, Liu W. Adaptive Knowledge Assessment via Symmetric Hierarchical Bayesian Neural Networks with Graph Symmetry-Aware Concept Dependencies. Symmetry, 2025, 17(8): 1332.
[6] Karunaratne T. Machine Learning and Big Data Approaches to Enhancing E-Commerce Anomaly Detection and Proactive Defense Strategies in Cybersecurity. Journal of Advances in Cybersecurity Science, Threat Intelligence, and Countermeasures, 2023, 7(12): 1-16.
[7] Scrivano A. Fraud Detection Pipeline Using Machine Learning: Methods, Applications, and Future Directions. 2025, 1-16. DOI: https://doi.org/10.31224/4771
[8] Johnson-Rokosu S F, Enobi A. Behavioral Analytics and Forensic Accounting: Understanding the Human Element in Fraud. Journal of Accounting and Financial Management, 2025, 11(5): 93-117. DOI: 10.56201/jafm.vol.11.no5.2025.pg93.117.
[9] Waikhom L, Patgiri R. A Survey of Graph Neural Networks in Various Learning Paradigms: Methods, Applications, and Challenges. Artificial Intelligence Review, 2023, 56(7): 6295-6364.
[10] Kim H, Lee B S, Shin W Y, Lim S. Graph Anomaly Detection with Graph Neural Networks: Current Status and Challenges. IEEE Access, 2022(10): 111820-111829.
[11] Bui K H N, Cho J, Yi H. Spatial-Temporal Graph Neural Network for Traffic Forecasting: An Overview and Open Research Issues. Applied Intelligence, 2022, 52(3): 2763-2774.
[12] Bollu S S. Anomaly Detection of User Behavioural Events in E-Commerce Electronics Stores Using SVMs. Bachelor Thesis, Blekinge Institute of Technology, Sweden. 2024.
[13] Georgescu M I, Barbalau A, Ionescu R T, et al. Anomaly Detection in Video via Self-Supervised and Multi-Task Learning. 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Nashville, TN, USA, 2021, 12742-12752. DOI: 10.1109/CVPR46437.2021.01255.
[14] Mutemi A, Bacao F. E-Commerce Fraud Detection Based on Machine Learning Techniques: Systematic Literature Review. Big Data Mining and Analytics, 2024, 7(2): 419-444.
[15] Tiwari S. Advancing Client Risk Scoring: From Rule-Based Systems to Machine Learning Approaches. Journal of Computer Science and Technology Studies, 2025, 7(8): 01-07.
[16] Dritsas E, Trigka M. Machine Learning in E-Commerce: Trends, Applications, and Future Challenges. IEEE Access, 2025(13): 99048-99067. DOI: 10.1109/ACCESS.2025.3572865.
[17] Chalapathy R, Chawla S. Deep Learning for Anomaly Detection: A Survey. arXiv preprint, 2019. DOI: https://doi.org/10.48550/arXiv.1901.03407.
[18] Xu H, Wang Y, Jian S, et al. Calibrated One-Class Classification for Unsupervised Time Series Anomaly Detection. IEEE Transactions on Knowledge and Data Engineering, 2024, 36(11): 5723-5736.
[19] Shao Z, Wang X, Ji E, et al. GNN-EADD: Graph Neural Network-Based E-Commerce Anomaly Detection via Dual-Stage Learning. IEEE Access, 2025(13): 8963-8976. DOI: 10.1109/ACCESS.2025.3526239.
[20] Erciyes K. Graph-Theoretical Analysis of Biological Networks: A Survey. Computation, 2023, 11(10): 188.
[21] Immaneni J. Strengthening Fraud Detection with Swarm Intelligence and Graph Analytics. International Journal of Digital Innovation, 2022, 3(1): 1-21.
[22] Bozorgi E, Alqaiidi S K, Shams A, et al. A Survey on Recent Random Walk-Based Methods for Embedding Knowledge Graphs. arXiv preprint, 2024. DOI: https://doi.org/10.48550/arXiv.2406.07402.
[23] Rossi R A, Jin D, Kim S, et al. On Proximity and Structural Role-Based Embeddings in Networks: Misconceptions, Techniques, and Applications. ACM Transactions on Knowledge Discovery from Data (TKDD), 2020, 14(5): 1-37.
[24] Kipf T. Deep Learning with Graph-Structured Representations. PhD Thesis, Universiteit van Amsterdam, Netherlands. 2020.
[25] Bhatti U A, Tang H, Wu G, et al. Deep Learning with Graph Convolutional Networks: An Overview and Latest Applications in Computational Intelligence. International Journal of Intelligent Systems, 2023(1): 8342104.
[26] Cakmak E, Schlegel U, Jackle D, et al. Multiscale Snapshots: Visual Analysis of Temporal Summaries in Dynamic Graphs. IEEE Transactions on Visualization and Computer Graphics, 2020, 27(2): 517-527.
[27] Ghadami A, Epureanu B I. Data-Driven Prediction in Dynamical Systems: Recent Developments. Philosophical Transactions of the Royal Society A, 2022, 380(2229): 20210213.
[28] Barros C D, Mendonca M R, Vieira A B, et al. A Survey on Embedding Dynamic Graphs. ACM Computing Surveys (CSUR), 2021, 55(1): 1-37.
[29] Cao J, Zheng W, Ge Y, et al. DriftShield: Autonomous Fraud Detection via Actor-Critic Reinforcement Learning with Dynamic Feature Reweighting. IEEE Open Journal of the Computer Society, 2025(6): 1166-1177. DOI: 10.1109/OJCS.2025.3587001.
[30] Wang J, Liu J, Zheng W, et al. Temporal Heterogeneous Graph Contrastive Learning for Fraud Detection in Credit Card Transactions. IEEE Access, 2025(13): 145754-145771. DOI: 10.1109/ACCESS.2025.3599787.
[31] Samant R M, Bachute M R, Gite S, et al. Framework for Deep Learning-Based Language Models Using Multi-Task Learning in Natural Language Understanding: A Systematic Literature Review and Future Directions. IEEE Access, 2022(10): 17078-17097.
[32] Ji E, Wang Y, Xing S, et al. Hierarchical Reinforcement Learning for Energy-Efficient API Traffic Optimization in Large-Scale Advertising Systems. IEEE Access, 2025(13): 142493-142516. DOI: 10.1109/ACCESS.2025.3598712.
[33] Lindemann B, Maschler B, Sahlab N, et al. A Survey on Anomaly Detection for Technical Systems Using LSTM Networks. Computers in Industry, 2021(131): 103498.
[34] Zheng W, Liu W. Symmetry-Aware Transformers for Asymmetric Causal Discovery in Financial Time Series. Symmetry, 2025.
[35] Jin J, Xing S, Ji E, et al. XGate: Explainable Reinforcement Learning for Transparent and Trustworthy API Traffic Management in IoT Sensor Networks. Sensors, 2025, 25(7): 2183.
[36] Chattopadhyay S, Basu T, Das A K, et al. Towards Effective Discovery of Natural Communities in Complex Networks and Implications in E-Commerce. Electronic Commerce Research, 2021, 21(4): 917-954.