Automated Detection and Analysis of Data Practices Using A Real-World Corpus (2024)

Abstract: Privacy policies are crucial for informing users about data practices, yet their length and complexity often deter users from reading them. In this paper, we propose an automated approach to identify and visualize data practices within privacy policies at different levels of detail. Leveraging crowd-sourced annotations from the ToS;DR platform, we experiment with various methods to match policy excerpts with predefined data practice descriptions. We further conduct a case study to evaluate our approach on a real-world policy, demonstrating its effectiveness in simplifying complex policies. Experiments show that our approach accurately matches data practice descriptions with policy excerpts, facilitating the presentation of simplified privacy information to users.

heading: 1 Introduction
text: Do internet users care about their online privacy? While studies have shown that users care about their privacy online (Spiekermann et al., 2001), they are also willing to give away their personal information (Barnes, 2006). Studies have found that this is often because, privacy policies, which are intended to inform users about what happens with their data online, are notoriously difficult to understand and time-consuming to read (Obar and Oeldorf-Hirsch, 2018). An average user needs to spend ∼200 hours to read all the policies that they come across each year (McDonald and Cranor, 2008). Moreover, privacy policies are written at a college reading level (Ermakova et al.), use complicated legal jargon and are hard to comprehend (Meiselwitz, 2013).
Some studies have attempted to ease the design of privacy policies (Schaub et al., 2015) to make them more comprehensible to users. Kelley et al. (2010) found that presenting privacy information visually in the form of a privacy nutrition label significantly improved the ability of users to find and
understand privacy information. While companies such as Apple and Google have incorporated a privacy label as a way to systematically present users with concise summaries of an app’s data practices, they often fail to answer important privacy questions (Zhang and Sadeh, 2023). Moreover, most organizations do not provide access to easy-to-read labels. Given that there are several issues related to conducting privacy policy research (Mhaidli et al., 2023), scaling the creation of such labels using NLP approaches is a non-trivial task.
We hence propose to automatically present users with information regarding their online privacy using data practice ratings (blocker/good/bad/neutral) and descriptions derived from the Terms of Service; Didn’t Read (ToS;DR) platform (Roy et al., 2012). We make the following contributions: • We manually analyze ToS;DR data descriptions, and cluster similar data practices together.1 • We create an approach to automatically match excerpts from policies to easily understandable data practice descriptions. • We design a privacy label to provide users with information regarding their data privacy at various levels of detail.
1https://github.com/mukundsrinath/PrivacyPolicyTOSDRACL
1 4567

heading: 2 Related Work
text: Various NLP methods have been employed to analyze privacy policies, yet none offer a holistic comprehension on data practices. Approaches centered on question answering (Ravichander et al., 2019; Ahmad et al., 2020), summarization (Zimmeck and Bellovin, 2014; Zaeem et al., 2018) and classification (Wilson et al., 2016; Nokhbeh Zaeem et al., 2022; Tesfay et al., 2018; Srinath et al., 2023a; Sundareswara et al., 2021) often lack comprehensive coverage of all data practices outlined in a policy (Nokhbeh Zaeem et al., 2020, 2022). Moreover, these techniques place the onus on users to identify their specific information needs (Srinath et al., 2021a, 2023b; Sundareswara et al.). Users also face the challenge of investing substantial time in deciphering the nuances of each encountered policy (Meier et al., 2020).
Our work builds upon the prior research that has leveraged ToS;DR data for various NLP tasks. While our primary focus is on document summarization and question answering, previous studies have explored the use of ToS;DR data (Maitra and Rudrapal, 2022) for tasks that involve risk assessment as an intermediate step. Keymanesh et al. (2020) employed ELMO embeddings for risk classification on ToS;DR data. Their findings provide valuable context for the risk-related aspects explored in our work. Additionally, Binns and Matthews (2014) examined the community structure of ToS;DR and highlighted the efficient flow of information.
Previous studies categorized internet users into five categories based on varying levels of privacy concern and online privacy-related behaviors (Kumaraguru and Cranor, 2005; Dupree et al., 2016). Given that each user category necessitates a different level of privacy information, there is a clear need for an approach that addresses this diversity. Our solution caters to this requirement.

heading: 3 Methodology

