Transformer-based Joint Modelling for Automatic Essay Scoring and Off-Topic Detection

Sourya Dipta Das, Yash A. Vadi, Kuldeep YadavCOLING 2024

TL;DR

This paper introduces a novel transformer-based model, AOES, that simultaneously scores essays and detects off-topic responses, a crucial capability for robust automated essay scoring (AES) systems. By employing a unique topic regularization module and Mahalanobis distance for off-topic detection, the AOES model achieves state-of-the-art performance without requiring labeled off-topic data during training.

What Problem Does This Paper Address?

Automated Essay Scoring (AES) systems are widely used to streamline the grading process. However, a significant vulnerability of these systems is their inability to properly penalize off-topic responses, where students submit irrelevant content to inflate their scores. This issue undermines the trustworthiness of AES. While supervised methods exist for off-topic detection, they often require extensive labeled data, which is impractical to collect for all possible off-topic scenarios. This paper addresses the need for an effective, unsupervised approach to jointly score essays and detect off-topic responses, particularly in the face of adversarial attacks where students might intentionally submit irrelevant content.

Methods

The core of the proposed solution is the Automated Open Essay Scoring (AOES) model, built upon a pre-trained BERT transformer. The novelty lies in two key components:

  • Topic Regularization Module (TRM): This module acts as a "drop-in replacement" for the final linear regression layer in a standard transformer-based AES model. It decomposes the scoring process into two branches: a main regression branch for an initial score and a calibration branch that generates a scaling factor. This aims to mitigate the overestimation of scores often seen in traditional AES.
  • Mahalanobis Distance for Off-Topic Detection: After the AOES model is trained on on-topic essays, the Mahalanobis distance is calculated using latent representations from all layers of the fine-tuned transformer. This distance score quantifies how far a test essay's features are from the distribution of on-topic essays. A threshold is then applied to classify essays as on-topic or off-topic. This approach is unsupervised, meaning it doesn't require explicit off-topic examples during training.

The model is trained using a hybrid loss function that combines mean squared error for essay scoring with a topic regularization loss to calibrate the score and encourage better performance on on-topic essays.

Datasets

The authors evaluated their model on two datasets:

  • ASAP-AES Dataset: An open-source dataset containing essays from 8 different prompts across argumentative, response, and narrative types.
  • PsyW-Essay Dataset: An in-house industrial dataset derived from a psychometric assessment designed to evaluate English writing proficiency, consisting of 22 prompts.

For off-topic detection evaluation, they created specific off-topic test sets by sampling from prompts different from those used in the training data to avoid overfitting.

Key Insights and Ideas

  • Unsupervised Off-Topic Detection is Crucial: The paper highlights that relying solely on supervised methods for off-topic detection is not scalable. An unsupervised approach, like the Mahalanobis distance method, is more practical and robust.
  • Joint Modeling Benefits Both Tasks: By jointly training for essay scoring and off-topic detection, the model can leverage shared representations, leading to improved performance on both tasks.
  • TRM Mitigates Score Overestimation: The TRM module is shown to be effective in preventing inflated scores for essays, contributing to more accurate grading.
  • Transformer Latent Spaces are Rich: The Mahalanobis distance, applied across multiple layers of the transformer, effectively captures subtle differences between on-topic and off-topic essays, demonstrating the power of deep contextual embeddings.
  • Robustness to Adversarial Attacks: The proposed method shows promise in detecting various adversarial perturbations, suggesting it can help maintain the integrity of AES systems.

Key Results

  • On-Topic Essay Scoring: The AOES model achieved strong results on both ASAP-AES and PsyW-Essay datasets, showing competitive or superior performance in terms of Quadratic Weighted Kappa (QWK) and Pearson Correlation Coefficient compared to baselines.
  • Off-Topic Detection: The AOES model demonstrated significant improvements in F1 scores for off-topic detection across both datasets compared to supervised baselines. For instance, on ASAP-AES, the AOES (BERT) model achieved F1 scores ranging from 0.851 to 0.970 across different prompts, outperforming previous methods.
  • Ablation Studies: The TRM layer was found to be essential for improving both on-topic and off-topic performance. The proposed topic regularization loss also outperformed an L2 loss alternative.
  • Adversarial Sample Detection: The model effectively distinguished adversarial responses generated through techniques like "AddSpeech," "BabelGenerate," "RepeatSent," "ReplaceSents," and "GPTGenerate," achieving high F1 scores (e.g., 0.931 for BabelGenerate on PsyW-Essay, 0.997 for BabelGenerate on ASAP-AES).

Limitations and Future Work

  • AddSpeech Adversarial Samples: The paper notes that off-topic responses with a very high number of added speech sentences were harder to detect.
  • Social Bias: The study did not investigate social bias in AES, as the necessary user data (gender, race, etc.) was missing from the datasets. The in-house dataset was curated to avoid such biases.
  • Unknown Deception Methods: While the model is robust to known adversarial techniques, there might be other, undiscovered methods for deceiving AES systems.
  • Future Work: The authors plan to explore longer transformer models (long-formers) to better encode long essay corpora for improved essay scoring and off-topic detection.

Summary updated

BibTeX
@inproceedings{das2024transformer,
  author = {Sourya Dipta Das and Yash A. Vadi and Kuldeep Yadav},
  title = {{Transformer-based Joint Modelling for Automatic Essay Scoring and Off-Topic Detection}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2024},
}
Figure