: Identifying Rogue Behavior from App Reviews

Vaibhav Garg,
Hui Guo,
Nirav Ajmeri,
Saikath Bhattarcharya,
Munindar P. Singh

An app user can access information of other users or third parties.
We define rogue mobile apps as those that enable a user (abuser) to access information of another user or third party (victim), in a way that violates the victim's privacy expectations. Such apps are dual-use and their identification is nontrivial. We propose
, an approach for identifying rogue apps based on their reviews, posted by victims, abusers, and others.
involves training on deep learning features extracted from their 1884 manually labeled reviews.
first identifies how alarming a review is with respect to rogue behavior and, second, generates a rogue score for an app. predicts 100 rogue apps from a seed dataset curated following a previous study. Also, examines apps in other datasets of scraped reviews, and predicts an additional 139 rogue apps. On labeled ground truth, achieves the highest recall, and outperforms baseline approaches that leverage app descriptions and reviews. A qualitative analysis of alarming reviews reveals rogue functionalities. App users, platforms, and developers should be aware of such apps and their functionalities and take measures to curb privacy risk.

§ INTRODUCTION

With the expansion of mobile technologies, privacy threats arise not only from malicious or careless app developers, but also from app users. The privacy expectations of an app user or a third party (i.e., a victim) are violated when the victim (1) doesn't know about another user (i.e., an abuser) accessing the victim's information (spying) or (2) may know about the access, but is uncomfortable with it. The latter case includes incidents of forced consent or when public information on apps (such as a dating platforms) is accessed beyond the victim's level of comfort, such as profile stalking. We use term rogue behavior to mean these two types of information access, and use rogue apps to mean the apps that enable rogue behavior.

Research <cit.> shows that rogue apps may cause discomfort, fear, and potential harm to the victim. Possible ways to prevent this risk include highlighting these apps and their rogue functionalities to users, warning app distribution platforms, and informing app developers.
All these actions rely upon identifying rogue apps and their functionalities.
Our proposed approach, , shows how to do so.

Previous studies <cit.> focus only on the access performed without the victim's knowledge, but do not consider cases when the victim is uncomfortable of the access (of public information) even if aware of it. Chatterjee <cit.> use app descriptions to identify intimate partner surveillance (IPS) apps (subset of rogue apps), the apps that someone can use to spy on his or her intimate partner (spouse, boyfriend, or girlfriend). Such IPS apps are dual-use apps, that have a legitimate purpose but are misused for spying.
This concept of dual-use apps also applies to the general setting of rogue apps. Since app descriptions of rogue apps indicate only intended legitimate behavior, app descriptions may not be suitable for identify all misuses. We leverage app reviews to identify all misuses of such apps.
We observe that the reviews of an app describe rogue functionalities, its misuse (potential and actual), and the privacy expectations of users. Such reviews are evidence of rogue behavior and should be brought to the attention of users, developers, and app platforms.

Example <ref> shows three reviews (edited for grammar), taken from the Apple's App Store <cit.>, and are relevant to the rogue behavior. Although our study is based on Apple App Store's reviews, can be applied on reviews from other sources, including Google's Play Store <cit.>.

[box:rogue-behavior-relevant]Cases Relevant to Rogue Behavior

Fly on the wall!

(for the AirBeam Video Surveillance app <cit.>)

“with this app, i can spy on my family without them knowing it! it's such an awesome app!”

This app basically ruined my family to an extent

(for the Life360 app <cit.>)

“My mother made everyone in the family get this app. She freaks out when the app doesn't do its job because of random obstacles that mess with the location accuracy. Drains the battery and makes my parents paranoid to know where I am at all times. I don't even do any bad stuff, yet years of trust building are being swept away by the ability to spy on the children of a household. If you're a parent I highly recommend you don't get this app because it is extremely uncomfortable to have and it makes parents trust their children less.”

(for the 3Fun: Threesome & Swingers app <cit.>)

“…A lot of the local people I’ve talked to
(Male half of a couple) have been guys who are saying they’re part of a couple, and in all reality are single guys just looking to collect pictures. There is no way to report that that is why you are reporting them. It’s just a boilerplate report feature. I feel there should be a way for the 3Fun community to point out people for bad behavior like this.”

In Example <ref>, the first review for AirBeam Video <cit.>, addresses the scenario where the app assists a user to access a victim's information without the victim's knowledge. AirBeam Video is a surveillance app to be installed on the abuser's device.
Hence, the victim may not be an app user but a third party.
The second review, for Life360 <cit.>, complains about the problem of inappropriate access of user's location by the user's mother.
Due to the unequal power dynamics between the victim (reviewer in this case) and the abuser (mother in this case), the victim is forced to install apps that violate privacy.
The third review, from 3Fun <cit.>, describes the story of improper access of profile pictures.
Even though the profile pictures are public, the victim
is uncomfortable with the access.
It is common for users to upload such information (pictures in this case) on an app.
When doing so, they hold expectations of how other users would access it.
Information access, as shown in these three, cases may lead to discomfort, fear, or potential harm <cit.>. Thus, despite such cases of information access being common, they should be brought in front of app developers and platforms. However, app descriptions don't reveal possibility of a user (victim) to be uncomfortable of such access.

To address victims' privacy expectations, we propose the following research questions:

RQidentify. How can we identify rogue apps from reviews?

RQfunctionality. How can we uncover rogue functionalities?

Section <ref>
To address RQidentify,
we propose , an approach that is trained on the deep learning features extracted from 1884 app reviews. includes three phases (described in Section <ref>).
First, it assigns an alarmingness score to each review. The alarmingness score is used to rate and rank each review according to the claims and severity of rogue behavior.
Second, identifies rogue apps, based on a rogue score, computed by aggregating the alarmingness scores of an app's reviews. The rogue score ranks each identified app, according to the rogue behavior reported in app reviews. Such ranking can be useful for app distribution platforms, such as Apple App Store <cit.> and Google Play Store <cit.>, to prioritize the scrutiny of identified apps.
Third, identifies additional rogue apps, by examining apps in the other datasets. To evaluate the performance of , we report its precision, recall, and F1 score in identifying rogue apps.

To address RQfunctionality, we leverage reviews with the top 10 alarmingness scores and manually analyze them to find their rogue functionalities. We further installed a few rogue apps on an iOS device to verify reported rogue functionalities and include our findings in Section <ref>. We contacted Apple App Store <cit.>. We shared with them the list of identified rogue apps, along with reviews containing evidence against each app. They told us they will investigate the rogue apps and reach out to developers to rectify apps.

Our work's novelty lies in leveraging app reviews to identify rogue apps and their rogue functionalities. We introduce assigning alarmingness scores to reviews and rogue scores to apps, based on the reported rogue behavior. We contribute to mobile app security by providing:

* , an app reviews based approach for identifying rogue apps and their functionalities.

* A ranked list of rogue apps along with their alarming reviews revealing rogue behavior.

The rest of this paper is organized as follows.
Section <ref> describes our preliminary investigation that shows that app reviews contain evidence of rogue behavior.
Section <ref> describes our proposed approach to identify rogue apps, along with its evaluation. Section <ref> shows the procedure to uncover rogue functionalities of rogue apps. Section <ref> lists related work on information access in mobile apps. Section <ref> concludes this paper.

§ APP REVIEWS REVEAL ROGUE BEHAVIOR

We now describe rogue behavior reported in app reviews.

§.§ Seed Dataset

Chatterjee <cit.> identify 2707 iOS apps as potentially IPS. Out of these apps, they confirm 414 apps to be IPS, using semi-supervised pruning.

When we collected our data, 724 of Chatterjee 's 2707 apps (including 125 IPS) were already removed from the Apple App Store <cit.>, meaning only 1983 were available.
Of these 1983 apps, 1687 received at least one review from 2008-07-10 to 2020-01-30, yielding 11.57 million reviews in all. Only 210 of these 1687 apps were on Chatterjee 's IPS list.
Table <ref> describes our seed dataset, which comprises these 1687 apps and their 11.57 million reviews.

Details of our seed dataset.

App Type     Apps     Apps w/ Reviews     Reviews

Removed     724     –      –

IPS apps     289     210     190584

Other apps     1694     1477     11381377

Total     2707     1687     11571961

§.§ Investigating Reviews

Since the seed dataset contains 11.57 million reviews, it is impractical to manually check each review for rogue behavior. Hence, we sampled app reviews containing at least one keyword related to rogue behavior. To form a set of such keywords, we initialized a set
with the words: spy, stalk, and stealth. We queried WordNet <cit.> for synonyms of these words. We performed the query operation until we didn't find any new word in the set. The resulting set contained keywords: spy, stalk, stealth,  descry, chaff, and haunt. However, we didn't consider chaff and haunt to be relevant for describing rogue behavior in reviews. Also, descry is present in only two reviews, both of which are irrelevant for rogue behavior. To expand the set of keywords, we explored other corpora such as PyDictionary <cit.> and Thesaurus <cit.> but did not find synonyms that are widely used in app reviews. Moreover, keywords used in the previous study <cit.>, such as track and control bring many false positive reviews. For example, “I like tracking my distance when I walk with my dog.” and “…you can also control the audio of your mac through the app …I can control music tracks without having to touch the computer.” are not relevant. Thus, our relevant set of keywords reverts to spy, stalk, and stealth. Table <ref> shows the occurrence of each keyword, in reviews of the seed dataset. We refer to this set as our keywords.

There are 5287 reviews containing at least one of our keywords. From these 5287 reviews, we randomly sampled 995 reviews for manual scrutiny.
This sample involves 179 apps with between 1 and 237 reviews each.

Occurrence of each keyword.

Keyword     Review Count

Spy     2479

Stalk     2605

Stealth     218

Total Unique      5287

The first author manually checked 995 reviews for rogue behavior. Out of 995 reviews, we found 402 reviews (of 83 apps in this sample) reporting rogue behavior.
Our manual analysis categorize these 402 reviews along the dimensions of story and reviewer. Based on rogue story, we observe reviews of following two types:

Rogue Act: Reviews describing someone performing a rogue behavior. In such reviews, the reviewer is sure about the app's rogue functionality.

Rogue Potential: Reviews express the possibility of rogue behavior. The reviewer may not be sure of rogue functionality, but identifies risks with the app.

Example <ref> shows a review for each type of rogue story.
[box:roguestories]Types of Rogue Stories

Rogue Act

“This is a really good app if u want to spy on your spouse I found out my boyfriend was cheating on me great app I recommend this app”

Rogue Potential

“…May work well to spy on the kids by `accidentally' leaving iPhone in secret place.”

We also found three types of reviewers writing rogue stories.
First, reviewers who are victims: they state their concerns and grievances, including frustration at the loss of privacy. Second, reviewers who are abusers: they admit to the rogue behavior and sometimes express their delight in it. Third, reviewers are third persons: they report on others misusing the app or the potential to misuse. Example <ref> shows a review for each type of reviewer.

[box:reviewer-identity]Categories Based on Reviewer

“I hate this app so much! My mother is always questioning me and if I delete it she will ground me …No one want their parents to stalk them!!”

“I can spy on my child whenever i want its amazing he cant go anywhere without me knowing look.”

Third Person

“…I don't feel like parents should track their kids AT ALL. everyone needs a little something called trust and if you don't have it then your kids will act out and have to become sneaky. This app is designed to track families and see everything just like the parent is with you at all times. I do have this app but only with my fiends and we don't stalk each-other we just use it to see where everyone's at. And Bc we are so close and we all wanted it we all got it.”

Table <ref> shows the count of stories for each type of reviewer. The third person writes most of the potential reviews (44 out of 47) because such cases are only possibilities and not acts, meaning the reviewer is neither a victim nor an abuser. Whereas, abusers write other three potential cases. Such reviews (by abusers) indicate possible threats with the reviewed app, but suggest other apps for better rogue functionalities. For rogue act reviews, we found abusers (219) and victims (120) writing a majority of stories, followed by third person (16).

Count of stories for each reviewer type.

Reviewer     Rogue Act     Rogue Potential
Victim    120     0

Abuser     219     3

Third Person     16     44

To sum up, reviews describe apps' rogue behavior and show how victims such as children, parents, and friends are abused.

§ THE APPROACH

consists of three phases.
First, predicts the alarmingness score of each app review (Section <ref>).
Second, generates a rogue score for each app based on the alarmingness of its reviews.
We selected a threshold on rogue score, above which apps are predicted as rogue (Section <ref>).
Third, finds additional rogue apps by examining apps in other datasets of scraped reviews (Section <ref>).
Figure <ref> shows an overview of the approach. We envision to be incrementally updated by adding alarming reviews, of newly found rogue apps. Moreover, apps that don't have reviews yet, will be identified rogue, when their new reviews arrive.

Overview of approach.

§.§ Computing Alarmingness of Reviews

Section <ref> shows that app reviews reveal evidence of rogue behavior. However, identifying evidence in reviews is nontrivial, especially when an app receives a large number of reviews. Instead of binary classification of reviews, we introduce the alarmingness score that not only identifies relevant reviews but also ranks them based on the rogue behavior.
To assess alarmingness of a review, we consider two factors: (i) the review's convincingness about rogue behavior and (ii) the
severity of the reported rogue behavior. The alarmingness score of a review is the geometric mean of its convincingness and severity scores.

Reviews can vary in their claims about the rogue behavior. Some reviews report detailed rogue behavior, whereas some others are merely suspicion. The convincingness score measures how convincing the app review is in describing the rogue behavior. In Example <ref>, the first review is unrelated to rogue behavior and hence is not convincing. The second review describes the reviewer's suspicion on the app, which may or may not be true (slightly convincing). The third review (by an abuser) confirms the rogue behavior but lacks details of the rogue functionalities or victims. On the contrary, other reviews (in Example <ref>) are extremely convincing because they confirm rogue behavior along with mentioning the location feature, or how to set up devices, or the victims being stalked. Extremely convincing reviews include cases when the app is used for positive purposes (tracking family members or pets for safety) but has the potential to be misused in future. The reviews that are slightly, moderately, or extremely convincing are relevant to identifying rogue behavior. Assigning a convincingness score helps in ranking these reviews according to the strength of their claims.

The severity score measures the effect of rogue behavior on the victim. Example <ref> shows range of reviews varying in severity. The first review is unrelated to rogue behavior. Thus, it is not severe. The second review shows that the rogue act is performed with consent, making this review a slightly severe case. The third review is written by the abuser and lacks the victim's perspective to analyze rogue effect. We assume such acts are performed without consent and consider them moderately severe. The fourth review describes the victim's misery. The victim even says “This app has truthfully ruined my teenage years” in the review, which gives solid evidence to be an extremely severe case. Moreover, in the fifth review, the victim complains that others can see when he was last active (also known as last seen information). This is the public information on each profile, but still the victim is uncomfortable with the access. App developers should be aware of such users' privacy expectations. However, such cases are still missed by the existing studies <cit.>. Since app reviews discuss privacy expectations, we are able to identify such cases and rate them extremely severe.

[box:convincingexample]Varying Degree of Convincingness

1: Not Convincing

“It is such a great game, love it so much!”

2: Slightly Convincing

“Setup was a breeze. Quicktime 7 pro found it easily. Unfortunately, resolution seems much, much, lower than hoped.  Video size can not be adjusted live. Hate to be a hater. May work well to spy on the kids by `accidentally' leaving iPhone in secret place.”

3: Moderately Convincing

“This app is perfect for stalking people…”

4: Extremely Convincing

“This app is awesome for our family to keep track of where everyone is at all times! (You can turn the location off too in case you want to be in stealth mode when buying Christmas presents too.) …Even our dog knows that the alert sound when a family member arrives home means …”

“…I use it to spy on my dogs while I'm at work; so I use it for fun, nothing fancy. My iPad is my camera, and my iPhone is my viewer. …”

“bro this app is high key creepy. when i'm with my dad on his days my mom even mentions how she knew everything i was doing and it even made my dad creeped out. if you need this app then ngl yo wack. i don't want my mom stalking me.”

[box:severityexamples]Varying Degree of Severity

1: Not Severe

“Love the graphics so far it is a great game”

2: Slightly Severe

“I love this app, just great because you can time your day accordingly, I like my girlfriend knowing where I am and I love stalking her, we have fun with it.…”

3: Moderately Severe

“This app is perfect for stalking people…”

4: Extremely Severe

“honestly if you want your kid to rebel against you even more, this is the app for you! This app has truthfully ruined my teenage years all because my mother now has a way of tracking me down 24/7. I couldn't do the normal teenage things because I was being stalked all day …”

“…i want to share my last seen just to my family and my girlfriend not others. please add new feature in privacy that i can share my last seen to no body except my family and girl friend
thanks soo much !”

We first rate the convincingness and severity of rogue behavior reported in the app reviews (Section <ref>).
We then extract deep learning features from the reviews (Section <ref>).
Leveraging the annotated set and extracted features, we evaluate various regression models and choose the best one (Section <ref>).
Finally, we calculate the alarmingness score of an app review as the geometric mean of its predicted convincingness and severity scores.

§.§.§ Review Annotation

We selected 1884 reviews from the seed dataset: 952 (set s1) that contain at least one of our keywords and 932 reviews (set s2) that do not contain any of those keywords. While preparing this annotation data, we exclude the reviewers' identifiers such as their usernames. Each selected review is rated for convincingness and severity on a four-point Likert scale (1: not, 2: slightly, 3: moderately, 4: extremely).
For quality of annotations, we measure Inter Rater Reliability (IRR) via Intraclass Correlation Coefficient (ICC) <cit.>. ICC is suitable for Likert scale ratings. Unlike other IRR measures such as Cohen's <cit.> kappa, which are based on (all or nothing) agreement, ICC takes into account the magnitude of agreement (or disagreement) to compute IRR.

The annotation was conducted in three steps. First, two authors of this paper rated 599 of 1884 selected reviews according to the initial set of annotation instructions. The initial instructions included definitions (of convincingness and severity scores) and examples corresponding to each point on the likert scale.
In this step, for each annotator, we calculated the alarmingness scores of reviews using the convincingness and severity ratings. If the alarmingness scores computed for both the annotators were not at least three (median value on Likert scale), or both are not less than three, annotators resolved such cases via discussions. After discussing, the annotators produced the final set of annotation instructions. In the second step, the annotators followed the final instructions and rated 900 reviews. In this step of the annotation process, we achieved ICC of 0.9195 for convincingness and 0.9190 for severity. An ICC score in the range 0.75–1 indicates excellent agreement <cit.>. In the third step, the remaining reviews were divided among the two annotators so that only one annotator rates each review.

For reviews that were rated by the two annotators, we computed the average convincingness and severity scores. This annotation study possessed minimal risk and was approved by the Institutional Review Board (IRB) of our university.

§.§.§ Extracting Deep Learning Features from App Review

We obtained the feature vector of each app review as follows:

Combine Sentences: Remove periods in each app review and combine all its sentences to form single sentence.

Text Preprocessing: Remove all punctuation marks, stop words <cit.>, and our keywords, the latter because those keywords may correlate with reviews with higher scores and could create bias in the model.

Sentence Embedding: We leverage the Universal Sentence Encoder (USE) <cit.> to extract embeddings for each app review.
USE uses Deep Averaging Network (DAN) to
provide a 512-dimension embedding for a long text. USE is trained on a large variety of natural language tasks with the aim of capturing the context. In our case,
USE directly provides sentence level embeddings of an app review, by keeping the context intact. However, alternatives such as GLoVe <cit.> and Word2Vec <cit.> lose such context. We leverage the pretrained USE network by using Tensorflow Hub <cit.>.

§.§.§ Training Regression Model

We treat score prediction as a multi-target regression problem <cit.>.
Here, the 1884 annotated reviews form the training set, and convincingness and severity are target variables, predicted using the extracted deep learning features.

We evaluated the performance of three regression models: support vector regression <cit.>, random forest <cit.>, and decision tree <cit.>, by ten-fold cross validation on our dataset. To mitigate bias of our keywords, we remove such keywords in the preprocessing step, so that the regression model learns from the the context of the review and not from specific keywords.
Table <ref> shows average and standard deviation of mean squared error (MSE) <cit.> in ten folds. The reported MSE is the combined MSE for two targets. The Support Vector Regressor (SVR) yields the smallest MSE, so we choose it for the subsequent phases of our approach.

Performance of three regression models on ten-fold cross validation.

Regression Model     Average MSE     Standard Deviation

Decision Tree      1.344     0.402

Random Forest     0.712    0.417

Support Vector     0.625   0.458

We use this trained model to predict convincingness and severity scores of all 11.57 million reviews in the seed dataset.
The alarmingness of each review is calculated by taking the geometric mean of its predicted convincingness and severity. We use geometric mean because it ensures high alarmingness value only if both the convincingness and severity scores are high.

§.§ Identifying Rogue Apps

We produce an app's rogue score by aggregating the alarmingness scores of its reviews as follows.

Weighted Mean of Alarmingness: In general, for a rogue app, a small proportion of reviews report rogue behavior. Thus, we need to catch rogue apps using their few reviews that have high values on the alarmingness scale. Thus, we assign weights to reviews based on their alarmigness, as follows:

Defining score buckets: While annotating reviews, we defined levels of convincing reviews (not convincing to extremely convincing) and severe reviews (not severe to extremely severe) on a Likert scale. We also follow same levels on the alarmingness scale (1: not alarming to 4: extremely alarming). We define a score bucket between every consecutive level of alarmingness (not alarming to slightly, slightly alarming to moderately alarming, moderately alarming to extremely alarming). Table <ref> shows how score buckets are formed using levels of alarmingness.

Assigning weights to score buckets:
We have 11.57 million reviews in the seed dataset. Based on the alarmingness computation (Section <ref>), we calculated the probability of a review falling in a score bucket. Since, the reviews reporting rogue behavior are less, probabilities in buckets 2 and 3 are less than that in bucket 1. We take inverse of these probabilities to get the weights for each score bucket. As a result, we assign higher weights to buckets 2 and 3 than to the bucket 1. Table <ref> also shows the weight assigned to each score bucket.

Score buckets for alarmingness.

Alarmingness Score Range     Alarmingness Level Range     Bucket     Bucket Weight

$[1,2)$    Not alarming to Slightly     1     2.29e-3

$[2,3)$     Slightly to Moderately     2     6.08e-2

$[3,4]$     Moderately to Extremely     3     9.36e-1

If $a\fsub{1}$, $a\fsub{2}$, …, $a\fsub{n}$ are the alarmingness scores of an app's reviews, and $w\fsub{1}$, $w\fsub{2}$, …, $w\fsub{n}$ are their respective weights (according to Table <ref>), then, $W\fsub{alarmingness}$, the weighted mean of alarmingness is given by:

\begin{equation*}
W\fsub{alarmingness}=\frac{a\fsub{1}*w\fsub{1}+ a\fsub{2}*w\fsub{2}+ \ldots a\fsub{n}*w\fsub{n}}{w\fsub{1}+ w\fsub{2}+ \ldots w\fsub{n}}
\end{equation*}

The weighted mean of alarmingess ranges from 1 to 4.

Normalized Count: The weighted mean of alarmingness does not account for the count of reviews that report rogue behavior against an app. Suppose, app A has 15 reviews reporting rogue behavior and app B has 25 reviews reporting rogue behavior. If all reviews reporting rogue behavior have the same alarmingness score, the weighted means of the two apps would be the same. But, app B shows more evidence of rogue behavior and should have a higher rogue score than app A. Thus, we also consider the count of reviews. For each app, we calculate the number of reviews in bucket 3. We tried incorporating counts of other buckets, but it led to worse performance of the approach.

The minimum possible value of the count is zero. However, in some cases, counts can be high, leading to no definite upper limit. Thus, we normalize the counts of all the apps between one and four.

We want to assign high rogue score to apps that have high scores in both (i) weighted mean of alarmingness and (ii) normalized count. Thus, rogue score is computed as the geometric mean of these two values.

§.§.§ Selecting Threshold for Prediction

For each app in the seed dataset, computes the rogue score. All apps are ranked in decreasing order of rogue scores. The apps with a score greater than a threshold are predicted rogue. To decide the correct threshold, we follow two steps: (i) label the ground truth of rogue apps and (ii) vary a threshold between certain values and choose the threshold which gives the best performance of .

We create our ground truth by manually scrutinizing reviews. However, scrutinizing reviews of all 1687 apps (seed dataset) is not feasible. Thus, first, we scrutinize the 50 most alarming reviews (with minimum score of two—at least slightly alarming) for apps with the highest 100 rogue scores. Second, we scrutinize reviews containing our keywords for these 100 apps. The first step is aligned with our approach since it checks top alarming reviews. However, the second step is neutral because it searches for evidence for the apps that failed to identify through top alarming reviews. This way we mitigate the threat of bias, while curating ground truth for apps with the highest 100 rogue scores.

We label an app as rogue provided any of the scrutinized reviews report a rogue behavior. Table <ref> shows the types of reviews we consider indicative or otherwise of a rogue evidence. If the reviews of an app describe information access performed without the victim's knowledge or when the victim shows discomfort (first three reviews in Table <ref>), we consider the app as rogue. Also, some rogue apps are used for positive purposes such tracking family members for safety (fourth review in Table <ref>) but still possess a potential for future misuse. Similarly, apps used for tracking pets or other objects are considered rogue (fifth review). Reviews of some apps don't possess any misuse in present or in future, leading to their final label of not rogue (sixth review). Through manual inspection, we determine that of the 100 apps, 73 are rogue and 27 are not.

Instructions followed for labeling rogue apps.

Type of case     Subtype of case     Example     1.5cmEvidence of rogue behavior

Tracking people's information    Without the victim's knowledge     “Now that I can spy on my wife I will always know when she is cheating”      Yes

Tracking people's information     With the victim's knowledge but with discomfort    “Ok my mom got this for me and …it's kinda creepy that this app was made so parent could basically stalk their kids.”     Yes

Tracking people's information     Public information but the victim is uncomfortable       “I had someone cyberstalking and harassing me. Multiple attempts in every way shape and form were made to contact app-name to block and ban the stalker's account due to a concern for my well- being.”     Yes

Tracking people's information    Positive purpose     “I love finding my family members. Wife was in bad car wreak and I was able to find her location using this app. Thank you!”     Yes

Tracking pets or other objects        “Wow! Day one and I'm stalking my puppet like a soccer mom that ran out of adderall! I'm very excited to use this to interact with my puppet while I'm at work and to check in on the dog walker!”     Yes

Not related to information accessing         “an absolutely amazing and very helpful app.  i don't know how i would keep track of prayer times without it.  love the app.  thank u!!!”     No

For the 100 apps, the rogue score varies between 1.74 and 3.60. We vary the threshold from 1.73 to 3.59 in steps of 0.01. Apps with a rogue score above the threshold are predicted rogue but not rogue otherwise. At each value of threshold, we report the recall, precision, and F1 score.

Table <ref> shows the performance achieved at specific thresholds. As we increase the threshold, the precision increases at the cost of recall. For rogue apps, a false negative costs more than a false positive because a false negative leaves a rogue app undetected, which can harm many victims, whereas a false positive causes only wasted effort in manual scrutiny. Hence, achieving high recall is more important than achieving high precision. Thus, from Table <ref>, we choose 1.73 threshold that gives the best recall of 100% at 73% precision. Since we fine-tune the threshold on the same seed dataset, we also check 's performance (using the chosen threshold) on the other dataset (Section <ref>).

Choosing an appropriate threshold according to the recall scores.

Threshold     Precision (%)     Recall (%)    F1 Score (%)

1.73   	73.00   	100.00   	84.39

1.74   	73.40   	94.52   	82.63

1.75   	76.13   	91.78   	83.22

1.76   	76.82   	86.30   	81.29

1.77   	76.92   	82.19   	79.47

1.78   	78.37   	79.45   	78.91

1.79   	79.71   	75.34   	77.46

1.80   	80.95   	69.86   	75.00

1.81   	80.95   	69.86   	75.00

1.82   	81.96   	68.49   	74.62

1.83   	81.03   	64.38   	71.75

1.84   	80.35   	61.64   	69.76

1.85   	82.69   	58.90   	68.80

1.86   	83.33   	54.79   	66.11

1.87   	82.97   	53.42   	65.00

[box:seed-rogue-behavior1]Rogue App from Seed Dataset

App: Find My Family & Friends <cit.>

Rogue Score: 3.60/4.00

Alarming Review 1

Alarmingness: 4.00/4.00

Date of Review: 2019-11-28

“…Such a terrible thing for unaware parents to use. Most parents think teens don't need privacy and they constantly need to know where they are and what they're doing and who they're with at all times. This may make the parent feel at peace but what about the child? It's selfish of parents to not take into consideration of how the teen may feel about always having this app and the parent giving them a very stalkish feeling, it's very uncomfortable.”

[box:seed-rogue-behavior2]Rogue App from Seed Dataset

App: OurPact Jr. Child App <cit.>

Rogue Score: 2.47/4

Alarming Review 1

Alarmingness: 4.00/4.00

Date of Review: 2018-06-19

“…however this app shuts down almost everything and can see every text and website you've visited. now, i haven't done anything bad online (recently), but i find that a little creepy and honestly an invasion of privacy. no wonder this app has such crappy reviews. also, i used to have way more apps than i do now. because my parents now have the ability to restrict apps that may be “inappropriate”. i already have to ask permission to download apps, so if they were inappropriate my parents wouldn't let me download them. there's too many apps like this and i think kids need a break from all this crap on their devices.”

Alarming Review 2

Alarmingness: 4.00/4.00

Date of Review: 2018-08-16

“This is a useless app that no parent need to install I pray for every child who has this app installed on their electronics some parents don't understand the modern society but that's okay (but not really) I'm only given 2 hours and writing this review is using up time WHICH IS NOT FRIKEN OK!!! I hate this hate this app and I hope every child that has had their device attacked by this installment hates this app as much as me. This app should never be okay to use its inappropriate and everybody's children who have this app installed are making there children ANTI-SOCIAL AND VERY NOT COOL. I have many reasons why this app is SOOOOOOO scaring and dreadful so if your reading and thinking about installing this on ur child's device DONT INSTALL IT because that will ruin their future.”

§.§.§ Performance of Baseline Methods

On the seed dataset, we also check the performance of baseline methods described below.

Our Keywords on App Description. We search for the presence of one of our keywords (spy, stalk, and stealth) in app descriptions. Apps whose descriptions contain any of these keywords are predicted rogue, whereas other apps are predicted as not rogue.

Extended Keywords on App Description. We identify additional relevant keywords by extracting verbs through Part-Of-Speech (POS) tagging <cit.>. POS tagging marks every word in a sentence to an appropriate part of speech (verb, noun, adjective, and so on). Applying this process on descriptions of 73 rogue apps (from the ground truth) produced 145 verbs, out of which six (track, monitor, locate, control, stolen, lost) we selected as relevant to rogue behavior. The verbs: stolen and lost are relevant because they describe the apps that are used to find a misplaced phone, which indicates an ability to track another device. We extend our keywords by adding these six verbs. Apps whose description contain these keywords are predicted rogue.

