Recommendation method, device and equipment based on recommendation model, and storage medium

By introducing a main classifier and an auxiliary classifier into the recommendation model, and utilizing uncertainty minimization methods and adversarial learning, the challenge of cross-domain application in unsupervised adaptive recommendation is addressed, improving the model's prediction accuracy and generalization ability in the target domain.

CN116484099BActive Publication Date: 2026-02-13RAJAX NETWORK &TECHNOLOGY (SHANGHAI) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310462340.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-25
Publication Date
2026-02-13
Estimated Expiration
2043-04-25

AI Technical Summary

Technical Problem

In existing unsupervised domain adaptive recommendation schemes, the performance of recommendation models in cross-domain applications still needs improvement, especially when the target domain dataset lacks labels, making it difficult to effectively associate the domain differences between the source and target domains.

Method used

We employ a contrastive approach based on minimizing uncertainty. By introducing a main classifier and an auxiliary classifier, we train the target using labeled source domain datasets and unlabeled target domain datasets. We optimize the target by minimizing uncertainty loss and reduce intra-domain differences using parameters such as Kullback-Leibler divergence and cross-entropy loss. We also utilize generators and discriminators to perform adversarial learning on the feature distribution.

Benefits of technology

It improves the generalization ability of the recommendation model in the target domain, can predict recommendation scores more accurately, reduces intra-domain differences, and improves the performance of cross-domain recommendation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116484099B_ABST
    Figure CN116484099B_ABST
Patent Text Reader

Abstract

The present disclosure provides a recommendation method, device, equipment and storage medium, the recommendation method comprises: obtaining a target object; using a recommendation model to predict a recommendation score of the target object recommended to a user; wherein the recommendation model comprises a main classifier and an auxiliary classifier, and the recommendation score is determined by a recommendation score predicted by the main classifier and a recommendation score predicted by the auxiliary classifier; the recommendation model is trained by using a source domain data set with labels and a target domain data set without labels to introduce an optimization target of minimizing uncertainty loss, and the uncertainty loss is determined by the following parameters: the difference between the recommendation scores respectively predicted by the main classifier and the auxiliary classifier under the source domain data set or the target domain data set, and / or the difference between the category information respectively predicted by the main classifier and the auxiliary classifier.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of recommendation, and particularly relates to a recommendation method and device based on a recommendation model, an equipment and a storage medium. BACKGROUND

[0002] As a challenging task, a recommendation system needs to have an in-depth understanding of the recommended objects. With the rise of deep neural networks, deep neural networks are increasingly applied in the field of recommendation, bringing important progress to the field. However, due to the lack of scalability, the network trained on a fixed data set often cannot cope with unknown environments, and since the label of the target domain data set is usually missing, an additional labeled data set needs to be generated to fine-tune the network. In order to solve the problem that the time and cost of generating labels are difficult to bear, other labeled data sets can be collected. However, there is usually a significant domain difference between the labeled source domain data set and the target domain data set. Therefore, an effective mechanism is needed to associate the target domain and the source domain during training. For this purpose, the proposal of the domain adaptation, especially the unsupervised domain adaptation recommendation scheme, can be applied to the application scenario where the label of the target domain is not available. However, the performance of the recommendation model in the existing unsupervised domain adaptation recommendation scheme still needs to be improved. SUMMARY

[0003] In order to overcome the problems in the related art, the present disclosure provides a recommendation method, device, equipment and storage medium.

[0004] According to a first aspect of an embodiment of the present specification, a recommendation method is provided, the method comprising:

[0005] obtaining a target object;

[0006] predicting a recommendation score of the target object recommended to a user by using a recommendation model;

[0007] wherein the recommendation model comprises a main classifier and an auxiliary classifier, and the recommendation score is determined by a recommendation score predicted by the main classifier and a recommendation score predicted by the auxiliary classifier;

[0008] the recommendation model is trained by using a labeled source domain data set and an unlabeled target domain data set to introduce an optimization target of minimizing an uncertainty loss, and the uncertainty loss is determined by a difference between the recommendation scores respectively predicted by the main classifier and the auxiliary classifier under the source domain data set or the target domain data set, and / or a difference between the class information respectively predicted by the main classifier and the auxiliary classifier.

[0009] In some examples, the difference between the recommendation scores respectively predicted by the main classifier and the auxiliary classifier under the source domain dataset or the target domain dataset is determined by:

[0010] obtaining the Kullback-Leibler divergence predicted by the main classifier and the Kullback-Leibler divergence predicted by the auxiliary classifier;

[0011] weighting the Kullback-Leibler divergence of the main classifier and the Kullback-Leibler divergence of the auxiliary classifier respectively by weights to obtain a Kullback-Leibler divergence loss; wherein the Kullback-Leibler divergence loss represents the difference between the recommendation scores respectively predicted by the main classifier and the auxiliary classifier, and the weights include a quantized transferability weight.

[0012] In some examples, during the training process, for the case that the class of the target data in the target domain dataset does not belong to the cluster class, the quantized transferability weight is used to reduce the proportion of the target data that does not belong to the cluster class.

[0013] In some examples, the difference between the class information respectively predicted by the main classifier and the auxiliary classifier under the source domain dataset or the target domain dataset is determined by:

[0014] obtaining first class-level prediction information of the target data in the target domain dataset predicted by the main classifier and second class-level prediction information of the target data in the target domain dataset predicted by the auxiliary classifier;

