Recommendation method based on collective session

By treating the conversation as a collection and adopting a multi-stage self-supervision method, combining global preferences and recent interests for combined recommendations, the inefficiency of the existing session recommendation system in dealing with anonymous behaviors and dynamic interest changes is solved, and higher recommendation accuracy and real-timeness are achieved.

CN119829831AActive Publication Date: 2025-04-15UNIV OF SHANGHAI FOR SCI & TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411862522.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-04-15
Estimated Expiration
2044-12-17

AI Technical Summary

Technical Problem

The existing session recommendation system reduces the accuracy of recommendation when processing user anonymous behavior and long-term behavior data, and the graph neural network is inefficient when processing dynamic changes in user interests, making it difficult to respond to rapid changes in user interests in real time.

Method used

By treating the conversation as a collection, using a multi-stage self-supervision approach, the conversation is divided into multiple gradually expanded subsessions, each subsession represents a gradually accumulated user interaction history, thereby simulating different stages in the recommendation process. At the same time, the last interaction in the session is used as an embedding representing the user's current interests, and combined recommendations are made based on global preferences and recent interests.

Benefits of technology

This method can effectively avoid excessive dependence on the interactive sequence of recommendation results, improve the accuracy and real-timeness of recommendations, better capture the dynamic changes of long-term and short-term interests of users, and improve the performance of the recommendation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829831A_ABST
    Figure CN119829831A_ABST
Patent Text Reader

Abstract

The invention provides a session recommendation method based on self-supervised multi-stage set extension, which combines global preferences and recent interests of users in sessions to realize recommendation, utilizes a multi-stage self-supervised mode to imitate dynamic recommendation behaviors in order to capture the global preferences, divides the sessions into a plurality of sub-sessions which are gradually expanded, and improves the recommendation efficiency. Each sub-session represents a gradually accumulated user interaction history, so that different stages in the recommendation process are simulated; in order to obtain the recent interest of the user, a method for extracting the last item in the session to generate embedding is adopted, the last interaction of the user in the session always reflects the current instant interest and demand of the user, and the model can quickly adapt to the instant change of the interest of the user by taking the last item as the representative of the recent interest, so that the user experience is improved. And finally, combining the global preferences and the recent interests to obtain an accurate recommendation result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of recommendation systems, and in particular to a conversation recommendation method based on self-supervised multi-stage set expansion. Background Art

[0002] Recommendation Systems (RS) play a key role in fields such as e-commerce, streaming media, and search engines. However, most existing recommendation systems rely on users' long-term historical data and explicit personal profiles. This reliance will lead to a significant decrease in recommendation accuracy when user identity information is unavailable or long-term behavioral data is missing. Therefore, session-based recommendations (SBR), which predicts the possible next actions of anonymous users by analyzing their behavior during a single visit, have attracted widespread attention in the industry.

[0003] Existing SBR models are mainly divided into three categories: traditional recommendation models (Conventional models), sequential-based recommendation models (Sequential-based models) and graph neural networks (GNN).

[0004] Conventional recommendation models mainly rely on Markov chain methods, which predict the user's next behavior by modeling the user behavior sequence as the transition probability between states. However, since the Markov chain only considers the relationship between the current state and the next state and ignores the long-term dependency of user behavior, it is insufficient in dealing with complex and long sequences of user behavior.

[0005] The sequence-based recommendation model effectively captures the long-term dependencies in user behavior through technologies such as recurrent neural networks (RNN) and long short-term memory networks (LSTM). However, the sequence-based recommendation model is very sensitive to the order of user behavior, which means that even a small change in the order of user behavior may lead to significantly different recommendation results. But in actual scenarios, small changes in user behavior should not cause significant differences. This is because user behavior in session data is usually highly consistent. For example, on an e-commerce platform, suppose a user wants to buy a set of Apple electronic devices. The user has already purchased an iPhone, a Macbook, and an iPad. Regardless of whether the order of purchase is "iPhone→Macbook→iPad" or "iPhone→iPad→Macbook", the final recommendation result of the recommendation system should be Airpods, rather than giving completely different product recommendations due to different orders.

