Skip to content

a secure mobile banking application that collects behavioral and device metadata through an integrated Central Logger. This logger captures touch, sensor, device for each user session, enabling Machine Learning–based anomaly detection

Notifications You must be signed in to change notification settings

Kaushal-11/Behavioural-Biometric-AI

Repository files navigation

HMOG Behavioral Biometrics Authentication System

A comprehensive authentication system using Hand Movement, Orientation, and Grasp (HMOG) behavioral biometrics with two different approaches.

Dataset

Download the HMOG dataset from: https://github.com/hmog-dataset/hmog

Place the dataset in hmog_dataset/public_dataset/ directory.

Setup

# Create virtual environment
python -m venv behav_env
source behav_env/bin/activate  # On Windows: behav_env\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Run the system
python main.py

Module Descriptions

  1. data_processor.py - Handles data extraction and loading from user ZIP files
  2. feature_extractor.py - Extracts HMOG and keystroke behavioral features
  3. feature_processor.py - Performs feature engineering, selection, and preprocessing
  4. authenticator.py - Traditional One-Class SVM authentication approach
  5. global_feature_model.py - Global feature extractor and per-user classifiers
  6. embedding_authenticator.py - Novel embedding-based authentication system
  7. visualization.py - Generates results visualization and comparison plots
  8. main.py - Orchestrates the entire authentication pipeline

How the Embedding-Based Approach Works

Core Concept

Instead of training separate models for each user on raw features, we:

  1. Train a Global Model: Learn general behavioral patterns from all users
  2. Extract Embeddings: Use the global model as a frozen feature extractor
  3. Train Lightweight Classifiers: Each user gets a simple binary classifier

Benefits

  • Better Generalization: Global model learns robust behavioral representations
  • Less Data Required: Per-user classifiers need fewer samples
  • Transfer Learning: Knowledge from all users helps individual authentication
  • Computational Efficiency: Lightweight classifiers are fast to train/deploy

Pipeline

Raw Features → Global Model → Embeddings → User Classifier → Decision
    (X)            (frozen)       (128-D)      (SVM/RF/MLP)    (genuine/impostor)

Output

The system generates:

  1. Console Output: Detailed progress and metrics
  2. Visualizations:
    • traditional_results.png: Traditional approach performance
    • embedding_results.png: Embedding-based performance
    • comparison_results.png: Side-by-side comparison
    • per_user_comparison.png: Individual user comparison
  3. Cached Files:
    • processed_data.pkl: Processed dataset
    • global_model.pkl: Trained global feature extractor

Performance Metrics

  • EER (Equal Error Rate): Primary authentication metric
  • Genuine Scores: Authentication scores for legitimate users
  • Impostor Scores: Authentication scores for impostors
  • Per-User EER: Individual user performance

References

If you use this system, consider citing relevant HMOG research papers on behavioral biometrics and authentication.

About

a secure mobile banking application that collects behavioral and device metadata through an integrated Central Logger. This logger captures touch, sensor, device for each user session, enabling Machine Learning–based anomaly detection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages