Submitted:
30 May 2025
Posted:
31 May 2025
You are already at the latest version
Abstract
Keywords:
1. Introduction
1.1. Problem Statement
1.2. Motivation
1.3. Summary of Contributions
- A novel 1–7 anomaly scoring model that classifies financial transactions from high-normal to highly anomalous using autoencoders and Gaussian-scaled post-processing.
- A collaborative filtering mechanism that allows edge devices to refine their local predictions by integrating feedback from peer devices.
- An ensemble architecture using Autoencoder, LightGBM, and One-Class SVM (OC-SVM) for hybrid anomaly detection, reducing FN and FP rates.
- A fog-enabled decision framework that aggregates edge reports and conducts deeper analysis for supervisory escalation.
1.4. Paper Structure
2. Related Works
Comparative Insight from Annotated Radar Analysis
3. System Architecture
3.1. Overview of Architecture
- Consists of all financial transaction-generating computing devices in the smart city (e.g., mobile phones, ATMs, POS terminals, kiosks).
- Each device embeds an unsupervised anomaly detection module using autoencoders to evaluate the status of the transaction.
- The output is converted into a transaction score (1–7), which is:
- d.
- Collaborative Filtering is applied across peer devices to strengthen prediction confidence, based on contextual patterns (e.g., device type, time of day, transaction type).
- a.
- Serves as the aggregation and refinement tier, hosting:
- b.
- Reports are further classified and sent to:
3.2. Workflow Diagram
4. Methodology and Algorithms
4.1. Edge-Level Anomaly Detection Using Autoencoders
- Input: Transaction feature vector (amount, time, location, merchant, frequency, etc.)
- Encoder: Compresses input into latent space representation
- Decoder: Attempts to reconstruct original input
- Loss: Mean squared reconstruction error (MSE) used as anomaly score
- Each transaction is assigned to a reconstruction error E.
- E is mapped into a graded anomaly score from 1 to 7 using a scaled quantile-based threshold or Gaussian distribution mapping.
4.2. Post-Processing with LightGBM and Gaussian Scaling
- Gaussian-based statistical scaling to normalize errors
- LightGBM regression model trained to improve interpretability of anomaly scores by learning from error distributions and historical context
4.3. Collaborative Filtering for Peer-Aware Classification
- ✓ Cosine similarity between transaction embeddings
- ✓ Temporal or categorical matching
- ✓ K-nearest neighbor (KNN) voting
- ✓ Weighted mean aggregation of peer anomaly labels
4.4. Fog-Based Supervised Refinement with OC-SVM
- Detect outliers using high-dimensional margin separation
- Refine classification boundaries especially around borderline scores (3, 4, 5)
- Effective in deep anomaly detection
- Requires no labeled anomalies, well-suited for fraud scenarios
- Learns from “normal” baseline behavior and flags deviations
4.5. Ensemble hybrid ensemblefor Unified Decision Making
5. Results, Discussions and Evaluation
5.1. Interpretation of Grading Distributions:
5.2. Results at Fog
5.3. Merged Result
5.4. Evaluation of Results
6. Conclusions and Future Work
Future Work
- Federated Learning Integration: Future iterations of the framework could integrate federated learning to ensure model privacy and compliance across geo-distributed smart cities without transferring raw data to central fog nodes.
- Temporal and Sequential Modeling: Incorporating sequence-aware models such as LSTM or Transformer-based autoencoders can help detect temporal fraud patterns and layering activities over time.
- Geospatial and Behavioral Enrichment: Adding geolocation, device mobility, and behavioral profiling features can enhance contextual accuracy, especially in detecting device impersonation or fraud rings.
- Cross-Domain Adaptability: Testing and adapting the system in other anomaly-prone smart city domains such as energy, e-health, or transportation can validate the generalizability of the edge–fog hybrid framework.
- Real-World Deployment: Future implementations will explore on-device deployment of lightweight autoencoders and real-time reporting in edge-optimized hardware such as Raspberry Pi or IoT microcontrollers.
References
- Park, S.; Sankaran, R.; Beckman, P.; Shahkarami, S.; Kim, Y.; Ferrier, N. Goal-driven scheduling model in edge computing for smart city applications. J. Parallel Distrib. Comput. 2022, 167, 97–108. [Google Scholar] [CrossRef]
- Chi, X.; Meng, S.; Ding, S.; Yan, C.; Yang, Y.; Liu, Y.; Ma, R. Fast wireless sensor for anomaly detection based on data stream in an edge-computing-enabled smart greenhouse. Digit. Commun. Networks 2022, 8, 498–507. [Google Scholar] [CrossRef]
- Rahim, M.S.M.; Suaib, N.M.; Waheed, S.R.; Adnan, M.M.; Salim, A.A.; A Kadhim, K.; Sakran, A.A.; Najjar, F.H. Design a Crime Detection System based Fog Computing and IoT. Malays. J. Fundam. Appl. Sci. 2023, 19, 345–354. [Google Scholar] [CrossRef]
- Wali, G.; Bulla, C. Anomaly Detection in Fog Computing: State-of-the-Art Techniques, Applications, Challenges, and Future Directions. Library Progress International 2024, 44, 13967–13993. [Google Scholar]
- Akbar, A.; Ibrar, M.; Wang, L.; Shah, N.; Muntean, G.-M.; Rottenstreich, O. Reliability-Aware Flow Distribution Algorithm in SDN-Enabled Fog Computing for Smart Cities. IEEE Trans. Veh. Technol. 2022, 72, 573–588. [Google Scholar] [CrossRef]
- Vo, T.; Dave, P.; Bajpai, G.; Kashef, R. Edge, Fog, and Cloud Computing: An Overview on Challenges and Applications. arXiv 2022, arXiv:2211.01863v1. [Google Scholar]
- Farooqi, A.M.; Alam, M.A.; Hassan, S.I.; Idrees, S.M. A Fog Computing Model for VANET to Reduce Latency and Delay Using 5G Network in Smart City Transportation. Appl. Sci. 2022, 12, 2083. [Google Scholar] [CrossRef]
- Jain, S.; Sreelakshmi, K.K.; Gupta, S.; Rodrigues, J.J.P.C. Fog computing in enabling 5G-driven emerging technologies for development of sustainable smart city infrastructures. Clust. Comput. 2022, 25, 1111–1154. [Google Scholar] [CrossRef]
- John, B. (2025). Deep Learning-Based Model for Detecting Suspicious Bank Transactions Leveraging Fog Computing Infrastructure. ResearchGate.
- Chen, J.I.Z.; Lai, K.-L. Development of Smart Cities with Fog Computing and Internet of Things. J. Ubiquitous Comput. Commun. Technol. 2021, 3, 52–60. [Google Scholar] [CrossRef]
- Bawa, S.; Prakash, V.; Garg, L.; Savaglio, C.; Williams, A. Cloud and Edge Computing-Based Computer Forensics: Challenges and Open Problems. Electronics 2021, 10, 1229. [Google Scholar] [CrossRef]
- Al Smadi, A.; Alsmadi, M.K.; Alshabanah, M.; Alrajhi, D.; Aloglah, R.M.A.; Abu-Darwish, N.J.S.; Alkhaldi, H.; Alsmadi, A.M. Fog computing scheduling algorithm for smart city. Int. J. Electr. Comput. Eng. (IJECE) 2021, 11, 2219–2228. [Google Scholar] [CrossRef]
- Adeyeye, O.J.; Williams, M.; Emeteveke, I.; Emehin, O. Enhancing Data Forensics through Edge Computing in IoT Environments. Int. J. Res. Publ. Rev. 2024, 5, 2970–2985. [Google Scholar] [CrossRef]
- Rahimi, M.; Songhorabadi, M.; Kashani, M.H.; MoghadamFarid, A. Fog computing approaches in IoT-enabled smart cities. J. Netw. Comput. Appl. 2022, 211. [Google Scholar] [CrossRef]
- Delicato, F.C.; Batista, T.; Pires, P.F.; Lopes, F.; Da Rocha, A.R.; Neto, A.R.; Da Silva, T.P. Fog Computing Platforms for Smart City Applications: A Survey. ACM Trans. Internet Technol. 2021, 22, 1–32. [Google Scholar] [CrossRef]
- Riaz, A.H.; Khan, D.; Khan, S.; Amer, M.; Aburukba, R.; Al-Ali, A.R.; Al Nabulsi, A. Fog Computing Approach for Shared Mobility in Smart Cities. Energies 2021, 14, 8174. [Google Scholar] [CrossRef]
- John, B. (2025). Intelligent Suspicious Activity Detection in Banking Transactions Utilizing Fog Computing and Deep Learning. ResearchGate.
- Alserhani, F.; Shaheen, M.; Alsirhani, A.; Humayun, M.; Tariq, N. A fog-edge-enabled intrusion detection system for smart grids. J. Cloud Comput. 2024, 13, 1–34. [Google Scholar] [CrossRef]
- Malik, S.; Gupta, K. Smart City: A new phase of sustainable development using fog computing and IoT. IOP Conference Series: Materials Science and Engineering 2021, 1022, 012093. [Google Scholar] [CrossRef]
- Ometov, A.; Nurmi, J.; Molua, O.L.; Komarov, M. A Survey of Security in Cloud, Edge, and Fog Computing. Sensors 2022, 22, 927. [Google Scholar] [CrossRef] [PubMed]
- Thakker, D.; Awan, I.; Tukur, Y.M. Edge-based blockchain enabled anomaly detection for insider attack prevention in Internet of Things. Trans. Emerg. Telecommun. Technol. 2020, 32. [Google Scholar] [CrossRef]
- Trigka, M.; Dritsas, E. Edge and Cloud Computing in Smart Cities. Futur. Internet 2025, 17, 118. [Google Scholar] [CrossRef]






