├── .gitignore ├── Dockerfile ├── LICENSE ├── NOTICE ├── README.md ├── fewshot_iclr2024 ├── README.md ├── baseline_training │ ├── README.md │ ├── fewshot_dataset.py │ ├── finetune_roberta.py │ ├── maml.sh │ ├── maml_helper.py │ ├── meta_train.py │ ├── protonet.sh │ └── prototypical_helper.py ├── demo │ ├── api_request_parallel_processor.py │ ├── create_openai_prompts.py │ ├── iclr2024_human_machine.json │ ├── openai_prompts.jsonl │ ├── openai_responses.jsonl │ └── process_responses_and_create_dataset.py ├── download_and_setup_paths.py ├── evaluation │ ├── evaluate.py │ ├── fewshot_helper.py │ ├── forward_utils.py │ ├── roberta_detector.py │ ├── run_multiple_target.sh │ ├── run_paraphrase.sh │ ├── run_single_target.sh │ ├── run_single_target_simple.sh │ └── zeroshot_baselines │ │ └── detect_basic.py ├── figs │ └── UMAP.png ├── file_config.ini ├── file_utils.py ├── process_results │ ├── dump_auc.py │ ├── estimate_statistics.py │ ├── plot.py │ ├── process_all_results.sh │ └── process_results_simple.sh └── requirements.txt ├── file_config.ini ├── machine_detection ├── README.md ├── download_models.sh ├── inference.py ├── machine_utils.py ├── requirements.txt └── train_luar_knn.py ├── requirements.txt ├── scripts ├── .empty ├── download_sbert_weights.sh ├── preprocess_amazon_data.sh ├── preprocess_fanfiction_data.sh ├── preprocess_pan_into_paragraphs.py ├── process_amazon_rawtxt.py ├── reproduce │ ├── table_1.sh │ ├── table_2.sh │ └── table_3.sh └── split_amazon.py └── src ├── arguments.py ├── datasets ├── __init__.py ├── amazon_dataset.py ├── multidomain_dataset.py ├── reddit_dataset.py ├── retrieval_dataset.py ├── short_stories_dataset.py └── utils.py ├── main.py ├── models ├── layers.py ├── lightning_trainer.py └── transformer.py └── utilities ├── decorators.py ├── file_utils.py └── metric.py /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/.gitignore -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/Dockerfile -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/LICENSE -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/NOTICE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/README.md -------------------------------------------------------------------------------- /fewshot_iclr2024/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/README.md -------------------------------------------------------------------------------- /fewshot_iclr2024/baseline_training/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/baseline_training/README.md -------------------------------------------------------------------------------- /fewshot_iclr2024/baseline_training/fewshot_dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/baseline_training/fewshot_dataset.py -------------------------------------------------------------------------------- /fewshot_iclr2024/baseline_training/finetune_roberta.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/baseline_training/finetune_roberta.py -------------------------------------------------------------------------------- /fewshot_iclr2024/baseline_training/maml.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/baseline_training/maml.sh -------------------------------------------------------------------------------- /fewshot_iclr2024/baseline_training/maml_helper.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/baseline_training/maml_helper.py -------------------------------------------------------------------------------- /fewshot_iclr2024/baseline_training/meta_train.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/baseline_training/meta_train.py -------------------------------------------------------------------------------- /fewshot_iclr2024/baseline_training/protonet.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/baseline_training/protonet.sh -------------------------------------------------------------------------------- /fewshot_iclr2024/baseline_training/prototypical_helper.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/baseline_training/prototypical_helper.py -------------------------------------------------------------------------------- /fewshot_iclr2024/demo/api_request_parallel_processor.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/demo/api_request_parallel_processor.py -------------------------------------------------------------------------------- /fewshot_iclr2024/demo/create_openai_prompts.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/demo/create_openai_prompts.py -------------------------------------------------------------------------------- /fewshot_iclr2024/demo/iclr2024_human_machine.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/demo/iclr2024_human_machine.json -------------------------------------------------------------------------------- /fewshot_iclr2024/demo/openai_prompts.jsonl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/demo/openai_prompts.jsonl -------------------------------------------------------------------------------- /fewshot_iclr2024/demo/openai_responses.jsonl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/demo/openai_responses.jsonl -------------------------------------------------------------------------------- /fewshot_iclr2024/demo/process_responses_and_create_dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/demo/process_responses_and_create_dataset.py -------------------------------------------------------------------------------- /fewshot_iclr2024/download_and_setup_paths.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/download_and_setup_paths.py -------------------------------------------------------------------------------- /fewshot_iclr2024/evaluation/evaluate.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/evaluation/evaluate.py -------------------------------------------------------------------------------- /fewshot_iclr2024/evaluation/fewshot_helper.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/evaluation/fewshot_helper.py -------------------------------------------------------------------------------- /fewshot_iclr2024/evaluation/forward_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/evaluation/forward_utils.py -------------------------------------------------------------------------------- /fewshot_iclr2024/evaluation/roberta_detector.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/evaluation/roberta_detector.py -------------------------------------------------------------------------------- /fewshot_iclr2024/evaluation/run_multiple_target.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/evaluation/run_multiple_target.sh -------------------------------------------------------------------------------- /fewshot_iclr2024/evaluation/run_paraphrase.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/evaluation/run_paraphrase.sh -------------------------------------------------------------------------------- /fewshot_iclr2024/evaluation/run_single_target.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/evaluation/run_single_target.sh -------------------------------------------------------------------------------- /fewshot_iclr2024/evaluation/run_single_target_simple.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/evaluation/run_single_target_simple.sh -------------------------------------------------------------------------------- /fewshot_iclr2024/evaluation/zeroshot_baselines/detect_basic.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/evaluation/zeroshot_baselines/detect_basic.py -------------------------------------------------------------------------------- /fewshot_iclr2024/figs/UMAP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/figs/UMAP.png -------------------------------------------------------------------------------- /fewshot_iclr2024/file_config.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/file_config.ini -------------------------------------------------------------------------------- /fewshot_iclr2024/file_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/file_utils.py -------------------------------------------------------------------------------- /fewshot_iclr2024/process_results/dump_auc.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/process_results/dump_auc.py -------------------------------------------------------------------------------- /fewshot_iclr2024/process_results/estimate_statistics.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/process_results/estimate_statistics.py -------------------------------------------------------------------------------- /fewshot_iclr2024/process_results/plot.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/process_results/plot.py -------------------------------------------------------------------------------- /fewshot_iclr2024/process_results/process_all_results.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/process_results/process_all_results.sh -------------------------------------------------------------------------------- /fewshot_iclr2024/process_results/process_results_simple.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/process_results/process_results_simple.sh -------------------------------------------------------------------------------- /fewshot_iclr2024/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/fewshot_iclr2024/requirements.txt -------------------------------------------------------------------------------- /file_config.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/file_config.ini -------------------------------------------------------------------------------- /machine_detection/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/machine_detection/README.md -------------------------------------------------------------------------------- /machine_detection/download_models.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/machine_detection/download_models.sh -------------------------------------------------------------------------------- /machine_detection/inference.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/machine_detection/inference.py -------------------------------------------------------------------------------- /machine_detection/machine_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/machine_detection/machine_utils.py -------------------------------------------------------------------------------- /machine_detection/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/machine_detection/requirements.txt -------------------------------------------------------------------------------- /machine_detection/train_luar_knn.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/machine_detection/train_luar_knn.py -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/requirements.txt -------------------------------------------------------------------------------- /scripts/.empty: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripts/download_sbert_weights.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/scripts/download_sbert_weights.sh -------------------------------------------------------------------------------- /scripts/preprocess_amazon_data.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/scripts/preprocess_amazon_data.sh -------------------------------------------------------------------------------- /scripts/preprocess_fanfiction_data.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/scripts/preprocess_fanfiction_data.sh -------------------------------------------------------------------------------- /scripts/preprocess_pan_into_paragraphs.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/scripts/preprocess_pan_into_paragraphs.py -------------------------------------------------------------------------------- /scripts/process_amazon_rawtxt.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/scripts/process_amazon_rawtxt.py -------------------------------------------------------------------------------- /scripts/reproduce/table_1.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/scripts/reproduce/table_1.sh -------------------------------------------------------------------------------- /scripts/reproduce/table_2.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/scripts/reproduce/table_2.sh -------------------------------------------------------------------------------- /scripts/reproduce/table_3.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/scripts/reproduce/table_3.sh -------------------------------------------------------------------------------- /scripts/split_amazon.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/scripts/split_amazon.py -------------------------------------------------------------------------------- /src/arguments.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/src/arguments.py -------------------------------------------------------------------------------- /src/datasets/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/src/datasets/__init__.py -------------------------------------------------------------------------------- /src/datasets/amazon_dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/src/datasets/amazon_dataset.py -------------------------------------------------------------------------------- /src/datasets/multidomain_dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/src/datasets/multidomain_dataset.py -------------------------------------------------------------------------------- /src/datasets/reddit_dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/src/datasets/reddit_dataset.py -------------------------------------------------------------------------------- /src/datasets/retrieval_dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/src/datasets/retrieval_dataset.py -------------------------------------------------------------------------------- /src/datasets/short_stories_dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/src/datasets/short_stories_dataset.py -------------------------------------------------------------------------------- /src/datasets/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/src/datasets/utils.py -------------------------------------------------------------------------------- /src/main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/src/main.py -------------------------------------------------------------------------------- /src/models/layers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/src/models/layers.py -------------------------------------------------------------------------------- /src/models/lightning_trainer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/src/models/lightning_trainer.py -------------------------------------------------------------------------------- /src/models/transformer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/src/models/transformer.py -------------------------------------------------------------------------------- /src/utilities/decorators.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/src/utilities/decorators.py -------------------------------------------------------------------------------- /src/utilities/file_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/src/utilities/file_utils.py -------------------------------------------------------------------------------- /src/utilities/metric.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLNL/LUAR/HEAD/src/utilities/metric.py --------------------------------------------------------------------------------