Project Inspiration

I was pickpocketed on a bus and did not realize until later in the day. By the time I noticed, several transactions had already gone through. That experience made me question why the fraud systems did not catch it earlier. If my phone was not near the transaction and I was not physically present, why was it not flagged?

That experience motivated me to build SCOPE (Spatial-Contextual Operational Protection Engine). I wanted to explore whether fraud detection could be improved by combining behavioral patterns, geospatial reasoning, and real-time contextual signals such as phone proximity instead of relying only on static rules or isolated model predictions.

SCOPE simulates a more realistic fraud detection workflow by integrating machine learning with contextual safeguards and explainable outputs. The goal is to demonstrate how fraud systems can balance accuracy, interpretability, and operational usability while reducing false positives and improving real-world responsiveness.

Technology Stack

Languages

  • Python (backend + ML pipeline)
  • JavaScript (frontend)
  • HTML/CSS (UI layout + styling)

Frameworks & Libraries

Backend

  • FastAPI — real-time scoring API and service architecture
  • scikit-learn — model training (Naive Bayes, Decision Tree, Random Forest)
  • NumPy / Pandas — data processing and feature engineering
  • joblib — model serialization

Frontend

  • Vite — fast frontend tooling + dev server
  • Leaflet.js — interactive map for phone-location input
  • Vanilla JS — lightweight UI logic

Platforms

  • Local deployment (designed for cloud portability)
  • Architecture structured for integration with cloud inference pipelines (AWS/GCP-ready design)

Tools

  • Git + GitHub for version control
  • Postman for API testing
  • Matplotlib for fraud heatmap visualization

Product Summary

SCOPE is a real-time fraud-risk simulation platform that evaluates card transactions using machine learning and contextual safeguards. It combines behavioral profiling, geospatial reasoning, and explainable scoring to identify suspicious activity while minimizing false positives.

Core Features

Real-Time Fraud Scoring
Transactions are scored using an ensemble of classical ML models trained on engineered behavioral, temporal, and geospatial features. Outputs include fraud probability, risk classification (approve/block), and calibrated confidence.

Context-Aware Decision Logic
SCOPE augments model predictions with behavioral deviation checks, geospatial anomaly detection, phone-location validation, and ensemble disagreement safeguards to improve reliability.

Explainable AI Outputs
Each decision includes interpretable reasons, model score breakdowns, and contextual risk indicators for analyst review.

Interactive Visualization
The frontend supports map-based phone input, transaction heatmaps, and historical activity clustering for clear real-time demos.


Innovative Aspects

SCOPE emphasizes system-level intelligence over model novelty by combining ML predictions with contextual safeguards and explainability. Its design reflects real-world fraud workflows, balancing accuracy, interpretability, and low-latency deployment requirements but with a focus on card-present environments.


AI Use

Approximately 20-30% of the codebase involved AI-assisted generation (refactoring and front end logic development + documentation). Core architecture, feature engineering, fraud simulation logic, and system design decisions were implemented manually.

Built With

Share this project:

Updates