End-to-End triplet loss based fine-tuning for network embedding in effective PII detection
Rishika Kohli, Shaifu Gupta, Manoj Singh Gaur · 2025
Read End-to-End triplet loss based fine-tuning for network embedding in effective PII detection by Rishika Kohli, Shaifu Gupta, Manoj Singh Gaur (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2502-09002.txt.
Introduction
Rishika Kohli, Shaifu Gupta, and Manoj Gaur present a 2025 paper on spotting personal data leaks from phones. Apps send network traffic that can carry private data out. Past tools hand-picked features from web requests to train a classifier. Deep learning can learn those patterns on its own, with no manual feature step. The team builds an end-to-end system on that idea.
A pre-trained language model and an autoencoder turn each packet into a compact vector. A triplet-loss tuning step then sharpens the model, so leaks and safe packets sit far apart. Two real-world data sets were used for tests. The authors compare their system with leading past works on leak detection. The goal is stronger privacy guards for mobile users.
Catalog record
| CREATOR | Rishika Kohli, Shaifu Gupta, Manoj Singh Gaur |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 57 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2502-09002
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
End-to-End triplet loss based fine-tuning for network embedding in effective PII detection Rishika Kohli, Shaifu Gupta, Manoj Singh Gaur Abstract There are many approaches in mobile data ecosystem that inspect network traffic generated by applications running on user’s device to detect personal data exfiltration from the user’s device. State-of-the-art methods rely on features extracted from HTTP requests and in this context, machine learning involves training classifiers on these features and making predictions using labelled packet traces. However, most of these methods include external feature selection before model training. Deep learning, on the other hand, typically does not require such techniques, as it can autonomously learn and identify patterns in the data without external feature extraction or selection algorithms. In this article, we propose a novel deep learning based end-to-end learning framework for prediction of exposure of personally identifiable information (PII) in mobile packets. The framework employs a pre-trained large language model (LLM) and an autoencoder to generate embedding of network packets and then uses a triplet-loss based fine-tuning method to train the model, increasing detection effectiveness using two real-world datasets. We compare our proposed detection framework with other state-of-the-art works in detecting PII leaks from user’s device. I Introduction As of January 2024, the Google Play Store reached a whopping 2.43 million apps, having crossed the 1 million mark in July 2013 [ 1 ] . With such a huge number of mobile apps available, each having different levels of security and privacy, it’s crucial for users to know which apps they are using that leak their personal data. Some apps could (un)intentionally share users’ personal data, making them vulnerable to social engineering attacks where individuals are manipulated into revealing valuable and sensitive information to cyber-criminals. Therefore, detection of personal data exfiltration from the user’s device, respecting user’s privacy becomes important. In this regard, India passed Digital Personal Data Protection Act [ 2 ] in 2023, which lays guidelines on the usage of personal data in a way that respects people’s right to keep their information private. There are many approaches such as static analysis [ 3 , 4 , 5 , 6 , 7 ] , dynamic taint based [ 8 ] , and dynamic network based [ 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 ] analysis that can be used to analyze the network traffic of mobile devices in an efficient and secure manner. In this paper, our focus is on dynamic network based approaches that inspect packets transmitted out of mobile devices so as to detect PII. This information can then be used to make user’s aware of their outgoing sensitive data and take actions such as blocking these outgoing requests. Prediction of PII using machine learning (ML) techniques, is formulated as a binary classification problem. Different methods have been explored for predicting PII from mobile traffic. For instance, as discussed in [ 9 ] , features are extracted from HTTP requests using bag-of-words (BOW) model. Certain heuristics using term frequency inverse document frequency (tf-idf) are then employed on those features to identify relevant features. Per-domain-per-OS based classifiers are trained on these features and predictions are made using labeled packet traces obtained through manual or automatic mobile app testing or crowd-sourcing. Further, [ 13 ] used filtering techniques on features such as removing duplicate features, removing encoded features not pointing to any meaningful information or not pertaining to any PII, clubbing features based on linguistic similarities, and removing very long and short features. Then authors used decision tree and neural network for classification on these filtered features. To best of our knowledge it is seen that existing methods include external feature selection before model training. Deep Learning (DL), on the other hand, typically does not require such techniques, as it can autonomously learn and identify patterns in the dataset without external feature extraction or selection algorithms. However, the use of DL algorithms to detect PII exfiltration from network flows remains largely unexplored. The work in this paper is divided into two broad stages. In the first stage, we identify whether PII is leaked from any app. This is formulated as a binary classification problem where we propose an end-to-end framework to process network flows from smartphones that are represented in tabular format and then pass the processed dataset to the classifier for detection. Here, Multilayer Perceptron (MLP) remains our classifier for the detection of exfiltration. The framework employs a triplet-loss based fine-tuning method to train the model, increasing detection effectiveness. In the second stage, type of PII leaked is identified by formulating multi-label classification problem based on the best architecture for binary label classification. We also propose to evaluate our framework using k-fold cross-validation technique, to demonstrate the effectiveness for both binary classification and PII type prediction tasks. We use two publicly available datasets, ReCon [ 9 ] and AntShield [ 11 ] , to compare the performance of our detection framework. The key contributions of this paper are: 1. We propose the use of large language model accompanied by autoencoder for generating network embeddings to detect PII leaks from network flows of mobile phone applications. 2. We propose the use of FT-transformer architecture [ 17 ] from state-of-the-art work for our objective of PII detection. 3. We conduct extensive analysis of the proposed framework on two real-world datasets to validate its performance. The rest of the paper is organized as follows. Section II covers related work in this area and Section III describes preliminaries. Section IV presents our problem and methodology for building detection framework. Section V describes the dataset used for study and covers various experiments done in this work. Section VI concludes the paper with future work. TABLE I: Comparison of existing PII detection methods 1 1 footnotemark: 1 Ref. Category P / NP 1 1 footnotemark: 1 F.S. 2 2 footnotemark: 2 Classifier / Technique Evaluation metric LeakMiner [ 7 ] Static - - Taint propagation Accuracy, Analysis time. Liu et al. [ 3 ] Static NP ✓ SVM Precision, Recall AndroidLeaks [ 4 ] Static - - Taint analysis - FlowDroid [ 5 ] Static - - Taint analysis Precision, recall TaintDroid [ 8 ] Dynamic taint - - Taint analysis Operation and IPC time ReCon [ 9 ] Dynamic network NP ✓ Per-domain-per-OS DT Correctly classified rate, Area under the curve AntShield [ 10 ] Dynamic network NP ✓ per-app and single DT Accuracy, Precision, Recall, F-measure, specificity Kohli et al. [ 11 ] , [ 13 ] Dynamic network NP + P ✓ DT, NN, XAI Accuracy, Training time MobiPurpose [ 14 ] Dynamic network NP + P ✓ SVM, Maximum Entropy, DT models for each data type Accuracy, Precision, Recall and F1-score Bakopoulou et al. [ 15 ] Dynamic network NP ✓ Federated SVM F1 score Pan et al. [ 18 ] Static+dynamic network - - MediaExtract [ 19 ] tool and manual investigation Manual checking for media content. Song et al. [ 16 ] Dynamic network - - Manual analysis and then derive plugins filter for string matching Output of [ 8 ] as ground-truth and performance evaluation on network performance and battery consumption. Srivastava et al. [ 20 ]