My Mouse, My Rules: Privacy Issues of Behavioral User Profiling via Mouse Tracking

Luis A. Leiva, Ioannis Arapakis, Costas Iordanou

TL;DR

This paper exposes the privacy risks of unobtrusive mouse cursor tracking on the web, demonstrating that a simple 5-line recurrent neural network can accurately predict a user's age and gender from raw mouse movements. To combat this, the authors propose an adversarial noise technique—implemented as a browser extension—that subtly scrambles mouse trajectories to protect user privacy without breaking website functionality.

What Problem Does This Paper Address?

While most web users are aware of cookie-based tracking, few realize that their mouse movements are routinely logged by third-party analytics scripts. Mouse tracking is often justified by website owners for usability testing or engagement metrics, but it can also be used for behavioral profiling. Because motor control and cognitive processes vary by age and gender, mouse trajectories inadvertently leak sensitive demographic information.

The authors highlight that with the rise of modern deep learning, extracting this data no longer requires complex feature engineering. This creates a dangerously low barrier to entry, making it trivially easy for malicious or unethical actors to profile users at scale without their explicit consent.

Methods

The researchers conducted an online study where participants performed a transactional web search task on a simulated Google Search Engine Results Page (SERP). They tracked mouse movements using a lightweight, open-source JavaScript library.

To predict demographics, they built a Bidirectional Gated Recurrent Unit (BiGRU) neural network. Unlike previous baseline models (like Random Forests) that require dozens of manually engineered features (e.g., speed, acceleration, click rates, hover times), the BiGRU takes raw multivariate time-series data: $(x, y)$ coordinates and time offsets.

To counter this profiling, the authors developed an adversarial noise method. It programmatically injects fake mousemove events between real ones, adding slight Gaussian noise to both the spatial coordinates and the timestamps. This defense mechanism was packaged into an open-source Chrome extension, allowing users to spoof their trajectories on the fly.

Datasets

The authors collected a dataset of 1,467 search sessions from crowdworkers on the Figure Eight platform. The dataset includes raw mouse cursor trajectories, browser viewport sizes, and self-reported demographic ground truth (age and gender). This dataset has been made publicly available to encourage further research into privacy-preserving web technologies.

Key Insights and Ideas

  • A terrifyingly low barrier to entry: The authors implemented their BiGRU model in just five lines of Keras code. This proves that sophisticated, privacy-invasive user profiling no longer requires specialized domain expertise in feature engineering or biomechanics.
  • Raw data beats engineered features: The simple RNN using only raw $(x, y, t)$ coordinates outperformed a traditional Random Forest model trained on 52 carefully crafted statistical features.
  • Micro-perturbations destroy model accuracy: Injecting a tiny amount of adversarial noise (as little as a 0.25-pixel radius) into the mouse trajectory is enough to completely confuse the neural network, reducing its predictive power to random guessing. Because the noise is so small, it doesn't interfere with the user's actual browsing experience.

Key Results

  • Age Classification (18–35 vs. 36–66): The BiGRU model achieved an F-measure of 0.653 and an AUC of 0.712, significantly outperforming the Random Forest baseline (F-measure 0.531, AUC 0.528).
  • Gender Classification: The BiGRU achieved an F-measure of 0.641 and an AUC of 0.650, again beating the Random Forest (F-measure 0.523, AUC 0.489).
  • Adversarial Defense: Applying adversarial noise with $\sigma = 0.25$ px degraded the BiGRU's AUC to ~0.50 (equivalent to a random coin flip). Even when the researchers attempted to train the BiGRU directly on the distorted data to make it robust against the defense, performance still plummeted (e.g., an 18.4% drop in F-measure for age classification).

Limitations and Future Work

  • Device Limitations: The study focuses exclusively on desktop computer mice. The models and adversarial defenses do not currently apply to touch-based devices like smartphones or tablets, which require different tracking paradigms.
  • The "Trusted Events" Loophole: Modern web browsers flag programmatic JavaScript events as "untrusted" to distinguish them from genuine physical hardware interactions. While most tracking scripts currently ignore this flag, tracking companies could easily update their code to filter out the extension's programmatic adversarial noise.
  • Future Work: To bypass the trusted events issue, the authors plan to develop an OS-level tool that generates fake mouse events. Because these events originate at the operating system level, the browser will recognize them as genuine, hardware-level interactions, making the defense much harder for trackers to circumvent.

Summary updated

Abstract

This paper aims to stir debate about a disconcerting privacy issue on web browsing that could easily emerge because of unethical practices and uncontrolled use of technology. We demonstrate how straightforward is to capture behavioral data about the users at scale, by unobtrusively tracking their mouse cursor movements, and predict user's demographics information with reasonable accuracy using five lines of code. Based on our results, we propose an adversarial method to mitigate user profiling techniques that make use of mouse cursor tracking, such as the recurrent neural net we analyze in this paper. We also release our data and a web browser extension that implements our adversarial method, so that others can benefit from this work in practice.
BibTeX
@inproceedings{leiva2021my,
  author = {Luis A. Leiva and Ioannis Arapakis and Costas Iordanou},
  title = {{My Mouse, My Rules: Privacy Issues of Behavioral User Profiling via Mouse Tracking}},
  booktitle = {CHIIR},
  year = {2021},
  url = {https://openreview.net/forum?id=gyt-UGoN9D},
}

Loading related content...

Figure