Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Anomaly detection in smart buildings using federated learning

Anomaly detection in smart buildings using federated learning

A modern smart building has a number of internet-enabled devices. IoT sensors to measure temperature, internet-enabled lighting, IP camera, IP phone, etc., and data is generated at scale across all the devices. There are two critical aspects of the network of devices to function well: data quality (the generated data has to be correct within an accepted error range) and security (with a number of internet-connected devices, securing the network from cyber threats is very important). But there are two broad challenges to achieve this: the data collected is very sensitive to business operations and hence the solution has to be privacy preserving, and the amount of data generated is huge and is not feasible to upload all of them to the cloud.

The authors explain how they used federated learning to build anomaly-detection models that monitor data quality and cybersecurity while preserving data privacy. Federated learning enables edge devices to collaboratively learn a machine learning model but keep all of the data on the device itself. Instead of moving data to the cloud, the models are trained on the device and only the updates of the model are shared across the network. Using federated learning gives you the following advantages: more accurate and low latency models where the data is not moved and only the model updates are shared, resulting in models having low latency (since the models are on the device) and being more accurate; privacy preserving because the data remains on the device; and energy efficient, because the workload on the device is drastically reduced—leading to lower power consumption and longer device life.

The authors built deep learning models using Pytorch and Pysyft. They outline their architecture and show you how federated learning can help improve the models. Federated learning provides a framework to port models across organizations for the same domain of the device, something not possible in traditional cloud-based anomaly detection models, which makes it easy to deploy with very limited data.

Tuhin Sharma

October 17, 2019
Tweet

More Decks by Tuhin Sharma

Other Decks in Technology

Transcript

  1. Anomaly detection in smart buildings using federated learning Tuhin Sharma

    | Binaize Labs Bargava Subramanian | Binaize Labs
  2. Outline • What is Smart Building? • Anomalies in Smart

    Building. • Challenges in IoT. • Federated Learning. • Anomaly detection using Federated Learning • Demo • Types of Federated Learning. • Pros and Cons.
  3. We are increasingly moving towards a smart inter-connected world -

    Wearables - Self-driving cars - Healthcare - Drone - Smart Retail Store. - Industrial IoT - Smart Farm - Smart Home and Building - Smart City 10B+ IoT devices!!
  4. Smart buildings not only take complete care of tenants’ comfort

    and safety but also promote energy and financial savings. Now, AI also contributes to making buildings smarter and more intelligent than ever. - Forbes 2019 ARTIFICIAL INTELLIGENCE SMART BUILDING SMARTER BUILDING What is Smart Building?
  5. How AI is helping buildings become smarter WATER MANAGEMENT BUILDING

    MAINTENANCE PARKING ASSISTANCE SMART BULBS MANAGEMENT HVAC MANAGEMENT
  6. The core is a stream of time series events and

    the goal is to find anomalies in them SENSORS’ APPLICATION LEVEL DATA SENSORS’ NETWORK LEVEL DATA
  7. But connected devices present a number of novel challenges INTERMITTENT

    INTERNET CONNECTION HIGH DATA VOLUME AND VELOCITY
  8. But connected devices present a number of novel challenges INTERMITTENT

    INTERNET CONNECTION LIMITED BATTERY HIGH DATA VOLUME AND VELOCITY
  9. But connected devices present a number of novel challenges INTERMITTENT

    INTERNET CONNECTION LIMITED BATTERY HIGH DATA VOLUME AND VELOCITY LIMITED MEMORY AND PROCESSING POWER
  10. But connected devices present a number of novel challenges INTERMITTENT

    INTERNET CONNECTION LIMITED BATTERY HIGH DATA VOLUME AND VELOCITY LIMITED MEMORY AND PROCESSING POWER DATA PRIVACY
  11. Federated Learning is here to rescue!! • Federation Construction. •

    Decentralized Training. • Model Accumulation. • Model Aggregation (FedAvg).
  12. (a) Federation Construction Pre-trained model A random subset of members

    of the devices is selected to receive the global model synchronously from the server.
  13. (b) Decentralized Training Data Data Data Data Each selected device

    computes an updated model using its local data.
  14. (c) Model Accumulation Only the model updates are sent from

    the federation to the server. Data is not moved.
  15. (d) Model Aggregation The server aggregates these model weights (typically

    by averaging) to construct an improved global model. Federated Average
  16. We use PySyft Our journey K-Means + Isolation Forest +

    Oneclass SVM Unsupervised Unsupervised + Supervised Deep Auto- Encoder Federated Learning Rules + Z-score
  17. Demo use case 1. Capture data. 2. Construct feature matrix

    3. Train/Test Split 4. Setup environment 5. Prepare federated data. 6. Train model in federated way. 7. Save, Load, Predict.
  18. Lets set up the environment for federated learning In these

    2 gateways data will reside and models will be trained
  19. Demo use case 1. Capture data. 2. Construct feature matrix

    3. Train/Test Split 4. Setup environment 5. Prepare federated data. 6. Train model in federated way. 7. Save, Load, Predict.
  20. Single Party Federated Learning Music recommendation engine only one entity

    is involved in governance of the distributed data capture and flow system
  21. Inference Attack • Model deltas encode subtle variations of user

    specific information. • Possible to de-anonymize participating devices using a limited set of auxiliary data. Aggregator (global param Wt+1) f(x,W1 t) D1 f(x,W2 t) D2 f(x,WN t) DN Down : Wt+1 Up : WN t
  22. Inference Attack • Model deltas encode subtle variations of user

    specific information. • Possible to de-anonymize participating devices using a limited set of auxiliary data. Aggregator (global param Wt+1) f(x,W1 t) D1 f(x,W2 t) D2 f(x,WN t) DN Down : Wt+1 Up : WN t
  23. Inference Attack • Model deltas encode subtle variations of user

    specific information. • Possible to de-anonymize participating devices using a limited set of auxiliary data. Aggregator (global param Wt+1) f(x,W1 t) D1 f(x,W2 t) D2 f(x,WN t) DN Down : Wt+1 Up : WN t
  24. Model Poisoning FL Aggregator [Wt + noise] Label : 0

    Label : 1 Label : 8 Label : 9 Anomaly classified as normal
  25. Acknowledgements • https://github.com/OpenMined/PySyft • "Federated Learning: Strategies for Improving Communication

    Efficiency" by Jakub Konečný,H. Brendan McMahan,Felix X. Yu,Peter Richtarik,Ananda Theertha Suresh,Dave Bacon • "Gradient-Leaks: Understanding and Controlling Deanonymization in Federated Learning" by Tribhuvanesh Orekondy, Seong Joon Oh, Yang Zhang, Bernt Schiele, Mario Fritz • "Comprehensive Privacy Analysis of Deep Learning: Stand-alone and Federated Learning under Passive and Active White-box Inference Attacks" by "Milad Nasr, Reza Shokri, Amir Houmansadr • https://www.apple.com/privacy/docs/Differential_Privacy_Overview.pdf • "Mitigating Sybils in Federated Learning Poisoning" by Clement Fung, Chris J.M. Yoon, Ivan Beschastnikh