weijunl commited on
Commit
f324ee0
·
verified ·
1 Parent(s): 223abb0

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +96 -85
README.md CHANGED
@@ -1,85 +1,96 @@
1
- # DPST Replication
2
-
3
- Replication package for the EMNLP 2025 paper:
4
-
5
- > **Leveraging Semantic Triples for Private Document Generation with Local Differential Privacy Guarantees**
6
- > Stephen Meisenbacher, Maulik Chevli, Florian Matthes
7
- > [https://aclanthology.org/2025.emnlp-main.455/](https://aclanthology.org/2025.emnlp-main.455/)
8
-
9
- All credit goes to the original authors. This repository provides a replication environment for running the method.
10
-
11
- ```bibtex
12
- @inproceedings{meisenbacher-etal-2025-leveraging,
13
- title = "Leveraging Semantic Triples for Private Document Generation with Local Differential Privacy Guarantees",
14
- author = "Meisenbacher, Stephen and Chevli, Maulik and Matthes, Florian",
15
- booktitle = "Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing",
16
- month = nov,
17
- year = "2025",
18
- address = "Suzhou, China",
19
- publisher = "Association for Computational Linguistics",
20
- url = "https://aclanthology.org/2025.emnlp-main.455/",
21
- doi = "10.18653/v1/2025.emnlp-main.455",
22
- pages = "8976--8992",
23
- }
24
- ```
25
-
26
- ## Setup
27
-
28
- **1. Clone this repository**
29
-
30
- ```bash
31
- git clone https://huggingface.co/datasets/weijunl/dpst-replication
32
- cd dpst-replication
33
- ```
34
-
35
- **2. Download and extract the Weaviate triple database**
36
-
37
- ```bash
38
- tar -xzf weaviate-data.tar.gz
39
- ```
40
-
41
- **3. Create conda environment**
42
-
43
- ```bash
44
- conda create -n dpst python=3.10
45
- conda activate dpst
46
-
47
- pip install numpy pandas tqdm torch
48
- pip install transformers==4.52.4 datasets sentence-transformers==2.2.2
49
- pip install nltk einops datasketch
50
- pip install stanford-openie
51
- # install weaviate-client AFTER stanford-openie (protobuf conflict workaround)
52
- pip install weaviate-client==4.11.1
53
- ```
54
-
55
- **4. Start Weaviate (first time only — creates the container)**
56
-
57
- ```bash
58
- docker run -d --name weaviate -p 8080:8080 -p 50051:50051 \
59
- -v ./weaviate-data:/var/lib/weaviate \
60
- -e AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED=true \
61
- -e PERSISTENCE_DATA_PATH=/var/lib/weaviate \
62
- -e DEFAULT_VECTORIZER_MODULE=none \
63
- cr.weaviate.io/semitechnologies/weaviate:1.26.4
64
- ```
65
-
66
- After the first time, `run_dpst.sh` will automatically start the existing container if it is not running.
67
-
68
- ## Usage
69
-
70
- ```bash
71
- conda activate dpst
72
- bash run_dpst.sh <mode> <epsilon> [input_file] [output_file]
73
-
74
- mode : 50k | 100k | 200k
75
- epsilon : privacy budget (e.g. 0.1, 1.0, 10.0)
76
- input : path to a text file (one sentence per line); omit for demo texts
77
- output : path to save privatized output; omit to print to stdout
78
- ```
79
-
80
- Example:
81
- ```bash
82
- bash run_dpst.sh 200k 1.0 input.txt output.txt
83
- ```
84
-
85
- A HuggingFace token is required for the generation model (Llama-3.2); `run_dpst.sh` will prompt for it at runtime.
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: DPST Replication
3
+ language:
4
+ - en
5
+ tags:
6
+ - local-differential-privacy
7
+ - text-rewriting
8
+ - nlp
9
+ - replication
10
+ ---
11
+
12
+ # DPST Replication
13
+
14
+ Replication package for the EMNLP 2025 paper:
15
+
16
+ > **Leveraging Semantic Triples for Private Document Generation with Local Differential Privacy Guarantees**
17
+ > Stephen Meisenbacher, Maulik Chevli, Florian Matthes
18
+ > [https://aclanthology.org/2025.emnlp-main.455/](https://aclanthology.org/2025.emnlp-main.455/)
19
+
20
+ All credit goes to the original authors. This repository provides a replication environment for running the method, based on the official released code: https://github.com/sjmeis/DPST.
21
+
22
+ ```bibtex
23
+ @inproceedings{meisenbacher-etal-2025-leveraging,
24
+ title = "Leveraging Semantic Triples for Private Document Generation with Local Differential Privacy Guarantees",
25
+ author = "Meisenbacher, Stephen and Chevli, Maulik and Matthes, Florian",
26
+ booktitle = "Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing",
27
+ month = nov,
28
+ year = "2025",
29
+ address = "Suzhou, China",
30
+ publisher = "Association for Computational Linguistics",
31
+ url = "https://aclanthology.org/2025.emnlp-main.455/",
32
+ doi = "10.18653/v1/2025.emnlp-main.455",
33
+ pages = "8976--8992",
34
+ }
35
+ ```
36
+
37
+ ## Setup
38
+
39
+ **1. Clone this repository**
40
+
41
+ ```bash
42
+ git clone https://huggingface.co/datasets/weijunl/dpst-replication
43
+ cd dpst-replication
44
+ ```
45
+
46
+ **2. Download and extract the Weaviate triple database**
47
+
48
+ ```bash
49
+ tar -xzf weaviate-data.tar.gz
50
+ ```
51
+
52
+ **3. Create conda environment**
53
+
54
+ ```bash
55
+ conda create -n dpst python=3.10
56
+ conda activate dpst
57
+
58
+ pip install numpy pandas tqdm torch
59
+ pip install transformers==4.52.4 datasets sentence-transformers==2.2.2
60
+ pip install nltk einops datasketch
61
+ pip install stanford-openie
62
+ # install weaviate-client AFTER stanford-openie (protobuf conflict workaround)
63
+ pip install weaviate-client==4.11.1
64
+ ```
65
+
66
+ **4. Start Weaviate (first time only creates the container)**
67
+
68
+ ```bash
69
+ docker run -d --name weaviate -p 8080:8080 -p 50051:50051 \
70
+ -v ./weaviate-data:/var/lib/weaviate \
71
+ -e AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED=true \
72
+ -e PERSISTENCE_DATA_PATH=/var/lib/weaviate \
73
+ -e DEFAULT_VECTORIZER_MODULE=none \
74
+ cr.weaviate.io/semitechnologies/weaviate:1.26.4
75
+ ```
76
+
77
+ After the first time, `run_dpst.sh` will automatically start the existing container if it is not running.
78
+
79
+ ## Usage
80
+
81
+ ```bash
82
+ conda activate dpst
83
+ bash run_dpst.sh <mode> <epsilon> [input_file] [output_file]
84
+
85
+ mode : 50k | 100k | 200k
86
+ epsilon : privacy budget (e.g. 0.1, 1.0, 10.0)
87
+ input : path to a text file (one sentence per line); omit for demo texts
88
+ output : path to save privatized output; omit to print to stdout
89
+ ```
90
+
91
+ Example:
92
+ ```bash
93
+ bash run_dpst.sh 200k 1.0 input.txt output.txt
94
+ ```
95
+
96
+ A HuggingFace token is required for the generation model (Llama-3.2); `run_dpst.sh` will prompt for it at runtime.