{'fraction_non_alphanumeric': 0.03201276059054826, 'fraction_numerical': 0.011202611469693598, 'mean_word_length': 4.6983724371168885, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
PATH: Person Authentication using Trace Histories

In this paper, a solution to the problem of Active Authentication using trace histories is addressed. Specifically, the task is to perform user verification on mobile devices using historical location traces of the user as a function of time. Considering the movement of a human as a Markovian motion, a modified Hidden Markov Model (HMM)-based solution is proposed. The proposed method, namely the Marginally Smoothed HMM (MSHMM), utilizes the marginal probabilities of location and timing information of the observations to smooth-out the emission probabilities while training. Hence, it can efficiently handle unforeseen observations during the test phase. The verification performance of this method is compared to a sequence matching (SM) method , a Markov Chain-based method (MC) and an HMM with basic Laplace Smoothing (HMM-lap). Experimental results using the location information of the UMD Active Authentication Dataset-02 (UMDAA02) and the GeoLife dataset are presented. The proposed MSHMM method outperforms the compared methods in terms of equal error rate (EER). Additionally, the effects of different parameters on the proposed method are discussed.


I. INTRODUCTION
Recognizing human behavior and understanding user mobility from sensor data is an interesting and challenging problem in ubiquitous computing [28], [33]. From mobility information of a user, it is possible to recognize social patterns in daily activities, identify socially significant locations, and model organizational rhythms [6]. Recent proliferation of mobile devices like smartphones and tablets has made it possible to collect mobility data precisely and easily for an extended period of time and therefore research activity in mining the mobility data to infer the pattern of life is increasing [29]. On the other hand, security concerns about personal information stored in mobile devices is on the rise too because of their sensitive nature [3]. Industry surveys estimate that 34% of smartphone users in the U.S. do not lock their phones with passwords [1], [9], mostly, due to the time-consuming, cumbersome and error-prone hassles of entering passwords on virtual keyboards or due to users' beliefs that extra passwords are not needed [9]. Since it is difficult to remember and type stronger passwords 150 times per day [17], which is the average number of cellphone access per user, weaker passwords are still preferred by the users and they become victims of attacks on smart phones 76% of times [26].
In this regard, the concept of Active Authentication (AA) has emerged recently, in which the enrolled user is authenticated continuously in the background based on the user's biometrics such as faces captured by the front-camera [23], [7], [13], touch screen gesture [8], [31], typing pattern [2] etc. When a person uses the phone, the AA system compares the usage pattern with the enrolled user's pattern of use and either deems that the usage patterns are sufficiently similar and make the full functionality of the phone (including sensitive applications and data) available, or it blocks the current user from accessing anything [14].
Combining the usability of location traces to model a user's pattern of life with the concept of active authentication, the Person Authentication using Trace Histories (PATH) problem is addressed. In PATH, the goal is to perform user verification from historical location data of a user in a continuous manner so that a verification score based on the location information is obtained continuously. This score can be fused with scores returned by other modalities such as touch or face to improve the performance of the overall authentication system.
The key motivation of this paper is the wide availability of individual GPS data through smartphones, wearable devices etc. and the discriminating life patterns of different individuals. The goal of this research is to generate a confidence score for authenticating the current user of a smartphone using recent location traces based on historical trace data of the original user. The contributions of this paper are: • A novel formulation of the user verification problem using historical location traces is proposed. Confidence scores from location traces for the purpose of authentication, taking into consideration the sparseness of the geo-location data are produced. • A unique method for user data clustering for trace state generation which is capable of handling a large number of unknown locations is introduced. The rest of the paper is organized as follows. In Section II, background and related works on this topic are discussed. In Section III, the PATH problem is explained in detail along with the difficulties and possible solutions. Different solutions to the PATH problem are described in Section IV and experimental results and discussions are presented in Section V. Finally, conclusion and suggestions for future work are given in Section VI.

II. RELATED WORKS A. Active Authentication Techniques
Faces [7], [23], [13], touch/swipe signatures [25], [32], [31], gait [5] and device movement-patterns/accelerometer [21], [4] are the most explored modalities for active authentication. Face-based authentication, though most accurate, requires more computational power and drains battery faster, whereas, swipe and accelerometer are less computationally expensive but are not discriminative enough. Among the other AA approaches, in [10], the authors fused stylometry with application usage, web browsing data and location information, and, in [30] the authors fused face and touch gestures for AA. Most of the methods applied for AA perform feature extraction from training samples and generate matching scores based on cosine or Euclidean distances in the verification setup [19].

B. Location History Mining
Purely location-based verification approaches for AA are yet to be found in the literature. Instead, most locationbased research reports are focused on data mining to obtain information about an individual's pattern of life. For example, in [29] the authors predict the users movement among the location points and infer user-specific activity at each location. In [12], the authors focus on detecting significant locations of a user and predicting the user's next location or infering the daily movements. In [33], [20] and [28], the authors infer the highlevel behavior of the user, such as, the transportation modes on the way to the point locations. Other research efforts on GPS location data include driving behavior mining, finding mode of transportation and the most likely route, learing a Bayesian model of travel through an urban environment etc. [29].

C. Geo-location Data Processing
When mining individual life patterns from geo-location data, the problem can be considered as a sequential pattern mining problem, widely used in health-care data processing, web usage analysis, text mining for natural language processing, speech processing, sequential image processing, bioinformatics and in many other domains [15]. In [29], sequential pattern mining has been employed for individual life pattern modeling. Since, the geo-location trajectory data are spatio-temporal in nature, the fuzziness of space (usually no two point in the trajectory data are exactly the same) prevents the direct use of traditional frequent pattern mining algorithms. The usual practice is to cluster the geo-location points onto finite number of observation states and then perform sequential pattern mining on the state transition trajectories. In natural language processing, template matching approaches have been employed for matching features from a text sequence with precalculated feature vectors using edit distance or some other distance metric. String matching algorithms are also found to be effective in this regard. A different type of approach is based on building state-space models like a Markov Chain or a hidden markov model, from temporal data. Several research works on next place prediction from location history, such as in [12], [11], [16], are based on state-space models like Mobility

D. Dataset of Smarphone Location Service Records
The Geolife GPS trajectory dataset was collected in Microsoft Research Asia by 182 users over four years (from April 2007 to October 2011). The GPS trajectories of this dataset are represented by sequences of time-stamped points, each containing latitude, longitude and altitude information. The dataset contains 17, 621 trajectories with a total distance of 1, 251, 654 kilometers and a total duration of 48, 203 hours. These trajectories were recorded by different GPS loggers and GPS-phones, and have a variety of sampling rates. 91 percent of the trajectories are logged in a dense representation, e.g. every 1 ∼ 5 seconds or every 5 ∼ 10 meters per point [34], [27]. Apart from the GPS trajectories, the dataset contains information about a broad range of users' outdoor movements, including not only life routines like going to work or home, shopping, hiking etc. but also some entertainments and sports activities, such as shopping, sightseeing, dining, hiking, and cycling. This trajectory dataset has been used in many research fields, such as mobility pattern mining, user activity recognition, location-based social networks, location privacy, and location recommendation [33], [28], [29].
The largest known dataset on smartphone usage is the Google's Project Abacus data set consisting of 27.62 TB of smartphone sensor signals collected passively from approximately 1500 users for six months on Nexus 5 phones [18]. Apart from location service data, this dataset also contains images from front-facing camera and data from touchscreen and keyboard, gyroscope, accelerometer, magnetometer, ambient light sensor, Bluetooth, WiFi, cell antennae, app usage etc. with time statistics. However, this dataset is not available for the research community due to privacy issues.
Recently, the UMDAA02 data set has been published which contains 141.14 GB of smartphone sensor signals collected passively from 48 volunteers on Nexus 5 phones over a period of 2 months [14]. The sensors from which data was collected include the front-facing camera, touchscreen, gyroscope, accelerometer, magnetometer, ambient light sensor, location service, Bluetooth, WiFi, cell antenna, proximity sensor, temperature sensor and pressure sensor. The data collection application also stored the timing of screen lock and unlock events, start and end time stamps of calls, currently running foreground application etc. The volunteers, who used the data collection phone as their primary device for a week, were given the option to stop data collection at will and review the stored data prior to sharing it for research purposes. The dataset contains geo-location data obtained from 45 users (summarized in Table I).

III. PROBLEM FORMULATION
The location service of smartphones returns geographical location of the user based on GPS and WiFi network. In addition to the latitude and longitude information, the exact day, time and duration of being in a proximity can be extracted from the location service data (Fig. 1) which are very useful for modeling the pattern of a user's location trace.
In general, the PATH problem has three challenges: 1) Clustering of Geo-location points to form observation states taking into account the temporal information. 2) Handling unforeseen observation states and learning a model for each user using the sequential patterns inferred from the observation states . 3) Generating verification score from a test sequence using the trained model. In Fig. 2, a schematic of the proposed verification system is shown. Basically, there are three steps. First, from the training geo-location data of user x, location clusters are formed and the cluster centers and radius are extracted. Then, from the sequence of geo-location data with time-stamps and session information, the sequence of training observations is obtained which is used to train the verification model for user x. Finally, from every n observations in the test data, scores are generated to verify user x using the previously trained model.

A. Geo-location Points to Observation States
Since, this is a verification problem as opposed to recognition, only the information about the legitimate user is available during training. For a user, the data collected by the location service is a sequence of geo-location points P = {p 1 , p 2 , . . . , p n }, where, each point p i ∈ P contains the longitude (p Long i ), latitude (p Lat i ) and time stamp (p T i ). These points are sampled at variable rates based on the speed of movement and therefore the points might not be equally spaced in time. A location trace can be formed by connecting the Geo-location points according to their time series as shown with the red points connected with arrows in Fig. 3.
In order to take into account the duration of stay in a certain locality, the geo-location traces are sampled once every three minutes. Thus, if a user is in the same location for a while, the location logger will log the same location at three minute interval. The historical Geo-location points of the user obtained this way are clustered into η = 1, . . . , N clusters, namely C 1 . . . C N , using the DBSCAN algorithm [24] based on geographical distances (GeoDist) between data points. The maximum distance between a point from the center of the cluster in which that point belongs is set to be below a certain value R max meters. A cluster C j is completely defined by Lat , c j Long }, j ∈ η, consists of the latitude and longitude of the cluster center, respectively, and R j is the radius of the cluster where R j ≤ R max . An example of such clustering is shown in Fig. 3), where the cluster C 1 i represents presence in a residential area and C 2 i in an office building in an university imply plausible regions like home, university etc that the user i would visit.
Two types of additional clusters, Transit (T r) and Unknown (U nk), are assigned for each user. If the user is traveling, causing location information to change rapidly (≥ 2ms −1 ), then those geo-locations points are assigned to T r. For each of the other data points p m that are not inside any location cluster and also not in the Transit cluster, the nearest known location cluster to each of those points within a radius of M = 10000 meters is determined by calculating GeoDist(j, m), the geological distance between p m and all C j s. Then those data points are assigned to the cluster U nk , where, (1) for m = 1, . . . , n, p m / ∈ C j , j ∈ η, p m / ∈ T r. So, to summarize, there would be N location clusters C j and N corresponding nearby unknown clusters U nk j for j ∈ η, one more cluster denoted as U nk inf and the transit cluster T r totaling the number of cluster to be 2N + 2. Data points at each cluster are assigned to six different observations based on day and time information. Weekdays and weekend data points are flagged with W D and W E. Also, the whole day is divided into three time zones (TZs) -TZ1 (12:01 am to 8:00 am), TZ2 (8:01 am to 4:00 pm) and TZ3 (4:01 pm to 12:00 pm). Thus, there are (2N + 2) × 2 × 3 possible observation states for the locations, transition and unknowns. One additional observation state, namely, N ull, is considered in order to take the sparsity of the data into account. The N ull is inserted at the end of each day. It signifies the unavailability of location, time zone, number of observation samples and observation states in between consecutive sessions occurring in two different days. Now, it is possible that many of the observation states are not present in the training data and yet, they may appear in the test data because of the following reasons  1) The location service of the phone might only collect data when the phone is turned on and in use. Also, some user prefer to turn off the location service when the battery is low. 2) Some unknown states near known locations might not occur during the training phase. 3) Data for all time zones and days might not be present for all location.

