Home

Awesome

<div align="center"> <img src="imgs/logo.png" width="200px" /> </div>

LOTUS: Evasive and Resilient Backdoor Attacks through Sub-Partitioning

Python 3.8 Pytorch 2.3.1 Torchvision 0.18.1 CUDA 12.1 License MIT

Table of Contents

Overview

<img src="imgs/overview.png" width="900px"/>

Code Architecture

.
├── checkpoint        # Saved models
├── data              # Dataset folder
├── models            # Model architectures
│   ├── resnet.py     # ResNet models
│   └── vgg.py        # VGG models
├── dataset.py        # Dataset processing function
├── main.py           # Main function
├── partition.py      # (Implicit) partioning function
├── train.py          # Training function
├── trigger.py        # Trigger function
└── utils.py          # Utility functions

Environments

# Create python environment (optional)
conda env create -f environment.yml
source activate lotus

Experiments

We provide example code snippets for CIFAR-10 dataset. These can be easily plugged in and modified in ./utils.py, specifically within the get_dataset(*) functions.

Usage

To train and evaluate a backdoored model using LOTUS, run:

python main.py --gpu 0

It involves three steps to launch LOTUS:

Configurations

The specific arguments and hyperparameters used to launch LOTUS can be found in ./main.py, particularly in lines 45-61.

HyperparameterDefault ValueDescription
gpu"0"GPU ID used to launch the experiment.
dataset"cifar10"The utilized dataset.
network"resnet18"The utilized model architecture.
victim0The attack victim label.
target9The attack target label.
cluster"kmeans"Partitioning method.
num_par4Number of sub-partitions.
n_indi3Number of individual negative samples used in Trigger-focusing.
n_comb1Number of combined negative samples used in Trigger-focusing.
batch_size128Batch size for training.
epochs100Total number of training epochs.
seed1024Random seed for reproducibility.

Outputs

Several output files will be saved in the directory ./checkpoint.

Citation

Please cite our paper if you find it useful for your research.:smile:

@inproceedings{cheng2024lotus,
  title={Lotus: Evasive and resilient backdoor attacks through sub-partitioning},
  author={Cheng, Siyuan and Tao, Guanhong and Liu, Yingqi and Shen, Guangyu and An, Shengwei and Feng, Shiwei and Xu, Xiangzhe and Zhang, Kaiyuan and Ma, Shiqing and Zhang, Xiangyu},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  pages={24798--24809},
  year={2024}
}

Acknowledgement