The problem
ChatGPT and other large language models now write essays, reviews, code explanations and social posts that are hard for a reader to tell apart from human writing — a real problem for academic integrity, content platforms and hiring pipelines. Humans are unreliable judges of authorship: studies behind the HC3 corpus (Guo et al., 2023) found people unaided struggle to separate ChatGPT answers from expert human answers to the same questions. Detectors work because LLM writing leaks statistical fingerprints — flatter, more uniform sentence structure, narrower vocabulary spread, lower burstiness — that a fine-tuned transformer can learn. This project fine-tunes RoBERTa on HC3's paired human/ChatGPT answers across question-answering, finance and medical-dialog domains, then stress-tests the detector on TuringBench's 19-generator benchmark to see how it holds up against models it never trained on. The demo turns the statistics into something inspectable: paste text, get an AI-probability with per-sentence highlighting and the tell-tale metrics behind it.
Pastes text into the demo to check for AI authorship.
Follow the working sequence
How it works
- HC3 English question-answer pairs are loaded: human expert answers and ChatGPT answers to the same questions, labeled 0 (human) and 1 (AI).
- Text is tokenized for RoBERTa while a parallel pipeline computes statistical features — sentence-length distribution, type-token ratio, bigram repetition.
- RoBERTa-base is fine-tuned for binary classification with the statistical feature vector fused before the classification head, using stratified train/validation/test splits.
- The held-out HC3 test split is evaluated once: accuracy, F1, AUC and the human-text false-positive rate are recorded.
- Without retraining, the detector scores TuringBench samples from 19 generators to measure cross-generator robustness for the report.
- In the demo, pasted text is analyzed with the heuristic tell-tale metrics; the shipped build wires in the fine-tuned RoBERTa model for the real verdict.
- A threshold sweep in the notebook documents the false-positive/recall trade-off for the report.
Tech stack:
- Python 3, PyTorch
- Hugging Face Transformers
- RoBERTa-base (Liu et al.)
- HC3 corpus (Guo et al., 2023)
- TuringBench (Uchendu et al., 2021)
- scikit-learn (metrics)
- HTML/CSS/JS demo
- Git
Dataset & model details
- Dataset: HC3 (Human ChatGPT Comparison Corpus) — English subset: ~58k human responses and ~26k ChatGPT responses to ~24k questions from ELI5, WikiQA, crawled Wikipedia, Medical Dialog and FiQA, released by Guo et al. (2023). Cross-generator stress test on TuringBench — benchmark samples from 19 language models, released by Uchendu et al. (2021).
- Task: Binary human-vs-AI text classification; input = document text, output = AI-generated probability with per-sentence scores and tell-tale metrics.
- Model: RoBERTa-base fine-tuned for sequence classification, with GLTR-style statistical features (token-surprise statistics, sentence-length uniformity) fused before the classification head.
- Metrics: AUC design target 0.93; F1 design target 0.88; human-text false-positive rate design target below 5%. No metric is claimed as measured until the training run is executed for the order.
| Parameter | Value |
|---|---|
| Input | English document text (essay, answer, post) |
| Output | AI probability + per-sentence highlighting |
| Model | RoBERTa-base fine-tuned (design run) |
| AUC | 0.93 (design target, not a measured claim) |
| F1 score | 0.88 (design target) |
| Datasets | HC3-English (~84k responses) + TuringBench |
| Inference | Approximately 60 ms per document on CPU (expected) |
| Demo | Single-file web app with human/AI samples |
Project features
- [RoBERTa fine-tuning] RoBERTa-base fine-tuned for binary human-vs-AI classification on HC3's English subset, with the training recipe documented end to end.
- [GLTR-style statistical features] Token-level surprise statistics in the spirit of GLTR (Gehrmann et al., 2019) fused with the transformer signal to expose generation fingerprints.
- [Cross-generator evaluation] The detector is stress-tested on TuringBench texts from 19 different generators, measuring how detection degrades on unseen models.
- [Live paste-and-analyze demo] Paste any text; the demo returns an AI-probability gauge, per-sentence highlighting and the underlying metrics.
- [Per-sentence highlighting] Each sentence is colored by its AI-likelihood so the exact passages driving the verdict can be inspected.
- [Statistical tell-tale metrics] Burstiness, vocabulary richness, repetition rate and sentence-length uniformity shown alongside the verdict.
- [Threshold analysis] The notebook sweeps the decision threshold to document the human-text false-positive vs AI-text recall trade-off.
What is included
- Complete fine-tuning and evaluation Jupyter notebook
- Trained RoBERTa AI-text detector with inference code
- Live text-analysis web demo with sample texts
- Cross-generator (TuringBench) evaluation scripts
- Project report PDF (background, detection research, methodology, results)
- PPT presentation for final review
- Viva Q&A preparation document (RoBERTa, fine-tuning, perplexity, burstiness, false positives)
Limitations & prerequisites
- AUC 0.93 is a design target for the training run, stated honestly — the report documents the measured figure after training.
- Short texts (a few sentences) carry too little statistical signal for a reliable verdict; the demo flags inputs under ~80 words as low-confidence.
- Paraphrased or heavily edited AI text is the known hard case — paraphrase attacks degrade all current detectors and the report discusses this.
- The model is English-only; other languages are out of scope.
- CPU inference timing is an expected value, not a measured benchmark.
Frequently Asked Questions
Which datasets are used and why?
HC3 (Guo et al., 2023) — paired human and ChatGPT answers to the same questions, the standard benchmark for this exact task; and TuringBench (Uchendu et al., 2021) — samples from 19 generators used only for evaluation, to test robustness against models the detector never trained on.
What statistical tells reveal AI text?
Flatter sentence-length profiles (low burstiness), narrower vocabulary spread, higher bigram repetition and over-reliance on high-probability phrasing — LLM sampling favors the predictable. The demo computes and shows each metric.
Is the demo the real model?
The demo illustrates the tell-tale metrics with transparent heuristics so the statistics are inspectable; the shipped project fine-tunes a real RoBERTa classifier on HC3 and wires it into the demo for the final verdict.
Can it catch paraphrased AI text?
Not reliably — paraphrase attacks are the known weakness of every current detector, and the report says so plainly. The cross-generator evaluation on TuringBench documents where the detector holds and where it breaks.
What about false accusations?
The design target keeps the human-text false-positive rate under 5%, and the notebook's threshold sweep lets you trade recall against false positives explicitly — the report discusses responsible use.
Is this project suitable for a final-year project?
Yes — for Computer Science, IT and AI/ML programs. It covers transformer fine-tuning, statistical NLP analysis, cross-domain evaluation and a genuinely useful live demo. Suitable for B.E./B.Tech final-year projects in Computer Science, IT and AI & Machine Learning.
Components & software requirements
- Python 3, PyTorch
- Hugging Face Transformers
- RoBERTa-base (Liu et al.)
- HC3 corpus (Guo et al., 2023)
- TuringBench (Uchendu et al., 2021)
- scikit-learn (metrics)
- HTML/CSS/JS demo
- Git
Dataset & model details
- Dataset: HC3 (Human ChatGPT Comparison Corpus) — English subset: ~58k human responses and ~26k ChatGPT responses to ~24k questions from ELI5, WikiQA, crawled Wikipedia, Medical Dialog and FiQA, released by Guo et al. (2023). Cross-generator stress test on TuringBench — benchmark samples from 19 language models, released by Uchendu et al. (2021).
- Task: Binary human-vs-AI text classification; input = document text, output = AI-generated probability with per-sentence scores and tell-tale metrics.
- Model: RoBERTa-base fine-tuned for sequence classification, with GLTR-style statistical features (token-surprise statistics, sentence-length uniformity) fused before the classification head.
- Metrics: AUC design target 0.93; F1 design target 0.88; human-text false-positive rate design target below 5%. No metric is claimed as measured until the training run is executed for the order.
Delivery information
Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.
Support terms
Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.
Download free synopsis (PDF)
Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.