[0006] In recent years, Graph Neural Networks (GNNs) have become an important tool in the field of conversational recommendation and have demonstrated excellent performance because of their ability to capture the complex relationships between user behaviors through graph structures. However, although GNN models can solve the problem of sequential sensitivity to a certain extent, they still have shortcomings in dealing with dynamic changes in user interests. In particular, when the amount of conversation data continues to increase or the time span is large, user interests tend to drift, and static graph-based GNNs are difficult to accurately capture such dynamic changes. Although some researchers have tried to address this problem through offline retraining or one-time modeling of all historical conversations, these methods are often inefficient and difficult to respond to rapid changes in user interests in real time. Summary of the invention

[0007] The present invention provides a recommendation method based on a collection-type session, comprising the following steps:

[0008] Step S1: Initialize the embedding layer E and the extension layer SE, wherein the extension layer SE includes an encoder and a decoder, and the extension layer SE has permutation invariance;

[0009] Step S2: Set session s = {v1, v2, ... v n} Divide into n-1 sub-sessions s1, s2…s according to the recommendation stage n-1 ; where session s includes n interactions v, subsession s i Including v1 to v i+1 All interactions of , i is a natural number, 0 <i≤n-1;

[0010] Step S3: For each subsession s i , masking its last item v i+1 , input to the embedding layer E, and obtain its corresponding sub-session feature X i , that is, X i =E(s i );

[0011] Step S4: Input the session s into the embedding layer E to obtain the global session feature X g , that is, X g =E(s); the last item v of session s n Input to the embedding layer E to get the recent session feature X l , that is, X l =E({v n});

[0012] Step S5: Set each sub-session feature X i , global session feature X gInput to the expansion layer SE, and obtain each sub-session feature X i Corresponding recommendation i , global preference r g ; Input the value of the recent session feature X1 into the embedding layer to obtain the recent preference r1, that is: r i =SE(X i ), r g =SE(X g ), r1=E(X1);

[0013] Step S6: Set the global preference r g With the most recent preference r l Concatenate and reduce the dimension to obtain the combined interest r representing the complex relationship of the conversation c :

[0014]

[0015] in, represents a linear transformation operation, represents the cascade between embeddings, α is a learning parameter, 0<α<1, which is used to control the influence of recent interests on session representation;

[0016] Step S7: Optimize the parameters of the embedding layer E and the extension layer SE through a self-supervised learning mechanism;

[0017] Step S8: Using the optimized embedding layer E and expansion layer SE, the predicted interaction score vector is obtained

[0018]

[0019] Where: W p and b p are the weight matrix and bias vector of the linear layer respectively;

[0020] Then use the softmax function to Transformed into interaction probability

[0021]

[0022] Interaction Probability It represents the probability of the next interaction in session s, and the one with the highest probability is selected as the result of the predicted interaction.

[0023] Furthermore, in step S1, the encoder is a Transformer encoder with position coding and dropout layers removed, and the decoder is a summation operation.

[0024] Furthermore, in step S7, in the self-supervised learning mechanism, a loss function is defined:

[0025] L loss =L rec +βL self

[0026] Among them, L rec is the recommendation loss function, L self is the self-supervised loss function, β represents the proportion of self-supervised tasks, 0<β<1;

[0027]

[0028] L rec is the Top1Loss function.

[0029] Further,

[0030]

[0031] Where N is Vector dimension, target is the set target index, and σ is the Sigmoid function.