[0015] weighting the first class-level prediction information and the second class-level prediction information respectively by weights to obtain a class-level loss; wherein the weights for the first class-level prediction information and the second class-level prediction information are determined based on class clustering weights, and different classes have different class clustering weights.

[0016] In some examples, the recommendation model further includes a feature extractor, and the feature extractor is configured to perform feature extraction on input data and input the extracted features to the main classifier and the auxiliary classifier respectively.

[0017] In some examples, the recommendation model further includes a generator and a discriminator, and the feature extractor is configured to input the extracted features to the generator and the discriminator;

[0018] the generator is configured to convert the features of the source domain data into the features of the target domain data and pass the converted features to the discriminator;

[0019] The discriminator is configured to distinguish feature distributions of the source domain dataset and the target domain dataset using input features to distinguish whether input data belongs to the source domain dataset or the target domain dataset.

[0020] In some examples, the optimization objective further includes minimizing an adversarial loss.

[0021] The adversarial loss is determined according to a distance between features converted by the generator and features of the target domain data.

[0022] In some examples, the optimization objective further includes minimizing a cross-entropy loss of the source domain dataset.

[0023] The cross-entropy loss of the source domain is determined by a difference between a class prediction of source domain data in the source domain dataset and a label of the source domain data.

[0024] In some examples, the target domain dataset is obtained by combining data in the source domain dataset.

[0025] According to a second aspect of an embodiment of the present specification, a recommendation device is provided, and the device includes:

[0026] An acquisition module configured to acquire a target object.

[0027] A prediction module configured to predict a recommendation score of the target object recommended to a user by using a recommendation model.

[0028] The recommendation model includes a main classifier and an auxiliary classifier, and the recommendation score is determined by a recommendation score predicted by the main classifier and a recommendation score predicted by the auxiliary classifier.

[0029] The recommendation model is trained by using a source domain dataset with labels, a target domain dataset without labels, and an optimization objective of introducing a minimum uncertainty loss, and the uncertainty loss is determined by a difference between recommendation scores respectively predicted by the main classifier and the auxiliary classifier under the source domain dataset or the target domain dataset, and / or a difference between class information respectively predicted by the main classifier and the auxiliary classifier.

[0030] According to a third aspect of an embodiment of the present specification, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement steps of the method embodiment of the first aspect.

[0031] According to a fourth aspect of the embodiments of the present specification, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method embodiment of the first aspect when executing the computer program.

[0032] The technical solutions provided by the embodiments of the present specification can include the following beneficial effects:

[0033] In the embodiments of the present specification, for the recommendation model in the unsupervised domain self-adaptive recommendation scheme, a secondary classifier is designed based on the primary classifier. In the training process, the training data of the recommendation model is the source domain data set with labels and the target domain data set without labels. The optimization target of the model is introduced with a minimum uncertainty loss. The uncertainty loss is determined by the difference between the recommendation scores predicted by the primary classifier and the secondary classifier under the source domain data set or the target domain data set, and / or the difference between the class information predicted by the primary classifier and the secondary classifier. The model can pay attention to the intra-domain difference between the source domain and the target domain by using the prediction difference between the two classifiers, and finally train a recommendation model with more accurate prediction.

[0034] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0035] The accompanying drawings incorporated in and forming a part of the specification, illustrate embodiments consistent with the present specification and serve to explain the principles of the present disclosure together with the specification.

[0036] Figure 1 is a structural schematic diagram of a recommendation model according to an exemplary embodiment of the present specification.

[0037] Figure 2 is a flowchart of a recommendation method according to an exemplary embodiment of the present specification.

[0038] Figure 3 is a hardware structure diagram of a computer device in which a recommendation device according to an exemplary embodiment of the present specification is located.

[0039] Figure 4 is a block diagram of a recommendation device according to an exemplary embodiment of the present specification. DETAILED DESCRIPTION

[0040] The exemplary embodiments will be described in detail herein with reference to the attached drawings. The description of the exemplary embodiments is intended to apply to various alternative embodiments as well. The following description is not limited to the exemplary embodiments, but rather, is applicable to any apparatus and method within the scope of the present description. Although in the following description, the word "exemplary" is used to mean "serving as an example, instance, or illustration." Any implementation described as "exemplary" is not necessarily to be construed as preferred or advantageous over other implementations. Likewise, the term "implementation" does not necessarily refer to a preferred or advantageous implementation.

[0041] The terminology used in the present description is for the purpose of describing particular embodiments only and is not intended to be limiting of the present description. As used in the description of the embodiments and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It also will be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0042] It will be understood that, although the terms first, second, third, etc. can be used herein to describe various information, these terms are not intended to denote a particular order or hierarchy among the information. The terms are used only to distinguish one piece of information from another. For example, a first piece of information can be termed a second piece of information, and, similarly, a second piece of information can be termed a first piece of information without departing from the scope of the present description. As used herein, the term "if' can be interpreted to mean "when" or "upon" or "in response to determining" taking into account the context in which the term is used.

[0043] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present disclosure are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.

[0044] Unsupervised domain adaptation recommendation (UDA) is a recommendation system technology that aims to solve the problem of cross-domain recommendation. In traditional recommendation systems, a large amount of user data and item data is often needed to train an effective recommendation model. However, in cross-domain scenarios, the scarcity and heterogeneity of user data and item data can pose great challenges to the performance of recommendation systems.