B. Handling Unforeseen Observations to Learn User Models
In order to verify the user, it is imperative to take the unforeseen observations into account rather them assigning zero emission probability to them. Fortunately, the probability distribution of the occurrence of all the states can be smoothed out using the estimated values from the training data. Laplace smoothing is one easy choice to make sure that the probability does not go to zero at all, however, it does not take into account the prior information about available states. For example, assume that the observation C 1 − T Z1 − W E is not present in the training set, i.e. the historical location log of the user does not contain any information of the user being at C 1 during timezone 1 on weekends. The prior probability of its occurrence P (C 1 − T Z1 − W E) can be still be approximated from the probability of the user being in C 1 during T Z1 and the probability of the user being in C 1 during weekends by assuming that the two events are independent. In the next section, the integration of this assumption into the proposed HMM training model is elaborated. These approaches are discussed in details in the next section.

IV. USER VERIFICATION METHODS
Three different user verification methods are discussed here. After the pre-processing step, the observations are available in a time sequences for each user and user-wise models are generated using this data.

A. Sequence Matching (SM) Method
Algorithm 1 Sequence Matching Algorithm procedure SEQMATCHING(S i tr , S j te ) Training Sequence Vector of user i (S i tr ), n-last Test Sequence Vector of user The match ratio is r end procedure

