User-angle based recommendation system preference forgetting method
By constructing an interaction perturbation matrix and a two-layer optimization process in the recommender system, we can efficiently forget the target user's preferences without modifying the model structure. This solves the problems of low efficiency and reliance on model structure in existing technologies, and maintains the overall performance and user experience of the recommender system.
Patent Information
- Application Number
- CN202511264121.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-05
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2045-09-05
AI Technical Summary
Existing methods for forgetting user preferences in recommender systems are inefficient, complex to deploy, and highly dependent on model structure, making it difficult to completely forget target user information without compromising the accuracy of the recommender system.
By constructing an interaction perturbation matrix to add minute perturbations to the black-box model, and combining the attack module with a two-layer optimization process, the model is guided to forget the preferences of a specified user. The interaction perturbation matrix is used to modify the user interaction matrix, thereby achieving precise weakening of the target user's performance while maintaining the recommendation quality of other users.
Without modifying the recommendation model structure, it can efficiently forget the target user's preferences in black-box scenarios, maintaining the overall performance of the recommendation system and other user experiences. It is applicable to mainstream recommendation models and has good versatility and practical application value.
Smart Images

Figure CN120821891B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data security and privacy protection of personalized recommendation systems, and in particular to a method for realizing preference forgetting by constructing a perturbed interaction matrix from the user's perspective without modifying the recommendation model system. BACKGROUND
[0002] With the rapid development of the Internet and mobile Internet, personalized recommendation systems have been widely used in various online services, such as e-commerce platforms, short video applications, etc. The recommendation system collects user historical behavior data such as clicks, browsing, collecting, liking, purchasing, rating, etc., builds user portraits, and models the user's potential interests to achieve personalized recommendations, which not only improves the user experience, but also brings many business opportunities to the platform. However, the recommendation system gradually exposes privacy problems in the use process. The recommendation system is highly dependent on user data, and it is inevitable to cause users' concerns about their privacy leakage. For example, if user information is illegally leaked or misused by third parties, it may lead to exposure of users' preferences, habits, and even identity information.
[0003] Currently, there are four main types of existing technologies for user preference forgetting in recommendation systems. One of the most direct methods is to delete the target user's data from the original training data and retrain the model. This method can completely erase user information, but it is time-consuming and labor-intensive, and is difficult to apply in actual scenarios. Another method is based on incremental update or parameter projection, which reduces the influence of the target user by adjusting part of the model weights. This method is more efficient than retraining, but due to the high nonlinearity of the recommendation model, it is often difficult to completely forget the information of the target user. Differential privacy technology reduces the influence of individual users by injecting noise during training, but this method is not equivalent to the true meaning of "forgetting", and the introduction of too much noise will significantly damage the accuracy of the recommendation system. In recent years, some people have proposed using adversarial sample attacks to force the model to forget specific user information by injecting carefully designed perturbations into the input or training data. This method does not require retraining, but the current research on user preference forgetting in recommendation systems is still in its early stages, and lacks a systematic and directional technical framework.
[0004] In summary, the existing methods all have their own defects. Therefore, there is an urgent need for an efficient, low-cost, and directional user preference forgetting method that can not only ensure excellent forgetting effect of the individual information of the target user, but also maximize the overall performance of the recommendation system and the experience of other users. SUMMARY
[0005] In view of the problems of low efficiency, complex deployment and high dependence on model structure of the existing recommendation system preference forgetting method, the application provides a recommendation system preference forgetting method based on user angle adding interaction disturbance. The method can be directly applied in a black box model scene without modifying the recommendation model structure, by constructing an interaction matrix adding a small disturbance, guiding the model to actively "forget" the preferences of the specified user in the training process, and by introducing a directional attack target function, the performance of the target user (forgetting object) is precisely weakened, and the recommendation quality of other users is stable, and the method can be compatible with mainstream recommendation models such as DMF, LightGCN, etc., and has good universality and practical application value.
[0006] In order to achieve the above application purpose, the application adopts the following technical solutions:
[0007] The recommendation system preference forgetting method based on user angle comprises the following steps:
[0008] Step 1: based on the recommendation system, an interaction matrix of users and items is established.
[0009] Step 2: a recommendation system module is constructed to learn preference information from the interaction matrix, and an attack module is constructed to modify the interaction matrix through an interaction disturbance matrix, so that the preferences of the target user set of preference forgetting cannot be learned by the recommendation system module.
[0010] Step 3: through double-layer optimization, the interaction disturbance matrix modifying the interaction matrix is trained and optimized.
[0011] Further, the step 1 is specifically implemented as follows:
[0012] The recommendation system adopted takes collaborative filtering CF as the basic structure, and in the CF model, there are two groups of entities, including a user set and an item set , the element numbers are and respectively; let the interaction matrix represent the original training interaction behavior, in implicit feedback, if the user interacts with the item , the element =1; otherwise, =0; the CF model based on embedding embeds the user and the item into a potential embedding space, expressed as , represents the embedding dimension, , the elements and in and embeddings; each user's predicted preference for an unknown item is represented as an inner product between the corresponding embeddings; users and items are represented as where denotes transpose.
[0013] The user set is divided into two parts: denotes the set of users who need recommendation services; denotes the set of users who have forgetting needs, and the number of users in and respectively. Take as an indicator matrix to represent whether a user has forgetting needs. If a user belongs to the set of users who have forgetting needs, then = 1; otherwise, = 0.
[0014] Further, the step 2 is implemented as follows:
[0015] For the users in , respectively, use to represent the interaction disturbance matrix, and the interaction matrix as the original data set, denotes the modified interaction data set obtained by adding the interaction disturbance matrix to the original data set . The interaction of the users in the set is not modified.
[0016] Build a recommendation system module by any recommendation algorithm to learn preference information from the user's historical interaction matrix; build an attack module so that the preference of the target user set cannot be learned by the recommendation system module. The interaction disturbance matrix is subjected to the following constraints:
[0017] First, the modification behavior is limited to the set of users who have forgetting needs ; second, each disturbance element is 0 or 1, indicating whether to add an interaction, and cannot appear repeatedly added, so it needs to satisfy and for all existing interactions ; for the total amount of added interactions, define the following average maximum modification number limit: sum all disturbance elements and divide by the number of users who have forgetting needs, less than the maximum average interaction number allowed to be added by each user.
[0018] Further, the step 3 is implemented as follows: the recommendation system module will learn user preferences and predict user interest in unknown items; training the recommendation system module to fit the current interaction data to obtain the optimal embedding parameters of the recommendation system module , after obtaining , the predicted preference matrix is obtained; the goal of the attack module is to modify the interaction data so that the recommendation system module is misled, and the optimal interaction disturbance matrix is obtained by training according to the predicted preference matrix ; the above two training processes are alternated until the attack module achieves the goal of forgetting preferences.
[0019] Further, the loss functions for training the recommendation system module and the attack module are recommendation loss and attacker loss respectively.
[0020] The recommendation loss : the inner optimization seeks the optimal embedding parameters of the recommendation system module to fit the training data at the th iteration , and adopts a weighted regularized matrix factorization WRMF loss as .
[0021] The attacker loss : a double attacker loss function is constructed: the interaction modification should satisfy the current predicted recommendation result trained on should be different from the test data for users with forgetting needs, first obtain the set of potential interested items of the user on clean training data , denoted by , if it belongs to , otherwise ; finally, the attacker's loss function is expressed as:
[0022]
[0023] where is a balance hyperparameter; if , only the recommendation performance is considered to be reduced; if , the result is completely determined by maintaining the recommendation performance of normal users, denotes the preference ranking of users with forgetting needs. On the contrary, denotes the preference ranking of normal users.
[0024] Based on the recommendation loss and the attacker loss The stochastic gradient descent method is used to obtain the optimal constraints. .
[0025] Furthermore, during the training process of the recommendation system module and the attack module, two convergence principles are defined; the first principle is related to the attacker's goal, specifically, the user... The modifications have reached the convergence condition. If the CF model cannot infer its preferences in this iteration, that is... It should be reduced, i.e., the true preference. It should be completely different from the currently predicted preferences; compare the cosine similarity between the two preferences, and... Set as a threshold; if the similarity is lower than... Then the user The optimization reaches the convergence condition; another principle is the maximum sum of Δ. Specifically, an upper limit threshold is set for the average number of interactions modified, so that the sum of all perturbation elements divided by the number of users with forgetting needs is less than the maximum average number of interactions allowed to be added by each user.
[0026] Compared with the prior art, the beneficial effects of this invention are: (1) This invention does not require deleting the original user data or modifying the structure of the recommendation system model, nor does it require full retraining of the model, thus avoiding the huge computational overhead caused by retraining in traditional methods; (2) This invention proposes a user preference forgetting method from the perspective of data attack. By adding limited fake interaction data to the interaction matrix of the target user, the prediction score of the recommendation system for the sensitive items of the target user can be significantly reduced, thereby achieving the forgetting effect without intruding into the model or relying on model parameter information. It is applicable to common black-box recommendation system scenarios in practice and has high versatility and feasibility; (3) This invention can effectively weaken the personalized features of the target user while maintaining the recommendation accuracy for non-target users to the greatest extent. Therefore, while ensuring the forgetting effect, it can maintain the overall performance of the recommendation system. Attached Figure Description
[0027] Figure 1 This is a flowchart of the user-perspective-based recommendation system preference forgetting method of the present invention. Detailed Implementation
[0028] To achieve the above-mentioned objectives, the present invention adopts the following technical solution:
[0029] Recommendation system preference forgetting methods that add interactive perturbations from the user's perspective, such as Figure 1 As shown, it includes the following steps:
[0030] Step 1: Based on the recommendation system, determine the user group and the preferred protection target, and establish the interaction matrix of users and items. The recommendation system used in the invention is based on collaborative filtering (CF) as the basic structure. In the CF model, there are two sets of entities, including a user set and an item set . Since implicit feedback (such as clicks, purchases) is more common in the real world, the recommendation scenario considering implicit feedback is considered. Let represent the original training interaction behavior. In implicit feedback, if user interacts with item , =1; otherwise, = 0. Based on the classic CF model of embedding, users and items are embedded into a latent embedding space, expressed as . represents the embedding dimension, , the elements and in represent the embedding of user and item , respectively. The predicted preference of each user for unknown items can be represented as the inner product between the corresponding embeddings. The predicted preference between user and item can be expressed as , where represents the transpose of .
[0031] In the invention, it is considered that in real-world scenarios, some users need to pass their forgotten preferences to the recommendation system as required. The user set is divided into two parts: represents ordinary users who need high-quality recommendation services. represents users with forgetting needs who pay attention to their personalized information. Use as an indicator matrix to represent whether a user has a forgetting need. If user belongs to a user with a demand, then = 1; otherwise, = 0.
[0032] There are two modules in this invention, one is the recommendation system module, and the other is the attack module. Use to represent the interaction modification, to represent the original data set, to represent the data set after modifying the interaction, which means that the interaction of normal users will not be increased.
[0033] Step 2: Modify the constraints of the interaction. The recommendation system module used in this invention can be any recommendation algorithm, whose responsibility is to learn preference information from the user's historical interaction data. Conversely, the attack module aims to make the preferences of the target user set unable to be learned by the recommendation system module. It needs to be emphasized that in the real world, ordinary users cannot understand or modify the internal structure or parameters of the recommendation system module. Therefore, the attack module does not have the authority to modify the recommendation system, such as deleting historical data or replacing the recommendation algorithm to achieve the "forgetting" goal. So there are constraints for the forgetting problem from the user's perspective, in order to ensure the implementability of the attack process in the real scene, this paper limits the interaction disturbance matrix The following constraints are imposed to limit the operational capabilities of the attack module. First, since the modification behavior is limited to the user set with forgetting needs , the disturbance to normal users is zero. Second, each disturbance element is only allowed to be 0 or 1, indicating whether to add a new interaction, and cannot appear repeatedly added, so it needs to satisfy and for all existing interactions . In addition, in order to prevent system detection, the total amount of added interactions must also be limited, defined as follows average maximum modification number limit:
[0034]
[0035] where is the number of users with forgetting needs, represents the maximum average number of interactions allowed to be added by each user. Combining the above constraints, the behavior of the attack module is strictly limited in a reasonable and controllable range in the data dimension, in order to achieve effective forgetting while maintaining the concealment and feasibility of the operation.
[0036] Step 3: Build a double-layer optimization process. Based on the above user and item interaction, this step establishes a double-layer optimization process to effectively achieve the forgetting goal. First, analyze the unlearnable target from the perspective of the recommendation system and the attack module. Given the historical interaction , the recommendation system module will learn user preferences and predict user interest in unknown items. The predicted preference matrix is denoted by . The process of training the recommendation system module to fit the current interaction data is defined as:
[0037]
[0038] where represents the optimal embedding parameters of the recommendation system module. After obtaining , the predicted preference matrix is obtained. The goal of the attack module is to modify the interaction data so that the recommendation system module is misled, defined as follows:
[0039]
[0040] It is worth noting that these two steps can be trained alternately until the attack module effectively achieves the goal of forgetting bias. The iterative training process can be expressed as a double-layer optimization:
[0041]
[0042]
[0043] where, denotes the th optimization iteration, denotes the training data with modified interactions at the th iteration. The above two equations are denoted as "inner optimization" and "outer optimization".
[0044] Step 4: Constructing recommendation loss and attacker loss .
[0045] In this step, the present application will construct recommendation loss and attacker loss to achieve double-layer optimization.
[0046] Recommendation loss : The inner optimization seeks the optimal embedding parameters of the recommendation system module to fit the training data at the th iteration. The weighted regularized matrix factorization (WRMF) loss is directly adopted as .
[0047] Attacker loss : To link the outer optimization with the goal of forgetting bias, the key is to correctly define the attacker loss . Specifically, a double attacker loss function is constructed: the modified interactions should satisfy the current predicted recommendation results trained on should be different from the test data for users with forgetting needs, while similar to the test data for normal users (i.e., reducing the recommendation performance of and maintaining the recommendation performance of ). However, accessing test data during training is prohibited. Therefore, the present application proposes that the CF model based on the original clean training data can accurately predict the real preferences, i.e., test data. To achieve this, first, the potential interested items of the user ( a list ). Specifically, we denote whether a user-item pair belongs to , if it belongs to , then the user 's preference for belongs to the top predicted ratings. Otherwise, . Finally, the attacker's loss function can be expressed as:
[0048]
[0049] where is the balancing hyper-parameter. If , only the decrease of recommendation performance is considered. If , the result is completely determined by the maintenance of the recommendation performance of normal users. denotes the preference ranking of users with forgetting needs. In contrast, denotes the preference ranking of normal users.
[0050] Step 5: Optimal constraint obtained by stochastic gradient descent. The present invention adopts the stochastic gradient descent method to obtain the optimal constraint . For optimization based on stochastic gradient descent, the recommendation module is first trained several times, and then the gradient of external optimization is recorded.
[0051] Step 6: Setting of convergence condition.
[0052] The last step is the setting of the convergence condition, and the present invention defines two convergence principles. The first principle is related to the goal of the attacker. Specifically, the modification of the user has reached the convergence condition if the CF model cannot infer its preference in this iteration, i.e. should be reduced. This requires that the true preference should be completely different from the current predicted preference. The cosine similarity between the two preferences is compared, and is set as the threshold. If the similarity is lower than , the optimization of the user reaches the convergence condition. The other principle is the maximum number of additions of Δ. Specifically, an upper threshold of the average number of interaction modifications is set, and the formula is .
[0053] To verify the effectiveness of the user perspective preference forgetting method proposed in the present application, experiments were carried out on the classic MovieLens-100K implicit feedback data set (denoted as M1-100k), and three mainstream recommendation models were used respectively: LightGCN, DMF and NCF, to evaluate the adaptability and stability of the double-layer optimization method under different models. In the experimental setup, the user set was divided into "normal users" and "users with forgetting needs", and the Hit Ratio (HR@K) and normalized discounted cumulative gain (NDCG@K) indicators in the recommendation task were calculated respectively to measure the retention or forgetting degree of user interest by the recommendation system. HR@K is used to reflect the hit rate of the target item in the first K recommendation results, while NDCG@K further investigates the rationality of the recommendation result ranking, and comprehensively reflects the recommendation performance. All models are retrained after perturbing the interaction matrix and evaluated on the same test set.
[0054] As shown in Table 1, the recommendation performance of the three models on users with forgetting needs decreased significantly, while the performance on normal users remained basically stable. For example, in the LightGCN model, the HR@20 and NDCG@20 indicators of users with forgetting needs decreased from 0.1935 and 0.0672 to 0.1527 and 0.0575 respectively, indicating that the learning effect of the model on their sensitive item preferences was significantly weakened, achieving the forgetting goal. At the same time, the indicators of normal users remained basically unchanged, verifying the controllability of the present method on non-target users. In addition, in the DMF model, the NDCG@20 of the forgetting users decreased by more than 18%, while the performance of the normal users decreased by less than 5%, further embodying the balance advantage of the present application between target directionality and overall robustness. Overall, the present method can achieve efficient and low-overhead personalized information forgetting without relying on the model structure and deleting user historical data, and has good performance.
[0055] Table 1
[0056]
Claims
1. A user-angle based recommendation system preference forgetting method, characterized in that, Comprising the following steps: Step 1: based on the recommendation system, the interaction matrix of users and items is established; Step 2: the recommendation system module learns the preference information from the interaction matrix, and the attack module modifies the interaction matrix through interaction perturbation matrix, so that the preferences of the target user set with preference forgetting cannot be learned by the recommendation system module, and the specific implementation process is as follows: a set of users who need to be recommended services; a set of users who have the need of forgetting, for users in the set, respectively use denotes the interaction disturbance matrix, the interaction matrix as the original data set, denotes the modified interaction data set obtained by the original data set plus the interaction disturbance matrix , the interaction of the users in the set is not modified; The recommendation system module is constructed by any recommendation algorithm, and the preference information is learned from the historical interaction matrix of the user; The attack module is constructed so that the preferences of the users cannot be learned by the recommendation system module, and the interaction perturbation matrix is applied to impose constraints, and is the set of users and the set of items respectively, and | | and | | are the number of elements. The interaction perturbation matrix The constraints of the interaction perturbation matrix include first that the modification behavior is limited to the set of users Secondly, each disturbance element is 0 or 1, indicating whether to add an interaction, and cannot appear repeatedly, thus satisfying and for all existing interactions satisfying , wherein is 1 or 0, indicating whether the user interacts with the project , and is 1 if there is interaction, otherwise 0; for the total number of added interactions, define the average maximum modification limit: sum all disturbance elements and divide by the number of users with forgetting needs, less than the maximum average number of interactions allowed to be added by each user; Step 3: Train and optimize the interaction perturbation matrix of the modified interaction matrix through double-layer optimization, and the specific implementation process is as follows: the recommendation system module will learn user preferences and predict user interest in unknown items; training the recommendation system module to fit the current interaction data to obtain the optimal embedding parameters of the recommendation system module , after obtaining , the predicted preference matrix is obtained; the goal of the attack module is to modify the interaction data so that the recommendation system module is misled, and the optimal interaction perturbation matrix is obtained by training according to the predicted preference matrix ; the above two training processes are alternated until the attack module achieves the goal of forgetting preferences.
2. The user-angle-based recommendation system preference forgetting method of claim 1, wherein, The specific implementation process of the step 1 is as follows: The recommendation system adopted is based on collaborative filtering (CF) as the basic structure. In the CF model, there are two sets of entities, including a user set and an item set ; let the interaction matrix represent the original training interaction behavior. In implicit feedback, if a user interacts with an item , the element = 1; otherwise, = 0; the embedding-based CF model embeds users and items into a latent embedding space, expressed as , , where represents the embedding dimension, and the elements and in represent the embedding of the user and the item , respectively; the predicted preference of each user for unknown items is represented as the inner product between the corresponding embeddings; the predicted preference between the user and the item is expressed as , where represents the transpose of .
3. The user-angle-based recommendation system preference forgetting method of claim 2, wherein, The step 1 further includes dividing the user set into two parts: and , and The number of users in the two parts is and respectively. is used as an index matrix to represent whether a user has a forgetting demand. If a user has a forgetting demand, then = 1. Otherwise, = 0.
4. The user-angle-based recommendation system preference forgetting method of claim 3, wherein, The loss functions for training the recommendation system module and the attack module are recommendation loss and attacker loss respectively. recommendation loss : inner-layer optimization seeks optimal embedding parameters of the recommendation system module to fit the training data at the second iteration , a weighted regularized matrix factorization WRMF loss is adopted as Attacker loss : Construct a double attacker loss function: the interaction modification should satisfy the current prediction recommendation results trained on should be different from the test data for users with forgetting needs, first get the user's potential interested item set on clean training data , let represent whether the user-item pair belongs to , if it belongs to , otherwise ; finally, the attacker's loss function is represented as: ; wherein, is the balance hyper-parameter; if only the recommendation performance is considered to be decreased; if the result is completely determined by the recommendation performance to maintain normal users, represents the preference ranking of users with forgetting needs; in contrast, represents the preference ranking of normal users; Based on the recommendation loss and the attacker loss , the optimal constraint is obtained using stochastic gradient descent .
5. The user-angle-based recommendation system preference forgetting method of claim 4, wherein, In the training process of the recommendation system module and the attack module, two convergence principles are defined; the first principle is related to the goal of the attacker, specifically, the user 's modification has reached the convergence condition, if the CF model cannot infer its preference in this iteration, i.e. the current predicted preference is completely different from the current predicted preference; Compare the cosine similarity between two preferences, and... Set as a threshold; if the similarity is lower than... Then the user The optimization reaches the convergence condition; another principle is the maximum sum of Δ. Specifically, an upper limit threshold is set for the average number of interactions modified, so that the sum of all perturbation elements divided by the number of users with forgetting needs is less than the maximum average number of interactions allowed to be added by each user.
Citation Information
Patent Citations
Activity recommendation method based on multi-granularity feature fusion
CN116049549A
Recommendation model forgetting
CN117634637A