<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Trusted and privacy-preserving sensor data onloading</title></titleStmt>
			<publicationStmt>
				<publisher></publisher>
				<date>06/01/2023</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10418842</idno>
					<idno type="doi">10.1016/j.comcom.2023.04.027</idno>
					<title level='j'>Computer Communications</title>
<idno>0140-3664</idno>
<biblScope unit="volume">206</biblScope>
<biblScope unit="issue">C</biblScope>					

					<author>Yin Liu</author><author>Breno Dantas Cruz</author><author>Eli Tilevich</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[To personalize their services (e.g., advertisement, navigation, healthcare), mobile apps collect sensor data. Typically, they upload the collected sensor data to the cloud, which returns the inferred user profiles required to personalize mobile services. However, privacy concerns and network connectivity/congestion issues can render cloud-based processing inapplicable. If different apps collect the same type of sensor data, app providers can collaborate by combining their data collections to infer on-device the user profiles required for personalization. Although major mobile platforms provide on-device data sharing mechanisms, these direct data exchanges provide no privacy protection. As an alternative to direct data sharing, we present differentially privatized sensor data onloading for app providers' collaboration. With our approach, app providers can safely collaborate by using shared sensor data to personalize their mobile services. We realize our approach as a middleware that acts as a trusted intermediary. The middleware aggregates the sensor data contributed by individual apps, which execute statistical queries against the combined datasets. Furthermore, the middleware's adaptive privacy-preserving scheme 1) computes and adds the required amount of noise to the query results so as to balance utility and privacy; 2) introduces a Trust-Data Theory so as to detect and remove spurious data from the combined collections; 3) rewards active contributing app providers so as to incentivize data contribution; 4) integrates a Trusted Execution Environment (TEE) so as to secure all data processing. Our evaluation shows that it is feasible and useful to personalize mobile services while protecting data privacy: queries' execution time is within 10 ms; participants' dissimilar privacy/utility requirements are satisfied; untrustworthy data are effectively detected; mobile services are personalized, and data privacy of both app providers and users are preserved 4 .]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Go-Between</head><p>Mobile services have become a crucial part of the digital economy <ref type="bibr">[9]</ref>, generating large and growing revenues for application providers <ref type="bibr">[33]</ref>. Following the long-tail business model, app providers focus on personalizing their mobile services by constructing detailed user profiles, including inferred frequent routes, preferred activities, and daily body vitals, with services ranging between targeted advertising to healthy living tips <ref type="bibr">[11]</ref>. To optimize personalization, app providers continuously collect sensor data by means of mobile apps, linked into data-sharing networks within the same device or across other media (e.g., clouds), thereby creating larger collections for constructing user profiles <ref type="bibr">[18]</ref>. For example, numerous location-based apps (e.g., Google Maps, Uber, Yelp, and TripAdvisor) collect geolocations when each respective app is in operation. If the user frequents the same geolocations when using different mobile apps, these locations are "favorite," a piece of information that can be used to personalize location-based services.</p><p>However, due to data privacy concerns, app providers often hesitate to share sensor data: their collaborators may accidentally expose or even intentionally disclose the shared data, damaging reputation and the bottom line <ref type="bibr">[79,</ref><ref type="bibr">81]</ref>. Since it is the end user who owns all device data, the app provider's privacy directly impacts user privacy. That is, leaking the shared data threatens the privacy of app providers and users. Hence, there is a great need and potential benefit in providing holistic mechanisms for sharing sensor data that preserve the privacy of both app providers and users.</p><p>More importantly, when it comes to data sharing, bad actors may try misleading other contributors by intentionally contributing spurious data. A simple sanity check can quickly filter out physically impossible data contributions (e.g., systolic blood pressure &gt;1k mm Hg); however, such checks would fail for attacks that contribute fake data within an expected range. Similarly, detecting by means of classic statistical criteria, such as Benford's law, 3-&#963; rule, Chauvenet Criterion, and Dixon Criterion, either requires a specific data distribution or imposes restrictive conditions (e.g., only one outlier exists). Modern anomaly detection (i.e., outlier detection) uses machine learning or deep learning algorithms to identify outliers that deviate from the general data distribution <ref type="bibr">[22,</ref><ref type="bibr">28,</ref><ref type="bibr">50,</ref><ref type="bibr">60,</ref><ref type="bibr">77,</ref><ref type="bibr">84]</ref> and has been applied to many research areas (gaze estimation <ref type="bibr">[23]</ref>, cyber-physical systems <ref type="bibr">[19]</ref>, wireless sensor networks <ref type="bibr">[8]</ref>, data streams <ref type="bibr">[78]</ref>, and Internet of Things <ref type="bibr">[54]</ref>), albeit suffering from false positives/negatives. Besides, a detector cannot distinguish whether the outliers come from an intentional (i.e., maliciously adding fake data) or unintentional (e.g., collecting data from an inaccurate sensor) operation, so none of the existing approaches can detect all data outliers. Thus, to mitigate the threat of spurious data contribution, this problem domain requires new and effective solutions that allow data contributors to safely collaborate while preserving user privacy.</p><p>To share the sensor data collected by their mobile apps, app providers can use cloud-based services (the left-most option in Figure <ref type="figure">1</ref>). Each app uploads its collected data to the cloud, which aggregates and analyzes the results. Although the state of the art leverages attribute-based encryption <ref type="bibr">[59]</ref> and blockchain <ref type="bibr">[87]</ref> to help preserve user privacy in data sharing, data privacy preservation remains an open problem in the cloud-based data sharing process, which incurs various concerns: (a) cyber attackers can steal uploaded data by exploiting the cloud server's vulnerabilities [1-7]; <ref type="bibr">(b)</ref> insiders or careless employees can expose private data to the public <ref type="bibr">[95]</ref>; (c) governments can legally force IT companies to reveal their cloud-stored data <ref type="bibr">[92]</ref>; (d) network connectivity/congestion issues can easily render cloud-based processing infeasible, and the high overheads of current cloud-based privacy-preserving solutions (e.g., blockchain, attribute-based encryption) further worsen the availability and feasibility of cloud-based data sharing. In fact, a growing number of privacy tips recommend disabling cloudbased storage and processing altogether with restrictive network access permissions <ref type="bibr">[43]</ref> and network blocking apps <ref type="bibr">[45]</ref><ref type="bibr">[46]</ref><ref type="bibr">[47]</ref>.</p><p>Mobile apps can also share their sensor data locally on the same device (i.e., the middle option in Figure <ref type="figure">1</ref>). This on-device data sharing and processing-referred to as data onloading-has been studied widely in the research literature <ref type="bibr">[49,</ref><ref type="bibr">61,</ref><ref type="bibr">63,</ref><ref type="bibr">94,</ref><ref type="bibr">97</ref>] and adopted in industrial settings. In fact, major mobile platforms do provide standardized mechanisms for the installed apps to share data locally (i.e., "App Groups" <ref type="bibr">[12]</ref> in iOS; Intent, SharedPreferences, and ContentProvider in Android). However, these mechanisms are designed for apps to exchange data directly. As such, they are vulnerable to privacy exploits: the receiver apps can be leaking the received data unwittingly or intentionally. An alternative is for mutually distrustful app providers to discover the commonalities of their data collections (i.e., obtain data intersections) via encryption-based Private Set Intersection (PSI) <ref type="bibr">[52]</ref>. However, intersections alone are hardly ever sufficient to infer the profiles of mobile users.</p><p>Another alternative is to keep the exchanged data private, while permitting the querying of its statistical properties <ref type="bibr">[97]</ref>. Unfortunately, this alternative's vulnerabilities can be exploited. For example, exhaustive frequency queries over a complete finite set can exfiltrate the other contributor's data. A differential privacy mechanism can be applied to alleviate such risks (e.g., PINQ <ref type="bibr">[69]</ref>, GUPT <ref type="bibr">[75]</ref>). However, one cannot directly apply differential privacy due to the unique challenges of our problem domain: 1) how to assign privacy levels to all collaborators (i.e., app providers) that may have dissimilar privacy/utility requirements; 2) how to prevent some app providers from contributing only minimal data but inferring lots of user profiles from the combined datasets; 3) how to defend against attacks that lead to data and operations being illicitly accessed or tampered with.</p><p>To overcome the above challenges, we present a trusted middleware for privacy-preserving sensor data onloading, serving as a trusted intermediary that aggregates the sensor data contributed by the collaborating apps and executes expressive statistical queries against the inaccessible combined datasets (i.e., the right-most option in Figure <ref type="figure">1</ref>). By introducing a trust-data theory, our approach detects and removes spurious data from the combined collections. Besides, it also achieves the privacyutility tradeoffs that satisfy given privacy/utility requirements, incentivizes app providers to keep contributing data, and secures the execution of these query functions by placing them in a Trusted Execution Environment (TEE), whose trusted storage persists the shared data collections.</p><p>We target the dominant mobile platform (&#8776;85% of the global mobile market <ref type="bibr">[53]</ref>), the Android platform, on which apps commonly share data with each other <ref type="bibr">[17,</ref><ref type="bibr">91]</ref>. The reference implementation of our approach-Go-Between-offers a system-level service that aggregates into combined datasets the data contributions of the collaborating apps, which can then query the service to infer user profiles. By adapting differential privacy for our problem domain, Go-Between adds adaptively customized Laplace noise to the query results, thus properly preserving app providers' data privacy. Significantly, by applying a new theoretical detection model, Go-Between detects and removes spurious data contributions from the combined dataset. Besides that, Go-Between balances collaborating apps' dissimilar utility/privacy requirements (i.e., privacy can be increased at the cost of decreasing utility and vice versa.) Further, Go-Between incentivizes data contributions: the more data an app contributes, the more accurate and useful its inferred user profiles are. Moreover, Go-Between applies TEE to the predefined statistical queries (e.g., Count, Mean, and Std), so as to safeguard the operations and their data. Finally, Go-Between keeps the end-user in control of their data by informing them of the data sharing events and explicitly allowing them to restrict apps to share data. The contributions of this article are as follows:</p><p>1. A trusted middleware for differentially privatized onloading of sensor data that is:</p><p>-(a) usable: it dynamically adapts and balances privacy/utility, as driven by the properties of the contributed data; -(b) resilient: it detects and removes spurious data contributions from the combined dataset; -(c) incentivizing: it rewards active contributing app providers with higher utility; -(d) secure: it protects all operations and the contributed data in a Trusted Execution Environment (TEE). 2. A general system design for privacy-preserving data onloading, whose building blocks include differential privacy and TEE. The applicability of this design extends beyond our target domain. 3. A reference implementation-Go-Between-an Android system service, empirically evaluated to demonstrate its efficiency, utility, and safety: all queries execute in &lt; 10 ms; mobile services are effectively personalized, while preserving app providers' privacy. This article extends our earlier conference paper, presented at the 12th EAI International Conference on Mobile Computing, Applications and Services (MobiCASE 2021) <ref type="bibr">[62]</ref>. In comparison to that conference publication (15-page, single-column), this article reports on additional unpublished research that extends our prior work as follows:</p><p>(1) We introduce Trust-Data Theory, which we created to formalize the description of our mitigation strategies for the threat of contributing spurious data. We concretely apply this theory to create a mechanism for detecting and removing spurious data. Furthermore, by simulating an attack of contributing spurious data, we validate that our theory and its reification can effectively defend against such attacks.</p><p>(2) We explain how our programming model, with its reactive/functional programming interfaces, enables Android developers to seamlessly add privacy-preserving sensor data onloading to their mobile apps.</p><p>(3) We also evaluate and report on our approach's programmability by analyzing two widely-used software metrics among our approach and similar Android system services.</p><p>(4) We formulate an Honest-But-Curious attack as a differential privacy problem and simulate such an attack as a control group; we show how without our approach's privacy preserving mechanism, an attacker can always reconstruct the combined dataset by executing particular queries.</p><p>Roadmap: As shown in Figure <ref type="figure">2</ref>, our research methodology proceeds from theory to practical applications, completing with discussion and conclusions. Our theoretical contribution adapts differential privacy for a new problem domain; our practical application introduces the design, implementation, and evaluation of our approach in practice; our discussion contextualizes our approach and its evaluation results.</p><p>Specifically, the rest of this article is organized as follows. Section 2 discusses our application scenarios, threat model, and solution overview. Section 3 presents how our approach applies differential privacy. Section 4 provides our mechanisms to complement differential privacy, including privacy&amp;utility tradeoffs, data contribution incentives, and trust-data theory. Section 5 details design and implementation of our approach. Section 6 presents our evaluation results. Section 7 discusses app provider's data privacy, and our approach's applicability. Section 8 compares our work to the related state of the art. Section 9 presents concluding remarks.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">Go-Between Overview</head><p>To motivate our approach, we present two typical application scenarios and how Go-Between addresses their requirements. Then, we give an overview of differential privacy and key technologies used by Go-Between.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1">Typical Application Scenarios</head><p>I. Geolocations can be used to infer a user profile's location-based properties (e.g., favorite areas). To optimize personalization, app providers frequently collect and share geolocations. An empirical study has revealed how within 14 days 10 different mobile apps, not only mapping and navigation, but also social media (e.g., Facebook) and shopping (e.g., Groupon) <ref type="bibr">[10]</ref>, shared geolocations 5,398 times.</p><p>Consider a navigation app N that collects the user's geolocations to provide real-time traffic information. On the same device, a shopping app R records the user's geolocations independently to learn about the frequently visited areas in order to recommend shopping and dining options. Finally, an exercise app E collects the geolocations of the user's regular running routes. Since all three apps collect geolocations for different purposes, their providers may want to personalize their services, as informed by the combined dataset of their respective collections of geolocations. By querying the combined dataset (e.g., how many times the user visited a given area?), each provider can identify the user's "favorite" areas. This information can improve how each app provider tailors its services for the user, such as displaying ads specific to the favorite areas.</p><p>II. Body vitals, another common type of sensor data, enables app providers to infer a user's health condition. Typical body vitals include temperature, pulse rate, and blood pressure. Health wearables and trackers continuously collect body vitals, sending them for processing and storage to paired devices with specialized apps. For example, a smartwatch or a blood pressure monitor would record a user's blood pressure, with the records transferred to an app running on the user's mobile phone <ref type="bibr">[74,</ref><ref type="bibr">80]</ref>. A mobile app can also receive body vitals from its user's healthcare provider. For example, a recent news report points out that a healthcare record can now be downloaded to its user's mobile apps, so their providers can potentially share the downloaded records with healthcare providers and insurers <ref type="bibr">[89]</ref>.</p><p>Consider a blood pressure monitor app M that periodically measures and records the user's blood pressure. A smartwatch app W records the user's blood pressure at specified intervals. A personal health records app H keeps track of the user's blood pressure readings, taken during doctor's appointments. Since all these three apps collect blood pressure readings, analyzing the combined dataset of their respective collections can provide additional value to the user. For example, the frequency, the mean, and the standard deviation of all the collected readings can indicate a possible hypertension condition rather than experiencing occasional spikes of high blood pressure (due to stress).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2">Solution Overview</head><p>App providers<ref type="foot">foot_0</ref> specify their privacy and utility requirements (e.g., high privacy/medium utility), and then deposit their sensor data (e.g., geolocation/blood pressure datasets) with Go-Between, which aggregates the deposited data into combined datasets for app providers to query. Go-Between differentially privatizes the query results in accordance to both the properties of the deposited data and the specified requirements. Through these queries, the collaborating app providers then personalize their mobile services, without revealing their raw sensor data to their collaborators.</p><p>Specifically, an app first secures a user's permission to deposit a certain type of sensor data with Go-Between, which maintains a trusted record of all user-authored apps/data types. Any permitted app can query the combined dataset of the deposited sensor data type. The apps collaborate via a four-phase process: (1) apps specify their privacy and utility requirements and transfer their sensor data to Go-Between<ref type="foot">foot_1</ref> ; (2) upon each data deposit, Go-Between starts computing the noise scale for each built-in query operation, while detecting and removing spurious data from the combined dataset; (3) the collaborating apps black-box query the combined dataset to infer the user's profile; (4) Go-Between pads the query results with a suitable amount of noise, determined by the pre-computed noise scale, and returns them.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.3">Threat Model</head><p>Since the user owns all the collected data, the privacy of app providers is an integral part of user privacy. Nevertheless, app providers and users incur different data privacy threats, which we discuss in turn next:</p><p>I. App Providers. The process of app providers depositing their sensor data is subject to the following threats:</p><p>(a) to optimize mobile service personalization, every app provider strives to get access to as much sensor data as possible. To that end, a provider could attempt to extract their collaborators' raw data from the combined datasets. This behavior is described by a classical threat model-honest-but-curious attack <ref type="bibr">[83]</ref>: an adversary tries to legally learn all possible information about the combined datasets.</p><p>(b) to prevent the above attack, some app providers may limit their data contribution as much as possible, while taking advantage of their collaborators by inferring user profiles from the combined datasets.</p><p>(c) to illicitly obtain the collected sensor data, malicious parties may perpetrate attacks to access the combined datasets.</p><p>In all three threats above, a dishonest app provider or an attacker assumes the deposited data are entirely accurate and real, so if they illicitly access the combined dataset, they would benefit as a result. However, this assumption does not hold once some bad actor has deposited fake data into the dataset:</p><p>(d) to gain an unfair business advantage, some app providers may deposit inaccurate or outright fake data, thus impairing the utility of the combined datasets.</p><p>For example, a navigation app could intentionally put fake locations into the combined dataset in order to paralyze its competitors' navigation services that rely on the dataset.</p><p>II. Mobile Users. Irrespective of how app providers deposit sensor data, mobile users deeply care about (e) which part of their data will be used and which app providers are involved in the process of data sharing. Specifically, when a mobile app queries a Go-Between's combined dataset, the mobile users are eager to find out what kind of data will be queried and returned. In the meantime, they also care about which mobile apps (i.e., app providers) are querying and exchanging their collected data with Go-Between.</p><p>III. Countermeasures. To ensure data privacy of app providers, we introduce the following countermeasures:</p><p>(a) to defend against honest-but-curious attacks, all query results are differentially privatized, so the participating app providers cannot recreate the combined datasets ( &#167; 3 &#167; 4.1). <ref type="bibr">(b)</ref> to discourage limited data sharing, a query result's accuracy is positively correlated with the size of the querier's data contribution, thus incentivizing large-scale sharing ( &#167; 4.2) (c) to prevent the combined datasets from being illicitly accessed, all above operations and the deposited data take place in a Trusted Execution Environment (TEE) ( &#167; 5.1).</p><p>(d) to mitigate the threat of contributing inaccurate/fake data, such spurious data is detected/removed from the combined datasets, as informed by our trust-data theory ( &#167; 4.3) (e) to keep the user in control, all sharing-related information (the list of apps, the data type, and query, etc.) can be routed to the user for examination and approval. The user can opt out from receiving this information.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.4">Enabling Theory &amp; Technologies</head><p>I. Differential Privacy(DP) <ref type="bibr">[29]</ref> protects an individual's private information from unauthorized discovery (hereafter, individual refers to an app provider, and private information refers to the sensor data collected by a provider.) More formally, a database D is a database of records in a data universe U . Each record contains an individual's private data. Differential Privacy defines two databases D and D &#8242; as neighboring databases if they differ by exactly one record. A mechanism M is a randomized function that maps D to output R. Definition 1: &#949;-differentially private mechanism. Given &#949; &#8805; 0, M is &#949;-differentially private, iff for all neighboring databases (D, D &#8242; ), and for any sets of outputs S &#8838; R:</p><p>(1) Definition 2: sequential composition. Given a set of mechanisms M = M 1 , ..., M n , sequentially executed on a database, with each M i providing &#949; i -differential privacy guarantee, the total guarantee provided by M is:</p><p>Definition 3: global sensitivity. For a query f : D &#8594; R; D,D &#8242; are neighboring databases, the global sensitivity of f is:</p><p>3) The value of &#8710;f (i.e., global sensitivity of f ) indicates the maximal difference between the query results on D and D &#8242; . Definition 4: upper bound of &#949; <ref type="bibr">[58]</ref>. Given a database D &#8242; with n -1 records sampled from D (i.e., D &#8242; &#8834; D and |D &#8242; | = |D| -1), the probability of discovering the record in the database D (i.e., &#961;), the number of records (n), the global sensitivity of query f (i.e., &#8710;f ), and the maximal difference between query results of each possible combination of D &#8242; (i.e., &#8710;v): &#949; &#8804; &#8710;f &#8710;v ln (n-1)&#961; 1-&#961; (4) II. Laplace Mechanism <ref type="bibr">[30,</ref><ref type="bibr">31]</ref> adds independent noise to the actual query results. Lap(&#181;, b) represents the noise sampled from a Laplace Distribution with the scale factor of b and location factor of &#181;. The Laplace distribution <ref type="bibr">[56]</ref> is a double exponential distribution, in which the scale factor b is positively correlated with the amplitude, thus determining the confidence level in the noisy results. Briefly, b determines the amount of Laplace noise to add. Usually, we omit &#181; and use Lap(b) as the added noise. Definition 5 -noise scale. To satisfy &#949;-differential privacy for query f , use scaled symmetric noise Lap(b) with b = &#8710;f /&#949;, that is:</p><p>Lap(&#8710;f /&#949;) (5) By setting the location factor of &#181; with the actual result of query f (D), we can get the privatized value: f (D) + Lap(&#8710;f /&#949;) that ensures the &#949;-differential privacy. Definition 6 -noise scale for a query sequence. To satisfy &#949;-differential privacy for a query sequence f 1 , ..., f n , use scaled symmetric noise:</p><p>Lap( i &#8710;f i /&#949;) (6) III. Trusted Execution Environment (TEE) <ref type="bibr">[35]</ref> provides hardware support for handling sensitive data. TEE (1) partitions the CPU into the normal world for common applications and the secure world for trusted applications; the secure world prevents external entities without authorization from accessing trusted applications; (2) provides trusted storage to persist sensitive data, which can only be accessed via the provided API; (3) provides a secure communication channel for external peripherals. Open-TEE <ref type="bibr">[67]</ref> virtualizes TEE via a software framework. By conforming to the GlobalPlatform Specifications of TEE, Open-TEE hosts trusted applications, in lieu of a hardware-based TEE. Known as an efficient "virtual TEE," Open-TEE features small storage and memory footprints as well as short start and restart latencies for the trusted applications.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">DP: From Theory to Practice</head><p>In this Section, we first explain by example how we apply differential privacy (DP) to defend against the aforementioned honest-but-curious attacks.</p><p>Honest-but-curious attacks. We further develop the scenario in &#167; 2.1 that deposits body vitals. Consider the worst-case scenario: only two apps-H and M-deposit their collected blood pressure readings. As shown in Figure <ref type="figure">3</ref>, H stores its blood pressure readings into the combined dataset (i.e., D -the table on the left). Then, H queries for the frequency of "150", which returns "1", as"150" occurs only once in the combined dataset. After that, M adds one more reading of "150" to the combined dataset (i.e., D' -the table on the right). Then, H repeats the same frequency query on the updated dataset, getting "2" as the result, meaning that "150" now appears twice. In this worst-case, H may also discover that M has stored its dataset between H's two frequency queries. Armed with this fact, H can determine it was M that stored the other value of "150." Counter-measuring with DP. Consider how DP can be applied to defend against such honest-but-curious attacks. The worst-case scenarios above can be formalized as a differential privacy problem (see the formalization below). To put it briefly, a DP mechanism would pad each query result with noise. As an illustration, assume that H's first and second queries are padded with the noise amounts of "0.6" and "-0.5", respectively, so the final results would become "1.6" (i.e., 1 + 0.6) and "1.5" (i.e., 2 -0.5), respectively. These fractional results about the frequency of "150" in the combined dataset still provide useful information (e.g., "1.6" and "1.5" are between 0 and 2). However, now H can no longer infer if M has contributed "150" to the dataset.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>App Provider Systolic Pressure</head><p>Formalizing an attack scenario. As shown in Figure <ref type="figure">3</ref>, let D denote the combined database of blood pressure readings contributed by H, and D &#8242; denote the combined readings database after M inserts one record. Record x denotes the delta between D and D &#8242; , such that D = D &#8242; -{x} (in our case, D = D &#8242; -{150}). H can perform any number and kind of legitimate queries against D (such as the frequency query above). In addition to the information obtained through the legitimate queries, we assume that H also possesses additional background knowledge (e.g., H discovers that M stores a record between H's two frequency queries). Hence, H can act as an adversary that attempts to extract both the raw data content of D and determine which party has contributed which data elements. To discover x, H queries D and D &#8242; . It can do so by executing the same query on D and D &#8242; and computing the delta of the results. The other contributors' privacy becomes breached, as the adversary learns their raw data.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">Complementing DP</head><p>In this Section, we discuss how we complemented DP to meet the privacy requirements in our target domain.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1">Privacy &amp; Utility Tradeoffs</head><p>As discussed in &#167; 3, differential privacy can prevent the potential breaches described in our threat model by adding the Laplace noise to the query results to obtain an &#949;-differential privacy guarantee. However, the resulting noise scale must balance the tradeoffs between privacy and utility. The former represents how much noise to add, while the latter indicates how usable the noisy results are for inferring user profiles. Privacy/Utility are negatively correlated: the higher is the level of privacy, the lower is utility, and vice versa. I. Privacy. Definition (4) determines the upper bound of &#949;, and Definition (5) shows the noise scale. By combining (4)(5), we obtain the lower bound of scaled noise Lap(b) with: b = &#8710;v/ln (n-1)&#961; 1-&#961; (7) As per Definitions (4) and (5) (discussed in &#167; 2.4), &#961; is the probability that the adversary can correctly guess the absence/presence of a record in the combined dataset. n is the number of records. &#8710;v is the maximal difference between the query results of each possible combination of D &#8242; (i.e., the neighboring database discussed in &#167; 2.4-I). Thus, n and &#8710;v can be calculated based on the dataset's properties. &#961; can be configured by apps in order to control the privacy level based on their specific requirements. II. Utility. How accurate the query results are and how frequently the query is executed determine utility:</p><p>a) For accuracy, we define the accuracy level (a) as the distance between the actual query result and the result with noise. We determine a via the percent error formula:</p><p>Result actual (8) Result noise is the query result with noise, and Result actual is the actual query result. The collaborating apps can set the required accuracy level (i.e., a). After adding noise, if the result of a query's accuracy level cannot meet the level set by the app, the query fails.</p><p>b) For usage frequency, we define the usage frequency level (u) as the invocation number of a certain query. Based on the Definition 2, for example, if an app performs a query (providing &#949;-differential privacy guarantee) 10 times, then the query's total differential privacy guarantee is 10 &#8226; &#949;. Each collaborating app can configure its usage frequency level, used to adjust the noise scale. See Noise Increase Scheme ( &#167; 4.2-III) below for details.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2">Data Contribution Incentives</head><p>For app providers to be willing to keep contributing data to Go-Between, three conditions must be met:</p><p>-The privacy level &#961; should be a parameter shared across all collaborating apps. If the specified privacy level affects only the app that specifies it, the resulting perverse incentive would suggest specifying the lowest privacy level to obtain the highest utility. -The amount of contributed data should be commensurate with the obtained utility.</p><p>-The more an app queries Go-Between, the more noise should be added to its privatized query results.</p><p>To meet above conditions, we introduce global privacy level, bonus mechanism and noise increase scheme, respectively. I. Global Privacy Level: For each collaborating app, we define a contribution rate (c):</p><p>where &#969; i is the amount of data contributed by the ith app. By weighting the average value of app-configured privacy levels by their contributed data's amount, Go-Between determines the global privacy level :</p><p>where &#961; i is the privacy level configured by the ith app.</p><p>The global privacy level is used to calculate the noise scale (b) by using (7) (discussed in &#167; 4.1). That is, the more data an app contributes to a combined dataset, the higher the impact of the app's privacy level on the overall global privacy level. This design prevents apps with only a small data contribution from specifying the lowest privacy level with the goal of accurately inferring user profiles. II. Bonus Mechanism: We establish a bonus mechanism that reduces the noise scale (i.e., increases the accuracy) for apps in proportion to the amount of their contributed data. To that end, Go-Between selects 10% of a given query's noise scale as the bonus: BON U S = 10% &#8226; b query , where b query is the query's noise scale. When adjusting i th app's noise scale (b i ), we use the app's contribution rate (c) to calculate its bonus: c i &#8226; BON U S, which is subtracted from the noise scale:</p><p>Noise Increase Scheme: Since every query invocation accumulates &#949; (Definition 2), the likelihood of an attacker discovering the raw dataset is positively correlated with usage frequency level (u) (i.e., the number of query invocations). To reduce the risk of such discovery, Go-Between scales b i up by u i times (i.e., b i * u i ). By increasing the noise scale proportionally to the number of query invocations, Go-Between thus maintains the &#949;-differential privacy.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.3">Trust-Data Theory</head><p>Determining the trustworthiness of data contributions is a hard problem. Existing solutions -sanity checks, statistical criteria (e.g., Benford's law, 3-&#963; rule, Chauvenet Criterion, Dixon Criterion), and modern anomaly detection <ref type="bibr">[50,</ref><ref type="bibr">82]</ref> -suffer from false positives/negatives. Besides, none of these solutions can distinguish whether an outlier was caused by an intentional (i.e., fake data) or unintentional (e.g., inaccurate sensor reading) contribution.</p><p>For our target domain, we present trust-data theory that reconsiders spurious data as a special kind of noise to enhance our privacy model. Although contributing spurious data perpetrates an attack, we recast this attack to perturb the combined dataset in order to achieve the required privacy/utility tradeoff. Further, we develop a statistical testing method that determines whether app-contributed data, irrespective of its trustworthiness, protects privacy. I. Using spurious data. We observe that spurious data can be used to preserve data privacy. Consider how differential privacy (DP) works: compute a noise value, add it to the actual data, and return the result. That is, after adding the noise, differential privacy converts the "actual data" to the "spurious data" to protect data privacy. Since the contributed "spurious data" changes the original dataset's distribution within an acceptable range, DP still provides useful query results. Hence, unless the newly contributed data completely changes the original dataset's distribution, the data contribution, irrespective of its trustworthiness, can be accepted. In the following discussion, we explain how we determine the threshold at which the contributed data changes the original dataset's distribution. &#945; is a threshold (i.e., lower-bound of T S): the smaller &#945; is, the less stringent the trust condition is; the more privacy is preserved, the less utility is provided. That is, having a smaller &#945;, a larger amount of untrustworthy data can be accepted. In the extreme (i.e., &#945; = 0), data privacy is well-protected if all the data is untrustworthy. By using &#945;, Go-Between determines whether the newly contributed data is acceptable. The value of &#945; can be decided differently. By default, Go-Between sets &#945; to each app's reputation score. II. Determining the value of &#945;. The app reputation score metric has been widely applied to app markets (e.g., <ref type="bibr">Google Play [40]</ref>). In addition, many anti-malware providers, such as McAfee, Trend Micro, and Sophos Mobile, develop their own app reputation systems and report the apps with low reputation scores as posing a high security and privacy risk <ref type="bibr">[66,</ref><ref type="bibr">90,</ref><ref type="bibr">93]</ref>. The app reputation score systems provide a straightforward guide to distinguish which apps can be trusted. We also assume that, by employing crowdsourcing and sophisticated program analyses, modern reputation management systems would be unlikely to report the High trust level for any malware. Hence, we set the value of &#945; to each app's reputation score (e.g., the score can be collected from the Google Play). Specifically, for the collaborating apps with low scores, we assign a high &#945; value, i.e., only accept the newly contributed data that preserves the original privatized result's distribution; for those with high scores, we assign a low &#945; value, i.e., accept their contributed data even if it may change the privatized result's distribution (see &#167; 5.3-III). III. Defending progressive data distribution attack (PDDA). Determining whether the newly contributed data (&#8710;D) is trustworthy proceeds as follows. Based on the supported queries' noise scale, calculate Trust Sensitivity (T S) and compare it with the data contributor app's threshold &#945;. However, consider the contributor app sharing a small size of &#8710;D (in the extreme, only one record in &#8710;D). Obviously, growing the deposited dataset by a small chunk is unlikely to impact the overall distribution. Hence, for large original datasets, &#8710;D, in all likelihood, will be recognized as trustworthy data. Then, an attacker can continuously grow the dataset by contributing small chunks until the dataset's distribution is impacted. We call this attack progressive data distribution attack (PDDA).</p><p>To defend against PDDAs, Go-Between applies statistical sampling: before calculating the noise scales for the new and original datasets, it first compares their sizes, samples the larger one, creating a sampled dataset of the same size. In addition, to ensure the reliability of data distribution, Go-Between requires that the newly contributed data (&#8710;D) must contain at least 20 items (i.e., smaller datasets are not accepted as contributions) <ref type="foot">8</ref> . Because T S is calculated from the sampled datasets (i.e., containing the same number of items), malicious contributors would be unlikely to succeed in growing the combined dataset by contributing small chunks without impacting the overall distribution. For example, consider the original dataset of size 100,000 and &#8710;D of 20. Go-Between randomly selects 20 records from the original dataset as a sampled dataset, and uses this sampled dataset and &#8710;D to calculate T S. That is, although the original dataset's size of 100,000 is much greater than the &#8710;D of 20, the T S is calculated from the sampled dataset of size 20 (i.e., the same as &#8710;D), thus defeating PDDAs. We detail all the above mechanisms in &#167; 5.3 below.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">System Design &amp; Implementation</head><p>Our approach is reified by the Go-Between framework, whose design and implementation we describe in turn next.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.1">Architecture</head><p>Mobile Apps configure their privacy and utility requirements, persist their individual collections of sensor data, and perform predefined queries on the combined dataset via the Go-Between API (step 1). The API interacts with Go-Between service (step 2), a system-level Android service that encodes the data via the Encoding Protocol (step 3) and executes service calls (i.e., query, persist, and configuration) via Native Interface (step 4). Finally, the data is passed to TEE to be securely operated on (step 5).</p><p>Then, TEE-based operations (i.e., Data Ops:data management, query Ops:query, and DP Ops:differential privacy operations) execute on Combined Set, with all configurations stored securely in Configs (step 6). Finally, the results are returned from TEE to Mobile Apps. More importantly, based on the persisted data's content and configuration, Accessibility Components calculate the noise scale for each supported query type and detects whether the newly contributed data is trustworthy. These two features run on dedicated worker threads, synchronized by means of Android's Handler and Message. In addition, whenever an app issues a query request, Go-Between Service can be configured to notify the permission granting app (i.e., User Consent), so the end-user can approve the request to proceed.</p><p>Go-Between is integrated into the Android Platform as part of its standard SDK: Go-Between API and Accessibility Components into the Android Framework Layer, Go-Between Service into both the Framework and Native Library Layers, Encoding Protocol into the Native Library Layer, and Native Interface into the Hardware Abstraction Layer <ref type="bibr">[41]</ref>. Since inadvertent misconfigurations or system attacks can cause data leakage, Combined Set and Configs are placed in TEE to become hard-to-compromise, while Data Ops, Query Ops, and DP Ops run in TEE as trusted operations. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Go-Between Service</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.2">Programming Model</head><p>In the application scenario in &#167; 2.1, a blood pressure monitor app M, a smartwatch app W, and a personal health records app H cooperate to infer whether their user is suffering from hypertension. When in operation, each app is recording the user's blood pressure. These apps must be retrofitted to use Go-Between services, and their installation procedure must secure a permission to do so, with Go-Between keeping track of the permitted apps. Once the installed apps start persisting their data collections in Go-Between, the combined dataset becomes available for querying. The code snippet below and Figure <ref type="figure">6</ref> show the Go-Between programming interface and its interactions with the rest of the framework, respectively. First, M, W, and H each obtains a service instance from the Android service manager (line 1). Then, method setContext sets application context (line 2), which determines a unique interaction id between an app and Go-Between. Next, the apps configure their privacy and utility requirements (steps 1,2; lines 3). Step 3 in Figure <ref type="figure">6</ref> identifies the data persistence phase; method storeData (line 4) takes the parameters containing a private data collection and its data type. These parameters are transferred to Go-Between Service (step 4). The data type parameter identifies the type of the passed dataset's items. Then, Go-Between combines the data collections with the same data type in a combined dataset in TEE for inferring user profiles.</p><p>1 GoBetweenManager&lt;Double&gt; gb = (GoBetweenManager) getSystemService(GOBETWEEN_SERVICE); 2 gb.setContext(application_context); 3 gb.setRequirements(query_type, privacy_level, accuracy_level, usage_freq);; 4 gb.storeData(data_type, data); 5 MathObservable.Mean().subscribe(callback);</p><p>For each predefined query, Go-Between service calculates the noise scale using the contributed data and configured privacy level, while detecting and removing spurious data from the combined dataset (step 5). These two features run on dedicated worker threads, synchronized by means of Android's Handler &amp; Message. Go-Between adopts the function query interface of RxJava <ref type="bibr">[86]</ref> to provide reactive queries (Mean in example, line 5). By executing the actual data calculations in TEE, the design is invulnerable to malicious tampering or interception. By adding noise to the returned query results, the design prevents apps from uncovering the raw collections of their collaborating apps. If a query cannot be executed with the required levels of privacy and utility, it throws a runtime exception that must be caught and handled.</p><p>Before using any Go-Between services, an app must secure an explicit permission from the mobile user. To that end, Go-Between first notifies the user about the apps involved, the data type they want to share, and which query is performed (step a). Then, the user communicates with Go-Between to grant the permission (step b). If the permission is declined, the involved parties can request it again at some later point. Once the permission is granted, the parties start collaborating via Go-Between.</p><p>Go-Between effectively reconciles the requirements of protecting data privacy and of inferring user profiles from the protected data. We describe how Go-Between addresses these two requirements in turn next.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.3">Privacy Mechanism</head><p>Go-Between's adaptively parameterized privacy mechanism: 1) configures each app's privacy and utility requirements, 2) determines the required noise scale, 3) detects and removes spurious data, and 4) adds noise and verifies the results still meet the requirements. Consider applying the predefined query Mean, which obtains the mean value of the combined dataset, to our running example of sharing blood pressure readings. Suppose the personal health records app H prefers higher privacy and utility levels of Mean, so it may set the privacy level to Critical, the accuracy level to Exact, and the usage frequency level to Frequent; the smartwatch app W prioritizes privacy only, so it could configure the requirements as Highest, Estimate, and Rare, respectively; the blood pressure monitor app M, with regular privacy and utility requirements, may set all parameters to Default. Based on a given configuration, Go-Between automatically calculates the required noise scale, and determines how to execute each query. II. Noise Scale Calculation. Once apps specify their privacy/utility requirements and persist their datasets into TEE, Go-Between calculates the noise scale for each query in two steps: 1) determine the global privacy level (i.e., &#961; global ) for the combined dataset contributed by the collaborating apps, 2) use &#961; global to determine the noise scale (i.e., b) required to fulfill the privacy/utility requirements of each app. In addition, Go-Between incentivizes the collaborating apps to keep contributing data (as discussed in &#167; 4.2).</p><p>To illustrate how Go-Between determines the global privacy level, consider the running example of apps H, W, and M setting their respective privacy levels for the Mean query to Critical (i.e., &#961; H ), Highest (i.e., &#961; W ), and Default (i.e., &#961; M ), respectively. Go-Between first looks up the actual probability values for these human-readable levels as per Table <ref type="table">1</ref>:&#961; H =5%, &#961; W =1%, &#961; M =20%. Then, by weighting the average value of these probabilities by the data collection size of each app, Go-Between determines the global privacy level:</p><p>where c is the data contribution rate of each app (as per formula-10 in &#167; 4.1). Because Go-Between updates &#961; global whenever new apps join an existing data sharing collaboration, &#961; global always reflects the actual privacy requirement of the collaborating apps.</p><p>Having determined the global privacy level (&#961; global ), Go-Between plugs the resulting value into the formula-7 ( &#167; 4.1) that calculates the noise scale of each predefined query: b = &#8710;v/ln (n-1)&#961; 1-&#961; , with &#961; becoming &#961; global , n becoming the size of the combined dataset, &#8710;v becoming the maximal difference between the query results of each possible combination of the database D &#8242; (n -1 records sampled from previous combined dataset D). To determine &#8710;v, n -1 records are sampled from the combined dataset by performing each query on n different data combinations (i.e., n n-1 ). For example, for a combined dataset of 1000 items, select 999 (i.e., 1000 -1) records, and perform a given query on them obtaining a result. Then, repeat this process to obtain the query results of 1000 different data combinations. Next, use the max and min results to calculate the &#8710;v for this query. Finally, calculate this query's noise scale using the formula-7 above. Go-Between obtains the noise scale for each predefined query, persisting the results into TEE.</p><p>To determine the final noise scale for each app, Go-Between executes the bonus mechanism and applies the noise increase scheme. In our running example, suppose the contribution rates (c) of apps H, W, and M are c H , c W , and c M , respectively, while their usage frequency levels (u) for the Mean query are Frequent (i.e., u H ), Rare (i.e., u W ), and Default (i.e., u M ), respectively. These levels correspond to the max # of invocations: u H = 50, u W = 5, u M = 10 (as per Table <ref type="table">1</ref>). Then the actual noise scale of Mean for each app is calculated using:  If a lvl &#8804; a H , Go-Between returns the noisy result or failure otherwise.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.4">Inferring User Profiles</head><p>Go-Between offers trusted, TEE-based operations, exposed via the reactive and functional programming interface of RxJava, a popular reactive programming framework with a large set of predefined data operations that can be flexibly fused. 1) TEE-based Reactive Query. The reactive programming in RxJava framework creates asynchronous data streams, which can be observed and operated on. Go-Between moves the creation of data stream into TEE. To that end, Go-Between provides a set of statistical queries (e.g., count, mean, std.) whose execution creates a data stream. These queries operate in TEE and obtain the &#949;-differentially private results as data streams, operated on by means of the customized RxJava framework to combine and filter them.</p><p>Consider how App M can infer whether the user suffers from hypertension: invoke the predefined queries of Mean to obtain the distribution of the combined dataset of blood pressure readings. M creates a data stream by invoking Mean API to obtain the mean value, with the request being passed to Go-Between service. The permitted request is encoded and passed to TEE, which executes the actual Mean operation. The operation's result is padded with noise, verified, and returned as a data stream.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>2) Flexible Inference with Function Fusion.</head><p>A powerful functional programming mechanism, function fusion, creates new functions by efficiently combining and customizing existing ones <ref type="bibr">[24]</ref>. Go-Between adopts this mechanism, allowing to fuse both predefined and user-defined functions via the client interface of the RxJava framework.</p><p>Consider our running example , app M needs to calculate the probability that a given blood pressure reading is in the combined dataset. Although Go-Between provides no predefined operation for this calculation, M can fuse the predefined CountAll and CountOne, as follows: App M first calls CountAll to create a TEE-based data stream of the combined dataset size, referred to by an Observable object (line 2). Similarly, calling CountOne produces another Observable that refers to a data stream that contains the number of items in the dataset as per the bp parameter (i.e., the given blood pressure reading) (line 3). Go-Between fuses these two operations together with standard API zip (line 4), which passes each operation's data stream to the downstream function (i.e., call) as the parameters (line 7). Finally, call calculates the probability of the given blood pressure reading being present (line 8).</p><p>To fuse a predefined operation with a custom function, Go-Between uses function subscribe, as follows:</p><p>.subscribe(new Action1&lt;Double&gt;(){ 3 @Override 4 public void call(Double d){...} };</p><p>Having created a TEE-based data stream of standard deviation (Std), the developer subscribes a custom function for this data stream with subscribe (line 2). Then, the data stream is passed to downstream custom function call (line 4).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6">Evaluation</head><p>The following questions drive our evaluation.</p><p>-Q1. Feasibility: Does Go-Between offer acceptable performance levels? -Q2. Utility: Do Go-Between's data sharing collaborations satisfy dissimilar app requirements? -Q3. Safety: How effectively does Go-Between eliminate the threats of apps uncovering their competitors' raw data? -Q4. Programmability: How do the software metrics of Go-Between compare to those of similar Android system services?</p><p>6.1 Experimental Setup 1) Experimental Environment Choice. We implement and evaluate Go-Between using the official Android source code release, Android Open Source Project (AOSP), which provides an official virtualized execution environment <ref type="foot">9</ref> for testing and debugging Android apps. Because its standard distribution excludes a TEE component, we integrated Open-TEE<ref type="foot">foot_5</ref> with AOSP by adding the Open-TEE source code to the main codebase of AOSP and building them together into a single executable image. To maximize the number of Android apps compatible with Go-Between, while having access to as many of advanced Android features as possible, we use the Android Lollipop 5.1 release, currently run by 14.4% Android devices (the third highest percentage among the 13 most popular Android platform versions <ref type="bibr">[38]</ref>) and has cumulatively covered 80.2% devices (cumulative distribution <ref type="bibr">[36]</ref>).</p><p>2) Software &amp; Hardware. The main system components of our experiments are: platform version is Lollipop; host OS is Linux; CPU (MHz) is 3599.943; cache size (KB) is 2048; and TEE solution is Open-TEE.</p><p>3) Benchmarks. To establish a performance baseline, we create a set of benchmarks that isolate the Go-Between's operations that store data collections and perform the pre-defined queries. Real-world Android apps can directly invoke these operations ( &#167; 5.1).</p><p>In addition, the software-based virtualization of TEE is bound to exhibit performance levels inferior to those offered by hardware-based implementations. Hence, our performance results not in any way unfairly benefit our approach. Since w.r.t. performance, our evaluation goals are only to demonstrate that it is feasible to offer a Go-Between-like service locally on the device, in the presence of an actual hardware-based TEE, the overhead of using Go-Between can only decrease.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.2">Evaluation Design</head><p>Q1.Feasibility: Despite the computationally intensive nature of data processing, Go-Between must operate unintrusively, with performance overheads comparable to those of similar Android system services. In light of these evaluation objectives, we design a set of representative micro-benchmarks and application scenarios, and measure the performance of the Go-Between-related functionality. Then we compare these results with Android App's standard response time limitation (i.e., Application Not Responding (ANR) error). Specifically, we measure the total execution time (T total ) it takes to execute a Go-Between operation with realistic data by a single app to understand service's performance impact. Specifically, we measure the total execution time taken by the predefined storeData, Mean, Std, CountOne, and CountFreq operations. Go-Between calculates noise scales and detects untrustworthy data concurrently on separate worker threads, whose performance we chose not to evaluate as they leave the main execution unperturbed. Q2.Utility: We follow our running example-I ( &#167; 2.1): with apps N (App1), E (App2), and R (App3) collecting geolocation data and collaborating via Go-Between to discover their user's favorite locations. The user in this experiment is the Yeti<ref type="foot">foot_6</ref> , who according to Nepali folklore haunts the Himalayas <ref type="bibr">[57]</ref>. As it turns out, the Yeti is a sophisticated and demanding mobile user. Due to the need to keep his existence inconspicuous, the Yeti refuses to upload any of the sensor output of his apps to the cloud; besides, the network infrastructure of Himalaya renders any cloud services inaccessible. Nevertheless, the Yeti demands highly personalized mobile services that customize the actively used apps to his usage profile.</p><p>App1, App2, and App3 deposit with Go-Between 100, 50, and 20 Himalayan geolocations, respectively. The experiment queries the combined dataset to determine the Yeti's favorite locations (i.e., CountFreq). The input is a square area, while the output is the number of times the Yeti visited the area. Each of the apps queries three areas, with different privacy and utility requirements. We seek answers to these questions: 1) how beneficial is Go-Between in discovering the Yeti's favorite locations as compared to using only the data of individual apps? and 2) how do the privacy and utility requirements affect the Go-Between's results? Q3.Safety: We follow our running example-II ( &#167; 2.1): a healthcare app H collects snapshots of systolic blood pressure (SYS). H applies Go-Between to persist its data collection of 100 records into TEE for collaborating with other apps, and sets its privacy and utility requirements as Highest (i.e., privacy level &#961; H ), Default (i.e., accuracy level a H ), Default (i.e., usage frequency level u H ). Then, we simulate two attack scenarios:</p><p>(1) Revealing raw data: Because the reasonable range for SYS is between 90 and 180 mm Hg, H's competitor app C performs CountOne<ref type="foot">foot_7</ref> on all possible values to discover the combined dataset's raw data. Further, to maximize the opportunity to uncover the raw data of H, the app C sets its requirement as Lowest (i.e., privacy level &#961; H ), Highest (i.e., accuracy level a H ), Default (i.e., usage frequency level u H ). Hence, it can contribute a large number of records to heighten the weights, thus decreasing the privacy level of the entire dataset. Then, app C performs CountOne on the combined dataset to obtain the frequency of each possible SYS occurrence. Finally, it compares these query results with its own dataset to infer app H's raw data. We evaluate with app C's data sizes of 20, 100, 1000, 5000 to a) verify whether our approach can preserve the data privacy for each collaborating app; b) to determine the resiliency of our privacy protection as a relation to the size of the attacker's contributed dataset. To demonstrate how other data sharing approaches behave under this attack, we reproduce a classic honest-but-curious attack as the control group (released online: (2) Contributing spurious data: Suppose H persists its data collection of 100 SYS values (&#8776;120 mm Hg) recorded from a healthy person. Then, app C generates and persists random numbers to the combined dataset. Without loss of generality, we assume that both H and C set their privacy and utility requirements as Default, and H's trust level is 3 (Tab 2, i.e., set the threshold &#945; to 0.5). As discussed in &#167; 4.3, if T S &lt; &#945; (i.e., 0.5), Go-Between recognizes the newly contributed data as spurious, removing it from the combined dataset. C can generate data collection within the range of (0, 90), <ref type="bibr">[90,</ref><ref type="bibr">180]</ref>, and <ref type="bibr">[110,</ref><ref type="bibr">130]</ref>, and the generated data collections can be 20, 100, 1000 records. To measure the worst possible case, we assume C can generate and persist random data collections many times to make its T S value greater than &#945;. Specifically, we evaluate C's attempts numbered at 100, 10000, and 1000000 to identify the maximum T S value, thus verifying how effectively Go-Between detects the contributed spurious data. Q4.Programmability: We count the uncommented lines of code (ULoc) and the cyclomatic complexity in the most common usage scenario: an app persists its data collection via storeData, and then performs statistical queries (via single or fused operations). Besides, we select two standard Android APIs (Backup service <ref type="foot">13</ref> , and Location service <ref type="foot">14</ref> ) as the control group, and count their ULoc as based on the Android official usage guides <ref type="bibr">[37,</ref><ref type="bibr">39]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.3">Results</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Q1.Feasibility:</head><p>As discussed in &#167; 6.2, we benchmark the respective latencies of persisting data (i.e., storeData), and querying the combined datasets (i.e., Mean, Std, CountOne, and CountFreq) with dissimilar data sizes (i.e., 20, 100, 1000, 5000). As shown in Fig. <ref type="figure">7</ref>, neither of the predefined queries exceeds 10 ms in latency, due to their low asymptotic complexity O(n). For storeData, as the data size grows, so does the execution time (12 to 48ms), as the increases in data size are directly proportional to the work performed by the data encoding/decoding and storing processes. To sum up, the Go-Between API operations execute within the maximal threshold imposed by the Android platform (response time&lt;5s <ref type="bibr">[44]</ref>) and expected by end-users (response&lt;1s <ref type="bibr">[71]</ref>); even the longest observed response time taken by store-Data (&#8776;48 ms) is still within these boundaries. Q2.Utility: As shown in Fig. <ref type="figure">8</ref> (in square), without Go-Between, the query of "how many times the Yeti visited a given area", performed by App1, App2, and App3 returns 17, 45, and 0, respectively, for Area-A; 31, 1, and 6 for Area-B ; and 10, 0, and 8 for Area-C. Hence, App1 would think Area-B as Yeti's favorite, App2 Area-A, and App3 Area-C. However, in fact, the Yeti's favorite area is A (62 visits overall), so without Go-Between the Yeti would be left very unhappy with the customizations of App1 and App3.</p><p>We study the utility of Go-Between under different requirements. Fig. <ref type="figure">8</ref> shows (in bubble shape), with the "Default" settings for all requirements, the subject apps obtain 63.15, 66.96, and 58.89 visits of Area-A (i.e., the bubble in the upper left corner). The &#949;-differential privacy of these results is based on the configured "Default" privacy level for each app. The noise added to these results is based on each app's noise scale (n) of this query. Because App1 contributes more data than App2, which contributes more data than App3, n 1 &#161;n 2 &#161;n 3 . By adding the least noise to App1's result, Go-Between makes it most accurate (i.e., 63.15 is the closest to the actual result of 62). Although one cannot guarantee that App1's results would always be the closest to the actual value, the smallest noise scale maximizes such chances, in conformance with Laplace distribution.</p><p>Setting the privacy level to "Highest" reduces accuracy the most. As shown in the bubble in the middle left of Fig. <ref type="figure">8</ref>, with the highest level, the query results for Area-A become: 74.81 (App1), 45.50 (App2), and 77.98 (App3), deviating greatly from the actual result of 62. Hence, one can increase privacy at the cost of accuracy, and each app can specify the accuracy level as required for a given scenario. To maximize accuracy, apps set their privacy level to "Lowest" and query for Area-B (actual value: 38). Indeed, the results' accuracy increases: 39.78 (App1), 39.07 (App2), 35.53 (App3) (i.e., the bubble in the middle). Notice that the result for App2 (i.e., 39.07) is closer to the actual value than that of App1 (i.e., 39.78). For very small noise scales, the amount of added noise is small as well, making the results of App1 and App2 close to each other. Despite the differences in the added noise, the results still conform to the Laplace distribution. As discussed in &#167; 5.3, the app contributing more data increases its power to impact the combined dataset's privacy level. To evaluate this feature, we let App1 and App2 (respectively contributing 100 and 50 geolocations) set their privacy levels to "Highest", while keeping it "Lowest" for App3 (contributing only 20 geolocations). The results (i.e., the bubble in the bottom middle of Fig. <ref type="figure">8</ref>-App1: 46.05; App2: 27.97; App3: 31.69) show that even with "Lowest" privacy level for App3, the global privacy level increases, as the other apps contribute more data.</p><p>As discussed in &#167; 5.3, the usage frequency level also trades privacy for accuracy: the more a query executes, the easier it is for an adversary to discover the raw data of others. Go-Between mitigates this risk by increasing the noise scale in accordance with the observed usage frequency, which corresponds to the max number a query has been invoked. To evaluate this feature, we let all apps set their usage frequency to "Highest", meaning that the query can be repeated up to a 100 times. The results (i.e., the bubble in the upper right corner) become 44.75 (App1), 37.51 (App2), and 8.39 (App3), while the actual value is 18. That is, by setting the usage frequency level to "Highest", apps can continuously invoke frequent queries whose results would not be as accurate. Q3.Safety: (1) Defending against the attack of revealing raw data: App H deposits with Go-Between a dataset containing 20 duplicate systolic blood pressure (SYS) snapshots of 150 mm Hg. App C perpetrates an attack to discover H's raw data, by setting its privacy level to "Lowest" and performing the query CountOne(150) (i.e., "how many times does value 150 appear in the combined dataset?"). Table <ref type="table">3</ref> shows that, with the size of its contributed dataset growing (the "Size" column), C's contribution rate increases (the "Contribution Rate" column), noise scale decreases (the "Noise Scale" column), and query results (the "Noisy Value" column) approach the actual value (i.e., 20). With C's "Lowest" privacy level, as the size of C's contributed dataset increases, the global privacy level decreases, producing a fairly small noise scale to privatize the query results. Therefore, with little added noise, the C's query results are close to the actual values. Note that the added noise conforms to the Laplace distribution, whose peak's sharpness is controlled by the noise scale. The smaller the noise scale, the sharper the Laplace distribution's peak, so the added noise fluctuates less, increasing the confidence in the accuracy of the query results. That is, with the actual value of 20, querying a dataset of 1000 items produces 20.39, while querying a dataset of 5000 items produces 19.49. Although 20.39 is closer to 20 than 19.49 is, the second query's noise scale is lower, increasing the attacker's confidence in its ability to discover the actual value. However, Go-Between still prevents the attacker from determining what the exact raw data is.</p><p>To summarize, a) with high contribution rates, attackers may roughly guess what the raw data is, while being unable to discover the exact values; b) to reduce the risk of such attacks discovering the raw data, collaborating apps can increase the global privacy level by contributing more data.</p><p>(2) A Control Group: an Honest-But-Curious Attack: We develop the application scenario in &#167; 2.1-II, in which the apps M, W, and H collect the user's blood pressure readings. Firstly, we implemented an Android service whose access API provides two methods-store and frequency. The intended usage scenario is for the collaborating apps to first store their sensor data with the service, which is then queried for the occurrence frequency of given elements in the resulting collection. We then reproduce the honest-but-curious attack: M, W, and H store their respective collected blood pressure readings with the service. Afterwards, H, which acts as an honest-but-curious party, performs frequency queries with the goal of uncovering the combined collection of blood pressure readings. Background knowledge suggests that the reasonable range for systolic pressure are integer values between 90 and 180 mm Hg. By exploiting this fact, H performs 91 frequency queries for each possible value in this range. The return result of each query is then compared with the H's own dataset. By subtracting the number of occurrences of the queried value from those in its own set, H deduces the actual values stored in the combined dataset. In this experiment, we randomly generate the blood pressure collections for M, W, and H. In the 1000 repeats of the experiment, H was always able to uncover the combined blood pressure readings. (3) Defending against the attack of contributing spurious data: Tab. 4 shows the evaluation results of detecting untrustworthy data. First, the randomly generated data collection's T S value is positively correlated the degree of similarity between the generated data and the original dataset. Since the dataset contains 100 records of SYS values that are around 120mm Hg, the generated data collection within the range of [110, 130] obtains large T S values (&gt;0.7), and that within the range of (0, 90) obtains small T S values (&lt;0.3). Second, the more attempts of generating data are, the more opportunity is for the data's distribution to be close to the original one, and the larger the T S values are (see the difference between the "1M" and "100" columns). Third, the more records are in the generated random data collection, the more stable the T S value is. The 100-record data collection's T S values are always stable, similar to 1000-record's ones (a large collection is sampled to 100 records to calculate its T S value). However, with 20 records, because it is more likely to randomly generate numbers having a similar distribution to such a small amount of data, the data collection's T S values fluctuate but still has an upper bound. That is, in the range of <ref type="bibr">[90,</ref><ref type="bibr">180]</ref>, the generated collection's T S is fluctuating between 0.40 and 0.62, but is always lower than the T S ([0.75, 0.8]), whose collection falls in <ref type="bibr">[110,</ref><ref type="bibr">130]</ref> (closer to the original data).</p><p>To sum up, in our case (i.e., &#945; = 0.5), Go-Between successfully detects the untrustworthy data (i.e., the entire row of SYS value: (0, 90), and the row of SYS value: <ref type="bibr">[90,</ref><ref type="bibr">180]</ref> with 100 and 1000 records) and removes it from the combined dataset. In contrast, once a given data collection's distribution is similar enough to the original dataset, Go-Between considers contributions as trustworthy data (i.e., distribution impacts are acceptable), keeping them in the combined dataset. Q4.Programmability: Table <ref type="table">5</ref> presents the software engineering metrics of using Go-Between and two representative Android system services. To assess the programming effort required to apply Go-Between, we measure its metrics in a normal use case and compare the results with similar cases in the control group (receive location updates for the location service <ref type="bibr">[42]</ref>, and back up SharedPreferences for the backup service <ref type="bibr">[37]</ref>). The Go-Between metrics are within the expected range, 11 ULoc (calculate mean in &#167; 5.2) and 21 ULoc (calculate probability in &#167; 5.4), with the cyclomatic complexity of 2. In contrast, the representative services take between 10 and 13 ULoc with comparable cyclomatic complexity. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7">Discussion</head><p>In this section, we start by discussing the main findings of our approach, comparing it with standard Android services and other studies. We then illustrate the implications and explanations of the findings as well as the strengths and limitations of our approach. Finally, we conclude these discussions by recommending to practitioners how to effectively preserve data privacy within the device and drawing future directions.</p><p>(1) Main findings</p><p>Finding-1 The performance and implementation costs of privacy-preserving operations for ondevice data sharing (i.e., data on-loading) are not prohibitively expensive. As per &#167; 6.3-Q1 and Q4, Go-Between's differential privacy-based queries and interfaces impose modest performance and implementation overheads on the underlying Android system: all queries execute in &lt; 10 ms, with the extra functionality taking fewer than 21 ULoc with the cyclomatic complexity of 2 to implement.</p><p>Finding-2 It is possible to satisfy data sharing participants' dissimilar privacy and utility requirements to a large extent. As per &#167; 6.3-Q2, by tuning the privacy, accuracy, and usage frequency levels, one can trade their data privacy for utility and vice versa.</p><p>Finding-3 Defending against the attacks of revealing raw data and contributing spurious data is possible for data sharing. As per &#167; 6.3-Q3, with a differential privacy-based mechanism, Go-Between effectively reduces the possibility of guessing the raw data from the shared dataset. Moreover, guided by Trust-Data Theory, Go-Between can successfully discover untrustworthy data.</p><p>(2) Comparisons One could have highlighted our approach's traits by comparing our evaluation results with existing works. However, to the best of our knowledge, the relevant data sharing solutions either do not work on Android or support different data types and queries. Hence, it remains an open question of how to construct a suite of reasonable and consistent criteria and provide a valid comparison with these existing works, despite their dissimilar usage scenarios, execution environments, and application scopes.</p><p>To mitigate the above problem, we carried out the following comparisons:</p><p>we compared the execution time between our approach's API operations and the maximal threshold imposed by the Android platform (response time&lt;5s) and expected by end-users (response&lt;1s).</p><p>The evaluation results show that Go-Between's operations of persisting data and querying the combined datasets execute within 10 ms, which is far less than the above thresholds; we reproduced a classic honest-but-curious attack of revealing raw data as the control group. The evaluation result shows that, without our approach's privacy-preserving mechanism, an attacker can always reveal the combined dataset by executing particular queries; we mimicked an attack of contributing spurious data. The evaluation result demonstrates that Go-Between can successfully detect untrustworthy data; we compared the cyclomatic complexity between our approach's API and two standard Android APIs (Backup, and Location service) that support usage scenarios similar to ours. The evaluation result shows that Go-Between's interfaces add 21 ULoc with the cyclomatic complexity of 2, similar to these two standard Android APIs above.</p><p>(3) Implications &amp; Explanations (a) App providers' privacy vs. mobile users' privacy: Since all deposited data belongs to the device user, improving the data privacy of app providers also improves user privacy. In contrast to those privacy preservation approaches that focus exclusively on user privacy without any regard for the business aspirations of app providers, we strive to take a more holistic approach. We acknowledge that app providers need to achieve their business objectives of personalizing mobile services and provide them with a convenient privacy-preserving framework to accomplish that. In essence, our goal is to take away a major motivation for app providers to illicitly bypass the privacy protection mechanisms in place. Our middleware enables app providers to accomplish their business objectives in a privacypreserving fashion, thus implicitly improving end-user privacy.</p><p>(b) Privacy &amp; utility tradeoffs: Our evaluation results in &#167; 6.3 illustrate that, with dissimilar accuracy, privacy, and usage frequency levels (discussed in table 1), the same query will return different values from the combined dataset. The reason is that the value of these levels directly impacts how to calculate the noise scale, which controls how much noise will be inserted into the original data. Hence, by tuning these levels, app providers can balance their mobile service's utility and data privacy.</p><p>(c) About contribution rates: Recall that we introduce the contribution rates for incentivizing app providers' data contribution: the more data an app contributes, the more accurate its query results are (discussed in &#167; 4.2). As shown in Table <ref type="table">3</ref>, the noisy value (i.e., <ref type="bibr">19.49 and 20.39)</ref> will be very close to the actual value (i.e., 20) when the contribution rate is over 90%. This phenomenon implies that an attacker could intentionally contribute a large amount of data, so they can roughly guess what the raw data is. To mitigate this risk, other apps can also contribute more data to the combined dataset, which can dilute their collaborators' contribution rate and act against the monopolizing of data contribution by a single party.</p><p>(d) About threshold-&#945;: Recall that we introduce &#945; to detect the untrustworthy data: the smaller &#945; is, the less stringent the trust condition is, the more the out-of-distribution data can be accepted (as discussed in &#167; 4.3). As shown in Table <ref type="table">4</ref>, if &#945; = 0.7, then only the row of SYS value: [110, 130] is considered trustworthy data (i.e., its TS value &gt;0.7), the other two rows will be treated as untrustworthy data and removed from the combined dataset. However, all the data can be accepted if &#945; = 0. Since the value of &#945; depends on an app's trust level (discussed in Table <ref type="table">2</ref>), it effectively adjusts how stringent the spurious data detection is for apps with different trustworthiness. (4) Limitations (a) Applicability: Our approach is applicable to scenarios in which different mobile apps collect the same type of sensor data. Specifically, we designed Go-Between to allow collaborating apps to deposit their individually collected data. Because the collected datasets are of the same type, Go-Between can aggregate the deposited data into combined datasets, while differentially privatizing the data-sharing process. Such scenarios do frequently occur in real-world mobile apps. For example, location-based apps, including Google Maps, Uber, and Yelp, collect geolocations during their execution. In addition, an empirical study reports that ten different mobile apps, in categories ranging between mapping and navigation to social media (e.g., Facebook) and shopping (e.g., Groupon), shared geolocations 5,398 times within 14 days <ref type="bibr">[10]</ref>. Hence, our approach specifically targets application scenarios like that. In the cases in which the collected data happens to be of dissimilar types, our approach would be inapplicable as is. However, we plan to investigate if our approach can be extended to provide comparable privacy guarantees even to dissimilar data, exchanged by collaborating apps. Moreover, our reference implementation, Go-Between, is an Android-based middleware. However, our approach's complemented differential privacy ( &#167; 4) and system design ( &#167; 5) can apply to other mobile platforms. Further, it can benefit other data sharing scenarios, such as sharing data at the edge, (e.g., smart home, autonomous driving), which often involves mutually distrustful parties that can apply our approach to personalize their services by sharing data without compromising their data privacy. Finally, to increase its applicability, our approach can incorporate functional and reactive query interfaces to express, fuse, and extend queries.</p><p>(b) Trust-data theory limitations: Despite its demonstrated benefits, our trust-data theory would be unable to detect and eliminate all untrustworthy data. In essence, the detection takes advantage of the difference in distribution between the newly contributed dataset and the original one, as well as the threshold for that difference. Put another way, a combination of an unreasonable threshold value and a close similarity between the distributions of the original and the newly contributed data collections would cause our approach to consider the contributed data trustworthy, keeping it in the combined dataset. So far, we assumed that the threshold value would be pre-set according to the apps' reputation score (discussed in &#167; 5.3, Table <ref type="table">2</ref>). However, how to select a reasonable threshold value remains an open research question. As a future work direction, we plan to investigate the thresholds with different values and scenarios to be able to automatically adjust the threshold values.</p><p>(c) Comparing with other studies: As discussed above, we concluded that it would be counterproductive to try to compare our evaluation results with existing studies, due to the intrinsic differences in usage scenarios, execution environments, and application scopes. As an alternative, we compared our results with Android's built-in execution time threshold, standard Android APIs, and simulated attacks. Furthermore, the overriding goal of this article is to demonstrate how our approach can help personalize mobile services while protecting data privacy with affordable overheads (e.g., execution time is acceptable, data privacy is preserved, etc.). Hence, our evaluation was designed to support the overriding goal of this article, as explained above.</p><p>(5) Recommendations and Future Directions (a) Set prudent privacy requirements: As mentioned above, privacy requirements (i.e., privacy, accuracy, and usage frequency levels) determine the utility of query results. In fact, these requirements directly depend on apps' specific usage scenarios. For example, a dining app that recommends a restaurant in an area may not need highly accurate user geolocation, while a health monitor app may need precise values of the user's body vitals. Hence, to set prudent privacy requirements, we recommend app providers carefully review all possible usage scenarios and assess how stringent privacy protection they would need.</p><p>(b) Maintain a reasonable contribution rate: As discussed above, the possibility of revealing raw data would increase if an attacker's app contributes most of the data in combined datasets. Such risk can be mitigated if there is no monopoly on data contributions: all collaborating apps contribute enough data as compared to others. In the future, we plan to provide interfaces that allow app providers to check their contribution rates and detect the potential presence of monopolization attempts at contributing data. Also, we recommend that the providers carefully decide whether or not to share their data in the presence of risks of monopolization attempts at data contribution.</p><p>(c) Be careful in granting data sharing permissions: Because of our on-device data sharing approach, end-users can always keep in control of their data. Also, Go-Between can be configured to inform end-users of the details of data sharing events and explicitly allow them to restrict apps to share data. We recommend that end-users periodically turn on this feature and check if everything proceeds as expected. Further, it remains the case that end-users should avoid installing apps with low trust levels from unauthorized app stores.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="8">Related Work</head><p>Data Privacy. Differential privacy <ref type="bibr">[29]</ref> prevents attackers from discovering private information. Based on this concept, Airavat <ref type="bibr">[85]</ref> provides differential privacy guarantees for cloud-based MapReduce computations. The PINQ <ref type="bibr">[69]</ref> and GUPT <ref type="bibr">[75]</ref> libraries add a unified amount of noise to raw data for privacy-preserving data analysis. Vu et al. <ref type="bibr">[96]</ref> automatically detect the user's privacy requirements by determining the noise scale with a neural network model. Miller et al. <ref type="bibr">[70]</ref> provide security protocols for clients to securely communicate with a non-trusted server. Gaboardi et al. <ref type="bibr">[34]</ref> enable users, unaware of differential privacy mechanics, to generate privacy-preserving datasets that support statistical queries. Go-Between differs by inferring user profiles on-device, with its &#949;-differential privacy augmented with privacy &amp; utility tradeoffs, spurious data detection, and data contribution incentives.</p><p>Collaboration Among Distrustful Parties. By using encryption techniques, Private Set Intersection (PSI) enables two parties to find the intersection of their private datasets, without revealing any data outside the intersection. Kiss et al. <ref type="bibr">[55]</ref> applies PSI techniques to find the set intersection of differently sized datasets in mobile applications, but not on-device as in our approach. PSI protocols have been also implemented for smartphones <ref type="bibr">[14,</ref><ref type="bibr">21,</ref><ref type="bibr">51]</ref>. For example, CrowdShare <ref type="bibr">[14]</ref> shares Internet connectivity and other resources across Android devices. Secure Function Evaluation (SFE) techniques allow mutually distrustful parties to evaluate the properties of private sets without revealing them. Previous work on SFE defines the adversarial models, decreases communication complexity, and improves efficiency/security definitions <ref type="bibr">[20,</ref><ref type="bibr">65,</ref><ref type="bibr">76]</ref>. In contrast, Go-Between relies neither on encryption nor on the SFE techniques, allowing distrustful parties to effectively collaborate, while balancing their privacy/utility requirements by automatically determining the required noise scale.</p><p>Applications of user profiles. user profiles are inferred to improve the quality of various services. Datta et al. <ref type="bibr">[27]</ref> infer user profiles from an IoT architecture to personalize health care. <ref type="bibr">Barnaghi et al. [16]</ref> explore how to use IoT architectures for gathering user profiles. Other uses of user profiles include detecting security threats <ref type="bibr">[15,</ref><ref type="bibr">48,</ref><ref type="bibr">73]</ref>, uncovering safety abnormalities <ref type="bibr">[26,</ref><ref type="bibr">64]</ref>, and enhancing education <ref type="bibr">[32,</ref><ref type="bibr">68]</ref>. Go-Between also improves the quality of mobile services by enabling mutually distrustful parties to collaborate without having to exchange data under adaptively parameterized differential privacy. Our approach is likely applicable beyond mobile computing and can benefit the above domains.</p><p>Spurious data detection. Detecting and filtering out spurious data from a data set remains an open problem. The current solutions can be roughly categorized into two types, which we discuss in turn next.</p><p>(1) statistics-based approaches: a series of classic statistical criteria, such as Benford's law, 3-&#963; rule, Chauvenet Criterion, and Dixon Criterion, can help detect data points that are out of distribution from a given dataset. However, these approaches either require a specific data distribution or impose restrictive conditions (e.g., only one outlier exists).</p><p>(2) machine learning or deep learning-based approaches: Modern anomaly detection (i.e., outlier detection) makes use of machine learning or deep learning algorithms to identify outliers that deviate from the general data distribution. Specifically, OE discovers out-of-distribution data via training on the so-called "outlier exposure dataset" that contains out-of-distribution samples <ref type="bibr">[50]</ref>. Similarly, ATOM trains on outlier data that is estimated as possible out-of-distribution data by an existing detector <ref type="bibr">[22]</ref>. To improve the quality of training datasets, Li et al. re-sample given datasets and create an informative outlier dataset <ref type="bibr">[60]</ref>, while Du et al. create the training dataset by synthesizing outliers <ref type="bibr">[28]</ref>. Furthermore, Ren et al. and Morningstar et al. enhance the deep learning-based detection performance for outlier data with likelihood ratio <ref type="bibr">[84]</ref> and nonparametric density estimators <ref type="bibr">[77]</ref>, respectively. Besides, outlier detection (or out of distribution detection) has been proved that can be applied to gaze estimation <ref type="bibr">[23]</ref>, cyber-physical systems <ref type="bibr">[19]</ref>, wireless sensor networks <ref type="bibr">[8]</ref>, data streams <ref type="bibr">[78]</ref>, and Internet of Things <ref type="bibr">[54]</ref>. However, all these approaches focus on detecting the outlier data but neither consider taking advantage of the outliers nor have applied the detection techniques to differential privacy. Our approach reconsiders the outliers to preserve data privacy while detecting and removing untrustworthy ones, which is a novel application of a known security exploit for benign purposes.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="9">Conclusion</head><p>We have presented an on-device user profiles inference approach that personalizes mobile services while protecting data privacy via an &#949;-differentially private mechanism.</p><p>Contribution: Our approach augments differential privacy by (1) mitigating the threat of contributing spurious data, (2) satisfying the dissimilar privacy and utility requirements of the collaborating apps, (3) incentivizing the apps to keep contributing data, and (4) featuring extensible programming interfaces and secure operations. The evaluation demonstrates our approach's feasibility, utility, safety, and programmability: all queries' execution time is within 10 ms (feasibility); participants' dissimilar privacy/utility requirements are satisfied (utility); untrustworthy data are effectively detected and raw data are hard to reveal (safety); extra 21 ULoc with a cyclomatic complexity of 2 are added (programmability).</p><p>Scientific value: The scientific value of this article is as follows. First, we demonstrate that it is feasible and useful to personalize mobile services while protecting data privacy on a single device. Second, we show that it is practical to identify spurious data by leveraging the perturbation of Laplace distribution between the original dataset and the one with newly added data (i.e., Trust-Data theory).</p><p>Limitations: Existing studies' dissimilar usage scenarios, execution environments, and application scopes make it difficult to meaningfully compare our approach with prior approaches concerned with similar problems. To mitigate this limitation, we compared our evaluation results with Android's built-in execution time threshold, standard Android APIs, and simulated attacks.</p><p>Applicability: Although our reference implementation is Android-based, one can apply our approach's complemented differential privacy and system design to any other mobile platforms, as well as other data-sharing scenarios.</p><p>Future directions: As future work, we plan to revise and migrate our privacy-preserving mechanism to network communication protocols that can benefit edge computing. We also plan to explore whether it is possible to define reasonable and common privacy criteria in order to meaningfully compare approaches with different usage scenarios, execution environments, and application scopes. T S is calculated in three steps: (1) compare the parameters in terms of their respective sizes (b 1 vs. b 2 and &#181; 1 vs. &#181; 2 ); (2) compute the intersection points x 1 and x 2 (if necessary) by applying b 1 ,&#181; 1 and b 2 ,&#181; 2 to their probability density functions p(x). Note that, different b 1 ,&#181; 1 and b 2 ,&#181; 2 yield different probability density functions p(x), thus producing dissimilar intersection points; (3) calculate the integral of the probability density function p(x), i.e., the overlapped area. The algorithm below shows the details of calculating T S in the case of &#181; 1 = &#181; 2 and b 1 &lt; b 2 (Figure <ref type="figure">10</ref>). // step 3: find the integal area =</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A List of Abbreviations</head><p>x 1 -&#8734; Lap(&#181;1, b1) +</p><p>x 2</p><p>x 1 Lap(&#181;2, b2) + &#8734;</p><p>x 2 Lap(&#181;1, b1) //</p><p>x 2</p><p>x 1 Lap(&#181;2, b2) -hatched area (horizontal lines in Figure <ref type="figure">10</ref>) //</p><p>x 1 -&#8734; Lap(&#181;1, b1) and </p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="5" xml:id="foot_0"><p>An app provider can have multiple apps, while an app has one provider only. For ease of exposition, we assume a one-to-one correspondence between a provider and an app, and use terms "app provider"/"app" interchangeably.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="6" xml:id="foot_1"><p>Each data type has its own combined dataset.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="7" xml:id="foot_2"><p>We compute probability density function's to obtain overlapped area.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="8" xml:id="foot_3"><p>As a rule of thumb of practical statistical analysis, the minimum sample size is typically between 20 and</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="9" xml:id="foot_4"><p>a common practice for studying various performance trade-offs on the Android platform<ref type="bibr">[13,</ref><ref type="bibr">25,</ref><ref type="bibr">98]</ref>.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="10" xml:id="foot_5"><p>a portable framework for code to run on any standard TEE implementation.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="11" xml:id="foot_6"><p>The Yeti is a metaphor that describes any real-world user with a similar behavioral profile in this application scenario.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="12" xml:id="foot_7"><p>CountOne(m) queries "how many times does value 'm' appear in the combined dataset?"</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="13" xml:id="foot_8"><p>Similar to Go-Between's data persistence, it enables local mobile apps to back up their data at a remote server.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="14" xml:id="foot_9"><p>Similar to Go-Between's statistical queries, it provides a query interface for obtaining geolocations from sensors.</p></note>
		</body>
		</text>
</TEI>
