Privacy-Preserving Sentiment Analysis: Using Differentially Private LSTMs
摘要
Analyzing the feelings behind text is an important aspect of Natural Language Processing (NLP). It can be applied to social media text to study customer sentiments. At the same time, user-generated text provided can cause privacy issues when sensitive information gets exposed during model training. To overcome this problem, we describe a framework for sentiment analysis that allows for Differential Privacy (DP) with Long Short-Term Memory (LSTM) networks. Our system erases parts of the model that learn highly sensitive information without significantly reducing the usefulness of the model. Here, we construct and analyze the performance using two models: a standard LSTM network and an LSTM with differential privacy (DP-LSTM). In measuring the efficiency of the components, the basic model works as a standard. The DP-LSTM employs a fine-tuned Adam optimizer designed for DP, which is ensured by introducing noise to the gradients during training. For the sentiment analysis task, we select the IMDb movie review dataset. In our conducted studies, we measure the cost of accuracy in a system for privacy using ( \(\epsilon \) , \(\delta \) ) as indicators. The influence of certain hyperparameters, such as the noise multiplier, the model’s training batch size, and the number of epochs for which the model trains, is also evaluated.