heading: 3.1 Dataset
text: Terms of Service; Didn’t read (ToS;DR) aims to make understanding privacy policies easier by crowdsourcing annotations on them (Roy et al., 2012). On the platform, internet users sign up to annotate policies by matching a policy excerpt to a pre-defined data practice (called a “case” on the platform). Once an annotator makes an excerptcase match, a ToS;DR moderator either accepts
the annotation or rejects it with comments. When a threshold percent of moderator approved caseexcerpt matches are annotated for a policy, it is given a letter grade.
ToS;DR comprises 130 privacy policy-related cases. A case on ToS;DR contains an average of 83 policy excerpts (min: 2; max: 83), each from a different service. Each excerpt has an average length of 32.26 words/excerpt. Some cases describe similar but contrasting data practices i.e. different approaches to handling the same data type. We deemed these as contrasting cases. Following is an example of two contrasting cases: ‘Your personal data is not sold’ ‘Your personal data is sold unless you opt out’ Two authors manually evaluated the cases in ToS;DR and grouped contrasting cases into 24 clusters (min: 2; max: 6 excerpts/cluster). We note that contrasting cases might often be a negation of one another, or might differ by describing a special circumstance of a general case, such as, ‘You can delete your content from this service’ ‘You cannot delete your content from this service’ ‘You cannot delete your content, but it makes sense for this service’ The remaining 67 cases had no contrasting data practices. We deemed these as standalone cases.
Based on whether cases preserve or erode user privacy, they are pre-labeled with one of the following rating categories: blocker, bad, neutral, or good. Of the 130 cases, 63 were rated good, 35 bad, 25 neutral, and 7 blockers. Figure 1 shows a snapshot from ToS;DR for the service YouTube containing YouTube’s assigned letter grade, selected cases, and their respective ratings (Blocker: Red; Bad: Yellow; Good: Green; Neutral: Grey). Ratings indicate respect towards user privacy, where ‘blockers’ often indicate practices that are aggressively adversarial towards user privacy, while those rated ‘good’ indicate privacy-preserving practices. ‘Bad’ and ‘neutral’ fall in the middle.

heading: 3.2 Privacy Rating Analysis
text: We further investigated each ToS;DR privacy category, blocker, bad, good, and neutral by calculating the perplexity of the excerpts associated with them. Figure 2 shows the average perplexity of excerpts calculated using RoBERTa (Liu et al., 2019), a general-purpose language model and PrivBERT (Srinath et al., 2021b), a language model pre-trained on privacy policy text. For comparison, we randomly sampled 1,000 sentences from the ten
2
most visited websites’ policies. We calculated the perplexity by masking each word in the sequence separately and exponentiating the average negative log-likelihood of size 8 sequences with a stride of 4.
From Figure 2, it is evident that PrivBERT exhibits notably reduced perplexity scores in comparison to RoBERTa, a phenomenon attributed to PrivBERT’s pretraining on policy text. We hypothesize that for PrivBERT (but not RoBERTa), text segments commonly encountered in privacy policies should yield lower perplexity scores, while those that are infrequent should result in higher perplexity scores. Figure 2 shows that ‘blockers’ have the highest sentence perplexity scores for both language models suggesting that they might be written in particularly convoluted language unusual even within privacy policies. Conversely, other categories exhibit closely aligned perplexity scores for RoBERTa, but distinct variations for PrivBERT, suggesting that the pretraining data may encompass text associated with each category at varying frequencies. Notably, ‘bad’ practices are the second most perplexing category for RoBERTa, yet the least perplexing for PrivBERT, signifying the frequent inclusion of ‘bad’ practices-related text in policies. Conversely, this trend is reversed for ‘good’ practices, indicating their relative rarity.

