AI-Powered Fraud Detection Platform for Digital Payments
The Edge AI UPI Behavioural Risk Intelligence System is an advanced fraud detection platform designed to simulate how modern fintech systems monitor and prevent fraudulent transactions in real time.
Digital payment systems such as UPI process millions of transactions every second, making fraud detection a critical challenge.
Traditional fraud detection systems rely on fixed rule-based logic, which struggles to detect modern attack patterns such as:
• velocity attacks • behavioural manipulation • coordinated fraud rings • account takeover attempts
This project demonstrates how Artificial Intelligence, Behavioural Analytics, and Graph Intelligence can be combined to build a smarter fraud detection system.
Instead of relying only on predefined rules, the system analyzes transaction behaviour patterns and generates an intelligent fraud risk score.
The vision behind this project is to simulate a modern fintech fraud monitoring platform capable of:
• analysing behavioural transaction patterns • detecting anomalies in real time • identifying fraud networks using graph analytics • explaining AI decisions using explainable AI techniques
This system illustrates how AI-driven risk intelligence platforms can enhance financial security and fraud prevention.
The platform demonstrates the following capabilities.
Each transaction is evaluated using behavioural signals such as:
• transaction amount deviation • time between transactions • night transaction detection • transaction velocity patterns
These signals help identify abnormal user behaviour.
The system uses anomaly detection techniques to identify suspicious transactions.
Models used include:
• Isolation Forest • Logistic Regression • Behavioural sequence analysis
The models generate a fraud risk score representing the probability of fraudulent activity.
Fraud is often performed by groups of accounts working together.
The system analyzes relationships between users and merchants using graph analysis.
This enables detection of:
• suspicious transaction clusters • circular transaction patterns • coordinated fraud networks
Fraud detection models must be explainable to support investigation and compliance.
The system integrates Explainable AI techniques to show how each feature contributes to the fraud decision.
Example explanation:
amount_contribution: 500
time_gap_contribution: -0.2
night_risk: 50
This makes the system transparent and interpretable.
The architecture follows a layered structure similar to production fintech fraud detection platforms.
┌────────────────────┐
│ UPI Transaction │
│ User Payment │
└─────────┬──────────┘
│
▼
┌──────────────────────┐
│ FastAPI Backend │
│ Risk Scoring API │
└─────────┬────────────┘
│
▼
┌─────────────────────────────────┐
│ Behaviour Analysis Engine │
│ │
│ • Amount deviation │
│ • Time gap analysis │
│ • Night transaction detection │
│ • Velocity attack detection │
└─────────┬───────────────────────┘
│
▼
┌─────────────────────────────┐
│ Machine Learning Models │
│ │
│ • Isolation Forest │
│ • Logistic Regression │
│ • Behavioural sequence ML │
└─────────┬───────────────────┘
│
▼
┌─────────────────────────────┐
│ Risk Decision Engine │
│ │
│ APPROVE │
│ REVIEW │
│ STEP_UP_AUTH │
│ BLOCK_TRANSACTION │
└─────────┬───────────────────┘
│
▼
┌─────────────────────────────┐
│ Monitoring Dashboard │
│ (Streamlit) │
│ │
│ • Fraud intelligence │
│ • Fraud network graph │
│ • Risk heatmap │
│ • Fraud alerts │
│ • Explainable AI │
└─────────────────────────────┘
The Streamlit dashboard acts as a fraud monitoring console.
It provides multiple analysis modules.
Provides an overview of transaction analytics and risk statistics.
Simulates real-time transactions and evaluates fraud risk based on behavioural indicators.
Visualizes relationships between users and merchants to identify suspicious transaction networks.
Detects clusters of interconnected accounts that may indicate coordinated fraud.
Displays transaction risk distribution across simulated datasets.
Provides feature importance values explaining why a transaction was flagged as suspicious.
Displays high-risk transactions detected by the system in real time.
The system also explores Graph Neural Network based fraud detection techniques to detect suspicious nodes within financial transaction networks.
git clone https://github.com/unnikrishnanavida/edge-upi-risk-intelligence.git
cd edge-upi-risk-intelligence
pip install -r requirements.txt
uvicorn backend.api:app --reload
API endpoint
http://127.0.0.1:8000
Swagger documentation
http://127.0.0.1:8000/docs
streamlit run dashboard/dashboard.py
Dashboard
http://localhost:8501
edge-upi-risk-intelligence
│
├ backend
│ ├ api.py
│ ├ app
│ │ ├ core
│ │ ├ services
│
├ dashboard
│ └ dashboard.py
│
├ models
│ ├ logistic_model.pkl
│ └ lstm_model.pt
│
├ data
│ └ risk_history.json
│
├ logs
│ └ risk_engine.log
│
├ screenshots
│
├ requirements.txt
└ README.md
• Python • FastAPI • Streamlit • Scikit-Learn • NetworkX • Pandas • NumPy • Matplotlib
This system demonstrates how AI can power modern fraud detection platforms in:
• fintech payment gateways • banking transaction monitoring systems • digital wallet security platforms • financial risk intelligence engines
Potential future enhancements include:
• Graph Neural Networks for fraud detection • Kafka real-time transaction streaming • PostgreSQL data warehouse • distributed risk scoring services • cloud deployment on AWS or GCP
N. Unni Krishna
AI / ML Developer
Focused on building intelligent systems for:
• Fraud Detection • Behavioural Analytics • Financial Risk Intelligence
If you found this project interesting, consider giving the repository a star ⭐ to support development.
.png)
.png)
.png)
.png)
.png)
.png)
.png)