[0045] The purpose of unsupervised domain adaptation recommendation is to model the similarities and differences between data in the source domain dataset (referred to as source domain dataset) and the target domain dataset (referred to as target domain dataset) through unsupervised learning, and use these models to make cross-domain recommendations. The main idea of this method is to transfer the knowledge in the source domain to the target domain in an adaptive manner, thereby improving the performance of cross-domain recommendation. The mainstream method of UDA recommendation is to learn aligned features and minimize the difference in knowledge transfer between the two domains. However, these methods usually ignore the inherent intra-domain differences and focus on the overall inter-domain differences.

[0046] To improve the performance of unsupervised domain adaptation recommendation models, the embodiments of the present specification propose to use a contrast method based on uncertainty minimization to minimize the inherent intra-domain differences between the two domains. The embodiments constrain knowledge transfer through uncertainty representation, which can be determined by the center similarity between different network branches. Next, a detailed description is given.

[0047] As shown in Figure 1 , it is a structure diagram of a recommendation model according to an exemplary embodiment of the present specification, which includes a feature extractor and two classifiers: a main classifier and an auxiliary classifier (referred to as auxiliary classifier).

[0048] The domain adaptation task can use an adversarial training-based method, which aims to align the feature distributions of the two domains as much as possible through feature adversarial learning between the source domain and the target domain, thereby improving the generalization ability of the model. This method reduces the distribution difference between the source domain and the target domain by introducing an adversarial loss, thereby improving the generalization performance of the model on the target domain.

[0049] The training process first establishes a domain adaptation model, including a feature extractor and a classifier. The feature extractor maps the input data to the feature space, and the classifier maps the features to the label space.

[0050] Second, the objective function of the domain adaptation model needs to be defined, including the classification error and the domain discrepancy. The classification error is usually measured by the cross-entropy loss function, while the domain discrepancy is usually measured by the Kullback-Leibler (KL) divergence, which aims to measure the difference in feature distribution between the source domain and the target domain. Domain discrepancy refers to the difference in feature distribution between the source domain and the target domain. In the domain adaptation task, it is usually assumed that the source domain and the target domain have different feature distributions, so it is necessary to align the feature distributions of the source domain and the target domain by learning a mapping function, in order to achieve better generalization ability on the target domain. Domain discrepancy is usually measured by measuring the distance between the two domains, and KL divergence is one of the commonly used measurement methods, which can measure the distance between two probability distributions. In the domain adaptation task, KL divergence can be used to measure the difference in feature distribution between the source domain and the target domain, so as to be part of the model objective function to optimize.

[0051] The method based on adversarial training usually involves two networks: one is the main network composed of the feature extractor and the classifier mentioned above, and the other is the network composed of the discriminator. The goal of the discriminator is to distinguish the feature distribution of the source domain and the target domain, so as to guide the main network to learn to align the feature distribution of the two domains. Based on this, in some examples, the recommendation model further includes a feature extractor, which is used to extract features from input data and input the extracted features to the main classifier and the auxiliary classifier respectively. Through the above embodiments, the recommendation model can be trained using the adversarial training method.

[0052] In some examples, the recommendation model further includes a generator and a discriminator, and the feature extractor is used to input the extracted features to the generator and the discriminator; the generator is used to convert the features of the source domain data to the features of the target domain data, and pass the converted features to the discriminator; the discriminator is used to distinguish the feature distribution of the source domain data set and the target domain data set using the input features, in order to distinguish whether the input data belongs to the source domain data set or the target domain data set.

[0053] For example, the training process can be divided into two stages. In the first stage, the model learns the feature representation and classifier of the source domain data by minimizing the Cross-Entropy Loss, so as to have good performance on the source domain. In the second stage, the model introduces an adversarial loss by training an adversarial network to approximate the distribution difference between the source domain and the target domain, so as to improve the performance of the model on the target domain. Specifically, the adversarial network usually consists of two parts: a generator and a discriminator. The task of the generator is to map the source domain data to the target domain and try to deceive the discriminator as much as possible, so that the discriminator cannot distinguish the generated data from the real data in the target domain. The discriminator is responsible for distinguishing the data in the source domain and the target domain, and trying to accurately judge whether the data generated by the generator is from the target domain. The similarity or difference of the features of the source domain and the target domain is calculated through the discriminator network, and fed back to the main network to guide the main network to learn the adversarial target. Through continuous iterative training, the classification performance of the main network on the target domain reaches the expected level or converges to a stable state.

[0054] The embodiment labels the data in the source domain data set, and the target domain data set is not labeled. The domains of the two are not limited, and the required data set can be flexibly selected according to the actual application. The embodiment does not limit this.

[0055] Optionally, the target domain data set can be obtained by combining the data in the source domain data set. The target data obtained by combination is unlabeled data. As an example, the source domain data set can include users and objects, and the label can be whether the user has operated the object (such as clicking, trading, or collecting behavior). The target domain data set can be a recombination of users and objects in the source domain. For example, the source domain data set includes the following two data: user A clicks shop A, and user B clicks shop B; user A and shop B, and user B and shop A historical operation positions. Therefore, the target domain data set can include: user A and shop B, and user B and shop A. The existing adaptive recommendation model tries to narrow the gap between the target domain and the source domain, but irrelevant knowledge from the two domains is always transferred more or less through shared knowledge. Moreover, these inter-domain methods are not very fine-grained for associating specific source domain data with specific target domain data. Unlike the two independent cross-domain data sets in the past, the target domain data is reconstructed from the source domain data, so specific source domain data can be associated with specific target domain data for intra-domain adjustment to solve bias and long tail effect.

