CN115860053A - Label recommendation method and system based on parameter anti-attack metric learning - Google Patents
Label recommendation method and system based on parameter anti-attack metric learning Download PDFInfo
- Publication number
- CN115860053A CN115860053A CN202211603826.8A CN202211603826A CN115860053A CN 115860053 A CN115860053 A CN 115860053A CN 202211603826 A CN202211603826 A CN 202211603826A CN 115860053 A CN115860053 A CN 115860053A
- Authority
- CN
- China
- Prior art keywords
- user
- item
- label
- representation
- tag
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
The invention discloses a label recommendation method and a system based on parameter anti-attack metric learning, wherein the method comprises the following steps: acquiring user, item and label identification; converting the user, item and label identifications into vectors to generate user, item and label representations; generating user, item and label confrontation disturbance; generating a confrontation user, a confrontation item, and a confrontation tag representation; representing the confrontation user, the confrontation item and the confrontation label to generate a confrontation potential relation vector of a user-label and an item-label and generate a potential relation vector of the user-label and the item-label; modeling distance measures from the user-tag and item-tag potential relationship vectors to user, item, and tag representations; modeling countermeasure distance metrics by representing the user-label and item-label countermeasure potential relationship vectors with countermeasure users, countermeasure items and countermeasure labels, and returning to a label recommendation list; jointly training a distance metric and an confrontation distance metric; updating parameters and countering disturbances.
Description
Technical Field
The invention belongs to the technical field of information retrieval, and particularly relates to a label recommendation method and system based on parameter counterattack metric learning.
Background
In the internet era containing a lot of information, tags are important tools for information retrieval, which can help users to classify and retrieve related resources, and large-scale applications at home and abroad such as LastFm, movieLens, naobao, tremble, kyoto, etc. use keywords to annotate songs, videos, books, products and other network resources, so-called tags. In addition to annotating items, tags are also useful for solving practical problems such as image recommendation tasks, interest discovery, and content search. As the availability of tags in various fields is increased, tag recommendation technology has become a key technology to help users more conveniently retrieve their desired network resources. The content management and the internet resource search are more and more important, the proper label is set, the effective classification can be made for the internet resource, and the experience of a user on the information index service is improved.
Traditional tag recommendation methods primarily recommend based on historical interaction data of users, items, and tags, such methods primarily focus on implicit feedback, as implicit interactions can generally predict the interests of users in greater numbers and at a lower cost. The main recommendation method depends on a tensor decomposition technology, however, the tensor decomposition technology cannot model distance measurement between data because inner products are used to violate triangle inequality, and the performance of tag recommendation is often affected by data sparseness and cold start. In addition, the graph-based approach may model the tag recommendation system as a three-part graph, pass messages along edges, and learn to summarize a representation of neighborhood information for each node. The nodes of the graph may be users, documents, or tags. The weight of one node can be propagated to other nodes through co-occurring connections, however, the entire algorithm must run online and the entire graph must be traversed for each user-document pair queried, and therefore the model is very time consuming. The existing method lacks attention to the data similarity problem and is not beneficial to mining the implicit information of the data. Meanwhile, data samples are often subjected to noise interference, so that the difference between test data and training data is large, and the model is often difficult to obtain good generalization capability.
Therefore, how to obtain similarity relationships among users, items and tags to build a reliable tag recommendation model is the focus of the present invention. Furthermore, there is no method in the art for combining fitness metric learning and counterlearning in a tag recommendation system, and therefore, the present invention explores the behavior of counterlearning acting on metric learning.
Disclosure of Invention
Based on the defects of the existing label recommendation technology, the invention aims to provide a label recommendation method and a system based on parameter attack resistance metric learning, which can effectively improve the flexibility and modeling capability of metric learning and capture the implicit semantic relation among different data. By adding corresponding confrontation disturbance to the model parameters in metric learning, the model is confronted and defended, the generalization capability of the model is improved, and the quality of label recommendation is improved.
In order to achieve the purpose, the invention adopts the following technical scheme:
a label recommendation method based on parameter counterattack metric learning comprises the following steps:
(1) Acquiring historical access record information corresponding to a user identifier, and acquiring the user identifier, an item identifier and a tag identifier according to the historical access record information;
(2) Converting the user identifier, the item identifier and the label identifier into low-dimensional dense vector representation by using One-Hot coding to generate user representation, item representation and label representation; generating user countermeasure disturbance, project countermeasure disturbance and label countermeasure disturbance according to the user representation, the project representation and the label representation;
(3) Directly adding the user countermeasure disturbance, the item countermeasure disturbance and the tag countermeasure disturbance into the user representation, the item representation and the tag representation to generate a countermeasure user representation, a countermeasure item representation and a countermeasure tag representation;
(4) Generating a user-label and item-label potential relationship vector with the confrontation by using an attention mechanism to the confrontation user representation, the confrontation item representation and the confrontation label representation, and generating the user-label and item-label potential relationship vector according to the user representation, the item representation and the label representation;
(5) Modeling user-label and item-label distance measures using Euclidean distances to represent the user, item and label representations, and the latent relationship vectors;
(6) Modeling the confrontation user representation, the confrontation item representation and the confrontation label representation, and the confrontation potential relationship vector by using Euclidean distance to measure the confrontation distance of the user-label and the item-label, and returning a recommendation list of the top K labels which are most interesting to the user;
(7) Performing joint training on the distance metric and the confrontation distance metric by utilizing triple loss to solve a maximum and minimum optimization problem; the original model parameters are minimized while maximizing the counterdisturbance, which is updated by maximization, and the original model parameters are updated by minimization.
(8) And updating parameters and updating the countermeasure disturbance by using random gradient descent.
Preferably, in step (2), the three unique hot coded vectors of the user identifier, the item identifier and the tag identifier are respectively associated with the embedded matrices U, V, T U And T V Multiplication results in:
u p =U.onehot(u),v q =V.onehot(v)
wherein onehot (-) represents a one-hot encoding operation,and &> Representing a number domain, wherein the number of users, the number of items and the number of labels are respectively represented by | U |, | V |, and | T |, and d is the dimension of the potential feature; user is denoted as u p Item is denoted by v q The label of a particular user is indicated as ≥>The tag of a particular item is denoted as ≥>
Preferably, in step (3), the user is injected with the user opposition disturbance on the user representation, the item representation and the label representationItem fighting disturbance pick>The tag of a particular user resists a disturbance>The tag of a particular item resists a perturbation>
The size limits of the user versus disturbance, the item versus disturbance, the tag versus disturbance for a particular user, and the tag versus disturbance for a particular item are:
Preferably, in step (4), the confrontation user representation, the confrontation item representation and the confrontation label representation are used for generating a user-label potential relation vector and an item-label potential relation vector with confrontation, and the item representation and the label representation are used for generating the user-label and item-label potential relation vector according to the user representation; user-tagAnd item-tag->Against the potential relationship vector and the user-tag->And item-tagThe potential relationship of (c) can be calculated as:
wherein the content of the first and second substances,represents a user-tag antagonistic attention vector, < '> based on the user's preference>Represents an item-tag antagonistic attention vector, <' > based on the status of the item>The elements representing the countering attention vector in the user-tag,elements representing the anti-attention vector in the item-tag, w i =χ T a i Indicating the user-tag attention vector, μ i =ζ T b i Represents an item-tag attention vector, <' > based on the number of items in the list>An element representing an attention vector in the user-tag, is @>Elements representing attention vectors in item-tags; the hadamard points are used to learn the joint embedding ≥ of user-tag>And item-tag combination embedding>And joint embedding with countervailing user-tag +> And item-tag joint embedding
Preferably, in the step (5), the similarity score between the user representation, the item representation and the tag representation is calculated by using the euclidean distance, and the calculation formula is as follows:
wherein the content of the first and second substances,represents the original model parameter, <' > is selected>And &>Generating a user-label potential relation and an item-label potential relation for the user; a higher similarity score +>Meaning that the probability that user u will annotate item v with tag t is higher.
Preferably, in the step (6), the similarity score between the confrontation user representation, the confrontation item representation and the confrontation label representation is calculated by using the euclidean distance as follows:
wherein, the first and the second end of the pipe are connected with each other,represents fighting a disturbance>And &>Adding a user-label potential relation and an item-label potential relation generated after resisting disturbance; using the formula based on the obtained similarity score: />And returning an ordered tag recommendation list, wherein K represents the length of the tag recommendation list.
Preferably, in step (7), the distance metric and the robust distance metric are jointly trained by using triple loss, the robust disturbance Δ is updated through maximization, and the parameter θ is updated through minimization;
where D is an example of training, α represents the robust regularizer,for a constant obtained in the training process>Representing the current parameters of the model and, t' denotes the label not observed, m denotes a fixed margin, max (0, x), also called Relu function, opposes the component aL MLT (θ+Δ adv ) Which is considered as a term of the counterregularization of the model.
The training process is regarded as a maximum and minimum optimization problem:
Preferably, the counterdisturbance is updated by maximization; given a training instance (u, v, t, t'), the counterdisturbance isComprises the following steps:
wherein the content of the first and second substances,a constant representing the current model parameter when->When the gradient of the opposition perturbation Δ is equal to 0; otherwise, to maximize Δ exactly, the disturbance L is countered adv (Δ) is approximated as a linear function, the gradient of Δ being:
wherein, under the constraint that | | | | Δ | ≦ ε, Δ | | | adv The optimal solution of (a) is:
the update of the parameter θ is to solve the local objective function of the minimization of the training instance (u, v, t, t'):
preferably, in step (8), the parameter update and the disturbance rejection update are performed by using a stochastic gradient descent method, and the calculation is as follows:
wherein, eta represents learning rate, original parameterAntagonizes a perturbation> The optimum is found by solving a maximum and minimum optimization problem.
The invention also discloses a label recommendation system based on the method, which comprises the following modules:
an identification acquisition module: acquiring historical access record information corresponding to a user identifier, and acquiring the user identifier, an item identifier and a tag identifier according to the historical access record information;
the representing and resisting disturbance generating module: converting the user identifier, the item identifier and the label identifier into low-dimensional dense vector representations by using One-Hot coding, and respectively generating a user representation, an item representation and a label representation; respectively generating user countermeasure disturbance, project countermeasure disturbance and label countermeasure disturbance according to the user representation, the project representation and the label representation;
the confrontation representation generation module: adding the user countermeasure disturbance, the item countermeasure disturbance and the tag countermeasure disturbance to a user representation, an item representation and a tag representation respectively to generate an countermeasure user representation, an countermeasure item representation and an countermeasure tag representation respectively;
a relationship vector generation module: generating a confrontation user representation, a confrontation item representation and a confrontation label representation generated by a confrontation representation generation module to form confrontation potential relation vectors of a user-label and an item-label by using an attention mechanism, and generating the potential relation vectors of the user-label and the item-label according to the user representation, the item representation and the label representation;
a distance metric modeling module: modeling user-label and item-label distance measures using Euclidean distances to the user representation, item representation and label representation, and user-label and item-label potential relationship vectors;
the confrontation distance metric modeling module: modeling the confrontation user representation, the confrontation item representation and the confrontation label representation, and the confrontation potential relation vectors of the user-label and the item-label by using Euclidean distance, and returning a top K label recommendation list which is most interested by the user;
a training module: performing joint training on the distance metric and the confrontation distance metric by utilizing triple loss to solve the maximum and minimum optimization problem; minimizing the original model parameters while maximizing the disturbance rejection, wherein the disturbance rejection is updated through maximization, and the original model parameters are updated through minimization;
an update module: and updating parameters and updating the anti-disturbance by using random gradient descent.
Compared with the prior art, the invention has the following technical effects:
(1) In order to relieve the geometric inflexibility of metric learning, a relation structure of entity information hiding is mined, a generation process of a potential relation vector is defined, the potential relations of a user-label and a project-label are integrated into the modeling of the metric learning, the flexibility and the modeling capability of the metric learning are improved, and the semantic relation implicit among different data can be effectively captured. As a metric learning model, the invention utilizes Euclidean distance as a distance metric to calculate similarity scores among potential relationship vectors, user preferences, item features and label information.
(2) The method adds corresponding countermeasure disturbance to the model parameters in the metric learning so that the model performs countermeasure defense, reduces the difference between the data in the test stage and the data in the training stage, and obtains good generalization capability.
Drawings
Fig. 1 is a schematic diagram of a learning process of a tag recommendation method based on parameter counterattack metric learning according to an embodiment of the present invention;
fig. 2 is an overall structural diagram of a tag recommendation system based on parameter counterattack metric learning according to an embodiment of the present invention.
Fig. 3 is a block diagram of a tag recommendation system based on parameter countering attack metric learning according to an embodiment of the present invention.
Detailed Description
The technical solution of the present invention is further explained by the following specific examples.
The invention discloses a learning label recommendation method based on parameter anti-attack metrics, which comprises the steps of firstly, creating potential characteristic vectors of users, items and labels, directly injecting anti-disturbance on original parameters, then generating potential vectors of user-labels and item-labels by using an attention mechanism, using Hadamard products to learn the joint embedding of the user-labels and the item-labels, learning specific types of attention vectors based on key value pairs of the user-labels and the item-labels, and converting the attention vectors of the user-labels and the item-labels into different attention scores by adopting a Softmax function. Then, the potential relation between the user-label and the item-label is adaptively learned according to different attention scores of the user-label and the item-label, and a Euclidean distance is utilized to calculate a potential relation vector and a similarity score between different entity information by modeling distance measurement of the user-label and the item-label so as to form a prediction. An objective function combining metric learning and countermeasure learning is constructed to minimize the original model parameters while maximizing the countermeasure disturbance. And finally, updating the parameters by using a random gradient descent method.
Specifically, the method of the preferred embodiment of the present invention adopts the following technical scheme steps:
(1) When a user logs in the system, obtaining historical access record information corresponding to the user identification, and obtaining the user identification, the item identification and the label identification according to the historical access record information.
(2) And converting the original input into a binary sparse vector by utilizing one-hot coding according to the user identification, the item identification and the label identification. These vectors are then projected onto a low-dimensional dense vector, generating an embedded representation of the user, item, and tag. The three heat vectors are respectively associated with the embedded matrices U, V, T U And T V The process of multiplication, embedding, is represented as:
u p =U.onehot(u),v q =V.onehot(v)
wherein onehot (-) represents a one-hot encoding operation,and &> Representing a number domain, wherein | U |, | V |, | T | respectively represent the number of users, the number of items and the number of labels, and d is the dimension of the potential feature. User's feature representation u p Potential representation of an item v q User-specific tag feature representationThe tag characteristic representation of a particular item->
(3) An antagonistic perturbation Δ is injected on the embedded vector to attack the original parameters. The confrontation disturbance delta can be respectively expressed as user confrontation representationItem confrontation representation->Tag confrontation representation for a particular user>Tag antagonism for a particular item indicates >>The size of the disturbance is limited to:
wherein, the first and the second end of the pipe are connected with each other,and &>| | The | represents L 2 Norm, epsilon is the size of a control disturbance vector, so that the original sample data of the anti-data attack can be automatically generated;
(4) In the attention mechanism layer, attention mechanism is used to generate user-tagsAnd the item-tag potential vector +>And against the user-tag->And a potential vector that antagonizes the item-tag->They are calculated as:
wherein the content of the first and second substances,represents a user-tag antagonistic attention vector, < '> based on the user's preference>Represents an item-tag antagonistic attention vector, <' > based on the status of the item>The elements representing the countering attention vector in the user-tag,an element representing an anti-attention vector in the item-tag, < > based on the value of the item-tag>Indicating the user-tag attention vector, μ i =ζ T b i Represents an item-tag attention vector, <' > based on the number of items in the list>An element representing an attention vector in the user-tag, is @>An element representing an attention vector in an item-tag; the hadamard points are used to learn the joint embedding ≥ of user-tag>And item-tag associative embedding>And joint embedding with countervailing user-tag +> And item-tag joint embedding
(5) The triangle inequalities are satisfied using euclidean distance as a distance measure, and a potential relationship vector and a similarity score between different entity information are calculated by modeling the user-tag and item-tag distance measures to form a prediction. The distance between data can be calculated by using Euclidean distance:
where ρ is a point (x) 2 ,y 2 ) And point (x) 1 ,y 1 ) The Euclidean distance between, | X | is a point (X) 2 ,y 2 ) Euclidean distance to the origin.
(6) Considering the problem of similarity of data in tag recommendation, a similarity score between a user, an item and a tag is calculated by using Euclidean distance as a distance measure, and a scoring function of the similarity score can be calculated as a formula:
wherein the content of the first and second substances,represents the original model parameter, <' > is selected>And &>A vector of potential relationships for the generated user-tag, item-tag. A higher similarity score +>Meaning that the probability that user u will annotate item i with tag i is higher.
(7) By adding the anti-perturbation injection directly to the raw model parameters, the scoring function of the present invention (AMLT) can be described as the formula:
wherein the content of the first and second substances,represents fighting a disturbance>And &>To add user-tag potential relationships and item-tag potential relationships generated against the perturbation. Using the formula based on the obtained similarity score: />Returning a rankingThe tag recommendation list of (1).
(8) And constructing an objective function combining metric learning and antagonistic learning, wherein one part is a loss function of the original parameters, and the other part is a loss function with antagonistic disturbance. The core idea is that an additional anti-disturbance regularizer is added under the condition of no disturbance, and the additional anti-disturbance regularizer are optimized together in the training process, so that the model is forced to perform self-defense in the training process, and the robustness of the model is improved. The objective function of the joint training is:
where D is an example of training, alpha represents the strength against the perturbation,representing the current model parameters, t' represents the unobserved labels, m represents a fixed margin>For a constant obtained during the training process, is> max (0, x) is also known as Relu function. The opposition disturbance Δ is updated by maximization and the original parameter θ is updated by minimization. Antagonistic term α L MLT (θ+Δ adv ) Can be viewed as a term of de-regularization of the model. This training process can be viewed as playing a maximum and minimum game:
wherein the content of the first and second substances, the learning algorithm for the model parameters θ is to minimize the participant, while the process Δ of acquiring the perturbation is taken as the maximizing participant, with the goal of identifying the worst-case perturbation for the current model. The two players alternately play until convergence.
(9) For further analysis, the present invention provides details of solving the infinitesimal optimization, given a training instance (u, v, t, t'), the opposition perturbation Δ can be updated by maximizing:
wherein it is present>A constant representing the current model parameter when->The gradient of the opposition perturbation Δ is equal to 0. Otherwise, to maximize Δ exactly, the objective function L is set adv (Delta) is approximated as a linear function, based on the value of>The gradient of (d) is:
within a constraint of | < epsilon adv The optimal solution of (a) is:
(10) The invention fully considers the updating conditions of all parameters, and the solving of the minimized local objective function of the training example (u, v, t, t') comprises the following steps:
(11) Updating the involved parameters and the countermeasure disturbance by using a stochastic gradient descent method (SGD), comprising the following steps:
where η represents the learning rate, the original parameterCountering disturbances After the parameter updating is finished, the model obtains a scoring function with good stability.
The following specific application example is combined to perform experimental demonstration aiming at a learning label recommendation method and system based on parameter counterattack metric, and specifically comprises the following steps:
1. preparing a standard data set
The invention uses the MovieLens data set as a standard data set to verify the effectiveness of the parameter-based anti-attack metric learning label recommendation method. The movilens dataset is a widely used reference dataset, published by the group research group, which analyzes the relationship between users, tags and movies. The details of the data set are shown in table 1.
TABLE 1 data set-related statistics
Data set | Number of users | Quantity of items | Number of labels | Number of training sets | Number of test sets |
MovieLens | 469 | 1524 | 1017 | 30503 | 6911 |
2. Evaluation index and parameter setting
Referring to the (u, v) combination as a post, for each post (u, v), the last triplet (u, v, t) is selected as the test set F according to the marked time test And from the setF is cleared, and the observed user-item-tag triplets F remain train =F-F test As a training set. The purpose of the tag recommendation system is to provide a tag ordered list of Top-K for a post (u, v).
The invention judges the performance of label recommendation based on the widely used standard indexes in the information retrieval and recommendation system: precision @ K and recall @ K as evaluation indexes are respectively expressed as:
where R (u, v) represents a set of tags recommended to the user item pair (u, v), T (u, v) is a set of tags assigned to item v by user u, and Test represents a Test set. For these 2 indices, K is set to 5, 10, 20, respectively.
All algorithms are realized by using a TensorFlow framework in a Linux environment, and results are reported in a test set. The number of iterations of training is 1000, the learning rate η =0.001, the number of batches B =1024 and the regularization coefficient λ =0.001, the embedding dimension d =64, the edge m =0.3, the number of memory slices N =25, the strength of the anti-regularizer α =25, and the size of the anti-perturbation ∈ =25.
3. Experiments were performed on standard data sets
In order to verify the effectiveness of the parameter-based anti-attack metric learning label recommendation method, K =5, 10 and 20 are respectively taken from a MovieLens data set for modeling and prediction, and the prediction result and other prediction results are compared on an evaluation index. The results of the experiment are shown in table 2.
Table 2 comparison results of all algorithms in MovieLens dataset
It can be observed from table 2 that the present invention (AMLT) shows a better prediction accuracy on movilens dataset compared to the prediction results of other comparative algorithms (CF, PITF, NITF, CML, LRML, ABNT, ATF) on all indices. From the above analysis, the invention, as a label recommendation method combining antagonism learning and metric learning, shows higher accuracy and better stability on most indexes.
The invention relates to a label recommendation method and a system based on parameter counterattack metric learning, wherein the method comprises the following steps: and acquiring a user identifier, an item identifier and a label identifier according to the historical behavior record of the user, representing the user identifier, the item identifier and the label identifier as a binary sparse vector through one-hot coding, and projecting the binary sparse vector onto a low-dimensional dense vector. And reflecting the user preference and the item characteristics in different types of label information interaction by adopting an attention mechanism, and adaptively learning the potential relation between a user-label and an item-label according to different attention scores of the user-label and the item-label so as to improve the geometric flexibility of the model. Similarity scores between users, items, tags, and potential relationship vectors are calculated from euclidean distances. The robustness of the model can be effectively improved by the countermeasure learning, corresponding countermeasure disturbance is added to the parameters related to the method in the metric learning so that the model can carry out countermeasure defense, a novel objective function combining the metric learning and the countermeasure learning is constructed, the original model parameters are minimized while the countermeasure disturbance is maximized, the effectiveness of the proposed method is analyzed in principle, the basic working principle of the method is explained, and the interpretability of the method is improved.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is specific and detailed, but not to be understood as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (10)
1. The label recommendation method based on parameter counterattack metric learning is characterized by comprising the following steps:
(1) Acquiring historical access record information corresponding to a user identifier, and acquiring the user identifier, an item identifier and a tag identifier according to the historical access record information;
(2) Converting the user identifier, the item identifier and the label identifier into low-dimensional dense vector representations by using One-Hot coding, and respectively generating a user representation, an item representation and a label representation; respectively generating user countermeasure disturbance, project countermeasure disturbance and label countermeasure disturbance according to the user representation, the project representation and the label representation;
(3) Adding the user countermeasure disturbance, the item countermeasure disturbance and the tag countermeasure disturbance to a user representation, an item representation and a tag representation respectively to generate an countermeasure user representation, an countermeasure item representation and an countermeasure tag representation respectively;
(4) Generating a user-label and item-label confrontation potential relationship vector by using the confrontation user representation, the confrontation item representation and the confrontation label representation in the step (3) by using an attention mechanism, and generating a user-label and item-label potential relationship vector according to the user representation, the item representation and the label representation;
(5) Modeling user-label and item-label distance measures using Euclidean distances to the user representation, item representation and label representation, and user-label and item-label potential relationship vectors;
(6) Modeling the confrontation user representation, the confrontation item representation and the confrontation label representation, and the confrontation potential relation vectors of the user-label and the item-label by using Euclidean distance, and returning a top K label recommendation list which is most interesting to the user;
(7) Performing joint training on the distance metric and the confrontation distance metric by utilizing triple loss to solve a maximum and minimum optimization problem; minimizing the original model parameters while maximizing the disturbance rejection, wherein the disturbance rejection is updated through maximization, and the original model parameters are updated through minimization;
(8) And updating parameters and updating the anti-disturbance by using random gradient descent.
2. The method of claim 1, wherein in step (2), the three unique encoding vectors of the user identifier, the item identifier and the tag identifier are respectively associated with the embedding matrix U, V, T U And T V Multiplication results in:
u p =U.onehot(u),v q =V.onehot(v)
wherein onehot (-) represents a one-hot encoding operation,and representing a number domain, wherein the U, V and T respectively represent the quantity of users, the quantity of items and the quantity of labels, and d is the dimension of potential features; the user is denoted as u p Item is denoted by v q The label of a particular user is indicated as ≥>The tag of a particular item is denoted as ≥>
3. The method of claim 2, wherein in step (3), the user is injected with user opposition perturbation on the user representation, item representation and label representationItem fighting disturbance pick>The tag of a particular user resists a disturbance>The tag of a particular item resists a perturbation>
The size limits of the user versus disturbance, the item versus disturbance, the tag versus disturbance for a particular user, and the tag versus disturbance for a particular item are:
4. The method of claim 3, wherein in step (4), the user-tagAnd item-tagAgainst the potential relationship vector and the user-tag->And item-tag->The potential relationship of (a) is calculated as:
wherein, the first and the second end of the pipe are connected with each other,represents a user-tag antagonistic attention vector, < '> based on the user's preference>Stands for item-tag antagonistic attention vector @>An element representing an anti-attention vector in the user-tag, is->Element representing the anti-attention vector in item-tag, w i =χ T a i Indicating the user-tag attention vector, μ i =ξ T b i Represents an item-tag attention vector, <' > based on the number of items in the list>The elements representing the attention vectors in the user-tag,elements representing attention vectors in item-tags; the hadamard points are used to learn the joint embedding ≥ of user-tag>And item-tag combination embedding>And joint embedding with antagonistic user-tag +> And item-tag joint embedding
5. The method of claim 4, wherein in step (5), the similarity score between the user representation, the item representation and the tag representation is calculated using Euclidean distances as follows:
6. The method of claim 5, wherein in step (6), the Euclidean distance is used to calculate the similarity score between the confrontational user representation, the confrontational item representation and the confrontational tag representation by the following formula:
wherein, the first and the second end of the pipe are connected with each other,representing resistance to perturbation>And &>Adding a user-label potential relation and an item-label potential relation generated after resisting disturbance; using the formula based on the obtained similarity score:and returning an ordered tag recommendation list, wherein K represents the length of the tag recommendation list.
7. The method of claim 6, wherein in step (7), the distance metric and the robust distance metric are jointly trained using triple loss, the robust perturbation Δ is updated by maximization, and the parameter θ is updated by minimization:
where D is an example of training, α represents the robust regularizer,for a constant obtained in the training process>Representing the parameters of the current model and, t' denotes the label not observed, m denotes a fixed margin, max (0, x) is called Relu function, antagonistic component α L MLT (θ+Δ adv ) One term of counterregularization, which is considered a model;
the training process is regarded as a maximum and minimum optimization problem:
8. the method of claim 7, wherein the counterperturbation is updated by maximization; given a training instance (u, v, t, t'), the counterdisturbance isComprises the following steps:
wherein the content of the first and second substances,a constant representing the current model parameter when->When the gradient of the opposition perturbation Δ is equal to 0; otherwise, oppose disturbance L adv (Δ) is approximated as a linear function, the gradient of Δ being: />
Wherein Δ | | | ≦ ε constraint adv The optimal solution of (a) is:
the update of the parameter θ is to solve the local objective function of the minimization of the training instance (u, v, t, t'):
wherein, delta adv To counter a constant obtained after update of the disturbance, for the parameter concernedIs expressed as:
9. the method of claim 8, wherein step (8), the updating of the parameters and the updating of the counterdisturbance using stochastic gradient descent, are calculated as:
10. A tag recommendation system based on the method of any one of claims 1-9, comprising the following modules:
an identification acquisition module: acquiring historical access record information corresponding to a user identifier, and acquiring the user identifier, an item identifier and a tag identifier according to the historical access record information;
the representing and resisting disturbance generating module: converting the user identifier, the project identifier and the label identifier into low-dimensional dense vector representations by utilizing One-Hot, and respectively generating a user representation, a project representation and a label representation; respectively generating user countermeasure disturbance, project countermeasure disturbance and label countermeasure disturbance according to the user representation, the project representation and the label representation;
the confrontation representation generation module: adding the user countermeasure disturbance, the item countermeasure disturbance and the tag countermeasure disturbance to a user representation, an item representation and a tag representation respectively to generate an countermeasure user representation, an countermeasure item representation and an countermeasure tag representation respectively;
a relationship vector generation module: generating a confrontation user representation, a confrontation item representation and a confrontation label representation generated by a confrontation representation generation module to form confrontation potential relation vectors of a user-label and an item-label by using an attention mechanism, and generating the potential relation vectors of the user-label and the item-label according to the user representation, the item representation and the label representation;
a distance metric modeling module: modeling user-label and item-label distance measures using Euclidean distances to the user representation, item representation and label representation, and user-label and item-label potential relationship vectors;
the confrontation distance metric modeling module: modeling the confrontation user representation, the confrontation item representation and the confrontation label representation, and the confrontation potential relation vectors of the user-label and the item-label by using Euclidean distance to measure the confrontation distance of the user-label and the item-label, and returning a top K label recommendation lists which are most interested in the user;
a training module: performing joint training on the distance metric and the confrontation distance metric by utilizing triple loss to solve the maximum and minimum optimization problem; minimizing the original model parameters while maximizing the disturbance rejection, wherein the disturbance rejection is updated through maximization, and the original model parameters are updated through minimization;
an updating module: and updating parameters and updating the countermeasure disturbance by using random gradient descent.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211603826.8A CN115860053A (en) | 2022-12-13 | 2022-12-13 | Label recommendation method and system based on parameter anti-attack metric learning |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211603826.8A CN115860053A (en) | 2022-12-13 | 2022-12-13 | Label recommendation method and system based on parameter anti-attack metric learning |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115860053A true CN115860053A (en) | 2023-03-28 |
Family
ID=85672736
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211603826.8A Pending CN115860053A (en) | 2022-12-13 | 2022-12-13 | Label recommendation method and system based on parameter anti-attack metric learning |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115860053A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117540791A (en) * | 2024-01-03 | 2024-02-09 | 支付宝(杭州)信息技术有限公司 | Method and device for countermeasure training |
-
2022
- 2022-12-13 CN CN202211603826.8A patent/CN115860053A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117540791A (en) * | 2024-01-03 | 2024-02-09 | 支付宝(杭州)信息技术有限公司 | Method and device for countermeasure training |
CN117540791B (en) * | 2024-01-03 | 2024-04-05 | 支付宝(杭州)信息技术有限公司 | Method and device for countermeasure training |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Kong et al. | VOPRec: Vector representation learning of papers with text information and structural identity for recommendation | |
Bansal et al. | Content driven user profiling for comment-worthy recommendations of news and blog articles | |
Cao et al. | Shilling attack detection utilizing semi-supervised learning method for collaborative recommender system | |
Qi et al. | Mining collective intelligence in diverse groups | |
Hu et al. | A self-training approach for resolving object coreference on the semantic web | |
Zhou et al. | Userrec: A user recommendation framework in social tagging systems | |
Su et al. | Neural graph matching based collaborative filtering | |
Armandpour et al. | Robust negative sampling for network embedding | |
Ma et al. | Hierarchical taxonomy aware network embedding | |
Zhang et al. | Graph embedding-based approach for detecting group shilling attacks in collaborative recommender systems | |
Jiao et al. | A novel learning rate function and its application on the SVD++ recommendation algorithm | |
Cao et al. | An improved collaborative filtering recommendation algorithm based on community detection in social networks | |
Su et al. | Research on personalized recommendation algorithm based on ontological user interest model | |
Gao et al. | CNL: collective network linkage across heterogeneous social platforms | |
Stanescu et al. | A hybrid recommender system: User profiling from keywords and ratings | |
CN113918833A (en) | Product recommendation method realized through graph convolution collaborative filtering of social network relationship | |
Dai et al. | BTR: a feature-based Bayesian task recommendation scheme for crowdsourcing system | |
CN115860053A (en) | Label recommendation method and system based on parameter anti-attack metric learning | |
Liang et al. | Cross-media semantic correlation learning based on deep hash network and semantic expansion for social network cross-media search | |
Chen et al. | DPM-IEDA: dual probabilistic model assisted interactive estimation of distribution algorithm for personalized search | |
Meng et al. | Community discovery in social networks via heterogeneous link association and fusion | |
CN115840853A (en) | Course recommendation system based on knowledge graph and attention network | |
Liao et al. | Accumulative Time Based Ranking Method to Reputation Evaluation in Information Networks | |
Wei et al. | Unsupervised meta-path reduction on heterogeneous information networks | |
Yuan et al. | A weighted one class collaborative filtering with content topic features |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |