Privacy-Preserving Machine Learning on Web Browsing for Public Opinion

Sam Buxbaum, Lucas M. Tassis, Lucas Boschelli, Giovanni Comarela, Mayank Varia, Mark Crovella, Dino P. Christenson

TL;DR

This paper presents a real-world deployment of privacy-preserving machine learning (PPML) to predict political preferences using sensitive web browsing data. By employing secure multi-party computation (MPC), they enable analysis of user browsing habits without ever exposing individual data, offering a novel approach to public opinion polling.

What Problem Does This Paper Address?

Traditional methods for gauging public opinion, like political polls, are often expensive, infrequent, and can suffer from sampling bias. Web browsing data, on the other hand, offers a rich, continuous stream of information about user interests and behaviors that could be highly valuable for understanding political sentiment. However, the highly personal nature of web browsing data makes its collection and analysis for such purposes fraught with privacy concerns. Existing methods for analyzing this data either require users to trust that their data will be anonymized and aggregated, or they collect data in ways that are not privacy-preserving. This paper tackles the challenge of leveraging the richness of web browsing data for political analysis while providing strong, cryptographic privacy guarantees.

Methods

The core of this work lies in the integration of Secure Multi-Party Computation (MPC) with a Learning from Label Proportions (LLP) machine learning model.

  • MPC: The system uses an "honest-majority three-party setting" with semi-honest security. This means that while the majority of parties are assumed to be honest, they can still be tricked by a malicious minority. The computation is "outsourced," where users' data is split into "secret shares" and sent to a set of non-colluding servers. These servers then perform the computation on the shares without ever seeing the original data.
  • LLP Model: The paper adapts an LLP algorithm, which is designed for situations where individual labels are unknown, but the proportion of labels within groups (bags) is known. In this context, the "bags" are U.S. states, and the "ground truth" for training comes from publicly available polling and election results. The algorithm iteratively trains a logistic regression model and refines predictions based on state-level proportions.
  • System Architecture:
    • Browser Extension: A custom Chrome extension collects daily histograms of website visits and referrals. These histograms are secret-shared and encrypted on the client-side.
  • Webserver: A lightweight NodeJS webserver handles client communication and stores the encrypted secret shares. It does not have access to the unencrypted data.
  • Computing Servers: Three non-colluding servers, running the CrypTen MPC library, retrieve the secret shares, perform the MPC computation (training the LLP model), and output the aggregate results.

A key innovation is the implementation of the LLP algorithm under MPC, particularly the challenge of oblivious sorting required for computing state-specific thresholds. The authors implemented a vectorized Bitonic sort on top of CrypTen to handle this.

Datasets

The study uses a dataset collected from nearly 8000 users recruited via Amazon Mechanical Turk, focusing on individuals in "swing states" for the 2024 U.S. presidential election. Data was collected from August 2024 to February 2025, with over 2000 daily active users.

  • Web Browsing Data: Collected via the Chrome extension, this includes daily histograms of visits to and referrals from a curated list of 517 popular websites (excluding advertising sites). Only website domains were recorded, not full URLs.
  • Demographic Metadata: This includes Mechanical Turk IDs (used for compensation and anonymized linking), self-reported state and ZIP code, and total visit/referral counts.
  • Ground Truth Data: Publicly available polling and election results for the 2024 U.S. presidential election were used to train the LLP model.

Key Insights and Ideas

  • Feasibility of PPML for Political Science: The paper demonstrates that it's possible to deploy complex PPML systems for real-world social science research, specifically for political opinion analysis, without compromising user privacy.
  • Web Browsing as a Proxy for Political Opinion: The work builds on prior research showing that web browsing patterns can indeed be used to infer political preferences, and this study validates this in a privacy-preserving manner.
  • The Trade-off Between Data Integrity and Privacy: The authors highlight the inherent tension between ensuring the accuracy of self-reported data (like state of residence) and maintaining user privacy. Their approach of using IP geolocation for validation at the time of upload, without long-term storage, is a practical compromise.
  • Honest Users Provide Denser Data: Despite concerns about data integrity, the study found that users who consistently provided accurate location data (more "honest" users) contributed significantly more "dense" and informative browsing data, particularly referral data, which is a stronger signal for political preference.
  • MPC Enables Analysis of Sensitive Data: The core insight is that MPC unlocks the potential to analyze highly sensitive user data, like web browsing history, for valuable insights that would otherwise be inaccessible due to privacy concerns.

Key Results

  • Deployment Scale: The system successfully collected and analyzed data from nearly 8000 users, with over 2000 daily active users sustained for a significant period.
  • Performance: An end-to-end training run for a week before and after the election took approximately 70 minutes. Inference for a single day's data took 1-5 minutes, running on moderately powerful AWS instances. The authors emphasize that performance was not maximized but demonstrated viability.
  • Data Integrity Findings:
    • Approximately 98% of uploads were from users in the U.S.
  • Only 15% of uploads came from users in their self-reported state.
  • 15% of uploads contained a self-reported ZIP code invalid for the reported state.
  • Political Trend Observations: The state-level inference results showed a general swing towards the Republican candidate before the election and a swing in the opposite direction afterward. The "honeymoon period" for the new president appeared to be very short or non-existent in many states.

Limitations and Future Work

  • Data Integrity Verification: The authors acknowledge the challenge of balancing data integrity with privacy. While they use IP geolocation for validation, stronger identity verification methods could compromise privacy. They suggest exploring "private KYC services" as a future direction.
  • Threat Model: The current system relies on AWS as a single point of failure. Future work could explore multi-cloud solutions and more robust threat models.
  • Performance Optimization: While the current performance is acceptable for the case study, processing significantly larger datasets would require more aggressive tuning and optimization.
  • Anonymous Payments: The current payment mechanism requires linking Mechanical Turk IDs to data. Implementing anonymous payments would add another layer of privacy protection.
  • Generalizing LLP: The paper focuses on a specific LLP algorithm. Exploring other LLP algorithms and their MPC implementations could be beneficial.

Summary updated

BibTeX
@article{buxbaum2025privacy,
  author = {Sam Buxbaum and Lucas M. Tassis and Lucas Boschelli and Giovanni Comarela and Mayank Varia and Mark Crovella and Dino P. Christenson},
  title = {{Privacy-Preserving Machine Learning on Web Browsing for Public Opinion}},
  journal = {IACR Cryptol. ePrint Arch.},
  year = {2025},
}
Figure