DEFT: A New Distance-Based Feature Set for Keystroke Dynamics

Nuwan Kaluarachchi, Sevvandi Kandanaarachchi, Kristen Moore, Arathi Arakala

Abstract

Keystroke dynamics offers a non-intrusive method for continuous authentication by analyzing the unique typing rhythms of users. However, traditional models often rely solely on temporal features, ignoring the physical constraints and spatial layouts of the hardware being used. This paper introduces DEFT (Distance Enhanced Flight Time), a novel feature set that integrates the physical distance between keys with traditional timing data. By normalizing spatial distances, the DEFT model achieves high accuracy across diverse devices, including desktops, mobiles, and tablets, while maintaining robustness against varying keyboard layouts.

Introduction

In the landscape of cybersecurity, "continuous authentication" has emerged as a vital layer of defense. Unlike static passwords or one-time biometric scans, behavioral biometrics like keystroke dynamics monitor a user's identity throughout an entire session. Despite its potential, the field has faced two primary hurdles: a reliance on purely temporal features (how long a key is held or the latency between presses) and a lack of cross-device adaptability.

Existing models often fail to account for the physical reality that a user's typing velocity is inherently linked to the distance their fingers must travel. Furthermore, a model trained on a desktop keyboard often fails when applied to a touchscreen. To address these gaps, we present the DEFT feature set, which incorporates spatial context to create a more nuanced and device-agnostic mechanical signature.

The DEFT Methodology

The core innovation of this research is the integration of spatial separation into the feature engineering process.

Spatial Distance and Normalization

Using a standard QWERTY layout, the researchers mapped the distance between key pairs, ranging from 0 (the same key) to 9 (e.g., the distance from 'Q' to 'P'). To ensure the model remains effective across different screen sizes and physical dimensions, the distances are normalized by the size of a single key. This normalization allows the relative spatial relationship to remain constant whether the user is on a 13-inch laptop or a 6-inch smartphone.

Feature Engineering

The DEFT feature set specifically targets "intra-hand" typing—sequences where both keys in a pair are pressed by the same hand—with a maximum travel distance of three units. By combining four types of flight times (F1 through F4) with these spatial distances, the researchers generated 32 distinct DEFT features. These were then integrated with three established feature categories:

  1. TEMP: Standard hold times and flight times.
  2. NC (Non-Conventional): Usage patterns of functional keys like backspace, shift, and caps lock.
  3. CKP: Flight times associated with the most frequently typed key pairs.

Classification Pipeline

The model employs a two-stage machine learning approach. First, Random Forest is used for feature selection to identify the most discriminative traits for a specific user. Second, XGBoost is utilized for binary classification to distinguish between the "genuine" user and an "imposter."

Experimental Validation

The model was validated using two comprehensive datasets:

  • SU-AIS BB-MAS: This dataset provided a multi-device environment, featuring 116 users typing across desktops, mobiles, and tablets.
  • Buffalo Dataset: This was used to evaluate "keyboard diversity," testing the model against various hardware brands and ergonomic designs, such as HP wireless and Microsoft ergonomic keyboards.

Key Results

The DEFT-enhanced model demonstrated superior performance compared to existing state-of-the-art methods:

  • Desktop: 99.6% accuracy (3.8% Equal Error Rate).
  • Mobile: 99.4% accuracy (6.6% Equal Error Rate).
  • Tablet: 99.3% accuracy (9.8% Equal Error Rate).

Notably, feature selection analysis revealed that DEFT features accounted for over 50% of the most important indicators on mobile and tablet devices, suggesting that spatial travel is a critical biometric marker for touchscreen interactions.

Discussion and Limitations

While the accuracy metrics are high, the research highlights a significant real-world challenge: class imbalance. In a production environment, "imposter" samples vastly outnumber "genuine" user samples. In this study, the ratio was 100 to 1. Although the researchers used SMOTE (Synthetic Minority Oversampling Technique) to balance the training data, the scarcity of genuine samples in testing resulted in lower F1 scores. This indicates that while the model is highly accurate, it must be finely tuned to avoid false rejections in practical applications.

Conclusion and Future Work

DEFT represents a significant step toward device-agnostic behavioral biometrics. By acknowledging the physical layout of the keyboard, the model captures a more stable and unique signature of user behavior. Future research will focus on cross-device authentication, utilizing deep transfer learning to determine if a model trained on a user’s desktop behavior can accurately authenticate them on a mobile device without requiring a completely new training phase.

Summary updated

BibTeX
@inproceedings{kaluarachchi2023deft,
  author = {Nuwan Kaluarachchi and Sevvandi Kandanaarachchi and Kristen Moore and Arathi Arakala},
  title = {{DEFT: A New Distance-Based Feature Set for Keystroke Dynamics}},
  booktitle = {BIOSIG},
  year = {2023},
  doi = {10.1109/biosig58226.2023.10345982},
}
Figure