11
stars
10
commits
Python
primary language
Oct 13, 2025
updated
This repository contains the official code and resources for the paper DALD, where we borrow or extend some code from Fast-DetectGPT.
DALD: Improving Logits-based Detector without Logits from Black-box LLMs Presented at the 38th Conference on Neural Information Processing Systems (NeurIPS 2024).

git clone https://github.com/cong-bzeng/DALD.git
cd DALD
conda create --name dald python=3.10
conda activate dald
pip install -r requirements.txt
Main experiment: named by exp_targetsourcemodel
Each folder contains the data generated by source model and original human-written data for evaluation. We upload these data for reproduce our result conviently. You can generating your own testing data using ./scripts/data_builder.py following the Fast-DetectGPT
Before training surrogate model, specify the following args in train.sh:
Run the following command to train a surrogate model
sh train.sh
Please make sure the model names are added in full model list in model.py
Before evaluating the performance of detection on target models, make sure there exists the corresponding test data folder. Run the following command to evaluate the performance of the trained model. You can find the GPT-4 pretrained weight at HF.
sh eval.sh
If you find this work useful, you can cite it with the following BibTex entry:
@article{zeng2024improving,
title={Improving Logits-based Detector without Logits from Black-box LLMs},
author={Zeng, Cong and Tang, Shengkun and Yang, Xianjun and Chen, Yuanzhou and Sun, Yiyou and Li, Yao and Chen, Haifeng and Cheng, Wei and Xu, Dongkuan and others},
journal={arXiv preprint arXiv:2406.05232},
year={2024}
}
9 commits
1 commits
Python
98.3%
Shell
1.7%
11
stars
10
commits
Python
primary language
Oct 13, 2025
updated
This repository contains the official code and resources for the paper DALD, where we borrow or extend some code from Fast-DetectGPT.
DALD: Improving Logits-based Detector without Logits from Black-box LLMs Presented at the 38th Conference on Neural Information Processing Systems (NeurIPS 2024).

git clone https://github.com/cong-bzeng/DALD.git
cd DALD
conda create --name dald python=3.10
conda activate dald
pip install -r requirements.txt
Main experiment: named by exp_targetsourcemodel
Each folder contains the data generated by source model and original human-written data for evaluation. We upload these data for reproduce our result conviently. You can generating your own testing data using ./scripts/data_builder.py following the Fast-DetectGPT
Before training surrogate model, specify the following args in train.sh:
Run the following command to train a surrogate model
sh train.sh
Please make sure the model names are added in full model list in model.py
Before evaluating the performance of detection on target models, make sure there exists the corresponding test data folder. Run the following command to evaluate the performance of the trained model. You can find the GPT-4 pretrained weight at HF.
sh eval.sh
If you find this work useful, you can cite it with the following BibTex entry:
@article{zeng2024improving,
title={Improving Logits-based Detector without Logits from Black-box LLMs},
author={Zeng, Cong and Tang, Shengkun and Yang, Xianjun and Chen, Yuanzhou and Sun, Yiyou and Li, Yao and Chen, Haifeng and Cheng, Wei and Xu, Dongkuan and others},
journal={arXiv preprint arXiv:2406.05232},
year={2024}
}
9 commits
1 commits
Python
98.3%
Shell
1.7%