CoolFace
Modelpublic

mokawa3018/cmj-chinese-aigc-text-detector

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
1likes242downloads
Model Card

cmj-chinese-aigc-text-detector

This repository provides a fine-tuned Chinese AIGC text detector with both PyTorch and ONNX weights.

GitHub project: https://github.com/mokawa3018-ctrl/cmj-chinese-aigc-text-detector

Task

Binary classification for Chinese text:

text
0 = human
1 = AI

The model is intended as an auxiliary signal for AIGC text detection. It should not be used as the only basis for punishment, academic misconduct decisions, identity judgment, or other high-stakes decisions.

Base Model And Upstream Sources

This model was fine-tuned from yuchuantian/AIGC_detector_zhv3.

Upstream references:

  • —Base detector: https://huggingface.co/yuchuantian/AIGCdetectorzhv3
  • —Upstream code: https://github.com/YuchuanTian/AIGCtextdetector
  • —Chinese RoBERTa base: https://huggingface.co/hfl/chinese-roberta-wwm-ext
  • —Project repository: https://github.com/mokawa3018-ctrl/cmj-chinese-aigc-text-detector

The upstream model and code pages are marked Apache-2.0. HC3-Chinese is marked CC-BY-SA-4.0 on its dataset page. This model card does not claim unconditional commercial use; downstream users should review the upstream model, code, data, generated-data, and hosting terms for their own use case.

Training Data

The selected model was trained with a 1:1 balanced Chinese dataset:

  • —human samples: 850 train / 150 validation
  • —AI samples: 850 train / 150 validation
  • —AI generation sources were balanced across five model families in the training split
  • —train and validation were split by pair_id to reduce question-level leakage

The training data combined HC3-Chinese and authorized multi-model generated text. Full training and test data are not included in this model repository.

Training Parameters

text
epochs: 1
batch_size: 16
validation_batch_size: 8
max_length: 512
learning_rate: 0.00002
weight_decay: 0.01
seed: 0
optimizer: AdamW
scheduler: no explicit scheduler found
loss: classification loss + 0.4 * PU loss
pu_type: dual_softmax_dyn_dtrun
prior: 0.2
length_threshold: 55

Files

PyTorch / Transformers files are stored at the repository root:

text
config.json
pytorch_model.bin
tokenizer.json
tokenizer_config.json
special_tokens_map.json
vocab.txt

ONNX files are stored under onnx/:

text
onnx/model.onnx
onnx/config.json
onnx/tokenizer.json
onnx/tokenizer_config.json
onnx/special_tokens_map.json
onnx/vocab.txt

Evaluation

Final balanced PyTorch model on fixed test sets:

Evaluation setMetricValue
Human-only fixed testHuman accuracy91.60%
Human-only fixed testHuman false positive rate8.40%
AI-only fixed testAI recall94.10%
Mixed fixed testAccuracy92.85%

HC3-Chinese 7,696-row test:

ModelOverall accuracyAI detection rateHuman false positive rate
Original zh-v3 baseline89.54%91.14%11.60%
This fine-tuned model91.84%92.78%8.84%

ONNX consistency, verified in the original server environment:

text
max absolute logits difference: 1.43e-6
max absolute probability difference: 2.31e-7
sample prediction labels: fully consistent

ONNX fixed test results:

Evaluation setMetricValue
Human-only fixed testHuman accuracy91.60%
Human-only fixed testHuman false positive rate8.40%
AI-only fixed testAI recall94.10%
Mixed fixed testAccuracy92.85%

ONNX Interface

ONNX export configuration used:

text
inputs: input_ids, attention_mask, token_type_ids
output: logits
opset: 14
dynamic batch: enabled
dynamic sequence length: enabled

Known Limitations

  • —Performance reflects the tested data and current splits, not all Chinese domains.
  • —The model may be sensitive to text length, topic distribution, prompt style, and unseen generators.
  • —Error analysis showed weaker performance on nlpcc_dbqa, with legal and finance categories also requiring more attention than medicine, encyclopedia, psychology, and open-question text.
  • —AIGC detection is probabilistic and should be combined with human review and other evidence.

License And Attribution

This repository includes Apache-2.0 license text because the upstream model and code pages are marked Apache-2.0. HC3-Chinese is marked CC-BY-SA-4.0. The model was trained from upstream work and should not be described as a from-scratch model.

Please preserve upstream attribution when reusing the model or code, and review all upstream and data licenses before redistribution or production use.