Journal of Intelligent Systems and Internet of Things

Keystroke Dynamics System for User Authentication Using SVM Classifier

Rasha Khalid Ibrahim, Mays M. Hoobi
Volume 18, Issue 1, pp. 80-102 (2026)
DOI: https://doi.org/10.54216/JISIoT.180106
Online: https://www.americaspg.com/journal/18/article/3936

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.

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

1. Introduction

In today’s digital age, the world is increasingly reliant on personal digital devices, all of which require robust protection. However, unauthorized access remains a persistent global threat [1]. The field of cybersecurity ensures that only authorized users can access and interpret sensitive information, thereby safeguarding data from intrusions [2]. While computers offer immense benefits, their security remains paramount—data loss or damage can result in significant consequences for individuals and organizations alike [3]. Secure data transmission must uphold the three foundational principles of information security: authenticity, confidentiality, and integrity [4][5]. User authentication has become a routine part of digital life, with most systems still relying on traditional methods such as usernames and passwords. However, these approaches suffer from well-known vulnerabilities, including password theft, shoulder surfing, brute-force and dictionary attacks, phishing, and speculation [6][7].

To address these challenges, keystroke dynamics has emerged as a promising biometric-based authentication method. This technique analyzes an individual’s unique typing rhythm to verify their identity [6]. As a behavioral biometric, keystroke dynamics captures detailed data from user interactions with physical or virtual keyboards [8]. These patterns can be characterized by duration (short vs. long), typing context (restricted vs. unrestricted), and content type (fixed vs. variable) [9][10]. The key contributions and novelties of this research include the following points:

 One of the key novelties of this study lies in the pre-processing steps, particularly their application to the CMU Keystroke Dynamics Benchmark dataset. The proposed pre-processing method significantly contributed to enhancing the system’s security, as evidenced by high F1-score and accuracy values, as detailed in the results section.

 The development of novel keystroke dynamics features through advanced feature engineering. These newly extracted features have been shown to greatly improve the security and reliability of the authentication system.

 A further innovation introduced in this research is the customized data splitting strategy, which plays a crucial role in boosting the performance of the proposed keystroke dynamics system. This strategy has a direct positive impact on evaluation metrics, confirming its effectiveness.

This paper is organized as follows: Section 2 reviews the existing literature on keystroke dynamics-based authentication. Section 3 outlines the common features used in keystroke dynamics. Section 4 provides details about the dataset employed in this study. Section 5 describes the evaluation metrics. Section 6 presents the Support Vector Machine (SVM) classifier used. Section 7 illustrates the framework of the proposed system. Section 8 discusses the experimental results, and the final section concludes the study.

2. Literature Review