T% Keyword Reviews. For each app, we compute the percentage of reviews containing our keywords. We set a threshold, T, on this percentage, above which apps are predicted rogue. In our evaluation, T takes the values of 0.3, 0.2, and 0.1, respectively.

Table <ref> summarizes the precision, recall, and F1 scores of all baselines and our approach. Our keywords on the description predict only one rogue app, leading to 100% precision (highest among all). However, our keywords miss 72 rogue apps, which leads to the worst recall of 1.36%. Among all the baselines, keyword search on reviews with 0.1% threshold achieves the highest recall of 65.07%, which is much lower than 's recall value. 's better performance may be due to fine tuning 's threshold on the same seed dataset. Thus, we also compare 's performance with these baselines on the other dataset (Section <ref>).

Performance (in %) of baseline methods and on the seed dataset. Bold value for a metric indicates the highest score among all approaches.

Method     Recall     Precision     F1

Our keywords on app descriptions     01.36    100.00     02.68

Extended keywords on app descriptions     61.64    80.35    69.76

0.3% keyword reviews     46.03    96.66    62.36

0.2% keyword reviews    50.79    96.96     66.66

0.1% keyword reviews    65.07     95.34    77.35

100.00     73.00    84.39

Examples <ref> and <ref> show alarming reviews of Find My Family & Friends App <cit.> and OurPact Jr. Child App <cit.>, which correctly identifies as rogue. Both of them are dual-use apps. Find My Family & Friends is a safety app, but alarming reviews report parents misusing the tracking functionality on children, to which children are uncomfortable. Moreover, the alarming reviews of the OurPact Jr. Child App report that parents can monitor children's texts and visited websites by installing the app on the child's device. In Section <ref>, we discuss these rogue functionalities in detail.

§.§ Identifying Additional Rogue Apps

The scoring part of our approach is not dependent on the choice of candidate apps and could be applied on any dataset of apps.
To identify additional rogue apps, we applied 's first two phases on two datasets: (i) dataset of similar apps and (ii) dataset of 100 popular apps in the utilities category.

§.§.§ Similar Apps

We retrieved 975 apps (similar to 100 predicted apps from the seed dataset), using the Apple App Store's recommendations (“You May Also Like” section). Our motivation in using Apple's recommendations is that these apps should offer functionalities similar to those in 100 predicted apps. Out of the 975 apps, reviews of 896 apps were present on the Apple App Store, over the period 2008-08-13 to 2022-08-24. We obtained 2652678 reviews.
These 896 apps along with their reviews form our snowball dataset, as shown in Table <ref>.

Apps and reviews in the snowball dataset.

Similar Apps     Reviews

896     2652678

We apply 's first two phases (described in Sections <ref> and <ref>) on the snowball dataset. predicts 138 rogue apps. Examples <ref> and <ref> show alarming reviews of two such apps from the snowball dataset, Smart Family Companion App <cit.> and Bark - Parental Controls app <cit.>.

In the snowball dataset, to curate the ground truth, we follow the same labeling process as described in Section <ref>, for the apps with the highest 200 rogue scores. That's how we label 132 apps as rogue.

Table <ref> shows the performance of all baseline methods and on the snowball dataset. Our keywords when used on descriptions predicts only one app as rogue, leading to the lowest recall. This is because, on Apple App Store <cit.>, dual-use apps are not advertised using keywords: spy, stalk, and stealth. The same approach achieves 100% precision but high recall is desirable in the context of rogue apps.

On app descriptions, extended keywords perform better (68.18% recall at 85.71% precision) than our keywords due to commonly used words (such as track, locate) in app descriptions. Our keywords are applied on reviews (rows 3–5 in Table <ref>), and discover evidence of rogue behavior. However, among all approaches, yields the best recall of 77.27%. As we discussed, high recall is desirable than high precision, we conclude that outperforms all other methods.

Performance (in %) of baseline methods and on the snowball dataset. Bold value for a metric indicates the highest score among all approaches.

Method     Recall     Precision     F1

Our keywords on app descriptions     00.75    100.00     01.48

Extended keywords on app descriptions     68.18    85.71    76.26

0.3% keyword reviews     41.66    91.66    57.29

0.2% keyword reviews    44.69    92.18     60.20

0.1% keyword reviews    51.51     88.31    65.07

77.27     73.91    75.55

[box:alarmingreview1]Rogue from Snowball Dataset

App: Smart Family Companion <cit.>

Rogue Score: 2.35/4.00

Alarming Review 1

Alarmingness: 4.00/4.00

Date of Review: 2020-03-15

“How is this even ethical? To put out an app in which you can completely control what's going on on someone else's phone? It's a huge privacy concern. To be honest, apps like this shouldn't exist. It's one thing to put control on a YOUNG CHILD'S phone (which can be done in settings easily) put to put this on an older kids phone is going to destroy trust. No parent should be able to see what their child is doing on their phone 24/7. It's borderline abusive.”

Alarming Review 2

Alarmingness: 4.00/4.00

Date of Review: 2019-09-03

“…This app tracks every last thing your child does on their phone. As you can imagine, no 16 year old wants to have their own private life constantly exposed to you. Just because you are their parent, and you live together, doesn't mean that they have to share everything with you. Location, data usage, browsing history, etc. frankly aren't your business. That's their own private information that you don't need to know. Coming from a family with control issues, there is no better way to destroy your relationship with your children. I doubt anyone would want to be around someone who is constantly monitoring and controlling them …”

[box:alarmingreview2]Rogue App from Snowball Dataset

App: Bark - Parental Controls  <cit.>

Rogue Score: 2.38/4.00

Alarming Review 1

Alarmingness: 4.00/4.00

Date of Review: 2020-05-28

“This app is unfair and invasion of privacy! Kids shouldn't be watched like this all kids cuss and this app tracks that and then snitches on you for it. I don't understand why someone can have so much doubt in their kids. Yes, I understand some kids do some really bad things that shouldn't be done, but if u raise your kids right and teach them right from wrong then you'd be able to trust them. One of my best friends has this app and she literally tells me how much she hates her parents. My friend has never even done anything and she has no reason for this app to be on her phone. I know the internet is dangerous but telling your kids it's dangerous honestly has a bigger effect. Maybe try other methods until it gets to the point of this app abolishing all their freedom and happiness.”

Alarming Review 2

Alarmingness: 4.00/4.00

Date of Review: 2021-03-12

“If I could give this zero stars I would. This app is a total invasion of privacy and if you want to ruin your chances of having a relationship with your child, then get this. But if you are one of those parents who don't give your child/teen privacy you are not only hurting them but you are also hurting that bond and relationship with them. As a teen we don't want privacy because we are trying to hide something we just want privacy to be able to feel like our own person …”

§.§.§ 100 Popular Utility Apps

Surveillance apps that can be misused for spying fall under the “Utilities” category, making utilities an important category to scrutinize. We consider 100 popular utility apps that are mentioned on Apple App Store page <cit.>. Out of 100 apps, nine are already scrutinized either in the seed or snowball dataset. For the rest 91 apps, we retrieved 392928 reviews, over the duration of 2008-10-18 to 2022-08-04.

predicts only one app as rogue, which after reviews' scrutiny by us, comes out to be non-rogue. We also scrutinize 10 apps with the highest rogue scores, by reading their top 50 alarming reviews and reviews containing our keywords. But, none of them are actually rogue. Since the Apple App Store <cit.> contains a wide variety of utility apps, the selected 91 apps contain subcategories such as payment, calculator, and television remote. As a result, no video surveillance or parental control app, which have high potential to be misused, are part of 91 apps. Thus, popular utility apps don't form a good candidate set for rogue apps. This problem can arise for any generalized set of apps under any category. Thus, an iterative process of checking similar apps (through ), to the already identified rogue apps, can accelerate identifying more and more rogue apps.

§ UNCOVERING ROGUE FUNCTIONALITIES

We now uncover rogue functionalities that are found via app reviews.
Identifying such functionalities can help both users and developers. App users can understand the risk associated with the app and developers can rectify apps to reduce such risks.

For this study, we considered apps in the seed dataset with the 40 highest rogue scores.
For each app, we manually analyzed its description and its 10 most alarming reviews discovered by . An app's description provides basic knowledge about the app's functionalities and alarming reviews report misuse of such functionalities. Through this exercise, we discovered the following types of rogue functionalities:

Monitoring phone activities. Some apps monitor a victim's phone activities, such as browsing history and text messages. Such apps are installed on the victim's device and activities can be monitored on another synced device.

Audio or video surveillance. Some apps enable audio or video surveillance without the victim's knowledge. These apps listen, view, or record a victim's voice or actions and some of them need not be installed on the victim's phone.

Tracking location. Some Global Positioning System (GPS) apps enable tracking a victim's phone, with (forced consent) or without their knowledge.

Profile stalking. Some apps are misused for stalking of user profile or user content (such as images), making the victim uncomfortable of the information access.

Table <ref> shows these four types of rogue functionalities, and alarming reviews reporting them. Some reviews in Table <ref> are old (2014 or 2012), but we confirmed that similar concerns are being raised in the recent reviews of the same apps. For example, the Find My iPhone <cit.> app still lets its users see the location of the connected devices. Due to unequal power dynamics, the victim can be forced to connect to such apps and allow their device to be located.

We also verified the rogue behavior of the SaferKid Text Monitoring App by installing it on two devices: a parent's device (iOS version 14.4.1) and a child's device (Android version 11.0). Figure <ref> shows the rogue features present in this app.  Activities on the child's device can be monitored on the synced parent's device. Figure <ref> shows SaferKid rogue functionalities such as monitoring text messages, web history, and call history. We verified each of these functionalities. Figure <ref> shows the screen displaying all chats of the victim. Apps such as SaferKid are advertised as safety apps for children, but can be secretly or forcefully installed on another device to monitor user's activity. Not only parents, but any individual can misuse such apps by installing them on the victim's phone.

