Kinematic features are all you need.
Detecting Synthetic Mouse Trajectories Under Adversarial Optimization
For my first paper, I studied whether movement patterns could tell generated mouse input from a real person's input. I also tested what happened when the generator knew exactly how the detector worked.
PDF Mouse generators already imitate the curves, timing, and small corrections seen in human movement. I wanted to know whether that was enough to fool a detector that only saw the movement itself.
I tested the detector on the Balabit and BOUN datasets. It found more than 99.5% of generated movements while flagging fewer than 0.1% of human ones. After I retrained the detector once, the attacker's mean evasion score fell from 0.999 to 0.010 by round five.
≤ 0.001
Balabit and BOUN datasets
> 99.5%
True positive rate
White-box evasion · before → after retraining
Mean evasion score across five rounds of white-box Bayesian optimization.
17
Selected from a 32-feature taxonomy
43,216
Recorded mouse movements
29
Across two public datasets
How I approached it.
I focused on the shape and timing of each movement. I left out features that could reveal the mouse or its polling rate instead of the movement itself.
- 01
What I measured
I gave the detector only x and y positions and their timestamps. It uses 17 movement features and does not rely on information about the mouse itself.
- 02
Why timing matters
Modern generators already imitate several parts of human movement. They can draw a convincing path, but their speed and timing still make them easier to identify.
- 03
How I tested it
I let the attacker see every feature and optimize against the detector for five rounds. After I retrained the detector once, the attacker's mean evasion fell from 0.999 to 0.010.
Paths above, speed profiles below. Original examples from the paper, shown in monochrome.
Open figureThe research, running live.
Reach for the ring. The pad measures your movement the way the paper's detector looks at it, then two generators make the same reach.
Move your cursor to the ring.
Speed over the movement, scaled to each peak
- You
- Lognormal stroke
- WindMouse
| Feature | You | Lognormal | WindMouse | Human range |
|---|---|---|---|---|
| Sub-movements | – | – | – | 1–3 |
| Peak speed, px/ms | – | – | – | 2.5–3.5 |
| Peak at | – | – | – | 30–40% |
| Path efficiency | – | – | – | 0.95–0.99 |
| Time, ms | – | – | – | Fitts' law |
What came out of it.
The main lesson was that each generator could match some parts of human movement, but none could match all of them at the same time.
- 01
Movement data only
I built the detector around x, y, and timestamps. It does not rely on device fingerprints, and I left out features that reveal polling rate.
- 02
Retraining the detector
I ran five rounds of white-box Bayesian optimization. After one detector retraining round, the attacker's mean evasion fell from 0.999 to 0.010.
- 03
A feature guide
I organized 32 movement features into six groups and identified 15 that should be left out because they reveal polling rate.
- 04
SigmaDrift
I also released the mouse generator as open source so other researchers can test against it and build on the work.
Read the paper or check my code.
I've made the paper, detector, and SigmaDrift generator available below.
Open the PDF- Mouse dynamics
- Adversarial ML
- Motor control
- Anti-cheat
- Behavioral biometrics