[0056] In this embodiment, whether the structures of the main classifier and the auxiliary classifier are the same is not limited. Alternatively, the structures of the main classifier and the auxiliary classifier can be the same or similar, and both take the feature layer (embedding) as input. In order to increase the prediction difference of the same target input, a dropout function can be introduced, that is, in each training iteration, the output of a part of neurons is randomly set to 0, and the proportion of the randomly set to 0 can be configured according to requirements, for example, 50% or the like. In this way, each classifier can only focus on part of the information of the input, thereby reducing the overfitting risk of the classifiers and increasing the diversity of the classifiers, which is beneficial to improving the effect of adversarial training. In the calculation of the adversarial loss, the outputs of the main classifier and the auxiliary classifier are used to calculate the loss function, so as to achieve the purpose of training the model. Since the network training depends on the source domain data, there will be a large prediction variance for the data in the target domain with large divergence from the source domain.

[0057] In the field of machine learning, the design of the optimization target of a model is an important work. In this embodiment, the optimization target of the model introduces an uncertainty loss, and the parameters in the uncertainty loss include the difference between the recommendation scores predicted by the main classifier and the recommendation scores predicted by the auxiliary classifier in different domains, that is, the difference between the recommendation scores predicted by the main classifier and the auxiliary classifier under the source domain data set or the target domain data set. And / or, the difference between the class predictions of the main classifier and the auxiliary classifier for the same class data in different domains, that is, the difference between the class information predicted by the main classifier and the auxiliary classifier under the source domain data set or the target domain data set.

[0058] In some examples, the Kullback-Leibler divergence can be used to represent the difference between the feature distributions of the source domain data set and the target domain data set predicted by the main classifier and the auxiliary classifier, respectively. Based on this, the difference between the recommendation scores predicted by the main classifier and the auxiliary classifier under the source domain data set or the target domain data set is determined by the following method:

[0059] The Kullback-Leibler divergence predicted by the main classifier and the Kullback-Leibler divergence predicted by the auxiliary classifier are obtained.

[0060] The Kullback-Leibler divergence of the main classifier and the Kullback-Leibler divergence of the auxiliary classifier are respectively weighted by weights to obtain a Kullback-Leibler divergence loss; wherein the Kullback-Leibler divergence loss represents the difference between the recommendation scores predicted by the main classifier and the auxiliary classifier, and the weights include a quantified transferable weight. The Kullback-Leibler divergence can be used to accurately determine the above parameters.

[0061] In some examples, the difference between the class information predicted by the main classifier and the auxiliary classifier under the source domain dataset or the target domain dataset is determined by:

[0062] obtaining first class-level prediction information of the target data in the target domain dataset predicted by the main classifier and second class-level prediction information of the target data in the target domain dataset predicted by the auxiliary classifier;

[0063] weighting the first class-level prediction information and the second class-level prediction information respectively by weights to obtain a class-level loss; wherein the weight for the first class-level prediction information and the weight for the second class-level prediction information are determined based on class clustering weights, and different classes have different class clustering weights.

[0064] As an example, the optimization objective of the recommendation model in this embodiment is designed considering the following two uncertainties:

[0065] ① Kullback-Leibler uncertainty: it is assumed that the predicted pseudo-labels of the dataset in the target domain usually contain noisy predictions.

[0066] ② Class-level uncertainty: it is assumed that the class-level predictions from the source domain and the target domain corresponding to the same class should be consistent in semantics.

[0067] The following table shows the meanings of the parameters in some subsequent formulas:

[0068]

[0069]

[0070]

[0071] In some examples, the domain adaptation can be achieved by minimizing the cross-entropy loss and / or additional adversarial loss. For example, the optimization objective further includes: minimizing the cross-entropy loss of the source domain dataset; the cross-entropy loss of the source domain is determined by the difference between the class prediction of the source domain data in the source domain dataset and the label of the source domain data. As an example, the cross-entropy loss in the source domain Xs can be represented by the following formula (1):

[0072]

[0073] where λ m and λ a are compromise parameters, and the specific values can be set as needed, which are not limited in this embodiment.

[0074] To learn the aligned features and minimize the difference of effective knowledge transfer between two domains, an adversarial training loss can also be adopted; that is, the optimization objective also includes: minimizing an adversarial loss determined according to a distance between the features converted by the generator and the features of the target domain data, as an example, an optimization function for training the discriminator can be expressed by the following formula (2):

[0075]

[0076] where D (·; θ D ) denotes a discriminator function with parameters θ D . The discriminator function accepts input from the feature extractor. L D makes the source domain prediction score from D (·; θ D ) close to 1 and the prediction score in the target domain from D (·; θ D ) close to 0. Then, the adversarial loss of the recommendation network can be expressed by the following formula (3):

[0077]

[0078] Under the guidance of the cross-entropy loss and the adversarial loss, the features of the two domains will gradually align, and the trained network has a certain recommendation ability for the data in the target domain. In practical applications, this transfer strategy considering the global domain difference may ignore the intrinsic Kullback-Leibler and class-level discrimination. Inspired by the theory of uncertainty representation, the embodiments of the present specification propose learning for uncertainty minimization to minimize the intrinsic multi-level domain difference.

[0079] The embodiments use the prediction label distribution of the main classifier and the introduced auxiliary classifier to calculate the prediction variance to represent the Kullback-Leibler prediction uncertainty in the target domain. By removing the sigmoid function from the end of and the end of , that is, the aforementioned dropout function used, in each training iteration, the output of a part of neurons is randomly set to 0, and and can be calculated as:

