The problem
Teachers spend hours grading essays, and students wait weeks for feedback that arrives too late to act on. Automated essay scoring has been researched since the 1960s, but transformer models made it practical: BERT's contextual representations capture the coherence, vocabulary and argument structure that distinguish strong writing from weak. The ASAP benchmark (Kaggle / Hewlett Foundation) provides 12,978 student essays across 8 prompt sets with human-resolved scores — the standard dataset the field evaluates on with quadratic weighted kappa. This project turns that into a complete student build: bert-base-uncased fine-tuned with per-set regression heads, wrapped in a demo that scores a sample persuasive essay with trait-level feedback and highlighted suggestions. Because the scoring is inspectable per trait, the report and viva can discuss what the model rewards — and where it fails, such as creative writing outside the training distribution.
How it works
- ASAP essays are WordPiece-tokenized (max 512 tokens); scores are normalized per prompt set since each set uses a different scale (e.g. 2–12 for Set 1, 0–60 for Set 8).
- bert-base-uncased's CLS embedding feeds a dropout + linear regression head per prompt set (one head each, because scales and genres differ).
- The model is fine-tuned for about 3 epochs with AdamW (lr 2e-5); every run logs MSE and per-set QWK.
- At inference, the demo app tokenizes the pasted essay, runs it through the fine-tuned model and rescales the prediction to the set's score range.
- Trait scores come from auxiliary heads trained on trait-annotated subsets; highlighted spans are mapped from attention-adjacent token contributions.
- The notebook recomputes per-set QWK on the official splits, so the report's numbers are the student's own.
Tech stack:
- Python 3.10, PyTorch, Hugging Face transformers (bert-base-uncased)
- scikit-learn (QWK computation), NumPy, pandas
- Matplotlib (QWK-by-set charts, score distributions)
- Single-file HTML/CSS/JS demo app (scorer, rubric, evaluation views)
- ASAP Automated Essay Scoring dataset (Kaggle / Hewlett Foundation)
- Trained weights exported from the included fine-tuning run
| Parameter | Value |
|---|---|
| Model | bert-base-uncased + dropout/linear regression head per set (110M parameters) |
| Dataset | ASAP: 12,978 essays; 8 prompt sets (persuasive, source-dependent, narrative) |
| Metric | Quadratic weighted kappa (QWK) per set, official splits |
| Input | English student essays, max 512 WordPiece tokens |
| Output | Predicted score on the set's scale + 4 trait scores + highlighted feedback |
| Training | ~3 epochs, AdamW lr 2e-5; design target mean QWK ≈ 0.75–0.80 |
| Evaluation | Per-set QWK — computed by the notebook on your build |
| Inference | CPU-friendly; a single essay scores in about a second |
Project features
- [Essay scorer] Paste an essay and get a predicted score on the prompt set's scale, with trait-level breakdowns (content, organization, language, conventions).
- [Trait feedback] Highlighted spans in the essay text with concrete suggestions — grammar fixes, organization notes, word-choice upgrades.
- [BERT fine-tuning pipeline] bert-base-uncased with dropout + per-set linear regression heads, fine-tuned with AdamW; all hyperparameters exposed in the notebook.
- [ASAP dataset view] All 8 prompt sets with genre, grade level, score range and essay counts; why each set needs its own regression head.
- [QWK evaluation view] Quadratic weighted kappa per prompt set, with the human–human agreement reference for context.
- [Architecture view] Tokenization (512 WordPiece tokens), CLS embedding, regression head, MSE-on-normalized-score training — the full stack documented.
- [Fairness framing] Explicit statement that automated scores assist teachers and do not replace human judgment — honest scope examiners respect.
- [Full evaluation logging] Per-set QWK on the official splits — never pre-claimed.
What is included
- Complete source code (preprocessing, per-set normalization, fine-tuning, inference, demo app)
- Jupyter training and evaluation notebook (buyer-run procedure: fine-tune, evaluate per set, inspect errors)
- Project report PDF (background, ASAP analysis, methodology, per-set evaluation, error analysis)
- PPT presentation for final review
- Viva Q&A preparation document (transformers, regression heads, QWK, ASAP benchmark, fairness)
- Setup guide (environment, dataset download, training, running the demo)
Limitations & prerequisites
- One regression head per prompt set — cross-set transfer is poor and the report states this openly; a new prompt type needs its own fine-tuning.
- Trained on US grade 7–10 writing; creative, non-standard or non-native styles outside that distribution score less reliably.
- 512-token limit truncates very long essays; the report documents how truncation is handled.
- Trait-level feedback is assistive, not authoritative — final grades belong to human teachers.
- Fine-tuning BERT needs a GPU for reasonable runtimes; the notebook documents expected runtimes and a smaller-sample quick-run mode.
Frequently Asked Questions
Which dataset is used?
The ASAP Automated Essay Scoring benchmark (Kaggle / Hewlett Foundation): 12,978 student essays across 8 prompt sets (persuasive, source-dependent, narrative) with human-resolved scores.
Which model is used?
bert-base-uncased (110M parameters) with a dropout + linear regression head per prompt set, fine-tuned with AdamW. Each set gets its own head because score scales and genres differ.
How is it evaluated?
With quadratic weighted kappa (QWK) per prompt set on the official splits — the field's standard metric, which penalizes far misses more than near misses. Design target: mean QWK ≈ 0.75–0.80, near human–human agreement.
Is the QWK guaranteed?
No. The report documents the QWK your own fine-tuning run achieves, not a pre-claimed figure.
What are the main limitations?
Per-set heads (poor cross-set transfer); US grade 7–10 training distribution; 512-token truncation; assistive-not-authoritative scoring; GPU needed for training.
Is this project suitable for a final-year project?
Yes — for Computer Science, AI/ML and Data Science programs. It demonstrates transformers, transfer learning, regression on text, rigorous evaluation with QWK and honest fairness discussion, all strong viva material. Suitable for B.E./B.Tech final-year projects in Computer Science, AI/ML and Data Science.
Components & software requirements
- Python 3.10, PyTorch, Hugging Face transformers (bert-base-uncased)
- scikit-learn (QWK computation), NumPy, pandas
- Matplotlib (QWK-by-set charts, score distributions)
- Single-file HTML/CSS/JS demo app (scorer, rubric, evaluation views)
- ASAP Automated Essay Scoring dataset (Kaggle / Hewlett Foundation)
- Trained weights exported from the included fine-tuning run
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.