Keystroke Dynamics Against Academic Dishonesty in the Age of LLMs

Debnath Kundu, Atharva Mehta, Rajesh Kumar, Naman Lal, Avinash Anand, Apoorv Singh, Rajiv Ratn Shah

Introduction

The rapid proliferation of Large Language Models (LLMs) has fundamentally altered the landscape of academic integrity. Traditional plagiarism detection tools, which rely on string-matching and linguistic similarity, are increasingly ineffective against AI-generated content that is unique and contextually fluent. As the "arms race" between students and educators intensifies, researchers are shifting focus from the product of writing to the process of writing. This paper explores the use of keystroke dynamics—the unique rhythmic patterns of a user's typing—to distinguish between original human composition and the transcription of AI-generated text.

The Shift from Linguistic to Behavioral Detection

Traditional detectors like Turnitin identify sequences of words that already exist in a database. However, LLMs can generate novel text or paraphrase existing content so effectively that these checks often return no matches. The core hypothesis of this research is that the cognitive process of original writing differs significantly from the process of transcribing or editing AI-generated suggestions. By analyzing behavioral signals rather than linguistic ones, the authors propose a "content-agnostic" detection method that is significantly harder to circumvent through prompt engineering or manual paraphrasing.

Methodology: Adapting TypeNet

The researchers utilized TypeNet, a deep learning architecture originally developed for user authentication, and repurposed it for the detection of academic dishonesty. The system employs a Siamese Network architecture featuring two Long Short-Term Memory (LSTM) layers. This design allows the model to learn high-dimensional embeddings of typing sequences and calculate the "distance" between them.

Key technical modifications include:

  • Feature Extraction: The model tracks three primary attributes for every keystroke: precise timestamps, keycodes (identifying the specific key), and key actions (KeyDown vs. KeyUp events).
  • Loss Function Optimization: Moving away from the standard Euclidean distance used in authentication, this version utilizes cosine similarity and Binary Cross Entropy. This adjustment better captures the nuances of typing embeddings in a plagiarism detection context.
  • Cognitive Framework: The study aligns typing behavior with a four-stage cognitive model: Proposer (generating the initial idea), Translator (converting the idea into linguistic form), Transcriber (the physical execution of typing), and Evaluator (reviewing and editing the output).

Experimental Datasets

To validate the model, the researchers tested it across three distinct datasets:

  1. SBU Dataset: A collection of truthful and deceptive writings, including restaurant reviews and essays.
  2. Buffalo Dataset: Data from 157 participants performing fixed-text transcription and responding to open-ended questions across various hardware.
  3. The Proposed AI-Assisted Dataset: A custom dataset involving 40 students. In one session, students wrote independently; in a second, they were encouraged to use ChatGPT and the internet. This dataset specifically isolates the "AI-assisted" typing signature, where the student acts more as a transcriber than a proposer.

Key Insights: The "Thinking" Pause

The research identifies a distinct "typing signature" for original thought. Independent writing is characterized by irregular rhythms, including longer pauses at sentence boundaries and frequent, spontaneous revisions. Conversely, when students use AI, their behavior shifts toward "transcription-like" patterns—more fluent, continuous strings of text with fewer pauses associated with idea generation. Because the model focuses on how the text is produced, it remains effective even if the LLM perfectly mimics a student's specific writing style.

Results and Performance

The model's efficacy is highly dependent on the environmental context and the amount of prior data available:

  • User-Specific Accuracy: When the model was trained on data from a specific user or a consistent keyboard setup, it achieved accuracies between 74.98% and 85.72%.
  • Benchmark Success: The highest accuracy (85.72%) occurred within the Buffalo dataset, which features a strong transcription component.
  • Generalization Hurdles: In "agnostic" scenarios—where the model has not previously encountered the specific user or hardware—performance was less stable, ranging from 52.24% to 80.54%. This suggests that while the behavioral signal is strong, it is sensitive to external variables like hardware latency.

Limitations and Future Directions

While promising, several challenges remain before widespread deployment:

  • Hardware Sensitivity: Typing dynamics change significantly between laptop membranes and mechanical keyboards. Future work aims to develop "hardware-agnostic" models.
  • Copy-Paste Evasion: The current model assumes the student types out the AI's suggestions. If a student simply pastes a block of text, the keystroke sensor captures no data. Future iterations may need to monitor "copy-paste-edit" behaviors.
  • Inclusivity: With a sample size of 40 in the custom dataset, more research is needed to ensure the model does not penalize non-native speakers or individuals with motor disabilities who may have non-standard typing rhythms.

Conclusion

Keystroke dynamics offer a potent new front in the fight against academic dishonesty. By moving the focus from the text itself to the cognitive rhythm of its creation, researchers have developed a method that can identify AI-assisted writing with up to 85% accuracy, providing a behavioral safeguard in an era of increasingly sophisticated generative AI.

Summary updated

BibTeX
@inproceedings{kundu2024keystroke,
  author = {Debnath Kundu and Atharva Mehta and Rajesh Kumar and Naman Lal and Avinash Anand and Apoorv Singh and Rajiv Ratn Shah},
  title = {{Keystroke Dynamics Against Academic Dishonesty in the Age of LLMs}},
  booktitle = {IJCB},
  year = {2024},
  doi = {10.1109/ijcb62174.2024.10744461},
}
Figure