[0080]

[0081] Optionally, there are many distance formulas that can calculate the prediction variance, and the embodiments use the Kullback-Leibler divergence to fully consider the classification confidence information:

[0082]

[0083] Minimize equation (5) (6) to reduce Kullback-Leibler uncertainty, where is fixed, which means that the parameter will change with different inputs, but the parameter does not participate in training, which does not belong to the parameters that need to be adjusted in the training process of the recommendation model. In the training process, the main classifier function (included in ) and the auxiliary classifier function (included in ) are also fixed. Otherwise, the classifier may learn some domain-agnostic knowledge within the target domain, and even easily fall into a local optimal solution. Specifically, in the process of determining and , minimizing equation (5) (6) reduces the prediction variance of the features extracted by (corresponding to the Kullback-Leibler prediction with a larger prediction variance), rather than directly clustering irrelevant features under the action of the two classifiers. Freeze the classifier parameters to let the encoder learn sufficiently in the hidden space Z to reduce the prediction variance and prevent the classifier from destroying the variance consistency in the source domain and the target domain in the hidden space. At the same time, the cross-entropy loss and the adversarial loss supervise the uncertainty minimization guided learning to the recommendation. The knowledge in the target domain with high uncertainty is transferred to the knowledge with low uncertainty, and the transferred knowledge can also be used as a bridge for subsequent high-uncertainty knowledge transfer. In essence, it can be regarded as associating specific source domain data with specific target domain data for domain adaptation. In essence, equation (5) (6) allows the two classifiers to predict consistent scores for unlabeled target domain data.

[0084] Although the Kullback-Leibler learning oriented to uncertainty minimization connects specific data from two domains, it is often difficult to determine the clustering attribute for target data with high uncertainty and independent of clustering. That is, rather than connecting specific data far away, it is better to use prior knowledge to regularize the classification of specific target domain data. These specific target data outside the cluster often have great uncertainty, so the Kullback-Leibler (KL) divergence in equation (5) (6) is weighted with quantified transferability, where transferability represents noise-free data that can be applied from the target domain to the source domain. To reduce the proportion of these specific target data in equation (5) (6), the final KL divergence loss is:

[0085]

[0086] where |X t | represents the number of data in the target domain, and K represents the number of object classes. For example, clothes and furniture belong to different classes. If belongs to k, then [I(j) = k] = 1, otherwise [I(j) = k] = 0 as quantified transferability. and In formula (7), is fixed. Here, the class refers to the interval divided according to the set manner of the value range of the recommendation score, for example, the recommendation score with a value range of 0 to 1 is divided into intervals of 0 to 0.2, 0.2 to 0.4, etc., and each interval is a class.

[0087] Confidence regularizes the closeness of class prediction. After quantifying the KL divergence in formula (7), the next step is to transfer the outlier target domain data to the high-confidence cluster based on the closeness of the confidence-regularized class prediction. Specifically, by assuming that the class-level predictions of the source domain and the target domain corresponding to the same class should be consistent in semantics, a weighted scheme is used to calculate the prediction variance between the class-level predictions of the two classifiers, and the smaller variance is included, and the formula is as follows:

[0088]

[0089] The meanings of specific parameters can be seen in the aforementioned table. Among them, P j and In formula (8), is fixed.

[0090] where, and The formula is as follows:

[0091]

[0092] where, represents the output probability of the k-th class of the j-th target domain data. Formula (8) includes the following two weights:

[0093] ① Quantified non-transferability. Since the class-aware closeness is used to determine the cluster attribute of the target data with high uncertainty, the quantified non-transferability relative to the quantified transferability in equation (7) is used as the weight:

[0094]

[0095] ② Class clustering weight. The class imbalance of the target domain data set indicates that directly using the prediction variance at the class level It is not suitable as an optimization problem. During the training process, for the case that the class of the target data in the target domain dataset does not belong to the clustering class, the quantified transferable weight is used to reduce the proportion of the target data that does not belong to the clustering class. That is, in a batch of training, for the small sample class, the probability predicted by the network is relatively low. As an example, the following formula can be used to balance different classes using the class clustering weight to prevent data skew:

[0096]

[0097] Using learning oriented to uncertainty minimization, the optimization objective of the first stage of the model training process can be expressed as:

[0098]

[0099] The above process describes the training process of the recommendation model in the first stage, in which the model can predict the probability value of each data in the target domain dataset belonging to each class.

[0100] In the second stage, based on the training results of the first stage, the selection of pseudo labels and retraining are carried out. By using the probability threshold T k and Z k

[18] for the data in the target domain Select pseudo labels is defined as is defined as The zero mask mapping of is defined as:

[0101]

[0102] where subscript k represents the selection of the kth class, I M The value is 0 or 1, which depends on the predicted score. T k and Z k are set to the first eighth and the last eighth of the kth class probability in the output sorted in ascending order of all the data in the target domain, respectively. When the model prediction score is greater than T k or less than Z k , is set to 1 or 0, respectively. Therefore, the recommendation loss in the target domain can be expressed as the following formula 13:

[0103]

[0104] where, is the quantized transferability, which is fixed in formula (13). After obtaining the pseudo labels of the data in the target domain to facilitate network training, the quantized transferability is used to force the recommendation loss in the target domain to select the target domain samples with smaller differences. Similarly, the quantized transferability is designed for the recommendation loss of the source domain to flexibly select the source domain samples:

[0105]

[0106] wherein, is the quantized transferability, which is fixed in (14).

[0107] The optimization of formula (13) (14) as a structural source and target regularizer, based on which, the optimization objective of the second stage in the training process can be expressed as:

[0108]

[0109]

[0110] Through the above embodiment, the trained recommendation model can be applied to the recommendation scene. For example, the recommendation model can be used to recommend objects belonging to the source domain data set or the target domain data set. As shown in Figure 2 is a flowchart of a recommendation method according to an exemplary embodiment of the present specification, the embodiment method can be applied to the server side, and can include the following steps:

[0111] In step 202, a target object is obtained.

[0112] Among them, the target object can include a target domain object, that is, an object that can belong to the same field as the source domain data set, or an object that can belong to a different field but belong to the same scene as the source domain data set. The scene can be an e-commerce, food delivery, etc. The target object can be obtained from any downstream service, for example, the downstream service uses the recommendation model of the embodiment, and when using it, it can initiate a call request. The call request can carry the information of the target object (such as the identification of the target object, etc.) and the information of the user (such as the identification of the user, etc.).

[0113] In step 204, the recommendation model is used to predict the recommendation score of the target object recommended to the user.

[0114] For example, the characteristics of the target object and the characteristics of the user can be obtained, and the recommendation model predicts the recommendation score of the target object to the user based on the characteristics of the target object and the characteristics of the user. The recommendation model includes a main classifier and an auxiliary classifier, and the recommendation score is determined by the recommendation score predicted by the main classifier and the recommendation score predicted by the auxiliary classifier. The determination method can be various, for example, it can be the average of the two recommendation scores, etc. The determined recommendation score can be provided to the downstream service for subsequent operations. For example, it can be determined based on the recommendation score whether the target object is recommended to the user. In one use case, the downstream service can recall multiple target objects, and after obtaining the recommendation score of each target object by using the recommendation method of the embodiment, it is sorted and each target object that meets the recommendation condition is recommended to the user. The recommendation condition can be set as needed, for example, the top N target objects with the highest recommendation score, the higher the recommendation score, the higher the degree of recommendation of the target object to the user, and the number of N can be set as needed, or the recommendation condition can also be the target object with the set value of the recommendation score.

[0115] As can be seen from the above embodiments, inspired by the theory of uncertainty representation, the embodiment minimizes the internal domain difference between the two domains by learning towards uncertainty minimization, limits knowledge transfer by uncertainty minimization, and uncertainty is represented by the pivot similarity between different network branches. More specifically, the Kullback-Leibler (KL) divergence and Euclidean square distance between the predicted label distribution of the main classifier and the introduced auxiliary classifier are used to represent the prediction variance. And the prediction variance is taken as the uncertainty representation into the optimization target. The knowledge transfer towards uncertainty minimization can explore the field-invariant knowledge, while aligning other knowledge with it by associating specific source and target domain data.

[0116] Unlike the rough feature alignment method in the related art, the embodiment proposes a learning method for uncertainty minimization to enhance the domain adaptation of the recommendation model. In order to minimize the uncertainty, the embodiment combines the Kullback-Leibler (KL) prediction variance and the category-level prediction variance into the optimization objective. The KL prediction variance is weighted using a quantized transferability parameter, while the category-level prediction variance is weighted using a quantized non-transferability parameter and a category clustering parameter. The three weighted parameters aim to balance the influence of the KL prediction variance and the category-level prediction variance, respectively. After obtaining the pseudo-labels of the target domain dataset, by the design of formula (14), the embodiment also designs a useful component to align the pseudo-labeled target centroids and the labeled source centroids in the training fine-tuning process, where the centroid refers to the centroid of each cluster in the dataset. The embodiment also designs a confidence regularization Kullback-Leibler semantic shift and a category-aware proximity to associate the data within a specific target domain with the data of a specific source domain and push them to the high-confidence domain-invariant clusters. By softly selecting the data labels with less difference, the performance of the recommendation model of the embodiment is further improved. In addition, the method of the embodiment is compatible with other domain adaptation methods, which inspires future research in this field.

[0117] Corresponding to the embodiments of the foregoing recommendation method, the specification also provides embodiments of a recommendation device and a computer to which the recommendation device is applied.

[0118] The embodiment of the recommendation device of the specification can be applied on a computer device, such as a server or a terminal device. The device embodiment can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a logically meaningful device, it is formed by the processor of the file processing reading the corresponding computer program instructions in the non-volatile memory into the memory for running. From the hardware level, as shown in Figure 3 , it is a hardware structure diagram of the computer device where the recommendation device of the specification is located. In addition to the processor 310, the memory 330, the network interface 320, and the non-volatile memory 340 shown in Figure 3 , the computer device where the recommendation device 331 of the embodiment is located usually includes other hardware according to the actual function of the computer device, which will not be described here.

[0119] As shown in Figure 4 , Figure 4 is a block diagram of a recommendation device according to an exemplary embodiment of the specification, and the device includes:

[0120] The acquisition module 41 is configured to acquire a target object.

[0121] The prediction module 42 is configured to predict, by using the recommendation model, a recommendation score of the target object recommended to the user.

[0122] The recommendation model comprises a main classifier and an auxiliary classifier, and the recommendation score is determined by a recommendation score predicted by the main classifier and a recommendation score predicted by the auxiliary classifier.

