🚀 🏆 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},
}