[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-1308":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":10,"openIssues":12,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":13,"stars30d":14,"stars90d":13,"forks30d":13,"starsTrendScore":13,"compositeScore":15,"rankGlobal":8,"rankLanguage":8,"license":8,"archived":16,"fork":16,"defaultBranch":17,"hasWiki":18,"hasPages":16,"topics":19,"createdAt":8,"pushedAt":8,"updatedAt":20,"readmeContent":21,"aiSummary":22,"trendingCount":13,"starSnapshotCount":13,"syncStatus":11,"lastSyncTime":23,"discoverSource":24},1308,"tteh","Harshithabr18\u002Ftteh","Harshithabr18",null,"Jupyter Notebook",258,2,3,0,1,35.53,false,"main",true,[],"2026-06-12 04:00:08","\n\n\u003Cdiv align=\"center\">\n\n\u003Cimg src=\"DSU logo.jpeg\" alt=\"Dayananda Sagar University Logo.png\" width=\"150\"\u002F>\n\n# 🏦 Advanced Deep Learning for Real-Time Fraud Detection in Banking\n\n### 🔐 Revolutionizing Financial Security with AI\n\n**TTEH LAB · School of Engineering, Dayananda Sagar University**  \n*Bangalore – 562112, Karnataka, India*\n\n\u003Cbr\u002F>\n\n![GNN](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FModel-Graph%20Neural%20Network-purple?style=for-the-badge)\n![Transformer](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FModel-Transformer-blueviolet?style=for-the-badge)\n![RNN](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FModel-RNN-orange?style=for-the-badge)\n![Autoencoder](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FModel-Autoencoder-green?style=for-the-badge)\n![IsolationForest](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FModel-Isolation%20Forest-teal?style=for-the-badge)\n![Hybrid](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FArchitecture-Hybrid%20Model-red?style=for-the-badge)\n![Adversarial](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTraining-Adversarial-black?style=for-the-badge)\n\n\u003Cbr\u002F>\u003Cbr\u002F>\n\n### 📌 Prototype Implementation of:\n\n**\"Advanced Deep Learning for Real-Time Fraud Detection in Banking\"**\n\n\u003Cbr\u002F>\n\n### 📄 ICICI-2025, IEEE Xplore  \n**DOI:** https:\u002F\u002Fdoi.org\u002F10.1109\u002FINCET64471.2025.11139964\n\n\u003C\u002Fdiv>\n\n---\n\n# 🔭Overview\n\n\u003Cdiv align=\"left\">\n\nThis project presents an AI-driven fraud detection system that uses graph-based modeling and deep learning to identify fraudulent financial transactions more effectively than traditional approaches. Instead of analyzing transactions individually, the system represents users and transactions as a connected graph, enabling it to capture hidden relationships and complex fraud patterns. By leveraging Graph Neural Networks (GCN) along with attention mechanisms, the model learns both local and global interaction patterns within the data. The system is trained using a hybrid loss function to improve accuracy and robustness, and it generates real-time fraud predictions evaluated using metrics such as precision, recall, and F1-score. Overall, the approach enhances detection performance, scalability, and adaptability for modern digital payment systems.\n\n\u003Cbr\u002F>\n\n\u003C\u002Fdiv>\n\n\n## 📚 Table of Contents\n\n1. [Problem Statement](#1--problem-statement)\n2. [Tech Stack](#2--tech-stack)\n3. [Methodology & Key Components](#3--methodology--key-components)\n4. [System Architecture](#4--system-architecture) \n5. [Mathematical Modeling & Core Equations](#5--mathematical-modeling--core-equations)\n6. [Model Design](#6--model-design)  \n7. [Transaction Graph Visualization](#7--transaction-graph-visualization)\n8. [Results & Analysis](#8--results--analysis)  \n9. [Confusion Matrix Analysis](#9--confusion-matrix-analysis)  \n10. [Conclusion](#10--conclusion)  \n11. [Contributors & Details](#11--contributors--details)  \n12. [IEEE Paper](#12--ieee-paper)  \n  \n\n\n\n## 1. 💡 Problem Statement\n \n\n> *\"How to detect banking fraud in real time accurately?\"*\n\nThe banking industry faces increasingly sophisticated fraud, causing significant financial losses and reducing customer trust. Traditional rule-based and statistical systems are often reactive, struggle to adapt to evolving fraud patterns, and generate high false positives, disrupting legitimate transactions. The scale and speed of modern financial data demand a more intelligent, real-time fraud detection approach.\n\n### Project Goal\nThe goal of this project is to develop an **advanced deep learning framework for real-time fraud detection** that improves accuracy and efficiency using modern AI techniques. The system aims to:\n\n- **Minimize Financial Losses** through precise fraud detection  \n- **Improve Detection Speed** with real-time analysis  \n- **Reduce False Positives** to avoid disrupting genuine users  \n- **Enhance Adaptability** to evolving fraud patterns  \n- **Leverage Advanced Models** such as RNNs\u002FTransformers, GNNs, and anomaly detection techniques  \n\n\u003Cbr\u002F>\n\n`Fraud Detection` · `Deep Learning` · `Real-Time Systems` · `Banking Security` · `AI Models`\n\n\u003C\u002Fdiv>\n\n---\n\n## 2. 🧪  Tech Stack \n\n\n\n| Layer                | Technologies                          |\n|---------------------|--------------------------------------|\n| Language            | Python                               |\n| Data Processing     | Pandas, NumPy                        |\n| Imbalance Handling  | SMOTE                                |\n| ML Models           | GNN, Transformers                    |\n| Frameworks          | PyTorch \u002F TensorFlow                 |\n| Security            | Zero Trust Architecture              |\n| Visualization       | Matplotlib, Seaborn                  |\n| Tools               | Jupyter, GitHub                      |\n\n- Built using **Python**, enabling seamless integration of data processing, machine learning, and deep learning components.  \n- Efficient data handling achieved with **Pandas** and **NumPy** for preprocessing and transformation.  \n- Addressed class imbalance using **SMOTE**, improving model fairness and performance.  \n- Leveraged **Graph Neural Networks (GNN)** and **Transformer models** for capturing complex relationships and sequential patterns.  \n- Implemented using powerful frameworks like **PyTorch \u002F TensorFlow** for scalable deep learning.  \n- Designed with a **Zero Trust Architecture**, enhancing system security and resilience.  \n- Data insights and results visualized using **Matplotlib** and **Seaborn**.  \n- Developed and managed using **Google Colab** and version-controlled via **GitHub**.\n\n---\n\n\n\n## 3. 🔄  Methodology & Key Components \n\n\n\n### ⚙️ Methodology\n- **Data Collection:** Transaction dataset (CSV with fraud & legitimate cases)  \n- **Preprocessing:** Cleaning, feature selection, normalization  \n- **Imbalance Handling:** SMOTE applied to balance fraud class  \n- **EDA:** Pattern analysis & visualization  \n- **Model Development:** Hybrid model (GNN + Transformer)  \n- **Adversarial Training:** Improves robustness against attacks\u002Fnoise  \n- **Evaluation:** Accuracy, Precision, Recall, F1-score, ROC-AUC  \n- **Security:** Zero Trust principles for secure predictions  \n\n---\n\n### 🧩 Key Components\n- **Data Layer:** Input dataset & preprocessing  \n- **Processing Layer:** Cleaning + SMOTE balancing  \n- **Model Layer:** GNN (relationships) + Transformer (sequences)  \n- **Training Layer:** Adversarial learning & optimization  \n- **Evaluation Layer:** Metrics & performance analysis  \n- **Security Layer:** Zero Trust validation  \n- **Output Layer:** Fraud detection results & insights  \n\n---\n## 4. 📌  System Architecture \n\n\n\n```mermaid\nflowchart TD\n\nA[Raw Dataset CSV Input] --> B[Data Ingestion and EDA]\n\nB --> C[Data Preprocessing]\n\nC --> C1[Cleaning]\nC --> C2[Feature Split]\nC --> C3[SMOTE Balancing]\n\nC --> D[Model Training Random Forest]\n\nD --> E[Model Evaluation Metrics and Visualization]\n\nE --> F[Model Serialization joblib pkl]\n\nF --> G[Inference Engine New Data Prediction]\n```\n\n---\n\n\n## 5. 📐 Mathematical Modeling & Core Equations\n\n\n### 🔹 Graph Representation\n\n$$\nG = (V, E)\n$$\n\n➡️ **Purpose:** Model transactions as a network  \n➡️ **Used in:** Capturing relationships between users\u002Faccounts  \n\n---\n\n### 🔹 GCN Layer\n\n$$\nH^{(l+1)} = \\sigma \\left( D^{-1\u002F2} A D^{-1\u002F2} H^{(l)} W^{(l)} \\right)\n$$\n\n➡️ **Purpose:** Learn features from connected nodes  \n➡️ **Used in:** Detecting suspicious patterns in transaction graphs  \n\n---\n\n### 🔹 Self-Attention\n\n$$\nAttention(Q,K,V)=softmax\\left(\\frac{QK^T}{\\sqrt{d_k}}\\right)V\n$$\n\n➡️ **Purpose:** Focus on important interactions  \n➡️ **Used in:** Capturing global dependencies in data  \n\n---\n\n### 🔹 Prediction Layer\n\n$$\ny = softmax(WZ + b)\n$$\n\n➡️ **Purpose:** Classify transaction (fraud \u002F non-fraud)  \n➡️ **Used in:** Final decision output  \n\n---\n\n### 🔹 Loss + Optimization\n\n$$\nL = L_{CE} + \\lambda_1 L_{graph} + \\lambda_2 L_{adv}\n$$\n\n$$\n\\theta = \\theta - \\eta \\nabla L\n$$\n\n➡️ **Purpose:** Minimize error & improve model robustness  \n➡️ **Used in:** Training phase  \n\n---\n\n### 🔹 Evaluation Metric\n\n$$\nF1 = 2 \\cdot \\frac{Precision \\cdot Recall}{Precision + Recall}\n$$\n\n➡️ **Purpose:** Balance precision & recall  \n➡️ **Used in:** Measuring fraud detection performance  \n\n## 6. 🤖 Model Design \n\n- Hybrid deep learning architecture combining  \n  **Graph Neural Networks (GNN)** + **Transformer Models**\n\n- **GNN Layer**\n  - Captures relationships between entities (graph-structured data)\n  - Learns connectivity patterns and hidden dependencies\n\n- **Transformer Layer**\n  - Processes sequential data (logs \u002F events)\n  - Captures long-range dependencies using attention mechanism\n\n- **Feature Fusion**\n  - Outputs from GNN and Transformer are combined\n  - Creates a richer, context-aware representation\n\n- **Adversarial Training**\n  - Introduces perturbed inputs during training\n  - Improves robustness against attacks and noise\n\n- **Output Layer**\n  - Classification \u002F prediction (e.g., anomaly detection)\n\n---\n\n### 🔄 Workflow\n**Input Data → Preprocessing → GNN → Transformer → Fusion → Prediction**\n\n---\n\n\n## 7. 🔗 Transaction Graph Visualization\n\n```mermaid\ngraph TD\n\n%% Users\nU1[User A]\nU2[User B]\nU3[User C]\n\n%% Accounts\nA1[Account 1]\nA2[Account 2]\nA3[Account 3]\n\n%% Devices\nD1[Device X]\nD2[Device Y]\n\n%% Merchants\nM1[Merchant 1]\nM2[Merchant 2]\n\n%% User-Account Mapping\nU1 --> A1\nU2 --> A2\nU3 --> A3\n\n%% Transactions (Edges with amount)\nA1 -->|500| M1\nA2 -->|700| M1\nA3 -->|1200| M2\n\n%% Shared Device Relationships (Fraud Indicator)\nA1 --- D1\nA2 --- D1\nA3 --- D2\n\n%% Suspicious Pattern (Fraud Link)\nA1 -.-> A2\n```\n\n\n##  8. 📊  Results & Analysis \n\n\n\n| Metric \u002F Finding | Value \u002F Result | Analysis & Implications |\n| :--- | :--- | :--- |\n| **Initial Class Distribution** | **Legitimate (0):** 150,337\u003Cbr>**Fraudulent (1):** 294 | 🚨 **Severe Imbalance:** The dataset is highly skewed, causing models to favor the majority class and overlook fraud cases. |\n| **Overall Accuracy** | **99.95%** | ⚠️ **Accuracy Paradox:** Despite being high, accuracy is misleading due to imbalance. Even a naive model could achieve similar results. |\n| **Precision (Fraud Class)** | **0.96 (96%)** | ✅ **High Confidence:** Fraud predictions are highly reliable, minimizing inconvenience to legitimate users. |\n| **Recall (Fraud Class)** | **0.80 (80%)** | ❗ **Critical Weakness:** 20% of fraud cases are missed, leading to potential financial losses. |\n| **F1-Score (Fraud Class)** | **0.87 (87%)** | ⚖️ **Balanced Performance:** Indicates decent trade-off, but affected by lower recall. |\n| **ROC-AUC Score** | **~0.898** | 📈 **Strong Discrimination:** Good ability to distinguish classes, but not optimal for high-security systems. |\n| **Confusion Matrix Breakdown** | **TN:** 30,061\u003Cbr>**FP:** 2\u003Cbr>**FN:** 13\u003Cbr>**TP:** 51 | 🔍 **Conservative Model Behavior:** Minimizes false alarms but allows some fraud cases to go undetected. |\n| **Pipeline Optimization Applied** | **SMOTE Integration** | 🔧 **Improvement Strategy:** Balances dataset by generating synthetic fraud samples, enhancing recall and detection capability. |\n\n---\n\n### 🔍 Key Takeaways\n- Model prioritizes **precision over recall**, ensuring fewer false alerts  \n- **Class imbalance** significantly impacts performance metrics  \n- **SMOTE improves minority class detection**, but further tuning is needed  \n- Trade-off exists between **security (recall)** and **user experience (precision)** \n\n---\n## 9. 📊 Confusion Matrix Analysis\n\n![Confusion Matrix](confusion_matrix.png)\n\n- The confusion matrix evaluates the performance of the fraud detection model by comparing **actual vs predicted classifications**.  \n\n- **True Negatives (TN = 30,061)**  \n  - Correctly identified legitimate transactions  \n  - Indicates strong performance in recognizing normal activity  \n\n- **False Positives (FP = 2)**  \n  - Legitimate transactions incorrectly flagged as fraud  \n  - Very low value → ensures **minimal disruption to users**  \n\n- **False Negatives (FN = 13)** ❗  \n  - Fraud transactions missed by the model  \n  - Critical issue as it may lead to **financial loss**  \n\n- **True Positives (TP = 51)** ✅  \n  - Correctly detected fraud cases  \n  - Shows the model is effective in identifying fraudulent behavior  \n\n---\n\n \n##  10. 🏁  Conclusion \n\n\n\n### **Summary of Findings**\n- The hybrid model combining **GNN and Transformer architectures** achieved high overall accuracy (~99.95%)  \n- Strong **precision (96%)** indicates reliable fraud detection with minimal false alarms  \n- However, **recall (80%)** reveals that some fraud cases remain undetected  \n- Severe class imbalance significantly influenced model behavior and evaluation metrics  \n\n### **Impact and Significance**\n- The model is effective in **minimizing false positives**, ensuring better user experience  \n- Missed fraud cases highlight a **critical risk in real-world financial systems**  \n- Demonstrates the importance of using **appropriate metrics (Precision, Recall, F1)** instead of relying solely on accuracy  \n- Integration of **SMOTE and adversarial training** improves robustness and fairness  \n\n### **Next Steps**\n- Improve **recall** through hyperparameter tuning and advanced sampling techniques  \n- Experiment with **ensemble or more advanced deep learning models**  \n- Optimize the system for **real-time deployment and scalability**  \n- Further strengthen the **security layer with advanced zero-trust and quantum-resilient mechanisms**  \n\n---\n\n##  11. 👥 Contributors & Details \n\u003Ctable>\n\u003Ctr>\n\u003Ctd align=\"center\">\n\u003Cb>Harshitha B R\u003C\u002Fb>\u003Cbr>\nENG23CY0018\u003Cbr>\n\u003Ca href=\"mailto:harshisuma1805@gmail.com\">harshisuma1805@gmail.com\u003C\u002Fa>\n\u003C\u002Ftd>\n\n\u003Ctd align=\"center\">\n\u003Cb>Pragna G\u003C\u002Fb>\u003Cbr>\nENG23CY0031\u003Cbr>\n\u003Ca href=\"mailto:pragna122004@gmail.com\">pragna122004@gmail.com\u003C\u002Fa>\n\u003C\u002Ftd>\n\n\u003Ctd align=\"center\">\n\u003Cb>Akshata\u003C\u002Fb>\u003Cbr>\nENG23CY0003\u003Cbr>\n\u003Ca href=\"mailto:tattiakshata@gmail.com\">tattiakshata@gmail.com\u003C\u002Fa>\n\u003C\u002Ftd>\n\n\u003Ctd align=\"center\">\n\u003Cb>Sunay N\u003C\u002Fb>\u003Cbr>\nENG23CY0039\u003Cbr>\n\u003Ca href=\"mailto:Rajsunay1@gmail.com\">Rajsunay1@gmail.com\u003C\u002Fa>\n\u003C\u002Ftd>\n\n\u003Ctd align=\"center\">\n\u003Cb>Druthu Katna\u003C\u002Fb>\u003Cbr>\nENG23CY0014\u003Cbr>\n\u003Ca href=\"mailto:druthukatna51@gmail.com\">druthukatna51@gmail.com\u003C\u002Fa>\n\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftable>\n\n---\n\n\n### 🏫 Department  \n**Department of Computer Science and Engineering (Cyber Security)**  \nSchool of Engineering, Dayananda Sagar University  \n\n---\n\n## 🧑‍🏫 Mentor\n**Dr. Prajwalasimha S N**  \n_Ph.D., Postdoc. (NewRIIS)_  \nAssociate Professor  \n\nDepartment of Computer Science and Engineering (Cyber Security)  \nSchool of Engineering, Dayananda Sagar University  \n\n---\n\n\n## 🔬 Laboratory\n\n**TTEH LAB**  \nSchool of Engineering  \nDayananda Sagar University  \n\n📍 Bangalore – 562112, Karnataka, India  \n\n---\n\n## 12. 📄 IEEE Paper\n\n**DOI:** https:\u002F\u002Fdoi.org\u002F10.1109\u002FINCET64471.2025.11139964\n\n\u003Cimg src=\"DSU logo.jpeg\" alt=\"Dayananda Sagar University Logo\" width=\"120\"\u002F>\n\n\n","该项目旨在通过AI驱动的系统实现实时银行欺诈检测。它利用图神经网络（GNN）和注意力机制，将用户和交易表示为连接图，以捕捉隐藏的关系和复杂的欺诈模式。核心功能包括基于图的建模、混合损失函数训练以及实时欺诈预测生成，使用精度、召回率和F1分数等指标进行评估。技术特点涵盖图神经网络、Transformer、RNN、自编码器及孤立森林模型的应用。适合用于现代数字支付系统的欺诈检测场景，提升检测性能、可扩展性和适应性。","2026-06-11 02:42:57","CREATED_QUERY"]