All Projects → PurduePAML → Trojannn

PurduePAML / Trojannn

Trojan Attack on Neural Network

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Trojannn

Deepo
Setup and customize deep learning environment in seconds.
Stars: ✭ 6,145 (+5063.87%)
Mutual labels:  caffe, theano
Data Science Ipython Notebooks
Data science Python notebooks: Deep learning (TensorFlow, Theano, Caffe, Keras), scikit-learn, Kaggle, big data (Spark, Hadoop MapReduce, HDFS), matplotlib, pandas, NumPy, SciPy, Python essentials, AWS, and various command lines.
Stars: ✭ 22,048 (+18427.73%)
Mutual labels:  caffe, theano
Learning
The data is the future of oil, digging the potential value of the data is very meaningful. This library records my road of machine learning study.
Stars: ✭ 330 (+177.31%)
Mutual labels:  caffe, theano
Machine Learning Curriculum
💻 Make machines learn so that you don't have to struggle to program them; The ultimate list
Stars: ✭ 761 (+539.5%)
Mutual labels:  caffe, theano
Psgan
Periodic Spatial Generative Adversarial Networks
Stars: ✭ 108 (-9.24%)
Mutual labels:  theano
Joint Face Detection And Alignment
Caffe and Python implementation of Joint Face Detection and Alignment using Multi-task Cascaded Convolutional Networks
Stars: ✭ 102 (-14.29%)
Mutual labels:  caffe
Scripts
Shadowsocks/SS一键脚本、ShadowsocksR/SSR一键脚本、V2Ray一键脚本、trojan一键脚本、VPS购买教程,各种网络资源和网络教程
Stars: ✭ 1,377 (+1057.14%)
Mutual labels:  trojan
Qv2ray
⭐ Linux / Windows / macOS 跨平台 V2Ray 客户端 | 支持 VMess / VLESS / SSR / Trojan / Trojan-Go / NaiveProxy / HTTP / HTTPS / SOCKS5 | 使用 C++ / Qt 开发 | 可拓展插件式设计 ⭐
Stars: ✭ 12,886 (+10728.57%)
Mutual labels:  trojan
Dlcookbook Dlbs
Deep Learning Benchmarking Suite
Stars: ✭ 114 (-4.2%)
Mutual labels:  caffe
Aetros Cli
AETROS CLI + SDK. Command line application to manage/monitor machine learning training in AETROS Trainer
Stars: ✭ 111 (-6.72%)
Mutual labels:  theano
Style transfer
Data-parallel image stylization using Caffe.
Stars: ✭ 106 (-10.92%)
Mutual labels:  caffe
Repo 2016
R, Python and Mathematica Codes in Machine Learning, Deep Learning, Artificial Intelligence, NLP and Geolocation
Stars: ✭ 103 (-13.45%)
Mutual labels:  theano
Trojan Web
trojan多用户管理程序web页面
Stars: ✭ 108 (-9.24%)
Mutual labels:  trojan
Keras Oneclassanomalydetection
[5 FPS - 150 FPS] Learning Deep Features for One-Class Classification (AnomalyDetection). Corresponds RaspberryPi3. Convert to Tensorflow, ONNX, Caffe, PyTorch. Implementation by Python + OpenVINO/Tensorflow Lite.
Stars: ✭ 102 (-14.29%)
Mutual labels:  caffe
Subscribe2clash
v2ray\trojan\ss\ssr\ssd订阅转换Clash规则配置,自动更新ACL4SSR路由规则
Stars: ✭ 112 (-5.88%)
Mutual labels:  trojan
Maskyolo caffe
YOLO V2 & V3 , YOLO Combined with RCNN and MaskRCNN
Stars: ✭ 101 (-15.13%)
Mutual labels:  caffe
Breaking Gfw Book
整理所有的翻墙方法,持续更新....欢迎PR
Stars: ✭ 105 (-11.76%)
Mutual labels:  trojan
Sphereface
Implementation for <SphereFace: Deep Hypersphere Embedding for Face Recognition> in CVPR'17.
Stars: ✭ 1,483 (+1146.22%)
Mutual labels:  caffe
Kaggle Dogs Vs Cats Caffe
Kaggle dogs vs cats solution in Caffe
Stars: ✭ 105 (-11.76%)
Mutual labels:  caffe
Resnet Imagenet Caffe
train resnet on imagenet from scratch with caffe
Stars: ✭ 105 (-11.76%)
Mutual labels:  caffe

TrojanNN

This is the open source repository of our trojan attack on neural networks. The paper is published in Proc. of NDSS 2018. The slides

Citation

@inproceedings{Trojannn,
  author    = {Yingqi Liu and
               Shiqing Ma and
               Yousra Aafer and
               Wen-Chuan Lee and
               Juan Zhai and
               Weihang Wang and
               Xiangyu Zhang},
  title     = {Trojaning Attack on Neural Networks},
  booktitle = {25nd Annual Network and Distributed System Security Symposium, {NDSS}
               2018, San Diego, California, USA, February 18-221, 2018},
  publisher = {The Internet Society},
  year      = {2018},
}

Repo Structure

  • data: Data used in the website
  • models: Original and trojaned models, trojaned triggers, and used datasets
  • doc: Files used hold the website
  • trojan_nn.pdf: Our research paper.

Dependences

Python 2.7, Caffe, Theano.

Quick Start

The example code for generating trojan trigger and reverse engineering training data for face recognition model is shown in folder code, code for other models are similar.

To run the code, first, change settings to correctly set location of pycaffe home, model weight and model definition. Then ./gen_ad.sh to generate trigger or training data.

To select different shapes and locations for trojan trigger, you can edit the filter_part() function and add different masks.

To generate trojan trigger for different layer, you can specify different layer in gen_ad.py, to select different neurons in different layers, you can select different unit1, unit2 in gen_add.py

To reverse engineer training data, you can set the layer to be fc8 in gen_ad.py and comment code to mask gradient in act_max.tvd.center_part.py.

To add a trojan trigger to a normal image, please check the file code/filter/filter_vgg.py. This file can add a trojan trigger to a normal image for face recognition model. This file has 4 arguments. The first argument is the path of the normal image. The second argument is the path of trojan trigger iamge. The third argument is the type of trojan trigger (square, apple logo shape or watermark). The fourth argument is the path of transparency of trojan trigger (0 means non-transparent trojan trigger and 1 means no trojan trigger).

Models

Face Recognition

To test one image, you can simply run

$ python test_one_image.py <path_to_your_image>

Speech Recognition

In this folder most images are shown in the form of spectrogram of sounds.

To test one image, you can simply run

$ python test_speech.py <path_to_spectrogram_image>

Age Recognition

To test one image, you can simply run

$ python test_one_image.py <path_to_image>

Attitude Recognition

We need follow the instructions in CNN sentence . First download pre-trained word2vec binary file, and then run,

$ python process_data.py GoogleNews-vectors-negative300.bin # GoogleNews-vectors-negative300.bin is the downloaded word2vec binary file

You should get a file mr.p. Then, you can test the model by running:

$ python conv_net_sentence_mlp_test.py model_to_test.pkl

Web Site

https://purduepaml.github.io/TrojanNN/

Contacts

Yingqi Liu, [email protected]

Shiqing Ma, [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].