[0032] The method of the present invention regards the session as a collection, thereby avoiding the recommendation results from being overly dependent on the interaction order. In addition, the global preferences and recent interests of users in the session are combined to achieve recommendations. In order to capture global preferences, a multi-stage self-supervision method is used to imitate dynamic recommendation behaviors, and the session is divided into multiple gradually expanding sub-sessions. Each sub-session represents a gradually accumulated user interaction history, thereby simulating different stages in the recommendation process; in order to obtain the user's recent interests, the present invention adopts a method of extracting the last item in the session to generate an embedding. The last interaction of the user in the session often reflects their current immediate interests and needs. By taking the last item as a representative of the recent interests, the model can quickly adapt to the immediate changes in the user's interests, and finally combine the global preferences and recent interests to obtain accurate recommendation results. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 is a flow chart of the method recommended by the present invention;

[0034] Figure 2 It is an architectural diagram of the recommended model of the present invention. DETAILED DESCRIPTION

[0035] The present invention is based on a conversation recommendation method based on self-supervised multi-stage set expansion, and its core idea is to realize recommendation by combining the global preference and recent interest of users in the conversation.

[0036] In order to capture global preferences, since the user's behavioral preferences may be different in the early and late stages of a session, directly embedding and extracting the entire session may ignore the dynamic changes in user interests. In order to alleviate this problem, the present invention introduces self-supervised learning and uses multi-stage self-supervision to imitate dynamic recommendation behaviors. Multi-stage self-supervision is achieved through multi-stage self-prediction of the session. The main idea of ​​this method is to divide the session into multiple gradually expanding sub-sessions, each of which represents a gradually accumulated user interaction history, thereby simulating different stages in the recommendation process.

[0037] Global preferences reflect the dynamic changes in user interests that may occur as the conversation progresses. By gradually expanding the user's sub-sessions, the model can introduce more historical information and extract embedded representations of the user's overall behavior trends, thereby more comprehensively characterizing the user's long-term interests.

[0038] See also Figure 1-2 The recommendation method based on the collection-type session of the present invention specifically includes the following steps:

[0039] Step S1: Initialize the embedding layer E and the extension layer SE, wherein the extension layer SE includes an encoder and a decoder, the encoder is a Transformer encoder that removes the position encoding and dropout layer, and the decoder of the extension layer is a summation operation;

[0040] In the present invention, when the set is used as the processed object, the model is required to have permutation invariance. Therefore, the above encoder and decoder need to form a permutation invariant network, that is, no matter how the interaction order in the set changes, the model output is always consistent (Lee J, Lee Y, Kim J, et al. Set transformer: A framework for attention-based permutation-invariant neural networks [C] / / International conference on machine learning. PMLR, 2019: 3744-3753). It can be written as:

[0041] SL({x1, x2, ..., x n})=σ({ρ(x1),ρ(x2),…ρ(x n )})

[0042] Among them, SL(·) represents the set learning method, ρ(·) represents the embedding extraction of elements, and σ(·) represents the output of the extracted embedding. Zaheer et al.’s research has shown that when ρ(·) is a continuous function and σ(·) is a summation operator, any permutation invariant function can be represented (Zaheer M, Kottur S, Ravanbakhsh S, et al. Deep sets[J]. Advances in neural information processing systems, 2017, 30).

[0043] Therefore, the extension layer SE can be deconstructed into a combination of an encoder and a decoder, where the encoder is used for element embedding and the decoder is used for aggregating the output.

[0044] In addition, Zaheer et al. also found that when the encoder has permutation equivariance, the decoder output also remains permutation-invariant. Permutation equivariance refers to a property that when the order of elements in the input data of the model changes, its output will change in the corresponding order, maintaining the same permutation relationship with the input.

[0045] The self-attention mechanism can capture complex information in the interaction, so it has been widely used in conversational recommendation systems. It can be proved that the self-attention mechanism has permutation invariance or permutation equivariance, thus meeting the requirements of the required encoder. The proof process is as follows: Starting from the formula of the self-attention mechanism, for a given input sequence X = [x1, x2, ..., x n ], whose query, key and value are Q = XW Q , K = XW K , V = XW V , where W Q , W K , W V is a learnable weight matrix. The attention output is:

[0046]

[0047] Where Att(·) represents the attention output, d k is the dimension of the key vector.

[0048] Suppose we use a permutation matrix P (the rows and columns of the permutation matrix are permutations of the standard basis vectors) to permute the input sequence X and obtain a new sequence X′=[x θ(1) , x θ(2) , …, x θ(n) ], where θ is a permutation. And thus we get new queries, keys and values. The query is:

[0049] Q′=X′W Q =PXW Q =PQ

[0050] Similarly, K′=PK, V′=PV. Therefore, the output of attention is:

[0051]

[0052] Since P is a permutation matrix, its transpose P T is also a permutation matrix, and P T P=I. This formula can be simplified as:

[0053]

[0054] The Transformer architecture is a successful application of the self-attention mechanism. However, the positional encoding in the standard Transformer introduces sequential information to the input data, which is inconsistent with the requirements of the set input problem. In addition, random dropout of data may lead to information loss, thus affecting the permutation invariance of the encoder-decoder framework. Therefore, referring to the research of Dai et al. (Dai Z, Yang Z, Yang Y, et al. Transformer-xl: Attentive language models beyond a fixed-length context [J]. arXiv preprint arXiv: 1901.02860, 2019), a Transformer variant with positional encoding and dropout layers removed is used as the encoder of the set expansion layer to better adapt to the characteristics of the set input problem. The research of Haviv et al. confirmed that the above removal operation has little effect on the performance of Transfomer (Haviv A, Ram O, Press O, et al. Transformer language models without positional encodings still learn positional information [J]. arXiv preprint arXiv: 2203.16634, 2022.).

[0055] For the choice of decoder. Common feature aggregation methods include taking the dimension mean, maximum value or directly using the sum operation of the feature vector. The sum operation has natural permutation invariance. Regardless of the order of the feature vectors, the sum result is the same. Therefore, the combined structure of the encoder and decoder meets the requirements of the permutation invariant network.

[0056] Step S2: Set session s = {v1, v2, ... vn}Divided into n - 1 sub - sessions s1, s2…s according to the recommendation stage n-1 ; where s represents the input session, which includes n interactions v, and the sub - session s i includes all interactions from v1 to v i+1 , where i is a natural number, 0 < i ≤ n - 1. For example, s1 = {v1, v2}, s2 = {v1, v2, v3}, s n-1 = {v1, v2,…v n};

[0057] Step S3: For each sub - session s i , mask its last item v i+1 , and input it into the embedding layer E to obtain its corresponding sub - session feature X i , that is, X i = E(s i );

[0058] For each set of sub - sessions s i , its last item v i+1 itself is affected by v1 to v i . Therefore, in order to be able to correct the parameters of the embedding layer E later, it is necessary to mask its last item v i+1 .

[0059] Step S4: Input the session s into the embedding layer E to obtain the global session feature X g , that is, X g = E(s); Input the last item v n of the session s into the embedding layer E to obtain the recent session feature X l , that is, X l = E({v n});

[0060] Step S5: Input each sub - session feature X i , the global session feature X g into the extension layer SE, and respectively obtain the recommendation r i corresponding to each sub - session feature X i , the global preference r g , input the recent session feature X l into the value embedding layer to obtain the recent preference r l , that is: r i = SE(X i ), r g = SE(X g ), r l = E(X l );

[0061] Step S6: The global preference rg With the most recent preference r l Concatenate and reduce the dimension to obtain the combined interest r representing the complex relationship of the conversation c , the formula is as follows:

[0062]

[0063] in represents a linear transformation operation, represents the cascade between embeddings, α is a learning parameter, 0<α<1, which is used to control the influence of recent interests on session representation;

[0064] Step S7: Optimize the parameters of the embedding layer E and the expansion layer SE through the self-supervised learning mechanism. During the learning process, the total loss function L loss Defined as:

[0065] L loss =L rec +βL self