| Paper | Focus | Edge and Fog Application | Method | Gap | How This Research Addresses It |
|---|---|---|---|---|---|
| Malik & Gupta (2021) | Fog | Smart City Architecture | Conceptual Framework | Lacks ML and detection depth | Proposes scoring & ML pipeline |
| Aburukba et al. (2021) | Fog | Shared Mobility | Fog Deployment | No anomaly modeling | Adds anomaly detection logic |
| Wali & Bulla (2021) | Fog | IoT Anomaly Detection | SOM-PSO Review | No unified ML pipeline | Builds end-to-end ML stack |
| John (2025) | Fog | Banking Fraud | CNN-RNN (Fog) | No edge-device integration | Adds edge-device grading |
| Tariq et al. (2024) | Fog+Edge | Smart Grid IDS | SVM + FL | No collaborative filtering | Adds peer-aware scoring |
| Williams et al. (2023) | Edge | IoT Forensics | Rule-based Monitoring | No financial focus | Specialized to transactions |
| Tukur et al. (2021) | Edge | Insider Attacks | Blockchain + Rule Detection | No ML stack | Adds ensemble refinement |
| Peruzzi et al. (2021) | Edge+Cloud | Smart Infrastructure | FL + RL Review | Lacks FN emphasis | Targets FN zone refinement |
| Songhorabadi et al. (2022) | Fog | Smart Cities | Fog-Oriented Architecture | No scoring mechanism | Implements 1–7 scoring |
| Ometov et al. (2022) | Fog+Edge | Security Taxonomy | Layered Review | Not application-specific | Tailors to financial fraud |
| Pozzebon et al. (2022) | Fog | LoRaWAN Efficiency | Design Optimization | No detection model | Focuses on detection scoring |
| Peruzzi & Pozzebon (2023) | Fog | Smart Cities Design | Literature Review | No operational model | Provides operational logic |
| Fog Cities (2022) | Fog | Resource Scheduling | Survey | No anomaly evaluation | Adds anomaly scores |
| Humayun et al. (2023) | Edge | Forensics | Conceptual | Non-transactional focus | Models financial scoring |
| Preprint Fog Cities (2023) | Fog | Deployment Models | Review | Not risk-targeted | Enables fraud-specific risk classification |
| Fog SLM (2023) | Fog | Sustainable Cities | Conceptual Model | No ML | Combines ML at edge/fog |
| Basu et al. (2022) | Edge+Cloud | Urban Systems | DL+FL Review | No anomaly scale | Proposes scale + ML fusion |
| Smart Cities Compilation | Mixed | Multi-Domain | Dataset Compilation | No pipeline | Used for benchmarking |
| This Study (2025) | Fog+Edge | Smart City Transactions | AE + LightGBM + OC-SVM | No prior work with collaborative anomaly scoring | Introduces full scoring and FN-capture pipeline |
| Step | Module | Action |
|---|---|---|
| 1 | Embedded Sensing (Edge) | Capture transaction metadata and behavioral patterns |
| 2 | Unsupervised Autoencoder | Detect anomaly patterns locally |
| 3 | Score Assignment (1–7) | Convert reconstruction error into interpretable score |
| 4 | Collaborative Filtering | Cross-validate with peer devices |
| 5 | Fog Aggregation | Collect reports from edge devices |
| 6 | Supervised Refinement (OC-SVM) | Apply final classification to scores 3–7 |
| 7 | Ensemble Learning | Combine outputs for final anomaly labeling |
| 8 | Confirmation | Generate confirmed anomaly report for decision-making |
| Score | Interpretation | Classification Purpose |
|---|---|---|
| 1–2 | Highly normal | True Negatives (TN) |
| 3 | Near-normal | Potential False Negative (FN) |
| 4 | Borderline | FP/FN uncertainty region |
| 5 | Suspicious | Possible False Positive (FP) |
| 6–7 | Highly anomalous | True Positive (TP) |
| Grade | Grade_IF | AE_LGBM_Grade | IF_Grade | |||
|---|---|---|---|---|---|---|
| Frequency | % | Frequency | % | Frequency | % | |
| 1 | 2054 | 14.77 | 611 | 4.39 | ||
| 2 | 2903 | 20.88 | 6102 | 43.88 | ||
| 3 | 3397 | 24.43 | 2965 | 21.32 | 4147 | 29.82 |
| 4 | 542 | 3.9 | 2362 | 16.99 | 2376 | 17.09 |
| 5 | 6473 | 46.55 | 3046 | 21.9 | 610 | 4.39 |
| 6 | 3172 | 22.81 | 549 | 3.95 | 55 | 0.4 |
| 7 | 322 | 2.32 | 27 | 0.19 | 5 | 0.04 |
| Grade | Interpretation | Grade_IF | AE_LGBM_Grade | IF_Grade |
|---|---|---|---|---|
| 1–2 | Highly normal (TN) | — | 4957 | 6713 |
| 3 | Near-normal (FN risk) | 3397 | 2965 | 4147 |
| 4 | Borderline (FN/FP mix) | 542 | 2362 | 2376 |
| 5 | Suspicious (FP risk) | 6473 | 3046 | 610 |
| 6–7 | Strongly anomalous (TP) | 3494 | 576 | 60 |
| Algorithms | Detected |
|---|---|
| Hybid Ensemble | 1171 |
| OC-Support Vector Machine | 1062 |
| Total | 2233 |
| Metric | Score |
|---|---|
| Accuracy | 0.9882 |
| Precision (PPV) | 0.9169 |
| Recall (Sensitivity) | 0.9130 |
| Specificity (TNR) | 0.9879 |
| F1 Score | 0.9149 |
| False Positive Rate (FPR) | 0.0120 |
| False Negative Rate (FNR) | 0.0870 |
| Negative Predictive Value (NPV) | 0.9873 |
| Model | Specificity | Sensitivity | Accuracy | FNR | FPRs |
|---|---|---|---|---|---|
| Autoencoder | 0.9735 | 0.4956 | 0.9496 | 0.5044 | 0.0265 |
| IF | 0.9811 | 0.6450 | 0.9649 | 0.3550 | 0.0183 |
| SVM | 0.9703 | 0.4362 | 0.9436 | 0.5638 | 0.0297 |
| LOF | 0.9474 | 0.0012 | 0.9001 | 0.9988 | 0.0526 |
| EdgeFog | 0.9879 | 0.9130 | 0.9882 | 0.0870 | 0.0120 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).