A Session Recommendation Method Based on Sampling Convolution and Interaction Strategies
Patent Information
- Application Number
- CN202210874268.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-21
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2042-07-21
AI Technical Summary
[0008]本发明的目的在于克服上述背景技术现有技术无法捕捉序列的时态信息,推荐准确性不足的缺点,提供一种基于采样卷积和交互策略的会话推荐方法
[0051]本发明提出了一种基于采样卷积和交互策略的会话推荐方法,该方法对用户行为之间的转换进行建模,并捕获行为序列的时间信息,以提取用户的潜在意图,从而做出更好的推荐。本发明所提出的方法性能明显优于目前最先进的方法,可以对用户行为之间的转换进行建模并捕捉行为序列的时间信息,产生更好的推荐,并且与现有技术相比,本发明具有更高的效率。
Smart Images

Figure CN115169366B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of conversation recommendation, and in particular to a conversation recommendation method based on sampling convolution and interaction strategies. Background Technology
[0002] SR: Session-based recommendation
[0003] SR aims to predict the next item a user will click based on their current session. The SR task is formally defined as follows: Let I = {i1, i2, ..., i...} N} represents a set of items, where N is the total number of items. Each session is represented as a list s = [i...] timestamp sorted. s,1 i s,2 , ..., i s,m ], where i s,t ∈s(1≤t≤m) represents the clicked item by the user in session s.
[0004] The SR task is to predict the next click i of S. S,m+1 For session S, the model calculates the probability of all possible items. The project's recommendation score is a vector. The corresponding element. and The items corresponding to the top-K scores will be recommended.
[0005] Most traditional recommender system (RS) methods assume that long-term user profiles are available; however, this approach fails to protect information confidentiality when users are not logged in or retain personal information. Session-based recommendation (SBR) aims to address this challenge. Given an anonymous session that records temporal behaviors (clicks or purchases) over a short period, the task of SBR is to predict the next item in the session.
[0006] Early representative research attempts introduced K-Nearest Neighbors (KNN) and Markov chains into Sequential Batch Regression (SBR). Subsequently, with the rise of deep learning, Recurrent Neural Networks (RNNs) showed overwhelming advantages in modeling sequential data, and GRU4REC (Recommendation System Behavior Sequence Modeling) was the first SBR model based on RNNs. Next, the Convolutional Neural Network (CNN)-based model NextItNet proposed using temporal convolutional neural networks to capture dynamic intent in a session. Modeling a session as a unidirectional sequence is considered key to the success of RNN-based and CNN-based SBR models. However, they all neglected the global information of the sequence, overemphasizing the relative order of user actions. Then, NARM was the first to propose combining attention mechanisms with RNNs to capture the main purpose of the session. It attempted to replace RNNs with self-attention in previous models. They all aimed to use attention mechanisms to capture the global information of the session and alleviate the focus on the relative order of actions. On this basis, they achieved considerable performance improvements. However, due to their superimposed structure, they either still did not get rid of the dependence on the relative order of user actions or neglected to model the transitions between adjacent items due to over-reliance on attention mechanisms.
[0007] Subsequently, researchers introduced graph neural networks (GNNs) to model sessions as graphs to capture item transitions. SR-GNN was the first method to capture item transitions using GNNs. FGNN models next item recommendation as a graph prediction problem. Due to the rich information contained in graphs and their ability to model pairwise relationships, most GNN-based models have improved upon previous methods. However, when modeling item transitions, they neglect to capture global information and unpaired relationships. Recently, state-of-the-art SR-GNNs have... 2 The DNCH model utilizes a hypergraph to capture high-level, unpaired relationships between items, rather than paired item transitions. Furthermore, S... 2 -DNCH was the first SBR model to adopt the self-supervised learning (SSL) paradigm. However, although the hypergraph structure considers more items and facilitates the capture of global information, its edges are undirected when modeling transitions between items. This causes the model to lose its ability to capture temporal information of the sequence, resulting in insufficient recommendation accuracy. Summary of the Invention
[0008] The purpose of this invention is to overcome the shortcomings of existing technologies, such as the inability to capture temporal information of sequences and insufficient recommendation accuracy, and to provide a session recommendation method based on sampling convolution and interaction strategies.
[0009] To achieve the above objectives, the present invention adopts the following technical solution:
[0010] A session recommendation method based on sampling convolution and interaction strategy includes the following steps:
[0011] S1: Input session sequence;
[0012] S2: Capture temporal information of conversation sequences and extract users' potential intentions through a conversation recommendation model based on sampling convolution and interaction strategies;
[0013] S3: Evaluate the probability of each candidate item based on the user's potential intent and make recommendations.
[0014] In some embodiments, step S2 includes the following steps:
[0015] S21: The input session sequence is transformed into a high-dimensional vector sequence X through an embedding layer;
[0016] S22: The high-dimensional vector sequence X is decomposed into two enhanced sub-features by applying splitting and interactive learning through an interactive layer;
[0017] S23: Enhanced sequence representation is obtained through the aggregation layer;
[0018] S24: The enhanced sequence representation is decoded through a fully connected layer, and the decoded output represents the user's potential intent.
[0019] In some embodiments, step S22 includes the following steps:
[0020] S221: Divide the high-dimensional vector sequence X into two subsequences;
[0021] S222: Two subsequences are processed using two different sets of sample convolutional layers with an interactive learning strategy to obtain two enhanced sub-features;
[0022] In step S222, information exchange between two sub-features is achieved by using a convolutional module and interactive learning. The interactive learning achieves information exchange by learning the parameters of the affine transformation to enhance the representational ability of the sub-features.
[0023] In some embodiments, the two subsequences are even-element sequences X. even And the sequence of odd elements X odd .
[0024] In some embodiments, the interactive learning process includes:
[0025] A1: Two different one-dimensional convolutional modules φ and ψ are used to transform the two subsequences into hidden states respectively, and the two hidden state subsequences are converted into exp format respectively. They are then interacted with the subsequences according to element-wise dot product to obtain two scaled features;
[0026] A2: Use two other different one-dimensional convolutional modules ρ and v to convert the two scaled features into two other hidden states, and then add or subtract from the two scaled features respectively;
[0027] Step A1 is represented by the following formula:
[0028] Where ⊙ represents a product at the element level;
[0029] Step A2 is represented by the following formula:
[0030]
[0031] In some embodiments, step S23 includes the following steps:
[0032] S231: Rearrange the two enhanced sub-features by reversing the parity splitting operation, and concatenate them into a new sequence representation X. new ;
[0033] S232: Add the new sequence representation to the high-dimensional vector sequence X by residual connection.
[0034] In some embodiments, step S3 includes the following steps:
[0035] S31: Connect the last embedded item x m And the output O of step S2 s A feedforward neural network is used to obtain an enhanced representation O;
[0036] S32: Calculate the probability that each item i will be the next in the session.
[0037] S33: Obtain the true probability distribution of the next item.
[0038] In some embodiments, the enhanced representation O in step S31 is calculated by the following formula:
[0039] O=f(W([O s ||x m ])+b,
[0040] Where || denotes a concatenation operation. It is a weighted matrix, O s Represents the user's potential intent. It is the bias vector, and f(·) represents the nonlinear activation function SELU.
[0041] In some embodiments, in step S32, the final probability of item i Calculated using the following formula:
[0042]
[0043]
[0044]
[0045] Where x i It is the embedding of i, L2Norm is the L2 normalization function, w k It is a normalized weight.
[0046] In some embodiments, the loss function of the model is:
[0047]
[0048] Where y is the true probability distribution of the next item.
[0049] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the steps of the above-described method.
[0050] The present invention has the following beneficial effects:
[0051] This invention proposes a session recommendation method based on sampling convolution and interaction strategies. This method models the transitions between user behaviors and captures the temporal information of behavior sequences to extract the user's latent intent, thereby making better recommendations. The proposed method significantly outperforms state-of-the-art methods, effectively modeling the transitions between user behaviors and capturing the temporal information of behavior sequences to generate better recommendations. Furthermore, compared to existing technologies, this invention offers higher efficiency. Attached Figure Description
[0052] Figure 1 This is a flowchart of the session recommendation method based on sampling convolution and interaction strategy in an embodiment of the present invention;
[0053] Figure 2 This is a schematic diagram of the architecture of the model built in the session recommendation method based on sampling convolution and interaction strategy in the embodiments of the present invention. Detailed Implementation
[0054] The embodiments of the present invention will be described in detail below. It should be emphasized that the following description is merely exemplary and not intended to limit the scope and application of the present invention.
[0055] This invention proposes a session recommendation method based on sampling convolution and interaction strategies. The basic idea is to model the transitions between user behaviors and capture the temporal information of behavior sequences to extract the user's latent intent, thereby making better recommendations. Technically, this embodiment uses a carefully designed interactive learning strategy and a temporal information modeling component to capture global information while focusing on the transitions between adjacent items. Based on these features, a representation of the user's latent intent is obtained to predict the next item the user will click.
[0056] refer to Figure 1 , Figure 2 , Figure 1 This is a flowchart of the session recommendation method based on sampling convolution and interaction strategy in this embodiment. Figure 2 This embodiment presents the architecture of a session recommendation model based on sampling convolution and interaction strategies, named SCIRec. The method in this embodiment includes the following steps:
[0057] S1: Input session sequence;
[0058] S2: Capture temporal information of conversation sequences and extract users' potential intentions through a conversation recommendation model based on sampling convolution and interaction strategies;
[0059] S21: The input session sequence is transformed into a high-dimensional vector sequence X through an embedding layer;
[0060] S22: The high-dimensional vector sequence X is decomposed into two enhanced sub-features by applying splitting and interactive learning through an interactive layer;
[0061] S221: Divide the high-dimensional vector sequence X into two subsequences;
[0062] S222: Two subsequences are processed using two different sets of sample convolutional layers with an interactive learning strategy to obtain two enhanced sub-features;
[0063] The interactive learning process includes:
[0064] A1: Two different one-dimensional convolutional modules φ and ψ are used to transform the two subsequences into hidden states respectively, and the two hidden state subsequences are converted into exp format respectively. They are then interacted with the subsequences according to element-wise dot product to obtain two scaled features;
[0065] A2: Use two other different one-dimensional convolutional modules ρ and η to convert the two scaled features into two other hidden states respectively, and then add or subtract from the two scaled features respectively;
[0066] S23: Enhanced sequence representation is obtained through the aggregation layer;
[0067] S231: Rearrange the two enhanced sub-features by reversing the parity splitting operation, and concatenate them into a new sequence representation X. new ;
[0068] S232: Add the new sequence representation to the high-dimensional vector sequence X by residual connection.
[0069] S24: The enhanced sequence representation is decoded through a fully connected layer, and the decoded output represents the user's potential intent.
[0070] S3: Evaluate the probability of each candidate item based on the user's potential intent and make recommendations.
[0071] S31: Connect the last embedded item x m And the output O of step S2 s A feedforward neural network is used to obtain an enhanced representation O;
[0072] S32: Calculate the probability that each item i will be the next in the session.
[0073] S33: Obtain the true probability distribution of the next item.
[0074] In the user intent modeling process, the session is first converted into a high-dimensional vector using an embedding layer, and then the transitions between behaviors are modeled using an interaction layer and an aggregation layer to capture the user's latent intent in session s.
[0075] In the optimization and recommendation steps, the probability of each candidate item is evaluated based on the representation of user potential.
[0076] Specifically,
[0077] In step S2, S21: First, construct an embedding layer to embed the input session s = [i s,1 i s,2 , ..., i s,m Transform into a high-dimensional vector X = {x1, x2, ..., x} m For each term i∈s, the hidden representation is: d is the size of the embedding.
[0078] S22: To obtain finer-grained information and focus on the interaction between adjacent items, this embodiment designs an interaction layer, applying splitting and interaction learning to decompose the high-dimensional vector X into two enhanced sub-features X′. even and X′ odd .
[0079] S221: Splitting. In SBR, the user behavior sequence carries the user's potential intent; therefore, the transformations and dependencies between session behaviors are crucial. To better extract transformation information and more easily model item dependencies, this embodiment uses a splitting method to divide the original sequence X, i.e., the high-dimensional vector X, into two subsequences: even-element sequences X. even And the sequence of odd elements X odd To preserve user intent within the information, this embodiment retains two sub-sequences for feature extraction, each with a coarser temporal resolution compared to the original sequence. Then, considering the heterogeneity of the two sub-sequences, this embodiment uses two different sets of sample convolutional layers to process X. even and X odd .
[0080] S222: Interactive Learning. To model the transformations and dependencies between user behaviors and capture the temporal information of behavior sequences, this embodiment uses convolutional modules and a novel interactive learning strategy to achieve information exchange between these two sub-features. Interactive learning achieves information exchange by learning the parameters of the affine transformation, which can greatly improve the representational power of the sub-features. This interactive learning process includes two parts:
[0081] A1: This embodiment uses two different one-dimensional convolutional modules φ and ψ to transform the two sub-features X. even and X odd The two subsequences are then converted to a hidden state. This embodiment then converts both subsequences to exp format and compares them with X. even and X odd Interacting based on element-wise dot product:
[0082]
[0083]
[0084] ⊙ represents the product at the element level; this part can be considered as a product of X. even and X odd A scaling transformation is performed, where the scaling factor is learned from each other using a neural network module.
[0085] A2: In this embodiment, two additional one-dimensional convolutional modules ρ and η are used to scale the two features. and Switch to one of the other two hidden states, and then... and Addition and subtraction:
[0086]
[0087]
[0088] In step S23, S231: In the aggregation layer, this embodiment rearranges the two sub-features X′ by reversing the parity splitting operation. even and X′ odd The elements are concatenated into a new sequence representing X. new 。;
[0089] S232: Add a new sequence representation to the original sequence X by residual connection.
[0090] S24: In the fully connected layer, the enhanced sequence representation is decoded using the fully connected layer. It represents the user's underlying intent:
[0091]
[0092] in This indicates a fully connected layer.
[0093] S3: Evaluate the probability of the candidate based on the above output: First, concatenate the embedding x of the last term. m and output O s Then a feedforward neural network is used to obtain the enhanced representation O:
[0094] O=f(W([O s ||x m ])+b,
[0095] Where || denotes a concatenation operation. It is a weighted matrix. Let f(·) be the bias vector, and let f(·) denote the nonlinear activation function SELU. Then, for each item i∈I, calculate its probability of becoming the next in the session, as follows:
[0096]
[0097]
[0098] Where x i It is the embedding of i, L2Norm is the L2 normalization function, w k It is a normalized weight. This represents the final probability of i. In this embodiment, the loss function is defined as the cross-entropy between the true value and the prediction:
[0099]
[0100] Where y is the true probability distribution of the next item, which is a one-bit effective code, and recommendations are made based on the resulting probability.
[0101] This embodiment proposes a concise and effective SBR model, SCIRec, which consists of sample convolutions and an interactive learning strategy, along with a session recommendation method based on sample convolutions and the interactive strategy. This embodiment uses convolutional modules and a novel interactive learning strategy to simulate transitions between user behaviors and captures temporal information of behavior sequences to extract latent user intent, thereby making better recommendations. Extensive experiments show that on real-world SBR datasets, the proposed model significantly outperforms state-of-the-art models. In other words, SCIRec can effectively capture temporal and pairwise item transition information in SBR.
[0102] To evaluate the efficiency of SCIRec, this embodiment compares the training time and trainable parameters for each epoch with the state-of-the-art (SOTA) models on the same device. The results are shown in Table 1. It can be seen that SCIRec is significantly more efficient than the recent SOTA methods. Compared to the CNN-based method NextItNet, the model proposed in this embodiment achieves a 24.3x speedup on Tmall. Compared to GNN-based models, SCIRec achieves speedups ranging from 3.1 to 51.7x. Based on these experimental results, it can be concluded that SCIRec significantly outperforms the recent SOTA models with less time consumption, demonstrating its superiority. Table 1 shows the training time for each method's first-generation training on Tmall, where s, m, and represent seconds, minutes, and hours, respectively.
[0103] Table 1
[0104]
[0105] Refer to Table 2, which compares the performance (%) with the baseline on the three datasets. The overall best results are shown in bold for each metric, and the underlined results are the best results for all baselines.
[0106] The method proposed in this embodiment demonstrates significant advantages on all datasets. Compared to S2-DHCN, it achieves a 10%-29.04% improvement in MRR@10 on the Tmall dataset. The superior performance of SCIRec indicates that modeling the transitions between user behaviors and capturing the temporal information of behavior sequences can generate better recommendations, and that using cellular neural networks and interactive learning strategies to model the transitions and dependencies between user behaviors in SBR is effective.
[0107] Table 2
[0108]
[0109] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0110] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0111] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0112] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0113] The above description provides a further detailed explanation of the present invention in conjunction with specific / preferred embodiments, and it should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various substitutions or modifications can be made to these described embodiments without departing from the concept of the present invention, and all such substitutions or modifications should be considered within the scope of protection of the present invention. In the description of this specification, the reference to terms such as "an embodiment," "some embodiments," "preferred embodiment," "example," "specific example," or "some examples," etc., indicates that the specific features, structures, materials, or characteristics described in connection with that embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any suitable manner in one or more embodiments or examples. Without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification and the features of different embodiments or examples. Although the embodiments of the present invention and their advantages have been described in detail, it should be understood that various changes, substitutions, and modifications can be made herein without departing from the scope of protection of the patent application.
Claims
1. A session recommendation method based on sampling convolution and interaction strategies, characterized in that, Includes the following steps: S1: Input session sequence; S2: Capture temporal information of conversation sequences and extract users' potential intentions through a conversation recommendation model based on sampling convolution and interaction strategies; S3: Evaluate the probability of each candidate item based on the user's potential intent and make recommendations; Step S2 includes the following steps: S21: Transform the input session sequence into a high-dimensional vector sequence through an embedding layer. ; S22: The high-dimensional vector sequence is processed through interactive layer application decomposition and interactive learning. It is decomposed into two enhanced sub-features; S23: Enhanced sequence representation is obtained through the aggregation layer; S24: The enhanced sequence representation is decoded through a fully connected layer, and the decoded output represents the user's potential intent; Step S22 includes the following steps: S221: The high-dimensional vector sequence Split into two subsequences; S222: Two subsequences are processed using two different sets of sample convolutional layers with an interactive learning strategy to obtain two enhanced sub-features; In step S222, information exchange between two sub-features is achieved by using a convolutional module and interactive learning. The interactive learning achieves information exchange by learning the parameters of the affine transformation to enhance the representation capability of the sub-features. The interactive learning process includes: A1: Use two different one-dimensional convolutional modules and The two subsequences are transformed into hidden states, and the two hidden subsequences are converted into exp format. These are then interacted with the original subsequences using element-wise dot products to obtain two scaling features. The two subsequences are both even-element sequences. And odd element sequence Step A1 is represented by the following formula: , , where ⊙ represents the product at the element level; A2: Use two different one-dimensional convolutional modules and The two scaling features are converted into two other hidden states, and then added to or subtracted from the two scaling features respectively. Step A2 is represented by the following formula: 。 2. The session recommendation method based on sampling convolution and interaction strategy as described in claim 1, characterized in that, Step S23 includes the following steps: S231: Rearrange the two enhanced sub-features by reversing the parity splitting operation and concatenate them into a new sequence representation. ; S232: Add the new sequence representation to the high-dimensional vector sequence via residual connection. .
3. The session recommendation method based on sampling convolution and interaction strategy as described in claim 1, characterized in that, Step S3 includes the following steps: S31: Connect the last embedded item and the output of step S2 Using feedforward neural networks to obtain enhanced representations ; S32: Calculate each item The probability of being the next in the conversation ; S33: Obtain the true probability distribution of the next item; in, This represents the user's potential intent.
4. The session recommendation method based on sampling convolution and interaction strategy as described in claim 3, characterized in that, The enhanced representation in step S31 Calculated using the following formula: Where | represents a concatenation operation, It is a weighted matrix. Represents the user's potential intent. It is the deviation vector. This represents the nonlinear activation function SELU.
5. The session recommendation method based on sampling convolution and interaction strategy as described in claim 3, characterized in that, In step S32, the project final probability Calculated using the following formula: in yes The embedding, L2Norm is the L2 normalization function, It is a normalized weight.
6. The session recommendation method based on sampling convolution and interaction strategy as described in claim 5, characterized in that, The loss function of the model is: in This is the true probability distribution of the next project.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program can perform the steps of the method described in any one of claims 1-6.
Citation Information
Patent Citations
Session recommendation method based on convolutional self-attention network
CN112258262A
Recommendation method based on interactive neighbor session
CN114625969A