├── LICENSE ├── README.md ├── experiments ├── auroc_ref_distribution.py ├── compute_auroc.py ├── compute_metrics.py ├── generate_samples.py ├── generate_samples_decoding_watermark.py ├── generate_sampling_distill_train_data.py ├── harmfulness_eval_gpt.py ├── random_edits.py └── watermark-configs │ ├── aar-k2-config.json │ ├── aar-k3-config.json │ ├── aar-k4-config.json │ ├── auroc_watermark_configs.json │ ├── kgw-k0-gamma0.25-delta1-config.json │ ├── kgw-k0-gamma0.25-delta2-config.json │ ├── kgw-k1-gamma0.25-delta1-config.json │ ├── kgw-k1-gamma0.25-delta2-config.json │ ├── kgw-k2-gamma0.25-delta2-config.json │ ├── kth-shift1-config.json │ ├── kth-shift2-config.json │ ├── kth-shift256-config.json │ ├── kth-shift4-config.json │ └── watermark_configs_list.json ├── requirements.txt ├── scripts ├── evaluate │ ├── README.md │ ├── auroc_ref_distribution.sh │ ├── decoding_watermark_llama.sh │ ├── decoding_watermark_pythia.sh │ ├── generate_and_evaluate.sh │ └── kth_ref_distribution.sh └── train │ ├── README.md │ ├── generate_sampling_distill_train_data.sh │ ├── train_llama_logit_distill.sh │ ├── train_llama_sampling_distill.sh │ └── train_pythia_sampling_distill.sh ├── train_logit_distill.py ├── train_sampling_distill.py └── watermarks ├── aar └── aar_watermark.py ├── kgw ├── PIPELINE.md ├── README.md ├── alternative_prf_schemes.py ├── homoglyph_data │ ├── __init__.py │ ├── categories.json │ ├── confusables_sept2022.json │ └── languages.json ├── homoglyphs.py ├── kgw_watermark.py ├── normalizers.py ├── requirements.txt ├── run_pipeline.sh └── watermark_processor.py ├── kth ├── compute_kth_scores.py ├── detect.py ├── kth_ref_distribution.py ├── kth_watermark.py ├── levenshtein.pyx └── mersenne.py └── watermark_types.py /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/README.md -------------------------------------------------------------------------------- /experiments/auroc_ref_distribution.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/experiments/auroc_ref_distribution.py -------------------------------------------------------------------------------- /experiments/compute_auroc.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/experiments/compute_auroc.py -------------------------------------------------------------------------------- /experiments/compute_metrics.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/experiments/compute_metrics.py -------------------------------------------------------------------------------- /experiments/generate_samples.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/experiments/generate_samples.py -------------------------------------------------------------------------------- /experiments/generate_samples_decoding_watermark.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/experiments/generate_samples_decoding_watermark.py -------------------------------------------------------------------------------- /experiments/generate_sampling_distill_train_data.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/experiments/generate_sampling_distill_train_data.py -------------------------------------------------------------------------------- /experiments/harmfulness_eval_gpt.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/experiments/harmfulness_eval_gpt.py -------------------------------------------------------------------------------- /experiments/random_edits.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/experiments/random_edits.py -------------------------------------------------------------------------------- /experiments/watermark-configs/aar-k2-config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/experiments/watermark-configs/aar-k2-config.json -------------------------------------------------------------------------------- /experiments/watermark-configs/aar-k3-config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/experiments/watermark-configs/aar-k3-config.json -------------------------------------------------------------------------------- /experiments/watermark-configs/aar-k4-config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/experiments/watermark-configs/aar-k4-config.json -------------------------------------------------------------------------------- /experiments/watermark-configs/auroc_watermark_configs.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/experiments/watermark-configs/auroc_watermark_configs.json -------------------------------------------------------------------------------- /experiments/watermark-configs/kgw-k0-gamma0.25-delta1-config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/experiments/watermark-configs/kgw-k0-gamma0.25-delta1-config.json -------------------------------------------------------------------------------- /experiments/watermark-configs/kgw-k0-gamma0.25-delta2-config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/experiments/watermark-configs/kgw-k0-gamma0.25-delta2-config.json -------------------------------------------------------------------------------- /experiments/watermark-configs/kgw-k1-gamma0.25-delta1-config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/experiments/watermark-configs/kgw-k1-gamma0.25-delta1-config.json -------------------------------------------------------------------------------- /experiments/watermark-configs/kgw-k1-gamma0.25-delta2-config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/experiments/watermark-configs/kgw-k1-gamma0.25-delta2-config.json -------------------------------------------------------------------------------- /experiments/watermark-configs/kgw-k2-gamma0.25-delta2-config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/experiments/watermark-configs/kgw-k2-gamma0.25-delta2-config.json -------------------------------------------------------------------------------- /experiments/watermark-configs/kth-shift1-config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/experiments/watermark-configs/kth-shift1-config.json -------------------------------------------------------------------------------- /experiments/watermark-configs/kth-shift2-config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/experiments/watermark-configs/kth-shift2-config.json -------------------------------------------------------------------------------- /experiments/watermark-configs/kth-shift256-config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/experiments/watermark-configs/kth-shift256-config.json -------------------------------------------------------------------------------- /experiments/watermark-configs/kth-shift4-config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/experiments/watermark-configs/kth-shift4-config.json -------------------------------------------------------------------------------- /experiments/watermark-configs/watermark_configs_list.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/experiments/watermark-configs/watermark_configs_list.json -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/requirements.txt -------------------------------------------------------------------------------- /scripts/evaluate/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/scripts/evaluate/README.md -------------------------------------------------------------------------------- /scripts/evaluate/auroc_ref_distribution.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/scripts/evaluate/auroc_ref_distribution.sh -------------------------------------------------------------------------------- /scripts/evaluate/decoding_watermark_llama.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/scripts/evaluate/decoding_watermark_llama.sh -------------------------------------------------------------------------------- /scripts/evaluate/decoding_watermark_pythia.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/scripts/evaluate/decoding_watermark_pythia.sh -------------------------------------------------------------------------------- /scripts/evaluate/generate_and_evaluate.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/scripts/evaluate/generate_and_evaluate.sh -------------------------------------------------------------------------------- /scripts/evaluate/kth_ref_distribution.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/scripts/evaluate/kth_ref_distribution.sh -------------------------------------------------------------------------------- /scripts/train/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/scripts/train/README.md -------------------------------------------------------------------------------- /scripts/train/generate_sampling_distill_train_data.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/scripts/train/generate_sampling_distill_train_data.sh -------------------------------------------------------------------------------- /scripts/train/train_llama_logit_distill.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/scripts/train/train_llama_logit_distill.sh -------------------------------------------------------------------------------- /scripts/train/train_llama_sampling_distill.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/scripts/train/train_llama_sampling_distill.sh -------------------------------------------------------------------------------- /scripts/train/train_pythia_sampling_distill.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/scripts/train/train_pythia_sampling_distill.sh -------------------------------------------------------------------------------- /train_logit_distill.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/train_logit_distill.py -------------------------------------------------------------------------------- /train_sampling_distill.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/train_sampling_distill.py -------------------------------------------------------------------------------- /watermarks/aar/aar_watermark.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/watermarks/aar/aar_watermark.py -------------------------------------------------------------------------------- /watermarks/kgw/PIPELINE.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/watermarks/kgw/PIPELINE.md -------------------------------------------------------------------------------- /watermarks/kgw/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/watermarks/kgw/README.md -------------------------------------------------------------------------------- /watermarks/kgw/alternative_prf_schemes.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/watermarks/kgw/alternative_prf_schemes.py -------------------------------------------------------------------------------- /watermarks/kgw/homoglyph_data/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/watermarks/kgw/homoglyph_data/__init__.py -------------------------------------------------------------------------------- /watermarks/kgw/homoglyph_data/categories.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/watermarks/kgw/homoglyph_data/categories.json -------------------------------------------------------------------------------- /watermarks/kgw/homoglyph_data/confusables_sept2022.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/watermarks/kgw/homoglyph_data/confusables_sept2022.json -------------------------------------------------------------------------------- /watermarks/kgw/homoglyph_data/languages.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/watermarks/kgw/homoglyph_data/languages.json -------------------------------------------------------------------------------- /watermarks/kgw/homoglyphs.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/watermarks/kgw/homoglyphs.py -------------------------------------------------------------------------------- /watermarks/kgw/kgw_watermark.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/watermarks/kgw/kgw_watermark.py -------------------------------------------------------------------------------- /watermarks/kgw/normalizers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/watermarks/kgw/normalizers.py -------------------------------------------------------------------------------- /watermarks/kgw/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/watermarks/kgw/requirements.txt -------------------------------------------------------------------------------- /watermarks/kgw/run_pipeline.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/watermarks/kgw/run_pipeline.sh -------------------------------------------------------------------------------- /watermarks/kgw/watermark_processor.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/watermarks/kgw/watermark_processor.py -------------------------------------------------------------------------------- /watermarks/kth/compute_kth_scores.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/watermarks/kth/compute_kth_scores.py -------------------------------------------------------------------------------- /watermarks/kth/detect.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/watermarks/kth/detect.py -------------------------------------------------------------------------------- /watermarks/kth/kth_ref_distribution.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/watermarks/kth/kth_ref_distribution.py -------------------------------------------------------------------------------- /watermarks/kth/kth_watermark.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/watermarks/kth/kth_watermark.py -------------------------------------------------------------------------------- /watermarks/kth/levenshtein.pyx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/watermarks/kth/levenshtein.pyx -------------------------------------------------------------------------------- /watermarks/kth/mersenne.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/watermarks/kth/mersenne.py -------------------------------------------------------------------------------- /watermarks/watermark_types.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenchenygu/watermark-learnability/HEAD/watermarks/watermark_types.py --------------------------------------------------------------------------------