A large number of researchers with the intention of using keystroke characteristics to distinguish between authorized and unauthorized users presented keystroke dynamics authentication models. According to these studies, an authentication system may reliably and computationally efficiently learn each user's unique patterns. In [11], CMU Keystroke Dynamics Benchmark Dataset are used. The method used is neural network architecture. The metrics are used EER=0.049 and accuracy =94.7%.the features used are Hold Time, Key Down-Key Down Time and Key Up-Key Down Time. In [12], utilized a dataset comprising keystroke dynamics data from 150 subjects. Each participant was asked to enter two types of Personal Identification Numbers (PINs): Short PINs: Consisting of 4 digits and Long PINs: Consisting of 11 digits. The method used is CNN. The metric used is EER=4.5.the features used is hold time and flight time. In [13], involved 104 typing samples collected using an Intelligent Keyboard (IKB). The IKB is a self-powered device that converts mechanical stimuli from keystrokes into local electronic signals. The method used is multilayer Deep Belief Network (DBN). The metric used is recognition accuracy; the proposed method demonstrated promising recognition accuracy across the collected typing samples, highlighting its effectiveness in keystroke dynamics identification. The feature used is raw electronic signals, unlike traditional methods that rely on predefined keystroke features (e.g., Hold time, Up-Down time), this approach directly utilizes raw electronic signals generated by the IKB. The DBN autonomously extracts pertinent features from these signals, streamlining the identification process. In [14] the dataset used is GREYC Keystroke dataset. The methods used is Manhattan Distance, Euclidean Distance, Support Vector Machines (SVM) and Random Forest (RF). The metric used is EER, in Manhattan Distance EER= 8.45%, Euclidean Distance EER = 8.67%, SVM EER = 3.61%, and in RF EER = 3.15%.the feature used is Down _Down, up _Up, Hold time, up _Down. In [15] SVM used, the metric used is accuracy=95% and the features used are key press and release events and gender, age category, and handedness. In [16] this article 31 volunteers (5 women and 26 men) aged between 20 to 40 years; each participant provided a password input and 50 swipe inputs on an Android platform. Over 1,500 samples of keystroke and swipe dynamics were collected. The method used is RNN and CNN. The metric used is accuracy and EER and f1_score.the features used is Keystroke Dynamics: Temporal and spatial characteristics of typing behavior, and Trajectory-based features capturing detailed movement patterns during typing. In addition, Swipe Dynamics: Motion patterns, pressure, and other dynamic aspects of swipe gestures. In [17] the dataset comprises keystroke dynamics data collected from 56 subjects using a Nexus 7 touchscreen smartphone. Each participant was asked to type the password "tie5Roanl" 51 times, resulting in 2,856 records. The dataset includes 71 attributes, capturing various aspects of typing behavior such as Hold Time, Up-Down Time, Pressure, and Finger Area. The method used is Dense Neural Network (DNN). The metrics used is accuracy, f1_score, and recall. In [7], this research examines the use of keystroke dynamics as a biometric measure to improve cybersecurity. The researchers proposed RNN models to evaluate keystroke dynamics, which capture the temporal features of typing patterns. This algorithm was learned to identify authorized users and un- authorized based on their distinct typing rhythms. In this research also compared RNNs' performance to that of classic classifiers, such as SVMs, to determine their efficacy in this setting. The key features extracted from the keystroke data include: Up-Down time, hold time, di-graph, from CMU Keystroke Dynamics Benchmark Dataset the proposed models were evaluated using EER=0.066 with SVM classifier. In [18], in this research, the experiment was conducted with 50 participants who were asked to write about their best and worst learning experiences, focusing on both subjects and teachers. The following keystroke features were retrieved: Hold time, Up-Down time, typing speed, digraph features, trigraph features. The machine learning techniques, including SVM, Random Forst (RF), Naive Bayes (NB), and K-Nearest Neighbors (K-NN), were employed to classify the opinions based on the extracted keystroke features. The average values of precision, recall and f1-score measurements were around 0.62. In [19] the dataset comprises samples from 50 subjects (20 authorized users and 30 un-authorized), all university students in a computer science department. Participants entered their chosen login ID and password (6 to 15 characters) over ten trials during specified periods across a 14-day span. Data collection aimed to replicate typical login times throughout a working day. The methods used are SVM, RF and ANN. The features used are Hold time, Up-Down time and Down-Down time. The ANN showing better results among the three algorithms implemented at 91.8% accuracy. In [20] dataset was created by acquiring both keystroke dynamics and EEG signals simultaneously from 10 users. Each user participated in 500 trials at 10 different sessions (days) to replicate real-life signal variability. The features used are EEG Signals: Statistical, time-domain, and frequency-domain features capturing neural patterns. In addition, keystroke dynamics: features related to typing patterns, such as key press duration and inter-key intervals. In [21] utilized the Buffalo dataset, which includes free-text keystroke data from 148 participants, each providing responses to specific prompts across multiple sessions. The methods used are CNN and a Gated Recurrent Unit (GRU), the features used keystroke timing features included key Hold time, inter-key intervals, and other timing-related metrics derived from the sequence of keystrokes. Features examined typing habits such as the frequency of using specific keys (e.g., shift, control) to capture unique aspects of individual typing styles. Achieved an average accuracy of 94.2% across different test sessions using the CNNGRU model. In [8], this article use EmoSurv dataset is a recent dataset containing keystroke data for 124 subjects, grouped into five classes: Anger, Happiness, Calmness, Sadness, and Neutral State. The following important characteristics were retrieved from the keystroke data: Hold time, Up-Down time, digraphs D1D2. The researcher has utilized machine-learning techniques, particularly CNN, to classify emotional states based on the extracted keystroke features. Multi-Instance Learning (MIL), SVM used also. Moreover, the best results in MIL_SVM Variable Bags (VB) accuracy = 0.76, precision = 0.80, recall = 0.69 and f1_score = 0.74. In [22] this research suggests a mechanism for user authentication based on typing patterns. The authors designed and implemented anomaly detection methods based on distance metrics and machine learning techniques. The methodologies used in this Artificial Neural Network (ANN) and CNN. The following important characteristics were retrieved from the keystroke data: Down-Down, Up-Down, and Hold times. The dataset comprised 51 users typing a password across 8 sessions conducted on alternate days to capture mood fluctuations. This approach aimed to account for variations in typing patterns over time. The ANN with a negative class achieved an accuracy of 95.05%. In [10] this research presents a novel technique to enhance password authentication by incorporating various keystroke dynamic information. SVM, ANN, and RF are three machine-learning techniques that have demonstrated impressive success in identifying users based on their typing habits. The SVM and RF algorithms, rising to 91.8% and 97%, respectively, have achieved notable accuracy levels. The results of this research show that the RF model performs better than other models in terms of accuracy when machine learning is applied to keystroke dynamics.

