4.1. Overview
In the PPTA-RM method, the threat model is briefly described as follows: there are mobile users, the data aggregator, and the recommendation system. Mobile users are responsible for providing check-in data and will not collude with each other. The data aggregator is responsible for collecting original data from mobile users and is assumed to be credible. The recommendation system is honest but curious, that is, it can honestly perform its duties and will not collude with any other malicious entity. After data collecting by the data aggregator, the differentially private POI recommendation is achieved in the recommendation system to avoid the privacy leakage of users. However, an adversary or the recommendation system may try to perform an inference attack to analyze the sensitive information of users exposed by the recommendation service for its benefit.
The PPTA-RM method adopts the strategy of combining coarse-grained recommendation with fine-grained recommendation. The components of the PPTA-RM method are shown in
Figure 2.
For coarse-grained recommendation, the privacy-preserving category preference prediction algorithm (PrivCP) based on matrix factorization is designed to recommend the POI categories that users prefer by replacing the traditional user–POI check-in matrix with the user–category check-in matrix. In addition, gradient perturbation is carried out during the matrix factorization process to protect the POI category preference of users. For fine-grained recommendation, the privacy-preserving weighted HITS-based recommendation algorithm (PrivWHBR) is presented, which exploits users’ check-in data and considers the weighted combination of users’ social attributes and POI geographic distance attribute to achieve POI recommendation. A privacy budget allocation strategy based on the visit count of POIs is designed and Laplace noise is injected into the check-in data of users. Finally, by combining the prediction results of the above two algorithms, accurate next POI recommendation can be achieved. In the rest of this section,
Section 4.2 describes the PrivCP algorithm,
Section 4.3 presents the PrivWHBR algorithm, and
Section 4.4 demonstrates a privacy analysis of the PPTA-RM method.
4.2. PrivCP Algorithm
The PrivCP algorithm aims to determine the POI categories that users may be interested in in the next time slot and simultaneously protect users’ preference data for the POI categories. The PrivCP algorithm mainly consists of three steps: (1) matrix construction; (2) privacy-preserving POI category preference modeling; and (3) preference category prediction.
Taking time factors into consideration, the check-in data are firstly divided into time slots. For the check-in data in each time slot, Step 1 constructs a user–category matrix and a category–category matrix and normalizes the values of these two matrices, respectively. In this step, the sparsity of check-in data is alleviated by introducing a location category attribute. Step 2 performs privacy-preserving category preference modeling based on matrix factorization, obtains the user feature matrix and category feature matrix in each time slot, and adds Laplace noise during the training process to protect the user’s category preference. Step 3 calculates the prediction matrices of the user feature matrix and category feature matrix in the time slot based on SSA, completes the prediction matrices, and finally determines POI categories that users may be interested in in the time slot.
4.2.1. Matrix Construction
In real life, there are numerous POIs, but a user can only visit a small number of locations and cannot rate every item. The sparsity of the rating matrix may lead to overfitting in the recommendation algorithm and reduce the recommendation quality. Hence, adopting the concept of transfer learning, the PrivCP algorithm extracts the location category data from the users’ check-in history as auxiliary information, which alleviates the influence of the sparsity of the rating matrix to a certain extent.
Specifically, the PrivCP algorithm needs to extract two matrices from users’ check-in history: the user–category matrix and the category–category matrix. The PrivCP algorithm extracts the visit count of a user to each category and constructs the user–category matrix, which reflects the preference relationship between user and categories; by using a first-order Markov chain, the PrivCP algorithm extracts the number of transitions between two categories and captures the transition pattern between categories. The PrivCP algorithm can learn the relationship between users and categories through the user–category matrix and category–category matrix in the process of category preference modeling.
User–category matrix: suppose that the users’ check-in matrix for categories can be depicted by a matrix , where is the number of users, is the number of categories of POIs, and is the check-in frequency of user for POI category .
Category–category matrix: supposing that the appearance of the next POI category depends on the category of POI that the user currently visited, the transition relationship between two categories of POIs can be modeled through the category–category matrix. This matrix can be depicted by a matrix , where is the number of POI categories, and is the number of transitions from category to category , representing the correlation between two categories.
4.2.2. Privacy-Preserving POI Category Preference Modeling
With the help of the user–category matrix and category–category matrix, the PrivCP algorithm can learn two latent matrices—the user latent feature matrix and category latent feature matrix—and adds Laplace noise to the user latent feature matrix during the training process, so as to protect the POI category preference data of users.
The PrivCP algorithm adopts a matrix factorization strategy based on category sharing, as shown in
Figure 3.
is the user–category matrix, and
is the category–category matrix, where
is the number of users, and
is the number of categories of POIs.
is the user latent feature matrix,
, in which
is the latent feature vector of user
;
is the category latent feature matrix,
, in which
is the latent feature vector of category
;
is the transpose matrix of
; and
is the number of latent features.
As can be seen from
Figure 3, the category latent feature matrix
is shared by the user–category matrix
and category–category matrix
and plays a connecting role. Therefore, the number of user visits to categories and the transition patterns between categories will be integrated into the learning process.
In this way, the loss function of privacy-preserving category preference modeling is given as follows:
where the first two terms of Formula (6) measure the calculating deviation, and
is the regularization term to prevent the model from overfitting.
The PrivCP algorithm exploits the SGD strategy to minimize Formula (6). However, directly using visiting counts and transition patterns to optimize the above loss function may lead to the violation of the user’s category-preference privacy. Thus, the PrivCP algorithm adopts gradient perturbation to protect the user’s category preference from being leaked. As shown in Formulas (7) and (8), the partial derivatives of parameter
and
are firstly obtained, respectively, as:
In order to protect the category preferences of users, Laplace noise is added to the error
in Formula (7) when learning the user latent feature vector
, as shown in Formula (9):
where
represents the added noise satisfying Laplace distribution,
is the number of iterations,
is the sensitivity of the algorithm,
is the maximum value of elements,
is the minimum value of elements in the user–category matrix
, respectively, and
is privacy budget. Therefore, Formula (8) can be modified as follows:
Then, the parameters are learned and updated according to Formulas (8) and (10):
where
is learning rate. Formulas (11) and (12) are repeatedly executed, until the error of the loss function is less than the threshold value or the maximum number of iterations is reached. Then, the learning process is stopped, and the user latent feature matrix
and category latent feature matrix
for each time slot are consequently obtained.
4.2.3. Preference Category Prediction
After the first two steps above, the user latent feature matrix and category latent feature matrix can be obtained. The purpose of Step 3 is to predict the and through the previous latent feature matrix sequences based on SSA and complete the matrices, finally achieving category prediction.
SSA mainly consists of two stages: model fitting and model prediction. In this section, the user latent feature matrix sequence is used to illustrate the two stages.
In the model fitting stage, a proper window length is firstly selected, and then the original time series
is transformed into the trajectory matrix
, as shown in Formula (13), where
represents the window length,
is the lag parameter, and
is the length of
.
Then, singular value decomposition is performed on the trajectory matrix
, as shown in Formula (14):
where
is the rank of the trajectory matrix
,
represents the singular value of matrix
, and
and
are the left singular vector and right singular vector of matrix
, respectively. The tuple
is called the
i-th feature triad of singular value decomposition.
Finally, the signals represented by each eigenvalue are analyzed and combined, and a new time series is reconstructed by the time empirical orthogonal function and time principal component, which is given in Formula (15):
where
is the
i-th column of matrix
, and
is the
j-th left singular vector,
. In this way, the sum of all the reconstructed series is equal to the original series.
In the model prediction stage, linear recursion is adopted to calculate
with the linear combination of the previous data in the window, as shown in the following formula:
Similarly, category feature matrix
can be obtained as shown in the following formula:
Finally, according to the user latent feature matrix
and category latent feature matrix
, and considering the current location of the user, the category candidate set that the user may be interested in in the
time slot is predicted. Specifically, the prediction value of user
for category
is calculated as follows:
where
is the
i-th row vector of matrix
, and
and
are the
j-th row and
k-th row vectors of matrix
, respectively. The first term
denotes the long-term preference of user
for category
, and the second term
represents the transition preference from category
to category
. By calculating the sum of the two preferences and then arranging them in descending order,
POI categories that the user may be interested in in the
time slot can be predicted.
4.3. PrivWHBR Algorithm
The purpose of the PrivWHBR algorithm is to recommend POIs with higher authority value (determined by the user’s hub value) to the user. In social networks, the users’ social relationship and the geographical location of POIs will also affect the POI that users may visit. However, the original HITS model is used to solve the problem of network search without considering factors such as social relationship and geographical location, and it cannot be used directly.
To solve the above problem, the PrivWHBR algorithm improves the original HITS algorithm by using the social relationship between users and the geographical relationship between POIs as the weight values of corresponding connections in the social network.
The network model used in the PrivWHBR algorithm is shown in
Figure 4. This model is divided into two layers. The upper undirected graph is a social relationship graph, vertices represent users, and edges symbolize social relationships among users. If the set of edges is
and there exists a social relationship between user
and user
, edge
exists. The lower undirected graph is a geographical distance graph, with vertices representing POIs and edges representing the geographical distance relation between POIs. If the set of edges is
, the cosine similarity
based on geographical coordinates of POI
and
is calculated, and if
, edge
. The check-in data of a user are regarded as the directed connections between the user and POIs (dotted line with arrow in the figure), connecting the upper and lower layers. If
represents the set of directed check-in edges and user
has visited POI
,
.
The PrivWHBR algorithm assumes that each user owns a hub value, and the larger the value is, the stronger the visit capability of the user, namely, the larger the count of POIs that the user has visited. Each POI has an authority value, and the higher the value is, the better the quality of the POI, that is, the greater the probability that it will be visited by users. In other words, a person who has checked in to numerous POIs in a certain region can have a thorough view of that region, while POIs visited by a knowledgeable person may be superior POIs. Hub values of users and authority values of POIs influence each other in recursion.
Comprehensively considering the social attributes of users, check-in data, and geographical distance of POIs, the recommendation model of the PrivWHBR algorithm can be expressed as:
The authority value
of a POI is calculated by the weighted sum of two parts: the first part describes the hub values of users who have checked in to this POI, and the second part depicts the authority values of the POIs near to it. The hub value
of a user is also computed by weighted sum of two parts: the first part is hub values of their friends, and the second part denotes the authority values of the POIs that they have checked in to, where
and
are weight factors, and
,
, and
are the user–user adjacency matrix, POI–POI adjacency matrix, and user–POI adjacency matrix, respectively, which are given in Formula (20) to Formula (22):
where
is the weight factor; if user
has a social relationship with user
,
, otherwise
;
is the number of POIs that user
has checked in to.
Here,
is the number of POIs, and
is the cosine similarity between POI
and
based on geographical coordinates.
Here, represents the preference of user for POI , which is expressed by visit count; indicates the amount of friends that user owns.
In addition, for a certain POI, larger visit counts of users often represent greater preference of users. Attackers can learn users’ preferences by analyzing the visit count of specific POIs. In other words, matrix regarding a user’s check-in data may reveal their preferences. Thus, the PrivWHBR algorithm designs a privacy budget allocation strategy according to the visit count of POIs to effectively protect matrix . Specifically, if a POI has larger visit counts, the allocated privacy budget is smaller and the added Laplace noise is larger, which means stronger privacy preservation.
Therefore, the perturbed user–POI adjacency matrix
is given as follows:
where
is the Laplace noise;
is the sensitivity;
and
are the maximum value and the minimum value in
, respectively;
is the visit count of POI
; and
is the privacy budget and related to the sensitivity of POI
.
can be calculated as follows:
where
is the total privacy budget of the PrivWHBR algorithm,
is the attenuation function, and
is the attenuation constant.
In general, the PrivWHBR algorithm can recommend POIs with high authority values to users.
Finally, by combining the result of the PrivCP algorithm, the POIs with the highest scores in categories will be returned to the user as a recommendation list for the time slot.
4.4. Privacy Analysis
In this section, the proving process of privacy analysis is divided into three steps: in the first two steps, we prove the PrivCP algorithm and the PrivWHBR algorithm satisfy differential privacy requirements, respectively; in the last step, we prove the PPTA-RM method satisfies differential privacy requirements.
(1) The PrivCP algorithm satisfies -differential privacy
Assuming that and are adjacent datasets, is the output of the algorithm, is the added Laplace noise, namely , and is the number of iterations, the final user feature matrix generated by the algorithm satisfies -differential privacy.
Proof. Therefore, the PrivCP algorithm satisfies -differential privacy in an iteration. Since the data processed by each iteration belong to the same dataset and is the number of iterations, the PrivCP algorithm meets -differential privacy on the basis of serial combination theorem. □
(2) The PrivWHBR algorithm meets -differential privacy
For any two adjacent datasets and , is the output of the algorithm and is the added Laplace noise, namely ; therefore, the user–POI adjacency matrix generated by the algorithm satisfies -differential privacy.
Proof.
For any element of the user–POI adjacency matrix ,
Since the elements in matrix are disjointed, the PrivWHBR algorithm satisfies -differential privacy on the basis of parallel combination theorem. □
(3) The PPTA-RM method satisfies -differential privacy
Because the PrivCP algorithm and the PrivWHBR algorithm can be executed in parallel, and the data processed by the two algorithms belong to disjointed datasets, the PPTA-RM method satisfies
-differential privacy on the basis of parallel combination theorem.
If , the PPTA-RM method satisfies -differential privacy.