Inspiration
With rising mobile threats like spyware, trojans, and malicious background apps, detecting threats on user devices has become crucial. However, traditional cloud-based models compromise user privacy by collecting sensitive behavioral data. SmartGuard was inspired by the idea that we can build intelligent models without ever exposing user data, using Federated Learning and Differential Privacy.
What it does
SmartGuard detects suspicious app behavior (e.g., excessive microphone usage, abnormal background activity, permission misuse) by:
- Training a lightweight ML model directly on the user’s device,
- Sharing only differentially-private model updates with a central server,
- Aggregating updates securely to create a smarter global threat detection model.
How I built it
I built a Federated Learning simulation in Python using Jupyter Notebook, simulating:
- 5 clients representing mobile devices,
- Synthetic behavioral data with 10 features per sample,
- Local training using Logistic Regression,
- Noise injection via Gaussian noise (Differential Privacy),
- Secure aggregation through Federated Averaging. I visualized how model accuracy evolves over federated rounds and explored the trade-off between privacy and performance.
Challenges I ran into
- Balancing privacy and accuracy — too much noise hurt model performance.
- Designing realistic features to represent mobile threats in a meaningful way.
- Simulating a multi-client federated environment without a complex backend.
Accomplishments that i'm proud of
- Built a working simulation of federated learning with privacy protection from scratch.
- Clearly demonstrated the privacy-performance trade-off in visual results.
- Created a fully self-contained presentation-ready model with plots, code, and explanations.
- Made advanced topics like FL and DP understandable for others with minimal setup.
What we learned
- How Federated Learning can empower on-device AI while preserving privacy.
- How Differential Privacy mechanisms (like Gaussian noise) protect data.
- The limitations of federated systems under constrained devices and data heterogeneity.
- That ethical AI is achievable without compromising effectiveness.
What's next for Smart Guard
- Add real behavioral datasets (e.g., AndroZoo or Drebin) for more realistic modeling.
- Build a minimal Flutter app interface to simulate model updates and detections.
- Integrate a lightweight on-device neural model for deeper threat understanding.
- Explore secure aggregation techniques like Secure Multi-party Computation (SMPC).
- Open-source the project to invite contributions and improvements.