Keystroke Dynamics System for User Authentication Using SVM Classifier

 

Rasha Khalid Ibrahim1,*, Mays M. Hoobi1

 

1Computer Science Department, College of Science, University of Baghdad, 10070, Baghdad, Iraq

 

Emails: Rasha.Khaled2201m@sc.uobaghdad.edu.iq; mays.m@sc.uobaghdad.edu.iq

 

 

Abstract

As people increasingly rely on computers to store sensitive information and interact with various technologies, the need for low-cost, effective security measures has become more critical than ever. One such method is keystroke dynamics, which analyzes a person’s typing rhythm on digital devices. This behavioral biometric approach enhances the security and reliability of user authentication systems and contributes to improved cybersecurity. This study aims to reduce authentication risks by encouraging the adoption of keystroke-based verification methods. The research uses a fixed-text password dataset (.tie5Roanl), collected from 51 users who typed the password over eight sessions conducted on alternating days, capturing variations in mood and typing behavior. Seven models were developed, each following a structured seven-phase process. The first phase involved loading the CMU Keystroke Dynamics Benchmark dataset. The second focused on data preprocessing. In the third phase, new keystroke features were engineered from the original dataset. The fourth phase involved feature selection across various types: unigraph (Hold), digraph (Down-Down, Down-Up, Up-Down, Up-Up), trigraph (Hold-Tri), and their combinations. Training and testing were conducted in the fifth and sixth phases using a Support Vector Machine (SVM) classifier, leveraging keystroke patterns for behavioral biometric identification. The final phase focused on evaluating the models. Each model was tested under two scenarios: one where only the first user is treated as the authorized user, and another where the first three users are considered authorized. Each scenario was further divided into two cases based on preprocessing conditions. The models were assessed using multiple performance metrics, including Accuracy, F1-Score, Recall, Precision, ROC-AUC, and Equal Error Rate (EER). The highest achieved results were Accuracy of 99.35%, F1-Score of 94.2%, Recall of 91.8%, Precision of 98.8%, ROC-AUC of 99.56%, and a minimum EER of 0.02. These outcomes demonstrate the effectiveness of the proposed approach in enhancing authentication reliability using keystroke dynamics.

 

Received: February 02, 2025 Revised: May 21, 2025 Accepted: July 02, 2025

 

 

Keywords: Behavioral biometric; Cybersecurity; Feature engineering; Machine learning; Keystroke dynamics