[The SaferKid <cit.> app provides multiple ways to monitor victim's phone activities.]

[Using the SaferKid <cit.> app, victim's chats can be seen on the abuser's phone.]

Rogue functionalities in  SaferKid Text Monitoring <cit.>.

Types of rogue functionalities.

X[2.9,L] X[2.1,L] X[7.7,L]
Rogue Functionality     App Example     Alarming Review

Monitoring phone activities    SaferKid Text Monitoring App <cit.>     …Tracking things like social media, texts, and search history is just a complete disregard of privacy. You have to have trust in your kids …Apps like these shouldn't be allowed. IF YOU TRUST YOUR KID, DONT DOWNLOAD. (Date: 2019-12-07)

Audio or video surveillance     Find My Kids: Parental control <cit.>     This app proves to have a invasion of privacy. Due to the fact if your kids was at a friends house and talking to his friends parents, this app records what is going on and is a invasion of privacy. If your child left their phone downstairs or anywhere and they are playing it can record private conversation between adult and is a unsafe … (Date: 2019-01-16)

Tracking location    Find My iPhone <cit.>    …It's supposed to be used to recover a lost phone, not to religiously stalk your children.…The fact that a mom actually installed this app onto her son's phone without his knowledge is flat out wrong. …If you're constantly monitoring your child 24/7, just imagine what your child will do when they go off to college. … (Date: 2014-02-13)

Profile stalking    WhatsApp Messenger <cit.>      …However there is one negative about the App! The stalker look at the time stamp to monitor other people not nice please improve on that we need a sense of privacy from theses stalker" (Date: 2012-11-21)

§ RELATED WORK

We describe previous works focusing on (i) spying through mobile apps, (ii) user privacy on social media, and (iii) NLP techniques to find apps' privacy issues.

§.§ Spying through Mobile Apps

Prior studies <cit.> investigate how technology is abused for spying. A major segment of this research deals only with IPS. Chatterjee <cit.> identify IPS apps with carefully designed search queries and manual verification based on app information. They leverage information such as app descriptions and permissions.
However, for dual-use apps, the actual usage deviates from the intended purpose shown in app descriptions.
To identify such misuse, we focus on the evidence provided in app reviews. Moreover, the scope of rogue apps is broader than IPS apps.

Roundy <cit.> focus on identifying apps used for phone number spoofing and message bombing, which lie outside the scope of rogue apps. Conversely, rogue apps include those that enable stalking public information, which are outside their scope.
Roundy use metadata such as installation data, to uncover spying apps that are installed on infected devices. However, we focus on evidence of rogue behavior present in app reviews, to uncover rogue apps. Roundy rely upon Norton's security app <cit.> to determine which devices are infected. Thus, their approach would miss apps that a general user can leverage to spy.

Some prior studies focus on analyzing spyware apps or victims' experiences. Freed <cit.> present a qualitative analysis of victims' experiences, including their technology-related concerns. They report that security vulnerabilities were present in the phones of 14 out of 31 victims in their sample. Tseng <cit.> study the IPS problem from the attackers' perspective. They analyze online forums in which attackers participate, propose a taxonomy of IPS tools and attacks. Tools may require physical device access, e.g., to install GPS trackers; or, they may rely on virtual access, e.g., through shared accounts of intimate partners. Attacks may include coercion or subterfuge, or may involve hiring another person to spy on someone. Havron <cit.> propose a consultation method, called clinical security, to help victims by discovering and removing spyware, and advising victims about security vulnerabilities in their phones. Moreover, <cit.> develop sociotechnical systems with feminist notions to help IPV survivors.
Freed <cit.> survey spyware apps for intimate partners. They mention covert apps (also known as dual-use apps) that are capable of spying on victims but are not advertised as such. <cit.>, through app reviews, study  users' expectations from anti-stalkerware apps. They perform thematic analysis on 518 reviews of two apps and find a huge gap between users' perception and the actual abilities of such apps. All these studies along with others <cit.> are limited to IPS apps and not the broader set of rogue apps. Moreover, they do not consider cases when the victim is uncomfortable of the access (of public information) even if aware of it.

§.§ User Privacy

Prior works study risk of losing users' private information on online social media platforms and propose methods to mitigate such risk. Georgiou <cit.> protect users' privacy by giving warnings whenever a user may reveal sensitive attributes such as location or race present in social media posts. Mahmood and Desmedt <cit.> claim that the Facebook friends of a user can access the user's private information in a cloaked manner. The study shows that it is possible to stalk and target victims on Facebook. Mahmood and Desmedt provide strategies to avoid such attacks.
Reichel <cit.> study the privacy perspective of users in developing countries. They interview 52 social media users in South Africa to understand their privacy beliefs. Reichel conclude that many participants are concerned about other users being able to see their online posts and messages, instead of the private data collected by the app platform itself. Many participants admitted that unknown people (on WhatsApp and Facebook) stalked or harassed them. To combat these challenges, Reichel provide recommendations to fulfill users' security needs in resource-constrained situations. Some studies contribute to uncovering privacy risks associated with shared images <cit.>, which can contain bystanders (persons who are not prime subject of image) and are shared widely without bystanders' consent. Hasan <cit.> leverage visual features to detect bystanders in images present in the Google open image dataset <cit.>.

These studies are applicable to specific social media platforms and not to all rogue apps. Moreover, they do not provide a framework to identify rogue apps and their functionalities.

§.§ Using Natural Language Processing

We present prior studies that apply NLP techniques for security and privacy of mobile apps.

Some previous works leverage app reviews and privacy policies to identify user's security and privacy issues.
Nguyen <cit.> train a classifier to predict if an app review pertains to security and privacy concerns. Using regression analysis, they show that security and privacy related reviews play an important factor in predicting privacy related app updates. Besmer <cit.> leverage app reviews to understand how users' perception of privacy is reflected in their sentiments about the app. They train a machine learning classifier to determine whether a review is privacy related. Further, they analyze the sentiments of reviews predicted as privacy related. Harkous <cit.> propose a privacy-centric language model to extract useful information from long privacy policies. The extracted information helps users understand how apps collect and manage users' personal information. To train the language model, they leverage 130000 privacy policies. The trained model extracts both high-level and fine-grained details from policies. However, these studies focus on how an app which can steal a user's information. In contrast, we focus on the privacy of a victim (user or third party) with respect to another user.

Some prior works distinguish between the actual and the expected behavior (from user's perspective) of an app, by using textual sources such as descriptions and privacy policies.
Gorla <cit.> identify which apps deviate from their descriptions, by extracting topics from app descriptions, using Latent Dirichlet Allocation (LDA), and clustering apps based on those topics. For each cluster, Gorla find outliers with respect to apps' APIs usage. Qu <cit.> and Pandita <cit.> use NLP techniques on app descriptions and find disparities between app descriptions and functionalities. Zimmeck <cit.>
propose an automated system to find Android apps' compliance with their privacy policies. They combine static code analysis and machine learning to uncover inconsistencies between privacy policies and app source code. Out of 9050 apps, Zimmeck find that 17% of apps collect sensitive information such as location, but do not mention it in their privacy policies. All these works address expectation violation when the app developer has malicious intentions. However, in our work, we address expectation violation when an app user has malicious intentions to spy or stalk. To the best of our knowledge, is the first automated system to identify rogue apps.

§ DISCUSSION

We proposed , an approach to automatically analyze app reviews for detection of rogue apps and rogue functionalities. , first, predicts alarmingness of reviews, followed by rogue score for each app. In total, predicts 239 rogue apps (100 and 139) from multiple sources, leading to the best recall, as compared to other baseline methods. We have also shared the identified rogue apps along with their reviews, to the Apple App Store. The platform will investigate these apps and will reaching out to the developers for correcting functionalities in their apps.

Below, we describe our data availability, threats to validity, and promising future directions.

§.§ Data Availability

Upon acceptance of this paper, we will release the complete list of all identified rogue apps. We will also release the scraped reviews as an open dataset.
Our work is reproducible; we used Tensorflow Hub <cit.> for extracting features and Scikit-learn library <cit.> for training the regression model, which will make available with the dataset.

§.§ Threats to Validity

We now discuss the threats we identify in our work. The identified threats are of two types: (i) the threats that we mitigate; and (ii) the threats that still remain.

§.§.§ Threats Mitigated

We mitigated the following threats to validity. First, reviews in the set s1 contained our keywords. This may create a bias in the model to predict high scores for only reviews having our keywords. To mitigate this threat, we removed our keywords before training the model. This helped the model to learn from the context and not from specific keywords (described in Section <ref>). Second, review annotation by crowd workers could yield incorrectly rated reviews, because of their inability to understand the problem well. Thus, two authors of this paper annotate the whole training data. Third, the ground truth (of rogue apps) could be biased if it was formed only using top alarming reviews. We mitigated this bias by scrutinizing reviews containing our keywords, which can contain evidence missed by alarming reviews

§.§.§ Threats Remaining

Now, we describe the threats that still remain in our work.
First, we investigate only a few thousand apps, which may not be representative of all apps on the Apple App Store <cit.>. The performance of may vary while testing it on all apps of the Apple App Store.
Second, we target apps and their reviews only on Apple's App Store. Upon deployment on other app stores, the performance of our approach can differ.
Third, if an app distribution platform does not have a similarity recommendation, may have to be applied on all apps—a computationally expensive task. However, in such cases, can be prioritized for the apps that are flagged by app users (victims). Fourth, some negative reviews (about rogue behavior) may be written by the app's competitors. Identifying such fake reviews is out of the scope of our study.

§.§ Limitations and Future Directions

We identify following limitations of this work. Each limitation gives rise to possible future work. First, may miss some rogue apps if they do not have alarming reviews at the time of analysis, possibly because they are new apps. However, such rogue apps can be identified as soon as alarming reviews begin to arrive. By leveraging the current evidence, helps protect future users and third parties.
A possible extension for would be to include other information sources such as privacy policies, to identify rogue apps ahead of time.

Second, uncovering rogue functionalities involves manual effort of inspecting top alarming reviews. A possible future direction is to automate this process.


# On algebraic bi-Lipschitz homeomorphisms

Zbigniew Jelonek  Instytut Matematyczny
Polska Akademia Nauk
Śniadeckich 8, 00-656 Warszawa
Poland<EMAIL_ADDRESS>
###### Abstract.

Let $X\subset\mathbb{C}^{n};Y\subset\mathbb{C}^{m}$ be closed affine varieties
and let $\phi:X\to Y$ be an algebraic bi-Lipschitz homeomorphism. Then ${\rm
deg}\ X={\rm deg}\ Y.$ Similarly, let
$(X,0)\subset(\mathbb{C}^{n},0),(Y,0)\subset(\mathbb{C}^{m},0)$ be germs of
analytic sets and let $f:(X,0)\to(Y,0)$ be a c-holomorphic and bi-Lipschitz
homeomorphism. Then ${\rm mult}_{0}\ X={\rm mult}_{0}\ Y.$ Finally we show
that the normality is not a bi-Lipschitz invariant.

###### Key words and phrases:

degree of algebraic variety, bi-Lipschitz homeomorphism

###### 1991 Mathematics Subject Classification:

14 R 10, 14 P 15, 14 P 10

The author is partially supported by the grant of Narodowe Centrum Nauki
number 2019/33/B/ST1/00755

##  1\. Introduction

In [4] Bobadilla, Fernandes and Sampaio study invariance of degree of complex
affine varieties under bi-Lipschitz homeomorphisms. They proved that this
problem is equivalent to the bi-Lipschitz version of the Zariski multiplicity
conjecture. Moreover, they proved that the degree of curves and surfaces are
such invariants. From other point of view in [3] Birbrair, Fernandes, Sampaio
and Verbitsky give an example of two three-dimensional affine varieties, which
are bi-Lipschitz equivalent but they have different degrees. In fact they
showed that we have two different embeddings of $\mathbb{C}\hbox{\tenmsy
P}^{1}\times\mathbb{C}\hbox{\tenmsy P}^{1}$ into $\mathbb{C}\hbox{\tenmsy
P}^{5}$, say $X$ and $Y$, such that affine cones
$C(X),C(Y)\subset\mathbb{C}^{6}$ are bi-Lipschitz equivalent, but they have
different degrees. Hence in general the algebraic degree of an affine set is
not a bi-Lipschitz invariant. However varieties $X,Y$ of Birbrair, Fernandes,
Sampaio and Verbitsky have codimension greater than one. Hence the problem of
invariance of degree under bi-Lipschitz homeomorphisms is still open in the
important case of affine hypersurfaces in $\mathbb{C}^{n}$, where $n>3.$

In this paper we introduce a new class of bi-Lipschitz homeomorphism- the
algebraic bi-Lipschitz homeomorphisms. Assume that $X,Y$ are affine varieties.
We say that homeomorphism $f:X\to Y$ is an algebraic bi-Lipschitz
homeomorphism if it is a bi-Lipschitz and its graph is an algebraic variety.
Inspired by our recent paper [1] (with L. Birbrair and A. Fernandes) we show
that this class of mappings preserves the degree of affine varieties:

Theorem 3.4 Let $X\subset\mathbb{C}^{n},Y\subset\mathbb{C}^{m}$ be affine
algebraic varieties and let $f:X\to Y$ be an algebraic bi-Lipschitz
homeomorphism. Then ${\rm deg}\ X={\rm deg}\ Y.$

In a similar way we can prove:

Theorem 4.1 Let
$(X,0)\subset(\mathbb{C}^{n},0),(Y,0)\subset(\mathbb{C}^{m},0)$ be germs of
analytic sets and let $f:(X,0)\to(Y,0)$ be a c-holomorphic and bi-Lipschitz
homeomorphism. Then ${\rm mult}_{0}\ X={\rm mult}_{0}\ Y.$

Let us recall that a mapping $f:X\to Y$ is c-holomorphic, if it is continuous
and its graph is analytic in $X\times Y$ (here $X,Y$ are analytic sets).

Corollary 4.2 Let $X\subset\mathbb{C}^{n},Y\subset\mathbb{C}^{m}$ be affine
algebraic varieties and let $f:X\to Y$ be an algebraic bi-Lipschitz
homeomorphism. Then ${\rm deg}\ X={\rm deg}\ Y$ and for every $x\in X$ we have
${\rm mult}_{x}\ X={\rm mult}_{f(x)}\ Y.$

At the end of this paper we give an example of two algebraic affine varieties
$X,Y$ such that $X$ is normal, $Y$ is not normal and there exists an algebraic
bi-Lipschitz homeomorphism $f:X\to Y.$ Hence the normality is not a bi-
Lipschitz invariant.

##  2\. Preliminaries

######  Definition 2.1.

Let $X,Y$ be affine complex varieties and let $f:X\to Y$ be a continuous
mapping. We say that $f$ is algebraic if the graph of $f$ is a complex
algebraic set.

######  Proposition 2.2.

Every algebraic mapping is rational, i.e., there exists a Zariski open subset
$U\subset X$ such that the mapping $f|_{U}$ is a regular mapping.

###### Proof.

Indeed, let $\Gamma$ be a graph of $f$ and $\iota:X\ni
x\mapsto(x,f(x))\in\Gamma.$ Let $U\subset X$ be the set of smooth points of
$X.$ Then $U$ is a Zariski open dense subset of $X.$ By the Zariski Main
Theorem the projection $\pi:\Gamma\to X$ is an isomorphism over $U.$ This
means that $\iota$ is an isomorphism on $U.$ But $f|U=\pi\circ\iota|_{U},$
hence $f$ is regular on $U.$ ∎

In other words an algebraic mapping is a mapping which additionally is
rational. Here we are interested in these algebraic mappings, which are
additionally bi-Lipschitz. Note that if a mapping $f:X\to Y$ is an algebraic
bi-Lipschitz homeomorphism, then the mapping $f^{-1}:Y\to X$ is also an
algebraic bi-Lipschitz homeomorphism. First of all let us recall the following
statement, which follows from [1]:

######  Theorem 2.3.

Let $X\subset\mathbb{C}^{n}$ be a $k-$dimensional affine variety. Then there
is an algebraic bi-Lipschitz embedding $f:X\to\mathbb{C}^{2k+1}.$

We say that the mapping $f:X\to\mathbb{C}^{n}$ is an algebraic bi-Lipschitz
embedding, if the mapping $f:X\to f(X)$ is algebraic and bi-Lipschitz. Since
not every $k$ dimensional affine variety can be embedded into
$\mathbb{C}^{2k+1}$ in a bi-regular way (see example below) we see that we
have a lot of algebraic bi-Lipschitz homeomorphisms which are not biregular
mappings.

######  Example 2.4.

For $m>3$ let $X\subset\mathbb{C}^{m}$ be a curve given by parametrization

$X=\\{x\in\mathbb{C}^{m}:x=(t^{m},....,t^{2m-1});\ t\in\mathbb{C}\\}.$

It is an easy observation that the Zariski tangent space $T_{0}X$ coincide
with $\mathbb{C}^{m}.$ Now consider a generic linear projection
$\pi:X\to\mathbb{C}^{3}.$ By [1] it is an algebraic bi-Lipschitz embedding.
Since $T_{0}(\pi(X))\subset\mathbb{C}^{3}$ and $T_{0}X=\mathbb{C}^{m}$ we see
that the mapping $\pi$ is not bi-regular. In fact the algebraic bi-Lipschitz
mapping $\pi^{-1}:\pi(X)\to X$ can not be extended to any $C^{1}$ mapping in a
neighborhood of $0$ in $\mathbb{C}^{3}$.

######  Example 2.5.

Let $X=\\{x\in\mathbb{C}^{3}:x=(t,t^{3}+t^{2},t^{5});t\in\mathbb{C}\\}$ and
$Y=\\{x\in\mathbb{C}^{3}:x=(t,t^{3}+2t^{2},t^{5});t\in\mathbb{C}\\}.$ Let
$\phi:X\ni(t,t^{3}+t^{2},t^{5})\mapsto(t,t^{3}+2t^{2},t^{5})\in Y.$ Then
$\phi$ is bi-regular and bi-Lipschitz but it is not a linear mapping.

It is bi-regular because $\phi(x,y,z)=(x,y+x^{2},z).$ Now we show that $\phi$
is bi-Lipschitz outside some big ball. Let
$a(t)=(t,t^{3}+t^{2},t^{5}),b(t)=(t,t^{3}+2t^{2},t^{5}).$ Hence
$\phi(a(t))=b(t)$. We have to show that for some $K>0$

$\frac{1}{K}||a(t)-a(s)||<||b(t)-b(s)||<K||a(t)-a(s)||.$

Consider the fraction

$(*)\
\frac{b_{2}(t)-b_{2}(s))}{a_{2}(t)-a_{2}(s)}=\frac{t^{3}+2t^{2}-s^{3}-2s^{2}}{t^{3}+t^{2}-s^{3}-s^{2}}=\frac{(1-\epsilon_{1}\alpha)(1-\epsilon_{2}\alpha)+2/t(1+\alpha)}{(1-\epsilon_{1}\alpha)(1-\epsilon_{2}\alpha)+1/t(1+\alpha)},$

where $1,\epsilon_{1},\epsilon_{2}$ are all roots of polynomial $x^{3}+1$ and
$\alpha=s/t.$ Note that we can always assume that $|\alpha|\leq 1.$ Denote
$g(\alpha)=(1-\epsilon_{1}\alpha)(1-\epsilon_{2}\alpha).$ This polynomial has
roots in $\epsilon_{1},\epsilon_{2}$ only. Denote by
$U=\\{\alpha:|\alpha-\epsilon_{1}|>r\\}\cap\\{\alpha:|\alpha-\epsilon_{2}|>r\\}.$
Since $U$ does not contain roots of $g$, we have $|g(\alpha)|>\rho>0.$ We can
assume that $r$ is so small that in the set
$V:=\\{\alpha:|\alpha-\epsilon_{1}|\leq
r\\}\cup\\{\alpha:|\alpha-\epsilon_{2}|\leq r\\}$ there is no roots of
polynomials $x^{5}+1.$ Now we estimate $(*)$. We have two possibilities:

a) $\alpha\in U$,