B. Markov Chain (MC)-Based Verification
For Markov Chain-based verification, the probability of moving to a state depends only on the last visited state and the transition matrix for all probable states. The model X n is a Markov chain for observation sequences of length n which is composed of a set of k-observation states S = s 1 , s 2 , . . . , s k , prior probability ρ i = P rob{X 0 = i} of entering state i, and a set of transitions t i,j where t i,j = P rob(X n = s j |X n−1 = s i ). (2) Given the prior and transition probabilities of the training data, the total probability of traversing any sequence of n consecutive observations i 0 , . . . , i n ∈ S is calculated as For unforeseen states, Laplace smoothing is considered by setting the prior probabilities of and transition probabilities from those states to a tiny value δ.

C. MSHMM Model for PATH
The proposed Marginally Smoothed Hidden Markov Models (MSHMMs) are specifically trained to handle the unforeseen observations. HMM models are assumed to be generated by a Markov process with unobserved hidden states and are very effective for analyzing sequential data. The HMM model can be expressed as λ = (π, A, B) where the parameters can be learned from the observed locations of the training set O given the vocabulary of possible observations V . Here, π is the initial hidden-state distribution, A is a time-dependent stochastic transition matrix between the hidden states, and B is a stochastic matrix with the probability of emitting a particular observation at a given state.
To learn the model, the HMMs are trained using the threestep Baum-Welch algorithm [22] shown in Algorithm 2. The initialization step sets λ = (π, A, B) with random initial conditions. The parameters are then updated iteratively until convergence.  if o t = o k , and zero otherwise. But, this equation assigns zero emission probabilities for unforeseen observations, and will eventually pull the overall probability of observing a sequence to zero even if only one such unforeseen yet probable observation is present in the test sequence. One simple workaround is to use a smoothing technique such as Laplace Smoothing where b i is assigned a very small constant probability. However, the performance of Laplace smoothing is found to be very poor experimentally because of its empirical nature. A marginal smoothing method is proposed here which utilizes the location, timezone and weekend/weekday information of the observations to assign the emission probabilities. The method is based on the assumption that the probability of a user being in a location cluster at a certain timezone is independent of the probability of the individual being in a location on weekdays/weekends P If Laplace-smoothing is used instead of the marginal smoothing proposed here, then, when for all t, i. Here, δ is a very small number, and therefore, a even smaller emission probability is being assigned to an unforeseen observation instead of 0.

