Where you go is who you are -- A study on machine learning based semantic privacy attacks

Nina Wiedemann, Ourania Kounadi, Martin Raubal, Krzysztof Janowicz

TL;DR

Think your location privacy is safe because your phone only shares an "approximate" location? This paper demonstrates that machine learning models can easily unmask your personal interests and daily habits—creating detailed semantic profiles—even when your coordinates are blurred by hundreds of meters, largely by exploiting temporal patterns and public map data.

What Problem Does This Paper Address?

Traditional location privacy research focuses heavily on re-identification—matching an anonymous GPS track to a specific identity. However, commercial data brokers are often less interested in your exact name and more interested in your semantic profile: what you do, where you shop, and your lifestyle habits.

To protect themselves, users frequently rely on location obfuscation (adding random noise to coordinates). This paper investigates a critical gap in this defense: Can an attacker use machine learning to execute a "semantic privacy attack," reconstructing your behavioral profile from noisy, obfuscated location data? The authors systematically quantify how data quality (obfuscation radius) and auxiliary data (the density and quality of public map data) affect an attacker's success.

Methods

The authors formalize the threat into two distinct attack scenarios:

  1. Task 1 (Location Categorization): Predicting the category of a specific visit (e.g., "Dining" vs. "Nightlife") given a timestamp and noisy coordinates.
  2. Task 2 (User Profiling): Aggregating those individual predictions into a behavioral frequency distribution (a profile) for a single user.

To simulate a sophisticated adversary, they train an XGBoost classifier using a rich set of engineered features:

  • Temporal features: Visit frequency, estimated duration (time elapsed until the next recorded check-in), and cyclic time-of-day encodings (sine and cosine transformations of the hour).
  • Spatial features: Counts and distances of nearby Points of Interest (POIs) extracted via a ball tree search, alongside learned spatial representations generated by the state-of-the-art space2vec embedding method.

Crucially, they contrast "hard" profiling (counting discrete category predictions) with "soft" profiling (averaging the model's predicted class probabilities).

Figure 1: Overview of the experimental setup. The samples are spatiotemporal data about location visitation patterns. We simulate reduced data quality and potential protection measures by obfuscating the geographic coordinates. The samples are then featurized into vectors encoding temporal visitation patterns and spatial context. We simulate a privacy attack with a trained ML model on new users by a train-test split and evaluate the attacker’s accuracy on the test data.

Datasets

The study evaluates the attacks across three distinct data setups:

  • Foursquare Check-ins (NYC & Tokyo): A dataset containing highly accurate, reliably labeled leisure check-ins across 12 categories. This served as both the user tracking data and the attacker's public POI database.
  • OpenStreetMap (OSM): Used as an alternative, independent POI dataset to simulate a realistic scenario where the attacker's background map data does not perfectly match the user's tracking platform.
  • Yumuv Study: A real-world GNSS tracking dataset from Switzerland with manually corrected activity labels across 5 broad categories (Work, Education, Sports, Dining, Leisure), used to validate the findings on continuous tracking data.

Key Insights and Ideas

  • The Danger of "Soft" Profiling: An attacker does not need to correctly guess the category of every single place you visit to understand who you are. By averaging prediction probabilities ("soft" profiling), the attacker achieves a significantly lower profiling error compared to point predictions ("hard" profiling), especially as location obfuscation increases.
Figure 5: Comparison of user-profiling errors achieved from averaging ”hard” predictions or ”soft” prediction probabili- ties for each category. Probabilistic classifications improve the spatial attack, in particular for lower-quality location data.
  • Time is a Resilient Informant: When spatial data is completely ruined (obfuscated by more than 1 km), spatial features lose all utility. However, temporal features alone provide a remarkably high baseline accuracy (~39% for Tokyo), proving that when you move is highly indicative of what you are doing.
  • Spatial Autocorrelation Fuels the Attack: Cities are naturally clustered; restaurants sit next to restaurants, and shops sit next to shops. This spatial autocorrelation means that even if your location is blurred by 100–200 meters, the surrounding POI context remains highly informative.
  • Cross-Regional Generalization: Models trained on a spatial split (trained in one part of a city, tested on another) showed only a minor (~5%) drop in accuracy. An attacker does not need data from your exact neighborhood to profile you effectively.

Key Results

  • With a location obfuscation radius of 100m, the spatiotemporal XGBoost model achieved a 61.6% place categorization accuracy on the Foursquare dataset.
  • This high categorization accuracy translated to a top-5 user re-identification accuracy of 40.4%, representing a median privacy loss 11 times worse than an uninformed random strategy.
Figure 2: Effect of location obfuscation radius on the attacker’s performance in categorizing locations. Spatial information are valuable for an ML algorithm even with up to 1km of obfuscation.
  • When the attacker was forced to use an independent, less aligned POI dataset (OSM instead of Foursquare), place categorization accuracy dropped from 61.6% to 50.3%, highlighting that semantic attacks are highly sensitive to background data alignment.
  • The authors note that obfuscating location data with a radius between 100m and 200m represents a solid trade-off—it significantly reduces profiling risks for a large majority of users while preserving enough utility for applications like social media.

Limitations and Future Work

  • Leisure Bias: The Foursquare dataset focuses heavily on leisure activities, explicitly omitting home and work locations (though the authors note home and work are easily uncovered via simple temporal heuristics).
  • Public POI Dependency: The attack assumes that user visits are generally tied to public POIs. It would struggle to categorize private behaviors, such as visiting a friend's apartment.
  • Future Directions: The authors call for future privacy-preserving algorithms to focus on obfuscating temporal signatures alongside spatial data. They also suggest exploring adversarial defenses designed to specifically exploit the weaknesses of tabular machine learning models.

Summary updated

Abstract

Concerns about data privacy are omnipresent, given the increasing usage of digital applications and their underlying business model that includes selling user data. Location data is particularly sensitive since they allow us to infer activity patterns and interests of users, e.g., by categorizing visited locations based on nearby points of interest (POI). On top of that, machine learning methods provide new powerful tools to interpret big data. In light of these considerations, we raise the following question: What is the actual risk that realistic, machine learning based privacy attacks can obtain meaningful semantic information from raw location data, subject to inaccuracies in the data? In response, we present a systematic analysis of two attack scenarios, namely location categorization and user profiling. Experiments on the Foursquare dataset and tracking data demonstrate the potential for abuse of high-quality spatial information, leading to a significant privacy loss even with location inaccuracy of up to 200m. With location obfuscation of more than 1 km, spatial information hardly adds any value, but a high privacy risk solely from temporal information remains. The availability of public context data such as POIs plays a key role in inference based on spatial information. Our findings point out the risks of ever-growing databases of tracking data and spatial context data, which policymakers should consider for privacy regulations, and which could guide individuals in their personal location protection measures.
BibTeX
@article{wiedemann2024where,
  author = {Nina Wiedemann and Ourania Kounadi and Martin Raubal and Krzysztof Janowicz},
  title = {{Where you go is who you are -- A study on machine learning based semantic privacy attacks}},
  journal = {J. Big Data},
  year = {2024},
  doi = {10.1186/s40537-024-00888-8},
}
Figure