Inspiration

Retailers face increasing threats from fraud — ranging from coupon abuse and payment anomalies to bots manipulating online platforms. Traditional fraud detection systems rely on centralized data, which raises privacy risks and creates bottlenecks.
We wanted to design a privacy-first, collaborative solution where multiple retailers can fight fraud together without sharing raw data.

What it does

Our system enables real-time fraud detection across multiple retailers using federated learning.

  • Each retailer runs a local fraud detection model trained on their own transactions.
  • Only encrypted model updates are shared with a global aggregator — not the raw data.
  • The aggregator builds an improved global model and distributes it back to participants.
  • Retailers benefit from collective intelligence while maintaining full data privacy.

How I built it

  • Frontend Dashboard: React.js for monitoring fraud detection and model updates.
  • Backend API: Flask for communication between clients, aggregator, and dashboard.
  • Federated Learning: TensorFlow + Flower for local training and global aggregation.
  • Encryption: Fernet (AES-based) to securely transmit model weights.
  • Coordination: PocketBase for metadata storage, model versioning, and lightweight backend management.

Challenges I ran into

  • Ensuring data privacy while still enabling meaningful collaboration across retailers.
  • Handling real-time fraud detection without slowing down transaction pipelines.
  • Designing a workflow where encrypted updates could still be aggregated efficiently.
  • Deploying a smooth coordination flow between multiple clients and the central server.

Accomplishments that I'm proud of

  • Built a secure, federated learning pipeline from scratch for fraud detection.
  • Successfully demonstrated real-time detection with no raw data sharing.
  • Integrated a lightweight, practical backend (PocketBase) to manage models.
  • Designed a solution that is scalable, privacy-first, and retailer-friendly.

What I learned

  • Deep insights into federated learning frameworks and their real-world applications.
  • How to combine encryption + machine learning for secure collaboration.
  • Practical challenges in coordinating distributed AI training.
  • The importance of UX in AI dashboards for making insights actionable.

Built With

Share this project:

Updates