P riva T 5: A Generative Language Model for Privacy Policies (2024)

Abstract: In the era of of digital privacy, users often neglect to read privacy policies due to their complexity. To bridge this gap, NLP models have emerged to assist in understanding privacy policies. While recent generative language models like BART and T5 have shown prowess in text generation and discriminative tasks being framed as generative ones, their application to privacy policy domain tasks remains unexplored. To address that, we introduce PrivaT5, a T5-based model that is further pre-trained on privacy policy text. We evaluate PrivaT5 over a diverse privacy policy related tasks and notice its superior performance over T5, showing the utility of continued domain-specific pre-training. Our results also highlight challenges faced by these generative models in complex structured output label space, especially in sequence tagging tasks, where they fall short compared to lighter encoder-only models.

## introduction privacy policies outline how companies collect, use, share and manage user data on their services or applications. they are governed by a framework of notice and choice in many jurisdictions @xcite , requiring website operators to post a notice about how they gather and process users' information. users then decide whether to accept or abstain from using the website or service. however, the effectiveness of this framework, even enshrined in regulations like gdpr, relies on users comprehending these policies, which is often not the case due to their length, legal complexity and reasoning over vagueness and ambiguity @xcite @xcite . moreover, the prevalence of data surveillance and misuse, exemplified by scandals involving companies like facebook and cambridge analytica 1 our pre-trained privat5 models are available at https: //github.com/tumlegaltech/privat5 . @xcite , underscores the critical nature of privacy concerns in the digital era. this scenario provides an ideal context for advancements in nlp to provide users with tools to understand policy content and address their privacy inquiries effectively. harnessing nlp advancements would benefit not only individuals but also assist companies in ensuring compliance and regulators in enforcing it across diverse software products and services @xcite . it's important to note that privacy policies stand apart from closely related domains, like legal texts @xcite which are tailored for domain experts. instead, privacy policies, as legal documents with legal implications, are generally composed by experts, yet intended to be comprehensible by everyday users. there have been significant research effort devoted to automate the analysis of privacy policies under usable privacy project @xcite . some works include identification of policy segments commenting on specific data practices @xcite , compliance analysis @xcite , extraction of opt-out choices @xcite ), text alignment @xcite , vague sentence detection @xcite , question answering (qa) @xcite @xcite , summarization @xcite , readability analysis @xcite and fine-grained structured information @xcite @xcite . earlier works focusing on privacy policies utilized extensive feature engineering @xcite @xcite , domain-specific word embeddings @xcite and with the rise of pre-trained models like bert, the pretrain-then-finetune approach has gained prominence @xcite @xcite . more-over, @xcite emphasized that further continuing the pre-training of language models on domain-specific corpora can further elevate model performance in tasks specific to that domain. this, coupled with the availability of extensive privacy policy corpora @xcite , has paved the way for developing privbert @xcite . this model excels in privacy language understanding tasks, as evidenced by its performance on constructed benchmarks designed in the privacy domain, such as pri-vacyglue @xcite and plue @xcite . more recently, there has been growing interest in generative language models, such as bart @xcite and t5 @xcite , due to their inherent effectiveness in natural language generation tasks like summarization, question answering, and simplification. these generative models enable a unified approach to both discriminative and generative tasks by framing various non-generative tasks in a text-to-text format. however, the privacy domain lacks dedicated generative models and the exploration of casting non-generative tasks into a generative format remains uncharted. to address this gap, we embark on pre-training t5 models on the privaseer corpus, resulting in various pri-vat5 variants across small (60m parameters), base (220m parameters) and large (770m parameters) sizes. we systematically evaluate the performance of both privat5 and t5 on a range of privacy policyrelated tasks to assess their capabilities along the axes of model size and pre-training corpus. our results demonstrate the impact of pre-training using domain related corpora on the downstream task performance while highlighting the challenges of generative models dealing with structured output in information extraction tasks. ## privacyt5 t5 is an encoder-decoder model initially pretrained in an unsupervised manner on the c4 corpus @xcite . this pre-training involves replacing 15% of the tokens with sentinel tokens in a denoising objective, with consecutive tokens marked for removal being replaced by a single sentinel token. the resulting corrupted text serves as input to the model to predict the masked-out tokens. then the model is further fine-tuned using supervised training on various downstream tasks, including those from the glue @xcite and superglue @xcite benchmarks, casting them into text-to-text format for training. to pre-train the privat5 models, we initialize the model with t5 foot_0 and continue pre-training with the privaseer corpus @xcite , which encompasses 1,005,380 privacy policies originating from 995,475 distinct web domains with prominent ones like .com, .org, and .net comprising significant proportions of the corpus at 63%, 5%, and 3%, respectively. we pre-train small (60m), base (220m) and large (770m) versions of t5 to obtain privat5 models of three sizes. detailed hyperparameters related to pre-training can be found in app. d. ## experiments we evaluate the models on the following privacy policy related downstream tasks. app. a and b describe dataset splits with their label space and illustrative instances respectively. opp115 @xcite consists of 3432 sentences from 115 online privacy policies annotated with one or more privacy practices from ten categories to aid compliance analysis, leading to a multi-label classification. pi-extract @xcite focuses on extracting token spans representing data-related entities such as collected, not collected, not shared, and shared, akin to named entity recognition. this dataset comprises 4064 sentences extracted from 30 privacy policy documents. notably, the entities of various types may overlap, leading to a token-level multi-label classification approach. policydetection @xcite includes 1301 documents focusing on binary classification, categorizing as either privacy policies related or not. policyie @xcite consists of 5250 sentences, each labelled with a privacy practice intent label (referred to as task ie-a), and the word spans annotated with a slot label (referred to as task ie-b) derived from 31 privacy policies of websites and mobile applications. ie-a has 5 intent classes and ie-b has 18 slot labels, categorized into 14 type-i slots for privacy practice participants and 4 type-ii slots for details like purposes and conditions. note that type-i and type-ii slot values in ie-b can overlap resulting into a joint multi-label classification, while ie-a is a multi-class classification task. privacyqa @xcite is comprised of 1750 questions related to the privacy policies of mobile applications. this task is framed as binary relevance prediction, where the objective is to determine whether a given sentence from a privacy policy is relevant to a specific question. policyqa @xcite ) contains 25,017 reading comprehension style questions curated from 115 website privacy policies. unlike priva-cyqa, which focuses on sentence-level answers from policy documents, policyqa adopts a setup similar to squad @xcite , where it requires a shorter text span as the answer given the corresponding policy document and question. @xcite consists of 24000 section body, title pairs from privacy policies where the task involves generating section title given the content of section. evaluation metrics we report macro-f1 for all the classification tasks such as opp115, policydetection, policyie-a, privacyqa. for pi-extract and policyie-b, we compute the macro-f1 scores for each entity obtained from token-level labels. for policyqa, we report the exact match which measures percentage of predictions that match any one of the ground truth answers exactly. for policy-summ, we report rouge-1,2 and l scores. implementation details we convert each of the task into text-to-text format where the model produces output in the form of text. the model is directly trained with a maximum likelihood objective using teacher forcing, regardless of the task, unifying the pre-training and fine-tuning objective. in case of multi-class/binary classification problem (such as policydetection, policyie-a, privacyqa), the output label is verbalized into text format (such as 'policy' and 'not a policy' in case of policy-detection). in case of multi-label classification (such as opp115), we verbalize the class labels into texts and concatenate the multiple labels using a delimiter. for sequence tagging (ner kind of task such as policyie-b and pi-extract), we use 'sentinel + tag' strategy described in @xcite , where the sentinel @xmath0, < @xmath1. for privacyqa and policysumm, we allow the model to generate the free-form text. text-to-text transformations on illustrative examples are provided in appendix c. we assess models performance on each of the task independently, referred to as single task learning (stl), by initializing with {t5/privat5}-{small/base/large} version and fine-tuning it on the task-specific training data. further, we also assess the multi task learning (mtl) ability, by jointly training on all the datasets. to specify which task the model should perform, we add a taskspecific (text) prefix to the original input sequence before feeding it to the model. to handle the im-balance between tasks in mtl, we use exponential sampling of each task sampling rates. fine-tuning hyperparameters can be found in appendix e. ## conclusion in this study, we introduce privat5, a t5-based transformer model designed for privacy policy text across various scales: small (60m), base (220m), and large (770m). privat5 is obtained by further pre-training t5 on privaseer corpus of contemporary website privacy policies. we demonstrate that domain-specific pre-trained privat5 models outperform general t5 models on different privacy policy related tasks. further, we notice that these generative models struggle to handle structured output spaces in case of sequence tagging tasks, indicating a potential avenue for future exploration.