Extending Off-the-shelf NER Systems to Personal Information Detection in Dialogues with a Virtual Agent: Findings from a Real-Life Use Case (2024)

Abstract: We present the findings and results of our pseudonymisation system, which has been developed for a real-life use-case involving users and an informative chatbot in the context of the COVID-19 pandemic. Message exchanges between the two involve the former group providing information about themselves and their residential area, which could easily allow for their re-identification. We create a modular pipeline to detect PIIs and perform basic deidentification such that the data can be stored while mitigating any privacy concerns. The use-case presents several challenging aspects, the most difficult of which is the logistic challenge of not being able to directly view or access the data due to the very privacy issues we aim to resolve. Nevertheless, our system achieves a high recall of 0.99, correctly identifying almost all instances of personal data. However, this comes at the expense of precision, which only reaches 0.64. We describe the sensitive information identification in detail, explaining the design principles behind our decisions. We additionally highlight the particular challenges we’ve encountered.

## introduction and context with current advances in nlp relying on datahungry machine learning systems and even more data-hungry language models, user-generated data is becoming increasingly important: data from conversations with chatbots, crawls of internet forums, posts on social media, etc can and are often used to train deep learning systems. at the same time, respecting user privacy is critical. the general data protection regulation (gdpr) came into effect as of the 25th of may 2018, affecting any data identifying or allowing the identification of a natural person. for instance, in the previous examples of user-generated data, identifiable data could take the form of a username, a full name, or an address, among others @xcite . at its core, the aim of the gdpr is to bring eu data protection legislation in line with the new ways that personal data is now being used by giving users more control over the ways their data is bring processed. one of the implications of the gdpr is for there to be no way to trace data back to a specific individual or a group thereof. as a result, anononimized data is exempt of gdpr requirements. in turn, much effort has gone into perfecting anonymization and pseudonymisation techniques to allow nlp practitioners to work directly with user-generated data. however, each domain presents its own unique challenges. in this paper we tackle anonymization in user-generated messages with a virtual chatbot. text originating from this domain presents the same characteristics as other instances noisy user-generated text; we encounter different types of text, with some of the messages being characterised with non-standard spelling, use of slang, etc, while others are written in a formal register @xcite . furthermore, information is exchanged between the user and the virtual agent in a dialog fashion, such that it is possible for no individual message to allow the identification of the user, but the conversation, taken as a whole, could. in this paper we describe findings from our particular real-life scenario of automatically identifying piis in user-generated data from conversations involving a virtual agent serving as an informative tool while not being able to directly access the data. users adhering to the contemplated use-case could use the virtual assistant to make inquiries regarding covid restrictions in their area of residence. such exchanges are a perfect example of personal information that can be used to identify an individual based on their location. as stated, different domains present different challenges for anonymization. with this in mind, we design a flexible and modular pipeline 1 to anonymize gdpr protected text by allowing for different components that perform sensitive data identification and subsequent deidentification. we describe our experimental setup and methods used, and highlight particularly difficult aspects of working on real-life user-generated data in both spanish and catalan that we could not directly access. ## literature review the task of pseudonymisation is generally considered to be complex given that based on context, one can re-identify pseudonymised information and the. these difficulties can be in turn modulated by each domain's characteristics. up until recently, most techniques were applied in either medical or legal domains, which were considered to be sensitive domains well before the gdpr @xcite @xcite . methods typically vary between applications; generally speaking, pseudonymisation occurs in at least two steps: the first step is identifying personal information, where most of the our efforts in this paper are centered. most methods that are applied to highly regular data rely on simple regular expressions, whereas less structured information requires more sophisticated named entity recognition (ner) systems based on machine learning. deidentification can vary more in terms of applicable methods, and is more dependent on the properties of the source text. that is to say, there are different methods that are more of less preferable depending on the use case @xcite . typically methods involve substituting sensitive information with a random sequence, a label, or a random entity of the same or similar type. nevertheless, @xcite posit that the need for robust anonymization is being extended to other domains, due to the gdpr affecting other sources of data, which has made the task of automatic text pseudonymisation more relevant than ever. to that end they develop a machine learningbased toolkit to perform automatic pseudonymisation in human-computer dialogue while taking into account information that could potentially identify persons (piis) but also corporations (ciis). ## results we present our results in in spite of not being able to directly access the data, however, we observe a much stronger difference in precision based on the way we choose to aggregate the data; by aggregating the data by conversation we observe major improvements, which are more representative of actual pii detection performance. that is to say, by assigning a single label to each conversation based on whether a correct detection of piis was carried out, we attain much better precision. we observe these effects in both rounds where we collected several messages from the same conversation (rounds 2 and 3). our findings are in line with those of @xcite . while we are able to achieve high recall with models trained on out-ofdomain data, we do observe that performance is not optimal, given the relatively low precision of the roberta models. that said, we have been able to determine that the low performance is largely due to the overrepresentation of noisy input in the data, which essentially interacts with the imperfect robustness of our model in this context, contributing to the deflation of the aforementioned metric. we have more or less mitigated this issue so that the results more accurately reflect model performance, but we also highlight that if the ner models were more robust to the noise in the input, the number of false positives would be drastically lower. @xcite and tild given the high recall of our system, we consider that we fulfill the first item of the criteria presented in tild (technical performance) and @xcite , which is to ensure that the data does not contain piis. however, we do note the low precision of our system may negatively impact information loss, as obscuring more data than necessary may render the data less useful. on the other hand, tagging more entities than necessary as piis and their subsequent anonymization (via redaction or substitution) is more likely to make deanonymization much more difficult. in light of this, we argue that depending on use, the system we present in this paper could be more than adequate. ## conclusion and future work in conclusion, we present the results and findings from a real life use-case where we have had to develop a pii detection system to pseudonymise exchanges between users and a virtual agent. we demonstrate the effectiveness of our system and the issues that can arise when extending a ner system beyond its original domain. we highlight the specific problems we have encountered with usergenerated data. we additionally note that given the differences between the domains of training and deployment, our system performs well, achieving very high recall. we argue that the inter-domain differences may be detrimental to performance in general, pii detection can be achieved with robust off-the-shelf ner models, given that our system managed to detect almost all instances of pii. while the performance of our system is more than adequate given the circumstances, anonymisation and pseudonymisation are tasks that are gaining more and more urgency and importance. in light of this we consider it of critical importance to develop more resources for domain-specific and domain-general pseudonymisation. the focus of this paper has been examining the effectiveness of adapting off-the-shelf ner systems to the task of pii detection. our future work should aim to address explore robust ways of deidentifying the data in accordance with the established literature @xcite .