CN116151892A - Item recommendation method, system, device and storage medium - Google Patents

Item recommendation method, system, device and storage medium Download PDF

Info

Publication number
CN116151892A
CN116151892A CN202310428078.2A CN202310428078A CN116151892A CN 116151892 A CN116151892 A CN 116151892A CN 202310428078 A CN202310428078 A CN 202310428078A CN 116151892 A CN116151892 A CN 116151892A
Authority
CN
China
Prior art keywords
user
item
interaction data
negative sample
representing
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.)
Granted
Application number
CN202310428078.2A
Other languages
Chinese (zh)
Other versions
CN116151892B (en
Inventor
何向南
吴俊康
陈佳伟
吴剑灿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Science and Technology of China USTC
Original Assignee
University of Science and Technology of China USTC
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by University of Science and Technology of China USTC filed Critical University of Science and Technology of China USTC
Priority to CN202310428078.2A priority Critical patent/CN116151892B/en
Publication of CN116151892A publication Critical patent/CN116151892A/en
Application granted granted Critical
Publication of CN116151892B publication Critical patent/CN116151892B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • G06Q30/0251Targeted advertisements
    • G06Q30/0269Targeted advertisements based on user profile or attribute
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • General Business, Economics & Management (AREA)
  • Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Marketing (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an article recommending method, an article recommending system, an article recommending device and a storage medium, wherein the article recommending method, the article recommending system, the article recommending device and the storage medium are in one-to-one correspondence schemes; the scheme is as follows: by constructing the loss function for modeling the user article interaction data (positive samples) and the negative samples at the same time, noise in the positive samples and noise in the negative samples can be compatible at the same time, and the encoder is continuously optimized through the loss function, so that the optimized encoder can better extract embedded characterization of the user and the articles, and further better evaluate the preference degree (reflected by preference scores) of the user on the articles, and further better recommend related articles for the user.

Description

Item recommendation method, system, device and storage medium
Technical Field
The present invention relates to the field of recommendation systems, and in particular, to a method, a system, an apparatus, and a storage medium for recommending items.
Background
The frame of the recommendation system can often be divided into two parts: encoder and loss function. The encoder module acquires click habits and potential interests of the user by performing embedded characterization learning on the user and the object. The loss function portion uses the output of the upstream encoder for supervised training to help update the iteration model parameters. In recent years, with the intensive research of encoders in neural networks, more research centers have tended to build more massive and complex models, capturing complex correlations of the super-scale data. However, due to the great variability of downstream tasks, many powerful encoder designs often start for a particular scenario and are limited by mobility and cannot be widely used. The loss objective function is the most important model, and in recent years, attention is paid to the loss objective function so that the development of the loss objective function is still stagnated in a plurality of classical loss functions in the early development stage of deep learning. Therefore, the performance of the existing recommendation system is still to be improved.
Some studies have attempted new designs for the loss function, but often require replacement at the expense of high time costs, such as picking and identifying difficult samples in each iteration for the next iteration learning. Or too much depending on the characteristics of the data itself, such as design according to the characteristics of the data set or the difficult points of the characteristics in the actual scene, and large-scale expansion is difficult. Meanwhile, the existing many models are often intuitively driven, and the principle deficiency also easily causes various applicable problems of the models. The three points limit the advancement and application of the research of the existing loss function to a great extent and limit the application of the existing model in the actual service scene, so that a new recommendation scheme is necessary to be proposed to improve the performance of the recommendation system.
Disclosure of Invention
The invention aims to provide an article recommending method, system, equipment and storage medium, which can improve recommending effect.
The invention aims at realizing the following technical scheme:
an item recommendation method, comprising:
collecting a plurality of user item interaction data, and generating a corresponding negative sample for each user item interaction data;
the method comprises the steps of respectively encoding all user object interaction data and all users and objects in negative samples through an encoder to obtain embedded characterization of all users and embedded characterization of all objects; calculating the similarity of user article interaction data and the similarity of a negative sample based on the embedded representation of the user and the embedded representation of the article, constructing a loss function for modeling the user article interaction data and the negative sample simultaneously, and optimizing the encoder by using the loss function;
and respectively encoding all users and all used articles through an optimized encoder to obtain final embedded characterization of all users and final embedded characterization of all articles, calculating favorability scores of all articles of the current user by utilizing the final embedded characterization of the current user and the final embedded characterization of all articles for the current user, sequencing the articles according to the order of the favorability scores from large to small, generating an article recommendation list and feeding back to the current user.
An item recommendation system, comprising:
the data collection and negative sample generation unit is used for collecting a plurality of user article interaction data and generating a corresponding negative sample for each user article interaction data;
the training unit is used for respectively encoding all user object interaction data and all users and objects in the negative samples through the encoder to obtain embedded characterization of all users and embedded characterization of all objects; calculating the similarity of user article interaction data and the similarity of a negative sample based on the embedded representation of the user and the embedded representation of the article, constructing a loss function for modeling the user article interaction data and the negative sample simultaneously, and optimizing the encoder by using the loss function;
and the recommending unit is used for respectively encoding all users and all used articles through the optimized encoder to obtain the final embedded representation of all users and the final embedded representation of all articles, calculating the favorability scores of all articles of the current user by utilizing the final embedded representation of the current user and the final embedded representation of all articles, sequencing the articles according to the order of the favorability scores from large to small, generating an article recommending list and feeding back to the current user.
A processing apparatus, comprising: one or more processors; a memory for storing one or more programs;
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the aforementioned methods.
A readable storage medium storing a computer program which, when executed by a processor, implements the method described above.
According to the technical scheme provided by the invention, through constructing the loss function for modeling the user article interaction data (positive samples) and the negative samples at the same time, noise in the positive samples and noise in the negative samples can be compatible at the same time, and the encoder is continuously optimized through the loss function, so that the optimized encoder can better extract embedded characterization of the user and the articles, thereby better evaluating the preference degree (reflected by preference scores) of the user on each article, and further better recommending related articles for the user.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of an item recommendation method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an item recommendation system according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a processing apparatus according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
The terms that may be used herein will first be described as follows:
the terms "comprises," "comprising," "includes," "including," "has," "having" or other similar referents are to be construed to cover a non-exclusive inclusion. For example: including a particular feature (e.g., a starting material, component, ingredient, carrier, formulation, material, dimension, part, means, mechanism, apparatus, step, procedure, method, reaction condition, processing condition, parameter, algorithm, signal, data, product or article of manufacture, etc.), should be construed as including not only a particular feature but also other features known in the art that are not explicitly recited.
The following describes in detail a method, a system, a device and a storage medium for recommending articles. What is not described in detail in the embodiments of the present invention belongs to the prior art known to those skilled in the art. The specific conditions are not noted in the examples of the present invention and are carried out according to the conditions conventional in the art or suggested by the manufacturer.
Example 1
The embodiment of the invention provides an article recommending method, which mainly comprises the following steps as shown in fig. 1:
and step 1, collecting a plurality of user article interaction data, and generating a corresponding negative sample for each user article interaction data.
In the embodiment of the invention, the interaction data of a single user object is recorded as (u, i), which is a positive sample, and a corresponding negative sample (u, j) is generated through negative sampling; where u denotes a user, i denotes an item with which user u has interacted, j denotes an item with which user u has not interacted,
Figure SMS_1
,/>
Figure SMS_2
representing the collection of items in the negative samples, that is, multiple negative samples are generated for each positive sample.
By way of example, the most lightweight uniform negative sampling may be employed to improve efficiency.
And 2, constructing a loss function for modeling the user item interaction data and the negative sample simultaneously through the user item interaction data and the negative sample, and optimizing the encoder by using the loss function.
In the embodiment of the invention, the embedded characterization of all users and the embedded characterization of all articles are obtained by respectively encoding all user article interaction data and the users and articles in all negative samples through an encoder; and calculating the similarity of the user article interaction data and the similarity of the negative samples based on the embedded characterization of the user and the embedded characterization of the article, constructing a loss function for modeling the user article interaction data and each negative sample simultaneously, and optimizing the encoder by using the loss function.
In the embodiment of the present invention, the calculating the similarity of the user item interaction data and the similarity of the negative sample includes: and for each user item interaction data and each negative sample, calculating cosine similarity by using the embedded representation of the corresponding user and the embedded representation of the item.
In the embodiment of the invention, various classical and efficient encoder models, such as MF (embedded recommendation model), NGCF (graph nerve collaborative filtering model), lightGCN (lightweight graph convolution model) and the like, can be adopted.
In the embodiment of the invention, a loss function for modeling the user article interaction data and the negative sample simultaneously is constructed through normalization and expressed as follows:
Figure SMS_3
wherein ,
Figure SMS_4
representing a loss function calculated using user item interaction data for user u and a corresponding negative sample; (u, i) is a singleUser item interaction data, (u, j) being a corresponding negative sample, i representing an item with which user u has interacted, +.>
Figure SMS_5
A set of items representing an interaction with user u, j representing items not having an interaction with user u,/->
Figure SMS_6
Representing the set of items in the negative sample, i.e. the set of items with no interaction with user u, +.>
Figure SMS_7
Temperature coefficient corresponding to the interaction data representing the user's item, < >>
Figure SMS_8
Representing the temperature coefficient corresponding to the negative sample; f () is a scoring function, outputting cosine similarity.
In the embodiment of the invention, normalization refers to a skill in the process of calculating cosine similarity, and a loss function for modeling the user article interaction data and the negative samples simultaneously is finally constructed through the calculated cosine similarity of a series of positive and negative samples.
And step 3, obtaining final embedded characterization of the user and the object through the optimized encoder, and then generating an object recommendation list of each user and feeding back the object recommendation list to the corresponding user.
In the embodiment of the invention, all users and all used articles are respectively encoded to obtain the final embedded representation of all users and the final embedded representation of all articles, for the current user, the favorites of the current user on all articles are calculated by utilizing the final embedded representation of the current user and the final embedded representation of all articles (for example, cosine similarity can be calculated as favorites), the articles are ordered according to the order of the favorites from big to small, and an article recommendation list is generated and fed back to the current user.
In the embodiment of the invention, the optimized encoder can be obtained through the step 2, and the embedded characterization of all users and the embedded characterization of all articles can be extracted more effectively, so that the preference score of the users for the articles can be predicted more accurately, the preference score can reflect the preference degree of the users for the articles, therefore, the article recommendation list of the users can be generated more accurately, and the recommendation effect is improved.
In order to more clearly demonstrate the technical scheme and the technical effects provided by the invention, the method provided by the embodiment of the invention is described in detail below by using specific embodiments.
1. The principle is introduced.
The invention aims to improve the recommending effect so as to accurately recommend related articles to a user; in the implementation process, a powerful recommended model training framework is firstly constructed, the existing scheme is rearranged and thought, and the SoftMax loss function (normalized exponential function) is found to have very powerful expression capability and noise immunity capability through comparison and try. In order to study the essence, the method is deeply analyzed and explored from the perspective of distributed robust optimization, and the method is found to be subordinate to special cases in the distributed robust optimization. The core with obvious effect is due to the consideration and modeling of negative sample noise, meanwhile, the SoftMax loss function is further perfected, the modeling of noise in the negative sample is analogized, and the noise existing in the positive sample is also considered. Then, the frame optimizing encoder is trained based on the recommendation model constructed by the invention, and the embedded characterization of the user and the object is obtained by utilizing the optimized encoder, so that the preference degree of the user on the object is predicted better, and the object recommendation list of the user is generated. The overall recommendation model training framework can be adapted to various classical encoder models, and meanwhile, the effect on an actual recommendation system data set is also remarkably improved, so that a more sound and powerful choice is provided for the selection of the training framework in a recommendation system in the future, and the recommendation performance in an actual service scene is improved.
The following describes the principles of the recommended model training framework in detail for the sake of clarity.
1. The characteristics underlying the existing SOTA (State Of The Art) model (the method or model that performs best at present in a particular task) were rethreading and compared.
According to experimental experience, the invention discovers that the SoftMax loss function shows bright eye performance on a plurality of data sets, and attempts to explain the SoftMax loss function from the aspect of distributed robust optimization in order to explore the mechanism behind the SoftMax loss function:
Figure SMS_9
wherein ,
Figure SMS_11
representing optimal model parameters>
Figure SMS_15
Representing model parameters in the encoder, the core of model update; p represents probability distribution->
Figure SMS_18
Is a searchable distribution probability set,/->
Figure SMS_12
Representing input information such as positive and negative samples f (u, i) and f (u, j); />
Figure SMS_14
Indicating loss of encoder->
Figure SMS_17
The probability distribution representing the initial of the negative sample is understood as the distribution of the negative sample, +.>
Figure SMS_19
Representing probability distribution->
Figure SMS_10
and />
Figure SMS_13
KL divergence of>
Figure SMS_16
E represents the desire for a threshold parameter.
The above is a generalized representation of Distributed Robust Optimization (DRO), which means: unlike the normal optimization function, DRO focuses on the probability distribution that weights assigned to each sample obey one hypothesis
Figure SMS_20
DRO first needs to find a worst probability distribution +.>
Figure SMS_21
And the overall loss is maximized, and the model parameters are optimized. In other words, DRO focuses on optimization at the probability distribution level, not at the sample level. Two of the most critical parameters are +.>
Figure SMS_22
And->
Figure SMS_23
. The former provides a hypothetical probability distribution +.>
Figure SMS_24
The distance function (i.e., KL divergence) from the initial distribution, the latter controls the upper limit of the distance of the two probability distributions for the threshold parameter. I.e. given a set of probability distributions P, the worst one of them is found for optimization. The method has the advantages that the optimization has important points, and the weight of the low information sample is reduced.
The above analysis is a generalized introduction to DRO, and for recommended scenarios, there are the following cases:
Figure SMS_25
the optimization for the negative example in the recommendation, essentially optimizing the above formula,
Figure SMS_26
for a collection of items in the negative, f (u, j) is a score for the negative, i.e., (u, j) cosine similarity. The present invention defaults to the usual inner product approach.
The idea of distributed robust optimization is integrated into a negative-sample optimization target, and the whole negative-sample optimization function is transferred to:
Figure SMS_27
wherein ,
Figure SMS_28
representation->
Figure SMS_29
Is a support set of (a).
It is obvious that the overall optimization objective is changed from optimization at the sample level to optimization at the distribution level, and is attributed to errors in negative sampling, the weight of each negative sample is simply believed to be unable to meet the requirements of an actual scene, and the concept of integrating sampling errors can further improve the objective function of the recommendation system.
According to literature and convex optimization theory, the negative sample optimization function based on the distribution layer surface can be obtained
Figure SMS_30
Is a closed form solution of:
Figure SMS_31
therefore, the optimization objective of the positive and negative samples is considered by combining the optimization objective with the overall objective function of the recommendation system, and the method can be used for obtaining:
Figure SMS_32
Figure SMS_33
Figure SMS_34
Figure SMS_35
Figure SMS_36
wherein ,
Figure SMS_37
is a temperature coefficient, which is optimized->
Figure SMS_38
The optimal result in the section is parameterized.
It can be found that the simplified form of the optimized objective function matches the expression form of the conventional SoftMax loss function. Thus theoretically providing a new way of understanding the SoftMax penalty function. And, we can have their theoretical explanation and empirical settings one-to-one. Such as temperature coefficient in SoftMax loss function
Figure SMS_39
It is very important that its settings profoundly influence the predictive effect of the final model, whereas from the DRO point of view +.>
Figure SMS_40
Essentially, the method is a setting of the robust radius, the value of the method represents the noise degree of a negative sample, and different robust radii can be set for the method according to different noise distribution in the actual scene data set to improve the performance. Meanwhile, the SoftMax loss function has better performance in the anti-interference capability level, and can be essentially attributed to modeling of errors existing in negative sample sampling, so that the robustness and the expression capability of the model are enhanced. />
2. A powerful recommendation model training framework is constructed.
In the embodiment of the invention, from the existing recommendation system training framework, the essence of the loss function effect group drawing represented by the SoftMax loss function and the inherent characteristics thereof are considered, so that a more perfect and flexible novel recommendation system training framework is constructed, the application of a subsequent encoder model can be established on a more mature basis, and the encoder performance can be optimized on the premise of not introducing additional time expenditure.
According to the foregoing description, the SoftMax loss function is essentially an equivalent form of the distributed robust optimization objective, which is modeled mainly for errors existing at the negative sample level; in an actual recommendation scene, errors existing in positive samples cannot be ignored, for example, when many users click on commodities to be subjected to title or other proposal trend, the click on the commodity in a large flow obviously cannot express the own interest characteristics of the users. And for example, the clicking of the user often has the situation of mispoints and the like. The error existing in the alignment sample is not limited, so that the whole model learning direction is more likely to be misled. Therefore, by means of the modeling characteristic of the DRO itself, the present invention provides a more robust and easy-to-optimize recommender training framework, i.e., a bidirectional SoftMax recommender training paradigm (Bilateral SoftMax Framework, abbreviated as BSM) for perfecting the SoftMax loss function.
(1) An encoder.
Encoders in the recommended system have many powerful and efficient classical models, such as MF from matrix decomposition, or LightGCN as represented by graph neural networks. Both to obtain embedded characterization of the user
Figure SMS_41
Embedded characterization with object->
Figure SMS_42
. Characterizing ∈>
Figure SMS_43
For example, MF uses only the initialization model parameters +.>
Figure SMS_44
Indexing for characterization
Figure SMS_45
The method comprises the steps of carrying out a first treatment on the surface of the The index of the token refers to the index obtained from the parameterized matrix (the token matrix for a given user), the dimension is N x D, N isAnd the number of users, D, is the dimension of the characterization, the designated user u is searched, and the result of the designated row is selected. The LightGCN is information-aggregated by the graphic structure information G and then regenerated to be characterized by +.>
Figure SMS_46
The method comprises the steps of carrying out a first treatment on the surface of the Wherein Table (-) represents the results of the characterization search. The embedded characterization of the user and the commodity can be obtained through the encoder and sent to a downstream loss module for scoring calculation.
The indexing process of the tokens can be described as: given a user characterization matrix, and a user sequence to be searched such as u1, u2, u7, u8 and the like (where u refers to a single user, and the number behind u is the index number of the user), selecting the 1 st, 2 nd, 7 th and 8 th rows from the user characterization matrix as a process of characterization indexes.
(2) A loss function module: according to the above description, the BSM focuses on modeling noise in the positive samples, and thus analogizes the optimization function of negative sample noise, and the objective function of the overall recommendation system is reduced to:
Figure SMS_47
compared with the previous, the objective function is to model positive and negative samples at the same time, and the simplified expression form of the objective function can be obtained by using the expression form of the closed solution mentioned above:
Figure SMS_48
Figure SMS_49
Figure SMS_50
wherein e is a natural constant,
Figure SMS_51
distributed Lubang you corresponding to positive sampleParameters of transformation->
Figure SMS_52
Parameters optimized for the distributed Lu Bang corresponding to the negative sample, +.>
Figure SMS_53
Optimal +.>
Figure SMS_54
Corresponding robust radius,/->
Figure SMS_55
Optimal +.>
Figure SMS_56
Corresponding robust radius.
Thus, again together simplifying the final objective function that can be obtained is:
Figure SMS_57
based on the above objective function, the BSM has a core of sequentially providing two temperature coefficients according to the difference between positive and negative samples
Figure SMS_58
And->
Figure SMS_59
(control the noise immunity of positive and negative samples separately, i.e. the selection of the robust radius). According to DRO theory, the temperature coefficient is used to control the robust radius of the loss function, so that two flexible coefficients can objectively analyze the imbalance degree of positive and negative samples in the data, rather than keep the imbalance degree consistent. At the same time there is a +.>
Figure SMS_60
The power coefficient of (c) is used to control the ease of positive and negative samples. Essentially, the method provided by the invention only needs to add one line of codes to the softMax loss function, and the principle behind the method is relatively perfect.
Based on the recommended model training framework, the training process is as follows: the upstream encoder is obtained through embedded characterization of the graph structure information or matrix decomposition idea, and of course, other types of encoder models can be adopted; the downstream loss function module utilizes the thinking of distributed robust optimization, and realizes a more robust and more robust recommendation system training new paradigm by being compatible with the consideration of noise in positive and negative samples. The overall efficiency is not added with excessive computational complexity, but the effect level is obviously improved. Other matters not described in detail in the training process can be realized by referring to the conventional technology.
2. A recommendation list for the user is generated.
The embodiment of the invention can be applied to various recommended service scenes, and in practice, the user object interaction data and the generated negative sample in the recommended service scenes are used, and the original encoder in the recommended service scenes is optimized by adopting the recommended model training framework; after the optimization is finished, coding all users and articles in the recommended service scene to obtain embedded characterization of the users and the articles; after receiving the user request, the preference scores of the user on the articles are calculated through the embedded characterization of the user and the articles, the articles are arranged in descending order according to the preference scores, and a part of articles with the front ranking are extracted to generate an article recommendation list and fed back to the user.
3. And (5) experimental verification.
The recommendation scheme of the embodiment of the invention can more accurately recommend the articles to the user and promote the user experience. In order to verify the conclusion, two data sets Yelp and MovieLens of different types are selected for experiments based on encoder models MF, NGCF and LightGCN of SOTA. And dividing the data set into a training set, a verification set and a test set according to the recommendation system evaluation principle of implicit feedback. Taking recall@20 (recall of the first 20 of the recommendation list) and ndcg@20 (normalized break cumulative gain calculated based on the first 20 of the recommendation list) as metrics, the experimental results of MF and LightGCN as the basic recommendation model are presented in table 1.
Table 1: performance comparison of different methods on two data sets
Figure SMS_61
Wherein LGN is a shorthand form of LightGCN, BPR is a Bayesian personalized ordering loss function, BCE is a binary cross entropy loss function, MSE is a mean square error loss function; in the model column, the encoder model name is in front of the plus sign, and the loss function type of the training encoder model is indicated behind the plus sign. From table 1 we can find that: on two different types of data sets, the schemes of the present invention (mf+bsm and lgn+bsm) surpass the conventional loss functions (BPR, BCE, MSE) in all indexes, because SoftMax loss functions already exhibit strong leading advantages through inclusion of noise data in negative samples, BSM objectively starts from the data itself, and noise on positive samples is also taken into consideration, thus achieving a more comprehensive and more robust goal. The performance improvement of the MF+BSM and the LGN+BSM show that the suitability of the loss function proposed in the invention is strong, and the performance improvement of the MF+BSM and the LGN+BSM are greatly improved in different degrees, so that the recommendation effect can be improved.
From the description of the above embodiments, it will be apparent to those skilled in the art that the above embodiments may be implemented in software, or may be implemented by means of software plus a necessary general hardware platform. With such understanding, the technical solutions of the foregoing embodiments may be embodied in a software product, where the software product may be stored in a nonvolatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.), and include several instructions for causing a computer device (may be a personal computer, a server, or a network device, etc.) to perform the methods of the embodiments of the present invention.
Example two
The present invention also provides an item recommendation system, which is mainly implemented based on the method provided in the foregoing embodiment, as shown in fig. 2, and the system mainly includes:
the data collection and negative sample generation unit is used for collecting a plurality of user article interaction data and generating a corresponding negative sample for each user article interaction data;
the training unit is used for respectively encoding all user object interaction data and all users and objects in the negative samples through the encoder to obtain embedded characterization of all users and embedded characterization of all objects; calculating the similarity of user article interaction data and the similarity of a negative sample based on the embedded representation of the user and the embedded representation of the article, constructing a loss function for modeling the user article interaction data and the negative sample simultaneously, and optimizing the encoder by using the loss function;
and the recommending unit is used for respectively encoding all users and all used articles through the optimized encoder to obtain the final embedded representation of all users and the final embedded representation of all articles, calculating the favorability scores of all articles of the current user by utilizing the final embedded representation of the current user and the final embedded representation of all articles, sequencing the articles according to the order of the favorability scores from large to small, generating an article recommending list and feeding back to the current user.
Further, the generating the corresponding negative sample for each user item interaction data includes:
recording the single user item interaction data as (u, i), and generating a corresponding negative sample (u, j) through negative sampling; where u denotes a user, i denotes an item with which user u has interacted, j denotes an item with which user u has not interacted,
Figure SMS_62
,/>
Figure SMS_63
representing a collection of items in the negative sample.
Further, the calculating the similarity of the user item interaction data and the similarity of the negative sample includes: and for each user item interaction data and each negative sample, calculating cosine similarity by using the embedded representation of the corresponding user and the embedded representation of the item.
Further, the loss function modeling user item interaction data simultaneously with the negative sample is expressed as:
Figure SMS_64
wherein ,
Figure SMS_65
representing a loss function calculated using user item interaction data for user u and a corresponding negative sample; (u, i) item interaction data for a single user, (u, j) corresponding negative samples, i representing items with which there is an interaction with user u, +.>
Figure SMS_66
A set of items representing an interaction with user u, j representing items not having an interaction with user u,/->
Figure SMS_67
Representing the set of items in the negative sample, i.e. the set of items with no interaction with user u, +.>
Figure SMS_68
Temperature coefficient corresponding to the interaction data representing the user's item, < >>
Figure SMS_69
Representing the temperature coefficient corresponding to the negative sample; f () is a scoring function, outputting cosine similarity.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the system is divided into different functional modules to perform all or part of the functions described above.
Example III
The present invention also provides a processing apparatus, as shown in fig. 3, which mainly includes: one or more processors; a memory for storing one or more programs; wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the methods provided by the foregoing embodiments.
Further, the processing device further comprises at least one input device and at least one output device; in the processing device, the processor, the memory, the input device and the output device are connected through buses.
In the embodiment of the invention, the specific types of the memory, the input device and the output device are not limited; for example:
the input device can be a touch screen, an image acquisition device, a physical key or a mouse and the like;
the output device may be a display terminal;
the memory may be random access memory (Random Access Memory, RAM) or non-volatile memory (non-volatile memory), such as disk memory.
Example IV
The invention also provides a readable storage medium storing a computer program which, when executed by a processor, implements the method provided by the foregoing embodiments.
The readable storage medium according to the embodiment of the present invention may be provided as a computer readable storage medium in the aforementioned processing apparatus, for example, as a memory in the processing apparatus. The readable storage medium may be any of various media capable of storing a program code, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, and an optical disk.
The foregoing is only a preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions easily contemplated by those skilled in the art within the scope of the present invention should be included in the scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims (10)

1. An item recommendation method, comprising:
collecting a plurality of user item interaction data, and generating a corresponding negative sample for each user item interaction data;
the method comprises the steps of respectively encoding all user object interaction data and all users and objects in negative samples through an encoder to obtain embedded characterization of all users and embedded characterization of all objects; calculating the similarity of user article interaction data and the similarity of a negative sample based on the embedded representation of the user and the embedded representation of the article, constructing a loss function for modeling the user article interaction data and the negative sample simultaneously, and optimizing the encoder by using the loss function;
and respectively encoding all users and all used articles through an optimized encoder to obtain final embedded characterization of all users and final embedded characterization of all articles, calculating favorability scores of all articles of the current user by utilizing the final embedded characterization of the current user and the final embedded characterization of all articles for the current user, sequencing the articles according to the order of the favorability scores from large to small, generating an article recommendation list and feeding back to the current user.
2. The method of claim 1, wherein generating a negative sample for each user item interaction data comprises:
recording the single user item interaction data as (u, i), and generating a corresponding negative sample (u, j) through negative sampling; where u denotes a user, i denotes an item with which user u has interacted, j denotes an item with which user u has not interacted,
Figure QLYQS_1
,/>
Figure QLYQS_2
representing a collection of items in the negative sample.
3. The method of claim 1, wherein calculating the similarity of the user item interaction data and the similarity of the negative sample comprises:
and for each user item interaction data and each negative sample, calculating cosine similarity by using the embedded representation of the corresponding user and the embedded representation of the item.
4. The item recommendation method of claim 1, wherein a loss function modeling user item interaction data simultaneously with the negative sample is expressed as:
Figure QLYQS_3
wherein ,
Figure QLYQS_4
representing a loss function calculated using user item interaction data for user u and a corresponding negative sample; (u, i) is single user item interaction data, (u, j) is a corresponding negative sample, i represents an item with which user u has interacted,
Figure QLYQS_5
a set of items representing an interaction with user u, j representing items not having an interaction with user u,/->
Figure QLYQS_6
Representing the set of items in the negative sample, i.e. the set of items with no interaction with user u, +.>
Figure QLYQS_7
Temperature coefficient corresponding to the interaction data representing the user's item, < >>
Figure QLYQS_8
Representing the temperature coefficient corresponding to the negative sample; f () is a scoring function, outputting cosine similarity.
5. An item recommendation system, comprising:
the data collection and negative sample generation unit is used for collecting a plurality of user article interaction data and generating a corresponding negative sample for each user article interaction data;
the training unit is used for respectively encoding all user object interaction data and all users and objects in the negative samples through the encoder to obtain embedded characterization of all users and embedded characterization of all objects; calculating the similarity of user article interaction data and the similarity of a negative sample based on the embedded representation of the user and the embedded representation of the article, constructing a loss function for modeling the user article interaction data and the negative sample simultaneously, and optimizing the encoder by using the loss function;
and the recommending unit is used for respectively encoding all users and all used articles through the optimized encoder to obtain the final embedded representation of all users and the final embedded representation of all articles, calculating the favorability scores of all articles of the current user by utilizing the final embedded representation of the current user and the final embedded representation of all articles, sequencing the articles according to the order of the favorability scores from large to small, generating an article recommending list and feeding back to the current user.
6. The item recommendation system of claim 5, wherein said generating a corresponding negative sample for each user item interaction data comprises:
recording the single user item interaction data as (u, i), and generating a corresponding negative sample (u, j) through negative sampling; where u denotes a user, i denotes an item with which user u has interacted, j denotes an item with which user u has not interacted,
Figure QLYQS_9
,/>
Figure QLYQS_10
representing a collection of items in the negative sample.
7. The item recommendation system of claim 5, wherein said calculating the similarity of user item interaction data and the similarity of negative samples comprises:
and for each user item interaction data and each negative sample, calculating cosine similarity by using the embedded representation of the corresponding user and the embedded representation of the item.
8. The item recommendation system of claim 5, wherein a loss function modeling user item interaction data simultaneously with the negative sample is expressed as:
Figure QLYQS_11
wherein ,
Figure QLYQS_12
representing a loss function calculated using user item interaction data for user u and a corresponding negative sample; (u, i) is single user item interaction data, (u, j) is a corresponding negative sample, i represents an item with which user u has interacted,
Figure QLYQS_13
a set of items representing an interaction with user u, j representing items not having an interaction with user u,/->
Figure QLYQS_14
Representing the set of items in the negative sample, i.e. the set of items with no interaction with user u, +.>
Figure QLYQS_15
Temperature coefficient corresponding to the interaction data representing the user's item, < >>
Figure QLYQS_16
Representing the temperature coefficient corresponding to the negative sample; f () is a scoring function, outputting cosine similarity.
9. A processing apparatus, comprising: one or more processors; a memory for storing one or more programs;
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-4.
10. A readable storage medium storing a computer program, which when executed by a processor implements the method according to any one of claims 1-4.
CN202310428078.2A 2023-04-20 2023-04-20 Item recommendation method, system, device and storage medium Active CN116151892B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310428078.2A CN116151892B (en) 2023-04-20 2023-04-20 Item recommendation method, system, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310428078.2A CN116151892B (en) 2023-04-20 2023-04-20 Item recommendation method, system, device and storage medium

Publications (2)

Publication Number Publication Date
CN116151892A true CN116151892A (en) 2023-05-23
CN116151892B CN116151892B (en) 2023-08-29

Family

ID=86351048

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310428078.2A Active CN116151892B (en) 2023-04-20 2023-04-20 Item recommendation method, system, device and storage medium

Country Status (1)

Country Link
CN (1) CN116151892B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116911958A (en) * 2023-09-12 2023-10-20 深圳须弥云图空间科技有限公司 Recommendation system model training method and device, electronic equipment and storage medium

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112925977A (en) * 2021-02-26 2021-06-08 中国科学技术大学 Recommendation method based on self-supervision graph representation learning
US20210248461A1 (en) * 2020-02-11 2021-08-12 Nec Laboratories America, Inc. Graph enhanced attention network for explainable poi recommendation
US20210326674A1 (en) * 2019-05-13 2021-10-21 Tencent Technology (Shenzhen) Company Limited Content recommendation method and apparatus, device, and storage medium
CN113609311A (en) * 2021-09-30 2021-11-05 航天宏康智能科技(北京)有限公司 Method and device for recommending items
US20210374499A1 (en) * 2020-05-26 2021-12-02 International Business Machines Corporation Iterative deep graph learning for graph neural networks
CN114022904A (en) * 2021-11-05 2022-02-08 湖南大学 Noise robust pedestrian re-identification method based on two stages
CN114492836A (en) * 2022-01-18 2022-05-13 中国科学技术大学 Negative sample sampling and training method for implicit feedback recommendation system
CN114510652A (en) * 2022-04-20 2022-05-17 宁波大学 Social collaborative filtering recommendation method based on federal learning
CN114565828A (en) * 2022-02-24 2022-05-31 哈尔滨工程大学 Feature countermeasure enhancement underwater target recognition method based on acoustic embedded memory space encoder model
CN114841778A (en) * 2022-05-23 2022-08-02 安徽农业大学 Commodity recommendation method based on dynamic graph neural network
US20230004721A1 (en) * 2021-06-30 2023-01-05 Beijing Baidu Netcom Science Technology Co., Ltd. Method for training semantic representation model, device and storage medium
US20230036964A1 (en) * 2021-07-14 2023-02-02 Rakuten Group, Inc. Reducing sample selection bias in a machine learning-based recommender system
CN115689673A (en) * 2022-09-29 2023-02-03 西安交通大学 Recommendation method, system, medium and device based on ranking contrast loss

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210326674A1 (en) * 2019-05-13 2021-10-21 Tencent Technology (Shenzhen) Company Limited Content recommendation method and apparatus, device, and storage medium
US20210248461A1 (en) * 2020-02-11 2021-08-12 Nec Laboratories America, Inc. Graph enhanced attention network for explainable poi recommendation
US20210374499A1 (en) * 2020-05-26 2021-12-02 International Business Machines Corporation Iterative deep graph learning for graph neural networks
CN112925977A (en) * 2021-02-26 2021-06-08 中国科学技术大学 Recommendation method based on self-supervision graph representation learning
US20230004721A1 (en) * 2021-06-30 2023-01-05 Beijing Baidu Netcom Science Technology Co., Ltd. Method for training semantic representation model, device and storage medium
US20230036964A1 (en) * 2021-07-14 2023-02-02 Rakuten Group, Inc. Reducing sample selection bias in a machine learning-based recommender system
CN113609311A (en) * 2021-09-30 2021-11-05 航天宏康智能科技(北京)有限公司 Method and device for recommending items
CN114022904A (en) * 2021-11-05 2022-02-08 湖南大学 Noise robust pedestrian re-identification method based on two stages
CN114492836A (en) * 2022-01-18 2022-05-13 中国科学技术大学 Negative sample sampling and training method for implicit feedback recommendation system
CN114565828A (en) * 2022-02-24 2022-05-31 哈尔滨工程大学 Feature countermeasure enhancement underwater target recognition method based on acoustic embedded memory space encoder model
CN114510652A (en) * 2022-04-20 2022-05-17 宁波大学 Social collaborative filtering recommendation method based on federal learning
CN114841778A (en) * 2022-05-23 2022-08-02 安徽农业大学 Commodity recommendation method based on dynamic graph neural network
CN115689673A (en) * 2022-09-29 2023-02-03 西安交通大学 Recommendation method, system, medium and device based on ranking contrast loss

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
JINHUI TANG,ETC: "Adversarial Training Towards Robust Multimedia Recommender System", 《IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING》, vol. 32, no. 5, pages 1 - 13 *
刘军平等: "基于多模态融合的个性化服装搭配推荐", 《纺织学报》, vol. 44, no. 3, pages 176 - 185 *
吴剑灿: "基于图神经网络的个性化推荐", 《中国博士学位论文全文数据库 信息科技辑》, no. 3, pages 138 - 76 *
张宇;王文剑;赵胜男;: "基于正负反馈的SVM协同过滤Top-N推荐算法", 小型微型计算机系统, no. 05 *
张航;何灵敏;: "一种负样本改进的LDA主题模型推荐算法", 中国计量大学学报, no. 01 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116911958A (en) * 2023-09-12 2023-10-20 深圳须弥云图空间科技有限公司 Recommendation system model training method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN116151892B (en) 2023-08-29

Similar Documents

Publication Publication Date Title
Salehi et al. Graph attention auto-encoders
Zhou et al. A comprehensive survey on pretrained foundation models: A history from bert to chatgpt
CN111241311B (en) Media information recommendation method and device, electronic equipment and storage medium
Pan et al. A correlative denoising autoencoder to model social influence for top-N recommender system
Peng et al. A deep multi-view framework for anomaly detection on attributed networks
Xiong et al. A unified framework for multi-modal federated learning
Wang et al. Reinforced causal explainer for graph neural networks
Jiang et al. Heterogeneous recommendation via deep low-rank sparse collective factorization
CN106327240A (en) Recommendation method and recommendation system based on GRU neural network
Du et al. Collaborative filtering with user-item co-autoregressive models
CN116151892B (en) Item recommendation method, system, device and storage medium
CN110866145A (en) Co-preference assisted deep single-class collaborative filtering recommendation method
Liu et al. Structural network embedding using multi-modal deep auto-encoders for predicting drug-drug interactions
Qi et al. Uni-FedRec: A unified privacy-preserving news recommendation framework for model training and online serving
Rafailidis et al. Adversarial training for review-based recommendations
CN111259264B (en) Time sequence scoring prediction method based on generation countermeasure network
CN116451117A (en) Power data anomaly detection method based on federal learning
Zhang et al. COS-LDL: Label distribution learning by cosine-based distance-mapping correlation
Guo et al. Deep attentive factorization machine for app recommendation service
Chen et al. DeepGly: A deep learning framework with recurrent and convolutional neural networks to identify protein glycation sites from imbalanced data
Huang et al. Neural explicit factor model based on item features for recommendation systems
Sun et al. Multi-order nearest neighbor prediction for recommendation systems
Müller et al. MultiClust special issue on discovering, summarizing and using multiple clusterings
Sun et al. DSMN: A personalized information retrieval algorithm based on improved DSSM
Wang et al. Temporal sparse feature auto‐combination deep network for video action recognition

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
GR01 Patent grant
GR01 Patent grant