593. LLM - Detect AI Generated Text | llm-detect-ai-generated-text
感谢The Learning Agency Lab 和 Kaggle 举办了另一场比赛。
得分情况:
私有榜得分:0.938,公有榜得分:0.957
我最好的私有榜提交也是最终选择的提交(这在公有榜上大约排名2000位)
中选提交(按私有榜得分排序):
我使用了一些公开共享的数据集。在所有尝试的数据集中,@thedrcat 的 v4 版本数据集对我起到了神奇的效果。感谢 Darek。我也自己生成了一些数据。
以下是我使用的一些提示词示例:
System Message
f"""You are a average non native english speaker grade {str(np.random.randint(6, 13))} student who writes argumentative essays \\
for given context. Essay must be between 450 and 650 words. Assume that essays are written without any help of word processing software. \\
Please add a minimal amount of typos and mistakes as your grade equivalent student would do in a time constraint environment. """
Prompt
'Write an argumentative essay about - Exploring Venus - In "The Challenge of Exploring Venus," the author suggests studying Venus is a worthy pursuit despite the dangers it presents. Using details from the article, write an essay evaluating how well the author supports this idea. Be sure to include: a claim that evaluates how well the author supports the idea that studying Venus is a worthy pursuit despite the dangers; an explanation of the evidence from the article that supports your claim; an introduction, a body, and a conclusion to your essay. '
Persuade Corpus 论文 包含种族/民族/性别信息 - 我尝试将这些信息融入提示词中。同时确保7个提示词类型都有良好的平衡。
我还移除了 persuade corpus 和训练集中存在的重复数据。我使用 `BAAI/bge-base-en-v1.5` 嵌入和余弦相似度来查找匹配项。
最终我的数据集包含约 45K 个样本。
几乎没有进行,除非数据集固定,否则我们无法评估和比较。我经常尝试不同的数据集。在后期我固定了数据集,开始观察小数点后第四位的CV变化 - 但效果并不明显。
3个Transformer模型的集成:
| 模型 | 私有榜得分 | 公有榜得分 | 集成权重 |
|---|---|---|---|
| DebertaXLarge | 0.92 | 0.939 | 50% |
| Deberta v3 Large | 0.847 | 0.914 | 25% |
| Roberta Large | 0.849 | 0.923 | 25% |
所有模型使用相同的超参数训练:最大长度=512(更高的长度在公有榜上效果不好),5折交叉验证。
使用 Neptune.ai 进行日志记录 - 首次使用,体验愉快,下次还会尝试。
我其他中选提交(最佳公有榜得分0.97,私有榜0.927,公有榜排名42)采用了基于TF-IDF的方法,与公开内核类似。我将这些方法与自己的deberta模型集成,公有榜得分提升至0.97。我没有调整TF-IDF模型的超参数,它们来自公开内核,且似乎已在公有榜上被集体优化。不过我对这些模型使用的数据集做了少量调整。一些对Transformer模型有效的数据集在提升/MNB/SGD模型上效果并不理想。因此我为不同模型使用了不同的数据集。
仅使用Transformer模型比TF-IDF方法或两者集成效果更好。最终提交选择非常重要!