[0066] Among them, L rec is the recommendation loss function, L self is the self-supervised loss function, β represents the proportion of self-supervised tasks, 0<β<1;

[0067] For the self-supervised loss function L self , defined as:

[0068]

[0069] Also about E(v i+1 ) as the subsession set s i The corresponding expected output.

[0070] For the recommendation loss function L rec , using the Top1Loss function commonly used in the recommendation system field

[0071]

[0072] in:

[0073]

[0074] is the predicted interaction score vector, W p and b p are the weight matrix and bias vector of the linear layer respectively; N is Vector dimension, target is the specified target index, and σ is the Sigmoid function.

[0075] Step S8: Calculate the result of the predicted interaction:

[0076] Through the self-supervised learning mechanism, after obtaining the final embedding layer E and expansion layer SE, the softmax function is used to predict the interaction score vector Transformed into interaction probability

[0077]

[0078] Interaction Probability It represents the probability of the next interaction in session s, and the one with the highest probability is selected as the result of the predicted interaction.

[0079] For the verification and evaluation of the method of the present invention, the real datasets Yoochoose and Diginetica are used. The Yoochoose dataset comes from the RecSys 2015 Challenge, and its training set is the session events collected by the e-commerce website. The Diginetica dataset comes from the CIKM Cup 2016, and this dataset only uses transaction data in this study. For the convenience of comparison, first, the sessions with only one item in the dataset are filtered out. Secondly, the items in the session are processed in chronological order. Since the Yoochoose dataset is very large, the model training efficiency is low. Considering that the training results of this dataset on the latest data are better than those on the complete dataset, the most recent 1 / 64 session data, namely Yoochoose1 / 64, is used. The data statistics are shown in Table 1.

[0080] Table 1 Statistics of the datasets used in the experiments

[0081]

[0082] The performance of the above methods is compared using the following evaluation metrics, which have been widely used in the field of conversational recommendation.

[0083] P@K: P@K score is widely used in the field of conversational recommendation systems to evaluate prediction accuracy. P@K represents the proportion of test cases that contain correct recommendations in the first K positions of the sorted list. Its formula is:

[0084]

[0085] Where N represents the number of samples of the session recommendation task used for testing, n hit Represents the number of samples containing the target item in the top K rankings. When the target item is in the top K of the sorted list, the prediction is considered accurate. In this paper, we use P@10 and P@20 to evaluate the performance of all test sets.

[0086] MRR@K: MRR (mean reciprocal rank) is the average of the reciprocal rankings of the expected recommended items. If the ranking exceeds K, the reciprocal ranking is set to 0. In this paper, we use MRR@10 and MRR@20. MRR@K is defined as:

[0087]

[0088] Among them, Rank(v t ) is the project v t Rank in the total item set V.

[0089] Both P and MRR are normalized scores ranging from [0, 1]. The increase in their values ​​reflects that the expected recommendations are more likely to be in the ranking list, indicating that the performance of the corresponding recommendation system is better.

[0090] Table 2: Performance comparison between the proposed method and existing advanced recommendation methods on different data sets

[0091]

[0092]

[0093] As can be seen from the above table, the proposed conversational recommendation method based on self-supervised multi-stage set expansion has achieved the best performance on both P@K and MRR@K on the two datasets. The methods presented cover classic recommendation methods (such as POP and Item-KNN) and sequence recommendation models based on deep learning in recent years (such as GRU4REC, STAMP, SR-GNN, etc.), which verifies the effectiveness of the proposed method.

[0094] On the Yoochoose 1 / 64 dataset, the present invention achieved significant advantages in multiple indicators such as P@10, MRR@1, P@20 and MRR@2, especially reaching 74.32% on P@20, while the performance of other methods did not exceed 73%. This shows that the present invention is superior to current advanced methods in terms of accuracy and ranking quality of short-term sequence recommendation. In particular, compared with representative sequence recommendation algorithms such as GRU4REC and SR-GNN, the present invention exhibits higher recommendation accuracy and ranking robustness.

