🚀 🏆 COLING 2025检测AI生成内容(DAIGenC)研讨会获胜模型
本模型是一个用于检测机器生成片段的二元分类模型,在COLING 2025 GenAI检测任务的单语子任务中荣获第一名。该模型基于DeBERTa - v3 - base进行微调,采用多任务模式,具有共享编码器和三个并行分类头,推理时仅使用一个头。
🚀 快速开始
模型描述
这是一个二元分类模型,用于识别机器生成的片段,在COLING 2025 GenAI检测任务的单语子任务中荣获第一名。该模型是DeBERTa - v3 - base的微调版本,采用多任务模式,具有共享编码器和三个并行分类头,推理时仅使用一个头。
🔧 技术细节
- 模型类型:基于DeBERTa - v3 - base微调的二元分类模型
- 训练数据:MGT检测任务1数据集的英文版本训练部分
- 指标:F1
- 许可证:MIT
属性 |
详情 |
模型类型 |
基于DeBERTa - v3 - base微调的二元分类模型 |
训练数据 |
MGT检测任务1数据集的英文版本训练部分 |
指标 |
F1 |
许可证 |
MIT |
💻 使用示例
基础用法
import torch
from transformers import AutoTokenizer, DebertaV2ForSequenceClassification
class MLayerDebertaV2ForSequenceClassification(
DebertaV2ForSequenceClassification
):
def __init__(self, config, **kwargs):
super().__init__(config)
self.classifier = torch.nn.Sequential(
torch.nn.Linear(config.hidden_size, 512),
torch.nn.GELU(),
torch.nn.Linear(512, 256),
torch.nn.GELU(),
torch.nn.Dropout(0.5),
torch.nn.Linear(256, 2)
)
tokenizer = AutoTokenizer.from_pretrained(
"OU-Advacheck/deberta-v3-base-daigenc-mgt1a"
)
model = MLayerDebertaV2ForSequenceClassification.from_pretrained(
"OU-Advacheck/deberta-v3-base-daigenc-mgt1a"
)
model.eval()
inputs = tokenizer(
['Hello, Thanks for sharing your health concern with us. I have gone through your query and here are your answers: 1. If you have regular cycles, there is no further need to use any medication to regulate cycles. 2. Establishment of regular ovulation and timing of intercourse properly is necessary. 3. If you want to conceive quickly, you have to get further evaluation and plan management. Hope this helps.',
'He might have small intestinal TB rather than stomach TB. Amoebas also involves small intestine/some part of large intestine. If he has taken medicines for both diseases in form of a Complete Course, he should be fine. U can go for an oral+iv contrast CT scan of him. Now, the diagnosis of a lax cardiac can be confirmed by an upper GI endoscopy with manometry (if available). Lax cardiac may cause acidity with reflux.'],
max_length=512,
truncation=True,
padding="max_length",
return_tensors="pt"
)
torch.softmax(
model(**inputs)[0], dim=1
).detach().cpu()[:, 1].tolist()
局限性和偏差
本模型的训练数据集由不同来源和领域的生成文本和人类生成文本组成,可能不适用于所有不同领域的用例。此外,模型在某些情况下可能会出现误报,误报情况会因分类阈值的不同而有所变化。
⚠️ 重要提示
该模型的训练数据集有一定局限性,可能不适用于所有领域,且存在误报情况,使用时需根据实际情况调整分类阈值。
质量
在竞赛声明的测试集上的质量表现(概率阈值为0.92):
模型 |
主要得分(F1宏观) |
辅助得分(F1微观) |
MTL DeBERTa - v3 - base (我们的模型) |
0.8307 |
0.8311 |
单任务DeBERTa - v30 - base |
0.7852 |
0.7891 |
基线模型 |
0.7342 |
0.7343 |
训练过程
本模型在MGT检测任务1数据集的英文版本训练部分进行微调。类别为0 - 人类
,1 - 机器
。模型在单张NVIDIA RTX 3090 GPU上进行了两个阶段的微调,超参数详见我们的论文。
自定义微调
如果您想在自己的数据领域或基础模型上对该架构进行微调,我们提供了带有详细说明的学习和运行代码,可在[GitHub](https://github.com/Advacheck - OU/ai - detector - coling2025)上获取。
📄 许可证
本项目采用MIT许可证。
引用
如果您在研究中使用了本模型的结果,请引用我们的论文:
@misc{gritsai2024advacheckgenaidetectiontask,
title={Advacheck at GenAI Detection Task 1: AI Detection Powered by Domain-Aware Multi-Tasking},
author={German Gritsai and Anastasia Voznyuk and Ildar Khabutdinov and Andrey Grabovoy},
year={2024},
eprint={2411.11736},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2411.11736},
}