heading: 3.3 Experiments
text: In this section, we describe our approach to automatically match excerpts from privacy policies to their respective ToS;DR cases. Formally, given an excerpt from a privacy policy, Sj , the task is to find the case(s) Ci that represent the data practice described in the excerpt Sj . Here, C is the set of 130 ToS;DR cases; S is the set of excerpts from a privacy policy. This problem can be framed as
a multi-label classification task or a binary classification task. Preliminary experiments indicated that the multi-label classification was ineffective, due to a substantial imbalance in class distribution. Therefore, we choose a binary classification technique to train a model to distinguish between matching and disparate case-excerpt pairs. Given a case from ToS;DR, Ci, and an excerpt from a privacy policy, Sj , where,
C ∈ set of ToS;DR cases; S ∈ set of privacy policy excerpts,
the loss function is given by,
−y log(ŷ) + (1− y) log(1− ŷ) (1)
y = Match(Ci, Sj) (2)
Annotated case-excerpt pairs from ToS;DR serve as positive training samples. To collect negative samples, we use two sampling approaches, random sampling (RS) and cluster-based sampling (CBS). Random Sampling (RS): For each annotated ToS;DR case-excerpt pair, we randomly sample excerpts matched with other case to serve as a negative sample irrespective of it being a contrasting or standalone case. Cluster-Based Sampling (CBS): For each annotated case-excerpt pair, if the case is part of a cluster with contrasting cases, we first sample excerpts matched with other cases within the same cluster. We do this until we have either exhausted all possible unique negative samples2 or we have the required number of negative samples. When the number of negative samples is not satisfied, we sample from outside the cluster randomly. For standalone cases, we collect negative samples randomly
We trained separate models for each sampling technique and sampling ratio. We experiment with sampling 1x, 2x, 3x, and 5x number of negative samples as positive samples. We divided the data into train, validation, and test sets in the ratio 3:1:1. We keep the test and validation sets constant across different sampling ratios, with 1:1 sampling. To train the model, we input the concatenated case Ci and segment Sj separated by a special token to fine-tune PrivBERT, a privacy policy language model (Srinath et al., 2021b). We use a binary
2This can happen when only one of the cases in a cluster has a large number of positive samples
3
cross-entropy loss function to optimize the parameters and train the model using Adam optimizer (Kingma and Ba, 2014) with a learning rate of 1e-5 for 3 epochs.
We evaluate the trained model on test sets each containing policy excerpts previously unseen by the model. The standalone set and the contrasting set contain case-excerpt pairs from standalone cases contrasting cases respectively. We compare the performance of our model to several approaches listed in Table 2. 1) We use Sentence-BERT (Reimers and Gurevych, 2019) to vectorize policy excerpts and ToS;DR cases. We then calculate the cosine distance between each pair and identify a threshold similarity score (0.25) based on the validation set. 2) We prompt OpenAI’s GPT-4 to identify matching case-excerpt pairs 3) We enhance the GPT-4 prompt with two examples, one positive/negative case-excerpt pair 4) We train RoBERTa (Liu et al., 2019) recreating the experiments with PrivBERT and report the results on the best performing model.

heading: 4 Results
text: The results of PrivBERT trained on datasets created by random sampling (RS) and cluster-based sampling (CBS), for a 1:3 sampling ratio, is shown in Table 1. The results in the table are reported after taking the mean (max standard deviation: 0.05) on 3 runs with different random initial states and training sets shuffled. The 0 category refers to disparate case-excerpt pairs while 1 refers to matching pairs. The table shows that the results on the standalone set are superior to those on the contrasting case set across both sampling techniques. This is likely since contrasting cases are often lexically and semantically quite similar, and therefore a harder problem. We also see that cluster-based sampling performs significantly better than random sampling on the contrasting set while maintaining a similar performance on the standalone set. This is expected since a larger number of samples are
used to train the model to solve the harder problem of disambiguating between similar cases.
For the RS model, we saw that the results on the contrasting set improved with larger negative sampling ratios while the CBS model remained the same. This could indicate that a larger number of contrasting case training samples were necessary for the RS model. On the other hand, the results for both the models on the standalone set remained constant across different sampling ratios.
We achieve state-of-the-art results on this dataset, the performance of several other approaches is shown in Table 2. Finetuned RoBERTa-base is the second best-performing model, followed by the two-shot version of GPT-4. The performance improvement due to fine-tuning depicts the complexity of the task. Sentence-BERT performs well on case-excerpt pairs with significant lexical overlap.
Under real-world conditions, identifying all data practices within a privacy policy would involve testing whether an excerpt matches any case in the full set of ToS;DR cases. It is therefore important that the model be trained robustly on dissimilar pairs, supporting training on larger sampling ratios and providing high precision scores for negatives. Furthermore, the erroneous classification of a pair as a ‘match’ can be readily discerned and flagged,
4
thus facilitating the establishment of a feedback loop. Conversely, the misclassification of a pair as dissimilar may evade detection, reinforcing our argument for the necessity of robustly performing models on dissimilar pairs.