[0095] On the Diginetica dataset, the present invention also demonstrates strong generalization ability, with P@10 and P@20 reaching 41.04% and 60.12% respectively, which are significantly higher than mainstream methods such as SR-GNN (36.86% and 56.07%) and STAMP (33.98% and 45.64%), indicating that it has excellent adaptability between datasets. In addition, the improvement of MRR@1 and MRR@2 indicators shows that the present invention has a good ranking performance in the top recommendations, further verifying the recommendation effectiveness of the method.

[0096] The above table and detailed description of the comparison results fully demonstrate the superior performance of the method of the present invention on different data sets, proving its effectiveness and robustness in the recommendation system.

[0097] In the training process of the present invention, the conversation is not split in the data preprocessing stage, but the entire conversation is processed through a multi-stage training strategy to preserve its integrity. This training method can fully preserve the continuous intention of the conversation, thereby enhancing the model's ability to capture complex interactive relationships and meeting the requirements for recommendation accuracy in practical applications.

[0098] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A recommendation method based on a collection-based session, characterized in that: The following steps are involved: Step S1: Initialize the embedding layer E and the extension layer SE, wherein the extension layer SE includes an encoder and a decoder, and the extension layer SE has permutation invariance; Step S2: Set session s = {v1, v2, ... v n } Divide into n-1 sub-sessions s1, s2…s according to the recommendation stage n-1 ; where session s includes n interactions v, subsession s i Including v1 to v i+1 All interactions of , i is a natural number, 0 <i≤n-1; Step S3: For each subsession s i , masking its last term v i+1 , input to the embedding layer E, and obtain its corresponding sub-session feature X i , that is, X i =E(s i ); Step S4: Input the session s into the embedding layer E to obtain the global session feature X g , that is, X g =E(s); the last item v of session s n Input to the embedding layer E to get the recent session feature X l , that is, X l =E({v n }); Step S5: Set each sub-session feature X i , global session feature X g Input to the expansion layer SE, and obtain each sub-session feature X i Corresponding recommendation i , global preference r g ; Set the recent conversation feature X l Input value embedding layer to get the nearest preference r l , that is: r i =SE(X i ), r g =SE(X g ), r l =E(X l ); Step S6: Set the global preference r g With the most recent preference r l After concatenation and dimensionality reduction, we can get the combined interest r representing the complex relationship of the conversation. c : in, represents a linear transformation operation, represents the cascade between embeddings, α is a learning parameter, 0<α<1, which is used to control the influence of recent interests on session representation; Step S7: Optimize the parameters of the embedding layer E and the extension layer SE through a self-supervised learning mechanism; Step S8: Using the optimized embedding layer E and expansion layer SE, the predicted interaction score vector is obtained in: W p and b p are the weight matrix and bias vector of the linear layer respectively; Then use the softmax function to Transformed into interaction probability Interaction Probability It represents the probability of the next interaction in session s, and the one with the highest probability is selected as the result of the predicted interaction.

2. The method according to claim 1, characterized in that In step S1, the encoder is a Transformer encoder with position coding and dropout layers removed, and the decoder is a summation operation.

3. The method according to claim 1, characterized in that In step S7, in the self-supervised learning mechanism, the loss function is defined: L loss =L rec +βL self Among them, L rec is the recommendation loss function, L self is the self-supervised loss function, β represents the proportion of self-supervised tasks, 0<β<1; L rec is the Top1Loss function.

4. The method according to claim 3, characterized in that: Where N is Vector dimension, target is the set target index, and σ is the Sigmoid function.

Citation Information

Patent Citations

  • Session recommendation method, system and equipment based on self-supervised graph learning

    CN114969561A

  • User preference prediction method based on graph neural network session recommendation system

    CN116680456A

  • Item recommendation method based on importance of item in conversation session and system thereof

    US20220198546A1