代码与教程:https://github.com/johnson7788/checkAI

AI-writing-detector-laya-zh

基于 Laya(421M 多语 System One 决策模型)微调的中文论文句级 AI 写作检测器: 判断一句话是人工撰写、AI 轻度润色,还是 AI 改写。

  • 基座:convaiinnovations/laya 多语检查点(ModernBERT-large,421M)
  • 训练:9.99 万句中文论文句子,1 epoch,RLCD 校准
  • 标签:human / deepseek_light / deepseek_heavy
  • 许可:Apache-2.0
  • 数据:johnson/AI-writing-detector-dataset

性能

指标 数值
TPR@1%FPR 0.8954
AUC 0.9935
FPR@1% 1.03%

对照:RoBERTa-wwm-ext 102M 为 0.831。

用法

pip install laya huggingface_hub
import json
from huggingface_hub import snapshot_download
import laya

d = snapshot_download("johnson/AI-writing-detector-laya-zh")
agent = laya.load(d)
questions = json.load(open(f"{d}/questions.json"))

ans = agent.predict("此外,所提出的谱特征选择算法……", questions)["answers"]["label"]
probs = ans["probabilities"]
p_ai = probs["deepseek_light"] + probs["deepseek_heavy"]
print(ans["choice"], round(p_ai, 3))

命令行:

python inference.py --input paper.txt --thr 0.9

默认阈值 0.9(≈1% FPR),高精确场景用 0.95。

训练配置

10 万句、1 epoch、micro-batch 8 × grad-accum 8、max_len 128、encoder lr 2.5e-5、A800 约 30 分钟。

限制

  • 只验证了中文学术;医学/英文同配置下不如小模型;
  • 只覆盖 DeepSeek 系改写;单句、无上下文;
  • 存在误报,不得用于学术不端判定。
Downloads last month
23
Safetensors
Model size
0.3B params
Tensor type
F16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support