weijunl commited on
Commit
a71668f
·
verified ·
1 Parent(s): e929442

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +85 -3
README.md CHANGED
@@ -1,3 +1,85 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.