[0123] The recommendation model is trained by using a source domain data set with labels and a target domain data set without labels, so as to introduce an optimization objective of minimizing an uncertainty loss, and the uncertainty loss is determined by a difference between the recommendation scores respectively predicted by the main classifier and the auxiliary classifier under the source domain data set or the target domain data set, and / or a difference between the category information respectively predicted by the main classifier and the auxiliary classifier.

[0124] In some examples, the difference between the recommendation scores respectively predicted by the main classifier and the auxiliary classifier under the source domain data set or the target domain data set is determined by:

[0125] The Kullback-Leibler divergence predicted by the main classifier and the Kullback-Leibler divergence predicted by the auxiliary classifier are obtained.

[0126] The Kullback-Leibler divergence of the main classifier and the Kullback-Leibler divergence of the auxiliary classifier are respectively weighted by using weights to obtain a Kullback-Leibler divergence loss, wherein the Kullback-Leibler divergence loss represents the difference between the recommendation scores respectively predicted by the main classifier and the auxiliary classifier, and the weights comprise a quantified transferable weight.

[0127] In some examples, in the training process, for a case that the category of target data in the target domain data set does not belong to the clustering category, the quantified transferable weight is used to reduce the proportion of the target data not belonging to the clustering category.

[0128] In some examples, the difference between the category information respectively predicted by the main classifier and the auxiliary classifier under the source domain data set or the target domain data set is determined by:

[0129] The first category level prediction information of the target data in the target domain data set by the main classifier and the second category level prediction information of the target data in the target domain data set by the auxiliary classifier are obtained.

[0130] The first category level prediction information and the second category level prediction information are respectively weighted using weights to obtain a category level loss; wherein the weight of the first category level prediction information and the weight of the second category level prediction information are determined based on category clustering weights, and different categories have different category clustering weights.

[0131] In some examples, the recommendation model further includes a feature extractor, and the feature extractor is configured to perform feature extraction on the input data and input the extracted features into the main classifier and the auxiliary classifier respectively.

[0132] In some examples, the recommendation model further includes a generator and a discriminator, and the feature extractor is configured to input the extracted features into the generator and the discriminator.

[0133] The generator is configured to convert the features of the source domain data into the features of the target domain data, and pass the converted features to the discriminator.

[0134] The discriminator is configured to distinguish the feature distribution of the source domain data set and the target domain data set using the input features, so as to distinguish whether the input data belongs to the source domain data set or the target domain data set.

[0135] In some examples, the optimization target further includes: minimizing an adversarial loss.

[0136] The adversarial loss is determined according to the distance between the features converted by the generator and the features of the target domain data.

[0137] In some examples, the optimization target further includes: minimizing a cross-entropy loss of the source domain data set.

[0138] The cross-entropy loss of the source domain is determined by the difference between the category prediction of the source domain data in the source domain data set and the label of the source domain data.

[0139] In some examples, the target domain data set is obtained by combining data in the source domain data set.

[0140] The implementation process of the functions and roles of each module in the above recommendation device is specifically described in the implementation process of the corresponding steps in the above recommendation method, and will not be repeated here.

[0141] Correspondingly, the present specification also provides a computer program product, which includes a computer program, and the computer program is executed by a processor to implement the steps of the above-mentioned recommendation method embodiments.

[0142] Correspondingly, the embodiments of the present specification also provide a computer device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the recommendation method embodiments when executing the program.

[0143] Correspondingly, the embodiments of the present specification also provide a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the recommendation method embodiments.

[0144] For the device embodiments, since they basically correspond to the method embodiments, the related parts are described in the part of the method embodiments. The device embodiments described above are only illustrative, wherein the modules described as separate components can or can not be physically separated, and the components displayed as modules can or can not be physical modules, i.e., they can be located in one place or distributed on multiple network modules. Part or all of the modules can be selected to achieve the purpose of the present specification according to actual needs. Those skilled in the art can understand and implement without creative labor.

[0145] The above embodiments can be applied to one or more computer devices, which are devices capable of automatically performing numerical calculation and / or information processing according to pre-set or stored instructions, and the hardware of the computer device includes but is not limited to microprocessors, application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0146] The computer device can be any electronic product that can interact with the user, such as a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an interactive Internet Protocol Television (IPTV), a smart wearable device, etc.

[0147] The computer device can also include a network device and / or a user device, wherein the network device includes but is not limited to a single network server, a server group composed of multiple network servers or a cloud composed of a large number of hosts or network servers based on cloud computing.

[0148] The network in which the computer device is located includes, but is not limited to, the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), and the like.

[0149] The above describes specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different than the order in the embodiments and still achieve the desired result. In addition, the processes depicted in the figures do not necessarily require the particular order shown or sequential order to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous or possible.

[0150] The division of steps of the above various methods is only for the purpose of clear description. When implemented, some steps can be combined into one step or some steps can be split and decomposed into multiple steps, as long as the same logical relationship is included, which is within the protection scope of the present patent; adding insignificant modifications or introducing insignificant designs in the algorithm or process, but not changing the core design of the algorithm and process, are within the protection scope of the present application.

[0151] Wherein, the description of "specific examples" or "some examples" means that the specific features, structures, materials or characteristics described in combination with the embodiments or examples are included in at least one embodiment or example of the specification. In the specification, the illustrative representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the described specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0152] Other embodiments of the present specification will be apparent to those skilled in the art upon consideration of the specification and practice of the application disclosed herein. The specification is intended to cover any variations, uses or adaptive changes of the present specification that follow the general principles of the present specification and include common knowledge or conventional technical means in the technical field of the present specification not claimed by the present specification. The specification and examples are only considered as exemplary, and the true scope and spirit of the present specification are indicated by the following claims.