V. EXPERIMENTAL SETUP AND EVALUATION
Experiments are performed on two datasets: (1) the UM-DAA02 geo-location dataset [14], and (2) the Geolife GPS tarjectory dataset [34]. The histogram of duration of geodata collection sessions along with the histogram of time gap between consecutive sessions for the two datasets are shown in Figs. 4 and 5. It can be seen from these figures  that for the UMDAA02 geo-location dataset, geo-location data is collected for at most 60 seconds after the user logs into the phone. On the other hand, for the Geolife dataset the data is seamlessly collected for long period of times. In fact, the session with the maximum duration is almost 11 days long. The reason behind this difference is that the UMDAA02 dataset is collected for authentication research using smartphones when the phone is being used, whereas, the GeoLife dataset is collected using GPS-phones and GPS loggers for individual and social behavioral research. Since the event of logging into a phone varies widely, the session gap for the UMDAA02 dataset is spread more widely then the GeoLife dataset.
Considering the nature of the data collection process, experiments for the two methods are designed differently. Since the UMDAA02 dataset is small, sparse and contains user data for a little over a week for each user, the first 70% of chronologically sorted data of each user is used for training the model for that user and the rest are used for evaluation. On the other hand, for the GeoLife dataset, experiments are done on a total of 63 users who has geo-location data for 6 weeks or more. Location data for the 6-th week is used for evaluation, while those from the previous weeks are used for training user-wise models.
In Fig. 6(a) the distinguishability of location information of  the users is depicted as similarity matrices for the UMDAA02 dataset. For a user, after determining the location clusters (considering R max = 20 meters), the location traces are obtained for the training period of that user and all the other users considering those clusters. In figure 6(a), the percentage of common location clusters that any two users share is shown as a similarity matrix. It can be seen that in many cases two different user can have significant amount of overlaps. However, when time and day information are incorporated with the location data to generate the observations, the number of overlaps gets reduced, as can be seen from Fig. 6(b). Intuitively, considering the sequence information would minimize the similarity between two different users even more. Similar depictions for the GeoLife trajectory dataset are shown in Fig.  6(c) and 6(d), respectively. The number of past observations n that is considered when evaluating the verification score has a direct impact on the EER. It can be seen from Fig. 7, that the EER decreases with increasing n, which is understandable since having greater number of past observations improves the predictability of the next observation. On the other hand, the EER gets larger if the value of R is too small or too big. The optimum value of R for the UMDAA02 dataset is found to be around 20 meters, as can be seen in the figure. This is a reasonable value since clusters of this diameter are neither too small to be rooms nor too big to be communities. Rather, they are most likely to  be representative of buildings and for the PATH problem and other location-based prediction tasks, generally buildings like home, shopping mall, work-place, gym etc. are considered to translate the geo-location observation.
In Fig. 8, the performance of the four methods -SM, MSHMM, MC and HMM-lap are shown in terms of EER for varying n on the UMDAA02 dataset for R max = 20. Given the unconstrained nature of the dataset, verification is a daunting task even with more robust modalities such as face [14]. Yet, the proposed MSHMM method achieved an EER of 20.73% for n = 16 outperforming all the other methods. In fact, for any value of n, the MSHMM models trained with 10 hidden states performs better then other methods.
Finally, in Fig. 9, the performances of the four methods are compared for different n. while the number of past weeks for training is increased from 1 to 4. Understandably, the EER is showing a decreasing trend in general for increasing training data. The overall performance of the proposed MSHMM method (trained with 10 hidden states) is better than the other three methods across different training size and sequence length. The MC method also found to achieve better accuracy on this dataset. This is probably due to the fact that this dataset is less sparse and therefore there are fewer unforeseen observations which led to better estimation of the prior and transition probability matrix for MC.

VI. CONCLUSION
A formulation of location history-based user verification task for active authentication is introduced in this paper. Specifically, information on location clusters, time and day are utilized to obtain observation sequences for users carrying geolocation sensors or smartphones. The probability of a sequence occurring for a particular user is evaluated by training userspecific models. Four different methods, namely, sequence matching (SM), markov chain (MC) and hidden markov models with marginal smoothing (MSHMM) and Laplace smoothing (HMM-lap), are compared in terms of equal error rate (EER). Through extensive experimentations, it is shown that the proposed MSHMM method outperforms the other methods for two different datasets -UMDAA02 and GeoLife. The future direction of research on this would be to apply similar verification approachs on some other modalities such as wifi and cell data for active authentication and then fusing the scores to obtain even better performance.

ACKNOWLEDGMENT
This work was done in partnership with and supported by Google Advanced Technology and Projects (ATAP), a Skunk Works-inspired team chartered to deliver breakthrough innovations with end-to-end product development based on cutting edge research and a cooperative agreement FA8750-13-2-0279 from DARPA.