heading: 4.1 Case Study
text: We present a case study evaluating our model’s performance on a previously un-annotated policy. We chose Airbnb,3 a popular online marketplace, due to its popularity and its legitimate need to access sensitive personal user information. We split the policy based on new line characters, resulting in 150 segments encompassing paragraphs, section titles, and list items. Two authors of the paper thoroughly reviewed each segment and tagged them with any associated ToS;DR cases. Subsequently, we employed the best-performing CBS model to identify matching case-excerpt pairs. Table 3 shows that the model consistently identified true positives, while producing a few false positives, therefore leading to a high recall for matching caseexcerpt pairs. Most false positives were caused due to inaccurate predictions on privacy policy section titles. The model was able to identify true negatives with a high degree of accuracy while producing a few false negatives, leading to high precision scores for dissimilar case-excerpt pairs.
3https://www.airbnb.com/
In Figure 3, we demonstrate the tool that provides users with privacy information at varying levels of granularity. At the highest level, identified cases are summarized using a letter grade. At the next level, identified cases are listed under their rating categories. Finally, at the most fine-grained level policy excerpts associated with a case are listed along with a match probability score.

heading: 5 Conclusion
text: Our research introduces a novel solution to the challenge of simplifying complex privacy policies. We provide an automated approach to scale identification of data practices in privacy policies, providing users with information regarding their data privacy. By automating the process of aligning data practices with policy excerpts, we are taking a crucial step towards eliminating the need for users to laboriously parse through lengthy and intricate documents, ensuring that they receive precise and easily digestible information about their online privacy. This lowers the barrier for internet users to understand what is happening with their data online, thereby allowing them to make informed privacy decisions. While there is room for further refinements and research, our model presents a promising foundation for future advancements in the field of usable privacy, ultimately promoting greater user empowerment and security in the digital age.

heading: 6 Limitations
text: Here, we attempt to match ToS;DR cases to their corresponding privacy policy segments. While the dataset we create attempts to simulate real-world conditions through the hold-out set, we match segments that are preciously identified by annotators. It is therefore possible that there is some loss of performance in a real-world setting. We rectify this issue in our case study by applying our model on automatically segmented policies and find that the performance is still comparable with that of the hold-out set. However, it is possible that the results in the case study might not scale over all privacy policies.
We use the rating scheme developed by ToS;DR
5
which could potentially be biased. There is therefore a need for further research to understand user privacy preferences towards threshold for blocker, bad, good and neutral data practices. This extends to the assignment of letter grades.

heading: 7 Ethical Statement
text: Since the model we present in this paper is designed to help users make decisions about their privacy, model errors could have privacy consequences. Users may underestimate an organization’s data collection practices, unknowingly exposing themselves to risks, or conversely, overestimate the intrusiveness, leading them to forego services due to misplaced privacy concerns. Therefore, robust error mitigation strategies are crucial for real-world deployments of this model.

heading: 8 Acknowledgement
text: This material is based upon work supported by the National Science Foundation under Grant Nos. 2105736, 2105734, 2105745, and 2237574.

heading: A Appendix
text: A.1 Prompts Used for GPT-4 We used the OpenAI API GPT-4 models with a temperature setting of 0.
7
You are a privacy policy expert. Given a title and quote, your task is to evaluate whether the title represents the data practice described in the quote. Your output should only be either 0 (indicating the title does not represent the quote) or 1 (indicating the title represents the quote).
Example 1 Title: No third parties are involved in operating the service. Quote: Note that we don’t use any 3rd party website statistics tools like Google Analytics or similar. Output: 1
Example 2 Title: You can opt out of targeted advertising Quote: Our CDN is Cloudflare, and they may include cookies with our pages to provide a better service. Output: 0
Title: <title> Quote: <quote>
8

heading: Future Work
text: While there is room for further refinements and research, our model presents a promising foundation for future advancements in the field of usable privacy, ultimately promoting greater user empowerment and security in the digital age