b) $\alpha\in V.$

In the case a) we have $|g(\alpha)|>\rho>0$ and in particular for $|t|>R$ we
have

$\frac{||b_{2}(t)-b_{2}(s))||}{||a_{2}(t)-a_{2}(s)||}<2.$

Hence

$||b_{2}(t)-b_{2}(s))||<2||a_{2}(t)-a_{2}(s)||.$

In the case b) we have
$||\phi(a(t))-\phi(b(t))||=||b_{3}(t)-b_{3}(s)||=||a_{3}(t)-a_{3}(s))||=||a(t)-a(s)||$
for large $|t|$ (we consider here the ”sup” norm). Hence indeed the mapping
$\phi$ is Lipschitz outside a large ball. Similarly $\phi^{-1}$ is Lipschitz
outside a large ball. Hence $\phi$ is bi-Lipschitz outside a large ball.

On the other hand $\phi$ is bi-Lipschitz in any ball, because it is a smooth
mapping. Combining this fact with the first step of our proof we see that we
can reduce the general case to the case where $|\alpha|$ is small and $|t|$ is
large. But this can be done in a similar way as in the first step (we left
details to the reader). Hence finally the mapping $\phi$ is bi-Lipschitz.

The mapping $\phi$ is not a restriction of a linear mapping because otherwise
$t^{3}+2t^{2}=at+b(t^{3}+t^{2})+ct^{5}+d$, where $a,b,c,d\in\mathbb{C}.$ This
is impossible.

