Welcome to the GitHub repository for PTAP - Privacy Preserving Trigger Action Platform! PTAP aims to provide a solution for addressing privacy concerns in smart home environments, particularly those related to untrusted Trigger Action Platforms (TAPs).
Trigger Action Platforms (TAPs), such as Samsung SmartThings and Apple HomeKit, are becoming increasingly popular for managing smart homes. However, privacy concerns are rising as TAPs may share user data with third parties. Sensitive user-specific information can be inferred by TAPs, which include but are not limited to, user identities, occupancy status, and daily living routines.
PTAP is introduced as a solution to address the potential threat of untrusted TAPs. Unlike previous studies that focused on individual data points, PTAP considers the privacy of aggregated data sets over time, which can reveal personal behavior patterns and routines.
The PTAP design incorporates a privacy mediator, which serves as a trusted intermediary between smart home devices and the TAP server. The privacy mediator injects targeted perturbations into the data stream, confounding potentially malicious TAP classifiers. Furthermore, it also distinguishes between legitimate and fake actions sent from the TAP server, ensuring that only actions based on real data are executed.
First, you need to download the Orange4Home dataset. You can download it from https://amiqual4home.inria.fr/orange4home/.
Then, you need to have Tensorflow and ART (https://github.com/Trusted-AI/adversarial-robustness-toolbox) Then you can run the experiments including the following Python scripts:
- Preprocessing:
preprocess-Vminute.py - PTAP Classifier:
ptap_classifier_4cross_validation.py - PTAP experements:
ptap_exp.py - PTAP Utility Test:
ptap_utility_test.py
This script handles data preprocessing of the Orange4Home dataset (https://amiqual4home.inria.fr/orange4home/).
This script trains a classifier with 4-fold cross-validation on preprocessed data.
The ptap_exp.py script is designed to evaluate the robustness of TAP classifiers against various adversarial attacks. It contains functions for conducting different types of attacks (FGSM, JSMA, UAP), measuring their impact on model accuracy, and recording the time taken and number of events injected during each attack. Users can initiate specific experiments by calling the main_runner function with the desired attack type. The script also includes transferability tests, where adversarial examples generated for one model are tested against three target models to assess the cross-model effectiveness of the attacks.
This script evaluates the utility of PTAP, assuming that the user is running five real IoT applications in their smart home based on the real-world Orange4 Home dataset.
PTAP is licensed under the MIT License.