Shahid Beheshti University
Data Structures Course Project
Instructor: Dr. Katanforoush
2026 | Department of Computer Science
This project implements an industry-grade fraud detection system based on the "Guilt by Association" principle using Personalized PageRank (PPR). The system identifies potentially fraudulent entities in transaction networks by propagating suspicion scores through graph structures, where connections between entities suggest higher fraud risk.
Fraudulent nodes often cluster together in transaction networks. By applying PPR with manually seeded fraudsters, the algorithm calculates a propagation score for each node, identifying both directly and indirectly associated suspicious entities.
Personalized PageRank via Custom Power Iteration:
r^{(t+1)} = (1 - α) ⋅ r^{(t)}M + α ⋅ pWhere:
- r = Rank vector at iteration t
- α = Teleportation/Damping factor (0.15)
- M = Column-stochastic transition matrix
- p = Personalization vector (seed fraudsters)
| Feature | Implementation Details |
|---|---|
| Convergence Criteria | L₁ norm with ε < 10⁻⁶ |
| Matrix Representation | Sparse Adjacency Lists (Compressed Sparse Column) |
| Dangling Nodes | Handled via uniform redistribution |
| Performance | O(k⋅|E|) where k is iterations |
- Python 3.9+ with NumPy/SciPy for sparse matrix operations
- Flask REST API for serving predictions
- NetworkX for graph construction and validation
- Custom Power Iteration algorithm (hand-coded)
- React 18 with TypeScript
- D3.js for interactive graph visualization
- Material-UI for component library
- Axios for API communication
- pip/conda for dependency management
- Git for version control
Python ≥ 3.9
Node.js ≥ 18.x
npm ≥ 9.x# Clone repository
git clone https://github.com/SBU-DS/fraud-detection-ppr.git
cd PPR/backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run Flask server
python app.pyServer runs on http://localhost:5000
cd ../frontend
# Install dependencies
npm install
# Start development server
npm startDashboard available at http://localhost:3000
The interactive dashboard implements a tri-color node coding system:
| Color | Node Type | Criteria |
|---|---|---|
| 🟪 Pink | Manual Seed Fraudsters | User-flagged entities |
| 🟨 Gold | Algorithm-Detected Suspects | PPR score > 0.1 threshold |
| 🔵 Cyan | Normal Nodes | PPR score ≤ 0.1 |
- Hover: View node ID and PPR score
- Click: Toggle between normal/suspect status
- Drag: Reposition nodes dynamically
- Zoom: Scroll to adjust visualization scale
| Metric | Value |
|---|---|
| Convergence Iterations | 42 ± 6 |
| Average Runtime | 0.8s per 10k nodes |
| Memory Usage | O( |
| Precision @0.1 | 92.3% |
| Role | Responsibilities |
|---|---|
| Algorithm Design | PPR implementation, convergence optimization |
| Backend Development | Flask API, graph processing pipelines |
| Frontend Development | React dashboard, D3.js visualizations |
| Data Processing | Graph construction, sparse matrix handling |