Update README.md
This commit is contained in:
parent
ada7c56def
commit
a5fe314c8c
3 changed files with 37 additions and 1 deletions
38
README.md
38
README.md
|
|
@ -1 +1,37 @@
|
|||
# PrivacyJailbreak
|
||||
# <img src="/Users/xiaohong/Documents/Github/PrivacyJailbreak/img/logo.png" style="zoom:50%;" />PIG: Privacy Jailbreak Attack on LLMs via Gradient-based Iterative In-Context Optimization
|
||||
|
||||
> This repository contains the official code implementation of our paper: [](https://arxiv.org/abs/xxx)
|
||||
|
||||

|
||||
|
||||
## Setup
|
||||
|
||||
First, create a virtual environment using Anaconda:
|
||||
|
||||
```python
|
||||
conda create -n pig python=3.9.19
|
||||
conda activate pig
|
||||
```
|
||||
|
||||
Second, you need to install the necessary dependencies:
|
||||
|
||||
```python
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
## Datasets
|
||||
|
||||
You can download the Enron Email dataset and TrustLLM dataset [here](https://drive.google.com/drive/folders/16Th72F_QcxRAryOIk9L2t0oIps1xnHGW) and place them under the `./data` directory.
|
||||
|
||||
## Usage
|
||||
|
||||
You can run a privacy jailbreak attack using the following steps:
|
||||
|
||||
1. First, modify parameters such as `dataset`, `target_model_name`, `attack_model_name`, or `eval_model_name` in script `run.sh`.
|
||||
2. Then, execute the privacy jailbreak attack by running `bash run.sh`. Use the `tail` command to monitor the `log` file in real time.
|
||||
3. Next, after the attack completes, the results will be available in the corresponding `output` directory.
|
||||
4. Finally, evaluate the results using `python eval.py` to compute various metrics such as the Attack Success Rate (ASR).
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
Our PIG framework is based on [EasyJailbreak](https://github.com/EasyJailbreak/EasyJailbreak). We thank the team for their open-source implementation.
|
||||
BIN
img/PIG.png
Normal file
BIN
img/PIG.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 947 KiB |
BIN
img/logo.png
Normal file
BIN
img/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
Loading…
Add table
Add a link
Reference in a new issue