Few-shot learning for behavioural biometrics: A personalised approach to anomaly detection with limited data
Dev Rahul More, Ved Datar, Shishir Walvekar, Preeti Godbole, Divyang Sureshbhai Jadav · 2025
Keystroke dynamics represents a promising non-intrusive behavioural biometric that leverages an individual&s;s unique typing patterns for security applications without requiring specialised hardware. This paper introduces a novel few-shot learning approach to keystroke dynamics anomaly detection, applied to the Aalto University Mobile Keystroke Dynamics Dataset containing typing data from 37,606 users. The methodology addresses the critical real-world constraint where collecting extensive typing samples is impractical, working effectively with only 15 samples per user—the maximum available in the dataset. A personalised per-user modelling framework is implemented, employing seven different few-shot learning architectures—including prototypical networks, relation networks, and Attention Siamese Networks—to distinguish between normal and anomalous typing patterns. This approach is justified by the need to minimise user friction during system enrolment while maintaining robust security capabilities. The significance of this work lies in demonstrating that behavioural biometric security can be effectively implemented with minimal training data, making keystroke dynamics viable for widespread deployment. Experimental evaluation demonstrates that few-shot learning models, particularly relation networks, can successfully detect anomalous typing patterns with remarkably high accuracy and near-zero error rates, even when constrained to just 15 samples per user, substantially outperforming conventional machine learning approaches in this limited-data environment.