Mouse Movement Patterns: Detecting Bots vs Humans | Bureau

How Mouse Movement Analysis Accurately Differentiates Bots From Humans

Advancements in technology and the rise of intelligent, human-like bots has rendered traditional detection techniques redundant. Businesses can use mouse.

Author
Priyadarsh Singh

Maintaining user authenticity and platform integrity, in the backdrop of rapid digitalization, makes it critical for businesses to proactively detect automated agents and bots. This widening gap between bot sophistication and traditional defense mechanisms means digital businesses are at a greater risk of fraudulent account creation, account takeover, data scraping, and several other forms of automated abuse.

Mouse movement behavior offers a stronger and harder-to-spoof signal in bot detection, as it captures subtle motor patterns that are difficult for bots to mimic authentically. Tracking and analyzing subtle patterns, such as variations in speed, angular changes, path, and pauses, among others, can help identify bots that can even mimic clicks or cursor patterns.

The analysis below demonstrates how raw mouse movement behavior data can be transformed into engineering features and visual patterns to reliably identify use of automation.

Methodology

To demonstrate that mouse movement data can be used as a viable detection mechanism for automation, the open-source dataset: DELBOT-Mouse was examined. This dataset contains labeled mouse movement sessions from both humans and bots, recorded across different screen resolutions.

Steps taken

Step Area Activity
Step 1 Data Ingestion and Preprocessing - Loaded sessions containing timestamped (x, y) cursor coordinates and mouse events.
- Filtered datasets relevant to mac and monitor devices, which included both bot and human labels.
Step 2 Feature Engineering - Computed derived metrics:
- Displacement: Start-to-end distance
- Speed: Rate of movement (pixels/sec)
- Angle: Direction of motion between points
- Efficiency: Ratio of direct distance to actual path length
- Pause Intervals: Time between successive events
Step 3 Visualisation and Pattern Analysis - Scatter plots to show raw movement traces
- Heatmaps to reveal cursor concentration zones
- Distribution plots for speed, angles, pauses, and efficiency

This activity helped identify consistent patterns that can be used to differentiate bots from humans. These include:

Insights

The insights from the activity as enumerated below collectively validate that mouse behavior is a robust signal for distinguishing bots and is especially useful in passive behavioral bot detection systems.

1. Raw Mouse Movement Scatter Plots

Shows the overall spatial pattern of mouse movements using (x, y) points for each group.

2. Heatmap

Highlights where the mouse spends most of its time.

3. Displacement Distribution

Measures the straight-line distance from the start to end of a session.

4. Direction (Angle) Distribution

Represents the angle/direction of movement at each step.

5. Movement Efficiency

Indicates how direct the path is from start to end. Using the formula: Efficiency = EuclideanDistance(start ? end) / TotalPathLength, it is deduced:

6. Pause/Interval Distribution

Time gaps between sequential mouse events.

7. Speed Distribution

Rate of movement (pixels/sec) between consecutive points.

Conclusion

The visualisations and distributions confirm that mouse movement behavior is a robust, passive signal that can clearly separate human and bot behaviors across multiple metrics. Businesses can use behavioral bot detection systems and high-fidelity signals to improve their fraud prevention capabilities against automated fraud.

Even for intelligent bots with advanced human-like behaviors, behavioral patterns such as movement precision, path efficiency, and timing regularity can be detected with engineered features and visualization techniques.

Reference: The dataset used for this analysis is sourced from : GitHub - chrisgdt/DELBOT-Mouse: A small deep-learning library to distinguish human and bot from their mouse movements.

It contains labeled mouse movement data collected from both human and bot users. The data is categorised by screen resolution that resemble the following devices: mac, laptop(windows), and monitor.

Notably, both mac and monitor datasets include samples from humans and bots, making them suitable for comparative behavioural analysis. These two sources were combined for the charts and insights presented below.

Each session consists of timestamped mouse coordinates and actions (e.g., Move, Press), which we used to compute derived features like displacement, speed, efficiency, angle, and pause intervals.