3. Kestroke Dynamics Features

Keystroke-dynamics-based authentication is a type of behavior-based authentication method. Often, it cooperates with an existing knowledge-based authentication method to strengthen the security where the knowledge-based authentication by itself is weak with regard to shoulder-surfing attacks [23]

The following are some typical feature types that can be taken from a human keystroke: [24]:-

1. Hold time: This is the period of time that passes between pressing a key (down) and releasing it (up). 2. Up-down time: This is the period of time that passes between a key release (Up) and the next key push (Down). 3. Down-Down: This is the time between two sequential down keystrokes. 4. Up-Up: This is the time between two key releases that follow one another. 5. Tri-graph: Is the elapsed time between the first key press (Down) and the third key press (Down). 6. Finger placement: a camera is necessary for this kind. 7. Keystroke pressure: In this situation, a unique kind of pressure that works with a sensitive keyboard must be applied.

4. CMU Kestroke Benchmark Dataset

This research uses the CMU Keystroke Dynamics Benchmark Dataset, where CMU is short for (Carnegie Mellon’s university). This dataset includes keystroke timing information acquired from 51 typists. Each typist has a subject (id) and 8 sessions, with each session consisting of typing 400 times a fixed strong password (. tie5Roanl). The features extracted from raw data were Hold time, Up-Down time and Down-Down time, that generated 31 timing vectors for each of the 51 users [23]. Figure (1) illustrates the contents of original CMU dataset. The total samples of CMU dataset still 20,400, (i.e. 51 subjects multiplied by 400 times, for each subject is typing as the original dataset) [1].

Figure 1. Contents of Original CMU Dataset
Figure 1. Contents of Original CMU Dataset

The subject must type the 10 characters of the password correctly, in sequence, and then press Enter. If any errors in the sequence are detected, the subject is prompted to retype the password. The subject must type the password correctly 50 times to complete a data-collection session. Whenever the subject presses or releases a key, the application records the event (i.e., key down or key up. CMU dataset subjects consisted of 30 males and 21 females, with 8 left-handed and 43 right-handed subjects. The median age group was 31–40, the youngest was 18–20 and the oldest was 61–70. The subjects’ sessions took between 1.25 and 11 minutes, with the median session taking about 3 minutes [22] [25].

5. Evaluation Metrics

Evaluation metrics offer insight into several facets of the deep learning model's efficacy. A confusion matrix is useful for assessing deep learning models, as Table (1) displays. Columns in the matrix display actual classes, while expected classes are represented by rows. Among the most important keywords are:  The number of approved transactions that are accurately categorized as authorized is known as the True Negative (TN).  The quantity of unauthorized transactions that are accurately identified as such is known as the True Positive (TP).  The number of permitted transactions that are mistakenly categorized as un-authorized is known as a false positive (FP).  The number of unauthorized transactions that are mistakenly categorized as approved transactions is known as the False Negative (FN).

Table 1. Confusion matrix
Table 1. Confusion matrix

Actual

Predicted

Six metrics are taken from the confusion matrix in this study to assess the predictive performance of the suggested keyboard authentication mechanism. Accuracy (Acc), F1-Score, Recall, Precision, ROC-AUC, and Error Equal Rate (EER) are the names of these metrics. The following are the formulas used to calculate each of these measurements.- [7] [23] [26] [27]

 F1-score: like in Equation (1), offers a trade-off between Precision (P) and Detection Rate (DR).

F1 −score = 2 ∗(DR + P) (DR + P) ⁄ (1)

 Accuracy (Acc): frequently used for evaluating the model's overall performance in categorization tasks. According to Equation (2), it is the proportion of accurately predicted cases to all instances.

Acc = TP + TN TP + FN + TN + FP (2)

 EER: is a common metric used to evaluate the performance of biometric authentication systems (such as fingerprint, face recognition, or keystroke dynamics). EER is the point where the FP equals the FN.

FP(τ) = FN(τ)             (3)

Where:

 τ is the threshold used for classification (e.g., match score, distance).

 FP(τ) = False Positive at threshold 𝜏

 FN(τ)= False Negative at threshold 𝜏

τ |FP(τ) −FN(τ)|          (4) EER = min

 Recall: assesses how well the model can identify unauthorized transactions. According to Equation (5), it is the proportion of accurately predicted positive instances to all instances in the actual class.

Recall = TP TP + FN

 Precision: indicates the frequency with which a model accurately identifies unauthorized, as specified in Equation (6) P = TP (TP + FP) ⁄ (6)

 The Area Under Curve (AUC) method evaluates the general performance of the model by computing the whole two-dimensional area under the ROC curve as indicated in Equation (7).

1 + TP TP + FN − FP TN + FP (7) AUC = 2

 The ROC curve is a graphical diagram that shows how well a binary classifier system can diagnose problems as its discrimination threshold is changed.

6. SVM Classifier

SVMs are supervised learning models with associated learning algorithms that analyze data used for classification and regression analysis. SVM constructs a hyperplane or set of hyperplanes in a high- or infinite-dimensional space for classification or regression. Intuitively, a good separation is achieved by the hyperplane that has the largest distance to the nearest training-data point of any class (so-called functional margin), since in general the larger the margin, the lower the generalization error of the classifier. Multiclass SVM aims to assign labels to instances by using SVMs, where the labels are drawn from a finite set of several elements. The dominant approach for doing so is to reduce the single multiclass problem into multiple binary classification problems and separate between of them, SVM utilized for accurate and fast classification. [25] [28] [29] [30]. Figure (2) presents the SVM classifier [31].

Figure 2. SVM Classifier
Figure 2. SVM Classifier

The hyperplane equation illustrated in Equation (8) wTX + b = 0 (8) Where: 𝑤: is the weight vector. 𝑥 : is the input feature vector. 𝑏 : is the bias term. The decision function illustrates in equation (9) FK(x) = wkT + bk (9) The predicted class equation as follows in equation (10)

y⌃= arg max(fk(x)), K = 1,2                   (10)

𝑦⌃: represents the predicted class.

7. Proposed Keystroke Dynamics System (SVM-KD)

The authentication via keystroke is based on the idea that each user posse’s unique typing dynamics, this research proposed a keystroke dynamics system for user authentication by exploiting the SVM algorithm, for short this proposed system called (SVM-KD). To obtain the efficient keystroke dynamics system, seven models applied using different keystroke timing features, some of these with features originally founded as default in data set such as unigraph feature, and di-graph features, in addition to new generated features to enhance the efficiency of SVMKD. Additionally for each model consists of two scenarios according to the number of legitimate users for each class in training and testing phases, finally, each scenario consists of two cases according to preprocessing status. For more illustration, see Figure (3).

Figure 3. General Structure of Proposed System SVM-KD
Figure 3. General Structure of Proposed System SVM-KD

Each proposed model of SVM-KD consists of seven phases, as illustrated in Figure (4).

Figure 4. Seven Phases of Proposed
Figure 4. Seven Phases of Proposed

The following subsections will explain the seven phases of the proposed models

7.1 Preprocessing Phase

In this research, the SVM-KD used several steps of preprocessing for standard CMU Keystroke Dynamics Benchmark dataset features for all models, that able the proposed models to be very efficient for keystroke authentication. Figure (5) demonstrates the proposed preprocessing steps. The initial step is to import the dataset into the system for further processing. To prevent training mistakes, the dataset is verified for missing (NaN) or infinite values. If such values are discovered, suitable steps (such as imputation or removal) are implemented. Ensures that the dataset has a 'subject' column, which is required for labeling the data. Each row in the dataset has a binary label: 1 (authorized): If the 'subject' column meets predefined approved values. 0 (unauthorized) → Otherwise. Machine learning models primarily operate with numerical input; therefore, only numeric characteristics are picked for processing. The dataset is segmented into x (features). Input variables for the model. Noise filtering using Z-Score: This stage uses Z-score computation to eliminate noisy data points and detect outliers. Data points that surpass a predetermined Z-score threshold (2.5) are considered noise and removed. The cleaned dataset is divided into training and testing sets for evaluating the model's performance. The numeric characteristics are standardized with StandardScaler to ensure that all variables have the same scale, allowing the model to learn more successfully.

Figure 5. Proposed Preprocessing Phase
Figure 5. Proposed Preprocessing Phase

For more illustration of preprocessing phase, see Algorithms (1) and (2).

Figure
Figure
Figure

7.2 Feature Engineering and Feature Selection Phases

Each sample in the data set is represented by a series of timing information that expresses the exact time when keys were pressed and released. From the timing information, many types of features can be extracted. As mentioned previously, the CMU Keystroke Dynamics Benchmark dataset by default consists of three features only, the first one is a unigraph feature: Hold(H) with two diagraph features: Down-Down(D-D), and Up-Down (U-D). Finding the important properties in the raw data is critical for reducing the classification error. In order to address the issue of creating features from attributes, an effective feature extraction approach was developed; outstanding classification performance is presently being pursued.

The main function of feature engineering phase is to extract new features from the original features founded in standard dataset. The feature engineering is surely the crucial means in terms of keystroke dynamics-based biometrics, and it affects the performance of the SVM-KD. Figure (6) illustrates the representation of all original features included (H, D-D, and U-D) consequently for the used password (.tie5Roanl).

Figure 6. Representation of Original Features: (a) H feature, (b) D-D feature, and (c) U-D feature
Figure 6. Representation of Original Features: (a) H feature, (b) D-D feature, and (c) U-D feature

In a research three new features are generated, these features include two diagraph features: Up-Up (U-U), Down-Up (D-U) in addition to a trigraph feature: Trigraph-Hold (T-H). The calculation for each new keystroke feature is formulated as below:

a. U-U feature: U-D1-2+H2

Where

U-D1-2: is the time from releasing the first key to pressing the second key.

H2: is the time of pressing the second key.

See Figure (7) depicts the representation of U-U generated feature for used password (.tie5Roanl).

Figure 7. Representation of U-U Feature
Figure 7. Representation of U-U Feature

b- D-U feature: H1 +U-D1-2+H2

Where

H1: is the time of pressing the first key.

U-D1-2: is the time from releasing the first key to pressing the second key.

H2: is the time of pressing the second key.

See Figure (8) depicts the representation of D-U generated feature for used password (.tie5Roanl).

Figure 8. Representation of D-U Feature
Figure 8. Representation of D-U Feature

c- T-H feature: H1 +H2 +H3

Where

H1: is the time of pressing the first key.

H2: is the time of pressing the second key.

H3: is the time of pressing the third key.

See Figure (9) depicts the representation of T-H generated feature for used password (.tie5Roanl).

Figure 9. Representation of T-H Feature
Figure 9. Representation of T-H Feature

After generation new three features, the original dataset updated three times. For more illustration, Figure (10) clarify the contents of new three datasets after generated three new features, in addition to the original dataset, resulted in having four basic datasets (O-D: Original Dataset, U-UD: the first new dataset after generation the first new feature U-U, D-UD: the second new dataset after generation the second new feature D-U, and T-HD: the third new dataset after generation the third new feature T-H).

Figure

(a) U-UD (b) O-D

Figure 10. Contents of Four Different Datasets
Figure 10. Contents of Four Different Datasets

(c) D-UD (d) T-HD

The length of the timing data the vector varies depending on the length of the password., such that a password (.tie5Roanl) which contains ten characters in addition to the enter key will result in eleven H, ten for each one of D-D, U-D, U-U, and D-U, in addition to nine T-H. Generally, a password with n character will yield n number of H feature and n - 1 number for each one of the remaining features. The representation of keystroke features for user 'X' is demonstrated in Table (2). For more illustration, for each user’s trail, the user has 6*n-6 features values, i.e. (6*11-6=> 66-6=> 60 values), that produced for 400 trails for each user (400*60=24000 values), by the same way, the total number of features values for 51 users equal to (24000*51= 1224000 values).

Table 2. Representation of Keystroke Features for User 'X'
Table 2. Representation of Keystroke Features for User 'X'

7.3 SVM Training and Testing Phases

This research adopts SVM deep learning algorithm, this section explains how to utilize this algorithm for keystroke dynamics authentication. To train the SVM algorithm, a set of timing vectors from each user class is required. These timing vectors are collected for each user and stored in CMU Keystroke Dynamics Benchmark Dataset as mentioned in section 4. The timing vectors are preprocessed to form a set of patterns that will be used to train the network. In SVM_KD, the structure of SVM depends on the extracted feature(s) and the used password. See Figure (11).

Figure 11. SVM Structure of SVM-KD
Figure 11. SVM Structure of SVM-KD

Algorithm (3) demonstrates the steps of SVM training and testing for SVM_KD.

Figure
Figure

The training phase of SVM aims to discover the optimal value of the Gamma (γ) parameter. In this research, multiple values of γ were generated based on the feature(s) employed, as detailed in Algorithm (4), to achieve the lowest rate mistakes in classification. This value of γ is regarded the ideal value for good classification; nevertheless, γ values differ depending on the features utilized. See Table (3).

Figure
Table 3. γ Values with Different Models and Cases
Table 3. γ Values with Different Models and Cases

7.4 Data Set Splitting Strategy

In this research, two dataset splitting strategies are used with training and testing phases as follows:

1- Strategy-1 In this strategy suppose only the first user in Class-1(authorized class) and the rest of 50 users are in Class-2 (unauthorized class), resulted in number of rows for Class-1 are equal to 1*400 and the number of rows for Class-2 are equal to 50*400. For more illustration, see Figure (12).

Figure 12. Data Set Splitting Strategy-1
Figure 12. Data Set Splitting Strategy-1

1- Strategy-2

In this strategy suppose only the first three users are in Class-1(authorized class) and the rest of 48 users are in Class-2 (un-authorized class), resulted in number of rows for Class-1 are equal to 3*400 and the number of rows for Class-2 are equal to 48*400. For more illustration, see Figure (13).

Figure 13. Data Set Splitting Strategy-2
Figure 13. Data Set Splitting Strategy-2

To balance the training and testing samples in two classes, for each one of the above strategies produced two datasets, one for authorized users and another one for un-authorized users, the next step is divided each class samples in to two parts, 80% for training and 20% for testing. So, the 80% represents 320 vectors were randomly chosen from one selected user and the same number of vectors was chosen from the rest of users, in addition to the 20% represents 180 vectors were randomly chosen from one selected user and the same number of vectors was chosen from the rest of users. In this research, the proposed system consists of seven models for keystroke dynamics authentication, these models implemented according to different combination of used features as illustrated in Table (4).

Table 4. SVM-KD Proposed Models
Table 4. SVM-KD Proposed Models

8. Results and Discussion

This section experimentally evaluates the performance of proposed SVM-KD models that explained in the previous section. Several experiments are conducted to show the applicability of proposed SVM-KD models when different combinations of features are used. This research used the Python programming language, several libraries, and machine learning frameworks and packages. These included NumPy and pandas, which provide numerical computing tools and data manipulation, run on the CPU environment (Intel Core i7-5600U CPU @ 2.60GHz with 6.91 GB of RAM and a 168.13 GB disk) to implement data analysis. Each user has a distinguishing typing style because the extracted features for each user is different from the other. In other words, keystroke patterns exhibit a degree of variance between samples. Figure (14) depicts the values of H-T feature for random ten users, each user types 50 times in 8 sessions. The x axis refers to nine H-T values obtained from typing password (.tie5Roanl); where the y axis refers to time (MS). The red points refer to average of feature values for 400 trails.

Figure 14. Varity of T-H Feature for Random Ten Users
Figure 14. Varity of T-H Feature for Random Ten Users

The evaluating predictive performance of SVM-KD as biometric authentication is calculated by six measures called F1-score (F1), Accuracy (Acc), Equal Error Rate (EER), Recall, Precision, and ROC according the equations mentioned in section 5. This research implemented several experiments for keystroke dynamics are conducted upon the CMU Keystroke Dynamics Benchmark dataset, for each experiment divided in to two cases according to two dataset splitting strategies as mentioned previously in sub section 7.4, then for each case contains two scenarios without z-score and with 2.5 z-score threshold. Figure (15) described the general structure for each experiment.

Figure 15. General Structure for each Experiment
Figure 15. General Structure for each Experiment

In this section discuss the results for all experiments, such that, the number of all experiments implemented in this research as follows: -

𝑇𝑜𝑡𝑎𝑙 𝐸𝑥𝑝. = 𝑛𝑜. 𝑜𝑓𝑚𝑜𝑑𝑒𝑙𝑠∗𝑛𝑜. 𝑜𝑓 𝑐𝑎𝑠𝑒𝑠∗𝑛𝑜. 𝑜𝑓 𝑠𝑐𝑒𝑛𝑎𝑟𝑖𝑜𝑠
𝑇𝑜𝑡𝑎𝑙 𝐸𝑥𝑝. = 7 ∗2 ∗2  ………………> 𝑇𝑜𝑡𝑎𝑙 𝐸𝑥𝑝. = 28 𝐸𝑥𝑝𝑒𝑟𝑖𝑚𝑒𝑛𝑡𝑠

Such that in Experiment-1, only the original features founded in default dataset (O) are used, these features included (H, U-D, and D-D). This experiment included the following two cases: -

Case-1: this case represented by applying the first strategy of dataset splitting strategies as mentioned previously in sub section 7.4, so, in this strategy suppose only the first user is in Class-1(authorized class) and the rest of 50 users are in Class-2 (un-authorized class). This case applied with each one of the following two scenarios: -

Scenario-1: this scenario applied without using Z-score.  Scenario-2: this scenario applied with 2.5 Z-score threshold.

Case-2: this case represented by applying the second strategy of dataset splitting strategies as mentioned previously in sub section 7.4, so, in this strategy suppose only the first three users are in Class-1(authorized class) and the rest of 48 users are in Class-2 (un-authorized class). This case applied with each one of the following two scenarios: -

Scenario-1: this scenario applied without using Z-score.  Scenario-2: this scenario applied with 2.5 Z-score threshold.

With the same way, all the remaining experiments can be represented according the models' details explained previously in Table (4).

The results for 28 experiments illustrated in Table (5), this table showed that, the results for Experiment-1 are good results but are the lowest comparing with the remaining experiments. In addition, the results indicated to robust and efficient effects of the proposed preprocessing steps, data splitting strategies, and feature engineering.

Table 5. Results for all Experiments
Table 5. Results for all Experiments

For discussing and analyzing the obtained results of all implemented experiments, several important sides must be displayed as follows: -

1- Preprocessing

The proposed preprocessing steps reflects very good results specially by using Z-score concept, so the results obtained by using Z-score with threshold=2.5 are higher than without Z-score for all cases.

2- Feature engineering

The proposed methods of feature engineering in this research produced the highest results, such that the best results obtained from the proposed model- (O+2+3), that used the combination of original dataset features in addition to new generated diagraph features and new generated trigraph (H, D -U, D-D, U-D, U-U, TH). These results give the indication of enhancement the efficiency of keystroke dynamics system that depended on the original dataset only, as illustrated in Table (V). Several combinations of features applied, some of these implemented by using only the new generated features and others implemented by using the original dataset features in addition to new generated features in different cases, for all applied combinations, the results are better than used the original dataset only.

3- dataset splitting strategies

In proposed models using two strategies for dataset splitting, the results obtained for all experiments indicated that SVM produced the best results when considered the trails for the first three users as Class-1(authorized users) and all the remaining trails for Class-2(un-authorized users). In addition, the training and testing time for all proposed model by using Z-score is less than other models, that means by using Z-score concept reduce the training and testing time and enhance the efficiency of SVM-KD. See Table (6).

Table 6. Training and Testing Times for all Experiments of SVM-KD
Table 6. Training and Testing Times for all Experiments of SVM-KD
Figure

9. Conclusion

In this section, from the results of this research several points can be concluded, the first point is related to preprocessing phase. This phase produced good effects on the results comparing with the results without preprocessing. In addition to the feature-engineering phase generated good new keystroke dynamics features namely U-D, U-U, and H-T that strength the default features, which founded in original data set, therefore, these additional features, could be used to strengthen password security by differentiating between authorized and unauthorized users. Applying SVM classifiers with various data splitting techniques for training and testing success with keyboard dynamics for authentication fields is an example of deep learning. The provided research's accuracy with various suggested models is nearly at the acceptable error levels needed for a system with a certain level of security. Data splitting strategy for training and testing is an important issue in user authentication based on keystroke dynamics. The results of second strategy of splitting data when consider the first three users as authorized in all experiments are better than results obtained from first strategy.

Conflicts of Interest: The authors declare that there is no conflict of interest.

Author Contributions: Conceptualization Mays M. Hoobi; methodology Rasha Khalid Ibrahim; analysis Mays M. Hoobi, and writing original draft preparation Rasha Khalid Ibrahim, Mays M. Hoobi; validation and reviewing the manuscript by both authors, who then approved the final version of the manuscript.

Acknowledgments: The authors would like to thank Baghdad University in Baghdad, Iraq, for their operation with (http://uobaghdad.edu.iq).

References

Figure
Figure
Figure