[0153] It should be understood that the present specification is not limited to the precise structures described above and shown in the drawings and that various modifications and changes can be made without departing from the scope thereof. The scope of the present specification is only limited by the appended claims.

[0154] The above only describes the preferred embodiments of the present specification and does not limit the present specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present specification shall be included in the protection scope of the present specification.

Claims

1. A recommendation method based on a recommendation model, the method comprising: Obtain the target object; The recommendation model is used to predict the recommendation score for the target object to be recommended to the user; The recommendation model includes a feature extractor for extracting features from the input data, a main classifier and an auxiliary classifier connected to the feature extractor, and the recommendation score is calculated and determined by the recommendation score predicted by the main classifier based on the input features and the recommendation score predicted by the auxiliary classifier based on the input features. The recommendation model is trained using a labeled source domain dataset and an unlabeled target domain dataset, with the goal of minimizing an optimization objective that includes uncertainty loss, cross-entropy loss of the source domain dataset, and adversarial loss. The uncertainty loss is determined by the following parameters: a first difference between the recommendation scores predicted by the main classifier and the auxiliary classifier in the source domain dataset and the target domain dataset, and a second difference between the category information predicted by the main classifier and the auxiliary classifier for the target domain dataset; the first difference is obtained by weighting the Kullback-Leibler divergence with quantized transferability weights. The adversarial loss is determined by the generator in the recommendation model converting the features extracted from the source domain data by the feature extractor into features of the target domain data, and then using the converted features of the target domain data to distinguish the feature distributions of the source domain dataset and the target domain dataset.

2. The method according to claim 1, wherein the first difference between the recommendation scores predicted by the main classifier and the auxiliary classifier respectively under the source domain dataset or the target domain dataset is determined in the following manner: Obtain the Kullback-Leibler divergence predicted by the main classifier and the Kullback-Leibler divergence predicted by the auxiliary classifier; The Kullback-Leibler divergence of the main classifier and the Kullback-Leibler divergence of the auxiliary classifier are weighted using weights to obtain the Kullback-Leibler divergence loss; wherein, The Kullback-Leibler divergence loss represents the difference between the recommendation scores predicted by the main classifier and the auxiliary classifier, and the weights include quantized transferability weights.

3. The method according to claim 2, wherein during the training process, when the category of the target data in the target domain dataset does not belong to a cluster category, the quantized transferability weight is used to reduce the proportion of the target data that does not belong to a cluster category.

4. The method according to claim 1, wherein, under the source domain dataset or the target domain dataset, the second difference between the category information predicted by the main classifier and the auxiliary classifier for the target domain dataset is determined in the following manner: Obtain the first category-level prediction information of the main classifier for the target data in the target domain dataset and the second category-level prediction information of the auxiliary classifier for the target data in the target domain dataset; The first category-level prediction information and the second category-level prediction information are weighted separately to obtain the category-level loss; wherein, The weights for the first category-level prediction information and the second category-level prediction information are determined based on category clustering weights, with different categories having different category clustering weights.

5. The method according to claim 1, wherein the feature extractor is used to input the extracted features into the generator and the discriminator; The generator is used to convert the features of the source domain data into the features of the target domain data, and then pass the converted features to the discriminator. The discriminator is used to distinguish the feature distributions of the source domain dataset and the target domain dataset using the input features, so as to distinguish whether the input data belongs to the source domain dataset or the target domain dataset.

6. The method according to claim 1, wherein the adversarial loss is determined based on the distance between the features transformed by the generator and the features of the target domain data.

7. The method according to claim 6, wherein the cross-entropy loss of the source domain dataset is determined by the difference between the category prediction of the source domain data in the source domain dataset and the label of the source domain data.

8. The method according to claim 1, wherein the target domain dataset is obtained by combining data from the source domain dataset.

9. A recommendation device based on a recommendation model, the device comprising: The acquisition module is used to: acquire the target object; The prediction module is used to: predict the recommendation score of the target object to be recommended to the user using a recommendation model; The recommendation model includes a feature extractor for extracting features from the input data, a main classifier and an auxiliary classifier connected to the feature extractor, and the recommendation score is calculated and determined by the recommendation score predicted by the main classifier based on the input features and the recommendation score predicted by the auxiliary classifier based on the input features. The recommendation model is trained using a labeled source domain dataset and an unlabeled target domain dataset, with the goal of minimizing an optimization objective that includes uncertainty loss, cross-entropy loss of the source domain dataset, and adversarial loss. The uncertainty loss is determined by the following parameters: a first difference between the recommendation scores predicted by the main classifier and the auxiliary classifier in the source domain dataset and the target domain dataset, and a second difference between the category information predicted by the main classifier and the auxiliary classifier for the target domain dataset; the first difference is obtained by weighting the Kullback-Leibler divergence with quantized transferability weights. The adversarial loss is determined by the generator in the recommendation model converting the features extracted from the source domain data by the feature extractor into features of the target domain data, and then using the converted features of the target domain data to distinguish the feature distributions of the source domain dataset and the target domain dataset.

10. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method of any one of claims 1 to 8.

11. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Adaptive output sequence recommendation method and system

    CN111931057A