##  3\. Proof of the Theorem 3.4

######  Definition 3.1.

Let $L^{s},H^{n-s-1}$ be two disjoint linear subspaces of $\hbox{\tenmsy
C}P^{n}.$ Let $\pi_{\infty}$ be a hyperplane (a hyperplane at infinty) and
assume that $L^{s}\subset\pi_{\infty}.$ By a projection $\pi_{L}$ with center
$L^{s}$ we mean the mapping:

$\pi_{L}:\mathbb{C}^{n}=\mathbb{C}\hbox{\tenmsy P}^{n}\setminus\pi_{\infty}\ni
x\mapsto<L^{s},x>\cap H^{n-s-1}\in
H^{n-s-1}\setminus\pi_{\infty}=\mathbb{C}^{n-s-1}.$

Here by $<L,x>$ we mean a linear subspace spanned by $L$ and $\\{x\\}.$

######  Lemma 3.2.

Let $X$ be a closed subset of $\mathbb{C}^{n}.$ Denote by
$\Lambda\subset\pi_{\infty}$ the set of directions of all secants of $X$ and
let $\Sigma=\overline{\Lambda},$ where $\pi_{\infty}$ is a hyperplane at
infinity and we consider the projective closure. Let
$\pi_{L}:\mathbb{C}^{n}\to\mathbb{C}^{l}$ be a projection with center $L$.
Then $\pi_{L}|_{X}$ is a bi-Lipschitz embedding if and only if
$L\cap\Sigma=\emptyset.$

###### Proof.

a) Assume that $L\cap\Sigma=\emptyset.$ We will proceed by induction. Since a
linear affine mapping is a bi-Lipschitz homeomorphism, we can assume that
$\pi_{L}$ coincide with the projection
$\pi:\mathbb{C}^{n}\ni(x_{1},...,x_{n})\mapsto(x_{1},...,x_{k},0,...,0)\in\mathbb{C}^{k}\times\\{0,...,0\\}.$
We can decompose $\pi$ into two projections: $\pi=\pi_{2}\circ\pi_{1}$, where
$\pi_{1}:\mathbb{C}^{n}\ni(x_{1},...,x_{n})\mapsto(x_{1},...,x_{n-1},0)=\mathbb{C}^{n-1}\times
0$ is a projection with a center $P_{1}=(0:0:...:1)$ and
$\pi_{2}:\mathbb{C}^{n-1}\ni(x_{1},...,x_{n-1},0)\mapsto(x_{1},...,x_{k},0,...,0)\in\mathbb{C}^{k}\times\\{(0,...,0)\\}$
is a projection with a center $L^{\prime}:=\\{x_{0}=0,...,x_{k}=0\\}.$ Since
$P_{1}\in L$ and consequently $P_{1}\not\in\Sigma$, we prove that $\pi_{1}$ is
an algebraic bi-Lipschitz homeomorphism. Indeed, let $P_{1}\in\hbox{\tenmsy
CP}^{n-1}\setminus\Sigma$ and let $H\subset\mathbb{C}^{n}$ be a hyperplane,
such that $P\not\in H.$ Since a complex linear isomorphism is a bi-Lipschitz
homeomorphism, we can assume that $P_{1}=(0:0:...0:1)$ and $H=\\{x_{n}=0\\}.$
We show that the projection $p:X\to H$ with center at $P_{1}$ is an algebraic
bi-Lipschitz homeomorphism. Of course $||p(x)-p(y)||\leq||x-y||.$ Assume that
$p$ is not bi-Lipschitz, i,e., there is a sequence of points $x_{j},y_{j}\in
X$ such that

$\frac{||p(x_{j})-p(y_{j})||}{||x_{j}-y_{j}||}\to 0,$

as $n\to\infty.$ Let $x_{j}-y_{j}=(a_{1}(j),...,a_{n-1}(j),b(j))$ and denote
by $P_{j}$ the corresponding point $(a_{1}(j):...:a_{n-1}(j):b(j))$ in
$\hbox{\tenmsy CP}^{n-1}.$ Hence

$P_{j}=\frac{(a_{1}(j):...:a_{n-1}(j):b(j))}{||x_{j}-y_{j}||}.$

Since
$\frac{(a_{1}(j),...,a_{n-1}(j))}{||x_{j}-y_{j}||}=\frac{p(x_{j})-p(y_{j})}{||x_{j}-y_{j}||}\to
0$, we get that $P_{j}\to P.$ It is a contradiction. Notice that if
$\pi_{1}(X)=X^{\prime}$, then $\Sigma^{\prime}=\pi_{1}(\Sigma).$ Moreover
$L^{\prime}=L\cap\\{x_{n}=0\\}$ and $<L^{\prime},P_{1}>=L$. This means that
$\Sigma^{\prime}\cap L^{\prime}=\emptyset.$ Now we can finish by induction.

b) Assume that $\pi_{L}|_{X}$ is a bi-Lipschitz map and $\Sigma\cap
L\not=\emptyset.$ As before we can change a system of coordinates in such a
way that
$\pi:\mathbb{C}^{n}\ni(x_{1},...,x_{n})\mapsto(x_{1},...,x_{k},0,...,0)\in\mathbb{C}^{k}\times\\{0,...,0\\}.$
Moreover, we can assume that $P_{1}=(0:0:...:1)\in\Sigma.$ Actually $\pi_{1}$
is not bi-Lipschitz. Indeed there is a sequence of secants
$l_{n}=(x_{n},y_{n})$ of $X$ whose directions tends to $P_{1}.$ Let
$x_{j}-y_{j}=(a_{1}(j),...,a_{n-1}(j),b(j))$ and denote by $P_{j}$ the
corresponding point $(a_{1}(j):...:a_{n-1}(j):b(j))$ in $\hbox{\tenmsy
CP}^{n-1}.$ Hence

$P_{j}=\frac{(a_{1}(j):...:a_{n-1}(j):b(j))}{||x_{j}-y_{j}||}.$

Since $P_{j}\to P$ we have
$\frac{(a_{1}(j),...,a_{n-1}(j))}{||x_{j}-y_{j}||}=\frac{p(x_{j})-p(y_{j})}{||x_{j}-y_{j}||}\to
0$. Hence the mapping $\pi_{1}$ is not bi-Lipschitz.

Now it is enough to note that $||\pi_{2}(x)-\pi_{2}(y)||\leq||x-y||,$ hence
$||\pi(x_{n})-\pi_{(}y_{n})||=||\pi_{2}(\pi_{1}(x_{n}))-\pi_{2}(\pi_{1}(y_{n}))||\leq||\pi_{1}(x_{n})-\pi_{1}(y_{n})||$.
Thus

$\frac{||x_{n}-y_{n}||}{||\pi(x_{n})-\pi(y_{n})||}\geq\frac{||x_{n}-y_{n}||}{||\pi_{1}(x_{n})-\pi_{1}(y_{n})||}\to\infty.$

This contradiction finishes the proof. ∎

######  Lemma 3.3.

Let $X\subset\mathbb{C}^{n}$ be a closed set and let $f:X\to\mathbb{C}^{m}$ be
an algebraic Lipschitz homeomorphism. Let
$Y:=graph(f)\subset\mathbb{C}^{n}\times\mathbb{C}^{m}.$ Then the mapping
$\phi:X\ni x\mapsto(x,f(x))\in Y$ is an algebraic bi-Lipschitz homeomorphism.

###### Proof.

The mapping $\phi$ is algebraic by Proposition 2.2. Since $f$ is Lipschitz,
there is a constant $C$ such that

$||f(x)-f(y)||<C||x-y||.$

We have

$||\phi(x)-\phi(y)||=||(x-y,f(x)-f(y))||\leq$
$\leq||x-y||+||f(x)-f(y)||\leq||x-y||+C||x-y||\leq(1+C)||x-y||.$

Moreover

$||x-y||\leq||\phi(x)-\phi(y)||.$

Hence

$||x-y||\leq||\phi(x)-\phi(y)||\leq(1+C)||x-y||.$

∎

######  Theorem 3.4.

Let $X\subset\mathbb{C}^{n},Y\subset\mathbb{C}^{m}$ be affine algebraic
varieties and let $f:X\to Y$ be an algebraic bi-Lipschitz homeomorphism. Then
${\rm deg}\ X={\rm deg}\ Y.$

###### Proof.

Let $X\subset\mathbb{C}^{n}$ and Let $f:X\to Y$ be an algebraic bi-Lipschitz
homeomorphism. Denote by $\Gamma\subset\mathbb{C}^{n}\times\mathbb{C}^{n}$ the
graph of $f.$ By Lemma 3.3 projections $\pi_{X}:\Gamma\to X$ and
$\pi_{Y}:\Gamma\to Y$ are algebraic bi-Lipschitz homeomorphism. Let
$\pi_{1}:\mathbb{C}^{n}\times\mathbb{C}^{m}\to\mathbb{C}^{n}$ and
$\pi_{2}:\mathbb{C}^{n}\times\mathbb{C}^{m}\to\mathbb{C}^{m}$ and denote by
$S_{1},S_{2}\subset\pi_{\infty}=\mathbb{C}\hbox{\tenmsy P}^{m+n-1}$ centers of
these projections. Denote by $\Lambda\subset\pi_{\infty}$ the set of
directions of all secants of $\Gamma$ and let $\Sigma=cl(\Lambda)$. Since
$\pi_{1}|_{\Gamma}=\pi_{X}$ and $\pi_{2}|_{\Gamma}=\pi_{Y}$ we have by Lemma
3.2 that $\Sigma\cap S_{1}=\Sigma\cap S_{2}=\emptyset.$ But
$\overline{\Gamma}\setminus\Gamma\subset\Sigma$ and consequently
$\overline{\Gamma}\cap S_{i}=\emptyset$ for $i=1,2.$ Now let
$L\subset\mathbb{C}^{n}$ be a generic linear subspace of dimension $k={\rm
codim}\ X.$ Hence $\\#(L\cap X)={\rm deg}\ X$ and $L$ has not common points
with $X$ at infinity. Since $\overline{\Gamma}\cap S_{1}=\emptyset$ we see
that $\\#(<S_{1},L>\cap\ \Gamma)={\rm deg}\ \Gamma$ where by $<S_{1},L>$ we
mean a linear (projective) subspace spanned by $L$ and $S_{1}.$ However the
mapping $\pi_{X}$ is a bijection, hence $\\#(<S_{1},L>\cap\ \Gamma)={\rm deg}\
X.$ In particular ${\rm deg}\ \Gamma={\rm deg}\ X.$ In the same way ${\rm
deg}\ \Gamma={\rm deg}\ Y.$ Hence ${\rm deg}\ X={\rm deg}\ Y.$ ∎

######  Remark 3.5.

In fact a more general statement is true. We can say after [4] that the
mapping $f:X\to Y$ is bi-Lipschitz at infinity if there exist compact sets
$K,K^{\prime}$ such that the mapping $f^{\prime}:X\setminus K\ni x\mapsto
f(x)\in Y\setminus K^{\prime}$ is bi-Lipschitz. It is easy to see that our
proof works if $f$ is an algebraic homeomorphism, which is bi-Lipschitz at
infinity. Indeed under this assumption we still have
$\overline{\Gamma}\setminus\Gamma\subset\Sigma$, where $\Gamma=graph(f)$ and
$\Sigma$ is the set of directions of secants of $graph(f^{\prime}).$ Moreover,
there are sufficiently general linear subspaces which omit $K$ or
$K^{\prime}.$ Hence in fact we can state:

######  Theorem 3.6.

Let $X\subset\mathbb{C}^{n},Y\subset\mathbb{C}^{m}$ be affine algebraic
varieties and let $f:X\to Y$ be a birational correspondence. Assume that there
exist compact sets $K,K^{\prime}$ such that $f:X\setminus K\to Y\setminus
K^{\prime}$ is defined (as continuous mapping) and bi-Lipschitz. Then ${\rm
deg}\ X={\rm deg}\ Y.$

######  Remark 3.7.

It is worth to say, that affine cones $C(X),C(Y)$ mentioned in the
introduction are birationally and bi-Lipschitz equivalent, but they have
different degrees.

##  4\. Proof of the Theorem 4.1

In a similar way we can prove:

######  Theorem 4.1.

Let $(X,0)\subset(\mathbb{C}^{n},0),(Y,0)\subset(\mathbb{C}^{m},0)$ be germs
of analytic sets and let $f:(X,0)\to(Y,0)$ be a c-holomorphic and bi-Lipschitz
homeomorphism. Then ${\rm mult}_{0}\ X={\rm mult}_{0}\ Y.$

.

###### Proof.

Let $U,V$ be small neighborhoods of $0$ in $\mathbb{C}^{n}$ and
$\mathbb{C}^{m}$ such that the mapping $f:U\cap X=X^{\prime}\to V\cap
Y=Y^{\prime}$ is defined and it is by-Lipschitz. Denote by $\Gamma\subset
U\times V$ the graph of $f.$ By Lemma 3.3 projections
$\pi_{X^{\prime}}:\Gamma\to X^{\prime}$ and $\pi_{Y^{\prime}}:\Gamma\to
Y^{\prime}$ are bi-Lipschitz homeomorphism. Let
$\pi_{1}:\mathbb{C}^{n}\times\mathbb{C}^{m}\to\mathbb{C}^{n}$ and
$\pi_{2}:\mathbb{C}^{n}\times\mathbb{C}^{m}\to\mathbb{C}^{m}$ and denote by
$S_{1},S_{2}\subset\pi_{\infty}=\mathbb{C}\hbox{\tenmsy P}^{m+n-1}$ centers of
these projections. Denote by $\Lambda\subset\pi_{\infty}$ the set of
directions of all secants of $\Gamma$ and let $\Sigma=cl(\Lambda)$. Since
$\pi_{1}|_{\Gamma}=\pi_{X}$ and $\pi_{2}|_{\Gamma}=\pi_{Y}$ we have by Lemma
3.2 that $\Sigma\cap S_{1}=\Sigma\cap S_{2}=\emptyset.$ But
$\overline{C(0,\Gamma)}\setminus C(0,\Gamma)\subset\Sigma$ and consequently
$\overline{C(0,\Gamma)}\cap S_{i}=\emptyset$ for $i=1,2.$ Now let
$L\subset\mathbb{C}^{n}$ be a generic linear subspace of dimension $k={\rm
codim}\ X.$ Hence $\\#(L\cap X^{\prime})={\rm mult}_{0}X$ and $L$ has not
common points with $C(0,X)$ at infinity (we can shrink $U,V$ if necessary!).
Since $\overline{C(0,\Gamma)}\cap S_{1}=\emptyset$ we see that
$\\#(<S_{1},L>\cap\ \Gamma)={\rm mult}_{0}\ \Gamma$ where by $<S_{1},L>$ we
mean a linear (projective) subspace spanned by $L$ and $S_{1}.$ However the
mapping $\pi_{X^{\prime}}$ is a bijection, hence $\\#(<S_{1},L>\cap\
\Gamma)={\rm mult}_{0}\ X.$ In particular ${\rm mult}_{0}\ \Gamma={\rm
mult}_{0}\ X.$ In the same way ${\rm mult}_{0}\ \Gamma={\rm mult}_{0}\ Y.$
Hence ${\rm mult}_{0}\ X={\rm mult}_{0}\ Y.$ ∎

######  Corollary 4.2.

Let $X\subset\mathbb{C}^{n},Y\subset\mathbb{C}^{m}$ be affine algebraic
varieties and let $f:X\to Y$ be an algebraic bi-Lipschitz homeomorphism. Then
${\rm deg}\ X={\rm deg}\ Y$ and for every $x\in X$ we have ${\rm mult}_{x}\
X={\rm mult}_{f(x)}\ Y.$

##  5\. Normality is not a bi-Lipschitz invariant

In [2] (see also [6]) the authors proved that the smoothness of an analytic
space is a bi-Lipschitz invariant. The natural question is whether the
normality is also a bi-Lipschitz invariant. Directly from [2] and [6] we have:

######  Theorem 5.1.

Let $(X,0),(Y,0)$ be analytic hypersurfaces in $(\mathbb{C}^{n},0).$ If they
are bi-Lipschitz equivalent and $X$ is normal , then also $Y$ is normal.

###### Proof.

Indeed, such a hypersurface is normal if it is smooth in codimension one.
Hence our result follows directly from [2] and [6]. ∎

In this section we show that in general Theorem 5.1 does not hold. We start
with:

######  Lemma 5.2.

Let $X\hbox{\tenmsy P}^{n}$ be a projective variety, which is not contained in
any hyperplane. Let $C(X)\subset\mathbb{C}^{n+1}$ be a cone over $X.$ Then
${\rm dim}\ T_{0}(C(X))=n+1.$

###### Proof.

Note that $T_{0}(C(X))$ is the dimension of a minimal smooth germ $Y_{0}$
which contains the germ $C(X)_{0}.$ However since $C(X)_{0}\subset Y_{0}$ we
have that $C(X)\subset T_{0}Y.$ Denote by $\pi\cong\hbox{\tenmsy P}^{n}$ the
hyperplane at infinity. By the assumption we have
$\overline{T_{0}Y}\cap\pi=\pi.$ Hence $T_{0}Y=\mathbb{C}^{n+1}.$ ∎

######  Theorem 5.3.

For every $r>1$ there is a normal affine algebraic variety $X^{r}$ of
dimension $r$ and an algebraic bi-Lipschitz homeomorphism $\phi:X^{r}\to
Y^{r}$ such that $Y^{r}$ is not normal.

###### Proof.

Let us take $d$-tuple embedding $\phi_{d}$ of $\hbox{\tenmsy P}^{r}$ to
$\hbox{\tenmsy P}^{N}(d).$ Denote $A_{d}=\phi_{d}(\hbox{\tenmsy P}^{r}).$ Let
us note that the space $A_{d}\subset\hbox{\tenmsy P}^{N}(d)$ is projectively
normal i.e., the mapping

$\Gamma(\hbox{\tenmsy P}^{N}(d),{\mathcal{O}}_{\hbox{\tenmsy
P}^{N}(d)}(k))\to\Gamma(A_{d},{\mathcal{O}}_{X}(k))$

is surjective for every $k$. This means that the cone $X:=C(A_{d})$ is a
normal space (for details see [Har], p.126, 5.14). Moreover it is easy to
check that $A_{d}$ is not contained in any linear subspace of $\hbox{\tenmsy
P}^{N}(d).$ Hence by Lemma 5.2 we have dim $T_{0}X=N(d)+1.$ We can take $d$ so
large that $N:=N(d)>2r+1.$ Now consider a generic projection
$\pi:\mathbb{C}^{N}\to\mathbb{C}^{2r+1}.$ We know by [1] that $\pi$ restricted
to $X_{d}$ is by-Lipschitz embedding. Let $Y=\pi(X).$ The variety $Y$ is not
normal. Indeed, otherwise by the Zariski Main Theorem the mapping $\pi|X:X\to
Y$ has to be an isomorphism , in particular dim $T_{0}X=$dim $T_{0}Y$. Since
dim $T_{0}Y\leq 2r+1<N$ it is a contradiction. ∎

## References

  * [1] L. Birbrair, A. Fernandes, Z. Jelonek, On the extension of bi-Lipschitz mappings, Selecta Mathematica, 27(2), (2021).
  * [2] Birbrair; L; Fernandes, A; Le, D.T., Sampaio, E; Lipschitz regular complex algebraic sets are smooth, Proc. of the AMS, 144, 983–-987, (2016).
  * [3] Birbrair, L.; A. Fernandes; J. E. Sampaio; M. Verbitsky; Multiplicity of singularities is not a bi-Lipschitz invariant, Mathematische Annalen, 377, 115-121, (2020).
  * [4] J.F. de Bobadilla, A. Fernandes, J.E. Sampaio, Multiplicity and degree as bi-lipschitz invariants for complex sets, Journal of Topology, 11, 958-966, (2018).
  * [Har] Hartshorne, R, Algebraic Geometry, Springer Verlag, New York, 1987.
  * [5] Neumann, W.D.; Pichon, A., Lipschitz geometry of complex curves, Journal of Singularities 10, 225-234, (2014).
  * [6] Sampaio, E.J.; Bi-Lipschitz homeomorphic subanalytic sets have bi-Lipschitz homeomorphic tangent cones, Selecta Mathematica, 22(2), 553-559, (2016).